All of lore.kernel.org
 help / color / mirror / Atom feed
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

  reply	other threads:[~2025-02-01  3:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 16:30 [PATCH v5 00/24] Landlock audit support Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 01/24] lsm: Add audit_log_lsm_data() helper Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 02/24] landlock: Add unique ID generator Mickaël Salaün
2025-03-07 14:15   ` Günther Noack
2025-03-08 18:40     ` Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 03/24] landlock: Move domain hierarchy management Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 04/24] landlock: Prepare to use credential instead of domain for filesystem Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 05/24] landlock: Prepare to use credential instead of domain for network Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 06/24] landlock: Prepare to use credential instead of domain for scope Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 07/24] landlock: Prepare to use credential instead of domain for fowner Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 08/24] landlock: Identify domain execution crossing Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 09/24] landlock: Add AUDIT_LANDLOCK_ACCESS and log ptrace denials Mickaël Salaün
2025-02-14 22:52   ` [PATCH v5 9/24] " Paul Moore
2025-02-18 19:19     ` Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 10/24] landlock: Add AUDIT_LANDLOCK_DOMAIN and log domain status Mickaël Salaün
2025-02-14 22:52   ` Paul Moore
2025-02-18 19:21     ` Mickaël Salaün
2025-02-26 23:41       ` Paul Moore
2025-01-31 16:30 ` [PATCH v5 11/24] landlock: Log mount-related denials Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 12/24] landlock: Log file-related denials Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 13/24] landlock: Log truncate and IOCTL denials Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 14/24] landlock: Log TCP bind and connect denials Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 15/24] landlock: Log scoped denials Mickaël Salaün
2025-02-01  3:02   ` kernel test robot [this message]
2025-01-31 16:30 ` [PATCH v5 16/24] landlock: Add LANDLOCK_RESTRICT_SELF_QUIET Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 17/24] landlock: Add LANDLOCK_RESTRICT_SELF_QUIET_SUBDOMAINS Mickaël Salaün
2025-01-31 20:28   ` kernel test robot
2025-01-31 16:30 ` [PATCH v5 18/24] landlock: Add LANDLOCK_RESTRICT_SELF_LOG_CROSS_EXEC Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 19/24] samples/landlock: Enable users to log sandbox denials Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 20/24] selftests/landlock: Extend tests for landlock_restrict_self()'s flags Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 21/24] selftests/landlock: Add tests for audit and LANDLOCK_RESTRICT_SELF_QUIET Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 22/24] selftests/landlock: Test audit with restrict flags Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 23/24] selftests/landlock: Add audit tests for ptrace Mickaël Salaün
2025-01-31 16:30 ` [PATCH v5 24/24] landlock: Add audit documentation Mickaël Salaün
2025-02-22 19:47 ` [PATCH v5 00/24] Landlock audit support Günther Noack
2025-02-25 19:51   ` Mickaël Salaün

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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.