* [jj-apparmor:apparmor-next 33/35] security/apparmor/lsm.c:651:5: warning: no previous prototype for 'apparmor_uring_override_creds'
@ 2023-10-19 19:48 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-19 19:48 UTC (permalink / raw)
To: Georgia Garcia; +Cc: oe-kbuild-all, John Johansen
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git apparmor-next
head: 157a3537d6bc28ceb9a11fc8cb67f2152d860146
commit: c4371d90633b73cf6e86aff43ff2b5d95ad2b9eb [33/35] apparmor: add io_uring mediation
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231020/202310200316.9QWiBDoj-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310200316.9QWiBDoj-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/202310200316.9QWiBDoj-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/apparmor/lsm.c:651:5: warning: no previous prototype for 'apparmor_uring_override_creds' [-Wmissing-prototypes]
651 | int apparmor_uring_override_creds(const struct cred *new)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> security/apparmor/lsm.c:675:5: warning: no previous prototype for 'apparmor_uring_sqpoll' [-Wmissing-prototypes]
675 | int apparmor_uring_sqpoll(void)
| ^~~~~~~~~~~~~~~~~~~~~
vim +/apparmor_uring_override_creds +651 security/apparmor/lsm.c
643
644 /**
645 * apparmor_uring_override_creds - check the requested cred override
646 * @new: the target creds
647 *
648 * Check to see if the current task is allowed to override it's credentials
649 * to service an io_uring operation.
650 */
> 651 int apparmor_uring_override_creds(const struct cred *new)
652 {
653 struct aa_profile *profile;
654 struct aa_label *label;
655 int error;
656 DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_NONE, AA_CLASS_IO_URING,
657 OP_URING_OVERRIDE);
658
659 ad.uring.target = cred_label(new);
660 label = __begin_current_label_crit_section();
661 error = fn_for_each(label, profile,
662 profile_uring(profile, AA_MAY_OVERRIDE_CRED,
663 cred_label(new), CAP_SYS_ADMIN, &ad));
664 __end_current_label_crit_section(label);
665
666 return error;
667 }
668
669 /**
670 * apparmor_uring_sqpoll - check if a io_uring polling thread can be created
671 *
672 * Check to see if the current task is allowed to create a new io_uring
673 * kernel polling thread.
674 */
> 675 int apparmor_uring_sqpoll(void)
676 {
677 struct aa_profile *profile;
678 struct aa_label *label;
679 int error;
680 DEFINE_AUDIT_DATA(ad, LSM_AUDIT_DATA_NONE, AA_CLASS_IO_URING,
681 OP_URING_SQPOLL);
682
683 label = __begin_current_label_crit_section();
684 error = fn_for_each(label, profile,
685 profile_uring(profile, AA_MAY_CREATE_SQPOLL,
686 NULL, CAP_SYS_ADMIN, &ad));
687 __end_current_label_crit_section(label);
688
689 return error;
690 }
691 #endif /* CONFIG_IO_URING */
692
--
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:[~2023-10-19 19:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19 19:48 [jj-apparmor:apparmor-next 33/35] security/apparmor/lsm.c:651:5: warning: no previous prototype for 'apparmor_uring_override_creds' 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.