LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Elvira Khabirova <lineprinter@altlinux.org>
Cc: linux-kernel@vger.kernel.org, oleg@redhat.com, paulus@samba.org,
	kbuild-all@01.org, luto@kernel.org, leitao@debian.org,
	ldv@altlinux.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call
Date: Sat, 10 Nov 2018 20:06:01 +0800	[thread overview]
Message-ID: <201811102033.Xn9pGEOL%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181110042040.68ed3ac8@akathisia>

[-- Attachment #1: Type: text/plain, Size: 3528 bytes --]

Hi Elvira,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on v4.20-rc1 next-20181109]
[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/Elvira-Khabirova/powerpc-ptrace-replace-ptrace_report_syscall-with-a-tracehook-call/20181110-192337
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.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=7.2.0 make.cross ARCH=powerpc 

All warnings (new ones prefixed by >>):

   arch/powerpc/kernel/ptrace.c: In function 'do_syscall_trace_enter':
>> arch/powerpc/kernel/ptrace.c:3269:3: warning: ignoring return value of 'tracehook_report_syscall_entry', declared with attribute warn_unused_result [-Wunused-result]
      tracehook_report_syscall_entry(regs);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/tracehook_report_syscall_entry +3269 arch/powerpc/kernel/ptrace.c

  3244	
  3245	/**
  3246	 * do_syscall_trace_enter() - Do syscall tracing on kernel entry.
  3247	 * @regs: the pt_regs of the task to trace (current)
  3248	 *
  3249	 * Performs various types of tracing on syscall entry. This includes seccomp,
  3250	 * ptrace, syscall tracepoints and audit.
  3251	 *
  3252	 * The pt_regs are potentially visible to userspace via ptrace, so their
  3253	 * contents is ABI.
  3254	 *
  3255	 * One or more of the tracers may modify the contents of pt_regs, in particular
  3256	 * to modify arguments or even the syscall number itself.
  3257	 *
  3258	 * It's also possible that a tracer can choose to reject the system call. In
  3259	 * that case this function will return an illegal syscall number, and will put
  3260	 * an appropriate return value in regs->r3.
  3261	 *
  3262	 * Return: the (possibly changed) syscall number.
  3263	 */
  3264	long do_syscall_trace_enter(struct pt_regs *regs)
  3265	{
  3266		user_exit();
  3267	
  3268		if (test_thread_flag(TIF_SYSCALL_EMU)) {
> 3269			tracehook_report_syscall_entry(regs);
  3270			/*
  3271			 * Returning -1 will skip the syscall execution. We want to
  3272			 * avoid clobbering any register also, thus, not 'gotoing'
  3273			 * skip label.
  3274			 */
  3275			return -1;
  3276		}
  3277	
  3278		/*
  3279		 * The tracer may decide to abort the syscall, if so tracehook
  3280		 * will return !0. Note that the tracer may also just change
  3281		 * regs->gpr[0] to an invalid syscall number, that is handled
  3282		 * below on the exit path.
  3283		 */
  3284		if (test_thread_flag(TIF_SYSCALL_TRACE) &&
  3285		    tracehook_report_syscall_entry(regs))
  3286			goto skip;
  3287	
  3288		/* Run seccomp after ptrace; allow it to set gpr[3]. */
  3289		if (do_seccomp(regs))
  3290			return -1;
  3291	
  3292		/* Avoid trace and audit when syscall is invalid. */
  3293		if (regs->gpr[0] >= NR_syscalls)
  3294			goto skip;
  3295	
  3296		if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
  3297			trace_sys_enter(regs, regs->gpr[0]);
  3298	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59489 bytes --]

  reply	other threads:[~2018-11-10 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-10  3:20 [PATCH] powerpc/ptrace: replace ptrace_report_syscall() with a tracehook call Elvira Khabirova
2018-11-10 12:06 ` kbuild test robot [this message]
2018-11-10 13:49 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201811102033.Xn9pGEOL%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=ldv@altlinux.org \
    --cc=leitao@debian.org \
    --cc=lineprinter@altlinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luto@kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox