Re: [PATCH v2 1/7] arm64: mte: Fix/clarify the PG_mte_tagged semantics

kernel test robot
2022-07-23T01:54:10Z

Hi Peter,

I love your patch! Yet something to improve:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on next-20220722]
[cannot apply to kvmarm/next arm/for-next soc/for-next xilinx-xlnx/master linus/master v5.19-rc7]
[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/Peter-Collingbourne/KVM-arm64-permit-MAP_SHARED-mappings-with-MTE-enabled/20220722-095300
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-s032-20220721 (https://download.01.org/0day-ci/archive/20220723/202207230959.jvdok5UK-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/3323e416892d6b5326503b9afc2ee835162b819b
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Peter-Collingbourne/KVM-arm64-permit-MAP_SHARED-mappings-with-MTE-enabled/20220722-095300
git checkout 3323e416892d6b5326503b9afc2ee835162b819b
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 prepare

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

In file included from arch/arm64/include/asm/pgtable.h:12,
from include/linux/pgtable.h:6,
from include/linux/kasan.h:33,
from include/linux/slab.h:140,
from include/linux/resource_ext.h:11,
from include/linux/acpi.h:14,
from include/acpi/apei.h:9,
from include/acpi/ghes.h:5,
from include/linux/arm_sdei.h:8,
from arch/arm64/kernel/asm-offsets.c:10:
>> arch/arm64/include/asm/mte.h:80:15: error: return type defaults to 'int' [-Werror=implicit-int]
80 | static inline set_page_mte_tagged(struct page *page)
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.

vim +/int +80 arch/arm64/include/asm/mte.h

79
> 80 static inline set_page_mte_tagged(struct page *page)
81 {
82 }
83 static inline bool page_mte_tagged(struct page *page)
84 {
85 return false;
86 }
87 static inline void mte_zero_clear_page_tags(void *addr)
88 {
89 }
90 static inline void mte_sync_tags(pte_t old_pte, pte_t pte)
91 {
92 }
93 static inline void mte_copy_page_tags(void *kto, const void *kfrom)
94 {
95 }
96 static inline void mte_thread_init_user(void)
97 {
98 }
99 static inline void mte_thread_switch(struct task_struct *next)
100 {
101 }
102 static inline void mte_suspend_enter(void)
103 {
104 }
105 static inline long set_mte_ctrl(struct task_struct *task, unsigned long arg)
106 {
107 return 0;
108 }
109 static inline long get_mte_ctrl(struct task_struct *task)
110 {
111 return 0;
112 }
113 static inline int mte_ptrace_copy_tags(struct task_struct *child,
114 long request, unsigned long addr,
115 unsigned long data)
116 {
117 return -EIO;
118 }
119

--
0-DAY CI Kernel Test Service