android_kernel_google_msm/init
Jeff Layton db18c8e1e5 vfs: allocate page instead of names_cache buffer in mount_block_root
First, it's incorrect to call putname() after __getname_gfp() since the
bare __getname_gfp() call skips the auditing code, while putname()
doesn't.

mount_block_root allocates a PATH_MAX buffer via __getname_gfp, and then
calls get_fs_names to fill the buffer. That function can call
get_filesystem_list which assumes that that buffer is a full page in
size. On arches where PAGE_SIZE != 4k, then this could potentially
overrun.

In practice, it's hard to imagine the list of filesystem names even
approaching 4k, but it's best to be safe. Just allocate a page for this
purpose instead.

With this, we can also remove the __getname_gfp() definition since there
are no more callers.

Change-Id: Ic4539226aa0562b82513be29ddcaee1ef88584f2
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2018-12-07 22:28:48 +04:00
..
Kconfig sched_clock: Squashed revert of the latest updates 2018-02-20 21:56:17 +03:00
Makefile
calibrate.c init: check printed flag to skip printing message 2012-03-23 16:58:38 -07:00
do_mounts.c vfs: allocate page instead of names_cache buffer in mount_block_root 2018-12-07 22:28:48 +04:00
do_mounts.h
do_mounts_initrd.c get rid of pointless includes of ext2_fs.h 2012-03-31 16:03:15 -04:00
do_mounts_md.c init: mark __user address space on string literals 2010-10-26 16:52:15 -07:00
do_mounts_rd.c new helper: ext2_image_size() 2012-03-31 16:03:16 -04:00
initramfs.c init/initramfs.c: should use umode_t 2012-01-03 22:55:14 -05:00
main.c sched_clock: Squashed revert of the latest updates 2018-02-20 21:56:17 +03:00
noinitramfs.c init: mark __user address space on string literals 2010-10-26 16:52:15 -07:00
version.c proc: Usable inode numbers for the namespace file descriptors. 2015-07-13 11:18:01 -07:00