lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220503163905.GM1790663@paulmck-ThinkPad-P17-Gen-1>
Date:   Tue, 3 May 2022 09:39:05 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Michal Hocko <mhocko@...e.com>
Cc:     liam.howlett@...cle.com, willy@...radead.org, walken.cr@...il.com,
        hannes@...xchg.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: Memory allocation on speculative fastpaths

On Tue, May 03, 2022 at 06:04:13PM +0200, Michal Hocko wrote:
> On Tue 03-05-22 08:59:13, Paul E. McKenney wrote:
> > Hello!
> > 
> > Just following up from off-list discussions yesterday.
> > 
> > The requirements to allocate on an RCU-protected speculative fastpath
> > seem to be as follows:
> > 
> > 1.	Never sleep.
> > 2.	Never reclaim.
> > 3.	Leave emergency pools alone.
> > 
> > Any others?
> > 
> > If those rules suffice, and if my understanding of the GFP flags is
> > correct (ha!!!), then the following GFP flags should cover this:
> > 
> > 	__GFP_NOMEMALLOC | __GFP_NOWARN
> 
> GFP_NOWAIT | __GFP_NOMEMALLOC | __GFP_NOWARN

Ah, good point on GFP_NOWAIT, thank you!

> > Or is this just a fancy way of always returning NULL or some such?  ;-)
> 
> It could fail quite easily. We would also want to guarantee (by
> documenting I guess) that the page allocator never does anything that
> would depend or invoke rcu_synchronize or something like that.

The GPF_NOWAIT should rule out synchronize_rcu() and similar, correct?

> I believe this is the case currently.

Here is hoping!  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ