public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [bobrik:ivan/audit-bitmap 1/1] include/linux/audit.h:595:32: error: use of undeclared identifier 'NR_syscalls'
@ 2023-07-12 22:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-12 22:31 UTC (permalink / raw)
  To: Ivan Babrou; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/bobrik/linux ivan/audit-bitmap
head:   e0fb84ed26c0b014ac537368d3de5f398f2d2620
commit: e0fb84ed26c0b014ac537368d3de5f398f2d2620 [1/1] audit: check syscall bitmap on entry to avoid extra work
config: riscv-randconfig-r026-20230712 (https://download.01.org/0day-ci/archive/20230713/202307130633.42OnTSb0-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce: (https://download.01.org/0day-ci/archive/20230713/202307130633.42OnTSb0-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/202307130633.42OnTSb0-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/auditfilter.c:12:
>> include/linux/audit.h:595:32: error: use of undeclared identifier 'NR_syscalls'
   extern int audit_syscall_rules[NR_syscalls];
                                  ^
   include/linux/audit.h:596:46: error: use of undeclared identifier 'NR_syscalls'
   extern DECLARE_BITMAP(audit_syscalls_bitmap, NR_syscalls);
                                                ^
   2 errors generated.
--
   In file included from security/commoncap.c:6:
>> include/linux/audit.h:595:32: error: use of undeclared identifier 'NR_syscalls'
   extern int audit_syscall_rules[NR_syscalls];
                                  ^
   include/linux/audit.h:596:46: error: use of undeclared identifier 'NR_syscalls'
   extern DECLARE_BITMAP(audit_syscalls_bitmap, NR_syscalls);
                                                ^
   In file included from security/commoncap.c:12:
   include/linux/mman.h:154:9: warning: division by zero is undefined [-Wdivision-by-zero]
                  _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:132:21: note: expanded from macro '_calc_vm_trans'
      : ((x) & (bit1)) / ((bit1) / (bit2))))
                       ^ ~~~~~~~~~~~~~~~~~
   1 warning and 2 errors generated.


vim +/NR_syscalls +595 include/linux/audit.h

   593	
   594	extern int audit_n_syscall_rules;
 > 595	extern int audit_syscall_rules[NR_syscalls];
   596	extern DECLARE_BITMAP(audit_syscalls_bitmap, NR_syscalls);
   597	#else /* CONFIG_AUDITSYSCALL */
   598	static inline int audit_alloc(struct task_struct *task)
   599	{
   600		return 0;
   601	}
   602	static inline void audit_free(struct task_struct *task)
   603	{ }
   604	static inline void audit_uring_entry(u8 op)
   605	{ }
   606	static inline void audit_uring_exit(int success, long code)
   607	{ }
   608	static inline void audit_syscall_entry(int major, unsigned long a0,
   609					       unsigned long a1, unsigned long a2,
   610					       unsigned long a3)
   611	{ }
   612	static inline void audit_syscall_exit(void *pt_regs)
   613	{ }
   614	static inline bool audit_dummy_context(void)
   615	{
   616		return true;
   617	}
   618	static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
   619	{ }
   620	static inline struct audit_context *audit_context(void)
   621	{
   622		return NULL;
   623	}
   624	static inline struct filename *audit_reusename(const __user char *name)
   625	{
   626		return NULL;
   627	}
   628	static inline void audit_getname(struct filename *name)
   629	{ }
   630	static inline void audit_inode(struct filename *name,
   631					const struct dentry *dentry,
   632					unsigned int aflags)
   633	{ }
   634	static inline void audit_file(struct file *file)
   635	{
   636	}
   637	static inline void audit_inode_parent_hidden(struct filename *name,
   638					const struct dentry *dentry)
   639	{ }
   640	static inline void audit_inode_child(struct inode *parent,
   641					     const struct dentry *dentry,
   642					     const unsigned char type)
   643	{ }
   644	static inline void audit_core_dumps(long signr)
   645	{ }
   646	static inline void audit_seccomp(unsigned long syscall, long signr, int code)
   647	{ }
   648	static inline void audit_seccomp_actions_logged(const char *names,
   649							const char *old_names, int res)
   650	{ }
   651	static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
   652	{ }
   653	static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
   654						gid_t gid, umode_t mode)
   655	{ }
   656	static inline void audit_bprm(struct linux_binprm *bprm)
   657	{ }
   658	static inline int audit_socketcall(int nargs, unsigned long *args)
   659	{
   660		return 0;
   661	}
   662	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-12 22:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 22:31 [bobrik:ivan/audit-bitmap 1/1] include/linux/audit.h:595:32: error: use of undeclared identifier 'NR_syscalls' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox