llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when support GCS
       [not found] <20250607060741.69902-1-wangfushuai@baidu.com>
@ 2025-06-07 10:29 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-07 10:29 UTC (permalink / raw)
  To: wangfushuai, akpm, david, andrii, osalvador, Liam.Howlett,
	christophe.leroy
  Cc: llvm, oe-kbuild-all, linux-kernel, linux-fsdevel, wangfushuai

Hi wangfushuai,

kernel test robot noticed the following build warnings:

[auto build test WARNING on brauner-vfs/vfs.all]
[also build test WARNING on akpm-mm/mm-everything linus/master v6.15 next-20250606]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/wangfushuai/fs-proc-task_mmu-add-VM_SHADOW_STACK-for-arm64-when-support-GCS/20250607-141047
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link:    https://lore.kernel.org/r/20250607060741.69902-1-wangfushuai%40baidu.com
patch subject: [PATCH] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when support GCS
config: x86_64-buildonly-randconfig-001-20250607 (https://download.01.org/0day-ci/archive/20250607/202506071806.mshFK42h-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
rustc: rustc 1.78.0 (9b00956e5 2024-04-29)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250607/202506071806.mshFK42h-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506071806.mshFK42h-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/proc/task_mmu.c:994:42: warning: extra tokens at end of #ifdef directive [-Wextra-tokens]
     994 | #ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK || defined(CONFIG_ARM64_GCS)
         |                                          ^
         |                                          //
   1 warning generated.


vim +994 fs/proc/task_mmu.c

   920	
   921	static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
   922	{
   923		/*
   924		 * Don't forget to update Documentation/ on changes.
   925		 *
   926		 * The length of the second argument of mnemonics[]
   927		 * needs to be 3 instead of previously set 2
   928		 * (i.e. from [BITS_PER_LONG][2] to [BITS_PER_LONG][3])
   929		 * to avoid spurious
   930		 * -Werror=unterminated-string-initialization warning
   931		 *  with GCC 15
   932		 */
   933		static const char mnemonics[BITS_PER_LONG][3] = {
   934			/*
   935			 * In case if we meet a flag we don't know about.
   936			 */
   937			[0 ... (BITS_PER_LONG-1)] = "??",
   938	
   939			[ilog2(VM_READ)]	= "rd",
   940			[ilog2(VM_WRITE)]	= "wr",
   941			[ilog2(VM_EXEC)]	= "ex",
   942			[ilog2(VM_SHARED)]	= "sh",
   943			[ilog2(VM_MAYREAD)]	= "mr",
   944			[ilog2(VM_MAYWRITE)]	= "mw",
   945			[ilog2(VM_MAYEXEC)]	= "me",
   946			[ilog2(VM_MAYSHARE)]	= "ms",
   947			[ilog2(VM_GROWSDOWN)]	= "gd",
   948			[ilog2(VM_PFNMAP)]	= "pf",
   949			[ilog2(VM_LOCKED)]	= "lo",
   950			[ilog2(VM_IO)]		= "io",
   951			[ilog2(VM_SEQ_READ)]	= "sr",
   952			[ilog2(VM_RAND_READ)]	= "rr",
   953			[ilog2(VM_DONTCOPY)]	= "dc",
   954			[ilog2(VM_DONTEXPAND)]	= "de",
   955			[ilog2(VM_LOCKONFAULT)]	= "lf",
   956			[ilog2(VM_ACCOUNT)]	= "ac",
   957			[ilog2(VM_NORESERVE)]	= "nr",
   958			[ilog2(VM_HUGETLB)]	= "ht",
   959			[ilog2(VM_SYNC)]	= "sf",
   960			[ilog2(VM_ARCH_1)]	= "ar",
   961			[ilog2(VM_WIPEONFORK)]	= "wf",
   962			[ilog2(VM_DONTDUMP)]	= "dd",
   963	#ifdef CONFIG_ARM64_BTI
   964			[ilog2(VM_ARM64_BTI)]	= "bt",
   965	#endif
   966	#ifdef CONFIG_MEM_SOFT_DIRTY
   967			[ilog2(VM_SOFTDIRTY)]	= "sd",
   968	#endif
   969			[ilog2(VM_MIXEDMAP)]	= "mm",
   970			[ilog2(VM_HUGEPAGE)]	= "hg",
   971			[ilog2(VM_NOHUGEPAGE)]	= "nh",
   972			[ilog2(VM_MERGEABLE)]	= "mg",
   973			[ilog2(VM_UFFD_MISSING)]= "um",
   974			[ilog2(VM_UFFD_WP)]	= "uw",
   975	#ifdef CONFIG_ARM64_MTE
   976			[ilog2(VM_MTE)]		= "mt",
   977			[ilog2(VM_MTE_ALLOWED)]	= "",
   978	#endif
   979	#ifdef CONFIG_ARCH_HAS_PKEYS
   980			/* These come out via ProtectionKey: */
   981			[ilog2(VM_PKEY_BIT0)]	= "",
   982			[ilog2(VM_PKEY_BIT1)]	= "",
   983			[ilog2(VM_PKEY_BIT2)]	= "",
   984	#if VM_PKEY_BIT3
   985			[ilog2(VM_PKEY_BIT3)]	= "",
   986	#endif
   987	#if VM_PKEY_BIT4
   988			[ilog2(VM_PKEY_BIT4)]	= "",
   989	#endif
   990	#endif /* CONFIG_ARCH_HAS_PKEYS */
   991	#ifdef CONFIG_HAVE_ARCH_USERFAULTFD_MINOR
   992			[ilog2(VM_UFFD_MINOR)]	= "ui",
   993	#endif /* CONFIG_HAVE_ARCH_USERFAULTFD_MINOR */
 > 994	#ifdef CONFIG_ARCH_HAS_USER_SHADOW_STACK || defined(CONFIG_ARM64_GCS)
   995			[ilog2(VM_SHADOW_STACK)] = "ss",
   996	#endif
   997	#if defined(CONFIG_64BIT) || defined(CONFIG_PPC32)
   998			[ilog2(VM_DROPPABLE)] = "dp",
   999	#endif
  1000	#ifdef CONFIG_64BIT
  1001			[ilog2(VM_SEALED)] = "sl",
  1002	#endif
  1003		};
  1004		size_t i;
  1005	
  1006		seq_puts(m, "VmFlags: ");
  1007		for (i = 0; i < BITS_PER_LONG; i++) {
  1008			if (!mnemonics[i][0])
  1009				continue;
  1010			if (vma->vm_flags & (1UL << i))
  1011				seq_printf(m, "%s ", mnemonics[i]);
  1012		}
  1013		seq_putc(m, '\n');
  1014	}
  1015	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-06-07 10:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250607060741.69902-1-wangfushuai@baidu.com>
2025-06-07 10:29 ` [PATCH] fs/proc/task_mmu: add VM_SHADOW_STACK for arm64 when support GCS kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).