[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXfjBd7eCE3ypUnf@debug.ba.rivosinc.com>
Date: Mon, 26 Jan 2026 13:56:21 -0800
From: Deepak Gupta <debug@...osinc.com>
To: Paul Walmsley <pjw@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>, Conor Dooley <conor@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Christian Brauner <brauner@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Oleg Nesterov <oleg@...hat.com>,
Eric Biederman <ebiederm@...ssion.com>, Kees Cook <kees@...nel.org>,
Jonathan Corbet <corbet@....net>, Shuah Khan <shuah@...nel.org>,
Jann Horn <jannh@...gle.com>, Conor Dooley <conor+dt@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Benno Lossin <lossin@...nel.org>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org,
linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kselftest@...r.kernel.org, alistair.francis@....com,
richard.henderson@...aro.org, jim.shu@...ive.com,
andybnac@...il.com, kito.cheng@...ive.com, charlie@...osinc.com,
atishp@...osinc.com, evan@...osinc.com, cleger@...osinc.com,
alexghiti@...osinc.com, samitolvanen@...gle.com, broonie@...nel.org,
rick.p.edgecombe@...el.com, rust-for-linux@...r.kernel.org,
Zong Li <zong.li@...ive.com>, David Hildenbrand <david@...hat.com>,
Andreas Korb <andreas.korb@...ec.fraunhofer.de>,
Valentin Haudiquet <valentin.haudiquet@...onical.com>
Subject: Re: [PATCH v26 01/28] mm: VM_SHADOW_STACK definition for riscv
Hi Paul,
Comment inlne.
On Wed, Jan 14, 2026 at 07:57:19PM -0700, Paul Walmsley wrote:
>On Thu, 11 Dec 2025, Deepak Gupta via B4 Relay wrote:
>
>> From: Deepak Gupta <debug@...osinc.com>
>>
>> VM_HIGH_ARCH_5 is used for riscv
>>
>> Reviewed-by: Zong Li <zong.li@...ive.com>
>> Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>
>> Acked-by: David Hildenbrand <david@...hat.com>
>> Tested-by: Andreas Korb <andreas.korb@...ec.fraunhofer.de>
>> Tested-by: Valentin Haudiquet <valentin.haudiquet@...onical.com>
>> Signed-off-by: Deepak Gupta <debug@...osinc.com>
>
>Here's what I'm planning to queue, after updating it after Lorenzo's mm
>changes. Please let me know if you want to change anything.
Yes looks good to me. Thanks a lot.
>
>
>- Paul
>
>From: Deepak Gupta <debug@...osinc.com>
>Date: Wed, 19 Nov 2025 09:55:05 -0700
>
>mm: add VM_SHADOW_STACK definition for riscv
>
>VM_HIGH_ARCH_5 is used for riscv.
>
>Reviewed-by: Zong Li <zong.li@...ive.com>
>Reviewed-by: Alexandre Ghiti <alexghiti@...osinc.com>
>Acked-by: David Hildenbrand <david@...hat.com>
>Signed-off-by: Deepak Gupta <debug@...osinc.com>
>Tested-by: Andreas Korb <andreas.korb@...ec.fraunhofer.de> # QEMU, custom CVA6
>Tested-by: Valentin Haudiquet <valentin.haudiquet@...onical.com>
>Link: https://patch.msgid.link/20251112-v5_user_cfi_series-v23-1-b55691eacf4f@rivosinc.com
>[pjw@...nel.org: clarify subject; update to apply]
>Signed-off-by: Paul Walmsley <pjw@...nel.org>
>---
> include/linux/mm.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/include/linux/mm.h b/include/linux/mm.h
>index 15076261d0c2..de912272c5f9 100644
>--- a/include/linux/mm.h
>+++ b/include/linux/mm.h
>@@ -359,7 +359,7 @@ enum {
> DECLARE_VMA_BIT_ALIAS(PKEY_BIT2, HIGH_ARCH_2),
> DECLARE_VMA_BIT_ALIAS(PKEY_BIT3, HIGH_ARCH_3),
> DECLARE_VMA_BIT_ALIAS(PKEY_BIT4, HIGH_ARCH_4),
>-#if defined(CONFIG_X86_USER_SHADOW_STACK)
>+#if defined(CONFIG_X86_USER_SHADOW_STACK) || defined(CONFIG_RISCV_USER_CFI)
> /*
> * VM_SHADOW_STACK should not be set with VM_SHARED because of lack of
> * support core mm.
>@@ -460,7 +460,8 @@ enum {
> #define VM_PKEY_BIT4 VM_NONE
> #endif /* CONFIG_ARCH_PKEY_BITS > 4 */
> #endif /* CONFIG_ARCH_HAS_PKEYS */
>-#if defined(CONFIG_X86_USER_SHADOW_STACK) || defined(CONFIG_ARM64_GCS)
>+#if defined(CONFIG_X86_USER_SHADOW_STACK) || defined(CONFIG_ARM64_GCS) || \
>+ defined(CONFIG_RISCV_USER_CFI)
> #define VM_SHADOW_STACK INIT_VM_FLAG(SHADOW_STACK)
> #else
> #define VM_SHADOW_STACK VM_NONE
>--
>2.51.0
>
>
>
>
Powered by blists - more mailing lists