From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4742FC433EF for ; Wed, 24 Nov 2021 14:23:00 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-537-GyM2mEtKNJi5zGbedmE_pQ-1; Wed, 24 Nov 2021 09:22:46 -0500 X-MC-Unique: GyM2mEtKNJi5zGbedmE_pQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22093EC1AA; Wed, 24 Nov 2021 14:22:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A4E61002388; Wed, 24 Nov 2021 14:22:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BB17D4BB7C; Wed, 24 Nov 2021 14:22:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AODM2cK012141 for ; Wed, 24 Nov 2021 08:22:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id F37B351E4; Wed, 24 Nov 2021 13:22:01 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED7A551E3 for ; Wed, 24 Nov 2021 13:21:57 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EF709800141 for ; Wed, 24 Nov 2021 13:21:56 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-104-kAMsm9FgNPuTRx553srRhQ-1; Wed, 24 Nov 2021 08:21:54 -0500 X-MC-Unique: kAMsm9FgNPuTRx553srRhQ-1 X-IronPort-AV: E=McAfee;i="6200,9189,10177"; a="222496985" X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="222496985" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2021 05:20:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,260,1631602800"; d="scan'208";a="457035789" Received: from lkp-server02.sh.intel.com (HELO 9e1e9f9b3bcb) ([10.239.97.151]) by orsmga003.jf.intel.com with ESMTP; 24 Nov 2021 05:20:47 -0800 Received: from kbuild by 9e1e9f9b3bcb with local (Exim 4.92) (envelope-from ) id 1mpsCd-0004p3-10; Wed, 24 Nov 2021 13:20:47 +0000 Date: Wed, 24 Nov 2021 21:19:48 +0800 From: kernel test robot To: Casey Schaufler , casey.schaufler@intel.com, jmorris@namei.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Subject: Re: [PATCH v30 06/28] LSM: Use lsmblob in security_audit_rule_match Message-ID: <202111242150.wktMJDSN-lkp@intel.com> References: <20211124014332.36128-7-casey@schaufler-ca.com> MIME-Version: 1.0 In-Reply-To: <20211124014332.36128-7-casey@schaufler-ca.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: linux-audit@redhat.com X-Mailman-Approved-At: Wed, 24 Nov 2021 09:20:44 -0500 Cc: john.johansen@canonical.com, kbuild-all@lists.01.org, linux-audit@redhat.com X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Casey, I love your patch! Yet something to improve: [auto build test ERROR on nf-next/master] [also build test ERROR on nf/master linus/master v5.16-rc2] [cannot apply to pcmoore-audit/next jmorris-security/next-testing next-20211124] [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/integrity-disassociate-ima_filter_rule-from-security_audit_rule/20211124-104307 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: riscv-randconfig-r042-20211124 (https://download.01.org/0day-ci/archive/20211124/202111242150.wktMJDSN-lkp@intel.com/config) compiler: riscv32-linux-gcc (GCC) 11.2.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/4d65fc1987e5710b2911159149f0de12d2202631 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Casey-Schaufler/integrity-disassociate-ima_filter_rule-from-security_audit_rule/20211124-104307 git checkout 4d65fc1987e5710b2911159149f0de12d2202631 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash drivers/android/ kernel/ net/bridge/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from kernel/fork.c:50: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/fork.c:161:13: warning: no previous prototype for 'arch_release_task_struct' [-Wmissing-prototypes] 161 | void __weak arch_release_task_struct(struct task_struct *tsk) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/fork.c:763:20: warning: no previous prototype for 'arch_task_cache_init' [-Wmissing-prototypes] 763 | void __init __weak arch_task_cache_init(void) { } | ^~~~~~~~~~~~~~~~~~~~ -- In file included from include/linux/perf_event.h:59, from include/linux/trace_events.h:10, from include/trace/syscall.h:7, from include/linux/syscalls.h:88, from kernel/exec_domain.c:19: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ -- In file included from include/linux/perf_event.h:59, from include/linux/trace_events.h:10, from include/trace/syscall.h:7, from include/linux/syscalls.h:88, from kernel/exit.c:42: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/exit.c:1817:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes] 1817 | __weak void abort(void) | ^~~~~ -- In file included from include/net/scm.h:8, from include/linux/netlink.h:9, from include/uapi/linux/neighbour.h:6, from include/linux/netdevice.h:45, from include/linux/if_vlan.h:10, from include/linux/filter.h:19, from kernel/kallsyms.c:25: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/kallsyms.c:586:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes] 586 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, | ^~~~~~~~~~~~~~~~ kernel/kallsyms.c:874:30: warning: 'kallsyms_proc_ops' defined but not used [-Wunused-const-variable=] 874 | static const struct proc_ops kallsyms_proc_ops = { | ^~~~~~~~~~~~~~~~~ -- In file included from include/linux/perf_event.h:59, from include/linux/trace_events.h:10, from include/trace/syscall.h:7, from include/linux/syscalls.h:88, from kernel/audit.c:44: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/audit.c: In function 'audit_log_vformat': kernel/audit.c:1926:9: warning: function 'audit_log_vformat' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 1926 | len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args); | ^~~ kernel/audit.c:1935:17: warning: function 'audit_log_vformat' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 1935 | len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2); | ^~~ -- In file included from include/linux/audit.h:14, from kernel/auditfilter.c:12: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/auditfilter.c: In function 'audit_filter': >> kernel/auditfilter.c:1376:50: error: implicit declaration of function 'security_audit_rule_match'; did you mean 'security_audit_rule_free'? [-Werror=implicit-function-declaration] 1376 | result = security_audit_rule_match( | ^~~~~~~~~~~~~~~~~~~~~~~~~ | security_audit_rule_free cc1: some warnings being treated as errors -- In file included from include/linux/audit.h:14, from kernel/auditsc.c:45: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/auditsc.c: In function 'audit_filter_rules': >> kernel/auditsc.c:674:42: error: implicit declaration of function 'security_audit_rule_match'; did you mean 'security_audit_rule_free'? [-Werror=implicit-function-declaration] 674 | result = security_audit_rule_match(&blob, | ^~~~~~~~~~~~~~~~~~~~~~~~~ | security_audit_rule_free cc1: some warnings being treated as errors -- In file included from include/net/scm.h:8, from include/linux/netlink.h:9, from include/uapi/linux/neighbour.h:6, from include/linux/netdevice.h:45, from include/linux/etherdevice.h:21, from net/bridge/br_netlink_tunnel.c:11: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ net/bridge/br_netlink_tunnel.c:29:6: warning: no previous prototype for 'vlan_tunid_inrange' [-Wmissing-prototypes] 29 | bool vlan_tunid_inrange(const struct net_bridge_vlan *v_curr, | ^~~~~~~~~~~~~~~~~~ net/bridge/br_netlink_tunnel.c:196:5: warning: no previous prototype for 'br_vlan_tunnel_info' [-Wmissing-prototypes] 196 | int br_vlan_tunnel_info(const struct net_bridge_port *p, int cmd, | ^~~~~~~~~~~~~~~~~~~ -- In file included from include/net/scm.h:8, from include/linux/netlink.h:9, from include/uapi/linux/neighbour.h:6, from include/linux/netdevice.h:45, from include/linux/if_vlan.h:10, from include/linux/filter.h:19, from kernel/bpf/core.c:21: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/bpf/core.c:1368:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes] 1368 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr) | ^~~~~~~~~~~~~~~~~~~~~ -- In file included from include/net/scm.h:8, from include/linux/netlink.h:9, from include/uapi/linux/neighbour.h:6, from include/linux/netdevice.h:45, from include/linux/if_vlan.h:10, from include/linux/filter.h:19, from include/linux/bpf_verifier.h:9, from kernel/bpf/btf.c:19: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/bpf/btf.c: In function 'btf_seq_show': kernel/bpf/btf.c:5888:29: warning: function 'btf_seq_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 5888 | seq_vprintf((struct seq_file *)show->target, fmt, args); | ^~~~~~~~ kernel/bpf/btf.c: In function 'btf_snprintf_show': kernel/bpf/btf.c:5925:9: warning: function 'btf_snprintf_show' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] 5925 | len = vsnprintf(show->target, ssnprintf->len_left, fmt, args); | ^~~ -- In file included from kernel/sched/sched.h:62, from kernel/sched/core.c:13: >> include/linux/security.h:1974:66: error: expected ';', ',' or ')' before 'secid' 1974 | static inline int security_audit_rule_match(struct lsmblob *blob secid, | ^~~~~ kernel/sched/core.c:3439:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes] 3439 | void sched_set_stop_task(int cpu, struct task_struct *stop) | ^~~~~~~~~~~~~~~~~~~ .. vim +1974 include/linux/security.h 1973 > 1974 static inline int security_audit_rule_match(struct lsmblob *blob secid, 1975 u32 field, u32 op, 1976 struct audit_rules *lsmrules) 1977 { 1978 return 0; 1979 } 1980 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit