[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X8rFLHGSqJ7JCZ/N@google.com>
Date: Fri, 4 Dec 2020 15:24:28 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: akpm@...ux-foundation.org, jeyu@...nel.org, bpf@...r.kernel.org,
ast@...nel.org, daniel@...earbox.net, luto@...nel.org,
dave.hansen@...ux.intel.com, peterz@...radead.org, x86@...nel.org,
rppt@...nel.org, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
dan.j.williams@...el.com, elena.reshetova@...el.com,
ira.weiny@...el.com
Subject: Re: [PATCH RFC 01/10] vmalloc: Add basic perm alloc implementation
On Fri, Nov 20, 2020, Rick Edgecombe wrote:
> +struct perm_allocation {
> + struct page **pages;
> + virtual_perm cur_perm;
> + virtual_perm orig_perm;
> + struct vm_struct *area;
> + unsigned long offset;
> + unsigned long size;
> + void *writable;
> +};
> +
> +/*
> + * Allocate a special permission kva region. The region may not be mapped
> + * until a call to perm_writable_finish(). A writable region will be mapped
> + * immediately at the address returned by perm_writable_addr(). The allocation
> + * will be made between the start and end virtual addresses.
> + */
> +struct perm_allocation *perm_alloc(unsigned long vstart, unsigned long vend, unsigned long page_cnt,
> + virtual_perm perms);
IMO, 'perm' as the root namespace is too generic, and perm_ is already very
prevelant throughout the kernel. E.g. it's not obvious when looking at the
callers that perm_alloc() is the first step in setting up an alternate kernel
VA->PA mapping.
I don't have a suggestion for a more intuitive name, but in the absence of a
perfect name, I'd vote for an acronym that is easy to grep. Something like
pvmap? That isn't currently used in the kernel, though I can't help but read it
as "paravirt map"...
Powered by blists - more mailing lists