On 6/1/24 3:43 AM, Stefan wrote: > io_uring uses the __u32 len field in order to pass the length to > madvise and fadvise, but these calls use an off_t, which is 64bit on > 64bit platforms. > > When using liburing, the length is silently truncated to 32bits (so > 8GB length would become zero, which has a different meaning of "until > the end of the file" for fadvise). > > If my understanding is correct, we could fix this by introducing new > operations MADVISE64 and FADVISE64, which use the addr3 field instead > of the length field for length. We probably just want to introduce a flag and ensure that older stable kernels check it, and then use a 64-bit field for it when the flag is set. -- Jens Axboe