linux/fs/exofs
Kees Cook 20fe935358 exofs: avoid VLA in structures
On the quest to remove all VLAs from the kernel[1] this adjusts several
cases where allocation is made after an array of structures that points
back into the allocation.  The allocations are changed to perform
explicit calculations instead of using a Variable Length Array in a
structure.

Additionally, this lets Clang compile this code now, since Clang does
not support VLAIS[2].

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com
[2] https://lkml.kernel.org/r/CA+55aFy6h1c3_rP_bXFedsTXzwW+9Q9MfJaW7GUmMBrAp-fJ9A@mail.gmail.com

[keescook@chromium.org: v2]
  Link: http://lkml.kernel.org/r/20180418163546.GA45794@beast
Link: http://lkml.kernel.org/r/20180327203904.GA1151@beast
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Boaz Harrosh <ooo@electrozaur.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-06-15 07:55:24 +09:00
..
BUGS
common.h
dir.c
exofs.h
file.c
inode.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
Kbuild
Kconfig
Kconfig.ore
namei.c
ore_raid.c exofs: avoid VLA in structures 2018-06-15 07:55:24 +09:00
ore_raid.h
ore.c exofs: avoid VLA in structures 2018-06-15 07:55:24 +09:00
super.c exofs: avoid VLA in structures 2018-06-15 07:55:24 +09:00
sys.c