From: kernel test robot <lkp@intel.com>
To: "Mickaël Salaün" <mic@digikod.net>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v5 15/24] landlock: Log scoped denials
Date: Sat, 1 Feb 2025 11:02:13 +0800 [thread overview]
Message-ID: <202502011045.pZMKNT2k-lkp@intel.com> (raw)
In-Reply-To: <20250131163059.1139617-16-mic@digikod.net>
Hi Mickaël,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 69e858e0b8b2ea07759e995aa383e8780d9d140c]
url: https://github.com/intel-lab-lkp/linux/commits/Micka-l-Sala-n/lsm-Add-audit_log_lsm_data-helper/20250201-004434
base: 69e858e0b8b2ea07759e995aa383e8780d9d140c
patch link: https://lore.kernel.org/r/20250131163059.1139617-16-mic%40digikod.net
patch subject: [PATCH v5 15/24] landlock: Log scoped denials
config: powerpc-randconfig-001-20250201 (https://download.01.org/0day-ci/archive/20250201/202502011045.pZMKNT2k-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 355d0b186f178668b103068537e517f3d52ad639)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250201/202502011045.pZMKNT2k-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/202502011045.pZMKNT2k-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/landlock/task.c:414:28: warning: variable 'handle_layer' is uninitialized when used here [-Wuninitialized]
414 | request.layer_plus_one = handle_layer + 1;
| ^~~~~~~~~~~~
security/landlock/task.c:382:21: note: initialize the variable 'handle_layer' to silence this warning
382 | size_t handle_layer;
| ^
| = 0
1 warning generated.
vim +/handle_layer +414 security/landlock/task.c
378
379 static int hook_file_send_sigiotask(struct task_struct *tsk,
380 struct fown_struct *fown, int signum)
381 {
382 size_t handle_layer;
383 const struct landlock_cred_security *subject;
384 struct landlock_request request = {
385 .type = LANDLOCK_REQUEST_SCOPE_SIGNAL,
386 .audit = {
387 .type = LSM_AUDIT_DATA_TASK,
388 .u.tsk = tsk,
389 },
390 };
391 bool is_scoped = false;
392
393 /* Lock already held by send_sigio() and send_sigurg(). */
394 lockdep_assert_held(&fown->lock);
395 subject = &landlock_file(fown->file)->fown_subject;
396
397 /*
398 * Quick return for unowned socket.
399 *
400 * subject->domain has already been filtered when saved by
401 * hook_file_set_fowner(), so there is no need to call
402 * landlock_get_applicable_subject() here.
403 */
404 if (!subject->domain)
405 return 0;
406
407 scoped_guard(rcu)
408 {
409 is_scoped = domain_is_scoped(subject->domain,
410 landlock_get_task_domain(tsk),
411 signal_scope.scope);
412 }
413 if (is_scoped) {
> 414 request.layer_plus_one = handle_layer + 1;
415 landlock_log_denial(subject, &request);
416 return -EPERM;
417 }
418
419 return 0;
420 }
421
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
parent reply other threads:[~2025-02-01 3:03 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250131163059.1139617-16-mic@digikod.net>]
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=202502011045.pZMKNT2k-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=mic@digikod.net \
--cc=oe-kbuild-all@lists.linux.dev \
/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