summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2018-06-27 14:30:45 -0700
committerShentubot <shentubot@google.com>2018-06-27 14:31:35 -0700
commit99afc982f1f0e40059e1446ea6f3cb725b1fbde7 (patch)
treeeb34c666d0c1a736af382095379304c15c604680 /README.md
parent4215e059e24c5ed6298060769444b0eeaa03da8a (diff)
Call mm.CheckIORange() when copying in IOVecs.
CheckIORange is analagous to Linux's access_ok() method, which is checked when copying in IOVecs in both lib/iov_iter.c:import_single_range() and lib/iov_iter.c:import_iovec() => fs/read_write.c:rw_copy_check_uvector(). gVisor copies in IOVecs via Task.SingleIOSequence() and Task.CopyInIovecs(). We were checking the address range bounds, but not whether the address is valid. To conform with linux, we should also check that the address is valid. For usual preadv/pwritev syscalls, the effect of this change is not noticeable, since we find out that the address is invalid before the syscall completes. For vectorized async-IO operations, however, this change is necessary because Linux returns EFAULT when the operation is submitted, but before it executes. Thus, we must validate the iovecs when copying them in. PiperOrigin-RevId: 202370092 Change-Id: I8759a63ccf7e6b90d90d30f78ab8935a0fcf4936
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions