drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: warning: unused variable 'rockchip_dp_dt_ids'
by kernel test robot
Hi Robin,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1df27313f50a57497c1faeb6a6ae4ca939c85a7d
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
date: 8 months ago
config: x86_64-randconfig-a013-20210317 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 50c7504a93fdb90c26870db8c8ea7add895c7725)
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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable]
static const struct of_device_id rockchip_dp_dt_ids[] = {
^
1 warning generated.
--
>> drivers/gpu/drm/rockchip/rockchip_vop_reg.c:1029:34: warning: unused variable 'vop_driver_dt_match' [-Wunused-const-variable]
static const struct of_device_id vop_driver_dt_match[] = {
^
1 warning generated.
vim +/rockchip_dp_dt_ids +457 drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
d9c900b0270a18 Yakir Yang 2016-06-29 456
9e32e16e9e989f Yakir Yang 2016-03-29 @457 static const struct of_device_id rockchip_dp_dt_ids[] = {
d9c900b0270a18 Yakir Yang 2016-06-29 458 {.compatible = "rockchip,rk3288-dp", .data = &rk3288_dp },
82872e42bb1501 Yakir Yang 2016-06-29 459 {.compatible = "rockchip,rk3399-edp", .data = &rk3399_edp },
9e32e16e9e989f Yakir Yang 2016-03-29 460 {}
9e32e16e9e989f Yakir Yang 2016-03-29 461 };
9e32e16e9e989f Yakir Yang 2016-03-29 462 MODULE_DEVICE_TABLE(of, rockchip_dp_dt_ids);
9e32e16e9e989f Yakir Yang 2016-03-29 463
:::::: The code at line 457 was first introduced by commit
:::::: 9e32e16e9e989f2c4a11b377c5ed3e1c7be16cfb drm: rockchip: dp: add rockchip platform dp driver
:::::: TO: Yakir Yang <ykk(a)rock-chips.com>
:::::: CC: Yakir Yang <ykk(a)rock-chips.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[mhiramat:kprobes/kretprobe-stackfix 7/10] arch/ia64/include/asm/ptrace.h:76:2: error: implicit declaration of function 'ia64_psr'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git kprobes/kretprobe-stackfix
head: 6e2b8966c87adc1be0fb4a386fb24ae438f4cb79
commit: bf8953ce458279534e3e2bdfdab6eaf2dd224bf9 [7/10] ia64: Add instruction_pointer_set() API
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/commit...
git remote add mhiramat https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git
git fetch --no-tags mhiramat kprobes/kretprobe-stackfix
git checkout bf8953ce458279534e3e2bdfdab6eaf2dd224bf9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/ptrace.h: In function 'instruction_pointer_set':
>> arch/ia64/include/asm/ptrace.h:76:2: error: implicit declaration of function 'ia64_psr'; did you mean 'ia64_pal'? [-Werror=implicit-function-declaration]
76 | ia64_psr(regs)->ri = (val & 0xf);
| ^~~~~~~~
| ia64_pal
arch/ia64/include/asm/ptrace.h:76:16: error: invalid type argument of '->' (have 'int')
76 | ia64_psr(regs)->ri = (val & 0xf);
| ^~
arch/ia64/kernel/asm-offsets.c: At top level:
arch/ia64/kernel/asm-offsets.c:23:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
23 | void foo(void)
| ^~~
cc1: some warnings being treated as errors
--
In file included from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/ptrace.h: In function 'instruction_pointer_set':
>> arch/ia64/include/asm/ptrace.h:76:2: error: implicit declaration of function 'ia64_psr'; did you mean 'ia64_pal'? [-Werror=implicit-function-declaration]
76 | ia64_psr(regs)->ri = (val & 0xf);
| ^~~~~~~~
| ia64_pal
arch/ia64/include/asm/ptrace.h:76:16: error: invalid type argument of '->' (have 'int')
76 | ia64_psr(regs)->ri = (val & 0xf);
| ^~
arch/ia64/kernel/asm-offsets.c: At top level:
arch/ia64/kernel/asm-offsets.c:23:6: warning: no previous prototype for 'foo' [-Wmissing-prototypes]
23 | void foo(void)
| ^~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:116: arch/ia64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
In file included from arch/ia64/include/asm/processor.h:20,
from arch/ia64/include/asm/thread_info.h:12,
from include/linux/thread_info.h:58,
from include/asm-generic/preempt.h:5,
from ./arch/ia64/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/sched/signal.h:5,
from arch/ia64/kernel/asm-offsets.c:10:
arch/ia64/include/asm/ptrace.h: In function 'instruction_pointer_set':
>> arch/ia64/include/asm/ptrace.h:76:2: error: implicit declaration of function 'ia64_psr'; did you mean
76 | ia64_psr(regs)->ri = (val & 0xf);
| ^~~~~~~~
| ia64_pal
arch/ia64/include/asm/ptrace.h:76:16: error: invalid type argument of '->' (have 'int')
76 | ia64_psr(regs)->ri = (val & 0xf);
| ^~
arch/ia64/kernel/asm-offsets.c: At top level:
arch/ia64/kernel/asm-offsets.c:23:6: warning: no previous prototype for 'foo'
23 | void foo(void)
| ^~~
cc1: some warnings being treated as errors
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound source usr virt [scripts/Makefile.build:116: arch/ia64/kernel/asm-offsets.s] Error 1
Target '__build' not remade because of errors.
Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound source usr virt [Makefile:1235: prepare0] Error 2
Target 'prepare' not remade because of errors.
make: Makefile arch block certs crypto drivers fs include init ipc kernel lib mm net samples scripts security sound source usr virt [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +/ia64_psr +76 arch/ia64/include/asm/ptrace.h
73
74 static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val)
75 {
> 76 ia64_psr(regs)->ri = (val & 0xf);
77 regs->cr_iip = (val & ~0xfULL);
78 }
79
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] [RFCv3] ASoC: Add Rockchip rk817 audio CODEC support
by kernel test robot
Hi Chris,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on asoc/for-next]
[also build test WARNING on v5.12-rc3 next-20210316]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Chris-Morgan/ASoC-Add-Rockchip-r...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
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
# https://github.com/0day-ci/linux/commit/40537fdd86dce321f639ec7d241ecc053...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Morgan/ASoC-Add-Rockchip-rk817-audio-CODEC-support/20210317-035642
git checkout 40537fdd86dce321f639ec7d241ecc05303b8361
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 >>):
sound/soc/codecs/rk817_codec.c:31:33: note: declared here
31 | static const struct reg_default rk817_reg_defaults[] = {
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/bits.h:22,
from include/linux/bitops.h:6,
from include/linux/kernel.h:11,
from include/linux/clk.h:13,
from sound/soc/codecs/rk817_codec.c:7:
include/linux/build_bug.h:16:51: error: negative width in bit-field '<anonymous>'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/compiler.h:240:28: note: in expansion of macro 'BUILD_BUG_ON_ZERO'
240 | #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
| ^~~~~~~~~~~~~~~~~
include/linux/kernel.h:49:59: note: in expansion of macro '__must_be_array'
49 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^~~~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:601:22: note: in expansion of macro 'ARRAY_SIZE'
601 | .num_reg_defaults = ARRAY_SIZE(rk817_reg_defaults),
| ^~~~~~~~~~
sound/soc/codecs/rk817_codec.c:605:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
605 | {
| ^
sound/soc/codecs/rk817_codec.c:662:44: error: expected declaration specifiers before ';' token
662 | MODULE_DEVICE_TABLE(of, rk817_codec_dt_ids);
| ^
sound/soc/codecs/rk817_codec.c:664:31: error: storage class specified for parameter 'rk817_codec_driver'
664 | static struct platform_driver rk817_codec_driver = {
| ^~~~~~~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:664:15: error: parameter 'rk817_codec_driver' is initialized
664 | static struct platform_driver rk817_codec_driver = {
| ^~~~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:668:11: error: 'rk817_platform_probe' undeclared (first use in this function)
668 | .probe = rk817_platform_probe,
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:32,
from sound/soc/codecs/rk817_codec.c:8:
include/linux/device/driver.h:260:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
260 | { \
| ^
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:1: note: in expansion of macro 'module_platform_driver'
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:16,
from include/linux/clk.h:13,
from sound/soc/codecs/rk817_codec.c:7:
include/linux/init.h:198:10: error: storage class specified for parameter '__initcall__kmod_snd_soc_rk817__389_671_rk817_codec_driver_init6'
198 | __PASTE(__, \
| ^~
include/linux/init.h:248:20: note: in definition of macro '____define_initcall'
248 | static initcall_t __name __used \
| ^~~~~~
include/linux/compiler_types.h:60:22: note: in expansion of macro '___PASTE'
60 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:198:2: note: in expansion of macro '__PASTE'
198 | __PASTE(__, \
| ^~~~~~~
include/linux/init.h:255:3: note: in expansion of macro '__initcall_name'
255 | __initcall_name(initcall, __iid, id), \
| ^~~~~~~~~~~~~~~
include/linux/init.h:259:2: note: in expansion of macro '__unique_initcall'
259 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:261:35: note: in expansion of macro '___define_initcall'
261 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:290:30: note: in expansion of macro '__define_initcall'
290 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:295:24: note: in expansion of macro 'device_initcall'
295 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
include/linux/module.h:89:24: note: in expansion of macro '__initcall'
89 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
263 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:1: note: in expansion of macro 'module_platform_driver'
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:32,
from sound/soc/codecs/rk817_codec.c:8:
include/linux/device/driver.h:260:1: error: parameter '__initcall__kmod_snd_soc_rk817__389_671_rk817_codec_driver_init6' is initialized
260 | { \
| ^
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:1: note: in expansion of macro 'module_platform_driver'
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:260:1: warning: 'used' attribute ignored [-Wattributes]
260 | { \
| ^
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:1: note: in expansion of macro 'module_platform_driver'
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6,
from include/linux/kernel.h:16,
from include/linux/clk.h:13,
from sound/soc/codecs/rk817_codec.c:7:
include/linux/init.h:198:10: error: section attribute not allowed for '__initcall__kmod_snd_soc_rk817__389_671_rk817_codec_driver_init6'
198 | __PASTE(__, \
| ^~
include/linux/init.h:248:20: note: in definition of macro '____define_initcall'
248 | static initcall_t __name __used \
| ^~~~~~
include/linux/compiler_types.h:60:22: note: in expansion of macro '___PASTE'
60 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/init.h:198:2: note: in expansion of macro '__PASTE'
198 | __PASTE(__, \
| ^~~~~~~
include/linux/init.h:255:3: note: in expansion of macro '__initcall_name'
255 | __initcall_name(initcall, __iid, id), \
| ^~~~~~~~~~~~~~~
include/linux/init.h:259:2: note: in expansion of macro '__unique_initcall'
259 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:261:35: note: in expansion of macro '___define_initcall'
261 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:290:30: note: in expansion of macro '__define_initcall'
290 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:295:24: note: in expansion of macro 'device_initcall'
295 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
include/linux/module.h:89:24: note: in expansion of macro '__initcall'
89 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
263 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:1: note: in expansion of macro 'module_platform_driver'
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:24: error: 'rk817_codec_driver_init' undeclared (first use in this function); did you mean 'rk817_codec_driver'?
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:249:41: note: in definition of macro '____define_initcall'
249 | __attribute__((__section__(__sec))) = fn;
| ^~
include/linux/init.h:259:2: note: in expansion of macro '__unique_initcall'
259 | __unique_initcall(fn, id, __sec, __initcall_id(fn))
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:261:35: note: in expansion of macro '___define_initcall'
261 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
| ^~~~~~~~~~~~~~~~~~
include/linux/init.h:290:30: note: in expansion of macro '__define_initcall'
290 | #define device_initcall(fn) __define_initcall(fn, 6)
| ^~~~~~~~~~~~~~~~~
include/linux/init.h:295:24: note: in expansion of macro 'device_initcall'
295 | #define __initcall(fn) device_initcall(fn)
| ^~~~~~~~~~~~~~~
include/linux/module.h:89:24: note: in expansion of macro '__initcall'
89 | #define module_init(x) __initcall(x);
| ^~~~~~~~~~
include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
263 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
sound/soc/codecs/rk817_codec.c:671:1: note: in expansion of macro 'module_platform_driver'
671 | module_platform_driver(rk817_codec_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf.h:19,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from include/linux/regulator/machine.h:15,
from include/linux/mfd/rk808.h:18,
from sound/soc/codecs/rk817_codec.c:10:
include/linux/module.h:89:37: error: expected declaration specifiers before ';' token
89 | #define module_init(x) __initcall(x);
| ^
include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
263 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:257:2: note: in expansion of macro 'module_driver'
257 | module_driver(__platform_driver, platform_driver_register, \
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
Selected by
- FAULT_INJECTION_STACKTRACE_FILTER && FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT && !X86_64 && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
vim +/used +260 include/linux/device/driver.h
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 243
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 244 /**
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 245 * module_driver() - Helper macro for drivers that don't do anything
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 246 * special in module init/exit. This eliminates a lot of boilerplate.
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 247 * Each module may only use this macro once, and calling it replaces
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 248 * module_init() and module_exit().
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 249 *
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 250 * @__driver: driver name
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 251 * @__register: register function for this driver type
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 252 * @__unregister: unregister function for this driver type
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 253 * @...: Additional arguments to be passed to __register and __unregister.
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 254 *
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 255 * Use this macro to construct bus specific macros for registering
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 256 * drivers, and do not use it on its own.
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 257 */
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 258 #define module_driver(__driver, __register, __unregister, ...) \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 259 static int __init __driver##_init(void) \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 @260 { \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 261 return __register(&(__driver) , ##__VA_ARGS__); \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 262 } \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 263 module_init(__driver##_init); \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 264 static void __exit __driver##_exit(void) \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 265 { \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 266 __unregister(&(__driver) , ##__VA_ARGS__); \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 267 } \
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 268 module_exit(__driver##_exit);
4c002c978b7f2f Greg Kroah-Hartman 2019-12-09 269
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [RFC PATCH v3 13/18] dyndbg+module: expose ddebug_sites to modules
by kernel test robot
Hi Jim,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on tip/x86/core]
[also build test ERROR on jeyu/modules-next tip/x86/vdso efi/next drm-intel/for-linux-next kbuild/for-next linus/master v5.12-rc3 next-20210316]
[cannot apply to asm-generic/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jim-Cromie/dynamic-debug-diet-pl...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git f935178b5c1c32ff803b15892a8ba85a1280cb01
config: x86_64-kexec (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/ab53c81cf1fe36968a79663d70608fbab...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jim-Cromie/dynamic-debug-diet-plan/20210316-131054
git checkout ab53c81cf1fe36968a79663d70608fbab81c6b50
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/module.c: In function 'dynamic_debug_setup':
kernel/module.c:2788:27: warning: passing argument 2 of 'ddebug_add_module' makes integer from pointer without a cast [-Wint-conversion]
2788 | ddebug_add_module(debug, sites, num, mod->name);
| ^~~~~
| |
| struct _ddebug_site *
In file included from kernel/module.c:57:
include/linux/dynamic_debug.h:206:71: note: expected 'unsigned int' but argument is of type 'struct _ddebug_site *'
206 | static inline int ddebug_add_module(struct _ddebug *tab, unsigned int n,
| ~~~~~~~~~~~~~^
kernel/module.c:2788:34: warning: passing argument 3 of 'ddebug_add_module' makes pointer from integer without a cast [-Wint-conversion]
2788 | ddebug_add_module(debug, sites, num, mod->name);
| ^~~
| |
| unsigned int
In file included from kernel/module.c:57:
include/linux/dynamic_debug.h:207:21: note: expected 'const char *' but argument is of type 'unsigned int'
207 | const char *modname)
| ~~~~~~~~~~~~^~~~~~~
>> kernel/module.c:2788:2: error: too many arguments to function 'ddebug_add_module'
2788 | ddebug_add_module(debug, sites, num, mod->name);
| ^~~~~~~~~~~~~~~~~
In file included from kernel/module.c:57:
include/linux/dynamic_debug.h:206:19: note: declared here
206 | static inline int ddebug_add_module(struct _ddebug *tab, unsigned int n,
| ^~~~~~~~~~~~~~~~~
vim +/ddebug_add_module +2788 kernel/module.c
2782
2783 static void dynamic_debug_setup(struct module *mod, struct _ddebug *debug,
2784 struct _ddebug_site *sites, unsigned int num)
2785 {
2786 if (!debug)
2787 return;
> 2788 ddebug_add_module(debug, sites, num, mod->name);
2789 }
2790
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[mhiramat:kprobes/kretprobe-stackfix 3/10] include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git kprobes/kretprobe-stackfix
head: 6e2b8966c87adc1be0fb4a386fb24ae438f4cb79
commit: 0d46dfb8d0aa9f3a9b64d8b119bca53bde8fb642 [3/10] kprobes: treewide: Remove trampoline_address from kretprobe_trampoline_handler()
config: i386-randconfig-m021-20210316 (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/mhiramat/linux.git/commit...
git remote add mhiramat https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git
git fetch --no-tags mhiramat kprobes/kretprobe-stackfix
git checkout 0d46dfb8d0aa9f3a9b64d8b119bca53bde8fb642
# 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 errors (new ones prefixed by >>):
In file included from include/linux/kgdb.h:19,
from include/linux/fb.h:5,
from drivers/hid/hid-picolcd_core.c:15:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from include/linux/kgdb.h:19,
from include/linux/fb.h:5,
from drivers/hid/hid-picolcd_core.c:15:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
drivers/hid/hid-picolcd_core.c: In function 'picolcd_raw_event':
drivers/hid/hid-picolcd_core.c:332:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
332 | int ret = 0;
| ^~~
--
In file included from include/linux/kgdb.h:19,
from include/linux/fb.h:5,
from drivers/hid/hid-picolcd_leds.c:15:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from include/linux/kgdb.h:19,
from include/linux/fb.h:5,
from drivers/hid/hid-picolcd_leds.c:15:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from init/main.c:36:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from init/main.c:36:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
init/main.c:776:20: warning: no previous prototype for 'mem_encrypt_init' [-Wmissing-prototypes]
776 | void __init __weak mem_encrypt_init(void) { }
| ^~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/traps.h:6,
from arch/x86/entry/common.c:29:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from arch/x86/include/asm/traps.h:6,
from arch/x86/entry/common.c:29:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:82:24: warning: no previous prototype for 'do_int80_syscall_32' [-Wmissing-prototypes]
82 | __visible noinstr void do_int80_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:148:24: warning: no previous prototype for 'do_fast_syscall_32' [-Wmissing-prototypes]
148 | __visible noinstr long do_fast_syscall_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~
arch/x86/entry/common.c:200:24: warning: no previous prototype for 'do_SYSENTER_32' [-Wmissing-prototypes]
200 | __visible noinstr long do_SYSENTER_32(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/traps.h:6,
from arch/x86/kernel/irq.c:23:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from arch/x86/include/asm/traps.h:6,
from arch/x86/kernel/irq.c:23:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/trace/define_trace.h:102,
from arch/x86/include/asm/trace/irq_vectors.h:383,
from arch/x86/kernel/irq.c:27:
include/trace/trace_events.h:27:23: warning: 'str__irq_vectors__trace_system_name' defined but not used [-Wunused-const-variable=]
27 | #define __app__(x, y) str__##x##y
| ^~~~~
include/trace/trace_events.h:28:21: note: in expansion of macro '__app__'
28 | #define __app(x, y) __app__(x, y)
| ^~~~~~~
include/trace/trace_events.h:30:29: note: in expansion of macro '__app'
30 | #define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
| ^~~~~
include/trace/trace_events.h:33:20: note: in expansion of macro 'TRACE_SYSTEM_STRING'
33 | static const char TRACE_SYSTEM_STRING[] = \
| ^~~~~~~~~~~~~~~~~~~
include/trace/trace_events.h:36:1: note: in expansion of macro 'TRACE_MAKE_SYSTEM_STR'
36 | TRACE_MAKE_SYSTEM_STR();
| ^~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/traps.h:6,
from arch/x86/kernel/doublefault_32.c:11:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from arch/x86/include/asm/traps.h:6,
from arch/x86/kernel/doublefault_32.c:11:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/doublefault_32.c:23:36: warning: no previous prototype for 'doublefault_shim' [-Wmissing-prototypes]
23 | asmlinkage noinstr void __noreturn doublefault_shim(void)
| ^~~~~~~~~~~~~~~~
arch/x86/kernel/doublefault_32.c:117:6: warning: no previous prototype for 'doublefault_init_cpu_tss' [-Wmissing-prototypes]
117 | void doublefault_init_cpu_tss(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/kernel/paravirt.c:15:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from arch/x86/kernel/paravirt.c:15:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/kernel/paravirt.c:96:13: warning: no previous prototype for 'native_pv_lock_init' [-Wmissing-prototypes]
96 | void __init native_pv_lock_init(void)
| ^~~~~~~~~~~~~~~~~~~
--
In file included from arch/x86/include/asm/traps.h:6,
from arch/x86/mm/extable.c:9:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from arch/x86/include/asm/traps.h:6,
from arch/x86/mm/extable.c:9:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:27:16: warning: no previous prototype for 'ex_handler_default' [-Wmissing-prototypes]
27 | __visible bool ex_handler_default(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:37:16: warning: no previous prototype for 'ex_handler_fault' [-Wmissing-prototypes]
37 | __visible bool ex_handler_fault(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:58:16: warning: no previous prototype for 'ex_handler_fprestore' [-Wmissing-prototypes]
58 | __visible bool ex_handler_fprestore(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:73:16: warning: no previous prototype for 'ex_handler_uaccess' [-Wmissing-prototypes]
73 | __visible bool ex_handler_uaccess(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:84:16: warning: no previous prototype for 'ex_handler_copy' [-Wmissing-prototypes]
84 | __visible bool ex_handler_copy(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~
arch/x86/mm/extable.c:96:16: warning: no previous prototype for 'ex_handler_rdmsr_unsafe' [-Wmissing-prototypes]
96 | __visible bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:113:16: warning: no previous prototype for 'ex_handler_wrmsr_unsafe' [-Wmissing-prototypes]
113 | __visible bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/extable.c:129:16: warning: no previous prototype for 'ex_handler_clear_fs' [-Wmissing-prototypes]
129 | __visible bool ex_handler_clear_fs(const struct exception_table_entry *fixup,
| ^~~~~~~~~~~~~~~~~~~
--
In file included from kernel/kallsyms.c:27:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from kernel/kallsyms.c:27:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
kernel/kallsyms.c:457:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
457 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
| ^~~~~~~~~~~~~~~~
--
In file included from include/linux/kgdb.h:19,
from kernel/panic.c:15:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from include/linux/kgdb.h:19,
from kernel/panic.c:15:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
kernel/panic.c:85:13: warning: no previous prototype for 'panic_smp_self_stop' [-Wmissing-prototypes]
85 | void __weak panic_smp_self_stop(void)
| ^~~~~~~~~~~~~~~~~~~
kernel/panic.c:95:13: warning: no previous prototype for 'nmi_panic_self_stop' [-Wmissing-prototypes]
95 | void __weak nmi_panic_self_stop(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~
kernel/panic.c:106:13: warning: no previous prototype for 'crash_smp_send_stop' [-Wmissing-prototypes]
106 | void __weak crash_smp_send_stop(void)
| ^~~~~~~~~~~~~~~~~~~
kernel/panic.c: In function '__warn':
kernel/panic.c:590:3: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
590 | vprintk(args->fmt, args->args);
| ^~~~~~~
kernel/panic.c: At top level:
kernel/panic.c:684:24: warning: no previous prototype for '__stack_chk_fail' [-Wmissing-prototypes]
684 | __visible noinstr void __stack_chk_fail(void)
| ^~~~~~~~~~~~~~~~
--
In file included from kernel/trace/ftrace.c:37:
>> include/linux/kprobes.h:208:6: error: conflicting types for 'kretprobe_trampoline'
208 | void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
In file included from include/linux/kprobes.h:32,
from kernel/trace/ftrace.c:37:
arch/x86/include/asm/kprobes.h:52:17: note: previous declaration of 'kretprobe_trampoline' was here
52 | asmlinkage void kretprobe_trampoline(void);
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:302:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
302 | int __register_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:345:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
345 | int __unregister_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:3876:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
3876 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
| ^~~~~~~~~~~~~~~~~~~~~~~~
..
vim +/kretprobe_trampoline +208 include/linux/kprobes.h
207
> 208 void kretprobe_trampoline(void);
209 /*
210 * Since some architecture uses structured function pointer,
211 * use dereference_function_descriptor() to get real function address.
212 */
213 static nokprobe_inline void *kretprobe_trampoline_addr(void)
214 {
215 return dereference_function_descriptor(kretprobe_trampoline);
216 }
217
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[mhiramat:kprobes/kretprobe-stackfix 8/10] arch/sparc/include/asm/ptrace.h:67:15: warning: assignment to 'long unsigned int' from 'kprobe_opcode_t {aka 'unsigned int makes integer from pointer without a cast
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git kprobes/kretprobe-stackfix
head: 6e2b8966c87adc1be0fb4a386fb24ae438f4cb79
commit: 663b1b4caed9e4b0ad1be80b30851e68fb9a40eb [8/10] kprobes: Setup instruction pointer in __kretprobe_trampoline_handler
config: sparc-randconfig-r001-20210316 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git/commit...
git remote add mhiramat https://git.kernel.org/pub/scm/linux/kernel/git/mhiramat/linux.git
git fetch --no-tags mhiramat kprobes/kretprobe-stackfix
git checkout 663b1b4caed9e4b0ad1be80b30851e68fb9a40eb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
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 >>):
In file included from arch/sparc/include/asm/thread_info_64.h:31,
from arch/sparc/include/asm/thread_info.h:5,
from include/linux/thread_info.h:58,
from arch/sparc/include/asm/current.h:15,
from include/linux/mutex.h:14,
from include/linux/notifier.h:14,
from include/linux/kprobes.h:22,
from kernel/kprobes.c:21:
kernel/kprobes.c: In function '__kretprobe_trampoline_handler':
>> arch/sparc/include/asm/ptrace.h:67:15: warning: assignment to 'long unsigned int' from 'kprobe_opcode_t *' {aka 'unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
67 | (regs)->tpc = (val); \
| ^
kernel/kprobes.c:1901:2: note: in expansion of macro 'instruction_pointer_set'
1901 | instruction_pointer_set(regs, correct_ret_addr);
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/sparc/include/asm/ptrace.h:68:16: warning: assignment to 'long unsigned int' from 'kprobe_opcode_t *' {aka 'unsigned int *'} makes integer from pointer without a cast [-Wint-conversion]
68 | (regs)->tnpc = (val)+4; \
| ^
kernel/kprobes.c:1901:2: note: in expansion of macro 'instruction_pointer_set'
1901 | instruction_pointer_set(regs, correct_ret_addr);
| ^~~~~~~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for FRAME_POINTER
Depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS || MCOUNT
Selected by
- LATENCYTOP && DEBUG_KERNEL && STACKTRACE_SUPPORT && PROC_FS && !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86
- LOCKDEP && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !MIPS && !PPC && !ARM && !S390 && !MICROBLAZE && !ARC && !X86
vim +67 arch/sparc/include/asm/ptrace.h
f3ec38d5135ca4 Sam Ravnborg 2009-01-02 62
dff933da765fd4 Al Viro 2012-09-26 63 #define force_successful_syscall_return() set_thread_noerror(1)
f3ec38d5135ca4 Sam Ravnborg 2009-01-02 64 #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV))
f3ec38d5135ca4 Sam Ravnborg 2009-01-02 65 #define instruction_pointer(regs) ((regs)->tpc)
e8f4aa6087fa80 Allen Pais 2016-10-13 66 #define instruction_pointer_set(regs, val) do { \
e8f4aa6087fa80 Allen Pais 2016-10-13 @67 (regs)->tpc = (val); \
e8f4aa6087fa80 Allen Pais 2016-10-13 68 (regs)->tnpc = (val)+4; \
e8f4aa6087fa80 Allen Pais 2016-10-13 69 } while (0)
f3ec38d5135ca4 Sam Ravnborg 2009-01-02 70 #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])
d7e7528bcd456f Eric Paris 2012-01-03 71 static inline int is_syscall_success(struct pt_regs *regs)
d7e7528bcd456f Eric Paris 2012-01-03 72 {
d7e7528bcd456f Eric Paris 2012-01-03 73 return !(regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY));
d7e7528bcd456f Eric Paris 2012-01-03 74 }
d7e7528bcd456f Eric Paris 2012-01-03 75
:::::: The code at line 67 was first introduced by commit
:::::: e8f4aa6087fa80732382881ef7c0c96733bb1984 sparc64:Support User Probes for sparc
:::::: TO: Allen Pais <allen.pais(a)oracle.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[lpieralisi:gic/v4-1-vsgi-disable 2/4] drivers/misc/smmu-test-engine.c:1748:4: error: implicit declaration of function 'pci_msix_vec_count'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git gic/v4-1-vsgi-disable
head: 028f565ab5e5e9eb425fc4a976073afa455ed40b
commit: ac343379cbdfd6dee5b781f1f0e1dfb8d6d607a1 [2/4] smmute: driver for the SMMUv3TestEngine
config: arm64-randconfig-r024-20210316 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git/comm...
git remote add lpieralisi https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git
git fetch --no-tags lpieralisi gic/v4-1-vsgi-disable
git checkout ac343379cbdfd6dee5b781f1f0e1dfb8d6d607a1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/misc/smmu-test-engine.c:348:6: warning: no previous prototype for '__smmute_task_put' [-Wmissing-prototypes]
348 | void __smmute_task_put(struct smmute_task *smmute_task)
| ^~~~~~~~~~~~~~~~~
>> drivers/misc/smmu-test-engine.c:484:6: warning: no previous prototype for 'smmute_task_fd_put_all' [-Wmissing-prototypes]
484 | void smmute_task_fd_put_all(struct smmute_file_desc *fd)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/smmu-test-engine.c:502:6: warning: no previous prototype for 'smmute_task_put' [-Wmissing-prototypes]
502 | void smmute_task_put(struct smmute_file_desc *fd,
| ^~~~~~~~~~~~~~~
>> drivers/misc/smmu-test-engine.c:1206:6: warning: no previous prototype for 'smmute_vm_close' [-Wmissing-prototypes]
1206 | void smmute_vm_close(struct vm_area_struct *vma)
| ^~~~~~~~~~~~~~~
In file included from include/linux/device.h:15,
from include/linux/cdev.h:8,
from drivers/misc/smmu-test-engine.c:13:
drivers/misc/smmu-test-engine.c: In function 'smmute_pci_msi_enable':
>> drivers/misc/smmu-test-engine.c:1748:4: error: implicit declaration of function 'pci_msix_vec_count' [-Werror=implicit-function-declaration]
1748 | pci_msix_vec_count(pdev));
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:131:47: note: in definition of macro 'dev_dbg'
131 | dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
| ^~~~~~~~~~~
>> drivers/misc/smmu-test-engine.c:1752:44: error: invalid application of 'sizeof' to incomplete type 'struct msix_entry'
1752 | entries = devm_kmalloc(&pdev->dev, sizeof(struct msix_entry) * nr_msis,
| ^~~~~~
>> drivers/misc/smmu-test-engine.c:1763:10: error: invalid use of undefined type 'struct msix_entry'
1763 | entries[i].entry = i;
| ^
>> drivers/misc/smmu-test-engine.c:1763:10: error: dereferencing pointer to incomplete type 'struct msix_entry'
>> drivers/misc/smmu-test-engine.c:1765:8: error: implicit declaration of function 'pci_enable_msix_range' [-Werror=implicit-function-declaration]
1765 | ret = pci_enable_msix_range(pdev, entries, 1, nr_msis);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/misc/smmu-test-engine.c: In function 'smmute_init_msi_pool':
drivers/misc/smmu-test-engine.c:155:53: error: invalid use of undefined type 'struct msix_entry'
155 | (dev_is_pci((smmute)->dev) ? (smmute)->msix_entries[idx].vector : \
| ^
drivers/misc/smmu-test-engine.c:1793:9: note: in expansion of macro 'smmute_get_msi_vector'
1793 | vec = smmute_get_msi_vector(smmute, i);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/misc/smmu-test-engine.c: In function 'smmute_free_msi_pool':
drivers/misc/smmu-test-engine.c:155:53: error: invalid use of undefined type 'struct msix_entry'
155 | (dev_is_pci((smmute)->dev) ? (smmute)->msix_entries[idx].vector : \
| ^
drivers/misc/smmu-test-engine.c:1813:12: note: in expansion of macro 'smmute_get_msi_vector'
1813 | free_irq(smmute_get_msi_vector(smmute, i),
| ^~~~~~~~~~~~~~~~~~~~~
drivers/misc/smmu-test-engine.c: In function 'smmute_common_probe':
>> drivers/misc/smmu-test-engine.c:1888:9: error: implicit declaration of function 'iommu_dev_has_feature'; did you mean 'iommu_dev_enable_feature'? [-Werror=implicit-function-declaration]
1888 | ret = iommu_dev_has_feature(dev, IOMMU_DEV_FEAT_SVA);
| ^~~~~~~~~~~~~~~~~~~~~
| iommu_dev_enable_feature
drivers/misc/smmu-test-engine.c: In function 'smmute_pci_probe':
>> drivers/misc/smmu-test-engine.c:2047:2: error: implicit declaration of function 'pci_disable_msix'; did you mean 'pci_disable_sriov'? [-Werror=implicit-function-declaration]
2047 | pci_disable_msix(pdev);
| ^~~~~~~~~~~~~~~~
| pci_disable_sriov
cc1: some warnings being treated as errors
vim +/pci_msix_vec_count +1748 drivers/misc/smmu-test-engine.c
1735
1736 static int smmute_pci_msi_enable(struct pci_dev *pdev)
1737 {
1738 int ret, i;
1739 int nr_msis;
1740 struct smmute_device *smmute;
1741 struct msix_entry *entries;
1742
1743 smmute = pci_get_drvdata(pdev);
1744 if (!smmute)
1745 return -EINVAL;
1746
1747 dev_dbg(&pdev->dev, "max number of MSI-X vectors: %d\n",
> 1748 pci_msix_vec_count(pdev));
1749
1750 nr_msis = min_t(size_t, SMMUTE_MAX_MSIS,
1751 smmute->nr_pairs * SMMUTE_FRAMES_PER_PAGE);
> 1752 entries = devm_kmalloc(&pdev->dev, sizeof(struct msix_entry) * nr_msis,
1753 GFP_KERNEL);
1754
1755 if (!entries) {
1756 dev_err(&pdev->dev, "could not allocate MSI-X entries\n");
1757 return -ENOMEM;
1758 }
1759
1760 smmute->msix_entries = entries;
1761
1762 for (i = 0; i < nr_msis; i++)
> 1763 entries[i].entry = i;
1764
> 1765 ret = pci_enable_msix_range(pdev, entries, 1, nr_msis);
1766 if (ret <= 0) {
1767 devm_kfree(&pdev->dev, entries);
1768 return ret;
1769 }
1770
1771 smmute->nr_msix_entries = ret;
1772 dev_dbg(&pdev->dev, "requested %d MSIs, got %d\n", nr_msis, ret);
1773
1774 return 0;
1775 }
1776
1777 static int smmute_init_msi_pool(struct smmute_device *smmute)
1778 {
1779 int vec, ret, i;
1780 struct smmute_msi_pool *pool;
1781 int nr_pools = smmute->nr_msix_entries;
1782
1783 smmute->msi_pools = devm_kcalloc(smmute->dev, nr_pools, sizeof(*pool),
1784 GFP_KERNEL);
1785 if (!smmute->msi_pools)
1786 return -ENOMEM;
1787
1788 for (i = 0; i < nr_pools; i++) {
1789 pool = &smmute->msi_pools[i];
1790 spin_lock_init(&pool->lock);
1791 INIT_LIST_HEAD(&pool->transactions);
1792
1793 vec = smmute_get_msi_vector(smmute, i);
1794 ret = request_irq(vec, smmute_msi_handler, 0,
1795 dev_name(smmute->dev), pool);
1796 if (ret)
1797 break;
1798 }
1799
1800 return ret;
1801 }
1802
1803 static void smmute_free_msi_pool(struct smmute_device *smmute)
1804 {
1805 int i;
1806
1807 /*
1808 * Other resources are managed (freed automatically), but we don't use
1809 * devm for MSIs, because they have to be unregistered before MSIs are
1810 * freed by pci_disable_msix.
1811 */
1812 for (i = 0; i < smmute->nr_msix_entries; i++)
1813 free_irq(smmute_get_msi_vector(smmute, i),
1814 &smmute->msi_pools[i]);
1815 }
1816
1817 static int smmute_common_probe(struct smmute_device *smmute)
1818 {
1819 int minor;
1820 size_t nr_frames;
1821 int ret = -ENOMEM;
1822 int cache_flags = 0;
1823 struct device *dev = smmute->dev;
1824
1825 #ifdef DEBUG
1826 /* prevents merging caches, allows to get stats from /proc/slabinfo */
1827 cache_flags = SLAB_POISON | SLAB_CONSISTENCY_CHECKS;
1828 #endif
1829
1830 mutex_init(&smmute->task_mutex);
1831 mutex_init(&smmute->resources_mutex);
1832 INIT_LIST_HEAD(&smmute->tasks);
1833
1834 nr_frames = smmute->nr_pairs * SMMUTE_FRAMES_PER_PAGE;
1835 smmute->reserved_frames = devm_kzalloc(dev, BITS_TO_LONGS(nr_frames),
1836 GFP_KERNEL);
1837 if (!smmute->reserved_frames)
1838 return ret;
1839
1840 smmute->transaction_cache = kmem_cache_create("smmute_transactions",
1841 sizeof(struct smmute_transaction), 0, cache_flags, NULL);
1842 if (!smmute->transaction_cache)
1843 goto err_free_frames;
1844
1845 smmute->dma_regions_cache = kmem_cache_create("smmute_dma_regions",
1846 sizeof(struct smmute_dma), 0, cache_flags, NULL);
1847 if (!smmute->dma_regions_cache)
1848 goto err_destroy_transaction_cache;
1849
1850 smmute->file_desc_cache = kmem_cache_create("smmute_file_descs",
1851 sizeof(struct smmute_file_desc), 0, cache_flags, NULL);
1852 if (!smmute->file_desc_cache)
1853 goto err_destroy_dma_cache;
1854
1855 minor = ida_simple_get(&smmute_minor_ida, 0, SMMUTE_MAX_DEVICES,
1856 GFP_KERNEL);
1857 if (minor < 0) {
1858 dev_dbg(dev, "idr_alloc failed with %d\n", minor);
1859 goto err_destroy_fd_cache;
1860 }
1861
1862 smmute->chrdev = device_create(smmute_class, dev,
1863 MKDEV(smmute_major, minor), smmute,
1864 "smmute%d", minor);
1865 if (IS_ERR(smmute->chrdev)) {
1866 dev_err(dev, "unable to create char dev (%d, %d)\n",
1867 smmute_major, minor);
1868 ret = PTR_ERR(smmute->chrdev);
1869 goto err_free_minor;
1870 }
1871 smmute->minor = minor;
1872
1873 atomic64_set(&smmute->files_ida, 0);
1874 smmute->files_set = kset_create_and_add("files", NULL, &smmute->chrdev->kobj);
1875 if (!smmute->files_set)
1876 goto err_device_destroy;
1877
1878 smmute->tasks_set = kset_create_and_add("tasks", NULL, &smmute->chrdev->kobj);
1879 if (!smmute->tasks_set)
1880 goto err_release_files;
1881
1882 ret = iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_SVA);
1883 if (ret) {
1884 dev_warn(dev, "failed to initialize SVA (%d)\n", ret);
1885 } else {
1886 dev_info(dev, "enabled SVA feature\n");
1887 /* Sanity-check for the API */
> 1888 ret = iommu_dev_has_feature(dev, IOMMU_DEV_FEAT_SVA);
1889 if (!ret)
1890 dev_warn(dev, "enabled SVA feature but IOMMU reports unsupported?\n");
1891 ret = iommu_dev_feature_enabled(dev, IOMMU_DEV_FEAT_SVA);
1892 if (!ret)
1893 dev_warn(dev, "SVA feature not enabled?\n");
1894 smmute->sva = true;
1895 }
1896
1897 ret = iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_AUX);
1898 if (ret) {
1899 dev_warn(dev, "failed to initalize AUX (%d)\n", ret);
1900 } else {
1901 dev_info(dev, "enabled AUX feature\n");
1902
1903 ret = iommu_dev_has_feature(dev, IOMMU_DEV_FEAT_AUX);
1904 if (!ret)
1905 dev_warn(dev, "enabled AUX feature but IOMMU reports unsupported?\n");
1906 ret = iommu_dev_feature_enabled(dev, IOMMU_DEV_FEAT_AUX);
1907 if (!ret)
1908 dev_warn(dev, "AUX feature not enabled?\n");
1909 smmute->aux = true;
1910 }
1911
1912 ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
1913 if (ret) {
1914 dev_warn(dev, "failed to set requested DMA mask\n");
1915 ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
1916 if (ret) {
1917 dev_err(dev, "failed to set DMA mask\n");
1918 goto err_release_tasks;
1919 }
1920 }
1921
1922 ret = smmute_init_msi_pool(smmute);
1923 if (ret)
1924 goto err_release_tasks;
1925
1926 mutex_lock(&smmute_devices_mutex);
1927 list_add(&smmute->list, &smmute_devices);
1928 mutex_unlock(&smmute_devices_mutex);
1929
1930 dev_info(dev, "has %zux2 pages of %zu frames\n", smmute->nr_pairs,
1931 SMMUTE_FRAMES_PER_PAGE);
1932
1933 /* TODO: self-test */
1934
1935 return 0;
1936
1937 err_release_tasks:
1938 kset_unregister(smmute->tasks_set);
1939 err_release_files:
1940 kset_unregister(smmute->files_set);
1941 err_device_destroy:
1942 device_destroy(smmute_class, MKDEV(smmute_major, smmute->minor));
1943 err_free_minor:
1944 ida_simple_remove(&smmute_minor_ida, minor);
1945 err_destroy_fd_cache:
1946 kmem_cache_destroy(smmute->file_desc_cache);
1947 err_destroy_dma_cache:
1948 kmem_cache_destroy(smmute->dma_regions_cache);
1949 err_destroy_transaction_cache:
1950 kmem_cache_destroy(smmute->transaction_cache);
1951 err_free_frames:
1952 devm_kfree(smmute->dev, smmute->reserved_frames);
1953
1954 return ret;
1955 }
1956
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_epoll_pwait2'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1df27313f50a57497c1faeb6a6ae4ca939c85a7d
commit: b0a0c2615f6f199a656ed8549d7dce625d77aa77 epoll: wire up syscall epoll_pwait2
date: 3 months ago
config: x86_64-randconfig-r015-20210316 (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/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b0a0c2615f6f199a656ed8549d7dce625d77aa77
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:48:1: note: in expansion of macro 'COND_SYSCALL'
48 | COND_SYSCALL(io_pgetevents);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_io_uring_setup' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:51:1: note: in expansion of macro 'COND_SYSCALL'
51 | COND_SYSCALL(io_uring_setup);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_io_uring_enter' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:52:1: note: in expansion of macro 'COND_SYSCALL'
52 | COND_SYSCALL(io_uring_enter);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_io_uring_register' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:53:1: note: in expansion of macro 'COND_SYSCALL'
53 | COND_SYSCALL(io_uring_register);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_lookup_dcookie' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:60:1: note: in expansion of macro 'COND_SYSCALL'
60 | COND_SYSCALL(lookup_dcookie);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_eventfd2' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:64:1: note: in expansion of macro 'COND_SYSCALL'
64 | COND_SYSCALL(eventfd2);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_epoll_create1' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:67:1: note: in expansion of macro 'COND_SYSCALL'
67 | COND_SYSCALL(epoll_create1);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_epoll_ctl' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:68:1: note: in expansion of macro 'COND_SYSCALL'
68 | COND_SYSCALL(epoll_ctl);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_epoll_pwait' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:69:1: note: in expansion of macro 'COND_SYSCALL'
69 | COND_SYSCALL(epoll_pwait);
| ^~~~~~~~~~~~
>> arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_epoll_pwait2' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:71:1: note: in expansion of macro 'COND_SYSCALL'
71 | COND_SYSCALL(epoll_pwait2);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_inotify_init1' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:77:1: note: in expansion of macro 'COND_SYSCALL'
77 | COND_SYSCALL(inotify_init1);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_inotify_add_watch' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:78:1: note: in expansion of macro 'COND_SYSCALL'
78 | COND_SYSCALL(inotify_add_watch);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_inotify_rm_watch' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:79:1: note: in expansion of macro 'COND_SYSCALL'
79 | COND_SYSCALL(inotify_rm_watch);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_ioprio_set' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:84:1: note: in expansion of macro 'COND_SYSCALL'
84 | COND_SYSCALL(ioprio_set);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_ioprio_get' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:85:1: note: in expansion of macro 'COND_SYSCALL'
85 | COND_SYSCALL(ioprio_get);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_flock' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:88:1: note: in expansion of macro 'COND_SYSCALL'
88 | COND_SYSCALL(flock);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_quotactl' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
| ^~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL'
256 | __X64_COND_SYSCALL(name) \
| ^~~~~~~~~~~~~~~~~~
kernel/sys_ni.c:101:1: note: in expansion of macro 'COND_SYSCALL'
101 | COND_SYSCALL(quotactl);
| ^~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_signalfd4' [-Wmissing-prototypes]
83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \
| ^~
arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL'
100 | __COND_SYSCALL(x64, sys_##name)
vim +/__x64_sys_epoll_pwait2 +83 arch/x86/include/asm/syscall_wrapper.h
cc42c045af1ff4 Brian Gerst 2020-03-13 13
25c619e59b395a Brian Gerst 2020-03-13 14 /*
25c619e59b395a Brian Gerst 2020-03-13 15 * Instead of the generic __SYSCALL_DEFINEx() definition, the x86 version takes
25c619e59b395a Brian Gerst 2020-03-13 16 * struct pt_regs *regs as the only argument of the syscall stub(s) named as:
25c619e59b395a Brian Gerst 2020-03-13 17 * __x64_sys_*() - 64-bit native syscall
25c619e59b395a Brian Gerst 2020-03-13 18 * __ia32_sys_*() - 32-bit native syscall or common compat syscall
25c619e59b395a Brian Gerst 2020-03-13 19 * __ia32_compat_sys_*() - 32-bit compat syscall
25c619e59b395a Brian Gerst 2020-03-13 20 * __x32_compat_sys_*() - 64-bit X32 compat syscall
25c619e59b395a Brian Gerst 2020-03-13 21 *
25c619e59b395a Brian Gerst 2020-03-13 22 * The registers are decoded according to the ABI:
25c619e59b395a Brian Gerst 2020-03-13 23 * 64-bit: RDI, RSI, RDX, R10, R8, R9
25c619e59b395a Brian Gerst 2020-03-13 24 * 32-bit: EBX, ECX, EDX, ESI, EDI, EBP
25c619e59b395a Brian Gerst 2020-03-13 25 *
25c619e59b395a Brian Gerst 2020-03-13 26 * The stub then passes the decoded arguments to the __se_sys_*() wrapper to
25c619e59b395a Brian Gerst 2020-03-13 27 * perform sign-extension (omitted for zero-argument syscalls). Finally the
25c619e59b395a Brian Gerst 2020-03-13 28 * arguments are passed to the __do_sys_*() function which is the actual
25c619e59b395a Brian Gerst 2020-03-13 29 * syscall. These wrappers are marked as inline so the compiler can optimize
25c619e59b395a Brian Gerst 2020-03-13 30 * the functions where appropriate.
25c619e59b395a Brian Gerst 2020-03-13 31 *
25c619e59b395a Brian Gerst 2020-03-13 32 * Example assembly (slightly re-ordered for better readability):
25c619e59b395a Brian Gerst 2020-03-13 33 *
25c619e59b395a Brian Gerst 2020-03-13 34 * <__x64_sys_recv>: <-- syscall with 4 parameters
25c619e59b395a Brian Gerst 2020-03-13 35 * callq <__fentry__>
25c619e59b395a Brian Gerst 2020-03-13 36 *
25c619e59b395a Brian Gerst 2020-03-13 37 * mov 0x70(%rdi),%rdi <-- decode regs->di
25c619e59b395a Brian Gerst 2020-03-13 38 * mov 0x68(%rdi),%rsi <-- decode regs->si
25c619e59b395a Brian Gerst 2020-03-13 39 * mov 0x60(%rdi),%rdx <-- decode regs->dx
25c619e59b395a Brian Gerst 2020-03-13 40 * mov 0x38(%rdi),%rcx <-- decode regs->r10
25c619e59b395a Brian Gerst 2020-03-13 41 *
25c619e59b395a Brian Gerst 2020-03-13 42 * xor %r9d,%r9d <-- clear %r9
25c619e59b395a Brian Gerst 2020-03-13 43 * xor %r8d,%r8d <-- clear %r8
25c619e59b395a Brian Gerst 2020-03-13 44 *
25c619e59b395a Brian Gerst 2020-03-13 45 * callq __sys_recvfrom <-- do the actual work in __sys_recvfrom()
25c619e59b395a Brian Gerst 2020-03-13 46 * which takes 6 arguments
25c619e59b395a Brian Gerst 2020-03-13 47 *
25c619e59b395a Brian Gerst 2020-03-13 48 * cltq <-- extend return value to 64-bit
25c619e59b395a Brian Gerst 2020-03-13 49 * retq <-- return
25c619e59b395a Brian Gerst 2020-03-13 50 *
25c619e59b395a Brian Gerst 2020-03-13 51 * This approach avoids leaking random user-provided register content down
25c619e59b395a Brian Gerst 2020-03-13 52 * the call chain.
25c619e59b395a Brian Gerst 2020-03-13 53 */
25c619e59b395a Brian Gerst 2020-03-13 54
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 55 /* Mapping of registers to parameters for syscalls on x86-64 and x32 */
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 56 #define SC_X86_64_REGS_TO_ARGS(x, ...) \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 57 __MAP(x,__SC_ARGS \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 58 ,,regs->di,,regs->si,,regs->dx \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 59 ,,regs->r10,,regs->r8,,regs->r9) \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 60
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 61 /* Mapping of registers to parameters for syscalls on i386 */
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 62 #define SC_IA32_REGS_TO_ARGS(x, ...) \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 63 __MAP(x,__SC_ARGS \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 64 ,,(unsigned int)regs->bx,,(unsigned int)regs->cx \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 65 ,,(unsigned int)regs->dx,,(unsigned int)regs->si \
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 66 ,,(unsigned int)regs->di,,(unsigned int)regs->bp)
ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 67
d2b5de495ee983 Brian Gerst 2020-03-13 68 #define __SYS_STUB0(abi, name) \
0f78ff17112d8b Brian Gerst 2020-03-13 69 long __##abi##_##name(const struct pt_regs *regs); \
d2b5de495ee983 Brian Gerst 2020-03-13 70 ALLOW_ERROR_INJECTION(__##abi##_##name, ERRNO); \
0f78ff17112d8b Brian Gerst 2020-03-13 71 long __##abi##_##name(const struct pt_regs *regs) \
d2b5de495ee983 Brian Gerst 2020-03-13 72 __alias(__do_##name);
d2b5de495ee983 Brian Gerst 2020-03-13 73
4399e0cf494f73 Brian Gerst 2020-03-13 74 #define __SYS_STUBx(abi, name, ...) \
0f78ff17112d8b Brian Gerst 2020-03-13 75 long __##abi##_##name(const struct pt_regs *regs); \
4399e0cf494f73 Brian Gerst 2020-03-13 76 ALLOW_ERROR_INJECTION(__##abi##_##name, ERRNO); \
0f78ff17112d8b Brian Gerst 2020-03-13 77 long __##abi##_##name(const struct pt_regs *regs) \
4399e0cf494f73 Brian Gerst 2020-03-13 78 { \
4399e0cf494f73 Brian Gerst 2020-03-13 79 return __se_##name(__VA_ARGS__); \
4399e0cf494f73 Brian Gerst 2020-03-13 80 }
4399e0cf494f73 Brian Gerst 2020-03-13 81
6cc8d2b286d9e7 Brian Gerst 2020-03-13 82 #define __COND_SYSCALL(abi, name) \
0f78ff17112d8b Brian Gerst 2020-03-13 @83 __weak long __##abi##_##name(const struct pt_regs *__unused) \
6cc8d2b286d9e7 Brian Gerst 2020-03-13 84 { \
6cc8d2b286d9e7 Brian Gerst 2020-03-13 85 return sys_ni_syscall(); \
6cc8d2b286d9e7 Brian Gerst 2020-03-13 86 }
6cc8d2b286d9e7 Brian Gerst 2020-03-13 87
:::::: The code at line 83 was first introduced by commit
:::::: 0f78ff17112d8b3469b805ff4ea9780cc1e5c93b x86/entry: Drop asmlinkage from syscalls
:::::: TO: Brian Gerst <brgerst(a)gmail.com>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months