[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250607143128.d3ae86e8ebf9dcab02870421@linux-foundation.org>
Date: Sat, 7 Jun 2025 14:31:28 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: wangfushuai <wangfushuai@...du.com>
Cc: <david@...hat.com>, <andrii@...nel.org>, <osalvador@...e.de>,
<Liam.Howlett@...cle.com>, <christophe.leroy@...roup.eu>,
<linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>, Mark Brown
<broonie@...nel.org>, Catalin Marinas <catalin.marinas@....com>
Subject: Re: [PATCH v2] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when
support GCS
On Sat, 7 Jun 2025 21:15:25 +0800 wangfushuai <wangfushuai@...du.com> wrote:
> The recent commit adding VM_SHADOW_STACK for arm64 GCS did not update
> the /proc/[pid]/smaps display logic to show the "ss" flag for GCS pages.
> This patch adds the necessary condition to display "ss" flag.
>
> ...
>
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -994,6 +994,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
> #ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK
> [ilog2(VM_SHADOW_STACK)] = "ss",
> #endif
> +#if defined(CONFIG_ARM64_GCS)
> + [ilog2(VM_SHADOW_STACK)] = "ss",
> +#endif
> #if defined(CONFIG_64BIT) || defined(CONFIG_PPC32)
> [ilog2(VM_DROPPABLE)] = "dp",
> #endif
It is possible to have CONFIG_ARM64_GCS=y when
CONFIG_ARCH_HAS_USER_SHADOW_STACK=n? If so, is this a correct
combination?
Also, wouldn't it be nicer to code this as
--- a/fs/proc/task_mmu.c~a
+++ a/fs/proc/task_mmu.c
@@ -991,7 +991,7 @@ static void show_smap_vma_flags(struct s
#ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR
[ilog2(VM_UFFD_MINOR)] = "ui",
#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
-#ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK
+#if defined(CONFIG_ARCH_HAS_USER_SHADOW_STACK) || defined(CONFIG_ARM64_GCS)
[ilog2(VM_SHADOW_STACK)] = "ss",
#endif
#if defined(CONFIG_64BIT) || defined(CONFIG_PPC32)
_
Powered by blists - more mailing lists