From: Arnd Bergmann <arnd@kernel•org>
To: Andrew Morton <akpm@linux-foundation•org>,
linux-kernel@vger•kernel.org,
Masahiro Yamada <masahiroy@kernel•org>,
linux-kbuild@vger•kernel.org
Cc: "Mark Rutland" <mark.rutland@arm•com>,
"Juri Lelli" <juri.lelli@redhat•com>,
linux-fbdev@vger•kernel.org, x86@kernel•org,
loongarch@lists•linux.dev, linux-sh@vger•kernel.org,
"Peter Zijlstra" <peterz@infradead•org>,
"Catalin Marinas" <catalin.marinas@arm•com>,
dri-devel@lists•freedesktop.org, netdev@vger•kernel.org,
"Guo Ren" <guoren@kernel•org>,
"Anil S Keshavamurthy" <anil.s.keshavamurthy@intel•com>,
sparclinux@vger•kernel.org, linux-riscv@lists•infradead.org,
"Vincenzo Frascino" <vincenzo.frascino@arm•com>,
"Will Deacon" <will@kernel•org>,
"Greg Ungerer" <gerg@linux-m68k•org>,
"Nicolas Schier" <nicolas@fjasle•eu>,
linux-s390@vger•kernel.org,
"Vincent Guittot" <vincent.guittot@linaro•org>,
"Helge Deller" <deller@gmx•de>,
"Huacai Chen" <chenhuacai@kernel•org>,
"Russell King" <linux@armlinux•org.uk>,
"Ard Biesheuvel" <ardb@kernel•org>,
linux-bcachefs@vger•kernel.org, "Ingo Molnar" <mingo@redhat•com>,
"Vineet Gupta" <vgupta@kernel•org>,
"Naveen N. Rao" <naveen.n.rao@linux•ibm.com>,
"Matt Turner" <mattst88@gmail•com>,
linux-snps-arc@lists•infradead.org,
linux-trace-kernel@vger•kernel.org,
"Kees Cook" <keescook@chromium•org>,
"Arnd Bergmann" <arnd@arndb•de>,
"Heiko Carstens" <hca@linux•ibm.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix•de>,
linuxppc-dev@lists•ozlabs.org,
"Nicholas Piggin" <npiggin@gmail•com>,
"Nathan Chancellor" <nathan@kernel•org>,
linux-m68k@lists•linux-m68k.org, linux-csky@vger•kernel.org,
"Steven Rostedt" <rostedt@goodmis•org>,
"Andy Lutomirski" <luto@kernel•org>,
"John Paul Adrian Glaubitz" <glaubitz@physik•fu-berlin.de>,
"Thomas Gleixner" <tglx@linutronix•de>,
linux-arm-kernel@lists•infradead.org,
"Michal Simek" <monstr@monstr•eu>,
"Thomas Bogendoerfer" <tsbogend@alpha•franken.de>,
linux-parisc@vger•kernel.org, "Timur Tabi" <timur@kernel•org>,
"Geoff Levand" <geoff@infradead•org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation•org>,
"Kent Overstreet" <kent.overstreet@linux•dev>,
"Nick Desaulniers" <ndesaulniers@google•com>,
linux-mips@vger•kernel.org
Subject: [PATCH 06/22] [RESEND] stackleak: add declarations for global functions
Date: Wed, 8 Nov 2023 13:58:27 +0100 [thread overview]
Message-ID: <20231108125843.3806765-7-arnd@kernel.org> (raw)
In-Reply-To: <20231108125843.3806765-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb•de>
With -Wmissing-prototypes enabled, the stackleak code produces a couple of
warnings that have no declarations because they are only called from assembler:
stackleak.c:127:25: error: no previous prototype for 'stackleak_erase' [-Werror=missing-prototypes]
stackleak.c:139:25: error: no previous prototype for 'stackleak_erase_on_task_stack' [-Werror=missing-prototypes]
stackleak.c:151:25: error: no previous prototype for 'stackleak_erase_off_task_stack' [-Werror=missing-prototypes]
stackleak.c:159:49: error: no previous prototype for 'stackleak_track_stack' [-Werror=missing-prototypes]
Add declarations to the stackleak header to shut up the warnings.
Signed-off-by: Arnd Bergmann <arnd@arndb•de>
---
include/linux/stackleak.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/stackleak.h b/include/linux/stackleak.h
index c36e7a3b45e7..3be2cb564710 100644
--- a/include/linux/stackleak.h
+++ b/include/linux/stackleak.h
@@ -14,6 +14,7 @@
#ifdef CONFIG_GCC_PLUGIN_STACKLEAK
#include <asm/stacktrace.h>
+#include <linux/linkage.h>
/*
* The lowest address on tsk's stack which we can plausibly erase.
@@ -76,6 +77,11 @@ static inline void stackleak_task_init(struct task_struct *t)
# endif
}
+asmlinkage void noinstr stackleak_erase(void);
+asmlinkage void noinstr stackleak_erase_on_task_stack(void);
+asmlinkage void noinstr stackleak_erase_off_task_stack(void);
+void __no_caller_saved_registers noinstr stackleak_track_stack(void);
+
#else /* !CONFIG_GCC_PLUGIN_STACKLEAK */
static inline void stackleak_task_init(struct task_struct *t) { }
#endif
--
2.39.2
next prev parent reply other threads:[~2023-11-08 21:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 12:58 [PATCH 00/22] -Wmissing-prototype warning fixes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 01/22] [RESEND^2] ida: make 'ida_dump' static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 02/22] [RESEND^2] jffs2: mark __jffs2_dbg_superblock_counts() static Arnd Bergmann
2023-11-09 1:07 ` Zhihao Cheng
2023-11-08 12:58 ` [PATCH 03/22] [RESEND] kprobes: unify kprobes_exceptions_nofify() prototypes Arnd Bergmann
2023-11-08 23:20 ` Masami Hiramatsu
2023-11-08 12:58 ` [PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header Arnd Bergmann
2023-11-10 12:41 ` Uwe Kleine-König
2023-11-08 12:58 ` [PATCH 05/22] [RESEND] parport: gsc: mark init function static Arnd Bergmann
2023-11-08 12:58 ` Arnd Bergmann [this message]
2023-11-08 12:58 ` [PATCH 07/22] [RESEND] sched: fair: move unused stub functions to header Arnd Bergmann
2023-11-08 12:58 ` [PATCH 08/22] [v2] arch: consolidate arch_irq_work_raise prototypes Arnd Bergmann
2024-01-10 9:03 ` Geert Uytterhoeven
2024-01-10 10:20 ` Arnd Bergmann
2023-11-08 12:58 ` [PATCH 09/22] [v2] arch: fix asm-offsets.c building with -Wmissing-prototypes Arnd Bergmann
2023-11-08 19:10 ` Sam Ravnborg
2023-11-08 12:58 ` [PATCH 10/22] microblaze: include linux/cpu.h for trap_init() prototype Arnd Bergmann
[not found] ` <CAMuHMdXgdn_cMq0YeqPu3sUeM5cEYbCoodxu8XwCGiRJ-vFsyw@mail.gmail.com>
2023-11-08 21:07 ` Arnd Bergmann
2023-11-08 12:58 ` [PATCH 11/22] x86: sta2x11: include header for sta2x11_get_instance() prototype Arnd Bergmann
2023-11-08 12:58 ` [PATCH 12/22] csky: fix arch_jump_label_transform_static override Arnd Bergmann
2023-11-12 4:21 ` Guo Ren
2023-11-08 12:58 ` [PATCH 13/22] arch: add do_page_fault prototypes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 14/22] arch: add missing prepare_ftrace_return() prototypes Arnd Bergmann
2023-11-08 12:58 ` [PATCH 15/22] arch: vdso: consolidate gettime prototypes Arnd Bergmann
2023-11-08 18:31 ` Christophe Leroy
2023-11-08 19:37 ` Arnd Bergmann
2023-11-09 7:50 ` Christophe Leroy
2023-11-09 10:18 ` Michael Ellerman
2023-11-09 10:49 ` Christophe Leroy
2023-11-09 12:23 ` Michael Ellerman
2023-11-10 10:16 ` Vincenzo Frascino
2023-11-24 12:04 ` Mark Brown
2023-11-08 12:58 ` [PATCH 16/22] bcachefs: mark bch2_target_to_text_sb() static Arnd Bergmann
2023-11-08 20:19 ` Kent Overstreet
2023-11-08 12:58 ` [PATCH 17/22] powerpc: ps3: move udbg_shutdown_ps3gelic prototype Arnd Bergmann
2023-11-08 14:18 ` Geoff Levand
2023-11-08 15:10 ` Jakub Kicinski
2023-11-08 12:58 ` [PATCH 18/22] powerpc: pasemi: mark pas_shutdown() static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 19/22] powerpc: powermac: mark smp_psurge_{give,take}_timebase static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static Arnd Bergmann
2023-11-21 14:12 ` Greg Kroah-Hartman
2023-11-08 12:58 ` [PATCH 21/22] fbdev/fsl-diu-fb: mark wr_reg_wa() static Arnd Bergmann
2023-11-08 12:58 ` [PATCH 22/22] Makefile.extrawarn: turn on missing-prototypes globally Arnd Bergmann
2023-12-07 12:38 ` (subset) [PATCH 00/22] -Wmissing-prototype warning fixes Michael Ellerman
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=20231108125843.3806765-7-arnd@kernel.org \
--to=arnd@kernel$(echo .)org \
--cc=akpm@linux-foundation$(echo .)org \
--cc=anil.s.keshavamurthy@intel$(echo .)com \
--cc=ardb@kernel$(echo .)org \
--cc=arnd@arndb$(echo .)de \
--cc=catalin.marinas@arm$(echo .)com \
--cc=chenhuacai@kernel$(echo .)org \
--cc=deller@gmx$(echo .)de \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=geoff@infradead$(echo .)org \
--cc=gerg@linux-m68k$(echo .)org \
--cc=glaubitz@physik$(echo .)fu-berlin.de \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=guoren@kernel$(echo .)org \
--cc=hca@linux$(echo .)ibm.com \
--cc=juri.lelli@redhat$(echo .)com \
--cc=keescook@chromium$(echo .)org \
--cc=kent.overstreet@linux$(echo .)dev \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-bcachefs@vger$(echo .)kernel.org \
--cc=linux-csky@vger$(echo .)kernel.org \
--cc=linux-fbdev@vger$(echo .)kernel.org \
--cc=linux-kbuild@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-m68k@lists$(echo .)linux-m68k.org \
--cc=linux-mips@vger$(echo .)kernel.org \
--cc=linux-parisc@vger$(echo .)kernel.org \
--cc=linux-riscv@lists$(echo .)infradead.org \
--cc=linux-s390@vger$(echo .)kernel.org \
--cc=linux-sh@vger$(echo .)kernel.org \
--cc=linux-snps-arc@lists$(echo .)infradead.org \
--cc=linux-trace-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=loongarch@lists$(echo .)linux.dev \
--cc=luto@kernel$(echo .)org \
--cc=mark.rutland@arm$(echo .)com \
--cc=masahiroy@kernel$(echo .)org \
--cc=mattst88@gmail$(echo .)com \
--cc=mingo@redhat$(echo .)com \
--cc=monstr@monstr$(echo .)eu \
--cc=nathan@kernel$(echo .)org \
--cc=naveen.n.rao@linux$(echo .)ibm.com \
--cc=ndesaulniers@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nicolas@fjasle$(echo .)eu \
--cc=npiggin@gmail$(echo .)com \
--cc=peterz@infradead$(echo .)org \
--cc=rostedt@goodmis$(echo .)org \
--cc=sparclinux@vger$(echo .)kernel.org \
--cc=tglx@linutronix$(echo .)de \
--cc=timur@kernel$(echo .)org \
--cc=tsbogend@alpha$(echo .)franken.de \
--cc=u.kleine-koenig@pengutronix$(echo .)de \
--cc=vgupta@kernel$(echo .)org \
--cc=vincent.guittot@linaro$(echo .)org \
--cc=vincenzo.frascino@arm$(echo .)com \
--cc=will@kernel$(echo .)org \
--cc=x86@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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