From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [intel-lts:pr/57 1/1] security/safesetid/lsm.c:213:5: warning: no previous prototype for 'add_safesetid_whitelist_entry'
Date: Mon, 17 Feb 2025 22:01:57 +0800 [thread overview]
Message-ID: <202502172157.Wnir0VaC-lkp@intel.com> (raw)
tree: https://github.com/intel/linux-intel-lts.git pr/57
head: 6fe7458ff80d33a5dba8b386c88d33ffd2ccb47d
commit: aeca4e2ca65c1aeacfbe520684e6421719d99417 [1/1] LSM: add SafeSetID module that gates setid calls
config: nios2-randconfig-001-20250217 (https://download.01.org/0day-ci/archive/20250217/202502172157.Wnir0VaC-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250217/202502172157.Wnir0VaC-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/202502172157.Wnir0VaC-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/safesetid/lsm.c:213:5: warning: no previous prototype for 'add_safesetid_whitelist_entry' [-Wmissing-prototypes]
213 | int add_safesetid_whitelist_entry(kuid_t parent, kuid_t child)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> security/safesetid/lsm.c:234:6: warning: no previous prototype for 'flush_safesetid_whitelist_entries' [-Wmissing-prototypes]
234 | void flush_safesetid_whitelist_entries(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/add_safesetid_whitelist_entry +213 security/safesetid/lsm.c
212
> 213 int add_safesetid_whitelist_entry(kuid_t parent, kuid_t child)
214 {
215 struct entry *new;
216
217 /* Return if entry already exists */
218 if (check_setuid_policy_hashtable_key_value(parent, child))
219 return 0;
220
221 new = kzalloc(sizeof(struct entry), GFP_KERNEL);
222 if (!new)
223 return -ENOMEM;
224 new->parent_kuid = __kuid_val(parent);
225 new->child_kuid = __kuid_val(child);
226 spin_lock(&safesetid_whitelist_hashtable_spinlock);
227 hash_add_rcu(safesetid_whitelist_hashtable,
228 &new->next,
229 __kuid_val(parent));
230 spin_unlock(&safesetid_whitelist_hashtable_spinlock);
231 return 0;
232 }
233
> 234 void flush_safesetid_whitelist_entries(void)
235 {
236 struct entry *entry;
237 struct hlist_node *hlist_node;
238 unsigned int bkt_loop_cursor;
239 HLIST_HEAD(free_list);
240
241 /*
242 * Could probably use hash_for_each_rcu here instead, but this should
243 * be fine as well.
244 */
245 spin_lock(&safesetid_whitelist_hashtable_spinlock);
246 hash_for_each_safe(safesetid_whitelist_hashtable, bkt_loop_cursor,
247 hlist_node, entry, next) {
248 hash_del_rcu(&entry->next);
249 hlist_add_head(&entry->dlist, &free_list);
250 }
251 spin_unlock(&safesetid_whitelist_hashtable_spinlock);
252 synchronize_rcu();
253 hlist_for_each_entry_safe(entry, hlist_node, &free_list, dlist) {
254 hlist_del(&entry->dlist);
255 kfree(entry);
256 }
257 }
258
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-17 14:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202502172157.Wnir0VaC-lkp@intel.com \
--to=lkp@intel.com \
--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.