[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90a64b6f040491da16af0694172a6cbdaba33669.camel@intel.com>
Date: Fri, 16 Jun 2023 16:55:53 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rppt@...nel.org" <rppt@...nel.org>
CC: "tglx@...utronix.de" <tglx@...utronix.de>,
"mcgrof@...nel.org" <mcgrof@...nel.org>,
"deller@....de" <deller@....de>,
"davem@...emloft.net" <davem@...emloft.net>,
"nadav.amit@...il.com" <nadav.amit@...il.com>,
"linux@...linux.org.uk" <linux@...linux.org.uk>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"hca@...ux.ibm.com" <hca@...ux.ibm.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"kent.overstreet@...ux.dev" <kent.overstreet@...ux.dev>,
"puranjay12@...il.com" <puranjay12@...il.com>,
"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>,
"palmer@...belt.com" <palmer@...belt.com>,
"chenhuacai@...nel.org" <chenhuacai@...nel.org>,
"tsbogend@...ha.franken.de" <tsbogend@...ha.franken.de>,
"linux-trace-kernel@...r.kernel.org"
<linux-trace-kernel@...r.kernel.org>,
"linux-parisc@...r.kernel.org" <linux-parisc@...r.kernel.org>,
"christophe.leroy@...roup.eu" <christophe.leroy@...roup.eu>,
"x86@...nel.org" <x86@...nel.org>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"mark.rutland@....com" <mark.rutland@....com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"will@...nel.org" <will@...nel.org>,
"dinguyen@...nel.org" <dinguyen@...nel.org>,
"naveen.n.rao@...ux.ibm.com" <naveen.n.rao@...ux.ibm.com>,
"sparclinux@...r.kernel.org" <sparclinux@...r.kernel.org>,
"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"song@...nel.org" <song@...nel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"loongarch@...ts.linux.dev" <loongarch@...ts.linux.dev>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 06/12] mm/execmem: introduce execmem_data_alloc()
On Fri, 2023-06-16 at 11:50 +0300, Mike Rapoport wrote:
> From: "Mike Rapoport (IBM)" <rppt@...nel.org>
>
> Data related to code allocations, such as module data section, need
> to
> comply with architecture constraints for its placement and its
> allocation right now was done using execmem_text_alloc().
>
> Create a dedicated API for allocating data related to code
> allocations
> and allow architectures to define address ranges for data
> allocations.
Right now the cross-arch way to specify kernel memory permissions is
encoded in the function names of all the set_memory_foo()'s. You can't
just have unified prot names because some arch's have NX and some have
X bits, etc. CPA wouldn't know if it needs to set or unset a bit if you
pass in a PROT.
But then you end up with a new function for *each* combination (i.e.
set_memory_rox()). I wish CPA has flags like mmap() does, and I wonder
if it makes sense here instead of execmem_data_alloc().
Maybe that is an overhaul for another day though...
Powered by blists - more mailing lists