[luto:x86/fault 7/13] arch/x86/mm/fault.c:461:15: error: 'errata93_warning' undeclared
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/fault
head: eefc5d2176680683703cf4c056949054da2d5f53
commit: a5ff54330bd58fa9d5dba5c9b44aabb51af592aa [7/13] x86/fault: Improve kernel-executing-user-memory handling
config: x86_64-randconfig-r003-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/fault
git checkout a5ff54330bd58fa9d5dba5c9b44aabb51af592aa
# 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 >>):
In file included from include/linux/kernel.h:16,
from arch/x86/include/asm/percpu.h:27,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from arch/x86/mm/fault.c:7:
arch/x86/mm/fault.c: In function 'is_errata93':
>> arch/x86/mm/fault.c:461:15: error: 'errata93_warning' undeclared (first use in this function)
461 | printk_once(errata93_warning);
| ^~~~~~~~~~~~~~~~
include/linux/printk.h:445:10: note: in definition of macro 'printk_once'
445 | printk(fmt, ##__VA_ARGS__); \
| ^~~
arch/x86/mm/fault.c:461:15: note: each undeclared identifier is reported only once for each function it appears in
461 | printk_once(errata93_warning);
| ^~~~~~~~~~~~~~~~
include/linux/printk.h:445:10: note: in definition of macro 'printk_once'
445 | printk(fmt, ##__VA_ARGS__); \
| ^~~
vim +/errata93_warning +461 arch/x86/mm/fault.c
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 428
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 429 /*
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 430 * Workaround for K8 erratum #93 & buggy BIOS.
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 431 *
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 432 * BIOS SMM functions are required to use a specific workaround
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 433 * to avoid corruption of the 64bit RIP register on C stepping K8.
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 434 *
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 435 * A lot of BIOS that didn't get tested properly miss this.
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 436 *
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 437 * The OS sees this as a page fault with the upper 32bits of RIP cleared.
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 438 * Try to work around it here.
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 439 *
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 440 * Note we only handle faults in kernel here.
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 441 * Does nothing on 32-bit.
fdfe8aa84dd78c arch/x86/mm/fault_64.c Harvey Harrison 2008-01-30 442 */
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 443 static int is_errata93(struct pt_regs *regs, unsigned long address)
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 444 {
a5ff54330bd58f arch/x86/mm/fault.c Andy Lutomirski 2021-02-09 445 #if defined(CONFIG_X86_64)
a5ff54330bd58f arch/x86/mm/fault.c Andy Lutomirski 2021-02-09 446 if (!is_amd_k8_pre_npt())
a5ff54330bd58f arch/x86/mm/fault.c Andy Lutomirski 2021-02-09 447 return 0;
a5ff54330bd58f arch/x86/mm/fault.c Andy Lutomirski 2021-02-09 448
a5ff54330bd58f arch/x86/mm/fault.c Andy Lutomirski 2021-02-09 449 if (user_mode(regs))
e05139f2569ecf arch/x86/mm/fault.c Jan Beulich 2011-09-28 450 return 0;
e05139f2569ecf arch/x86/mm/fault.c Jan Beulich 2011-09-28 451
65ea5b03499035 arch/x86/mm/fault_64.c H. Peter Anvin 2008-01-30 452 if (address != regs->ip)
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 453 return 0;
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 454
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 455 if ((address >> 32) != 0)
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 456 return 0;
2d4a71676f4d89 arch/x86/mm/fault.c Ingo Molnar 2009-02-20 457
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 458 address |= 0xffffffffUL << 32;
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 459 if ((address >= (u64)_stext && address <= (u64)_etext) ||
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 460 (address >= MODULES_VADDR && address <= MODULES_END)) {
a454ab3110175d arch/x86/mm/fault.c Ingo Molnar 2009-05-03 @461 printk_once(errata93_warning);
65ea5b03499035 arch/x86/mm/fault_64.c H. Peter Anvin 2008-01-30 462 regs->ip = address;
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 463 return 1;
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 464 }
fdfe8aa84dd78c arch/x86/mm/fault_64.c Harvey Harrison 2008-01-30 465 #endif
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 466 return 0;
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 467 }
^1da177e4c3f41 arch/x86_64/mm/fault.c Linus Torvalds 2005-04-16 468
:::::: The code at line 461 was first introduced by commit
:::::: a454ab3110175d710f4f9a96226a26ce4d5d5de2 x86, mm: fault.c, use printk_once() in is_errata93()
:::::: TO: Ingo Molnar <mingo(a)elte.hu>
:::::: CC: Ingo Molnar <mingo(a)elte.hu>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[chao-linux:simple_copy 2/5] block/ioctl.c:164:28: warning: cast to pointer from integer of different size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git simple_copy
head: d6f32b90156624ae9dc06ef5873334a48e9b9806
commit: fcbd83ffa72af1eba12bcab1f34e0b956a563e02 [2/5] block: add simple copy support
config: xtensa-randconfig-r004-20210209 (attached as .config)
compiler: xtensa-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/chao/linux.git/commit/?id...
git remote add chao-linux https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
git fetch --no-tags chao-linux simple_copy
git checkout fcbd83ffa72af1eba12bcab1f34e0b956a563e02
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
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 >>):
block/ioctl.c: In function 'blk_ioctl_copy':
>> block/ioctl.c:164:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
164 | if (copy_from_user(rlist, (void __user *)crange.range_list,
| ^
vim +164 block/ioctl.c
135
136 static int blk_ioctl_copy(struct block_device *bdev, fmode_t mode,
137 unsigned long arg)
138 {
139 struct copy_range crange;
140 struct range_entry *rlist;
141 struct request_queue *q = bdev_get_queue(bdev);
142 sector_t dest;
143 int ret;
144
145 if (!(mode & FMODE_WRITE))
146 return -EBADF;
147
148 if (!blk_queue_copy(q))
149 return -EOPNOTSUPP;
150
151 if (copy_from_user(&crange, (void __user *)arg, sizeof(crange)))
152 return -EFAULT;
153
154 if (crange.dest & ((1 << SECTOR_SHIFT) - 1))
155 return -EFAULT;
156 dest = crange.dest;
157
158 rlist = kmalloc_array(crange.nr_range, sizeof(*rlist),
159 GFP_KERNEL);
160
161 if (!rlist)
162 return -ENOMEM;
163
> 164 if (copy_from_user(rlist, (void __user *)crange.range_list,
165 sizeof(*rlist) * crange.nr_range)) {
166 ret = -EFAULT;
167 goto out;
168 }
169
170 ret = blkdev_issue_copy(bdev, crange.nr_range, rlist, bdev, dest,
171 GFP_KERNEL);
172 out:
173 kfree(rlist);
174 return ret;
175 }
176
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
date: 9 months ago
config: arm-randconfig-s032-20210209 (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
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
# 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 bbd7ffdbef6888459f301c5889f3b14ada38b913
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:992:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@
drivers/hsi/clients/ssi_protocol.c:992:31: sparse: expected unsigned short [usertype]
drivers/hsi/clients/ssi_protocol.c:992:31: sparse: got restricted __be16 [usertype]
vim +630 drivers/hsi/clients/ssi_protocol.c
dc7bf5d7186849 Sebastian Reichel 2013-11-15 607
dc7bf5d7186849 Sebastian Reichel 2013-11-15 608 /* In soft IRQ context */
dc7bf5d7186849 Sebastian Reichel 2013-11-15 609 static void ssip_pn_rx(struct sk_buff *skb)
dc7bf5d7186849 Sebastian Reichel 2013-11-15 610 {
dc7bf5d7186849 Sebastian Reichel 2013-11-15 611 struct net_device *dev = skb->dev;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 612
dc7bf5d7186849 Sebastian Reichel 2013-11-15 613 if (unlikely(!netif_running(dev))) {
dc7bf5d7186849 Sebastian Reichel 2013-11-15 614 dev_dbg(&dev->dev, "Drop RX packet\n");
dc7bf5d7186849 Sebastian Reichel 2013-11-15 615 dev->stats.rx_dropped++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 616 dev_kfree_skb(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 617 return;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 618 }
dc7bf5d7186849 Sebastian Reichel 2013-11-15 619 if (unlikely(!pskb_may_pull(skb, SSIP_MIN_PN_HDR))) {
dc7bf5d7186849 Sebastian Reichel 2013-11-15 620 dev_dbg(&dev->dev, "Error drop RX packet\n");
dc7bf5d7186849 Sebastian Reichel 2013-11-15 621 dev->stats.rx_errors++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 622 dev->stats.rx_length_errors++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 623 dev_kfree_skb(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 624 return;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 625 }
dc7bf5d7186849 Sebastian Reichel 2013-11-15 626 dev->stats.rx_packets++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 627 dev->stats.rx_bytes += skb->len;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 628
dc7bf5d7186849 Sebastian Reichel 2013-11-15 629 /* length field is exchanged in network byte order */
dc7bf5d7186849 Sebastian Reichel 2013-11-15 @630 ((u16 *)skb->data)[2] = ntohs(((u16 *)skb->data)[2]);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 631 dev_dbg(&dev->dev, "RX length fixed (%04x -> %u)\n",
dc7bf5d7186849 Sebastian Reichel 2013-11-15 632 ((u16 *)skb->data)[2], ntohs(((u16 *)skb->data)[2]));
dc7bf5d7186849 Sebastian Reichel 2013-11-15 633
dc7bf5d7186849 Sebastian Reichel 2013-11-15 634 skb->protocol = htons(ETH_P_PHONET);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 635 skb_reset_mac_header(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 636 __skb_pull(skb, 1);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 637 netif_rx(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 638 }
dc7bf5d7186849 Sebastian Reichel 2013-11-15 639
:::::: The code at line 630 was first introduced by commit
:::::: dc7bf5d7186849aa36b9f0e42e250a813a7b0bdb HSI: Introduce driver for SSI Protocol
:::::: TO: Sebastian Reichel <sre(a)kernel.org>
:::::: CC: Sebastian Reichel <sre(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[pci:pci/error 2/8] drivers/pci/pci.h:348:20: warning: equality comparison result unused
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/error
head: 5692817fc88f347328e35cd7b19bd04f4400652e
commit: 8fae7d8809b8151488969d6cfad2f6dd2c69d311 [2/8] PCI/ERR: Simplify pci_dev_set_io_state()
config: powerpc64-randconfig-r026-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?i...
git remote add pci https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
git fetch --no-tags pci pci/error
git checkout 8fae7d8809b8151488969d6cfad2f6dd2c69d311
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:14:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/pci/of.c:11:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:16:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/pci/of.c:11:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:18:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/pci/of.c:11:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:20:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/pci/of.c:11:
In file included from include/linux/pci.h:38:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:22:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/pci/of.c:16:
>> drivers/pci/pci.h:348:20: warning: equality comparison result unused [-Wunused-comparison]
dev->error_state == pci_channel_io_perm_failure;
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/pci.h:348:20: note: use '=' to turn this equality comparison into an assignment
dev->error_state == pci_channel_io_perm_failure;
^~
=
13 warnings generated.
vim +348 drivers/pci/pci.h
330
331 /**
332 * pci_dev_set_io_state - Set the new error state if possible.
333 *
334 * @dev - pci device to set new error_state
335 * @new - the state we want dev to be in
336 *
337 * Must be called with device_lock held.
338 *
339 * Returns true if state has been changed to the requested state.
340 */
341 static inline bool pci_dev_set_io_state(struct pci_dev *dev,
342 pci_channel_state_t new)
343 {
344 device_lock_assert(&dev->dev);
345
346 /* Can always put a device in perm_failure state */
347 if (new == pci_channel_io_perm_failure) {
> 348 dev->error_state == pci_channel_io_perm_failure;
349 return true;
350 }
351
352 /* If already in perm_failure, can't set to normal or frozen */
353 if (dev->error_state == pci_channel_io_perm_failure)
354 return false;
355
356 /* Can always change normal to frozen or vice versa */
357 dev->error_state = new;
358 return true;
359 }
360
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[saeed:queue-next 838/854] drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:2892:8: error: implicit declaration of function 'mlx5_vport_get_other_func_cap'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git queue-next
head: 5c5a42bb5d698f59a292fe847bfccf65b693ca79
commit: 80a0334aff57bce1b9e5d860854a4b474c3030b9 [838/854] net/mlx5e: E-Switch, Maintain vhca_id to vport_num mapping
config: x86_64-randconfig-a015-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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/saeed/linux.git/commit/?i...
git remote add saeed https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git
git fetch --no-tags saeed queue-next
git checkout 80a0334aff57bce1b9e5d860854a4b474c3030b9
# 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 errors (new ones prefixed by >>):
>> drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:2892:8: error: implicit declaration of function 'mlx5_vport_get_other_func_cap' [-Werror,-Wimplicit-function-declaration]
err = mlx5_vport_get_other_func_cap(esw->dev, vport_num, query_ctx);
^
1 error generated.
vim +/mlx5_vport_get_other_func_cap +2892 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
2875
2876 static int mlx5_esw_query_vport_vhca_id(struct mlx5_eswitch *esw, u16 vport_num, u16 *vhca_id)
2877 {
2878 int query_out_sz = MLX5_ST_SZ_BYTES(query_hca_cap_out);
2879 void *query_ctx;
2880 void *hca_caps;
2881 int err;
2882
2883 *vhca_id = 0;
2884 if (mlx5_esw_is_manager_vport(esw, vport_num) ||
2885 !MLX5_CAP_GEN(esw->dev, vhca_resource_manager))
2886 return -EPERM;
2887
2888 query_ctx = kzalloc(query_out_sz, GFP_KERNEL);
2889 if (!query_ctx)
2890 return -ENOMEM;
2891
> 2892 err = mlx5_vport_get_other_func_cap(esw->dev, vport_num, query_ctx);
2893 if (err)
2894 goto out_free;
2895
2896 hca_caps = MLX5_ADDR_OF(query_hca_cap_out, query_ctx, capability);
2897 *vhca_id = MLX5_GET(cmd_hca_cap, hca_caps, vhca_id);
2898
2899 out_free:
2900 kfree(query_ctx);
2901 return err;
2902 }
2903
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[dhowells-fs:keys-acl 23/24] fs/crypto/keyring.c:145:11: error: too few arguments to function 'keyring_search'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-acl
head: 06a67e452fb9c5815f6181878949ab31178c6d67
commit: eed986d8643280beed60cf7e7b9599f768706a53 [23/24] keys: Split the search perms between KEY_NEED_USE and KEY_NEED_SEARCH
config: i386-randconfig-c001-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs keys-acl
git checkout eed986d8643280beed60cf7e7b9599f768706a53
# 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 >>):
fs/crypto/keyring.c: In function 'search_fscrypt_keyring':
>> fs/crypto/keyring.c:145:11: error: too few arguments to function 'keyring_search'
145 | keyref = keyring_search(keyref, type, description, false);
| ^~~~~~~~~~~~~~
In file included from include/linux/key-type.h:11,
from fs/crypto/keyring.c:22:
include/linux/key.h:434:18: note: declared here
434 | extern key_ref_t keyring_search(key_ref_t keyring,
| ^~~~~~~~~~~~~~
vim +/keyring_search +145 fs/crypto/keyring.c
23c688b54016ee Eric Biggers 2019-08-04 133
23c688b54016ee Eric Biggers 2019-08-04 134 /* Search ->s_master_keys or ->mk_users */
22d94f493bfb40 Eric Biggers 2019-08-04 135 static struct key *search_fscrypt_keyring(struct key *keyring,
22d94f493bfb40 Eric Biggers 2019-08-04 136 struct key_type *type,
22d94f493bfb40 Eric Biggers 2019-08-04 137 const char *description)
22d94f493bfb40 Eric Biggers 2019-08-04 138 {
22d94f493bfb40 Eric Biggers 2019-08-04 139 /*
22d94f493bfb40 Eric Biggers 2019-08-04 140 * We need to mark the keyring reference as "possessed" so that we
22d94f493bfb40 Eric Biggers 2019-08-04 141 * acquire permission to search it, via the KEY_POS_SEARCH permission.
22d94f493bfb40 Eric Biggers 2019-08-04 142 */
22d94f493bfb40 Eric Biggers 2019-08-04 143 key_ref_t keyref = make_key_ref(keyring, true /* possessed */);
22d94f493bfb40 Eric Biggers 2019-08-04 144
22d94f493bfb40 Eric Biggers 2019-08-04 @145 keyref = keyring_search(keyref, type, description, false);
22d94f493bfb40 Eric Biggers 2019-08-04 146 if (IS_ERR(keyref)) {
22d94f493bfb40 Eric Biggers 2019-08-04 147 if (PTR_ERR(keyref) == -EAGAIN || /* not found */
22d94f493bfb40 Eric Biggers 2019-08-04 148 PTR_ERR(keyref) == -EKEYREVOKED) /* recently invalidated */
22d94f493bfb40 Eric Biggers 2019-08-04 149 keyref = ERR_PTR(-ENOKEY);
22d94f493bfb40 Eric Biggers 2019-08-04 150 return ERR_CAST(keyref);
22d94f493bfb40 Eric Biggers 2019-08-04 151 }
22d94f493bfb40 Eric Biggers 2019-08-04 152 return key_ref_to_ptr(keyref);
22d94f493bfb40 Eric Biggers 2019-08-04 153 }
22d94f493bfb40 Eric Biggers 2019-08-04 154
:::::: The code at line 145 was first introduced by commit
:::::: 22d94f493bfb408fdd764f7b1d0363af2122fba5 fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY ioctl
:::::: TO: Eric Biggers <ebiggers(a)google.com>
:::::: CC: Eric Biggers <ebiggers(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[congwang:sockmap1-v2 1/5] net/ipv4/tcp_minisocks.c:551: undefined reference to `tcp_bpf_clone'
by kernel test robot
tree: https://github.com/congwang/linux.git sockmap1-v2
head: dbcb8c1d39a99e8cc66bd7ced359d4b986776f78
commit: 847353ec78c927b3a10beb39e7786d6e3b76fb43 [1/5] bpf: clean up CONFIG_BPF_STREAM_PARSER
config: i386-randconfig-c001-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/congwang/linux/commit/847353ec78c927b3a10beb39e7786d6e...
git remote add congwang https://github.com/congwang/linux.git
git fetch --no-tags congwang sockmap1-v2
git checkout 847353ec78c927b3a10beb39e7786d6e3b76fb43
# 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 >>):
ld: net/ipv4/tcp_minisocks.o: in function `tcp_create_openreq_child':
>> net/ipv4/tcp_minisocks.c:551: undefined reference to `tcp_bpf_clone'
vim +551 net/ipv4/tcp_minisocks.c
60e2a7780793ba Ursula Braun 2017-10-25 449
^1da177e4c3f41 Linus Torvalds 2005-04-16 450 /* This is not only more efficient than what we used to do, it eliminates
^1da177e4c3f41 Linus Torvalds 2005-04-16 451 * a lot of code duplication between IPv4/IPv6 SYN recv processing. -DaveM
^1da177e4c3f41 Linus Torvalds 2005-04-16 452 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 453 * Actually, we could lots of memory writes here. tp of listening
^1da177e4c3f41 Linus Torvalds 2005-04-16 454 * socket contains all necessary default parameters.
^1da177e4c3f41 Linus Torvalds 2005-04-16 455 */
c28c6f045945f5 Eric Dumazet 2015-09-29 456 struct sock *tcp_create_openreq_child(const struct sock *sk,
c28c6f045945f5 Eric Dumazet 2015-09-29 457 struct request_sock *req,
c28c6f045945f5 Eric Dumazet 2015-09-29 458 struct sk_buff *skb)
^1da177e4c3f41 Linus Torvalds 2005-04-16 459 {
e56c57d0d3fdbb Eric Dumazet 2011-11-08 460 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC);
9f1d2604c71498 Arnaldo Carvalho de Melo 2005-08-09 461 const struct inet_request_sock *ireq = inet_rsk(req);
2e6599cb899ba4 Arnaldo Carvalho de Melo 2005-06-18 462 struct tcp_request_sock *treq = tcp_rsk(req);
242b1bbe5144de Eric Dumazet 2018-06-26 463 struct inet_connection_sock *newicsk;
242b1bbe5144de Eric Dumazet 2018-06-26 464 struct tcp_sock *oldtp, *newtp;
dba7d9b8c739df Eric Dumazet 2019-10-10 465 u32 seq;
242b1bbe5144de Eric Dumazet 2018-06-26 466
242b1bbe5144de Eric Dumazet 2018-06-26 467 if (!newsk)
242b1bbe5144de Eric Dumazet 2018-06-26 468 return NULL;
242b1bbe5144de Eric Dumazet 2018-06-26 469
242b1bbe5144de Eric Dumazet 2018-06-26 470 newicsk = inet_csk(newsk);
242b1bbe5144de Eric Dumazet 2018-06-26 471 newtp = tcp_sk(newsk);
242b1bbe5144de Eric Dumazet 2018-06-26 472 oldtp = tcp_sk(sk);
60e2a7780793ba Ursula Braun 2017-10-25 473
60e2a7780793ba Ursula Braun 2017-10-25 474 smc_check_reset_syn_req(oldtp, req, newtp);
^1da177e4c3f41 Linus Torvalds 2005-04-16 475
^1da177e4c3f41 Linus Torvalds 2005-04-16 476 /* Now setup tcp_sock */
31770e34e43d6c Florian Westphal 2017-08-30 477 newtp->pred_flags = 0;
31770e34e43d6c Florian Westphal 2017-08-30 478
dba7d9b8c739df Eric Dumazet 2019-10-10 479 seq = treq->rcv_isn + 1;
dba7d9b8c739df Eric Dumazet 2019-10-10 480 newtp->rcv_wup = seq;
7db48e98393028 Eric Dumazet 2019-10-10 481 WRITE_ONCE(newtp->copied_seq, seq);
dba7d9b8c739df Eric Dumazet 2019-10-10 482 WRITE_ONCE(newtp->rcv_nxt, seq);
a9d99ce28ed359 Eric Dumazet 2016-03-06 483 newtp->segs_in = 1;
435cf559f02ea3 William Allen Simpson 2009-12-02 484
e0d694d638dba7 Eric Dumazet 2019-10-10 485 seq = treq->snt_isn + 1;
e0d694d638dba7 Eric Dumazet 2019-10-10 486 newtp->snd_sml = newtp->snd_una = seq;
e0d694d638dba7 Eric Dumazet 2019-10-10 487 WRITE_ONCE(newtp->snd_nxt, seq);
e0d694d638dba7 Eric Dumazet 2019-10-10 488 newtp->snd_up = seq;
^1da177e4c3f41 Linus Torvalds 2005-04-16 489
46d3ceabd8d98e Eric Dumazet 2012-07-11 490 INIT_LIST_HEAD(&newtp->tsq_node);
e2080072ed2d98 Eric Dumazet 2017-10-04 491 INIT_LIST_HEAD(&newtp->tsorted_sent_queue);
^1da177e4c3f41 Linus Torvalds 2005-04-16 492
ee7537b63a28b4 Hantzis Fotis 2009-03-02 493 tcp_init_wl(newtp, treq->rcv_isn);
^1da177e4c3f41 Linus Torvalds 2005-04-16 494
ac9517fcf31032 Eric Dumazet 2017-05-16 495 minmax_reset(&newtp->rtt_min, tcp_jiffies32, ~0U);
70eabf0e1b8fe1 Eric Dumazet 2017-05-16 496 newicsk->icsk_ack.lrcvtime = tcp_jiffies32;
^1da177e4c3f41 Linus Torvalds 2005-04-16 497
9a568de4818dea Eric Dumazet 2017-05-16 498 newtp->lsndtime = tcp_jiffies32;
d8ed625044cded Eric Dumazet 2015-09-22 499 newsk->sk_txhash = treq->txhash;
375fe02c917929 Yuchung Cheng 2013-07-22 500 newtp->total_retrans = req->num_retrans;
^1da177e4c3f41 Linus Torvalds 2005-04-16 501
^1da177e4c3f41 Linus Torvalds 2005-04-16 502 tcp_init_xmit_timers(newsk);
0f31746452e679 Eric Dumazet 2019-10-10 503 WRITE_ONCE(newtp->write_seq, newtp->pushed_seq = treq->snt_isn + 1);
^1da177e4c3f41 Linus Torvalds 2005-04-16 504
^1da177e4c3f41 Linus Torvalds 2005-04-16 505 if (sock_flag(newsk, SOCK_KEEPOPEN))
463c84b97f2401 Arnaldo Carvalho de Melo 2005-08-09 506 inet_csk_reset_keepalive_timer(newsk,
^1da177e4c3f41 Linus Torvalds 2005-04-16 507 keepalive_time_when(newtp));
^1da177e4c3f41 Linus Torvalds 2005-04-16 508
2e6599cb899ba4 Arnaldo Carvalho de Melo 2005-06-18 509 newtp->rx_opt.tstamp_ok = ireq->tstamp_ok;
713bafea929201 Yuchung Cheng 2017-11-08 510 newtp->rx_opt.sack_ok = ireq->sack_ok;
ed53d0ab761f5c Eric Dumazet 2015-10-08 511 newtp->window_clamp = req->rsk_window_clamp;
ed53d0ab761f5c Eric Dumazet 2015-10-08 512 newtp->rcv_ssthresh = req->rsk_rcv_wnd;
ed53d0ab761f5c Eric Dumazet 2015-10-08 513 newtp->rcv_wnd = req->rsk_rcv_wnd;
2e6599cb899ba4 Arnaldo Carvalho de Melo 2005-06-18 514 newtp->rx_opt.wscale_ok = ireq->wscale_ok;
^1da177e4c3f41 Linus Torvalds 2005-04-16 515 if (newtp->rx_opt.wscale_ok) {
2e6599cb899ba4 Arnaldo Carvalho de Melo 2005-06-18 516 newtp->rx_opt.snd_wscale = ireq->snd_wscale;
2e6599cb899ba4 Arnaldo Carvalho de Melo 2005-06-18 517 newtp->rx_opt.rcv_wscale = ireq->rcv_wscale;
^1da177e4c3f41 Linus Torvalds 2005-04-16 518 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 519 newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 520 newtp->window_clamp = min(newtp->window_clamp, 65535U);
^1da177e4c3f41 Linus Torvalds 2005-04-16 521 }
242b1bbe5144de Eric Dumazet 2018-06-26 522 newtp->snd_wnd = ntohs(tcp_hdr(skb)->window) << newtp->rx_opt.snd_wscale;
^1da177e4c3f41 Linus Torvalds 2005-04-16 523 newtp->max_window = newtp->snd_wnd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 524
^1da177e4c3f41 Linus Torvalds 2005-04-16 525 if (newtp->rx_opt.tstamp_ok) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 526 newtp->rx_opt.ts_recent = req->ts_recent;
cca9bab1b72cd2 Arnd Bergmann 2018-07-11 527 newtp->rx_opt.ts_recent_stamp = ktime_get_seconds();
^1da177e4c3f41 Linus Torvalds 2005-04-16 528 newtp->tcp_header_len = sizeof(struct tcphdr) + TCPOLEN_TSTAMP_ALIGNED;
^1da177e4c3f41 Linus Torvalds 2005-04-16 529 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 530 newtp->rx_opt.ts_recent_stamp = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 531 newtp->tcp_header_len = sizeof(struct tcphdr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 532 }
336c39a0315139 Yuchung Cheng 2019-04-29 533 if (req->num_timeout) {
336c39a0315139 Yuchung Cheng 2019-04-29 534 newtp->undo_marker = treq->snt_isn;
336c39a0315139 Yuchung Cheng 2019-04-29 535 newtp->retrans_stamp = div_u64(treq->snt_synack,
336c39a0315139 Yuchung Cheng 2019-04-29 536 USEC_PER_SEC / TCP_TS_HZ);
336c39a0315139 Yuchung Cheng 2019-04-29 537 }
95a22caee396ce Florian Westphal 2016-12-01 538 newtp->tsoffset = treq->ts_off;
cfb6eeb4c86059 YOSHIFUJI Hideaki 2006-11-14 539 #ifdef CONFIG_TCP_MD5SIG
cfb6eeb4c86059 YOSHIFUJI Hideaki 2006-11-14 540 newtp->md5sig_info = NULL; /*XXX*/
cfb6eeb4c86059 YOSHIFUJI Hideaki 2006-11-14 541 if (newtp->af_specific->md5_lookup(sk, newsk))
cfb6eeb4c86059 YOSHIFUJI Hideaki 2006-11-14 542 newtp->tcp_header_len += TCPOLEN_MD5SIG_ALIGNED;
cfb6eeb4c86059 YOSHIFUJI Hideaki 2006-11-14 543 #endif
bee7ca9ec03a26 William Allen Simpson 2009-11-10 544 if (skb->len >= TCP_MSS_DEFAULT + newtp->tcp_header_len)
463c84b97f2401 Arnaldo Carvalho de Melo 2005-08-09 545 newicsk->icsk_ack.last_seg_size = skb->len - newtp->tcp_header_len;
^1da177e4c3f41 Linus Torvalds 2005-04-16 546 newtp->rx_opt.mss_clamp = req->mss;
735d383117e113 Florian Westphal 2014-09-29 547 tcp_ecn_openreq_child(newtp, req);
8b485ce69876c6 Eric Dumazet 2017-05-03 548 newtp->fastopen_req = NULL;
d983ea6f16b835 Eric Dumazet 2019-10-10 549 RCU_INIT_POINTER(newtp->fastopen_rsk, NULL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 550
e80251555f0bef Jakub Sitnicki 2020-02-18 @551 tcp_bpf_clone(sk, newsk);
e80251555f0bef Jakub Sitnicki 2020-02-18 552
90bbcc608369a1 Eric Dumazet 2016-04-27 553 __TCP_INC_STATS(sock_net(sk), TCP_MIB_PASSIVEOPENS);
242b1bbe5144de Eric Dumazet 2018-06-26 554
^1da177e4c3f41 Linus Torvalds 2005-04-16 555 return newsk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 556 }
4bc2f18ba4f22a Eric Dumazet 2010-07-09 557 EXPORT_SYMBOL(tcp_create_openreq_child);
^1da177e4c3f41 Linus Torvalds 2005-04-16 558
:::::: The code at line 551 was first introduced by commit
:::::: e80251555f0befd1271e74b080bccf0ff0348bfc tcp_bpf: Don't let child socket inherit parent protocol ops on copy
:::::: TO: Jakub Sitnicki <jakub(a)cloudflare.com>
:::::: CC: Daniel Borkmann <daniel(a)iogearbox.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[dhowells-fs:keys-acl 20/24] security/smack/smack_lsm.c:4301:3: error: use of undeclared identifier 'auth_can_override'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git keys-acl
head: 06a67e452fb9c5815f6181878949ab31178c6d67
commit: 94bb4170063bccdace680e10a634433d0801534f [20/24] keys: Move permissions checking decisions into the checking code
config: x86_64-randconfig-a015-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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/dhowells/linux-fs.git/com...
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs keys-acl
git checkout 94bb4170063bccdace680e10a634433d0801534f
# 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 errors (new ones prefixed by >>):
>> security/smack/smack_lsm.c:4301:3: error: use of undeclared identifier 'auth_can_override'
auth_can_override = true;
^
security/smack/smack_lsm.c:4319:3: error: use of undeclared identifier 'auth_can_override'
auth_can_override = true;
^
security/smack/smack_lsm.c:4331:3: error: use of undeclared identifier 'auth_can_override'
auth_can_override = true;
^
security/smack/smack_lsm.c:4349:6: error: use of undeclared identifier 'auth_can_override'
if (auth_can_override && cred->request_key_auth) {
^
>> security/smack/smack_lsm.c:4352:10: error: incomplete definition of type 'struct request_key_auth'
if (rka->target_key == key)
~~~^
security/smack/smack_lsm.c:4350:10: note: forward declaration of 'struct request_key_auth'
struct request_key_auth *rka =
^
>> security/smack/smack_lsm.c:4352:26: error: use of undeclared identifier 'key'; did you mean 'keyp'?
if (rka->target_key == key)
^~~
keyp
security/smack/smack_lsm.c:4270:14: note: 'keyp' declared here
struct key *keyp;
^
>> security/smack/smack_lsm.c:4353:5: error: use of undeclared identifier '_perm'
*_perm = 0;
^
7 errors generated.
vim +/auth_can_override +4301 security/smack/smack_lsm.c
4255
4256 /**
4257 * smack_key_permission - Smack access on a key
4258 * @key_ref: gets to the object
4259 * @cred: the credentials to use
4260 * @need_perm: requested key permission
4261 *
4262 * Return 0 if the task has read and write to the object,
4263 * an error code otherwise
4264 */
4265 static int smack_key_permission(key_ref_t key_ref,
4266 const struct cred *cred,
4267 enum key_need_perm need_perm,
4268 unsigned int flags)
4269 {
4270 struct key *keyp;
4271 struct smk_audit_info ad;
4272 struct smack_known *tkp = smk_of_task(smack_cred(cred));
4273 int request = 0;
4274 int rc;
4275
4276 keyp = key_ref_to_ptr(key_ref);
4277 if (keyp == NULL)
4278 return -EINVAL;
4279 /*
4280 * If the key hasn't been initialized give it access so that
4281 * it may do so.
4282 */
4283 if (keyp->security == NULL)
4284 return 0;
4285 /*
4286 * This should not occur
4287 */
4288 if (tkp == NULL)
4289 return -EACCES;
4290
4291 /*
4292 * Validate requested permissions
4293 */
4294 switch (need_perm) {
4295 case KEY_NEED_ASSUME_AUTHORITY:
4296 return 0;
4297
4298 case KEY_NEED_DESCRIBE:
4299 case KEY_NEED_GET_SECURITY:
4300 request |= MAY_READ;
> 4301 auth_can_override = true;
4302 break;
4303
4304 case KEY_NEED_CHOWN:
4305 case KEY_NEED_INVALIDATE:
4306 case KEY_NEED_JOIN:
4307 case KEY_NEED_LINK:
4308 case KEY_NEED_KEYRING_ADD:
4309 case KEY_NEED_KEYRING_CLEAR:
4310 case KEY_NEED_KEYRING_DELETE:
4311 case KEY_NEED_REVOKE:
4312 case KEY_NEED_SETPERM:
4313 case KEY_NEED_SET_RESTRICTION:
4314 case KEY_NEED_UPDATE:
4315 request |= MAY_WRITE;
4316 break;
4317
4318 case KEY_NEED_INSTANTIATE:
4319 auth_can_override = true;
4320 break;
4321
4322 case KEY_NEED_READ:
4323 case KEY_NEED_SEARCH:
4324 case KEY_NEED_USE:
4325 case KEY_NEED_WATCH:
4326 request |= MAY_READ;
4327 break;
4328
4329 case KEY_NEED_SET_TIMEOUT:
4330 request |= MAY_WRITE;
4331 auth_can_override = true;
4332 break;
4333
4334 case KEY_NEED_UNLINK:
4335 return 0; /* Mustn't prevent this; KEY_FLAG_KEEP is already
4336 * dealt with. */
4337
4338 default:
4339 WARN_ON(1);
4340 return -EINVAL;
4341 }
4342
4343 /* Just allow the operation if the process has an authorisation token.
4344 * The presence of the token means that the kernel delegated
4345 * instantiation of a key to the process - which is problematic if we
4346 * then say that the process isn't allowed to get the description of
4347 * the key or actually instantiate it.
4348 */
4349 if (auth_can_override && cred->request_key_auth) {
4350 struct request_key_auth *rka =
4351 cred->request_key_auth->payload.data[0];
> 4352 if (rka->target_key == key)
> 4353 *_perm = 0;
4354 }
4355
4356 if (smack_privileged_cred(CAP_MAC_OVERRIDE, cred))
4357 return 0;
4358
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months
[powerpc:next-test 68/159] arch/powerpc/platforms/amigaone/setup.c:73:13: error: no previous prototype for 'amigaone_discover_phbs'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 5811244192fc4e18c001c69300044c2acf30bd91
commit: 053d58c870298d62b9c5154672ef2f1684c4ea43 [68/159] powerpc/amigaone: Move PHB discovery
config: powerpc64-randconfig-r036-20210209 (attached as .config)
compiler: powerpc-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/powerpc/linux.git/commit/...
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc next-test
git checkout 053d58c870298d62b9c5154672ef2f1684c4ea43
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64
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 >>):
arch/powerpc/platforms/amigaone/setup.c:27:6: error: no previous prototype for 'amigaone_show_cpuinfo' [-Werror=missing-prototypes]
27 | void amigaone_show_cpuinfo(struct seq_file *m)
| ^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/amigaone/setup.c:67:13: error: no previous prototype for 'amigaone_setup_arch' [-Werror=missing-prototypes]
67 | void __init amigaone_setup_arch(void)
| ^~~~~~~~~~~~~~~~~~~
>> arch/powerpc/platforms/amigaone/setup.c:73:13: error: no previous prototype for 'amigaone_discover_phbs' [-Werror=missing-prototypes]
73 | void __init amigaone_discover_phbs(void)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/amigaone/setup.c:85:13: error: no previous prototype for 'amigaone_init_IRQ' [-Werror=missing-prototypes]
85 | void __init amigaone_init_IRQ(void)
| ^~~~~~~~~~~~~~~~~
arch/powerpc/platforms/amigaone/setup.c:125:17: error: no previous prototype for 'amigaone_restart' [-Werror=missing-prototypes]
125 | void __noreturn amigaone_restart(char *cmd)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/amigaone_discover_phbs +73 arch/powerpc/platforms/amigaone/setup.c
72
> 73 void __init amigaone_discover_phbs(void)
74 {
75 struct device_node *np;
76 int phb = -ENODEV;
77
78 /* Lookup PCI host bridges. */
79 for_each_compatible_node(np, "pci", "mai-logic,articia-s")
80 phb = amigaone_add_bridge(np);
81
82 BUG_ON(phb != 0);
83 }
84
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 7 months