summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorStian Halseth <stian@itx.no>2026-09-17 17:16:14 +0200
committerChristian Brauner <brauner@kernel.org>2026-10-22 18:48:37 +0200
commit697f252a941cf1514325c24f418c418a59928b03 (patch)
treedf9317b789cfb89fd6fed3d7c01d960cbaf458ff /tools/lib/python
parent829f27a9805bd28028dc73df836e966629700adc (diff)
fs: allow positional I/O on files with unsigned offsets
pread64(), pwrite64(), preadv() and pwritev() reject a negative position with -EINVAL before looking up the file, so FOP_UNSIGNED_OFFSET is never consulted. lseek() followed by read() on the same descriptor accepts the position, and rw_verify_area() already handles it, overflow check included. Only the positional syscall wrappers reject it up front. Check the position after the file lookup and let a negative value through for files with unsigned offsets, as vfs_setpos_cookie() and rw_verify_area() do. Behavior for every other file is unchanged. On sparc64 userspace is mapped above 2^63, so pread() on /proc/PID/mem always failed with EINVAL. pldd(1) could not read a target's memory because of this, and gdb carries a userspace workaround for the same thing (PR gdb/30525). Signed-off-by: Stian Halseth <stian@itx.no> Link: https://patch.msgid.link/20260917151614.376867-3-stian@itx.no Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions