Re: [PATCH v5] sco:Add support for BT_PKT_STATUS CMSG data
by kernel test robot
Hi Alain,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on next-20200611]
[cannot apply to v5.7]
[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/Alain-Michaud/sco-Add-support-fo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: x86_64-randconfig-s022-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>, old ones prefixed by <<):
net/bluetooth/sco.c: In function 'sco_skb_put_cmsg':
>> net/bluetooth/sco.c:456:36: error: passing argument 2 of 'test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
456 | if (test_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask))
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| __u8 * {aka unsigned char *}
In file included from arch/x86/include/asm/bitops.h:392,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/instrumented-non-atomic.h:108:68: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
108 | static inline bool test_bit(long nr, const volatile unsigned long *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
net/bluetooth/sco.c: In function 'sco_sock_setsockopt':
>> net/bluetooth/sco.c:868:33: error: passing argument 2 of 'set_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
868 | set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| __u8 * {aka unsigned char *}
In file included from arch/x86/include/asm/bitops.h:391,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/instrumented-atomic.h:26:61: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
26 | static inline void set_bit(long nr, volatile unsigned long *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>> net/bluetooth/sco.c:870:35: error: passing argument 2 of 'clear_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
870 | clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| __u8 * {aka unsigned char *}
In file included from arch/x86/include/asm/bitops.h:391,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/instrumented-atomic.h:39:63: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
39 | static inline void clear_bit(long nr, volatile unsigned long *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~
net/bluetooth/sco.c: In function 'sco_sock_getsockopt':
net/bluetooth/sco.c:999:11: error: passing argument 2 of 'test_bit' from incompatible pointer type [-Werror=incompatible-pointer-types]
999 | &(sco_pi(sk)->cmsg_mask));
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| __u8 * {aka unsigned char *}
In file included from arch/x86/include/asm/bitops.h:392,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/module.h:12,
from net/bluetooth/sco.c:27:
include/asm-generic/bitops/instrumented-non-atomic.h:108:68: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
108 | static inline bool test_bit(long nr, const volatile unsigned long *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
sparse warnings: (new ones prefixed by >>)
>> net/bluetooth/sco.c:456:44: sparse: sparse: incorrect type in argument 2 (different type sizes) @@ expected unsigned long const volatile *addr @@ got unsigned char * @@
>> net/bluetooth/sco.c:456:44: sparse: expected unsigned long const volatile *addr
>> net/bluetooth/sco.c:456:44: sparse: got unsigned char *
>> net/bluetooth/sco.c:868:55: sparse: sparse: incorrect type in argument 2 (different type sizes) @@ expected unsigned long volatile *addr @@ got unsigned char * @@
>> net/bluetooth/sco.c:868:55: sparse: expected unsigned long volatile *addr
net/bluetooth/sco.c:868:55: sparse: got unsigned char *
net/bluetooth/sco.c:870:57: sparse: sparse: incorrect type in argument 2 (different type sizes) @@ expected unsigned long volatile *addr @@ got unsigned char * @@
net/bluetooth/sco.c:870:57: sparse: expected unsigned long volatile *addr
net/bluetooth/sco.c:870:57: sparse: got unsigned char *
net/bluetooth/sco.c:999:41: sparse: sparse: incorrect type in argument 2 (different type sizes) @@ expected unsigned long const volatile *addr @@ got unsigned char * @@
net/bluetooth/sco.c:999:41: sparse: expected unsigned long const volatile *addr
net/bluetooth/sco.c:999:41: sparse: got unsigned char *
vim +/test_bit +456 net/bluetooth/sco.c
452
453 static void sco_skb_put_cmsg(struct sk_buff *skb, struct msghdr *msg,
454 struct sock *sk)
455 {
> 456 if (test_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask))
457 put_cmsg(msg, SOL_BLUETOOTH, BT_SCM_PKT_STATUS,
458 sizeof(bt_cb(skb)->sco.pkt_status),
459 &bt_cb(skb)->sco.pkt_status);
460 }
461
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
cc1: error: arch/um/include/uapi: No such file or directory
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: c348c16305280fe3e6c1186378f96c8634c149f9 lib: make a test module with set/clear bit
date: 6 days ago
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout c348c16305280fe3e6c1186378f96c8634c149f9
# save the attached .config to linux build tree
make W=1 ARCH=um
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 >>, old ones prefixed by <<):
>> cc1: error: arch/um/include/uapi: No such file or directory [-Werror=missing-include-dirs]
cc1: all warnings being treated as errors
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[linux-review:UPDATE-20200611-034348/Daniel-Vetter/dma-fence-lockdep-annotations-round-2/20200604-161907 4/18] drivers/dma-buf/dma-resv.c:119:20: error: '__mmu_notifier_invalidate_range_start_map' undeclared; did you mean
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200611-034348/Daniel-Ve...
head: 8ecab5fe94c5d85789550eda4e5b9ca6d61315b0
commit: 08117a632fade06f3c687d817ba7fc8b9998d524 [4/18] dma-fence: prime lockdep annotations
config: um-allmodconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 08117a632fade06f3c687d817ba7fc8b9998d524
# save the attached .config to linux build tree
make W=1 ARCH=um
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 >>, old ones prefixed by <<):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
In file included from include/linux/spinlock_types.h:18,
from include/linux/mutex.h:16,
from include/linux/ww_mutex.h:20,
from include/linux/dma-resv.h:42,
from drivers/dma-buf/dma-resv.c:35:
drivers/dma-buf/dma-resv.c: In function 'dma_resv_lockdep':
>> drivers/dma-buf/dma-resv.c:119:20: error: '__mmu_notifier_invalidate_range_start_map' undeclared (first use in this function); did you mean 'mmu_notifier_invalidate_range_start'?
119 | lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:636:61: note: in definition of macro 'lock_acquire_exclusive'
636 | #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i)
| ^
drivers/dma-buf/dma-resv.c:119:2: note: in expansion of macro 'lock_map_acquire'
119 | lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
| ^~~~~~~~~~~~~~~~
drivers/dma-buf/dma-resv.c:119:20: note: each undeclared identifier is reported only once for each function it appears in
119 | lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:636:61: note: in definition of macro 'lock_acquire_exclusive'
636 | #define lock_acquire_exclusive(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, n, i)
| ^
drivers/dma-buf/dma-resv.c:119:2: note: in expansion of macro 'lock_map_acquire'
119 | lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
| ^~~~~~~~~~~~~~~~
vim +119 drivers/dma-buf/dma-resv.c
> 35 #include <linux/dma-resv.h>
36 #include <linux/export.h>
37 #include <linux/sched/mm.h>
38 #include <linux/mmu_notifier.h>
39
40 /**
41 * DOC: Reservation Object Overview
42 *
43 * The reservation object provides a mechanism to manage shared and
44 * exclusive fences associated with a buffer. A reservation object
45 * can have attached one exclusive fence (normally associated with
46 * write operations) or N shared fences (read operations). The RCU
47 * mechanism is used to protect read access to fences from locked
48 * write-side updates.
49 */
50
51 DEFINE_WD_CLASS(reservation_ww_class);
52 EXPORT_SYMBOL(reservation_ww_class);
53
54 struct lock_class_key reservation_seqcount_class;
55 EXPORT_SYMBOL(reservation_seqcount_class);
56
57 const char reservation_seqcount_string[] = "reservation_seqcount";
58 EXPORT_SYMBOL(reservation_seqcount_string);
59
60 /**
61 * dma_resv_list_alloc - allocate fence list
62 * @shared_max: number of fences we need space for
63 *
64 * Allocate a new dma_resv_list and make sure to correctly initialize
65 * shared_max.
66 */
67 static struct dma_resv_list *dma_resv_list_alloc(unsigned int shared_max)
68 {
69 struct dma_resv_list *list;
70
71 list = kmalloc(offsetof(typeof(*list), shared[shared_max]), GFP_KERNEL);
72 if (!list)
73 return NULL;
74
75 list->shared_max = (ksize(list) - offsetof(typeof(*list), shared)) /
76 sizeof(*list->shared);
77
78 return list;
79 }
80
81 /**
82 * dma_resv_list_free - free fence list
83 * @list: list to free
84 *
85 * Free a dma_resv_list and make sure to drop all references.
86 */
87 static void dma_resv_list_free(struct dma_resv_list *list)
88 {
89 unsigned int i;
90
91 if (!list)
92 return;
93
94 for (i = 0; i < list->shared_count; ++i)
95 dma_fence_put(rcu_dereference_protected(list->shared[i], true));
96
97 kfree_rcu(list, rcu);
98 }
99
100 #if IS_ENABLED(CONFIG_LOCKDEP)
101 static int __init dma_resv_lockdep(void)
102 {
103 struct mm_struct *mm = mm_alloc();
104 struct ww_acquire_ctx ctx;
105 struct dma_resv obj;
106 int ret;
107
108 if (!mm)
109 return -ENOMEM;
110
111 dma_resv_init(&obj);
112
113 down_read(&mm->mmap_sem);
114 ww_acquire_init(&ctx, &reservation_ww_class);
115 ret = dma_resv_lock(&obj, &ctx);
116 if (ret == -EDEADLK)
117 dma_resv_lock_slow(&obj, &ctx);
118 fs_reclaim_acquire(GFP_KERNEL);
> 119 lock_map_acquire(&__mmu_notifier_invalidate_range_start_map);
120 __dma_fence_might_wait();
121 lock_map_release(&__mmu_notifier_invalidate_range_start_map);
122 fs_reclaim_release(GFP_KERNEL);
123 ww_mutex_unlock(&obj.lock);
124 ww_acquire_fini(&ctx);
125 up_read(&mm->mmap_sem);
126
127 mmput(mm);
128
129 return 0;
130 }
131 subsys_initcall(dma_resv_lockdep);
132 #endif
133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[luto:x86/entry 5/10] arch/x86/entry/entry_32.S:930: Error: invalid operands and sections) for `|'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/entry
head: 69982f2c73a199503541565a5533583ef07adcf7
commit: bad87f44f688bdddcb377bc4434c90d1c01e945e [5/10] x86/entry: Use the high bits of regs->cs to store the entry type
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout bad87f44f688bdddcb377bc4434c90d1c01e945e
# 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 >>, old ones prefixed by <<):
arch/x86/entry/entry_32.S: Assembler messages:
>> arch/x86/entry/entry_32.S:930: Error: invalid operands (*ABS* and *UND* sections) for `|'
vim +930 arch/x86/entry/entry_32.S
876
877 /*
878 * 32-bit SYSENTER entry.
879 *
880 * 32-bit system calls through the vDSO's __kernel_vsyscall enter here
881 * if X86_FEATURE_SEP is available. This is the preferred system call
882 * entry on 32-bit systems.
883 *
884 * The SYSENTER instruction, in principle, should *only* occur in the
885 * vDSO. In practice, a small number of Android devices were shipped
886 * with a copy of Bionic that inlined a SYSENTER instruction. This
887 * never happened in any of Google's Bionic versions -- it only happened
888 * in a narrow range of Intel-provided versions.
889 *
890 * SYSENTER loads SS, ESP, CS, and EIP from previously programmed MSRs.
891 * IF and VM in RFLAGS are cleared (IOW: interrupts are off).
892 * SYSENTER does not save anything on the stack,
893 * and does not save old EIP (!!!), ESP, or EFLAGS.
894 *
895 * To avoid losing track of EFLAGS.VM (and thus potentially corrupting
896 * user and/or vm86 state), we explicitly disable the SYSENTER
897 * instruction in vm86 mode by reprogramming the MSRs.
898 *
899 * Arguments:
900 * eax system call number
901 * ebx arg1
902 * ecx arg2
903 * edx arg3
904 * esi arg4
905 * edi arg5
906 * ebp user stack
907 * 0(%ebp) arg6
908 */
909 SYM_FUNC_START(entry_SYSENTER_32)
910 /*
911 * On entry-stack with all userspace-regs live - save and
912 * restore eflags and %eax to use it as scratch-reg for the cr3
913 * switch.
914 */
915 pushfl
916 pushl %eax
917 BUG_IF_WRONG_CR3 no_user_check=1
918 SWITCH_TO_KERNEL_CR3 scratch_reg=%eax
919 popl %eax
920 popfl
921
922 /* Stack empty again, switch to task stack */
923 movl TSS_entry2task_stack(%esp), %esp
924
925 .Lsysenter_past_esp:
926 pushl $__USER_DS /* pt_regs->ss */
927 pushl %ebp /* pt_regs->sp (stashed in bp) */
928 pushfl /* pt_regs->flags (except IF = 0) */
929 orl $X86_EFLAGS_IF, (%esp) /* Fix IF */
> 930 pushl $(__USER_CS | CSH_ENTRY_SYSENTER) /* pt_regs->cs */
931 pushl $0 /* pt_regs->ip = 0 (placeholder) */
932 pushl %eax /* pt_regs->orig_ax */
933 SAVE_ALL pt_regs_ax=$-ENOSYS /* save rest, stack already switched */
934
935 /*
936 * SYSENTER doesn't filter flags, so we need to clear NT, AC
937 * and TF ourselves. To save a few cycles, we can check whether
938 * either was set instead of doing an unconditional popfq.
939 * This needs to happen before enabling interrupts so that
940 * we don't get preempted with NT set.
941 *
942 * If TF is set, we will single-step all the way to here -- do_debug
943 * will ignore all the traps. (Yes, this is slow, but so is
944 * single-stepping in general. This allows us to avoid having
945 * a more complicated code to handle the case where a user program
946 * forces us to single-step through the SYSENTER entry code.)
947 *
948 * NB.: .Lsysenter_fix_flags is a label with the code under it moved
949 * out-of-line as an optimization: NT is unlikely to be set in the
950 * majority of the cases and instead of polluting the I$ unnecessarily,
951 * we're keeping that code behind a branch which will predict as
952 * not-taken and therefore its instructions won't be fetched.
953 */
954 testl $X86_EFLAGS_NT|X86_EFLAGS_AC|X86_EFLAGS_TF, PT_EFLAGS(%esp)
955 jnz .Lsysenter_fix_flags
956 .Lsysenter_flags_fixed:
957
958 movl %esp, %eax
959 call do_fast_syscall_32
960 /* XEN PV guests always use IRET path */
961 ALTERNATIVE "testl %eax, %eax; jz .Lsyscall_32_done", \
962 "jmp .Lsyscall_32_done", X86_FEATURE_XENPV
963
964 STACKLEAK_ERASE
965
966 /* Opportunistic SYSEXIT */
967
968 /*
969 * Setup entry stack - we keep the pointer in %eax and do the
970 * switch after almost all user-state is restored.
971 */
972
973 /* Load entry stack pointer and allocate frame for eflags/eax */
974 movl PER_CPU_VAR(cpu_tss_rw + TSS_sp0), %eax
975 subl $(2*4), %eax
976
977 /* Copy eflags and eax to entry stack */
978 movl PT_EFLAGS(%esp), %edi
979 movl PT_EAX(%esp), %esi
980 movl %edi, (%eax)
981 movl %esi, 4(%eax)
982
983 /* Restore user registers and segments */
984 movl PT_EIP(%esp), %edx /* pt_regs->ip */
985 movl PT_OLDESP(%esp), %ecx /* pt_regs->sp */
986 1: mov PT_FS(%esp), %fs
987 PTGS_TO_GS
988
989 popl %ebx /* pt_regs->bx */
990 addl $2*4, %esp /* skip pt_regs->cx and pt_regs->dx */
991 popl %esi /* pt_regs->si */
992 popl %edi /* pt_regs->di */
993 popl %ebp /* pt_regs->bp */
994
995 /* Switch to entry stack */
996 movl %eax, %esp
997
998 /* Now ready to switch the cr3 */
999 SWITCH_TO_USER_CR3 scratch_reg=%eax
1000
1001 /*
1002 * Restore all flags except IF. (We restore IF separately because
1003 * STI gives a one-instruction window in which we won't be interrupted,
1004 * whereas POPF does not.)
1005 */
1006 btrl $X86_EFLAGS_IF_BIT, (%esp)
1007 BUG_IF_WRONG_CR3 no_user_check=1
1008 popfl
1009 popl %eax
1010
1011 /*
1012 * Return back to the vDSO, which will pop ecx and edx.
1013 * Don't bother with DS and ES (they already contain __USER_DS).
1014 */
1015 sti
1016 sysexit
1017
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[jkirsher-next-queue:dev-queue 5/55] drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2271:15: error: redefinition of 'truesize'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: 94e8b9f389d896ead02e9633104231fc864da9b0
commit: 0ca4b678d984828b7cdbd1d585e995f983853483 [5/55] ixgbe: fix XDP redirect on archs with PAGE_SIZE above 4K
config: sparc-allyesconfig (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
git checkout 0ca4b678d984828b7cdbd1d585e995f983853483
# 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 errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_rx_buffer_flip':
>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2271:15: error: redefinition of 'truesize'
2271 | unsigned int truesize = ring_uses_build_skb(rx_ring) ?
| ^~~~~~~~
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:2267:15: note: previous definition of 'truesize' was here
2267 | unsigned int truesize = ixgbe_rx_frame_truesize(rx_ring, size);
| ^~~~~~~~
vim +/truesize +2271 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
2262
2263 static void ixgbe_rx_buffer_flip(struct ixgbe_ring *rx_ring,
2264 struct ixgbe_rx_buffer *rx_buffer,
2265 unsigned int size)
2266 {
2267 unsigned int truesize = ixgbe_rx_frame_truesize(rx_ring, size);
2268 #if (PAGE_SIZE < 8192)
2269 rx_buffer->page_offset ^= truesize;
2270 #else
> 2271 unsigned int truesize = ring_uses_build_skb(rx_ring) ?
2272 SKB_DATA_ALIGN(IXGBE_SKB_PAD + size) +
2273 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) :
2274 SKB_DATA_ALIGN(size);
2275
2276 rx_buffer->page_offset += truesize;
2277 #endif
2278 }
2279
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[mcgrof:20200610-blktrace-fixes 8/9] kernel/trace/blktrace.c:535:12: error: no member named 'debugfs_dir' in 'struct request_queue'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git 20200610-blktrace-fixes
head: aa41a0894720cfcfb69370048c2592ec065f67f3
commit: e31a472183cefa50dfb63cb0495b0bd0996d9beb [8/9] blktrace: fix debugfs use after free
config: arm64-randconfig-r032-20200611 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project bc2b70982be8f5250cd0082a7190f8b417bd4dfe)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout e31a472183cefa50dfb63cb0495b0bd0996d9beb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 errors (new ones prefixed by >>, old ones prefixed by <<):
>> kernel/trace/blktrace.c:535:12: error: no member named 'debugfs_dir' in 'struct request_queue'
dir = q->debugfs_dir;
~ ^
kernel/trace/blktrace.c:788:5: warning: no previous prototype for function 'blk_trace_bio_get_cgid' [-Wmissing-prototypes]
u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio)
^
kernel/trace/blktrace.c:788:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
u64 blk_trace_bio_get_cgid(struct request_queue *q, struct bio *bio)
^
static
1 warning and 1 error generated.
vim +535 kernel/trace/blktrace.c
474
475 /*
476 * Setup everything required to start tracing
477 */
478 static int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
479 struct block_device *bdev,
480 struct blk_user_trace_setup *buts)
481 {
482 struct blk_trace *bt = NULL;
483 struct dentry *dir = NULL;
484 int ret;
485
486 lockdep_assert_held(&q->blk_trace_mutex);
487
488 if (!buts->buf_size || !buts->buf_nr)
489 return -EINVAL;
490
491 if (!blk_debugfs_root)
492 return -ENOENT;
493
494 strncpy(buts->name, name, BLKTRACE_BDEV_SIZE);
495 buts->name[BLKTRACE_BDEV_SIZE - 1] = '\0';
496
497 /*
498 * some device names have larger paths - convert the slashes
499 * to underscores for this to work as expected
500 */
501 strreplace(buts->name, '/', '_');
502
503 /*
504 * bdev can be NULL, as with scsi-generic, this is as helpful as
505 * we can be.
506 */
507 if (rcu_dereference_protected(q->blk_trace,
508 lockdep_is_held(&q->blk_trace_mutex))) {
509 pr_warn("Concurrent blktraces are not allowed on %s\n",
510 buts->name);
511 return -EBUSY;
512 }
513
514 bt = kzalloc(sizeof(*bt), GFP_KERNEL);
515 if (!bt)
516 return -ENOMEM;
517
518 ret = -ENOMEM;
519 bt->sequence = alloc_percpu(unsigned long);
520 if (!bt->sequence)
521 goto err;
522
523 bt->msg_data = __alloc_percpu(BLK_TN_MAX_MSG, __alignof__(char));
524 if (!bt->msg_data)
525 goto err;
526
527 /*
528 * When tracing whole make_request drivers (multiqueue) block devices,
529 * reuse the existing debugfs directory created by the block layer on
530 * init. For request-based block devices, all partitions block devices,
531 * and scsi-generic block devices we create a temporary new debugfs
532 * directory that will be removed once the trace ends.
533 */
534 if (queue_is_mq(q) && bdev && bdev == bdev->bd_contains)
> 535 dir = q->debugfs_dir;
536 else
537 bt->dir = dir = debugfs_create_dir(buts->name, blk_debugfs_root);
538
539 bt->dev = dev;
540 atomic_set(&bt->dropped, 0);
541 INIT_LIST_HEAD(&bt->running_list);
542
543 ret = -EIO;
544 bt->dropped_file = debugfs_create_file("dropped", 0444, dir, bt,
545 &blk_dropped_fops);
546
547 bt->msg_file = debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops);
548
549 bt->rchan = relay_open("trace", dir, buts->buf_size,
550 buts->buf_nr, &blk_relay_callbacks, bt);
551 if (!bt->rchan)
552 goto err;
553
554 bt->act_mask = buts->act_mask;
555 if (!bt->act_mask)
556 bt->act_mask = (u16) -1;
557
558 blk_trace_setup_lba(bt, bdev);
559
560 /* overwrite with user settings */
561 if (buts->start_lba)
562 bt->start_lba = buts->start_lba;
563 if (buts->end_lba)
564 bt->end_lba = buts->end_lba;
565
566 bt->pid = buts->pid;
567 bt->trace_state = Blktrace_setup;
568
569 rcu_assign_pointer(q->blk_trace, bt);
570 get_probe_ref();
571
572 ret = 0;
573 err:
574 if (ret)
575 blk_trace_free(bt);
576 return ret;
577 }
578
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 1/1] mfd: Make a best effort attempt to match devices with the correct of_nodes
by kernel test robot
Hi Lee,
I love your patch! Yet something to improve:
[auto build test ERROR on ljones-mfd/for-mfd-next]
[also build test ERROR on v5.7 next-20200611]
[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/Lee-Jones/mfd-Make-a-best-effort...
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: x86_64-randconfig-s021-20200611 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>, old ones prefixed by <<):
drivers/mfd/mfd-core.c: In function 'mfd_match_of_node_to_dev':
>> drivers/mfd/mfd-core.c:152:17: error: implicit declaration of function 'of_read_number' [-Werror=implicit-function-declaration]
152 | of_node_addr = of_read_number(reg, of_n_addr_cells(np));
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/of_read_number +152 drivers/mfd/mfd-core.c
119
120 static int mfd_match_of_node_to_dev(struct platform_device *pdev,
121 struct device_node *np,
122 const struct mfd_cell *cell)
123 {
124 struct mfd_of_node_entry *of_entry;
125 const __be32 *reg;
126 u64 of_node_addr;
127 bool of_node_used;
128
129 /* Skip devices 'disabled' by Device Tree */
130 if (!of_device_is_available(np))
131 return -ENODEV;
132
133 /* Skip if OF node has previously been allocated to a device */
134 of_node_used = false;
135 list_for_each_entry(of_entry, &mfd_of_node_list, list)
136 if (of_entry->np == np)
137 of_node_used = true;
138
139 if (of_node_used)
140 return -EAGAIN;
141
142 if (!cell->of_reg)
143 /* No match defined - allocate the first free matching node */
144 goto allocate_of_node;
145
146 /* We only care about each node's first defined address */
147 reg = of_get_address(np, 0, NULL, NULL);
148 if (!reg)
149 /* OF node does not contatin a 'reg' property to match to */
150 return -EAGAIN;
151
> 152 of_node_addr = of_read_number(reg, of_n_addr_cells(np));
153
154 if (cell->of_reg != of_node_addr)
155 /* No match */
156 return -EAGAIN;
157
158 allocate_of_node:
159 of_entry = kzalloc(sizeof(*of_entry), GFP_KERNEL);
160 if (!of_entry)
161 return -ENOMEM;
162
163 of_entry->dev = &pdev->dev;
164 of_entry->np = np;
165 list_add_tail(&of_entry->list, &mfd_of_node_list);
166
167 pdev->dev.of_node = np;
168 pdev->dev.fwnode = &np->fwnode;
169
170 return 0;
171 }
172
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months