Hi Casey,

I love your patch! Perhaps something to improve:

[auto build test WARNING on nf-next/master]
[also build test WARNING on nf/master linus/master v5.10-rc2 next-20201104]
[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/Casey-Schaufler/LSM-Module-stacking-for-AppArmor/20201105-091817
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: arm-randconfig-r024-20201104 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
09ec07827b1128504457a93dee80b2ceee1af600)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # 
https://github.com/0day-ci/linux/commit/3fc93335d8a4090601fe221c305017ca73c23c61
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Casey-Schaufler/LSM-Module-stacking-for-AppArmor/20201105-091817
        git checkout 3fc93335d8a4090601fe221c305017ca73c23c61
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

   In file included from kernel/audit.c:51:
   include/linux/audit.h:585:1: error: expected external declaration
   +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
   ^
   kernel/audit.c:393:12: error: implicit declaration of function 
'audit_alloc_for_lsm' [-Werror,-Wimplicit-function-declaration]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                     ^
   kernel/audit.c:393:12: note: did you mean 'audit_alloc_local'?
   include/linux/audit.h:585:38: note: 'audit_alloc_local' declared here
   +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
                                        ^
>> kernel/audit.c:393:10: warning: incompatible integer to pointer conversion 
>> assigning to 'struct audit_context *' from 'int' [-Wint-conversion]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/audit.c:1357:15: error: implicit declaration of function 
'audit_alloc_for_lsm' [-Werror,-Wimplicit-function-declaration]
                           lcontext = audit_alloc_for_lsm(GFP_KERNEL);
                                      ^
   kernel/audit.c:1357:13: warning: incompatible integer to pointer conversion 
assigning to 'struct audit_context *' from 'int' [-Wint-conversion]
                           lcontext = audit_alloc_for_lsm(GFP_KERNEL);
                                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/audit.c:1560:12: error: implicit declaration of function 
'audit_alloc_for_lsm' [-Werror,-Wimplicit-function-declaration]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                     ^
   kernel/audit.c:1560:10: warning: incompatible integer to pointer conversion 
assigning to 'struct audit_context *' from 'int' [-Wint-conversion]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/audit.c:1781:14: warning: no previous prototype for function 
'audit_serial' [-Wmissing-prototypes]
   unsigned int audit_serial(void)
                ^
   kernel/audit.c:1781:1: note: declare 'static' if the function is not 
intended to be used outside of this translation unit
   unsigned int audit_serial(void)
   ^
   static 
   kernel/audit.c:2294:12: error: implicit declaration of function 
'audit_alloc_for_lsm' [-Werror,-Wimplicit-function-declaration]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                     ^
   kernel/audit.c:2294:10: warning: incompatible integer to pointer conversion 
assigning to 'struct audit_context *' from 'int' [-Wint-conversion]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   5 warnings and 5 errors generated.
--
   In file included from kernel/auditfilter.c:12:
   include/linux/audit.h:585:1: error: expected external declaration
   +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
   ^
   kernel/auditfilter.c:1107:12: error: implicit declaration of function 
'audit_alloc_for_lsm' [-Werror,-Wimplicit-function-declaration]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                     ^
   kernel/auditfilter.c:1107:12: note: did you mean 'audit_alloc_local'?
   include/linux/audit.h:585:38: note: 'audit_alloc_local' declared here
   +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
                                        ^
>> kernel/auditfilter.c:1107:10: warning: incompatible integer to pointer 
>> conversion assigning to 'struct audit_context *' from 'int' 
>> [-Wint-conversion]
           context = audit_alloc_for_lsm(GFP_KERNEL);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 2 errors generated.
--
   In file included from net/netlabel/netlabel_user.c:20:
   include/linux/audit.h:585:1: error: expected external declaration
   +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
   ^
   net/netlabel/netlabel_user.c:93:14: error: implicit declaration of function 
'audit_alloc_for_lsm' [-Werror,-Wimplicit-function-declaration]
           audit_ctx = audit_alloc_for_lsm(GFP_ATOMIC);
                       ^
   net/netlabel/netlabel_user.c:93:14: note: did you mean 'audit_alloc_local'?
   include/linux/audit.h:585:38: note: 'audit_alloc_local' declared here
   +static inline struct audit_context *audit_alloc_local(gfp_t gfpflags)
                                        ^
>> net/netlabel/netlabel_user.c:93:12: warning: incompatible integer to pointer 
>> conversion assigning to 'struct audit_context *' from 'int' 
>> [-Wint-conversion]
           audit_ctx = audit_alloc_for_lsm(GFP_ATOMIC);
                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning and 2 errors generated.

vim +393 kernel/audit.c

   385  
   386  static int audit_log_config_change(char *function_name, u32 new, u32 
old,
   387                                     int allow_changes)
   388  {
   389          struct audit_context *context;
   390          struct audit_buffer *ab;
   391          int rc = 0;
   392  
 > 393          context = audit_alloc_for_lsm(GFP_KERNEL);
   394          ab = audit_log_start(context, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
   395          if (unlikely(!ab))
   396                  return rc;
   397          audit_log_format(ab, "op=set %s=%u old=%u ", function_name, 
new, old);
   398          audit_log_session_info(ab);
   399          rc = audit_log_task_context(ab);
   400          if (rc)
   401                  allow_changes = 0; /* Something weird, deny request */
   402          audit_log_format(ab, " res=%d", allow_changes);
   403          audit_log_end_local(ab, context);
   404          return rc;
   405  }
   406  

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

Attachment: .config.gz
Description: application/gzip

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit

Reply via email to