Re: [PATCH 0/2] fs: honor FOP_UNSIGNED_OFFSET in llseek and positional I/O
From: Florian Weimer
Date: Thu Sep 17 2026 - 12:15:40 EST
* Stian Halseth:
> Tested on an UltraSPARC T4: pread(), preadv(), pwrite(), pwritev() and
> lseek() on /proc/PID/mem at positions above 2^63 return the correct data
> and offset; a negative position on a regular file or a pipe still fails
> with EINVAL and position 0 on a pipe with ESPIPE, as before; and the
> stock pldd(1) works again. On other architectures the change is a no-op
> for every file without FOP_UNSIGNED_OFFSET, and userspace addresses
> never set the top bit, so the new paths are only reachable by passing
> a bogus position to /proc/PID/mem or /dev/mem, which then fails in the
> driver instead of the wrapper.
For lseek, aren't some file offsets (the top 4095 bytes or so just
before 2**64) ambiguous as error indicators? You would have to use
_llseek when accessing /proc/PID/mem.
Thanks,
Florian