[PATCH v23 20/23] Audit: Add new record for multiple process LSM attributes

kernel test robot lkp at intel.com
Sat Nov 21 00:02:47 UTC 2020


Hi Casey,

I love your patch! Perhaps something to improve:

[auto build test WARNING on nf/master]
[also build test WARNING on linus/master v5.10-rc4 next-20201120]
[cannot apply to nf-next/master 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/Casey-Schaufler/LSM-Module-stacking-for-AppArmor/20201121-044616
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: nios2-randconfig-r012-20201120 (attached as .config)
compiler: nios2-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
        # https://github.com/0day-ci/linux/commit/5214e557315977360cc15d57d0622591dc5805c5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Casey-Schaufler/LSM-Module-stacking-for-AppArmor/20201121-044616
        git checkout 5214e557315977360cc15d57d0622591dc5805c5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   In file included from security/integrity/integrity_audit.c:12:
   include/linux/audit.h:585:1: error: expected identifier or '(' before '+' token
     585 | +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
         | ^
   security/integrity/integrity_audit.c: In function 'integrity_audit_message':
   security/integrity/integrity_audit.c:48:12: error: implicit declaration of function 'audit_alloc_for_lsm'; did you mean 'audit_log_lsm'? [-Werror=implicit-function-declaration]
      48 |  context = audit_alloc_for_lsm(GFP_KERNEL);
         |            ^~~~~~~~~~~~~~~~~~~
         |            audit_log_lsm
>> security/integrity/integrity_audit.c:48:10: warning: assignment to 'struct audit_context *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      48 |  context = audit_alloc_for_lsm(GFP_KERNEL);
         |          ^
   cc1: some warnings being treated as errors
--
   In file included from net/netlabel/netlabel_user.c:20:
   include/linux/audit.h:585:1: error: expected identifier or '(' before '+' token
     585 | +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
         | ^
   net/netlabel/netlabel_user.c: In function 'netlbl_audit_start_common':
   net/netlabel/netlabel_user.c:93:14: error: implicit declaration of function 'audit_alloc_for_lsm'; did you mean 'audit_log_lsm'? [-Werror=implicit-function-declaration]
      93 |  audit_ctx = audit_alloc_for_lsm(GFP_ATOMIC);
         |              ^~~~~~~~~~~~~~~~~~~
         |              audit_log_lsm
>> net/netlabel/netlabel_user.c:93:12: warning: assignment to 'struct audit_context *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      93 |  audit_ctx = audit_alloc_for_lsm(GFP_ATOMIC);
         |            ^
   cc1: some warnings being treated as errors

vim +48 security/integrity/integrity_audit.c

    35	
    36	void integrity_audit_message(int audit_msgno, struct inode *inode,
    37				     const unsigned char *fname, const char *op,
    38				     const char *cause, int result, int audit_info,
    39				     int errno)
    40	{
    41		struct audit_context *context;
    42		struct audit_buffer *ab;
    43		char name[TASK_COMM_LEN];
    44	
    45		if (!integrity_audit_info && audit_info == 1)	/* Skip info messages */
    46			return;
    47	
  > 48		context = audit_alloc_for_lsm(GFP_KERNEL);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


More information about the Linux-security-module-archive mailing list