tree:
https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
work.copy_regset_to_user
head: 2008e606213bbc8a3beb071ce8669b55457f2bed
commit: 12946caf9e4b122cfb51bad5bf0c8dfcc716b82f [1/2] arm64: take fetching compat reg out
of pt_regs into a new helper
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 12946caf9e4b122cfb51bad5bf0c8dfcc716b82f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
arch/arm64/kernel/ptrace.c: In function 'compat_get_user_reg':
> arch/arm64/kernel/ptrace.c:1243:2: error: unknown type name
'pt_regs'; use 'struct' keyword to refer to the type
1243 | pt_regs
*regs = task_pt_regs(target);
| ^~~~~~~
| struct
In file included from include/linux/rcupdate.h:30,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/audit.h:12,
from arch/arm64/kernel/ptrace.c:11:
> arch/arm64/kernel/ptrace.c:1243:31: error: 'target'
undeclared (first use in this function)
1243 | pt_regs *regs =
task_pt_regs(target);
| ^~~~~~
arch/arm64/include/asm/processor.h:267:52: note: in definition of macro
'task_pt_regs'
267 | ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
| ^
arch/arm64/kernel/ptrace.c:1243:31: note: each undeclared identifier is reported only once
for each function it appears in
1243 | pt_regs *regs = task_pt_regs(target);
| ^~~~~~
arch/arm64/include/asm/processor.h:267:52: note: in definition of macro
'task_pt_regs'
267 | ((struct pt_regs *)(THREAD_SIZE + task_stack_page(p)) - 1)
| ^
> arch/arm64/kernel/ptrace.c:1247:14: error: request for member
'pc' in something not a structure or union
1247 | return regs->pc;
| ^~
> arch/arm64/kernel/ptrace.c:1249:35: error: request for member
'pstate' in something not a structure or union
1249 | return
pstate_to_compat_psr(regs->pstate);
| ^~
> arch/arm64/kernel/ptrace.c:1251:14: error: request for member
'orig_x0' in something not a structure or union
1251 | return
regs->orig_x0;
| ^~
> arch/arm64/kernel/ptrace.c:1253:14: error: request for member
'regs' in something not a structure or union
1253 | return
regs->regs[idx];
| ^~
> arch/arm64/kernel/ptrace.c:1255:1: warning: control reaches end
of non-void function [-Wreturn-type]
1255 | }
| ^
vim +1243 arch/arm64/kernel/ptrace.c
1240
1241 static inline compat_ulong_t compat_get_user_reg(struct task_struct *task, int
idx)
1242 {
1243 pt_regs *regs = task_pt_regs(target);
1244
1245 switch (idx) {
1246 case 15:
1247 return regs->pc;
1248 case 16:
1249 return pstate_to_compat_psr(regs->pstate);
1250 case 17:
1251 return regs->orig_x0;
1252 default:
1253 return regs->regs[idx];
1254 }
1255 }
1256
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org