From: kernel test robot <lkp@intel.com>
To: Deven Bowers <deven.desai@linux.microsoft.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Paul Moore <paul@paul-moore.com>,
Fan Wu <wufan@linux.microsoft.com>
Subject: security/ipe/hooks.c:52: warning: Function parameter or struct member '__always_unused' not described in 'ipe_mmap_file'
Date: Wed, 12 Feb 2025 12:52:13 +0800 [thread overview]
Message-ID: <202502121207.AtcCkAj0-lkp@intel.com> (raw)
Hi Deven,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8
commit: 52443cb60c356707df494910fa134bbb0a8b1a66 ipe: add LSM hooks on execution and kernel read
date: 6 months ago
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20250212/202502121207.AtcCkAj0-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502121207.AtcCkAj0-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/202502121207.AtcCkAj0-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/ipe/hooks.c:52: warning: Function parameter or struct member '__always_unused' not described in 'ipe_mmap_file'
>> security/ipe/hooks.c:52: warning: Excess function parameter 'reqprot' description in 'ipe_mmap_file'
>> security/ipe/hooks.c:80: warning: Function parameter or struct member '__always_unused' not described in 'ipe_file_mprotect'
>> security/ipe/hooks.c:80: warning: Excess function parameter 'reqprot' description in 'ipe_file_mprotect'
vim +52 security/ipe/hooks.c
34
35 /**
36 * ipe_mmap_file() - ipe security hook function for mmap check.
37 * @f: File being mmap'd. Can be NULL in the case of anonymous memory.
38 * @reqprot: The requested protection on the mmap, passed from usermode.
39 * @prot: The effective protection on the mmap, resolved from reqprot and
40 * system configuration.
41 * @flags: Unused.
42 *
43 * This hook is called when a file is loaded through the mmap
44 * family of system calls.
45 *
46 * Return:
47 * * %0 - Success
48 * * %-EACCES - Did not pass IPE policy
49 */
50 int ipe_mmap_file(struct file *f, unsigned long reqprot __always_unused,
51 unsigned long prot, unsigned long flags)
> 52 {
53 struct ipe_eval_ctx ctx = IPE_EVAL_CTX_INIT;
54
55 if (prot & PROT_EXEC) {
56 ipe_build_eval_ctx(&ctx, f, IPE_OP_EXEC);
57 return ipe_evaluate_event(&ctx);
58 }
59
60 return 0;
61 }
62
63 /**
64 * ipe_file_mprotect() - ipe security hook function for mprotect check.
65 * @vma: Existing virtual memory area created by mmap or similar.
66 * @reqprot: The requested protection on the mmap, passed from usermode.
67 * @prot: The effective protection on the mmap, resolved from reqprot and
68 * system configuration.
69 *
70 * This LSM hook is called when a mmap'd region of memory is changing
71 * its protections via mprotect.
72 *
73 * Return:
74 * * %0 - Success
75 * * %-EACCES - Did not pass IPE policy
76 */
77 int ipe_file_mprotect(struct vm_area_struct *vma,
78 unsigned long reqprot __always_unused,
79 unsigned long prot)
> 80 {
81 struct ipe_eval_ctx ctx = IPE_EVAL_CTX_INIT;
82
83 /* Already Executable */
84 if (vma->vm_flags & VM_EXEC)
85 return 0;
86
87 if (prot & PROT_EXEC) {
88 ipe_build_eval_ctx(&ctx, vma->vm_file, IPE_OP_EXEC);
89 return ipe_evaluate_event(&ctx);
90 }
91
92 return 0;
93 }
94
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-02-12 4:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-12 4:52 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-18 17:31 security/ipe/hooks.c:52: warning: Function parameter or struct member '__always_unused' not described in 'ipe_mmap_file' kernel test robot
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=202502121207.AtcCkAj0-lkp@intel.com \
--to=lkp@intel.com \
--cc=deven.desai@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul@paul-moore.com \
--cc=wufan@linux.microsoft.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