Whamcloud - gitweb
LU-16118 build: Workaround __write_overflow_field errors 64/48364/23
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sun, 22 Jan 2023 17:43:29 +0000 (11:43 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Feb 2023 06:26:57 +0000 (06:26 +0000)
commita3a51806ef361f55421a1bc07f64c78730ae50d5
treec84d46aa3a357d1356236a03d6d31560e2b4513c
parent391392e11743efcb0de815af8bb5a563e4b3cdc6
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);

Test-Parameters: trivial
HPE-bug-id: LUS-11194
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Iacd1ab03d1b90ce62b5d7b65e1cd518a5f7981f2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48364
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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