iov: Bypass usercopy hardening for kernel iterators#612
iov: Bypass usercopy hardening for kernel iterators#612blktests-ci[bot] wants to merge 1 commit intolinus-master_basefrom
Conversation
|
Upstream branch: af4e9ef |
|
Upstream branch: af4e9ef |
d4e9bad to
ecd10e2
Compare
2b94c84 to
cd79156
Compare
ecd10e2 to
d0e1bed
Compare
|
Upstream branch: af4e9ef |
cd79156 to
731da92
Compare
d0e1bed to
6b51c57
Compare
|
Upstream branch: 0031c06 |
731da92 to
cd0bc18
Compare
6b51c57 to
78036b2
Compare
|
Upstream branch: ecc64d2 |
cd0bc18 to
677ac1e
Compare
78036b2 to
bbb3394
Compare
|
Upstream branch: c107785 |
677ac1e to
65595d1
Compare
bbb3394 to
901a429
Compare
|
Upstream branch: 5ee8dbf |
65595d1 to
1edc59e
Compare
901a429 to
1f19ba6
Compare
|
Upstream branch: 1f318b9 |
1edc59e to
66fe4dd
Compare
1f19ba6 to
e79276a
Compare
|
Upstream branch: None |
66fe4dd to
70a51a8
Compare
e79276a to
0dd9afc
Compare
|
Upstream branch: 80234b5 |
Profiling NFSD under an iozone workload showed that hardened usercopy checks consume roughly 1.3% of CPU in the TCP receive path. The runtime check in check_object_size() validates that copy buffers reside in expected slab regions, which is meaningful when data crosses the user/kernel boundary but adds no value when both source and destination are kernel addresses. Split check_copy_size() so that copy_to_iter() can bypass the runtime check_object_size() call for kernel-only iterators (ITER_BVEC, ITER_KVEC). Existing callers of check_copy_size() are unaffected; user-backed iterators still receive the full usercopy validation. This benefits all kernel consumers of copy_to_iter(), including the TCP receive path used by the NFS client and server, NVMe-TCP, and any other subsystem that uses ITER_BVEC or ITER_KVEC receive buffers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
70a51a8 to
c6bf057
Compare
Pull request for series with
subject: iov: Bypass usercopy hardening for kernel iterators
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1060724