Whamcloud - gitweb
LU-12331 llite: create obd_device with usercopy whitelist 46/34946/4
authorLi Dongyang <dongyangli@ddn.com>
Thu, 23 May 2019 06:48:15 +0000 (16:48 +1000)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Jul 2019 22:41:01 +0000 (22:41 +0000)
commit7f77996b1c4ac3a874a1f9e016e8b0e3cfee6992
tree55e50bd87215a4251189e8484140983db38ae11a
parentf6497eb3503b7efff823888ed76422db4e9e078e
LU-12331 llite: create obd_device with usercopy whitelist

Since kernel 4.16 hardened usercopy has been added,
whitelist the struct obd_device to silence the warning.

 Bad or missing usercopy whitelist? Kernel memory exposure attempt
 detected from SLUB object 'll_obd_dev_cache' (offset 1256, size 40)!
 WARNING: CPU: 1 PID: 17534 at mm/usercopy.c:83 usercopy_warn+0x7d/0xa0
 Call Trace:
   __check_object_size+0xfa/0x181
   lmv_iocontrol+0x1146/0x1880 [lmv]
   ll_obd_statfs+0x356/0x860 [lustre]
   ll_dir_ioctl+0x1e37/0x6760 [lustre]
   do_vfs_ioctl+0xa4/0x630

Linux-commit: 8eb8284b412906181357c2b0110d879d5af95e52

Test-Parameters: trivial
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Change-Id: Ie863e8a5e2cebd3fd716e7ccc4e0491f83f6fabc
lustre/include/lustre_compat.h
lustre/obdclass/genops.c