public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Stefan <[email protected]>, [email protected]
Subject: Re: madvise/fadvise 32-bit length
Date: Sat, 1 Jun 2024 08:19:09 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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


  reply	other threads:[~2024-06-01 14:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-01  9:43 madvise/fadvise 32-bit length Stefan
2024-06-01 14:19 ` Jens Axboe [this message]
2024-06-01 15:05   ` Jens Axboe
2024-06-01 15:22     ` Stefan
2024-06-01 15:35       ` Jens Axboe
2024-06-01 15:51         ` Stefan
2024-06-01 18:33           ` Jens Axboe
2024-06-02  8:58             ` Stefan
2024-06-02 14:49               ` Jens Axboe
2024-06-05  5:25                 ` Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox