mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* security/landlock/fs.c:719: warning: Function parameter or struct member '' not described in 'collect_domain_accesses'
@ 2025-01-01 11:50 kernel test robot
  2025-01-06 17:22 ` Mickaël Salaün
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-01-01 11:50 UTC (permalink / raw)
  To: Mickaël Salaün; +Cc: oe-kbuild-all, linux-kernel, Paul Moore

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ccb98ccef0e543c2bd4ef1a72270461957f3d8d0
commit: b91c3e4ea756b12b7d992529226edce1cfd854d7 landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER
date:   2 years, 7 months ago
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250101/202501011904.VXOMzLe7-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250101/202501011904.VXOMzLe7-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/202501011904.VXOMzLe7-lkp@intel.com/

All warnings (new ones prefixed by >>):

   Use of uninitialized value $param in regexp compilation at scripts/kernel-doc line 1532, <IN_FILE> line 478.
   Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
   Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
   Use of uninitialized value $param in substitution (s///) at scripts/kernel-doc line 1588, <IN_FILE> line 478.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1616, <IN_FILE> line 478.
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1626, <IN_FILE> line 478.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1626, <IN_FILE> line 478.
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1627, <IN_FILE> line 478.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1629, <IN_FILE> line 478.
   Use of uninitialized value $param in concatenation (.) or string at scripts/kernel-doc line 1630, <IN_FILE> line 478.
   security/landlock/fs.c:478: warning: Function parameter or struct member '' not described in 'check_access_path_dual'
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1645, <IN_FILE> line 478.
   Use of uninitialized value $param in regexp compilation at scripts/kernel-doc line 1532, <IN_FILE> line 478.
   Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
   Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
   Use of uninitialized value $param in substitution (s///) at scripts/kernel-doc line 1588, <IN_FILE> line 478.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1616, <IN_FILE> line 478.
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1626, <IN_FILE> line 478.
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1645, <IN_FILE> line 478.
   Use of uninitialized value $parameterlist[3] in join or string at scripts/kernel-doc line 1806, <IN_FILE> line 478.
   Use of uninitialized value $parameterlist[6] in join or string at scripts/kernel-doc line 1806, <IN_FILE> line 478.
   security/landlock/fs.c:478: warning: Excess function parameter 'layer_masks_parent1' description in 'check_access_path_dual'
   security/landlock/fs.c:478: warning: Excess function parameter 'layer_masks_parent2' description in 'check_access_path_dual'
   Use of uninitialized value $param in regexp compilation at scripts/kernel-doc line 1532, <IN_FILE> line 719.
   Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 719.
   Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 719.
   Use of uninitialized value $param in substitution (s///) at scripts/kernel-doc line 1588, <IN_FILE> line 719.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1616, <IN_FILE> line 719.
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1626, <IN_FILE> line 719.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1626, <IN_FILE> line 719.
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1627, <IN_FILE> line 719.
   Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1629, <IN_FILE> line 719.
   Use of uninitialized value $param in concatenation (.) or string at scripts/kernel-doc line 1630, <IN_FILE> line 719.
>> security/landlock/fs.c:719: warning: Function parameter or struct member '' not described in 'collect_domain_accesses'
   Use of uninitialized value $param in hash element at scripts/kernel-doc line 1645, <IN_FILE> line 719.
   Use of uninitialized value $parameterlist[3] in join or string at scripts/kernel-doc line 1806, <IN_FILE> line 719.
>> security/landlock/fs.c:719: warning: Excess function parameter 'layer_masks_dom' description in 'collect_domain_accesses'


vim +719 security/landlock/fs.c

   693	
   694	/**
   695	 * collect_domain_accesses - Walk through a file path and collect accesses
   696	 *
   697	 * @domain: Domain to check against.
   698	 * @mnt_root: Last directory to check.
   699	 * @dir: Directory to start the walk from.
   700	 * @layer_masks_dom: Where to store the collected accesses.
   701	 *
   702	 * This helper is useful to begin a path walk from the @dir directory to a
   703	 * @mnt_root directory used as a mount point.  This mount point is the common
   704	 * ancestor between the source and the destination of a renamed and linked
   705	 * file.  While walking from @dir to @mnt_root, we record all the domain's
   706	 * allowed accesses in @layer_masks_dom.
   707	 *
   708	 * This is similar to check_access_path_dual() but much simpler because it only
   709	 * handles walking on the same mount point and only check one set of accesses.
   710	 *
   711	 * Returns:
   712	 * - true if all the domain access rights are allowed for @dir;
   713	 * - false if the walk reached @mnt_root.
   714	 */
   715	static bool collect_domain_accesses(
   716		const struct landlock_ruleset *const domain,
   717		const struct dentry *const mnt_root, struct dentry *dir,
   718		layer_mask_t (*const layer_masks_dom)[LANDLOCK_NUM_ACCESS_FS])
 > 719	{
   720		unsigned long access_dom;
   721		bool ret = false;
   722	
   723		if (WARN_ON_ONCE(!domain || !mnt_root || !dir || !layer_masks_dom))
   724			return true;
   725		if (is_nouser_or_private(dir))
   726			return true;
   727	
   728		access_dom = init_layer_masks(domain, LANDLOCK_MASK_ACCESS_FS,
   729					      layer_masks_dom);
   730	
   731		dget(dir);
   732		while (true) {
   733			struct dentry *parent_dentry;
   734	
   735			/* Gets all layers allowing all domain accesses. */
   736			if (unmask_layers(find_rule(domain, dir), access_dom,
   737					  layer_masks_dom)) {
   738				/*
   739				 * Stops when all handled accesses are allowed by at
   740				 * least one rule in each layer.
   741				 */
   742				ret = true;
   743				break;
   744			}
   745	
   746			/* We should not reach a root other than @mnt_root. */
   747			if (dir == mnt_root || WARN_ON_ONCE(IS_ROOT(dir)))
   748				break;
   749	
   750			parent_dentry = dget_parent(dir);
   751			dput(dir);
   752			dir = parent_dentry;
   753		}
   754		dput(dir);
   755		return ret;
   756	}
   757	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: security/landlock/fs.c:719: warning: Function parameter or struct member '' not described in 'collect_domain_accesses'
  2025-01-01 11:50 security/landlock/fs.c:719: warning: Function parameter or struct member '' not described in 'collect_domain_accesses' kernel test robot
@ 2025-01-06 17:22 ` Mickaël Salaün
  0 siblings, 0 replies; 2+ messages in thread
From: Mickaël Salaün @ 2025-01-06 17:22 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: kernel test robot, oe-kbuild-all, linux-kernel, Paul Moore, linux-doc

Similar scripts/kernel-doc issue:
- https://lore.kernel.org/all/20250106.iinooheeQu8z@digikod.net/
- https://lore.kernel.org/all/20250106.iejae7ueh1Ka@digikod.net/

On Wed, Jan 01, 2025 at 07:50:18PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   ccb98ccef0e543c2bd4ef1a72270461957f3d8d0
> commit: b91c3e4ea756b12b7d992529226edce1cfd854d7 landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER
> date:   2 years, 7 months ago
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250101/202501011904.VXOMzLe7-lkp@intel.com/config)
> compiler: sh4-linux-gcc (GCC) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250101/202501011904.VXOMzLe7-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/202501011904.VXOMzLe7-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    Use of uninitialized value $param in regexp compilation at scripts/kernel-doc line 1532, <IN_FILE> line 478.
>    Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
>    Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
>    Use of uninitialized value $param in substitution (s///) at scripts/kernel-doc line 1588, <IN_FILE> line 478.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1616, <IN_FILE> line 478.
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1626, <IN_FILE> line 478.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1626, <IN_FILE> line 478.
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1627, <IN_FILE> line 478.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1629, <IN_FILE> line 478.
>    Use of uninitialized value $param in concatenation (.) or string at scripts/kernel-doc line 1630, <IN_FILE> line 478.
>    security/landlock/fs.c:478: warning: Function parameter or struct member '' not described in 'check_access_path_dual'
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1645, <IN_FILE> line 478.
>    Use of uninitialized value $param in regexp compilation at scripts/kernel-doc line 1532, <IN_FILE> line 478.
>    Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
>    Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 478.
>    Use of uninitialized value $param in substitution (s///) at scripts/kernel-doc line 1588, <IN_FILE> line 478.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1616, <IN_FILE> line 478.
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1626, <IN_FILE> line 478.
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1645, <IN_FILE> line 478.
>    Use of uninitialized value $parameterlist[3] in join or string at scripts/kernel-doc line 1806, <IN_FILE> line 478.
>    Use of uninitialized value $parameterlist[6] in join or string at scripts/kernel-doc line 1806, <IN_FILE> line 478.
>    security/landlock/fs.c:478: warning: Excess function parameter 'layer_masks_parent1' description in 'check_access_path_dual'
>    security/landlock/fs.c:478: warning: Excess function parameter 'layer_masks_parent2' description in 'check_access_path_dual'
>    Use of uninitialized value $param in regexp compilation at scripts/kernel-doc line 1532, <IN_FILE> line 719.
>    Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 719.
>    Use of uninitialized value $actual in substitution (s///) at scripts/kernel-doc line 1484, <IN_FILE> line 719.
>    Use of uninitialized value $param in substitution (s///) at scripts/kernel-doc line 1588, <IN_FILE> line 719.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1616, <IN_FILE> line 719.
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1626, <IN_FILE> line 719.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1626, <IN_FILE> line 719.
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1627, <IN_FILE> line 719.
>    Use of uninitialized value $param in pattern match (m//) at scripts/kernel-doc line 1629, <IN_FILE> line 719.
>    Use of uninitialized value $param in concatenation (.) or string at scripts/kernel-doc line 1630, <IN_FILE> line 719.
> >> security/landlock/fs.c:719: warning: Function parameter or struct member '' not described in 'collect_domain_accesses'
>    Use of uninitialized value $param in hash element at scripts/kernel-doc line 1645, <IN_FILE> line 719.
>    Use of uninitialized value $parameterlist[3] in join or string at scripts/kernel-doc line 1806, <IN_FILE> line 719.
> >> security/landlock/fs.c:719: warning: Excess function parameter 'layer_masks_dom' description in 'collect_domain_accesses'
> 
> 
> vim +719 security/landlock/fs.c
> 
>    693	
>    694	/**
>    695	 * collect_domain_accesses - Walk through a file path and collect accesses
>    696	 *
>    697	 * @domain: Domain to check against.
>    698	 * @mnt_root: Last directory to check.
>    699	 * @dir: Directory to start the walk from.
>    700	 * @layer_masks_dom: Where to store the collected accesses.
>    701	 *
>    702	 * This helper is useful to begin a path walk from the @dir directory to a
>    703	 * @mnt_root directory used as a mount point.  This mount point is the common
>    704	 * ancestor between the source and the destination of a renamed and linked
>    705	 * file.  While walking from @dir to @mnt_root, we record all the domain's
>    706	 * allowed accesses in @layer_masks_dom.
>    707	 *
>    708	 * This is similar to check_access_path_dual() but much simpler because it only
>    709	 * handles walking on the same mount point and only check one set of accesses.
>    710	 *
>    711	 * Returns:
>    712	 * - true if all the domain access rights are allowed for @dir;
>    713	 * - false if the walk reached @mnt_root.
>    714	 */
>    715	static bool collect_domain_accesses(
>    716		const struct landlock_ruleset *const domain,
>    717		const struct dentry *const mnt_root, struct dentry *dir,
>    718		layer_mask_t (*const layer_masks_dom)[LANDLOCK_NUM_ACCESS_FS])
>  > 719	{
>    720		unsigned long access_dom;
>    721		bool ret = false;
>    722	
>    723		if (WARN_ON_ONCE(!domain || !mnt_root || !dir || !layer_masks_dom))
>    724			return true;
>    725		if (is_nouser_or_private(dir))
>    726			return true;
>    727	
>    728		access_dom = init_layer_masks(domain, LANDLOCK_MASK_ACCESS_FS,
>    729					      layer_masks_dom);
>    730	
>    731		dget(dir);
>    732		while (true) {
>    733			struct dentry *parent_dentry;
>    734	
>    735			/* Gets all layers allowing all domain accesses. */
>    736			if (unmask_layers(find_rule(domain, dir), access_dom,
>    737					  layer_masks_dom)) {
>    738				/*
>    739				 * Stops when all handled accesses are allowed by at
>    740				 * least one rule in each layer.
>    741				 */
>    742				ret = true;
>    743				break;
>    744			}
>    745	
>    746			/* We should not reach a root other than @mnt_root. */
>    747			if (dir == mnt_root || WARN_ON_ONCE(IS_ROOT(dir)))
>    748				break;
>    749	
>    750			parent_dentry = dget_parent(dir);
>    751			dput(dir);
>    752			dir = parent_dentry;
>    753		}
>    754		dput(dir);
>    755		return ret;
>    756	}
>    757	
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-06 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-01 11:50 security/landlock/fs.c:719: warning: Function parameter or struct member '' not described in 'collect_domain_accesses' kernel test robot
2025-01-06 17:22 ` Mickaël Salaün

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®