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.133.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 C419CC433FE for ; Tue, 19 Apr 2022 03:17:00 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-186-BafW8SS9M9KmqFYyYXglJw-1; Mon, 18 Apr 2022 23:16:56 -0400 X-MC-Unique: BafW8SS9M9KmqFYyYXglJw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3A8E101AA44; Tue, 19 Apr 2022 03:16:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id F21E81415125; Tue, 19 Apr 2022 03:16:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 87E5D1947BBD; Tue, 19 Apr 2022 03:16:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D260B1947BBB for ; Tue, 19 Apr 2022 00:42:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A057C17452; Tue, 19 Apr 2022 00:42:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BCFB17103 for ; Tue, 19 Apr 2022 00:42:17 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 7B99D85A5A8 for ; Tue, 19 Apr 2022 00:42:17 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-136-vKU7omYoMm-L3cbqYS6oig-1; Mon, 18 Apr 2022 20:42:15 -0400 X-MC-Unique: vKU7omYoMm-L3cbqYS6oig-1 X-IronPort-AV: E=McAfee;i="6400,9594,10321"; a="263816925" X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="263816925" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 17:42:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,271,1643702400"; d="scan'208";a="726849810" Received: from lkp-server01.sh.intel.com (HELO 3abc53900bec) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 18 Apr 2022 17:42:08 -0700 Received: from kbuild by 3abc53900bec with local (Exim 4.95) (envelope-from ) id 1ngbwV-000588-Sj; Tue, 19 Apr 2022 00:42:07 +0000 Date: Tue, 19 Apr 2022 08:41:06 +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 v35 13/29] LSM: Use lsmblob in security_cred_getsecid Message-ID: <202204190850.dXILQlrb-lkp@intel.com> References: <20220418145945.38797-14-casey@schaufler-ca.com> MIME-Version: 1.0 In-Reply-To: <20220418145945.38797-14-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-Mailman-Approved-At: Tue, 19 Apr 2022 03:16:52 +0000 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: john.johansen@canonical.com, kbuild-all@lists.01.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-audit@redhat.com, linux-integrity@vger.kernel.org Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 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 pcmoore-selinux/next] [also build test ERROR on linus/master v5.18-rc3 next-20220414] [cannot apply to pcmoore-audit/next jmorris-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/intel-lab-lkp/linux/commits/Casey-Schaufler/integrity-disassociate-ima_filter_rule-from-security_audit_rule/20220419-000109 base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next config: arm-milbeaut_m10v_defconfig (https://download.01.org/0day-ci/archive/20220419/202204190850.dXILQlrb-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec) 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/intel-lab-lkp/linux/commit/2fa01492487f9135e9ea9e59924289cc23a66576 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Casey-Schaufler/integrity-disassociate-ima_filter_rule-from-security_audit_rule/20220419-000109 git checkout 2fa01492487f9135e9ea9e59924289cc23a66576 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash 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 drivers/firmware/efi/efi.c:33: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ drivers/firmware/efi/efi.c:169:16: warning: no previous prototype for function 'efi_attr_is_visible' [-Wmissing-prototypes] umode_t __weak efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, ^ drivers/firmware/efi/efi.c:169:1: note: declare 'static' if the function is not intended to be used outside of this translation unit umode_t __weak efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, ^ static 1 warning and 1 error generated. -- In file included from fs/iomap/trace.c:12: In file included from fs/iomap/./trace.h:190: In file included from include/trace/define_trace.h:102: In file included from include/trace/trace_events.h:21: In file included from include/linux/trace_events.h:10: In file included from include/linux/perf_event.h:61: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ 1 error generated. -- In file included from init/main.c:21: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:10: In file included from include/linux/perf_event.h:61: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ init/main.c:769:20: warning: no previous prototype for function 'arch_post_acpi_subsys_init' [-Wmissing-prototypes] void __init __weak arch_post_acpi_subsys_init(void) { } ^ init/main.c:769:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __init __weak arch_post_acpi_subsys_init(void) { } ^ static init/main.c:781:20: warning: no previous prototype for function 'mem_encrypt_init' [-Wmissing-prototypes] void __init __weak mem_encrypt_init(void) { } ^ init/main.c:781:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __init __weak mem_encrypt_init(void) { } ^ static init/main.c:783:20: warning: no previous prototype for function 'poking_init' [-Wmissing-prototypes] void __init __weak poking_init(void) { } ^ init/main.c:783:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __init __weak poking_init(void) { } ^ static 3 warnings and 1 error generated. -- In file included from arch/arm/kernel/ptrace.c:17: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ arch/arm/kernel/ptrace.c:852:16: warning: no previous prototype for function 'syscall_trace_enter' [-Wmissing-prototypes] asmlinkage int syscall_trace_enter(struct pt_regs *regs) ^ arch/arm/kernel/ptrace.c:852:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage int syscall_trace_enter(struct pt_regs *regs) ^ static arch/arm/kernel/ptrace.c:880:17: warning: no previous prototype for function 'syscall_trace_exit' [-Wmissing-prototypes] asmlinkage void syscall_trace_exit(struct pt_regs *regs) ^ arch/arm/kernel/ptrace.c:880:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage void syscall_trace_exit(struct pt_regs *regs) ^ static 2 warnings and 1 error generated. -- In file included from arch/arm/kernel/signal.c:14: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:10: In file included from include/linux/perf_event.h:61: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ arch/arm/kernel/signal.c:186:16: warning: no previous prototype for function 'sys_sigreturn' [-Wmissing-prototypes] asmlinkage int sys_sigreturn(struct pt_regs *regs) ^ arch/arm/kernel/signal.c:186:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage int sys_sigreturn(struct pt_regs *regs) ^ static arch/arm/kernel/signal.c:216:16: warning: no previous prototype for function 'sys_rt_sigreturn' [-Wmissing-prototypes] asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) ^ arch/arm/kernel/signal.c:216:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) ^ static arch/arm/kernel/signal.c:601:1: warning: no previous prototype for function 'do_work_pending' [-Wmissing-prototypes] do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall) ^ arch/arm/kernel/signal.c:600:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage int ^ static 3 warnings and 1 error generated. -- In file included from arch/arm/kernel/sys_arm.c:20: In file included from include/linux/syscalls.h:88: In file included from include/trace/syscall.h:7: In file included from include/linux/trace_events.h:10: In file included from include/linux/perf_event.h:61: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ In file included from arch/arm/kernel/sys_arm.c:21: include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero] _calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mman.h:136:21: note: expanded from macro '_calc_vm_trans' : ((x) & (bit1)) / ((bit1) / (bit2)))) ^ ~~~~~~~~~~~~~~~~~ arch/arm/kernel/sys_arm.c:32:17: warning: no previous prototype for function 'sys_arm_fadvise64_64' [-Wmissing-prototypes] asmlinkage long sys_arm_fadvise64_64(int fd, int advice, ^ arch/arm/kernel/sys_arm.c:32:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage long sys_arm_fadvise64_64(int fd, int advice, ^ static 2 warnings and 1 error generated. -- In file included from arch/arm/kernel/smp.c:52: In file included from include/trace/events/ipi.h:90: In file included from include/trace/define_trace.h:102: In file included from include/trace/trace_events.h:21: In file included from include/linux/trace_events.h:10: In file included from include/linux/perf_event.h:61: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ arch/arm/kernel/smp.c:582:6: warning: no previous prototype for function 'arch_irq_work_raise' [-Wmissing-prototypes] void arch_irq_work_raise(void) ^ arch/arm/kernel/smp.c:582:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void arch_irq_work_raise(void) ^ static arch/arm/kernel/smp.c:793:5: warning: no previous prototype for function 'setup_profiling_timer' [-Wmissing-prototypes] int setup_profiling_timer(unsigned int multiplier) ^ arch/arm/kernel/smp.c:793:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int setup_profiling_timer(unsigned int multiplier) ^ static 2 warnings and 1 error generated. -- In file included from arch/arm/mm/fault.c:19: In file included from include/linux/perf_event.h:61: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ arch/arm/mm/fault.c:535:1: warning: no previous prototype for function 'do_DataAbort' [-Wmissing-prototypes] do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) ^ arch/arm/mm/fault.c:534:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage void ^ static arch/arm/mm/fault.c:565:1: warning: no previous prototype for function 'do_PrefetchAbort' [-Wmissing-prototypes] do_PrefetchAbort(unsigned long addr, unsigned int ifsr, struct pt_regs *regs) ^ arch/arm/mm/fault.c:564:12: note: declare 'static' if the function is not intended to be used outside of this translation unit asmlinkage void ^ static 2 warnings and 1 error generated. -- In file included from kernel/fork.c:51: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ kernel/fork.c:163:13: warning: no previous prototype for function 'arch_release_task_struct' [-Wmissing-prototypes] void __weak arch_release_task_struct(struct task_struct *tsk) ^ kernel/fork.c:163:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __weak arch_release_task_struct(struct task_struct *tsk) ^ static kernel/fork.c:853:20: warning: no previous prototype for function 'arch_task_cache_init' [-Wmissing-prototypes] void __init __weak arch_task_cache_init(void) { } ^ kernel/fork.c:853:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void __init __weak arch_task_cache_init(void) { } ^ static kernel/fork.c:948:12: warning: no previous prototype for function 'arch_dup_task_struct' [-Wmissing-prototypes] int __weak arch_dup_task_struct(struct task_struct *dst, ^ kernel/fork.c:948:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_dup_task_struct(struct task_struct *dst, ^ static 3 warnings and 1 error generated. -- In file included from kernel/signal.c:29: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ kernel/signal.c:137:37: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] case 4: ready = signal->sig[3] &~ blocked->sig[3]; ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ kernel/signal.c:137:19: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds] case 4: ready = signal->sig[3] &~ blocked->sig[3]; ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ kernel/signal.c:138:30: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] ready |= signal->sig[2] &~ blocked->sig[2]; ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ kernel/signal.c:138:12: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds] ready |= signal->sig[2] &~ blocked->sig[2]; ^ ~ arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here unsigned long sig[_NSIG_WORDS]; ^ 4 warnings and 1 error generated. -- In file included from kernel/kallsyms.c:25: In file included from include/linux/filter.h:20: In file included from include/linux/if_vlan.h:10: In file included from include/linux/netdevice.h:46: In file included from include/uapi/linux/neighbour.h:6: In file included from include/linux/netlink.h:9: In file included from include/net/scm.h:8: >> include/linux/security.h:1147:3: error: use of undeclared identifier 'secid' *secid = 0; ^ kernel/kallsyms.c:591:12: warning: no previous prototype for function 'arch_get_kallsym' [-Wmissing-prototypes] int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, ^ kernel/kallsyms.c:591:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, ^ static 1 warning and 1 error generated. .. vim +/secid +1147 include/linux/security.h ee18d64c1f6320 David Howells 2009-09-02 1143 2fa01492487f91 Casey Schaufler 2022-04-18 1144 static inline void security_cred_getsecid(const struct cred *c, 2fa01492487f91 Casey Schaufler 2022-04-18 1145 struct lsmblob *blob) 4d5b5539742d25 Todd Kjos 2021-10-12 1146 { 4d5b5539742d25 Todd Kjos 2021-10-12 @1147 *secid = 0; 4d5b5539742d25 Todd Kjos 2021-10-12 1148 } 4d5b5539742d25 Todd Kjos 2021-10-12 1149 -- 0-DAY CI Kernel Test Service https://01.org/lkp -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit