Re: [PATCH net 1/5] net: ipa: program metadata mask differently
by kernel test robot
Hi Alex,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net/master]
url: https://github.com/0day-ci/linux/commits/Alex-Elder/net-ipa-endpoint-conf...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 89dc68533b190117e1a2fb4298d88b96b3580abf
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
<< from drivers/net/ipa/ipa_endpoint.c:8:
>> drivers/net/ipa/ipa_endpoint.c:457:6: warning: no previous prototype for 'ipa_endpoint_init_hdr' [-Wmissing-prototypes]
457 | void ipa_endpoint_init_hdr(struct ipa_endpoint *endpoint)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bits.h:23,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from drivers/net/ipa/ipa_endpoint.c:8:
drivers/net/ipa/ipa_endpoint.c: In function 'ipa_endpoint_config':
include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ipa/ipa_endpoint.c:1546:12: note: in expansion of macro 'GENMASK'
1546 | tx_mask = GENMASK(max - 1, 0);
| ^~~~~~~
include/linux/bits.h:26:40: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
26 | __builtin_constant_p((l) > (h)), (l) > (h), 0)))
| ^
include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
| ^
include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHECK'
39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
| ^~~~~~~~~~~~~~~~~~~
drivers/net/ipa/ipa_endpoint.c:1546:12: note: in expansion of macro 'GENMASK'
1546 | tx_mask = GENMASK(max - 1, 0);
| ^~~~~~~
vim +/ipa_endpoint_init_hdr +457 drivers/net/ipa/ipa_endpoint.c
438
439 /**
440 * We program QMAP endpoints so each packet received is preceded by a QMAP
441 * header structure. The QMAP header contains a 1-byte mux_id and 2-byte
442 * packet size field, and we have the IPA hardware populate both for each
443 * received packet. The header is configured (in the HDR_EXT register)
444 * to use big endian format.
445 *
446 * The packet size is written into the QMAP header's pkt_len field. That
447 * location is defined here using the HDR_OFST_PKT_SIZE field.
448 *
449 * The mux_id comes from a 4-byte metadata value supplied with each packet
450 * by the modem. It is *not* a QMAP header, but it does contain the mux_id
451 * value that we want, in its low-order byte. A bitmask defined in the
452 * endpoint's METADATA_MASK register defines which byte within the modem
453 * metadata contains the mux_id. And the OFST_METADATA field programmed
454 * here indicates where the extracted byte should be placed within the QMAP
455 * header.
456 */
> 457 void ipa_endpoint_init_hdr(struct ipa_endpoint *endpoint)
458 {
459 u32 offset = IPA_REG_ENDP_INIT_HDR_N_OFFSET(endpoint->endpoint_id);
460 u32 val = 0;
461
462 if (endpoint->data->qmap) {
463 size_t header_size = sizeof(struct rmnet_map_header);
464
465 /* We might supply a checksum header after the QMAP header */
466 if (endpoint->toward_ipa && endpoint->data->checksum)
467 header_size += sizeof(struct rmnet_map_ul_csum_header);
468 val |= u32_encode_bits(header_size, HDR_LEN_FMASK);
469
470 /* Define how to fill mux_id in a received QMAP header */
471 if (!endpoint->toward_ipa) {
472 u32 off; /* Field offset within header */
473
474 /* Where IPA will write the metadata value */
475 off = offsetof(struct rmnet_map_header, mux_id);
476 val |= u32_encode_bits(off, HDR_OFST_METADATA_FMASK);
477
478 /* Where IPA will write the length */
479 off = offsetof(struct rmnet_map_header, pkt_len);
480 val |= HDR_OFST_PKT_SIZE_VALID_FMASK;
481 val |= u32_encode_bits(off, HDR_OFST_PKT_SIZE_FMASK);
482 }
483 /* For QMAP TX, metadata offset is 0 (modem assumes this) */
484 val |= HDR_OFST_METADATA_VALID_FMASK;
485
486 /* HDR_ADDITIONAL_CONST_LEN is 0; (RX only) */
487 /* HDR_A5_MUX is 0 */
488 /* HDR_LEN_INC_DEAGG_HDR is 0 */
489 /* HDR_METADATA_REG_VALID is 0 (TX only) */
490 }
491
492 iowrite32(val, endpoint->ipa->reg_virt + offset);
493 }
494
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
safexcel.c:undefined reference to `devm_platform_ioremap_resource'
by kernel test robot
Hi Brendan,
It's probably a bug fix that unveils the link errors.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 1af73a25e6e7d9f2f1e2a14259cc9ffce6d8f6d4 staging: exfat: fix multiple definition error of `rename_file'
date: 6 months ago
config: um-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 1af73a25e6e7d9f2f1e2a14259cc9ffce6d8f6d4
# 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 <<):
/usr/bin/ld: arch/um/drivers/vde.o: in function `vde_open_real':
(.text+0x9cb): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x61d): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: arch/um/drivers/vector_user.o: in function `user_init_socket_fds':
vector_user.c:(.text+0x53a): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: arch/um/drivers/pcap.o: in function `pcap_nametoaddr':
(.text+0x10095): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: arch/um/drivers/pcap.o: in function `pcap_nametonetaddr':
(.text+0x10155): warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: arch/um/drivers/pcap.o: in function `pcap_nametoproto':
(.text+0x10395): warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: arch/um/drivers/pcap.o: in function `pcap_nametoport':
(.text+0x1018b): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: drivers/mtd/nand/raw/cadence-nand-controller.o: in function `cadence_nand_dt_probe.cold':
cadence-nand-controller.c:(.text.unlikely+0xf2e): undefined reference to `devm_platform_ioremap_resource'
/usr/bin/ld: cadence-nand-controller.c:(.text.unlikely+0xfbd): undefined reference to `devm_ioremap_resource'
/usr/bin/ld: drivers/net/ethernet/xilinx/xilinx_axienet_main.o: in function `axienet_probe':
xilinx_axienet_main.c:(.text+0x1aa6): undefined reference to `devm_ioremap_resource'
/usr/bin/ld: xilinx_axienet_main.c:(.text+0x1d06): undefined reference to `devm_ioremap_resource'
/usr/bin/ld: xilinx_axienet_main.c:(.text+0x2001): undefined reference to `devm_ioremap_resource'
/usr/bin/ld: drivers/crypto/inside-secure/safexcel.o: in function `safexcel_probe':
>> safexcel.c:(.text+0x6d): undefined reference to `devm_platform_ioremap_resource'
/usr/bin/ld: drivers/crypto/amlogic/amlogic-gxl-core.o: in function `meson_crypto_probe':
amlogic-gxl-core.c:(.text+0x4d2): undefined reference to `devm_platform_ioremap_resource'
/usr/bin/ld: drivers/fsi/fsi-master-aspeed.o: in function `fsi_master_aspeed_probe':
fsi-master-aspeed.c:(.text+0x11e2): undefined reference to `devm_ioremap_resource'
collect2: error: ld returned 1 exit status
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[gpio:gpio-charger-mentioned 54/55] drivers/gpio/gpiolib-cdev.c:1127:5: warning: no previous prototype for function 'gpiolib_cdev_register'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-charger-mentioned
head: f9e5824140b913437cc820c3f8bb33353ee4961d
commit: f6d984418ffde19322fd149105200224ac2bc089 [54/55] gpiolib: split character device into gpiolib-cdev
config: powerpc-randconfig-r002-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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
git checkout f6d984418ffde19322fd149105200224ac2bc089
# 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: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/gpio/gpiolib-cdev.c:1127:5: warning: no previous prototype for function 'gpiolib_cdev_register' [-Wmissing-prototypes]
int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
^
drivers/gpio/gpiolib-cdev.c:1127:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
^
static
>> drivers/gpio/gpiolib-cdev.c:1145:6: warning: no previous prototype for function 'gpiolib_cdev_unregister' [-Wmissing-prototypes]
void gpiolib_cdev_unregister(struct gpio_device *gdev)
^
drivers/gpio/gpiolib-cdev.c:1145:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void gpiolib_cdev_unregister(struct gpio_device *gdev)
^
static
2 warnings generated.
vim +/gpiolib_cdev_register +1127 drivers/gpio/gpiolib-cdev.c
1126
> 1127 int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
1128 {
1129 int ret;
1130
1131 cdev_init(&gdev->chrdev, &gpio_fileops);
1132 gdev->chrdev.owner = THIS_MODULE;
1133 gdev->dev.devt = MKDEV(MAJOR(devt), gdev->id);
1134
1135 ret = cdev_device_add(&gdev->chrdev, &gdev->dev);
1136 if (ret)
1137 return ret;
1138
1139 chip_dbg(gdev->chip, "added GPIO chardev (%d:%d)\n",
1140 MAJOR(devt), gdev->id);
1141
1142 return 0;
1143 }
1144
> 1145 void gpiolib_cdev_unregister(struct gpio_device *gdev)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[gpio:gpio-charger-mentioned 54/55] drivers/gpio/gpiolib-cdev.c:1127:5: warning: no previous prototype for 'gpiolib_cdev_register'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-charger-mentioned
head: f9e5824140b913437cc820c3f8bb33353ee4961d
commit: f6d984418ffde19322fd149105200224ac2bc089 [54/55] gpiolib: split character device into gpiolib-cdev
config: parisc-randconfig-r005-20200611 (attached as .config)
compiler: hppa-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 f6d984418ffde19322fd149105200224ac2bc089
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>, old ones prefixed by <<):
In file included from arch/parisc/include/asm/io.h:6,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from arch/parisc/include/asm/hardirq.h:13,
from include/linux/hardirq.h:9,
from include/linux/interrupt.h:11,
from drivers/gpio/gpiolib-cdev.c:6:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
arch/parisc/include/asm/pgtable.h:322:34: note: in expansion of macro 'set_pte_at'
322 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:202:2: note: in expansion of macro 'pte_clear'
202 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:96:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
96 | pte_t old_pte; | ^~~~~~~
include/asm-generic/pgtable.h:641:2: note: in expansion of macro 'set_pte_at'
641 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
drivers/gpio/gpiolib-cdev.c: At top level:
>> drivers/gpio/gpiolib-cdev.c:1127:5: warning: no previous prototype for 'gpiolib_cdev_register' [-Wmissing-prototypes]
1127 | int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/gpio/gpiolib-cdev.c:1145:6: warning: no previous prototype for 'gpiolib_cdev_unregister' [-Wmissing-prototypes]
1145 | void gpiolib_cdev_unregister(struct gpio_device *gdev)
| ^~~~~~~~~~~~~~~~~~~~~~~
vim +/gpiolib_cdev_register +1127 drivers/gpio/gpiolib-cdev.c
1126
> 1127 int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
1128 {
1129 int ret;
1130
1131 cdev_init(&gdev->chrdev, &gpio_fileops);
1132 gdev->chrdev.owner = THIS_MODULE;
1133 gdev->dev.devt = MKDEV(MAJOR(devt), gdev->id);
1134
1135 ret = cdev_device_add(&gdev->chrdev, &gdev->dev);
1136 if (ret)
1137 return ret;
1138
1139 chip_dbg(gdev->chip, "added GPIO chardev (%d:%d)\n",
1140 MAJOR(devt), gdev->id);
1141
1142 return 0;
1143 }
1144
> 1145 void gpiolib_cdev_unregister(struct gpio_device *gdev)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/s390/crypto/pkey_api.c:1606 pkey_ccacipher_aes_attr_read() warn: inconsistent indenting
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 55d0a513a0e202c68af2c8f4b1e923a345227bbb s390/pkey/zcrypt: Support EP11 AES secure keys
date: 4 months ago
config: s390-randconfig-m031-20200611 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/s390/crypto/pkey_api.c:1606 pkey_ccacipher_aes_attr_read() warn: inconsistent indenting
vim +1606 drivers/s390/crypto/pkey_api.c
f71fee2711a788 Ingo Franzki 2019-08-20 1569
f71fee2711a788 Ingo Franzki 2019-08-20 1570 /*
f71fee2711a788 Ingo Franzki 2019-08-20 1571 * Sysfs attribute read function for all secure key ccacipher binary attributes.
f71fee2711a788 Ingo Franzki 2019-08-20 1572 * The implementation can not deal with partial reads, because a new random
f71fee2711a788 Ingo Franzki 2019-08-20 1573 * secure key blob is generated with each read. In case of partial reads
f71fee2711a788 Ingo Franzki 2019-08-20 1574 * (i.e. off != 0 or count < key blob size) -EINVAL is returned.
f71fee2711a788 Ingo Franzki 2019-08-20 1575 */
f71fee2711a788 Ingo Franzki 2019-08-20 1576 static ssize_t pkey_ccacipher_aes_attr_read(enum pkey_key_size keybits,
f71fee2711a788 Ingo Franzki 2019-08-20 1577 bool is_xts, char *buf, loff_t off,
f71fee2711a788 Ingo Franzki 2019-08-20 1578 size_t count)
f71fee2711a788 Ingo Franzki 2019-08-20 1579 {
55d0a513a0e202 Harald Freudenberger 2019-12-06 1580 int i, rc, card, dom;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1581 u32 nr_apqns, *apqns = NULL;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1582 size_t keysize = CCACIPHERTOKENSIZE;
f71fee2711a788 Ingo Franzki 2019-08-20 1583
f71fee2711a788 Ingo Franzki 2019-08-20 1584 if (off != 0 || count < CCACIPHERTOKENSIZE)
f71fee2711a788 Ingo Franzki 2019-08-20 1585 return -EINVAL;
f71fee2711a788 Ingo Franzki 2019-08-20 1586 if (is_xts)
f71fee2711a788 Ingo Franzki 2019-08-20 1587 if (count < 2 * CCACIPHERTOKENSIZE)
f71fee2711a788 Ingo Franzki 2019-08-20 1588 return -EINVAL;
f71fee2711a788 Ingo Franzki 2019-08-20 1589
55d0a513a0e202 Harald Freudenberger 2019-12-06 1590 /* build a list of apqns able to generate an cipher key */
55d0a513a0e202 Harald Freudenberger 2019-12-06 1591 rc = cca_findcard2(&apqns, &nr_apqns, 0xFFFF, 0xFFFF,
55d0a513a0e202 Harald Freudenberger 2019-12-06 1592 ZCRYPT_CEX6, 0, 0, 0);
f71fee2711a788 Ingo Franzki 2019-08-20 1593 if (rc)
f71fee2711a788 Ingo Franzki 2019-08-20 1594 return rc;
f71fee2711a788 Ingo Franzki 2019-08-20 1595
55d0a513a0e202 Harald Freudenberger 2019-12-06 1596 memset(buf, 0, is_xts ? 2 * keysize : keysize);
55d0a513a0e202 Harald Freudenberger 2019-12-06 1597
55d0a513a0e202 Harald Freudenberger 2019-12-06 1598 /* simple try all apqns from the list */
55d0a513a0e202 Harald Freudenberger 2019-12-06 1599 for (i = 0, rc = -ENODEV; i < nr_apqns; i++) {
55d0a513a0e202 Harald Freudenberger 2019-12-06 1600 card = apqns[i] >> 16;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1601 dom = apqns[i] & 0xFFFF;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1602 rc = cca_gencipherkey(card, dom, keybits, 0, buf, &keysize);
55d0a513a0e202 Harald Freudenberger 2019-12-06 1603 if (rc == 0)
55d0a513a0e202 Harald Freudenberger 2019-12-06 1604 break;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1605 }
f71fee2711a788 Ingo Franzki 2019-08-20 @1606 if (rc)
f71fee2711a788 Ingo Franzki 2019-08-20 1607 return rc;
f71fee2711a788 Ingo Franzki 2019-08-20 1608
55d0a513a0e202 Harald Freudenberger 2019-12-06 1609 if (is_xts) {
55d0a513a0e202 Harald Freudenberger 2019-12-06 1610 keysize = CCACIPHERTOKENSIZE;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1611 buf += CCACIPHERTOKENSIZE;
55d0a513a0e202 Harald Freudenberger 2019-12-06 1612 rc = cca_gencipherkey(card, dom, keybits, 0, buf, &keysize);
55d0a513a0e202 Harald Freudenberger 2019-12-06 1613 if (rc == 0)
f71fee2711a788 Ingo Franzki 2019-08-20 1614 return 2 * CCACIPHERTOKENSIZE;
f71fee2711a788 Ingo Franzki 2019-08-20 1615 }
f71fee2711a788 Ingo Franzki 2019-08-20 1616
f71fee2711a788 Ingo Franzki 2019-08-20 1617 return CCACIPHERTOKENSIZE;
f71fee2711a788 Ingo Franzki 2019-08-20 1618 }
f71fee2711a788 Ingo Franzki 2019-08-20 1619
:::::: The code at line 1606 was first introduced by commit
:::::: f71fee2711a788b94ff0acb02fbd2bfe2de7e0a3 s390/pkey: Add sysfs attributes to emit AES CIPHER key blobs
:::::: TO: Ingo Franzki <ifranzki(a)linux.ibm.com>
:::::: CC: Vasily Gorbik <gor(a)linux.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
drivers/firmware/meson/meson_sm.c:168:34: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 8cde3c2153e8f57be884c0e73f18bc4de150e870 firmware: meson_sm: Rework driver as a proper platform driver
date: 8 months ago
config: arm64-randconfig-s031-20200611 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 8cde3c2153e8f57be884c0e73f18bc4de150e870
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 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>
sparse warnings: (new ones prefixed by >>)
drivers/firmware/meson/meson_sm.c:83:24: sparse: sparse: Using plain integer as NULL pointer
>> drivers/firmware/meson/meson_sm.c:168:34: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const *q @@ got void [noderef] <asn:2> *sm_shmem_out_base @@
drivers/firmware/meson/meson_sm.c:168:34: sparse: expected void const *q
>> drivers/firmware/meson/meson_sm.c:168:34: sparse: got void [noderef] <asn:2> *sm_shmem_out_base
>> drivers/firmware/meson/meson_sm.c:204:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *p @@ got void [noderef] <asn:2> *sm_shmem_in_base @@
drivers/firmware/meson/meson_sm.c:204:18: sparse: expected void *p
>> drivers/firmware/meson/meson_sm.c:204:18: sparse: got void [noderef] <asn:2> *sm_shmem_in_base
vim +168 drivers/firmware/meson/meson_sm.c
76
77 static void __iomem *meson_sm_map_shmem(u32 cmd_shmem, unsigned int size)
78 {
79 u32 sm_phy_base;
80
81 sm_phy_base = __meson_sm_call(cmd_shmem, 0, 0, 0, 0, 0);
82 if (!sm_phy_base)
> 83 return 0;
84
85 return ioremap_cache(sm_phy_base, size);
86 }
87
88 /**
89 * meson_sm_call - generic SMC32 call to the secure-monitor
90 *
91 * @fw: Pointer to secure-monitor firmware
92 * @cmd_index: Index of the SMC32 function ID
93 * @ret: Returned value
94 * @arg0: SMC32 Argument 0
95 * @arg1: SMC32 Argument 1
96 * @arg2: SMC32 Argument 2
97 * @arg3: SMC32 Argument 3
98 * @arg4: SMC32 Argument 4
99 *
100 * Return: 0 on success, a negative value on error
101 */
102 int meson_sm_call(struct meson_sm_firmware *fw, unsigned int cmd_index,
103 u32 *ret, u32 arg0, u32 arg1, u32 arg2, u32 arg3, u32 arg4)
104 {
105 u32 cmd, lret;
106
107 if (!fw->chip)
108 return -ENOENT;
109
110 cmd = meson_sm_get_cmd(fw->chip, cmd_index);
111 if (!cmd)
112 return -EINVAL;
113
114 lret = __meson_sm_call(cmd, arg0, arg1, arg2, arg3, arg4);
115
116 if (ret)
117 *ret = lret;
118
119 return 0;
120 }
121 EXPORT_SYMBOL(meson_sm_call);
122
123 /**
124 * meson_sm_call_read - retrieve data from secure-monitor
125 *
126 * @fw: Pointer to secure-monitor firmware
127 * @buffer: Buffer to store the retrieved data
128 * @bsize: Size of the buffer
129 * @cmd_index: Index of the SMC32 function ID
130 * @arg0: SMC32 Argument 0
131 * @arg1: SMC32 Argument 1
132 * @arg2: SMC32 Argument 2
133 * @arg3: SMC32 Argument 3
134 * @arg4: SMC32 Argument 4
135 *
136 * Return: size of read data on success, a negative value on error
137 * When 0 is returned there is no guarantee about the amount of
138 * data read and bsize bytes are copied in buffer.
139 */
140 int meson_sm_call_read(struct meson_sm_firmware *fw, void *buffer,
141 unsigned int bsize, unsigned int cmd_index, u32 arg0,
142 u32 arg1, u32 arg2, u32 arg3, u32 arg4)
143 {
144 u32 size;
145 int ret;
146
147 if (!fw->chip)
148 return -ENOENT;
149
150 if (!fw->chip->cmd_shmem_out_base)
151 return -EINVAL;
152
153 if (bsize > fw->chip->shmem_size)
154 return -EINVAL;
155
156 if (meson_sm_call(fw, cmd_index, &size, arg0, arg1, arg2, arg3, arg4) < 0)
157 return -EINVAL;
158
159 if (size > bsize)
160 return -EINVAL;
161
162 ret = size;
163
164 if (!size)
165 size = bsize;
166
167 if (buffer)
> 168 memcpy(buffer, fw->sm_shmem_out_base, size);
169
170 return ret;
171 }
172 EXPORT_SYMBOL(meson_sm_call_read);
173
174 /**
175 * meson_sm_call_write - send data to secure-monitor
176 *
177 * @fw: Pointer to secure-monitor firmware
178 * @buffer: Buffer containing data to send
179 * @size: Size of the data to send
180 * @cmd_index: Index of the SMC32 function ID
181 * @arg0: SMC32 Argument 0
182 * @arg1: SMC32 Argument 1
183 * @arg2: SMC32 Argument 2
184 * @arg3: SMC32 Argument 3
185 * @arg4: SMC32 Argument 4
186 *
187 * Return: size of sent data on success, a negative value on error
188 */
189 int meson_sm_call_write(struct meson_sm_firmware *fw, void *buffer,
190 unsigned int size, unsigned int cmd_index, u32 arg0,
191 u32 arg1, u32 arg2, u32 arg3, u32 arg4)
192 {
193 u32 written;
194
195 if (!fw->chip)
196 return -ENOENT;
197
198 if (size > fw->chip->shmem_size)
199 return -EINVAL;
200
201 if (!fw->chip->cmd_shmem_in_base)
202 return -EINVAL;
203
> 204 memcpy(fw->sm_shmem_in_base, buffer, size);
205
206 if (meson_sm_call(fw, cmd_index, &written, arg0, arg1, arg2, arg3, arg4) < 0)
207 return -EINVAL;
208
209 if (!written)
210 return -EINVAL;
211
212 return written;
213 }
214 EXPORT_SYMBOL(meson_sm_call_write);
215
---
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] printk: Make linux/printk.h self-contained
by kernel test robot
Hi Herbert,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on pmladek/for-next linux/master 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/Herbert-Xu/printk-Make-linux-pri...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
config: powerpc64-randconfig-r013-20200611 (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
# 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 error/warnings (new ones prefixed by >>, old ones prefixed by <<):
WARNING: unmet direct dependencies detected for HOTPLUG_CPU
Depends on SMP && (PPC_PSERIES || PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE
Selected by
- PM_SLEEP_SMP && SMP && (ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE && PM_SLEEP
In file included from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/powerpc/include/asm/page_32.h: In function 'clear_page':
<< from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:87:4: error: implicit declaration of function '__WARN'
87 | __WARN(); | ^~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
<< from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:90:38: error: 'TAINT_WARN' undeclared (first use in this function)
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~
arch/powerpc/include/asm/bug.h:57:10: note: in definition of macro 'BUG_ENTRY'
57 | "i" (flags), | ^~~~~
<< from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:90:24: note: in expansion of macro 'BUGFLAG_TAINT'
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
arch/powerpc/include/asm/bug.h:90:38: note: each undeclared identifier is reported only once for each function it appears in
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~
arch/powerpc/include/asm/bug.h:57:10: note: in definition of macro 'BUG_ENTRY'
57 | "i" (flags), | ^~~~~
<< from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:90:24: note: in expansion of macro 'BUGFLAG_TAINT'
90 | BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), | ^~~~~~~~~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
<< from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:58:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
58 | "i" (sizeof(struct bug_entry)), | ^~~~~~
<< from arch/powerpc/include/asm/bug.h:109,
>> arch/powerpc/include/asm/bug.h:89:3: note: in expansion of macro 'BUG_ENTRY'
89 | BUG_ENTRY(PPC_TLNEI " %4, 0", | ^~~~~~~~~
>> arch/powerpc/include/asm/page_32.h:54:2: note: in expansion of macro 'WARN_ON'
54 | WARN_ON((unsigned long)addr & (L1_CACHE_BYTES - 1));
| ^~~~~~~
In file included from arch/powerpc/include/asm/ptrace.h:253,
from arch/powerpc/include/asm/hw_irq.h:12,
from arch/powerpc/include/asm/irqflags.h:12,
from include/linux/irqflags.h:16,
from include/asm-generic/cmpxchg-local.h:6,
from arch/powerpc/include/asm/cmpxchg.h:526,
from arch/powerpc/include/asm/atomic.h:11,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:44,
from include/linux/spinlock_types.h:18,
from include/linux/ratelimit_types.h:7,
from include/linux/printk.h:10,
from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/powerpc/include/asm/bug.h:109,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/linux/thread_info.h: In function 'copy_overflow':
>> include/linux/thread_info.h:134:2: error: implicit declaration of function 'WARN'
134 | WARN(1, "Buffer overflow detected (%d < %lu)!n", size, count);
| ^~~~
include/linux/thread_info.h: In function 'check_copy_size':
>> include/linux/thread_info.h:150:6: error: implicit declaration of function 'WARN_ON_ONCE'
150 | if (WARN_ON_ONCE(bytes > INT_MAX))
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux-gdb.py vmlinux.o vmlinux.strip vmlinux.strip.gz vmlinux.symvers [scripts/Makefile.build:114: kernel/bounds.s] Error 1
Target '__build' not remade because of errors.
Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux-gdb.py vmlinux.o vmlinux.strip vmlinux.strip.gz vmlinux.symvers [Makefile:1188: prepare0] Error 2
Target 'prepare' not remade because of errors.
make: Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux-gdb.py vmlinux.o vmlinux.strip vmlinux.strip.gz vmlinux.symvers [Makefile:185: __sub-make] Error 2
vim +/__WARN +87 arch/powerpc/include/asm/bug.h
73c9ceab40b1269 include/asm-powerpc/bug.h Jeremy Fitzhardinge 2006-12-08 51
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 52 #define BUG_ENTRY(insn, flags, ...) \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 53 __asm__ __volatile__( \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 54 "1: " insn "\n" \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 55 _EMIT_BUG_ENTRY \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 56 : : "i" (__FILE__), "i" (__LINE__), \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 57 "i" (flags), \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 @58 "i" (sizeof(struct bug_entry)), \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 59 ##__VA_ARGS__)
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 60
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 61 /*
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 62 * BUG_ON() and WARN_ON() do their best to cooperate with compile-time
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 63 * optimisations. However depending on the complexity of the condition
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 64 * some compiler versions may not produce optimal results.
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 65 */
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 66
^1da177e4c3f415 include/asm-ppc64/bug.h Linus Torvalds 2005-04-16 67 #define BUG() do { \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 68 BUG_ENTRY("twi 31, 0, 0", 0); \
01ae45bcd48527e arch/powerpc/include/asm/bug.h David Daney 2009-12-10 69 unreachable(); \
^1da177e4c3f415 include/asm-ppc64/bug.h Linus Torvalds 2005-04-16 70 } while (0)
^1da177e4c3f415 include/asm-ppc64/bug.h Linus Torvalds 2005-04-16 71
^1da177e4c3f415 include/asm-ppc64/bug.h Linus Torvalds 2005-04-16 72 #define BUG_ON(x) do { \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 73 if (__builtin_constant_p(x)) { \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 74 if (x) \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 75 BUG(); \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 76 } else { \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 77 BUG_ENTRY(PPC_TLNEI " %4, 0", 0, "r" ((__force long)(x))); \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 78 } \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 79 } while (0)
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 80
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 81 #define __WARN_FLAGS(flags) BUG_ENTRY("twi 31, 0, 0", BUGFLAG_WARNING | (flags))
^1da177e4c3f415 include/asm-ppc64/bug.h Linus Torvalds 2005-04-16 82
684f978347deb42 include/asm-powerpc/bug.h Herbert Xu 2006-09-29 83 #define WARN_ON(x) ({ \
8d4fbcfbe0a4bfc include/asm-powerpc/bug.h Linus Torvalds 2007-07-31 84 int __ret_warn_on = !!(x); \
684f978347deb42 include/asm-powerpc/bug.h Herbert Xu 2006-09-29 85 if (__builtin_constant_p(__ret_warn_on)) { \
684f978347deb42 include/asm-powerpc/bug.h Herbert Xu 2006-09-29 86 if (__ret_warn_on) \
872345b715ee02f include/asm-powerpc/bug.h Andrew Morton 2006-03-27 @87 __WARN(); \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 88 } else { \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 @89 BUG_ENTRY(PPC_TLNEI " %4, 0", \
43f003bb74b9b27 arch/powerpc/include/asm/bug.h Christophe Leroy 2019-08-19 @90 BUGFLAG_WARNING | BUGFLAG_TAINT(TAINT_WARN), \
73c9ceab40b1269 include/asm-powerpc/bug.h Jeremy Fitzhardinge 2006-12-08 91 "r" (__ret_warn_on)); \
e3f94b85f98a346 include/asm-powerpc/bug.h Michael Ellerman 2006-03-23 92 } \
684f978347deb42 include/asm-powerpc/bug.h Herbert Xu 2006-09-29 93 unlikely(__ret_warn_on); \
684f978347deb42 include/asm-powerpc/bug.h Herbert Xu 2006-09-29 94 })
^1da177e4c3f415 include/asm-ppc64/bug.h Linus Torvalds 2005-04-16 95
:::::: The code at line 87 was first introduced by commit
:::::: 872345b715ee02f3b45528449f0d11b44ef9ebb8 [PATCH] git-powerpc: WARN was a dumb idea
:::::: TO: Andrew Morton <akpm(a)osdl.org>
:::::: CC: Paul Mackerras <paulus(a)samba.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b29482fde649c72441d5478a4ea2c52c56d97a5e
commit: 793b08e2efff3ec020c5c5861d00ed394fcdd488 powerpc/kexec: Move kexec files into a dedicated subdir.
date: 7 months ago
config: powerpc-randconfig-s032-20200611 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-250-g42323db3-dirty
git checkout 793b08e2efff3ec020c5c5861d00ed394fcdd488
# save the attached .config to linux build tree
make W=1 C=1 ARCH=powerpc 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>
sparse warnings: (new ones prefixed by >>)
>> arch/powerpc/kexec/core.c:246:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:246:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_base
arch/powerpc/kexec/core.c:246:29: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:248:29: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:248:29: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] crashk_size
arch/powerpc/kexec/core.c:248:29: sparse: got restricted __be32 [usertype]
arch/powerpc/kexec/core.c:256:19: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] mem_limit @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:256:19: sparse: expected unsigned long long static [addressable] [toplevel] mem_limit
arch/powerpc/kexec/core.c:256:19: sparse: got restricted __be32 [usertype]
>> arch/powerpc/kexec/core.c:272:20: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end @@ got restricted __be32 [usertype] @@
arch/powerpc/kexec/core.c:272:20: sparse: expected unsigned long long static [addressable] [toplevel] [usertype] kernel_end
arch/powerpc/kexec/core.c:272:20: sparse: got restricted __be32 [usertype]
vim +246 arch/powerpc/kexec/core.c
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 235
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 236 static void __init export_crashk_values(struct device_node *node)
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 237 {
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 238 /* There might be existing crash kernel properties, but we can't
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 239 * be sure what's in them, so remove them. */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 240 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 241 "linux,crashkernel-base", NULL));
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 242 of_remove_property(node, of_find_property(node,
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 243 "linux,crashkernel-size", NULL));
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 244
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 245 if (crashk_res.start != 0) {
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @246 crashk_base = cpu_to_be_ulong(crashk_res.start),
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 247 of_add_property(node, &crashk_base_prop);
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @248 crashk_size = cpu_to_be_ulong(resource_size(&crashk_res));
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 249 of_add_property(node, &crashk_size_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 250 }
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 251
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 252 /*
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 253 * memory_limit is required by the kexec-tools to limit the
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 254 * crash regions to the actual memory used.
4bc77a5ed215b4 arch/powerpc/kernel/machine_kexec.c Suzuki Poulose 2012-08-21 255 */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 256 mem_limit = cpu_to_be_ulong(memory_limit);
79d1c712958f94 arch/powerpc/kernel/machine_kexec.c Nathan Fontenot 2012-10-02 257 of_update_property(node, &memory_limit_prop);
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 258 }
6f29c3298b1821 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-17 259
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 260 static int __init kexec_setup(void)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 261 {
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 262 struct device_node *node;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 263
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 264 node = of_find_node_by_path("/chosen");
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 265 if (!node)
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 266 return -ENOENT;
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 267
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 268 /* remove any stale properties so ours can be found */
925e2d1ded80fc arch/powerpc/kernel/machine_kexec.c Suraj Jitindar Singh 2016-04-28 269 of_remove_property(node, of_find_property(node, kernel_end_prop.name, NULL));
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 270
2e8e4f5b80e101 arch/powerpc/kernel/machine_kexec.c Dale Farnsworth 2008-12-16 271 /* information needed by userspace when using default_machine_kexec */
ea961a828fe725 arch/powerpc/kernel/machine_kexec.c Anton Blanchard 2014-01-22 @272 kernel_end = cpu_to_be_ulong(__pa(_end));
:::::: The code at line 246 was first introduced by commit
:::::: ea961a828fe7250e954f086d74d9323c3d44c3e4 powerpc: Fix endian issues in kexec and crash dump code
:::::: TO: Anton Blanchard <anton(a)samba.org>
:::::: CC: Benjamin Herrenschmidt <benh(a)kernel.crashing.org>
---
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 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: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
# 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: kernel test robot <lkp(a)intel.com>
All error/warnings (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/arm/include/asm/bitops.h:123,
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/non-atomic.h:104:66: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
104 | static inline int test_bit(int nr, const volatile unsigned long *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included 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:
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 *}
arch/arm/include/asm/bitops.h:183:45: note: in definition of macro 'ATOMIC_BITOP'
183 | #define ATOMIC_BITOP(name,nr,p) _##name(nr,p)
| ^
>> net/bluetooth/sco.c:868:4: note: in expansion of macro 'set_bit'
868 | set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
| ^~~~~~~
arch/arm/include/asm/bitops.h:153:55: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
153 | extern void _set_bit(int nr, volatile unsigned long * p);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^
>> 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 *}
arch/arm/include/asm/bitops.h:183:45: note: in definition of macro 'ATOMIC_BITOP'
183 | #define ATOMIC_BITOP(name,nr,p) _##name(nr,p)
| ^
>> net/bluetooth/sco.c:870:4: note: in expansion of macro 'clear_bit'
870 | clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
| ^~~~~~~~~
arch/arm/include/asm/bitops.h:154:57: note: expected 'volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
154 | extern void _clear_bit(int nr, volatile unsigned long * p);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^
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/arm/include/asm/bitops.h:123,
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/non-atomic.h:104:66: note: expected 'const volatile long unsigned int *' but argument is of type '__u8 *' {aka 'unsigned char *'}
104 | static inline int test_bit(int nr, const volatile unsigned long *addr)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
cc1: some warnings being treated as errors
vim +/_set_bit +868 net/bluetooth/sco.c
804
805 static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
806 char __user *optval, unsigned int optlen)
807 {
808 struct sock *sk = sock->sk;
809 int len, err = 0;
810 struct bt_voice voice;
811 u32 opt;
812
813 BT_DBG("sk %p", sk);
814
815 lock_sock(sk);
816
817 switch (optname) {
818
819 case BT_DEFER_SETUP:
820 if (sk->sk_state != BT_BOUND && sk->sk_state != BT_LISTEN) {
821 err = -EINVAL;
822 break;
823 }
824
825 if (get_user(opt, (u32 __user *) optval)) {
826 err = -EFAULT;
827 break;
828 }
829
830 if (opt)
831 set_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
832 else
833 clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags);
834 break;
835
836 case BT_VOICE:
837 if (sk->sk_state != BT_OPEN && sk->sk_state != BT_BOUND &&
838 sk->sk_state != BT_CONNECT2) {
839 err = -EINVAL;
840 break;
841 }
842
843 voice.setting = sco_pi(sk)->setting;
844
845 len = min_t(unsigned int, sizeof(voice), optlen);
846 if (copy_from_user((char *)&voice, optval, len)) {
847 err = -EFAULT;
848 break;
849 }
850
851 /* Explicitly check for these values */
852 if (voice.setting != BT_VOICE_TRANSPARENT &&
853 voice.setting != BT_VOICE_CVSD_16BIT) {
854 err = -EINVAL;
855 break;
856 }
857
858 sco_pi(sk)->setting = voice.setting;
859 break;
860
861 case BT_PKT_STATUS:
862 if (get_user(opt, (u32 __user *)optval)) {
863 err = -EFAULT;
864 break;
865 }
866
867 if (opt)
> 868 set_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
869 else
> 870 clear_bit(SCO_CMSG_PKT_STATUS, &sco_pi(sk)->cmsg_mask);
871 break;
872
873 default:
874 err = -ENOPROTOOPT;
875 break;
876 }
877
878 release_sock(sk);
879 return err;
880 }
881
---
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] printk: Make linux/printk.h self-contained
by kernel test robot
Hi Herbert,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on pmladek/for-next linux/master 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/Herbert-Xu/printk-Make-linux-pri...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b29482fde649c72441d5478a4ea2c52c56d97a5e
config: s390-allyesconfig (attached as .config)
compiler: s390-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
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 >>, old ones prefixed by <<):
In file included from drivers/block/drbd/drbd_interval.c:2:
>> arch/s390/include/asm/bug.h:43: warning: "BUG" redefined
43 | #define BUG() do { |
In file included from include/linux/bug.h:32,
from include/linux/mmdebug.h:5,
from arch/s390/include/asm/cmpxchg.h:11,
from arch/s390/include/asm/atomic.h:16,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:44,
from include/linux/spinlock_types.h:18,
from include/linux/ratelimit_types.h:7,
from include/linux/printk.h:10,
from include/linux/kernel.h:15,
from arch/s390/include/asm/bug.h:5,
from drivers/block/drbd/drbd_interval.c:2:
include/asm-generic/bug.h:54: note: this is the location of the previous definition
54 | #define BUG() do { |
In file included from drivers/block/drbd/drbd_interval.c:2:
>> arch/s390/include/asm/bug.h:52: warning: "WARN_ON" redefined
52 | #define WARN_ON(x) ({ |
In file included from include/linux/bug.h:32,
from include/linux/mmdebug.h:5,
from arch/s390/include/asm/cmpxchg.h:11,
from arch/s390/include/asm/atomic.h:16,
from include/linux/atomic.h:7,
from include/linux/debug_locks.h:6,
from include/linux/lockdep.h:44,
from include/linux/spinlock_types.h:18,
from include/linux/ratelimit_types.h:7,
from include/linux/printk.h:10,
from include/linux/kernel.h:15,
from arch/s390/include/asm/bug.h:5,
from drivers/block/drbd/drbd_interval.c:2:
include/asm-generic/bug.h:112: note: this is the location of the previous definition
112 | #define WARN_ON(condition) ({ |
vim +/BUG +43 arch/s390/include/asm/bug.h
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 42
2d6cd2a5908ade arch/s390/include/asm/bug.h Martin Schwidefsky 2008-12-25 @43 #define BUG() do { \
2d6cd2a5908ade arch/s390/include/asm/bug.h Martin Schwidefsky 2008-12-25 44 __EMIT_BUG(0); \
5506e68975c346 arch/s390/include/asm/bug.h David Daney 2009-12-04 45 unreachable(); \
2d6cd2a5908ade arch/s390/include/asm/bug.h Martin Schwidefsky 2008-12-25 46 } while (0)
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 47
19d436268dde95 arch/s390/include/asm/bug.h Peter Zijlstra 2017-02-25 48 #define __WARN_FLAGS(flags) do { \
19d436268dde95 arch/s390/include/asm/bug.h Peter Zijlstra 2017-02-25 49 __EMIT_BUG(BUGFLAG_WARNING|(flags)); \
a9df8e325d0de5 arch/s390/include/asm/bug.h Heiko Carstens 2010-01-13 50 } while (0)
a9df8e325d0de5 arch/s390/include/asm/bug.h Heiko Carstens 2010-01-13 51
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 @52 #define WARN_ON(x) ({ \
fd0cbdd378258f include/asm-s390/bug.h Heiko Carstens 2007-08-02 53 int __ret_warn_on = !!(x); \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 54 if (__builtin_constant_p(__ret_warn_on)) { \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 55 if (__ret_warn_on) \
b2be05273a1744 arch/s390/include/asm/bug.h Ben Hutchings 2010-04-03 56 __WARN(); \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 57 } else { \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 58 if (unlikely(__ret_warn_on)) \
b2be05273a1744 arch/s390/include/asm/bug.h Ben Hutchings 2010-04-03 59 __WARN(); \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 60 } \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 61 unlikely(__ret_warn_on); \
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 62 })
c0007f1a65762e include/asm-s390/bug.h Heiko Carstens 2007-04-27 63
:::::: The code at line 43 was first introduced by commit
:::::: 2d6cd2a5908adecd06c8cee2a73814463ed71493 [S390] remove warnings with functions ending in BUG
:::::: TO: Martin Schwidefsky <schwidefsky(a)de.ibm.com>
:::::: CC: Martin Schwidefsky <schwidefsky(a)de.ibm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months