WSL2-Linux-Kernel/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
Kbuild exofs: switch to {simple,page}_symlink_inode_operations 2015-05-10 22:18:27 -04:00
Kconfig ore: FIX breakage when MISC_FILESYSTEMS is not set 2012-01-06 16:48:14 +02:00
Kconfig.ore ore: Support for raid 6 2014-05-22 14:48:15 +03:00
common.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
dir.c iversion: Rename make inode_cmp_iversion{+raw} to inode_eq_iversion{+raw} 2018-02-01 08:15:25 -05:00
exofs.h exofs: Convert to separately allocated bdi 2017-04-20 12:09:55 -06:00
file.c fs: convert a pile of fsync routines to errseq_t based reporting 2017-08-01 08:39:29 -04:00
inode.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
namei.c Merge remote-tracking branch 'ovl/rename2' into for-linus 2016-10-10 23:02:51 -04:00
ore.c exofs: avoid VLA in structures 2018-06-15 07:55:24 +09:00
ore_raid.c exofs: avoid VLA in structures 2018-06-15 07:55:24 +09:00
ore_raid.h Boaz Harrosh - Fix broken email address 2014-10-19 20:22:32 +03:00
super.c exofs: avoid VLA in structures 2018-06-15 07:55:24 +09:00
sys.c locking/atomic, kref: Add kref_read() 2017-01-14 11:37:18 +01:00