Whamcloud - gitweb
LU-16118 build: Workaround __write_overflow_field errors
authorShaun Tancheff <shaun.tancheff@hpe.com>
Thu, 9 Feb 2023 04:02:00 +0000 (20:02 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 16 Feb 2023 21:18:53 +0000 (21:18 +0000)
commit40459f708da779d9accb19f64eb7bb59780bd53e
tree75dfa6f00657a47aba8a40996ff2cc756b0a687a
parent37619ef6b28d885999951039ef95b62cd5fea467
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/ex/lustre-release/+/49876
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
libcfs/include/libcfs/linux/linux-misc.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