[peterz-queue:modules/WIP 22/23] kernel/module.c:1033: undefined reference to `ftrace_module_release'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git modules/WIP
head: d4334fbbfc2d716f1e9f8002d51c40a681f047ba
commit: 1a3729608e2468f1f559b7584281e4fe07e9c3ee [22/23] ftrace: Merge ftrace_module_{init,enable}()
config: s390-randconfig-s002-20200519 (attached as .config)
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 1a3729608e2468f1f559b7584281e4fe07e9c3ee
# save the attached .config to linux build tree
make C=1 ARCH=s390 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
s390-linux-ld: kernel/module.o: in function `__do_sys_delete_module':
>> kernel/module.c:1033: undefined reference to `ftrace_module_release'
>> s390-linux-ld: kernel/module.c:1033: undefined reference to `ftrace_module_release'
s390-linux-ld: kernel/module.o: in function `do_init_module':
kernel/module.c:3641: undefined reference to `ftrace_module_release'
s390-linux-ld: kernel/module.o: in function `load_module':
kernel/module.c:3936: undefined reference to `ftrace_module_release'
vim +1033 kernel/module.c
969
970 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
971 unsigned int, flags)
972 {
973 struct module *mod;
974 char name[MODULE_NAME_LEN];
975 int ret, forced = 0;
976
977 if (!capable(CAP_SYS_MODULE) || modules_disabled)
978 return -EPERM;
979
980 if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
981 return -EFAULT;
982 name[MODULE_NAME_LEN-1] = '\0';
983
984 audit_log_kern_module(name);
985
986 if (mutex_lock_interruptible(&module_mutex) != 0)
987 return -EINTR;
988
989 mod = find_module(name);
990 if (!mod) {
991 ret = -ENOENT;
992 goto out;
993 }
994
995 if (!list_empty(&mod->source_list)) {
996 /* Other modules depend on us: get rid of them first. */
997 ret = -EWOULDBLOCK;
998 goto out;
999 }
1000
1001 /* Doing init or already dying? */
1002 if (mod->state != MODULE_STATE_LIVE) {
1003 /* FIXME: if (force), slam module count damn the torpedoes */
1004 pr_debug("%s already dying\n", mod->name);
1005 ret = -EBUSY;
1006 goto out;
1007 }
1008
1009 /* If it has an init func, it must have an exit func to unload */
1010 if (mod->init && !mod->exit) {
1011 forced = try_force_unload(flags);
1012 if (!forced) {
1013 /* This module can't be removed */
1014 ret = -EBUSY;
1015 goto out;
1016 }
1017 }
1018
1019 /* Stop the machine so refcounts can't move and disable module. */
1020 ret = try_stop_module(mod, flags, &forced);
1021 if (ret != 0)
1022 goto out;
1023
1024 mutex_unlock(&module_mutex);
1025 /* Final destruction now no one is using it. */
1026 if (mod->exit != NULL)
1027 mod->exit();
1028 blocking_notifier_call_chain(&module_notify_list,
1029 MODULE_STATE_GOING, mod);
1030 klp_module_going(mod);
1031 blocking_notifier_call_chain(&module_notify_list,
1032 MODULE_STATE_GONE, mod);
> 1033 ftrace_module_release(mod);
1034
1035 async_synchronize_full();
1036
1037 /* Store the name of the last unloaded module for diagnostic purposes */
1038 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
1039
1040 free_module(mod);
1041 /* someone could wait for the module in add_unformed_module() */
1042 wake_up_all(&module_wq);
1043 return 0;
1044 out:
1045 mutex_unlock(&module_mutex);
1046 return ret;
1047 }
1048
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 3410/10701] drivers/scsi/storvsc_drv.c:624:6: warning: no previous prototype for 'storvsc_change_target_cpu'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6 [3410/10701] scsi: storvsc: Re-init stor_chns when a channel interrupt is re-assigned
config: i386-randconfig-r015-20200519 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/scsi/storvsc_drv.c:624:6: warning: no previous prototype for 'storvsc_change_target_cpu' [-Wmissing-prototypes]
void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/storvsc_change_target_cpu +624 drivers/scsi/storvsc_drv.c
623
> 624 void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
625 {
626 struct storvsc_device *stor_device;
627 struct vmbus_channel *cur_chn;
628 bool old_is_alloced = false;
629 struct hv_device *device;
630 unsigned long flags;
631 int cpu;
632
633 device = channel->primary_channel ?
634 channel->primary_channel->device_obj
635 : channel->device_obj;
636 stor_device = get_out_stor_device(device);
637 if (!stor_device)
638 return;
639
640 /* See storvsc_do_io() -> get_og_chn(). */
641 spin_lock_irqsave(&device->channel->lock, flags);
642
643 /*
644 * Determines if the storvsc device has other channels assigned to
645 * the "old" CPU to update the alloced_cpus mask and the stor_chns
646 * array.
647 */
648 if (device->channel != channel && device->channel->target_cpu == old) {
649 cur_chn = device->channel;
650 old_is_alloced = true;
651 goto old_is_alloced;
652 }
653 list_for_each_entry(cur_chn, &device->channel->sc_list, sc_list) {
654 if (cur_chn == channel)
655 continue;
656 if (cur_chn->target_cpu == old) {
657 old_is_alloced = true;
658 goto old_is_alloced;
659 }
660 }
661
662 old_is_alloced:
663 if (old_is_alloced)
664 WRITE_ONCE(stor_device->stor_chns[old], cur_chn);
665 else
666 cpumask_clear_cpu(old, &stor_device->alloced_cpus);
667
668 /* "Flush" the stor_chns array. */
669 for_each_possible_cpu(cpu) {
670 if (stor_device->stor_chns[cpu] && !cpumask_test_cpu(
671 cpu, &stor_device->alloced_cpus))
672 WRITE_ONCE(stor_device->stor_chns[cpu], NULL);
673 }
674
675 WRITE_ONCE(stor_device->stor_chns[new], channel);
676 cpumask_set_cpu(new, &stor_device->alloced_cpus);
677
678 spin_unlock_irqrestore(&device->channel->lock, flags);
679 }
680
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH 1/2] ext4: mballoc - prefetching for bitmaps
by kbuild test robot
Hi Alex,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on ext4/dev]
[also build test WARNING on v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Alex-Zhuravlev/ext4-mballoc-pref...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: microblaze-randconfig-r024-20200519 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 9.3.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
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from fs/ext4/ext4_jbd2.h:15,
from fs/ext4/mballoc.c:12:
fs/ext4/mballoc.c: In function 'ext4_mb_prefetch':
fs/ext4/mballoc.c:2137:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2137 | BUG_ON(nr < 0);
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> include/asm-generic/bug.h:62:32: note: in expansion of macro 'if'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:62:36: note: in expansion of macro 'unlikely'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~~~~~~
fs/ext4/mballoc.c:2137:2: note: in expansion of macro 'BUG_ON'
2137 | BUG_ON(nr < 0);
| ^~~~~~
fs/ext4/mballoc.c:2137:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2137 | BUG_ON(nr < 0);
| ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> include/asm-generic/bug.h:62:32: note: in expansion of macro 'if'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:62:36: note: in expansion of macro 'unlikely'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~~~~~~
fs/ext4/mballoc.c:2137:2: note: in expansion of macro 'BUG_ON'
2137 | BUG_ON(nr < 0);
| ^~~~~~
fs/ext4/mballoc.c:2137:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2137 | BUG_ON(nr < 0);
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> include/asm-generic/bug.h:62:32: note: in expansion of macro 'if'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:62:36: note: in expansion of macro 'unlikely'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~~~~~~
fs/ext4/mballoc.c:2137:2: note: in expansion of macro 'BUG_ON'
2137 | BUG_ON(nr < 0);
| ^~~~~~
fs/ext4/mballoc.c:2137:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2137 | BUG_ON(nr < 0);
| ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
| ^~~~
>> include/asm-generic/bug.h:62:32: note: in expansion of macro 'if'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:62:36: note: in expansion of macro 'unlikely'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~~~~~~
fs/ext4/mballoc.c:2137:2: note: in expansion of macro 'BUG_ON'
2137 | BUG_ON(nr < 0);
| ^~~~~~
fs/ext4/mballoc.c:2137:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2137 | BUG_ON(nr < 0);
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
>> include/asm-generic/bug.h:62:32: note: in expansion of macro 'if'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:62:36: note: in expansion of macro 'unlikely'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~~~~~~
fs/ext4/mballoc.c:2137:2: note: in expansion of macro 'BUG_ON'
2137 | BUG_ON(nr < 0);
| ^~~~~~
fs/ext4/mballoc.c:2137:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
2137 | BUG_ON(nr < 0);
| ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) ? | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
>> include/asm-generic/bug.h:62:32: note: in expansion of macro 'if'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
48 | # define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:62:36: note: in expansion of macro 'unlikely'
62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
| ^~~~~~~~
fs/ext4/mballoc.c:2137:2: note: in expansion of macro 'BUG_ON'
2137 | BUG_ON(nr < 0);
| ^~~~~~
vim +/if +62 include/asm-generic/bug.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 60
^1da177e4c3f41 Linus Torvalds 2005-04-16 61 #ifndef HAVE_ARCH_BUG_ON
2a41de48b81e61 Alexey Dobriyan 2007-07-17 @62 #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 63 #endif
^1da177e4c3f41 Linus Torvalds 2005-04-16 64
:::::: The code at line 62 was first introduced by commit
:::::: 2a41de48b81e61fbe260ae5031ebcb6f935f35fb Fix sparse false positives re BUG_ON(ptr)
:::::: TO: Alexey Dobriyan <adobriyan(a)sw.ru>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCHv2 4/5] Input: EXC3000: Add support to query model and fw_version
by kbuild test robot
Hi Sebastian,
I love your patch! Yet something to improve:
[auto build test ERROR on input/next]
[also build test ERROR on v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sebastian-Reichel/EXC3000-Update...
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: ia64-randconfig-r023-20200519 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.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
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: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/kobject.h:20,
from include/linux/device.h:17,
from drivers/input/touchscreen/exc3000.c:11:
>> drivers/input/touchscreen/exc3000.c:252:23: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, char *)' {aka 'long int (*)(struct device *, struct device_attribute *, char *)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, char *)' [-Werror=incompatible-pointer-types]
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
117 | .show = _name##_show, | ^~~~~
>> drivers/input/touchscreen/exc3000.c:252:8: note: in expansion of macro 'DEVICE_ATTR_RO'
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~~~~~
drivers/input/touchscreen/exc3000.c:252:23: note: (near initialization for 'dev_attr_fw_version.show')
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
117 | .show = _name##_show, | ^~~~~
>> drivers/input/touchscreen/exc3000.c:252:8: note: in expansion of macro 'DEVICE_ATTR_RO'
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +252 drivers/input/touchscreen/exc3000.c
222
223 static int fw_version_show(struct device *dev,
224 struct device_attribute *attr, char *buf)
225 {
226 struct exc3000_data *data = dev_get_drvdata(dev);
227 static const u8 request[68] = {
228 0x67, 0x00, 0x42, 0x00, 0x03, 0x01, 'D', 0x00
229 };
230 struct i2c_client *client = data->client;
231 int err;
232
233 mutex_lock(&data->query_lock);
234
235 data->query_result = -ETIMEDOUT;
236 reinit_completion(&data->wait_event);
237
238 err = i2c_master_send(client, request, sizeof(request));
239 if (err < 0) {
240 mutex_unlock(&data->query_lock);
241 return err;
242 }
243
244 wait_for_completion_interruptible_timeout(&data->wait_event, 1*HZ);
245 mutex_unlock(&data->query_lock);
246
247 if (data->query_result < 0)
248 return data->query_result;
249
250 return sprintf(buf, "%s\n", data->fw_version);
251 }
> 252 static DEVICE_ATTR_RO(fw_version);
253
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH v3 1/2] x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()
by kbuild test robot
Hi Dan,
I love your patch! Yet something to improve:
[auto build test ERROR on bba413deb1065f1291cb1f366247513f11215520]
url: https://github.com/0day-ci/linux/commits/Dan-Williams/Renovate-memcpy_mcs...
base: bba413deb1065f1291cb1f366247513f11215520
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
arch/x86/kernel/quirks.c: In function 'quirk_intel_brickland_xeon_ras_cap':
>> arch/x86/kernel/quirks.c:635:3: error: implicit declaration of function 'enable_copy_mc_fragile' [-Werror=implicit-function-declaration]
enable_copy_mc_fragile();
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
arch/x86/kernel/cpu/mce/core.c: In function 'mcheck_late_init':
>> arch/x86/kernel/cpu/mce/core.c:2595:3: error: implicit declaration of function 'enable_copy_mc_fragile'; did you mean 'enable_p5_mce'? [-Werror=implicit-function-declaration]
enable_copy_mc_fragile();
^~~~~~~~~~~~~~~~~~~~~~
enable_p5_mce
cc1: some warnings being treated as errors
vim +/enable_copy_mc_fragile +635 arch/x86/kernel/quirks.c
623
624 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3,
625 amd_disable_seq_and_redirect_scrub);
626
627 /* Ivy Bridge, Haswell, Broadwell */
628 static void quirk_intel_brickland_xeon_ras_cap(struct pci_dev *pdev)
629 {
630 u32 capid0;
631
632 pci_read_config_dword(pdev, 0x84, &capid0);
633
634 if (capid0 & 0x10)
> 635 enable_copy_mc_fragile();
636 }
637
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 7901/10701] drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: 49e649c3e0a6ec8a12976e331a2c1f29dc7dd3a9 [7901/10701] mt76: adjust wcid size to support new 802.11ax generation
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
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
git checkout 49e649c3e0a6ec8a12976e331a2c1f29dc7dd3a9
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/net/wireless/mediatek/mt76/mt76x02_util.c:8:
>> drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
--
In file included from drivers/net/wireless/mediatek/mt76/mt76x02_mac.c:7:
>> drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt76x02_mac.c:564:17: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare]
if (stat->wcid < ARRAY_SIZE(dev->mt76.wcid))
~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
--
In file included from drivers/net/wireless/mediatek/mt76/mt76x02_trace.c:10:
In file included from drivers/net/wireless/mediatek/mt76/mt76x02_trace.h:10:
>> drivers/net/wireless/mediatek/mt76/mt76x02.h:249:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/wireless/mediatek/mt76/mt76x02_trace.c:10:
In file included from drivers/net/wireless/mediatek/mt76/mt76x02_trace.h:87:
include/trace/define_trace.h:95:10: fatal error: './mt76x02_trace.h' file not found
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/trace/define_trace.h:90:32: note: expanded from macro 'TRACE_INCLUDE'
# define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)
^~~~~~~~~~~~~~~~~~~~~~~
include/trace/define_trace.h:87:34: note: expanded from macro '__TRACE_INCLUDE'
# define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/stringify.h:10:27: note: expanded from macro '__stringify'
#define __stringify(x...) __stringify_1(x)
^~~~~~~~~~~~~~~~
include/linux/stringify.h:9:29: note: expanded from macro '__stringify_1'
#define __stringify_1(x...) #x
^~
<scratch space>:15:1: note: expanded from here
"./mt76x02_trace.h"
^~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/net/wireless/mediatek/mt76/mt76x0/usb.c:10:
In file included from drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0.h:20:
>> drivers/net/wireless/mediatek/mt76/mt76x0/../mt76x02.h:249:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
--
In file included from drivers/net/wireless/mediatek/mt76/mt76x2/eeprom.c:9:
In file included from drivers/net/wireless/mediatek/mt76/mt76x2/mt76x2.h:23:
>> drivers/net/wireless/mediatek/mt76/mt76x2/../mt76x02.h:249:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
--
>> drivers/net/wireless/mediatek/mt76/mt7603/mac.c:476:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->mt76.wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7603/mac.c:1241:12: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (wcidx >= ARRAY_SIZE(dev->mt76.wcid))
~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
--
>> drivers/net/wireless/mediatek/mt76/mt7615/mac.c:64:10: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (idx >= ARRAY_SIZE(dev->mt76.wcid))
~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7615/mac.c:1305:12: warning: result of comparison of constant 288 with expression of type 'u8' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare]
if (wcidx >= ARRAY_SIZE(dev->mt76.wcid))
~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +249 drivers/net/wireless/mediatek/mt76/mt76x02.h
713224164b5dfb drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-09-28 243
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 244 static inline struct mt76x02_sta *
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 245 mt76x02_rx_get_sta(struct mt76_dev *dev, u8 idx)
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 246 {
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 247 struct mt76_wcid *wcid;
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 248
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 @249 if (idx >= ARRAY_SIZE(dev->wcid))
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 250 return NULL;
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 251
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 252 wcid = rcu_dereference(dev->wcid[idx]);
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 253 if (!wcid)
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 254 return NULL;
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 255
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 256 return container_of(wcid, struct mt76x02_sta, wcid);
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 257 }
56e8d4dd5ce24c drivers/net/wireless/mediatek/mt76/mt76x02_util.h Lorenzo Bianconi 2018-10-04 258
:::::: The code at line 249 was first introduced by commit
:::::: 56e8d4dd5ce24cf534114c67de33861e86501981 mt76: move mt76x02_rx_get_sta and mt76x02_rx_get_sta_wcid in mt76x02_util.h
:::::: TO: Lorenzo Bianconi <lorenzo.bianconi(a)redhat.com>
:::::: CC: Felix Fietkau <nbd(a)nbd.name>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-review:UPDATE-20200520-051842/Emil-Velikov/linux-bits-h-adjust-GENMASK_INPUT_CHECK-check/20200519-205539 1/1] drivers/video/fbdev/sis/init.c:3366:4: error: anonymous bit-field has negative width (-1)
by kbuild test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200520-051842/Emil-Veli...
head: 0ae605b3f9c51e182b11da825f5fa8948bc88af9
commit: 0ae605b3f9c51e182b11da825f5fa8948bc88af9 [1/1] linux/bits.h: adjust GENMASK_INPUT_CHECK() check
config: powerpc-randconfig-r015-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout 0ae605b3f9c51e182b11da825f5fa8948bc88af9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from drivers/video/fbdev/sis/init.c:59:
In file included from drivers/video/fbdev/sis/init.h:64:
In file included from arch/powerpc/include/asm/io.h:27:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:12:
In file included from arch/powerpc/include/asm/current.h:13:
In file included from arch/powerpc/include/asm/paca.h:17:
In file included from arch/powerpc/include/asm/lppaca.h:45:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:43:
In file included from include/linux/list.h:9:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:29:
In file included from arch/powerpc/include/asm/bitops.h:250:
In file included from include/asm-generic/bitops/le.h:6:
In file included from arch/powerpc/include/uapi/asm/byteorder.h:14:
include/linux/byteorder/big_endian.h:8:2: warning: inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN [-W#warnings]
#warning inconsistent configuration, needs CONFIG_CPU_BIG_ENDIAN
^
>> drivers/video/fbdev/sis/init.c:3366:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVTotal -2), 10:10, 0:0) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to) ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask) (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask) GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3367:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVDisplay -1), 10:10, 1:1) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to) ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask) (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask) GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3368:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVBlankStart-1), 10:10, 2:2) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to) ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask) (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask) GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3369:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVSyncStart -x), 10:10, 3:3) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to) ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask) (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask) GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( ^
include/linux/build_bug.h:16:53: note: expanded from macro 'BUILD_BUG_ON_ZERO'
#define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
^
drivers/video/fbdev/sis/init.c:3370:4: error: anonymous bit-field has negative width (-1)
GETBITSTR((SiS_Pr->CVBlankEnd -1), 8:8, 4:4) |
^
drivers/video/fbdev/sis/init.c:3326:35: note: expanded from macro 'GETBITSTR'
#define GETBITSTR(val,from,to) ((GETBITS(val,from)) << (0?to))
^
drivers/video/fbdev/sis/init.c:3325:40: note: expanded from macro 'GETBITS'
#define GETBITS(var,mask) (((var) & GENBITSMASK(mask)) >> (0?mask))
^
drivers/video/fbdev/sis/init.c:3324:30: note: expanded from macro 'GENBITSMASK'
#define GENBITSMASK(mask) GENMASK(1?mask,0?mask)
^
include/linux/bits.h:39:3: note: expanded from macro 'GENMASK'
(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
^
include/linux/bits.h:25:3: note: expanded from macro 'GENMASK_INPUT_CHECK'
vim +3366 drivers/video/fbdev/sis/init.c
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3328
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3329 void
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3330 SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3331 {
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3332 int x = 1; /* Fix sync */
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3333
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3334 SiS_Pr->CCRT1CRTC[0] = ((SiS_Pr->CHTotal >> 3) - 5) & 0xff; /* CR0 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3335 SiS_Pr->CCRT1CRTC[1] = (SiS_Pr->CHDisplay >> 3) - 1; /* CR1 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3336 SiS_Pr->CCRT1CRTC[2] = (SiS_Pr->CHBlankStart >> 3) - 1; /* CR2 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3337 SiS_Pr->CCRT1CRTC[3] = (((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x1F) | 0x80; /* CR3 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3338 SiS_Pr->CCRT1CRTC[4] = (SiS_Pr->CHSyncStart >> 3) + 3; /* CR4 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3339 SiS_Pr->CCRT1CRTC[5] = ((((SiS_Pr->CHBlankEnd >> 3) - 1) & 0x20) << 2) | /* CR5 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3340 (((SiS_Pr->CHSyncEnd >> 3) + 3) & 0x1F);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3341
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3342 SiS_Pr->CCRT1CRTC[6] = (SiS_Pr->CVTotal - 2) & 0xFF; /* CR6 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3343 SiS_Pr->CCRT1CRTC[7] = (((SiS_Pr->CVTotal - 2) & 0x100) >> 8) /* CR7 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3344 | (((SiS_Pr->CVDisplay - 1) & 0x100) >> 7)
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3345 | (((SiS_Pr->CVSyncStart - x) & 0x100) >> 6)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3346 | (((SiS_Pr->CVBlankStart- 1) & 0x100) >> 5)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3347 | 0x10
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3348 | (((SiS_Pr->CVTotal - 2) & 0x200) >> 4)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3349 | (((SiS_Pr->CVDisplay - 1) & 0x200) >> 3)
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3350 | (((SiS_Pr->CVSyncStart - x) & 0x200) >> 2);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3351
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3352 SiS_Pr->CCRT1CRTC[16] = ((((SiS_Pr->CVBlankStart - 1) & 0x200) >> 4) >> 5); /* CR9 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3353
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3354 if(depth != 8) {
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3355 if(SiS_Pr->CHDisplay >= 1600) SiS_Pr->CCRT1CRTC[16] |= 0x60; /* SRE */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3356 else if(SiS_Pr->CHDisplay >= 640) SiS_Pr->CCRT1CRTC[16] |= 0x40;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3357 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3358
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3359 SiS_Pr->CCRT1CRTC[8] = (SiS_Pr->CVSyncStart - x) & 0xFF; /* CR10 */
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3360 SiS_Pr->CCRT1CRTC[9] = ((SiS_Pr->CVSyncEnd - x) & 0x0F) | 0x80; /* CR11 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3361 SiS_Pr->CCRT1CRTC[10] = (SiS_Pr->CVDisplay - 1) & 0xFF; /* CR12 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3362 SiS_Pr->CCRT1CRTC[11] = (SiS_Pr->CVBlankStart - 1) & 0xFF; /* CR15 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3363 SiS_Pr->CCRT1CRTC[12] = (SiS_Pr->CVBlankEnd - 1) & 0xFF; /* CR16 */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3364
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3365 SiS_Pr->CCRT1CRTC[13] = /* SRA */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 @3366 GETBITSTR((SiS_Pr->CVTotal -2), 10:10, 0:0) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3367 GETBITSTR((SiS_Pr->CVDisplay -1), 10:10, 1:1) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3368 GETBITSTR((SiS_Pr->CVBlankStart-1), 10:10, 2:2) |
544393fe584d33 drivers/video/sis/init.c Thomas Winischhofer 2005-09-09 3369 GETBITSTR((SiS_Pr->CVSyncStart -x), 10:10, 3:3) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3370 GETBITSTR((SiS_Pr->CVBlankEnd -1), 8:8, 4:4) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3371 GETBITSTR((SiS_Pr->CVSyncEnd ), 4:4, 5:5) ;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3372
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3373 SiS_Pr->CCRT1CRTC[14] = /* SRB */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3374 GETBITSTR((SiS_Pr->CHTotal >> 3) - 5, 9:8, 1:0) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3375 GETBITSTR((SiS_Pr->CHDisplay >> 3) - 1, 9:8, 3:2) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3376 GETBITSTR((SiS_Pr->CHBlankStart >> 3) - 1, 9:8, 5:4) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3377 GETBITSTR((SiS_Pr->CHSyncStart >> 3) + 3, 9:8, 7:6) ;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3378
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3379
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3380 SiS_Pr->CCRT1CRTC[15] = /* SRC */
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3381 GETBITSTR((SiS_Pr->CHBlankEnd >> 3) - 1, 7:6, 1:0) |
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3382 GETBITSTR((SiS_Pr->CHSyncEnd >> 3) + 3, 5:5, 2:2) ;
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3383 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 3384
:::::: The code at line 3366 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[hnaz-linux-mm:master 156/523] include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
by kbuild test robot
tree: https://github.com/hnaz/linux-mm master
head: 2bbf0589bfeb27800c730b76eacf34528eee5418
commit: 854834b3859d2d80e31750f658bc8e4031422912 [156/523] string.h: fix incompatibility between FORTIFY_SOURCE and KASAN
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 854834b3859d2d80e31750f658bc8e4031422912
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_remap_pciregion':
drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable 'flags' set but not used [-Wunused-but-set-variable]
286 | unsigned long addr, range, flags;
| ^~~~~
drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_suspend':
drivers/scsi/arcmsr/arcmsr_hba.c:1070:11: warning: variable 'intmask_org' set but not used [-Wunused-but-set-variable]
1070 | uint32_t intmask_org;
| ^~~~~~~~~~~
drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_done4abort_postqueue':
drivers/scsi/arcmsr/arcmsr_hba.c:1410:29: warning: variable 'cdb_phy_hipart' set but not used [-Wunused-but-set-variable]
1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart;
| ^~~~~~~~~~~~~~
drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_hbaD_postqueue_isr':
drivers/scsi/arcmsr/arcmsr_hba.c:2448:36: warning: variable 'cdb_phy_hipart' set but not used [-Wunused-but-set-variable]
2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
| ^~~~~~~~~~~~~~
drivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_hbaD_polling_ccbdone':
drivers/scsi/arcmsr/arcmsr_hba.c:3498:36: warning: variable 'cdb_phy_hipart' set but not used [-Wunused-but-set-variable]
3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart;
| ^~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:9,
from include/linux/nodemask.h:95,
from include/linux/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/arcmsr/arcmsr_hba.c:47:
In function 'strncpy',
inlined from 'arcmsr_handle_virtual_command' at drivers/scsi/arcmsr/arcmsr_hba.c:3059:3:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'arcmsr_handle_virtual_command' at drivers/scsi/arcmsr/arcmsr_hba.c:3057:3:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'arcmsr_handle_virtual_command' at drivers/scsi/arcmsr/arcmsr_hba.c:3055:3:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bitmap.h:9,
from include/linux/nodemask.h:95,
from include/linux/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from drivers/scsi/pm8001/pm8001_sas.c:41:
In function 'strncpy',
inlined from 'pm8001_issue_ssp_tmf' at drivers/scsi/pm8001/pm8001_sas.c:919:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
--
drivers/scsi/ips.c: In function 'ips_init_copperhead':
drivers/scsi/ips.c:4700:10: warning: variable 'ConfigByte' set but not used [-Wunused-but-set-variable]
4700 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES];
| ^~~~~~~~~~
drivers/scsi/ips.c: In function 'ips_init_copperhead_memio':
drivers/scsi/ips.c:4794:10: warning: variable 'ConfigByte' set but not used [-Wunused-but-set-variable]
4794 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES];
| ^~~~~~~~~~
drivers/scsi/ips.c: In function 'ips_init_phase1':
drivers/scsi/ips.c:6839:10: warning: variable 'func' set but not used [-Wunused-but-set-variable]
6839 | uint8_t func;
| ^~~~
drivers/scsi/ips.c:6838:10: warning: variable 'bus' set but not used [-Wunused-but-set-variable]
6838 | uint8_t bus;
| ^~~
In file included from arch/arm/include/asm/io.h:23,
from drivers/scsi/ips.c:164:
In function 'strncpy',
inlined from 'ips_send_cmd' at drivers/scsi/ips.c:3522:6:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_send_cmd' at drivers/scsi/ips.c:3520:6:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_send_cmd' at drivers/scsi/ips.c:3518:6:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_inquiry' at drivers/scsi/ips.c:4041:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_inquiry' at drivers/scsi/ips.c:4040:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 16 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_inquiry' at drivers/scsi/ips.c:4039:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_get_bios_version' at drivers/scsi/ips.c:2242:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_write_driver_status' at drivers/scsi/ips.c:5626:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_write_driver_status' at drivers/scsi/ips.c:5625:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_write_driver_status' at drivers/scsi/ips.c:5627:2,
inlined from 'ips_hainit' at drivers/scsi/ips.c:2433:7:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output may be truncated copying 4 bytes from a string of length 7 [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'ips_write_driver_status' at drivers/scsi/ips.c:5628:2,
inlined from 'ips_hainit' at drivers/scsi/ips.c:2433:7:
include/linux/string.h:297:30: warning: '__builtin_strncpy' specified bound 4 equals destination size [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
--
drivers/scsi/3w-sas.c: In function 'twl_scsiop_execute_scsi':
drivers/scsi/3w-sas.c:298:22: warning: variable 'sglist' set but not used [-Wunused-but-set-variable]
298 | struct scatterlist *sglist = NULL, *sg;
| ^~~~~~
drivers/scsi/3w-sas.c: In function 'twl_scsi_biosparam':
drivers/scsi/3w-sas.c:1411:23: warning: variable 'tw_dev' set but not used [-Wunused-but-set-variable]
1411 | TW_Device_Extension *tw_dev;
| ^~~~~~
In file included from include/linux/bitmap.h:9,
from include/linux/nodemask.h:95,
from include/linux/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/scsi/3w-sas.c:53:
In function 'strncpy',
inlined from 'twl_reset_sequence' at drivers/scsi/3w-sas.c:1331:3:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying 11 bytes from a string of the same length [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bitmap.h:9,
from include/linux/nodemask.h:95,
from include/linux/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/crypto.h:19,
from include/crypto/hash.h:11,
from include/linux/uio.h:10,
from include/linux/socket.h:8,
from include/uapi/linux/if.h:25,
from include/scsi/libfc.h:12,
from drivers/scsi/libfc/fc_elsct.c:17:
In function 'strncpy',
inlined from 'fc_ct_ms_fill.constprop' at include/scsi/fc_encode.h:263:3:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'fc_ct_ms_fill.constprop' at include/scsi/fc_encode.h:275:3:
include/linux/string.h:297:30: warning: '__builtin_strncpy' output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
>> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
vim +/__underlying_strncpy +307 include/linux/string.h
299
300 __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
301 {
302 size_t p_size = __builtin_object_size(p, 0);
303 if (__builtin_constant_p(size) && p_size < size)
304 __write_overflow();
305 if (p_size < size)
306 fortify_panic(__func__);
> 307 return __underlying_strncpy(p, q, size);
308 }
309
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[tip:x86/entry 23/80] arch/x86/entry/common.c:234:24: warning: no previous prototype for function 'prepare_exit_to_usermode'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/entry
head: 095b7a3e7745e6fb7cf0a1c09967c4f43e76f8f4
commit: aa9712e07f82a5458f2f16c100c491d736240d60 [23/80] x86/entry/common: Protect against instrumentation
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
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
git checkout aa9712e07f82a5458f2f16c100c491d736240d60
# 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: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> arch/x86/entry/common.c:234:24: warning: no previous prototype for function 'prepare_exit_to_usermode' [-Wmissing-prototypes]
__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
^
arch/x86/entry/common.c:234:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
^
static
>> arch/x86/entry/common.c:296:24: warning: no previous prototype for function 'syscall_return_slowpath' [-Wmissing-prototypes]
__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
^
arch/x86/entry/common.c:296:19: note: declare 'static' if the function is not intended to be used outside of this translation unit
__visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
^
static
2 warnings generated.
vim +/prepare_exit_to_usermode +234 arch/x86/entry/common.c
233
> 234 __visible noinstr void prepare_exit_to_usermode(struct pt_regs *regs)
235 {
236 instrumentation_begin();
237 __prepare_exit_to_usermode(regs);
238 instrumentation_end();
239 exit_to_user_mode();
240 }
241
242 #define SYSCALL_EXIT_WORK_FLAGS \
243 (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \
244 _TIF_SINGLESTEP | _TIF_SYSCALL_TRACEPOINT)
245
246 static void syscall_slow_exit_work(struct pt_regs *regs, u32 cached_flags)
247 {
248 bool step;
249
250 audit_syscall_exit(regs);
251
252 if (cached_flags & _TIF_SYSCALL_TRACEPOINT)
253 trace_sys_exit(regs, regs->ax);
254
255 /*
256 * If TIF_SYSCALL_EMU is set, we only get here because of
257 * TIF_SINGLESTEP (i.e. this is PTRACE_SYSEMU_SINGLESTEP).
258 * We already reported this syscall instruction in
259 * syscall_trace_enter().
260 */
261 step = unlikely(
262 (cached_flags & (_TIF_SINGLESTEP | _TIF_SYSCALL_EMU))
263 == _TIF_SINGLESTEP);
264 if (step || cached_flags & _TIF_SYSCALL_TRACE)
265 tracehook_report_syscall_exit(regs, step);
266 }
267
268 static void __syscall_return_slowpath(struct pt_regs *regs)
269 {
270 struct thread_info *ti = current_thread_info();
271 u32 cached_flags = READ_ONCE(ti->flags);
272
273 CT_WARN_ON(ct_state() != CONTEXT_KERNEL);
274
275 if (IS_ENABLED(CONFIG_PROVE_LOCKING) &&
276 WARN(irqs_disabled(), "syscall %ld left IRQs disabled", regs->orig_ax))
277 local_irq_enable();
278
279 rseq_syscall(regs);
280
281 /*
282 * First do one-time work. If these work items are enabled, we
283 * want to run them exactly once per syscall exit with IRQs on.
284 */
285 if (unlikely(cached_flags & SYSCALL_EXIT_WORK_FLAGS))
286 syscall_slow_exit_work(regs, cached_flags);
287
288 local_irq_disable();
289 __prepare_exit_to_usermode(regs);
290 }
291
292 /*
293 * Called with IRQs on and fully valid regs. Returns with IRQs off in a
294 * state such that we can immediately switch to user mode.
295 */
> 296 __visible noinstr void syscall_return_slowpath(struct pt_regs *regs)
297 {
298 instrumentation_begin();
299 __syscall_return_slowpath(regs);
300 instrumentation_end();
301 exit_to_user_mode();
302 }
303
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months