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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZtAg8Slmclt8jm4a@tiehlicka>
Date: Thu, 29 Aug 2024 09:19:13 +0200
From: Michal Hocko <mhocko@...e.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: Matthew Wilcox <willy@...radead.org>, linux-fsdevel@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Dave Chinner <dchinner@...hat.com>
Subject: Re: [PATCH] bcachefs: Switch to memalloc_flags_do() for vmalloc
 allocations

On Wed 28-08-24 18:58:43, Kent Overstreet wrote:
> On Wed, Aug 28, 2024 at 09:26:44PM GMT, Michal Hocko wrote:
> > On Wed 28-08-24 15:11:19, Kent Overstreet wrote:
> > > On Wed, Aug 28, 2024 at 07:48:43PM GMT, Matthew Wilcox wrote:
> > > > On Wed, Aug 28, 2024 at 10:06:36AM -0400, Kent Overstreet wrote:
> > > > > vmalloc doesn't correctly respect gfp flags - gfp flags aren't used for
> > > > > pte allocation, so doing vmalloc/kvmalloc allocations with reclaim
> > > > > unsafe locks is a potential deadlock.
> > > > 
> > > > Kent, the approach you've taken with this was NACKed.  You merged it
> > > > anyway (!).  Now you're spreading this crap further, presumably in an effort
> > > > to make it harder to remove.
> > > 
> > > Excuse me? This is fixing a real issue which has been known for years.
> > 
> > If you mean a lack of GFP_NOWAIT support in vmalloc then this is not a
> > bug but a lack of feature. vmalloc has never promissed to support this
> > allocation mode and a scoped gfp flag will not magically make it work
> > because there is a sleeping lock involved in an allocation path in some
> > cases.
> > 
> > If you really need this feature to be added then you should clearly
> > describe your usecase and listen to people who are familiar with the
> > vmalloc internals rather than heavily pushing your direction which
> > doesn't work anyway.
> 
> Michal, I'm plenty familiar with the vmalloc internals. Given that you
> didn't even seem to be aware of how it doesn't respect gfp flags, you
> seem to be the person who hasn't been up to speed in this discussion.

GFP_NOWAIT is explicitly documented as unsupported
(__vmalloc_node_range_noprof). vmalloc internals are using
vmap_purge_lock and blocking notifiers (vmap_notify_list) in rare cases
so PF_MEMALLOC_NORECLAIM is not really sufficient to provide NOWAIT
semantic (this is really not just about page tables allocations). There
might be other places that require blocking - I do not claim to be an
expert on the vmalloc allocator.

Just my 2 cents do whatever you want with this information. 

It seems that this discussion is not going to be really productive so I
will leave you here.

If you reconsider and realize that a productive discussion realy
requires also listening and respect then get back and we can try again.

Good luck!
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ