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: <98f3fb04ebfcf52ffb60867cf024838d94b83907.camel@intel.com>
Date: Tue, 7 May 2024 13:51:13 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "hch@...radead.org" <hch@...radead.org>
CC: "x86@...nel.org" <x86@...nel.org>, "keescook@...omium.org"
	<keescook@...omium.org>, "linux-sgx@...r.kernel.org"
	<linux-sgx@...r.kernel.org>, "luto@...nel.org" <luto@...nel.org>,
	"linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
	"debug@...osinc.com" <debug@...osinc.com>, "io-uring@...r.kernel.org"
	<io-uring@...r.kernel.org>, "akpm@...ux-foundation.org"
	<akpm@...ux-foundation.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Liam.Howlett@...cle.com"
	<Liam.Howlett@...cle.com>, "mingo@...hat.com" <mingo@...hat.com>,
	"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
	"christophe.leroy@...roup.eu" <christophe.leroy@...roup.eu>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>, "linux-s390@...r.kernel.org"
	<linux-s390@...r.kernel.org>, "tglx@...utronix.de" <tglx@...utronix.de>,
	"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>, "hpa@...or.com"
	<hpa@...or.com>, "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
	"peterz@...radead.org" <peterz@...radead.org>, "nvdimm@...ts.linux.dev"
	<nvdimm@...ts.linux.dev>, "linux-fsdevel@...r.kernel.org"
	<linux-fsdevel@...r.kernel.org>, "bp@...en8.de" <bp@...en8.de>, "Williams,
 Dan J" <dan.j.williams@...el.com>, "broonie@...nel.org" <broonie@...nel.org>
Subject: Re: [PATCH] mm: Remove mm argument from mm_get_unmapped_area()

On Mon, 2024-05-06 at 09:18 -0700, Christoph Hellwig wrote:
> > On Mon, May 06, 2024 at 09:07:47AM -0700, Rick Edgecombe wrote:
> > > >         if (flags & MAP_FIXED) {
> > > >                 /* Ok, don't mess with it. */
> > > > -               return mm_get_unmapped_area(current->mm, NULL,
> > > > orig_addr, > > len, pgoff, flags);
> > > > +               return current_get_unmapped_area(NULL, orig_addr, len, >
> > > > > pgoff, flags);
> > 
> > The old name seems preferable because it's not as crazy long.  In fact
> > just get_unmapped_area would be even better, but that's already taken
> > by something else.

Ok.

> > 
> > Can we maybe take a step back and sort out the mess of the various
> > _get_unmapped_area helpers?
> > 
> > e.g. mm_get_unmapped_area_vmflags just wraps
> > arch_get_unmapped_area_topdown_vmflags and
> > arch_get_unmapped_area_vmflags, and we might as well merge all three
> > by moving the MMF_TOPDOWN into two actual implementations?
> > 
> > And then just update all the implementations to always pass the
> > vm_flags instead of having separate implementations with our without
> > the flags.
> > 
> > And then make __get_unmapped_area static in mmap.c nad move the
> > get_unmapped_area wrappers there.  And eventually write some
> > documentation for the functions based on the learnings who actually
> > uses what..

The rest of the series[0] is in the mm-tree/linux-next currently. Are you
suggesting we not do this patch, and leave the rest you describe here for the
future? I think the removal of the indirect branch is at least a positive step
forward.


[0]
https://lore.kernel.org/lkml/20240326021656.202649-1-rick.p.edgecombe@intel.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ