From: kernel test robot <lkp@intel.com>
To: Roberto Sassu <roberto.sassu@huawei.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [robertosassu:evm-fscaps-v2 29/29] security/security.c:2375:8: error: call to undeclared function 'ima_inode_set_fscaps'; ISO C99 and later do not support implicit function declarations
Date: Thu, 7 Mar 2024 10:56:42 +0800 [thread overview]
Message-ID: <202403071011.ToNWLeka-lkp@intel.com> (raw)
tree: https://github.com/robertosassu/linux evm-fscaps-v2
head: 49621962de7e9bad18b99e21dcb8b32f5af7b61e
commit: 49621962de7e9bad18b99e21dcb8b32f5af7b61e [29/29] fixes
config: hexagon-randconfig-002-20240307 (https://download.01.org/0day-ci/archive/20240307/202403071011.ToNWLeka-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240307/202403071011.ToNWLeka-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403071011.ToNWLeka-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from security/security.c:14:
In file included from include/linux/bpf.h:31:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from security/security.c:14:
In file included from include/linux/bpf.h:31:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from security/security.c:14:
In file included from include/linux/bpf.h:31:
In file included from include/linux/memcontrol.h:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
>> security/security.c:2375:8: error: call to undeclared function 'ima_inode_set_fscaps'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
ret = ima_inode_set_fscaps(idmap, dentry, caps, flags);
^
security/security.c:2375:8: note: did you mean 'evm_inode_set_fscaps'?
include/linux/evm.h:181:19: note: 'evm_inode_set_fscaps' declared here
static inline int evm_inode_set_fscaps(struct mnt_idmap *idmap,
^
>> security/security.c:2434:8: error: call to undeclared function 'ima_inode_remove_fscaps'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
ret = ima_inode_remove_fscaps(dentry);
^
security/security.c:2434:8: note: did you mean 'evm_inode_remove_fscaps'?
include/linux/evm.h:188:19: note: 'evm_inode_remove_fscaps' declared here
static inline int evm_inode_remove_fscaps(struct dentry *dentry)
^
6 warnings and 2 errors generated.
vim +/ima_inode_set_fscaps +2375 security/security.c
2353
2354 /**
2355 * security_inode_set_fscaps() - Check if setting fscaps is allowed
2356 * @idmap: idmap of the mount
2357 * @dentry: file
2358 * @caps: fscaps to be written
2359 * @flags: flags for setxattr
2360 *
2361 * Check permission before setting the file capabilities given in @vfs_caps.
2362 *
2363 * Return: Returns 0 if permission is granted.
2364 */
2365 int security_inode_set_fscaps(struct mnt_idmap *idmap, struct dentry *dentry,
2366 const struct vfs_caps *caps, int flags)
2367 {
2368 int ret;
2369
2370 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2371 return 0;
2372 ret = call_int_hook(inode_set_fscaps, 0, idmap, dentry, caps, flags);
2373 if (ret)
2374 return ret;
> 2375 ret = ima_inode_set_fscaps(idmap, dentry, caps, flags);
2376 if (ret)
2377 return ret;
2378 return evm_inode_set_fscaps(idmap, dentry, caps, flags);
2379 }
2380
2381 /**
2382 * security_inode_post_set_fscaps() - Update the inode after setting fscaps
2383 * @idmap: idmap of the mount
2384 * @dentry: file
2385 * @caps: fscaps to be written
2386 * @flags: flags for setxattr
2387 *
2388 * Update inode security field after successfully setting fscaps.
2389 *
2390 */
2391 void security_inode_post_set_fscaps(struct mnt_idmap *idmap,
2392 struct dentry *dentry,
2393 const struct vfs_caps *caps, int flags)
2394 {
2395 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2396 return;
2397 call_void_hook(inode_post_set_fscaps, idmap, dentry, caps, flags);
2398 evm_inode_post_set_fscaps(idmap, dentry, caps, flags);
2399 }
2400
2401 /**
2402 * security_inode_get_fscaps() - Check if reading fscaps is allowed
2403 * @dentry: file
2404 *
2405 * Check permission before getting fscaps.
2406 *
2407 * Return: Returns 0 if permission is granted.
2408 */
2409 int security_inode_get_fscaps(struct mnt_idmap *idmap, struct dentry *dentry)
2410 {
2411 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2412 return 0;
2413 return call_int_hook(inode_get_fscaps, 0, idmap, dentry);
2414 }
2415
2416 /**
2417 * security_inode_remove_fscaps() - Check if removing fscaps is allowed
2418 * @idmap: idmap of the mount
2419 * @dentry: file
2420 *
2421 * Check permission before removing fscaps.
2422 *
2423 * Return: Returns 0 if permission is granted.
2424 */
2425 int security_inode_remove_fscaps(struct mnt_idmap *idmap, struct dentry *dentry)
2426 {
2427 int ret;
2428
2429 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2430 return 0;
2431 ret = call_int_hook(inode_remove_fscaps, 0, idmap, dentry);
2432 if (ret)
2433 return ret;
> 2434 ret = ima_inode_remove_fscaps(dentry);
2435 if (ret)
2436 return ret;
2437 return evm_inode_remove_fscaps(dentry);
2438 }
2439
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-07 2:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202403071011.ToNWLeka-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=roberto.sassu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.