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: powerpc64-randconfig-r016-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/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
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 errors (new ones prefixed by >>):
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:102: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 fs/crypto/keyring.c:26:
In file included from fs/crypto/fscrypt_private.h:17:
In file included from include/linux/blk-crypto.h:72:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
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>:104: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 fs/crypto/keyring.c:26:
In file included from fs/crypto/fscrypt_private.h:17:
In file included from include/linux/blk-crypto.h:72:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
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>:106: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 fs/crypto/keyring.c:26:
In file included from fs/crypto/fscrypt_private.h:17:
In file included from include/linux/blk-crypto.h:72:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
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>:108: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 fs/crypto/keyring.c:26:
In file included from fs/crypto/fscrypt_private.h:17:
In file included from include/linux/blk-crypto.h:72:
In file included from include/linux/blkdev.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
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>:110: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))
~~~~~~~~~~~~~~~~~~~~~^
> fs/crypto/keyring.c:145:58: error: too few arguments to function
call, expected 5, have 4
keyref = keyring_search(keyref, type,
description, false);
~~~~~~~~~~~~~~ ^
include/linux/key.h:434:18: note: 'keyring_search' declared here
extern key_ref_t keyring_search(key_ref_t keyring,
^
12 warnings and 1 error generated.
vim +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