All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 13/17] stackleak: add declarations for global functions
Date: Thu, 10 Aug 2023 16:19:31 +0200	[thread overview]
Message-ID: <20230810141947.1236730-14-arnd@kernel.org> (raw)
In-Reply-To: <20230810141947.1236730-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 c36e7a3b45e7e..3be2cb564710b 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


  parent reply	other threads:[~2023-08-10 14:23 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 14:19 [PATCH 00/17] -Wmissing-prototype warning fixes Arnd Bergmann
2023-08-10 14:19 ` Arnd Bergmann
2023-08-10 14:19 ` Arnd Bergmann
2023-08-10 14:19 ` Arnd Bergmann
2023-08-10 14:19 ` Arnd Bergmann
2023-08-10 14:19 ` Arnd Bergmann
2023-08-10 14:19 ` [PATCH 01/17] [RESEND] jffs2: mark __jffs2_dbg_superblock_counts() static Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19 ` [PATCH 02/17] [RESEND] irq_work: consolidate arch_irq_work_raise prototypes Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-11 22:10   ` Masahiro Yamada
2023-08-11 22:10     ` Masahiro Yamada
2023-08-11 22:10     ` Masahiro Yamada
2023-08-11 22:10     ` Masahiro Yamada
2023-08-12  7:34     ` Arnd Bergmann
2023-08-12  7:34       ` Arnd Bergmann
2023-08-12  7:34       ` Arnd Bergmann
2023-08-12  7:34       ` Arnd Bergmann
2023-08-10 14:19 ` [PATCH 03/17] [RESEND] ida: make 'ida_dump' static Arnd Bergmann
2023-08-10 14:19 ` [PATCH 04/17] pci: sysfs: move declarations to linux/pci.h Arnd Bergmann
2023-08-10 14:38   ` Bjorn Helgaas
2023-08-10 14:38     ` Bjorn Helgaas
2023-08-10 14:19 ` [PATCH 05/17] swim3: mark swim3_init() static Arnd Bergmann
2023-08-10 14:26   ` Jinpu Wang
2023-08-10 14:33   ` Jens Axboe
2023-08-10 14:19 ` [PATCH 06/17] macintosh/ams: mark ams_init() static Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 17:21   ` Christophe Leroy
2023-08-10 14:19 ` [PATCH 07/17] scsi: qlogicpti: mark qlogicpti_info() static Arnd Bergmann
2023-08-10 14:27   ` Jinpu Wang
2023-08-21 20:38   ` Martin K. Petersen
2023-08-10 14:19 ` [PATCH 08/17] microblaze: mark flush_dcache_folio() inline Arnd Bergmann
2023-08-23  7:34   ` Michal Simek
2023-08-10 14:19 ` [PATCH 09/17] parport: gsc: mark init function static Arnd Bergmann
2023-08-10 15:13   ` Helge Deller
2023-08-28 10:04   ` Sudip Mukherjee
2023-08-10 14:19 ` [PATCH 10/17] zorro: include zorro.h in names.c Arnd Bergmann
2023-08-16 15:49   ` Geert Uytterhoeven
2023-08-10 14:19 ` [PATCH 11/17] scsi: gvp11: remove unused gvp11_setup() function Arnd Bergmann
2023-08-16 15:52   ` Geert Uytterhoeven
2023-08-21 20:38   ` Martin K. Petersen
2023-08-10 14:19 ` [PATCH 12/17] time: make sysfs_get_uname() function visible in header Arnd Bergmann
2023-08-10 14:19 ` Arnd Bergmann [this message]
2023-08-10 14:19 ` [PATCH 14/17] kprobes: unify kprobes_exceptions_nofify() prototypes Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-11 11:46   ` Masami Hiramatsu
2023-08-11 11:46     ` Masami Hiramatsu
2023-08-11 11:46     ` Masami Hiramatsu
2023-08-11 11:46     ` Masami Hiramatsu
2023-08-10 14:19 ` [PATCH 15/17] arch: fix asm-offsets.c building with -Wmissing-prototypes Arnd Bergmann
2023-08-11 22:12   ` Masahiro Yamada
2023-08-11 22:12     ` Masahiro Yamada
2023-08-12  7:46     ` Arnd Bergmann
2023-08-12  7:46       ` Arnd Bergmann
2023-08-10 14:19 ` [PATCH 16/17] [RFC] arch: turn -Wmissing-prototypes off conditionally Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:19   ` Arnd Bergmann
2023-08-10 14:59   ` Christophe Leroy
2023-08-10 14:59     ` Christophe Leroy
2023-08-10 14:59     ` Christophe Leroy
2023-08-10 14:59     ` Christophe Leroy
2023-08-10 15:21     ` Arnd Bergmann
2023-08-10 15:21       ` Arnd Bergmann
2023-08-10 15:21       ` Arnd Bergmann
2023-08-10 15:21       ` Arnd Bergmann
2023-08-10 15:59       ` Helge Deller
2023-08-10 15:59         ` Helge Deller
2023-08-10 15:59         ` Helge Deller
2023-08-10 15:59         ` Helge Deller
2023-08-10 19:15         ` Arnd Bergmann
2023-08-10 19:15           ` Arnd Bergmann
2023-08-10 19:15           ` Arnd Bergmann
2023-08-10 19:15           ` Arnd Bergmann
2023-08-11  2:33   ` Guo Ren
2023-08-11  2:33     ` Guo Ren
2023-08-11  2:33     ` Guo Ren
2023-08-11  2:33     ` Guo Ren
2023-08-11 18:25     ` Vineet Gupta
2023-08-11 18:25       ` Vineet Gupta
2023-08-11 18:25       ` Vineet Gupta
2023-08-11 18:25       ` Vineet Gupta
2023-08-11 20:09   ` Stafford Horne
2023-08-11 20:09     ` Stafford Horne
2023-08-11 20:09     ` Stafford Horne
2023-08-11 20:09     ` Stafford Horne
2023-08-12  8:02     ` Arnd Bergmann
2023-08-12  8:02       ` Arnd Bergmann
2023-08-12  8:02       ` Arnd Bergmann
2023-08-12  8:02       ` Arnd Bergmann
2023-08-10 14:19 ` [PATCH 17/17] [RFC] Makefile.extrawarn: turn on missing-prototypes again Arnd Bergmann
2023-08-10 19:02   ` Kees Cook
2023-08-16 14:38 ` [PATCH 00/17] -Wmissing-prototype warning fixes Palmer Dabbelt
2023-08-16 14:38   ` Palmer Dabbelt
2023-08-16 14:38   ` Palmer Dabbelt
2023-08-16 14:38   ` Palmer Dabbelt
2023-08-16 14:38   ` Palmer Dabbelt
2023-08-16 14:38   ` Palmer Dabbelt
2023-08-23 11:55 ` (subset) " Michael Ellerman
2023-08-25  1:12 ` Martin K. Petersen
2023-08-25  1:12   ` Martin K. Petersen
2023-08-25  1:12   ` Martin K. Petersen
2023-08-25  1:12   ` Martin K. Petersen
2023-08-25  1:12   ` Martin K. Petersen
2023-08-25  1:12   ` Martin K. Petersen
2023-08-25  1:30   ` Michael Schmitz
2023-08-25  1:30     ` Michael Schmitz
2023-08-25  1:30     ` Michael Schmitz
2023-08-25  1:30     ` Michael Schmitz
2023-08-25  1:30     ` Michael Schmitz
2023-08-25  1:30     ` Michael Schmitz
2023-08-25  7:39     ` Geert Uytterhoeven
2023-08-25  7:39       ` Geert Uytterhoeven
2023-08-25  7:39       ` Geert Uytterhoeven
2023-08-25  7:39       ` Geert Uytterhoeven
2023-08-25  7:39       ` Geert Uytterhoeven
2023-08-25  7:39       ` Geert Uytterhoeven
2023-08-25 22:44       ` Michael Schmitz
2023-08-25 22:44         ` Michael Schmitz
2023-08-25 22:44         ` Michael Schmitz
2023-08-25 22:44         ` Michael Schmitz
2023-08-25 22:44         ` Michael Schmitz
2023-08-25 22:44         ` Michael Schmitz
2023-08-28  6:42         ` Geert Uytterhoeven
2023-08-28  6:42           ` Geert Uytterhoeven
2023-08-28  6:42           ` Geert Uytterhoeven
2023-08-28  6:42           ` Geert Uytterhoeven
2023-08-28  6:42           ` Geert Uytterhoeven
2023-08-28  6:42           ` Geert Uytterhoeven
2023-08-28  8:07           ` Michael Schmitz
2023-08-28  8:07             ` Michael Schmitz
2023-08-28  8:07             ` Michael Schmitz
2023-08-28  8:07             ` Michael Schmitz
2023-08-28  8:07             ` Michael Schmitz
2023-08-28  8:07             ` Michael Schmitz

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=20230810141947.1236730-14-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.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 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.