* [intel-lts:pr/57 1/1] security/safesetid/lsm.c:213:5: warning: no previous prototype for 'add_safesetid_whitelist_entry'
@ 2025-02-17 14:01 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-17 14:01 UTC (permalink / raw)
Cc: oe-kbuild-all
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-17 14:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 14:01 [intel-lts:pr/57 1/1] security/safesetid/lsm.c:213:5: warning: no previous prototype for 'add_safesetid_whitelist_entry' kernel test robot
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.