[PATCH v5 24/25] ptrace: add PTRACE_GET_SYSCALL_INFO request

kbuild test robot lkp at intel.com
Wed Dec 12 09:28:25 UTC 2018


Hi Elvira,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.20-rc6]
[cannot apply to next-20181211]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Dmitry-V-Levin/ptrace-add-PTRACE_GET_SYSCALL_INFO-request/20181210-174745
config: nds32-allmodconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 6.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=6.4.0 make.cross ARCH=nds32 

All errors (new ones prefixed by >>):

   kernel/ptrace.c: In function 'ptrace_get_syscall_info':
>> kernel/ptrace.c:942:20: error: implicit declaration of function 'frame_pointer' [-Werror=implicit-function-declaration]
      .frame_pointer = frame_pointer(regs)
                       ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/frame_pointer +942 kernel/ptrace.c

   931	
   932	static int
   933	ptrace_get_syscall_info(struct task_struct *child, unsigned long user_size,
   934				void __user *datavp)
   935	{
   936		struct pt_regs *regs = task_pt_regs(child);
   937		struct ptrace_syscall_info info = {
   938			.op = PTRACE_SYSCALL_INFO_NONE,
   939			.arch = syscall_get_arch(child),
   940			.instruction_pointer = instruction_pointer(regs),
   941			.stack_pointer = user_stack_pointer(regs),
 > 942			.frame_pointer = frame_pointer(regs)
   943		};
   944		unsigned long actual_size = offsetof(struct ptrace_syscall_info, entry);
   945		unsigned long write_size;
   946	
   947		/*
   948		 * This does not need lock_task_sighand() to access
   949		 * child->last_siginfo because ptrace_freeze_traced()
   950		 * called earlier by ptrace_check_attach() ensures that
   951		 * the tracee cannot go away and clear its last_siginfo.
   952		 */
   953		switch (child->last_siginfo ? child->last_siginfo->si_code : 0) {
   954		case SIGTRAP | 0x80:
   955			switch (child->ptrace_message) {
   956			case PTRACE_EVENTMSG_SYSCALL_ENTRY:
   957				actual_size = ptrace_get_syscall_info_entry(child, regs,
   958									    &info);
   959				break;
   960			case PTRACE_EVENTMSG_SYSCALL_EXIT:
   961				actual_size = ptrace_get_syscall_info_exit(child, regs,
   962									   &info);
   963				break;
   964			}
   965			break;
   966		case SIGTRAP | (PTRACE_EVENT_SECCOMP << 8):
   967			actual_size = ptrace_get_syscall_info_seccomp(child, regs,
   968								      &info);
   969			break;
   970		}
   971	
   972		write_size = min(actual_size, user_size);
   973		return copy_to_user(datavp, &info, write_size) ? -EFAULT : actual_size;
   974	}
   975	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 48501 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20181212/dc2cc615/attachment.bin>


More information about the Strace-devel mailing list