From: kernel test robot <lkp@intel.com>
To: Georgia Garcia <georgia.garcia@canonical.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
John Johansen <john.johansen@canonical.com>
Subject: [linux-next:master 10379/13906] security/apparmor/lsm.c:651:5: warning: no previous declaration for 'apparmor_uring_override_creds'
Date: Fri, 20 Oct 2023 19:18:28 +0800 [thread overview]
Message-ID: <202310201911.QT2YAa39-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2030579113a1b1b5bfd7ff24c0852847836d8fd1
commit: c4371d90633b73cf6e86aff43ff2b5d95ad2b9eb [10379/13906] apparmor: add io_uring mediation
config: x86_64-randconfig-072-20231020 (https://download.01.org/0day-ci/archive/20231020/202310201911.QT2YAa39-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231020/202310201911.QT2YAa39-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/202310201911.QT2YAa39-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/apparmor/lsm.c:651:5: warning: no previous declaration for 'apparmor_uring_override_creds' [-Wmissing-declarations]
int apparmor_uring_override_creds(const struct cred *new)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> security/apparmor/lsm.c:675:5: warning: no previous declaration for 'apparmor_uring_sqpoll' [-Wmissing-declarations]
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
reply other threads:[~2023-10-20 11:19 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=202310201911.QT2YAa39-lkp@intel.com \
--to=lkp@intel.com \
--cc=georgia.garcia@canonical.com \
--cc=john.johansen@canonical.com \
--cc=linux-mm@kvack.org \
--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.