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] [day] [month] [year] [list]
Message-ID: <bdksoo6vcwik4sdgj2lo5tkzo2ybdhvskyba7aad2bnyispqad@hrpx56mpy3ag>
Date: Mon, 18 Aug 2025 22:36:54 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>, 
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Linux Next Mailing List <linux-next@...r.kernel.org>, 
	Vitaly Wool <vitaly.wool@...sulko.se>
Subject: Re: linux-next: manual merge of the bcachefs tree with the
 mm-unstable tree

On Mon, Aug 18, 2025 at 07:29:41PM -0700, Andrew Morton wrote:
> On Tue, 19 Aug 2025 11:12:28 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
> 
> > Hi all,
> > 
> > Today's linux-next merge of the bcachefs tree got a conflict in:
> > 
> >   fs/bcachefs/darray.c
> > 
> > between commit:
> > 
> >   97b75b7e275a ("mm/slub: allow to set node and align in k[v]realloc")
> > 
> > from the mm-unstable tree and commit:
> > 
> >   808708fe9da0 ("bcachefs: darray_make_room_rcu()")
> > 
> > from the bcachefs tree.
> > 
> > ...
> >
> > --- a/fs/bcachefs/darray.c
> > +++ b/fs/bcachefs/darray.c
> > @@@ -20,10 -22,11 +22,11 @@@ int __bch2_darray_resize_noprof(darray_
> >   		if (unlikely(check_mul_overflow(new_size, element_size, &bytes)))
> >   			return -ENOMEM;
> >   
> > - 		void *data = likely(bytes < INT_MAX)
> > + 		void *old = d->data;
> > + 		void *new = likely(bytes < INT_MAX)
> >  -			? kvmalloc_noprof(bytes, gfp)
> >  +			? kvmalloc_node_align_noprof(bytes, 1, gfp, NUMA_NO_NODE)
> >   			: vmalloc_noprof(bytes);
> > - 		if (!data)
> > + 		if (!new)
> >   			return -ENOMEM;
> 
> uh, OK, I guess a 2GB allocation is reasonable on a 16TB machine.

yeah, already had that argument with Linus :) journals get big these
days...

> But why does bcachefs find it necessary to bypass allocation profiling?

Not bypassing, darray is a generic container that's used all over the
place, I have it wrapped so that allocations are tagged to the proper
callsite. Been doing that with various random containers, makes it dead
easy to chase down leaks and I don't have to ask users to compile custom
kernels.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ