WSL2-Linux-Kernel/fs/hfsplus
Kees Cook e35fa567a0 hfsplus: use struct_group_attr() for memcpy() region
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memset(), avoid intentionally writing across
neighboring fields.

Add struct_group() to mark the "info" region (containing struct DInfo
and struct DXInfo structs) in struct hfsplus_cat_folder and struct
hfsplus_cat_file that are written into directly, so the compiler can
correctly reason about the expected size of the writes.

"pahole" shows no size nor member offset changes to struct
hfsplus_cat_folder nor struct hfsplus_cat_file.  "objdump -d" shows no
object code changes.

Link: https://lkml.kernel.org/r/20211119192851.1046717-1-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-01-20 08:52:54 +02:00
..
Kconfig
Makefile
attributes.c
bfind.c
bitmap.c
bnode.c
brec.c
btree.c
catalog.c
dir.c
extents.c
hfsplus_fs.h
hfsplus_raw.h hfsplus: use struct_group_attr() for memcpy() region 2022-01-20 08:52:54 +02:00
inode.c
ioctl.c
options.c
part_tbl.c
super.c
tables.c
unicode.c
wrapper.c
xattr.c hfsplus: use struct_group_attr() for memcpy() region 2022-01-20 08:52:54 +02:00
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c