mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Andy Lutomirski <luto@kernel.org>
Subject: [tip:core/entry 5/14] kernel/entry/syscall_user_dispatch.c:32:6: warning: no previous prototype for function 'syscall_user_dispatch'
Date: Wed, 2 Dec 2020 20:33:50 +0800	[thread overview]
Message-ID: <202012022046.wOtYXDJG-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry
head:   1568b5540b3e6ff3fe43a2cf889cb777cf8149fc
commit: 7a2cc679e8bb5bfdeef28ec80dc3c34edbc099fd [5/14] kernel: Implement selective syscall userspace redirection
config: x86_64-randconfig-a004-20201201 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2671fccf0381769276ca8246ec0499adcb9b0355)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=7a2cc679e8bb5bfdeef28ec80dc3c34edbc099fd
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip core/entry
        git checkout 7a2cc679e8bb5bfdeef28ec80dc3c34edbc099fd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> kernel/entry/syscall_user_dispatch.c:32:6: warning: no previous prototype for function 'syscall_user_dispatch' [-Wmissing-prototypes]
   bool syscall_user_dispatch(struct pt_regs *regs)
        ^
   kernel/entry/syscall_user_dispatch.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   bool syscall_user_dispatch(struct pt_regs *regs)
   ^
   static 
   1 warning generated.

vim +/syscall_user_dispatch +32 kernel/entry/syscall_user_dispatch.c

    31	
  > 32	bool syscall_user_dispatch(struct pt_regs *regs)
    33	{
    34		struct syscall_user_dispatch *sd = &current->syscall_dispatch;
    35		char state;
    36	
    37		if (likely(instruction_pointer(regs) - sd->offset < sd->len))
    38			return false;
    39	
    40		if (unlikely(arch_syscall_is_vdso_sigreturn(regs)))
    41			return false;
    42	
    43		if (likely(sd->selector)) {
    44			/*
    45			 * access_ok() is performed once, at prctl time, when
    46			 * the selector is loaded by userspace.
    47			 */
    48			if (unlikely(__get_user(state, sd->selector)))
    49				do_exit(SIGSEGV);
    50	
    51			if (likely(state == PR_SYS_DISPATCH_OFF))
    52				return false;
    53	
    54			if (state != PR_SYS_DISPATCH_ON)
    55				do_exit(SIGSYS);
    56		}
    57	
    58		sd->on_dispatch = true;
    59		syscall_rollback(current, regs);
    60		trigger_sigsys(regs);
    61	
    62		return true;
    63	}
    64	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

                 reply	other threads:[~2020-12-02 12:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202012022046.wOtYXDJG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=krisman@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®