From patchwork Fri Oct 20 13:12:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13430709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 367F6CDB474 for ; Fri, 20 Oct 2023 13:13:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377239AbjJTNNM (ORCPT ); Fri, 20 Oct 2023 09:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377002AbjJTNNL (ORCPT ); Fri, 20 Oct 2023 09:13:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED2F19E; Fri, 20 Oct 2023 06:13:10 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB1A6C433C8; Fri, 20 Oct 2023 13:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697807589; bh=3v3w9N11nD6FfXU/AHmloGedz/Yr2LLf3n2MT+5UOQg=; h=From:To:Cc:Subject:Date:From; b=iR/1qWGCigk5mb+sUX+mtTgr+F11ZN3V1hOM3Q4nAK8r5fYeUto4kpybOnNrQq5Vb nshaIcQcOuDGRRbKWlux8REmv7fgL2opspPCPRrvwwW6F959E0hywgJzEPcS3ovRrv uaD7h/HL286fyaHjuucPf9LSoyu9lQXoKiQV/VUexU7JbOPAfHiZVE606VAuTidV+E n+Kt2TRA0my61BWCkw9OTaCj+UWq3S8yBiSlLLqUp78+HnuuygqYh/vm48iUhXV3+W BbLxxZgaEPWflBfgu+OPwmZs4zxlIqn4GWfiWRZWEPkkWoU0ROZ+r5eUDua9u7URsh 8u01+wfH6W4yw== From: Arnd Bergmann To: John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Georgia Garcia Cc: Arnd Bergmann , Khadija Kamran , Casey Schaufler , Christian Brauner , Luis Chamberlain , apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] apparmor: mark new functions static Date: Fri, 20 Oct 2023 15:12:57 +0200 Message-Id: <20231020131303.785906-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: From: Arnd Bergmann 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 Acked-by: John Johansen --- 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;