linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] apparmor: mark new functions static
@ 2023-10-20 13:12 Arnd Bergmann
  2023-10-22  7:46 ` John Johansen
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-10-20 13:12 UTC (permalink / raw)
  To: John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
	Georgia Garcia
  Cc: Arnd Bergmann, Khadija Kamran, Casey Schaufler, Christian Brauner,
	Luis Chamberlain, apparmor, linux-security-module, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Two new functions were introduced as global functions when they are
only called from inside the file that defines them and should have
been static:

security/apparmor/lsm.c:658:5: error: no previous prototype for 'apparmor_uring_override_creds' [-Werror=missing-prototypes]
security/apparmor/lsm.c:682:5: error: no previous prototype for 'apparmor_uring_sqpoll' [-Werror=missing-prototypes]

Fixes: c4371d90633b7 ("apparmor: add io_uring mediation")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 security/apparmor/lsm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 91ff91cf1aaef..4981bdf029931 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -655,7 +655,7 @@ static int profile_uring(struct aa_profile *profile, u32 request,
  * Check to see if the current task is allowed to override it's credentials
  * to service an io_uring operation.
  */
-int apparmor_uring_override_creds(const struct cred *new)
+static int apparmor_uring_override_creds(const struct cred *new)
 {
 	struct aa_profile *profile;
 	struct aa_label *label;
@@ -679,7 +679,7 @@ int apparmor_uring_override_creds(const struct cred *new)
  * Check to see if the current task is allowed to create a new io_uring
  * kernel polling thread.
  */
-int apparmor_uring_sqpoll(void)
+static int apparmor_uring_sqpoll(void)
 {
 	struct aa_profile *profile;
 	struct aa_label *label;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] apparmor: mark new functions static
  2023-10-20 13:12 [PATCH] apparmor: mark new functions static Arnd Bergmann
@ 2023-10-22  7:46 ` John Johansen
  0 siblings, 0 replies; 2+ messages in thread
From: John Johansen @ 2023-10-22  7:46 UTC (permalink / raw)
  To: Arnd Bergmann, Paul Moore, James Morris, Serge E. Hallyn,
	Georgia Garcia
  Cc: Arnd Bergmann, Khadija Kamran, Casey Schaufler, Christian Brauner,
	Luis Chamberlain, apparmor, linux-security-module, linux-kernel

On 10/20/23 06:12, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Two new functions were introduced as global functions when they are
> only called from inside the file that defines them and should have
> been static:
> 
> security/apparmor/lsm.c:658:5: error: no previous prototype for 'apparmor_uring_override_creds' [-Werror=missing-prototypes]
> security/apparmor/lsm.c:682:5: error: no previous prototype for 'apparmor_uring_sqpoll' [-Werror=missing-prototypes]
> 
> Fixes: c4371d90633b7 ("apparmor: add io_uring mediation")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: John Johansen <john.johansen@canonical.com>

I have pulled this into apparmor-next

> ---
>   security/apparmor/lsm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index 91ff91cf1aaef..4981bdf029931 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -655,7 +655,7 @@ static int profile_uring(struct aa_profile *profile, u32 request,
>    * Check to see if the current task is allowed to override it's credentials
>    * to service an io_uring operation.
>    */
> -int apparmor_uring_override_creds(const struct cred *new)
> +static int apparmor_uring_override_creds(const struct cred *new)
>   {
>   	struct aa_profile *profile;
>   	struct aa_label *label;
> @@ -679,7 +679,7 @@ int apparmor_uring_override_creds(const struct cred *new)
>    * Check to see if the current task is allowed to create a new io_uring
>    * kernel polling thread.
>    */
> -int apparmor_uring_sqpoll(void)
> +static int apparmor_uring_sqpoll(void)
>   {
>   	struct aa_profile *profile;
>   	struct aa_label *label;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-22  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-20 13:12 [PATCH] apparmor: mark new functions static Arnd Bergmann
2023-10-22  7:46 ` John Johansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).