Whamcloud - gitweb
LU-16118 build: Workaround __write_overflow_field errors 18/49118/6
authorShaun Tancheff <shaun.tancheff@hpe.com>
Wed, 8 Mar 2023 20:08:27 +0000 (12:08 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 28 Mar 2023 07:04:00 +0000 (07:04 +0000)
commite7d897ce9cdfe0cfbfa6f4135a4cc70eea0ea2a7
treeabb7cc10761f80eeabc2de227a4ff993b7ef9a76
parent2388061dd1941bf7256dfec17ef415f9949c8a2d
LU-16118 build: Workaround __write_overflow_field errors

Linux commit v5.17-rc3-1-gf68f2ff91512
   fortify: Detect struct member overflows in memcpy() at compile-time

memcpy and memset of collections of struct members
will trigger:

error: call to ‘__write_overflow_field’ declared with attribute
   warning: detected write beyond size of field (1st parameter);
   maybe use struct_group()?
   [-Werror] __write_overflow_field(p_size_field, size);

Lustre-change: https://review.whamcloud.com/48364
Lustre-commit: a3a51806ef361f55421a1bc07f64c78730ae50d5

Test-Parameters: trivial
HPE-bug-id: LUS-11194
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iacd1ab03d1b90ce62b5d7b65e1cd518a5f7981f2
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49118
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
libcfs/include/libcfs/linux/linux-misc.h
lnet/include/uapi/linux/lnet/lnet-types.h
lustre/include/cl_object.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/obdclass/md_attrs.c