lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250608073517.98789-1-wangfushuai@baidu.com>
Date: Sun, 8 Jun 2025 15:35:17 +0800
From: wangfushuai <wangfushuai@...du.com>
To: <akpm@...ux-foundation.org>
CC: <Liam.Howlett@...cle.com>, <andrii@...nel.org>, <broonie@...nel.org>,
	<catalin.marinas@....com>, <christophe.leroy@...roup.eu>, <david@...hat.com>,
	<linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<osalvador@...e.de>, <wangfushuai@...du.com>
Subject: Re: [PATCH v2] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when support GCS

>> 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?
Hi, Morton
After revisiting the code logic, I realized that if CONFIG_ARM64_GCS is enabled,
CONFIG_ARCH_HAS_USER_SHADOW_STACK will always be enabled as well. Therefore,
it seems unnecessary to add separate VM_SHADOW_STACK support specifically for
CONFIG_ARM64_GCS at this stage.

I will make sure to review future patches more carefully to avoid such oversights.

Regards,
Wang
> 
> 
> 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ