Hi Deven,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on dm/for-next]
[also build test WARNING on pcmoore-selinux/next linus/master v5.8-rc5 next-20200717]
[cannot apply to security/next-testing]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Deven-Bowers/Integrity-Policy-En...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-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=m68k
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 >>):
> security/ipe/ipe-pin.c:34:6: warning: no previous prototype for
'ipe_is_from_pinned_sb' [-Wmissing-prototypes]
34 | bool
ipe_is_from_pinned_sb(const struct file *file)
| ^~~~~~~~~~~~~~~~~~~~~
> security/ipe/ipe-pin.c:62:6: warning: no previous prototype for
'ipe_pin_superblock' [-Wmissing-prototypes]
62 | void
ipe_pin_superblock(const struct file *file)
| ^~~~~~~~~~~~~~~~~~
> security/ipe/ipe-pin.c:81:6: warning: no previous prototype for
'ipe_invalidate_pinned_sb' [-Wmissing-prototypes]
81 | void
ipe_invalidate_pinned_sb(const struct super_block *mnt_sb)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/scatterlist.h:9,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/lsm_audit.h:24,
from security/ipe/properties/../ipe-property.h:9,
from security/ipe/properties/boot-verified.c:8:
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
430 | rom_out_8(port, *buf++);
| ^~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro
'rom_out_be16'
448 | rom_out_be16(port, *buf++);
| ^~~~~~~~~~~~
arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used
[-Wunused-but-set-variable]
90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); \
| ^~~
arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro
'rom_out_le16'
466 | rom_out_le16(port, *buf++);
| ^~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from security/ipe/properties/../ipe.h:12,
from security/ipe/properties/boot-verified.c:6:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with
null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET
&& (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro
'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/bug.h:32,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/preempt.h:5,
from ./arch/m68k/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/wait.h:9,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from security/ipe/properties/../ipe.h:12,
from security/ipe/properties/boot-verified.c:6:
include/linux/dma-mapping.h: In function 'dma_map_resource':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with
null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET
&& (void *)(kaddr) < high_memory)
| ^~
include/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE'
144 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro
'virt_addr_valid'
170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn))
| ^~~~~~~~~~~~~~~
include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid'
352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
| ^~~~~~~~~
security/ipe/properties/boot-verified.c: At top level:
> security/ipe/properties/boot-verified.c:79:5: warning: no
previous prototype for 'ipe_init_bootv' [-Wmissing-prototypes]
79 |
int ipe_init_bootv(void)
| ^~~~~~~~~~~~~~
vim +/ipe_is_from_pinned_sb +34 security/ipe/ipe-pin.c
24
25 /**
26 * ipe_is_from_pinned_sb: Determine if @file originates from the initial
27 * super block that a file was executed from.
28 * @file: File to check if it originates from the super block.
29 *
30 * Return:
31 * true - File originates from the initial super block
32 * false - File does not originate from the initial super block
33 */
34 bool ipe_is_from_pinned_sb(const struct file *file)
35 {
36 bool rv = false;
37
38 spin_lock(&pinned_sb_spinlock);
39
40 /*
41 * Check if pinned_sb is set:
42 * NULL == not set -> exit
43 * ERR == was once set (and has been unmounted) -> exit
44 * AND check that the pinned sb is the same as the file's.
45 */
46 if (!IS_ERR_OR_NULL(pinned_sb) &&
47 file->f_path.mnt->mnt_sb == pinned_sb) {
48 rv = true;
49 goto cleanup;
50 }
51
52 cleanup:
53 spin_unlock(&pinned_sb_spinlock);
54 return rv;
55 }
56
57 /**
58 * ipe_pin_superblock: Attempt to save a file's super block address to later
59 * determine if a file originates from a super block.
60 * @file: File to source the super block from.
61 */
62 void ipe_pin_superblock(const struct file *file)
63 {
64 spin_lock(&pinned_sb_spinlock);
65
66 /* if set, return */
67 if (pinned_sb || !file)
68 goto cleanup;
69
70 pinned_sb = file->f_path.mnt->mnt_sb;
71 cleanup:
72 spin_unlock(&pinned_sb_spinlock);
73 }
74
75 /**
76 * ipe_invalidate_pinned_sb: Invalidate the saved super block.
77 * @mnt_sb: Super block to compare against the saved super block.
78 *
79 * This avoids authorizing a file when the super block does not exist anymore.
80 */
81 void ipe_invalidate_pinned_sb(const struct super_block *mnt_sb)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org