tree:
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/kentry
head: fb951a475a1cd1e5e280ee8b4ce64a6a68c77b64
commit: 5c61d03b2b823992b0e8eba73d2be61947f00323 [6/11] kentry: Simplify the common
syscall API
config: i386-randconfig-r035-20210519 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/kentry
git checkout 5c61d03b2b823992b0e8eba73d2be61947f00323
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/x86/entry/common.c:90:24: warning: no previous prototype for
'do_int80_syscall_32' [-Wmissing-prototypes]
90 | __visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c: In function '__do_fast_syscall_32':
> arch/x86/entry/common.c:116:7: warning: variable 'ret'
set but not used [-Wunused-but-set-variable]
116 | bool ret;
| ^~~
arch/x86/entry/common.c: At top level:
arch/x86/entry/common.c:161:24: warning: no previous prototype for
'do_fast_syscall_32' [-Wmissing-prototypes]
161 | __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:213:24: warning: no previous prototype for
'do_SYSENTER_32' [-Wmissing-prototypes]
213 | __visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
vim +/ret +116 arch/x86/entry/common.c
112
113 static noinstr bool __do_fast_syscall_32(struct pt_regs *regs)
114 {
115 unsigned int nr = syscall_32_enter(regs);
116 bool ret;
117 int res;
118
119 add_random_kstack_offset();
120 kentry_enter_from_user_mode(regs);
121 instrumentation_begin();
122 local_irq_enable();
123
124 /* Fetch EBP from where the vDSO stashed it. */
125 if (IS_ENABLED(CONFIG_X86_64)) {
126 /*
127 * Micro-optimization: the pointer we're following is
128 * explicitly 32 bits, so it can't be out of range.
129 */
130 res = __get_user(*(u32 *)®s->bp,
131 (u32 __user __force *)(unsigned long)(u32)regs->sp);
132 } else {
133 res = get_user(*(u32 *)®s->bp,
134 (u32 __user __force *)(unsigned long)(u32)regs->sp);
135 }
136
137 if (res) {
138 /* User code screwed up. */
139 regs->ax = -EFAULT;
140 ret = false;
141 goto out;
142 }
143
144 /* The case truncates any ptrace induced syscall nr > 2^32 -1 */
145 nr = (unsigned int)kentry_syscall_begin(regs, nr);
146
147 /* Now this is just like a normal syscall. */
148 do_syscall_32_irqs_on(regs, nr);
149
150 kentry_syscall_end(regs);
151 ret = true;
152
153 out:
154 local_irq_disable();
155 instrumentation_end();
156 kentry_exit_to_user_mode(regs);
157 return true;
158 }
159
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org