Re: [PATCH] fs: fix overflow check in rw_verify_area()

From: Ding Feng

Date: Fri Nov 20 2026 - 00:15:12 EST


Hi Matteo,

On Wed, 24 Dec 2025 at 00:28, Matteo Croce wrote:
> Following a discussion on the coreutils mailing list[1] I think that
> this should be fixed differently.
> I'll be back with a v2.

This is still present in v7.4-rc3 (65e4fd942). On a 100-byte tmpfs
file, a read that starts below LLONG_MAX but would end past it fails
instead of returning 0 at end of file:

preadv2(fd, 200 bytes, pos = LLONG_MAX - 50) = -1 EINVAL
preadv2(fd, 50 bytes, pos = LLONG_MAX - 50) = 0

sendfile() with *offset near LLONG_MAX fails the same way.

Are you still planning a v2?

Thanks,
Ding Feng