From: Christoph Hellwig <hch@infradead.org>
To: Maxwell Bland <mbland@motorola.com>
Cc: linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org,
agordeev@linux.ibm.com, akpm@linux-foundation.org,
andreyknvl@gmail.com, andrii@kernel.org, aneesh.kumar@kernel.org,
aou@eecs.berkeley.edu, ardb@kernel.org, arnd@arndb.de,
ast@kernel.org, borntraeger@linux.ibm.com, bpf@vger.kernel.org,
brauner@kernel.org, catalin.marinas@arm.com,
christophe.leroy@csgroup.eu, cl@linux.com, daniel@iogearbox.net,
dave.hansen@linux.intel.com, david@redhat.com, dennis@kernel.org,
dvyukov@google.com, glider@google.com, gor@linux.ibm.com,
guoren@kernel.org, haoluo@google.com, hca@linux.ibm.com,
hch@infradead.org, john.fastabend@gmail.com, jolsa@kernel.org,
kasan-dev@googlegroups.com, kpsingh@kernel.org,
linux-arch@vger.kernel.org, linux@armlinux.org.uk,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
lstoakes@gmail.com, mark.rutland@arm.com, martin.lau@linux.dev,
meted@linux.ibm.com, michael.christie@oracle.com,
mjguzik@gmail.com, mpe@ellerman.id.au, mst@redhat.com,
muchun.song@linux.dev, naveen.n.rao@linux.ibm.com,
npiggin@gmail.com, palmer@dabbelt.com, paul.walmsley@sifive.com,
quic_nprakash@quicinc.com, quic_pkondeti@quicinc.com,
rick.p.edgecombe@intel.com, ryabinin.a.a@gmail.com,
ryan.roberts@arm.com, samitolvanen@google.com, sdf@google.com,
song@kernel.org, surenb@google.com, svens@linux.ibm.com,
tj@kernel.org, urezki@gmail.com, vincenzo.frascino@arm.com,
will@kernel.org, wuqiang.matt@bytedance.com,
yonghong.song@linux.dev, zlim.lnx@gmail.com,
awheeler@motorola.com
Subject: Re: [PATCH 1/4] mm/vmalloc: allow arch-specific vmalloc_node overrides
Date: Tue, 20 Feb 2024 21:43:06 -0800 [thread overview]
Message-ID: <ZdWNalbmABYDuFHE@infradead.org> (raw)
In-Reply-To: <20240220203256.31153-2-mbland@motorola.com>
On Tue, Feb 20, 2024 at 02:32:53PM -0600, Maxwell Bland wrote:
> Present non-uniform use of __vmalloc_node and __vmalloc_node_range makes
> enforcing appropriate code and data seperation untenable on certain
> microarchitectures, as VMALLOC_START and VMALLOC_END are monolithic
> while the use of the vmalloc interface is non-monolithic: in particular,
> appropriate randomness in ASLR makes it such that code regions must fall
> in some region between VMALLOC_START and VMALLOC_end, but this
> necessitates that code pages are intermingled with data pages, meaning
> code-specific protections, such as arm64's PXNTable, cannot be
> performantly runtime enforced.
That's not actually true. We have MODULE_START/END to separate them,
which is used by mips only for now.
>
> The solution to this problem allows architectures to override the
> vmalloc wrapper functions by enforcing that the rest of the kernel does
> not reimplement __vmalloc_node by using __vmalloc_node_range with the
> same parameters as __vmalloc_node or provides a __weak tag to those
> functions using __vmalloc_node_range with parameters repeating those of
> __vmalloc_node.
I'm really not too happy about overriding the functions. Especially
as the separation is a generally good idea and it would be good to
move everyone (or at least all modern architectures) over to a scheme
like this.
next prev parent reply other threads:[~2024-02-21 5:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 20:32 [PATCH 0/4] arm64: mm: support dynamic vmalloc/pmd configuration Maxwell Bland
2024-02-20 20:32 ` [PATCH 1/4] mm/vmalloc: allow arch-specific vmalloc_node overrides Maxwell Bland
2024-02-21 5:43 ` Christoph Hellwig [this message]
2024-02-21 7:38 ` Christophe Leroy
2024-02-21 6:59 ` Christophe Leroy
2024-02-20 20:32 ` [PATCH 2/4] mm: pgalloc: support address-conditional pmd allocation Maxwell Bland
2024-02-21 7:13 ` Christophe Leroy
2024-02-21 9:27 ` David Hildenbrand
2024-02-21 15:54 ` [External] " Maxwell Bland
2024-02-20 20:32 ` [PATCH 3/4] arm64: separate code and data virtual memory allocation Maxwell Bland
2024-02-21 7:20 ` Christophe Leroy
2024-02-20 20:32 ` [PATCH 4/4] arm64: dynamic enforcement of pmd-level PXNTable Maxwell Bland
2024-02-21 7:32 ` [PATCH 0/4] arm64: mm: support dynamic vmalloc/pmd configuration Christophe Leroy
2024-02-21 17:57 ` Maxwell Bland
2024-02-21 14:50 ` Conor Dooley
2024-02-21 15:42 ` [External] " Maxwell Bland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZdWNalbmABYDuFHE@infradead.org \
--to=hch@infradead.org \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=andrii@kernel.org \
--cc=aneesh.kumar@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=awheeler@motorola.com \
--cc=borntraeger@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=cl@linux.com \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=dennis@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=gor@linux.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=guoren@kernel.org \
--cc=haoluo@google.com \
--cc=hca@linux.ibm.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kasan-dev@googlegroups.com \
--cc=kpsingh@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lstoakes@gmail.com \
--cc=mark.rutland@arm.com \
--cc=martin.lau@linux.dev \
--cc=mbland@motorola.com \
--cc=meted@linux.ibm.com \
--cc=michael.christie@oracle.com \
--cc=mjguzik@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=mst@redhat.com \
--cc=muchun.song@linux.dev \
--cc=naveen.n.rao@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=quic_nprakash@quicinc.com \
--cc=quic_pkondeti@quicinc.com \
--cc=rick.p.edgecombe@intel.com \
--cc=ryabinin.a.a@gmail.com \
--cc=ryan.roberts@arm.com \
--cc=samitolvanen@google.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=surenb@google.com \
--cc=svens@linux.ibm.com \
--cc=tj@kernel.org \
--cc=urezki@gmail.com \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
--cc=wuqiang.matt@bytedance.com \
--cc=yonghong.song@linux.dev \
--cc=zlim.lnx@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox