From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Shay Drory <shayd@nvidia.com>, linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/core: Silence oversized kvmalloc() warning
Date: Tue, 1 Apr 2025 13:35:04 -0300 [thread overview]
Message-ID: <20250401163504.GA325092@nvidia.com> (raw)
In-Reply-To: <a066aa6e-ff4d-4043-a963-52ce83aaf111@app.fastmail.com>
On Mon, Mar 31, 2025 at 10:04:05PM +0300, Leon Romanovsky wrote:
>
>
> On Mon, Mar 31, 2025, at 20:45, Jason Gunthorpe wrote:
> > On Wed, Mar 26, 2025 at 12:58:54PM +0200, Leon Romanovsky wrote:
> >> On Wed, Mar 19, 2025 at 02:23:49PM -0300, Jason Gunthorpe wrote:
> >> > On Wed, Mar 19, 2025 at 02:42:21PM +0200, Leon Romanovsky wrote:
> >> > > From: Shay Drory <shayd@nvidia.com>
> >> > >
> >> > > syzkaller triggered an oversized kvmalloc() warning.
> >> > > Silence it by adding __GFP_NOWARN.
> >> >
> >> > I don't think GFP_NOWARN is the right thing..
> >> >
> >> > We've hit this before and I think we ended up adding a size limit
> >> > check prior to the kvmalloc to prevent the overflow triggered warning.
> >>
> >> The size check was needed before this commit was merged:
> >> 0708a0afe291 ("mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls")
> >>
> >> From that point, the correct solution is simply provide __GFP_NOWARN flag.
> >
> > I'm not sure, NOWARN removes all warnings, even normal OOM warnings
> > from regually sized allocations which we don't want to remove.
>
> I disagree, this allocation is called from user space. We can safely
> skip OOM messages and error here will be enough.
That is not the standard, we OOM splat on all userspace allocations
too.
GFP_NOWARN is supposed to be used in cases where the OOM has a
recovery and nothing will fail.
I think the right thing here is to limit the size, though I'm not
really sure what the limit should be.
Jason
next prev parent reply other threads:[~2025-04-01 16:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 12:42 [PATCH rdma-next] RDMA/core: Silence oversized kvmalloc() warning Leon Romanovsky
2025-03-19 17:23 ` Jason Gunthorpe
2025-03-26 10:58 ` Leon Romanovsky
2025-03-31 17:45 ` Jason Gunthorpe
2025-03-31 19:04 ` Leon Romanovsky
2025-04-01 16:35 ` Jason Gunthorpe [this message]
2025-04-03 10:30 ` Leon Romanovsky
2025-04-09 18:32 ` Leon Romanovsky
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 \
--in-reply-to=20250401163504.GA325092@nvidia.com \
--to=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=shayd@nvidia.com \
/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