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]
Date:   Thu, 23 Nov 2023 00:24:49 +0000
From:   Michael Kelley <mhklinux@...look.com>
To:     Christoph Hellwig <hch@...radead.org>
CC:     "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        "kys@...rosoft.com" <kys@...rosoft.com>,
        "haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        "decui@...rosoft.com" <decui@...rosoft.com>,
        "luto@...nel.org" <luto@...nel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "urezki@...il.com" <urezki@...il.com>,
        "lstoakes@...il.com" <lstoakes@...il.com>,
        "thomas.lendacky@....com" <thomas.lendacky@....com>,
        "ardb@...nel.org" <ardb@...nel.org>,
        "jroedel@...e.de" <jroedel@...e.de>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "rick.p.edgecombe@...el.com" <rick.p.edgecombe@...el.com>,
        "sathyanarayanan.kuppuswamy@...ux.intel.com" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: RE: [PATCH v2 3/8] x86/mm: Remove "static" from vmap_pages_range()

From: Christoph Hellwig <hch@...radead.org> Sent: Tuesday, November 21, 2023 10:26 PM
> 
> On Tue, Nov 21, 2023 at 01:20:11PM -0800, mhkelley58@...il.com wrote:
> > From: Michael Kelley <mhklinux@...look.com>
> >
> > The mm subsystem currently provides no mechanism to map memory pages
> > to a specified virtual address range.  A virtual address range can be
> > allocated using get_vm_area(), but the only function available for
> > mapping memory pages to a caller-specified address in that range is
> > ioremap_page_range(), which is inappropriate for system memory.
> >
> > Fix this by allowing vmap_pages_range() to be used by callers outside
> > of vmalloc.c.
> 
> I really do not want to expose vmap_pages_range.  Please try to come up
> with a good way to encapsulate your map at a certain address primitive
> and implement it in vmalloc.c.

To clarify, is your concern narrowly about vmap_pages_range()
specifically?  Or is your concern more generally about having two separate
steps as applied to system memory:  1) allocate the virtual address
space and 2) do the mapping?  The two separate steps are already
available for MMIO space.  Doing the equivalent for system memory
should be straightforward.

Conversely, combining the two steps into a single new vmap() variant
would be a little messy, but can probably be made to work.  This
combined approach will be less efficient since my use case does a single
allocation of virtual address space and repeatedly maps/unmaps the
same page in that space.  I would need to take some measurements
to see if the inefficiency actually matters.

Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ