Whamcloud - gitweb
LU-17993 llite: add further check for user buffer 04/56404/8
authorShaun Tancheff <shaun.tancheff@hpe.com>
Tue, 24 Sep 2024 17:27:01 +0000 (00:27 +0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 27 Sep 2024 23:55:43 +0000 (23:55 +0000)
commit3a18a7b8cd0070523ba8383e7205f062b5eaef4f
treeecf4c0a088d1cf9964adae7467f5282d7c3b2ff5
parentc4cdbd81217c0302f74ae19d22a5342e6279d0e4
LU-17993 llite: add further check for user buffer

The alignment check in ll_iov_iter_alignment for the user buffer
could be wrong if the IO count is less than PAGE_SIZE, add more
checks for it.

Linux commit v5.19-rc4-8-gcfa320f72882
   iov: introduce iov_iter_aligned

Added iov_iter_is_aligned which can do the additional checking,
provide an equivalent for older kernels.

Test-Parameters: testlist=sanity clientarch=aarch64 clientdistro=el9.3   serverdistro=el8.9 env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Test-Parameters: testlist=sanity clientarch=ppc64le clientdistro=el8.9   serverdistro=el8.9 env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Test-Parameters: testlist=sanity clientarch=aarch64 clientdistro=el9.3   serverversion=2.15.4 serverdistro=el8.9   env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Test-Parameters: testlist=sanity clientarch=aarch64 clientdistro=el9.3   env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Test-Parameters: testlist=sanity clientarch=x86_64 clientdistro=el8.10   env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Test-Parameters: testlist=sanity clientarch=x86_64 clientdistro=el9.4   env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Test-Parameters: testlist=sanity serverversion=2.15.4 serverdistro=el8.9   serverdistro=el8.9 env=ONLY="119",SANITY_EXCEPT="119i",ONLY_REPEAT=50
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I640dc417e52cc5497e5dd898ea3018f990da3fda
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56404
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
libcfs/include/libcfs/linux/linux-misc.h
lustre/autoconf/lustre-core.m4
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/rw26.c
lustre/tests/sanity.sh