linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
	paul@paul-moore.com, eparis@redhat.com,
	linux-security-module@vger.kernel.org, audit@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, jmorris@namei.org,
	serge@hallyn.com, keescook@chromium.org,
	john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
	stephen.smalley.work@gmail.com, linux-kernel@vger.kernel.org,
	selinux@vger.kernel.org
Subject: Re: [PATCH v2 6/6] Audit: Add record for multiple object contexts
Date: Mon, 10 Mar 2025 15:26:35 +0800	[thread overview]
Message-ID: <202503101524.XYSVbXHw-lkp@intel.com> (raw)
In-Reply-To: <20250307183701.16970-7-casey@schaufler-ca.com>

Hi Casey,

kernel test robot noticed the following build errors:

[auto build test ERROR on pcmoore-selinux/next]
[also build test ERROR on linus/master v6.14-rc6 next-20250307]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Casey-Schaufler/Audit-Create-audit_stamp-structure/20250308-024950
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link:    https://lore.kernel.org/r/20250307183701.16970-7-casey%40schaufler-ca.com
patch subject: [PATCH v2 6/6] Audit: Add record for multiple object contexts
config: s390-randconfig-r073-20250310 (https://download.01.org/0day-ci/archive/20250310/202503101524.XYSVbXHw-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250310/202503101524.XYSVbXHw-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/202503101524.XYSVbXHw-lkp@intel.com/

All errors (new ones prefixed by >>):

   s390x-linux-ld: kernel/audit.o: in function `audit_log_object_context':
>> kernel/audit.c:2312:(.text+0x2da6): undefined reference to `lsm_objctx_cnt'
>> s390x-linux-ld: kernel/audit.c:2329:(.text+0x30d2): undefined reference to `lsm_active_cnt'
   s390x-linux-ld: kernel/audit.c:(.text+0x3108): undefined reference to `lsm_active_cnt'
>> s390x-linux-ld: kernel/audit.c:2330:(.text+0x313e): undefined reference to `lsm_idlist'
>> s390x-linux-ld: kernel/audit.c:2312:(.text+0x32f2): undefined reference to `lsm_objctx_cnt'
   s390x-linux-ld: kernel/audit.c:2312:(.text+0x330a): undefined reference to `lsm_objctx_cnt'
   s390x-linux-ld: kernel/audit.c:2329:(.text+0x33a4): undefined reference to `lsm_active_cnt'
   s390x-linux-ld: kernel/audit.c:2329:(.text+0x33bc): undefined reference to `lsm_active_cnt'


vim +2312 kernel/audit.c

  2303	
  2304	int audit_log_object_context(struct audit_buffer *ab, struct lsm_prop *prop)
  2305	{
  2306		int i;
  2307		int rc;
  2308		int error = 0;
  2309		char *space = "";
  2310		struct lsm_context context;
  2311	
> 2312		if (lsm_objctx_cnt < 2) {
  2313			error = security_lsmprop_to_secctx(prop, &context,
  2314							   LSM_ID_UNDEF);
  2315			if (error < 0) {
  2316				if (error != -EINVAL)
  2317					goto error_path;
  2318				return error;
  2319			}
  2320			audit_log_format(ab, " obj=%s", context.context);
  2321			security_release_secctx(&context);
  2322			return 0;
  2323		}
  2324		audit_log_format(ab, " obj=?");
  2325		error = audit_buffer_aux_new(ab, AUDIT_MAC_OBJ_CONTEXTS);
  2326		if (error)
  2327			goto error_path;
  2328	
> 2329		for (i = 0; i < lsm_active_cnt; i++) {
> 2330			if (!lsm_idlist[i]->objctx)
  2331				continue;
  2332			rc = security_lsmprop_to_secctx(prop, &context,
  2333							lsm_idlist[i]->id);
  2334			if (rc < 0) {
  2335				audit_log_format(ab, "%sobj_%s=?", space,
  2336						 lsm_idlist[i]->name);
  2337				if (rc != -EINVAL)
  2338					audit_panic("error in audit_log_object_context");
  2339				error = rc;
  2340			} else {
  2341				audit_log_format(ab, "%sobj_%s=%s", space,
  2342						 lsm_idlist[i]->name, context.context);
  2343				security_release_secctx(&context);
  2344			}
  2345			space = " ";
  2346		}
  2347	
  2348		audit_buffer_aux_end(ab);
  2349		return error;
  2350	
  2351	error_path:
  2352		audit_panic("error in audit_log_object_context");
  2353		return error;
  2354	}
  2355	

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

  parent reply	other threads:[~2025-03-10  7:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250307183701.16970-1-casey.ref@schaufler-ca.com>
2025-03-07 18:36 ` [PATCH v2 0/6] Audit: Records for multiple security contexts Casey Schaufler
2025-03-07 18:36   ` [PATCH v2 1/6] Audit: Create audit_stamp structure Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:36   ` [PATCH v2 2/6] Audit: Allow multiple records in an audit_buffer Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:36   ` [PATCH v2 3/6] LSM: security_lsmblob_to_secctx module selection Casey Schaufler
2025-03-08 15:52     ` kernel test robot
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:36   ` [PATCH v2 4/6] Audit: Add record for multiple task security contexts Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-13 12:29       ` Paul Moore
2025-03-07 18:37   ` [PATCH v2 5/6] Audit: multiple subject lsm values for netlabel Casey Schaufler
2025-03-12 23:51     ` Paul Moore
2025-03-07 18:37   ` [PATCH v2 6/6] Audit: Add record for multiple object contexts Casey Schaufler
2025-03-09 14:18     ` kernel test robot
2025-03-10  7:26     ` kernel test robot [this message]
2025-03-10  8:20     ` Dan Carpenter
2025-03-12 23:51     ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202503101524.XYSVbXHw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=audit@vger.kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=selinux@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=stephen.smalley.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).