From: Paul Moore <paul@paul-moore.com>
To: Arnd Bergmann <arnd@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kselftest@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-mips@vger.kernel.org, linux-mm@kvack.org,
Pavel Machek <pavel@ucw.cz>, Christoph Lameter <cl@linux.com>,
Will Deacon <will@kernel.org>,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linux-sh@vger.kernel.org, Helge Deller <deller@gmx.de>,
x86@kernel.org, Russell King <linux@armlinux.org.uk>,
Ingo Molnar <mingo@redhat.com>, Waiman Long <longman@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
linux-pm@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Dennis Zhou <dennis@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org, kunit-dev@googlegroups.com,
Michal Simek <monstr@monstr.eu>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Paris <eparis@redhat.com>,
audit@vger.kernel.or g, Palmer Dabbelt <palmer@dabbelt.com>,
Tejun Heo <tj@kernel.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 4/14] audit: avoid missing-prototype warnings
Date: Wed, 17 May 2023 10:33:52 -0400 [thread overview]
Message-ID: <e1a07eed22cb33af2733bdffe42b09f0.paul@paul-moore.com> (raw)
In-Reply-To: <20230517131102.934196-5-arnd@kernel.org>
On May 17, 2023 Arnd Bergmann <arnd@kernel.org> wrote:
>
> Building with 'make W=1' reveals two function definitions without
> a previous prototype in the audit code:
>
> lib/compat_audit.c:32:5: error: no previous prototype for 'audit_classify_compat_syscall' [-Werror=missing-prototypes]
> kernel/audit.c:1813:14: error: no previous prototype for 'audit_serial' [-Werror=missing-prototypes]
>
> The first one needs a declaration from linux/audit.h but cannot
> include that header without causing conflicting (compat) syscall number
> definitions, so move the it into linux/audit_arch.h.
>
> The second one is declared conditionally based on CONFIG_AUDITSYSCALL
> but needed as a local function even when that option is disabled, so
> move the declaration out of the #ifdef block.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> include/linux/audit.h | 2 --
> include/linux/audit_arch.h | 2 ++
> kernel/audit.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/audit.h b/include/linux/audit.h
> index 31086a72e32a..6a3a9e122bb5 100644
> --- a/include/linux/audit.h
> +++ b/include/linux/audit.h
> @@ -130,8 +130,6 @@ extern unsigned compat_dir_class[];
> extern unsigned compat_chattr_class[];
> extern unsigned compat_signal_class[];
>
> -extern int audit_classify_compat_syscall(int abi, unsigned syscall);
> -
> /* audit_names->type values */
> #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
> #define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */
> diff --git a/include/linux/audit_arch.h b/include/linux/audit_arch.h
> index 8fdb1afe251a..0e34d673ef17 100644
> --- a/include/linux/audit_arch.h
> +++ b/include/linux/audit_arch.h
> @@ -21,4 +21,6 @@ enum auditsc_class_t {
> AUDITSC_NVALS /* count */
> };
>
> +extern int audit_classify_compat_syscall(int abi, unsigned syscall);
> +
> #endif
> diff --git a/kernel/audit.h b/kernel/audit.h
> index c57b008b9914..94738bce40b2 100644
> --- a/kernel/audit.h
> +++ b/kernel/audit.h
> @@ -259,8 +259,8 @@ extern struct tty_struct *audit_get_tty(void);
> extern void audit_put_tty(struct tty_struct *tty);
>
> /* audit watch/mark/tree functions */
> -#ifdef CONFIG_AUDITSYSCALL
> extern unsigned int audit_serial(void);
> +#ifdef CONFIG_AUDITSYSCALL
> extern int auditsc_get_stamp(struct audit_context *ctx,
> struct timespec64 *t, unsigned int *serial);
We probably should move the audit_serial() and auditsc_get_stamp()
away from the watch/mark/tree functions, but that isn't your problem.
Anyway, this looks okay to me; do you have a problem if I merge this
via the audit/next branch or were you hoping to have this go in
through a different tree?
--
paul-moore.com
next prev parent reply other threads:[~2023-05-17 14:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 13:10 [PATCH 00/14] mm/init/kernel: missing-prototypes warnings Arnd Bergmann
2023-05-17 13:10 ` [PATCH 01/14] mm: percpu: unhide pcpu_embed_first_chunk prototype Arnd Bergmann
2023-05-17 13:10 ` [PATCH 02/14] mm: page_poison: always declare __kernel_map_pages() function Arnd Bergmann
2023-05-17 13:10 ` [PATCH 03/14] mm: sparse: mark populate_section_memmap() static Arnd Bergmann
2023-05-17 13:10 ` [PATCH 04/14] audit: avoid missing-prototype warnings Arnd Bergmann
2023-05-17 14:33 ` Paul Moore [this message]
2023-05-17 14:51 ` [PATCH 4/14] " Arnd Bergmann
2023-05-17 15:51 ` Paul Moore
2023-05-17 13:10 ` [PATCH 05/14] lib: devmem_is_allowed: include linux/io.h Arnd Bergmann
2023-05-17 13:10 ` [PATCH 06/14] locking: add lockevent_read() prototype Arnd Bergmann
2023-05-17 13:10 ` [PATCH 07/14] panic: hide unused global functions Arnd Bergmann
2023-05-17 13:10 ` [PATCH 08/14] panic: make function declarations visible Arnd Bergmann
2023-05-17 13:10 ` [PATCH 09/14] kunit: include debugfs header file Arnd Bergmann
2023-05-18 3:54 ` David Gow
2023-05-17 13:10 ` [PATCH 10/14] suspend: add a arch_resume_nosmt() prototype Arnd Bergmann
2023-05-17 13:48 ` Rafael J. Wysocki
2023-05-17 14:52 ` Arnd Bergmann
2023-05-24 17:33 ` Rafael J. Wysocki
2023-05-17 13:10 ` [PATCH 11/14] init: consolidate prototypes in linux/init.h Arnd Bergmann
2023-06-22 15:02 ` Palmer Dabbelt
2023-05-17 13:11 ` [PATCH 12/14] init: move cifs_root_data() prototype into linux/mount.h Arnd Bergmann
2023-05-17 13:11 ` [PATCH 13/14] thread_info: move function declarations to linux/thread_info.h Arnd Bergmann
2023-05-24 18:48 ` Catalin Marinas
2023-05-17 13:11 ` [PATCH 14/14] time_namespace: always provide arch_get_vdso_data() prototype for vdso Arnd Bergmann
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=e1a07eed22cb33af2733bdffe42b09f0.paul@paul-moore.com \
--to=paul@paul-moore.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=audit@vger.kernel.or \
--cc=boqun.feng@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=cl@linux.com \
--cc=deller@gmx.de \
--cc=dennis@kernel.org \
--cc=eparis@redhat.com \
--cc=hca@linux.ibm.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/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 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).