* [PATCH] kdb: include header in signal handling code
@ 2023-05-17 12:54 Arnd Bergmann
2023-05-17 15:43 ` Doug Anderson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-05-17 12:54 UTC (permalink / raw)
To: Jason Wessel, Daniel Thompson
Cc: kgdb-bugreport, Douglas Anderson, Arnd Bergmann, Peter Zijlstra,
Dmitry Vyukov, Kees Cook, Rafael J. Wysocki, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
kdb_send_sig() is defined in the signal code and called from kdb,
but the declaration is part of the kdb internal code.
Include this from signal.c as well to avoid the warning:
kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
kernel/signal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/signal.c b/kernel/signal.c
index 8f6330f0e9ca..d38df14f71ac 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -4780,6 +4780,8 @@ void __init signals_init(void)
#ifdef CONFIG_KGDB_KDB
#include <linux/kdb.h>
+#include "debug/kdb/kdb_private.h"
+
/*
* kdb_send_sig - Allows kdb to send signals without exposing
* signal internals. This function checks if the required locks are
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] kdb: include header in signal handling code
2023-05-17 12:54 [PATCH] kdb: include header in signal handling code Arnd Bergmann
@ 2023-05-17 15:43 ` Doug Anderson
2023-05-17 18:56 ` Kees Cook
2023-06-30 15:24 ` Daniel Thompson
2 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2023-05-17 15:43 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jason Wessel, Daniel Thompson, kgdb-bugreport, Arnd Bergmann,
Peter Zijlstra, Dmitry Vyukov, Kees Cook, Rafael J. Wysocki,
linux-kernel
Hi,
On Wed, May 17, 2023 at 5:54 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> kdb_send_sig() is defined in the signal code and called from kdb,
> but the declaration is part of the kdb internal code.
> Include this from signal.c as well to avoid the warning:
>
> kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> kernel/signal.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kdb: include header in signal handling code
2023-05-17 12:54 [PATCH] kdb: include header in signal handling code Arnd Bergmann
2023-05-17 15:43 ` Doug Anderson
@ 2023-05-17 18:56 ` Kees Cook
2023-06-30 15:24 ` Daniel Thompson
2 siblings, 0 replies; 6+ messages in thread
From: Kees Cook @ 2023-05-17 18:56 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jason Wessel, Daniel Thompson, kgdb-bugreport, Douglas Anderson,
Arnd Bergmann, Peter Zijlstra, Dmitry Vyukov, Rafael J. Wysocki,
linux-kernel
On Wed, May 17, 2023 at 02:54:09PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> kdb_send_sig() is defined in the signal code and called from kdb,
> but the declaration is part of the kdb internal code.
> Include this from signal.c as well to avoid the warning:
>
> kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kdb: include header in signal handling code
2023-05-17 12:54 [PATCH] kdb: include header in signal handling code Arnd Bergmann
2023-05-17 15:43 ` Doug Anderson
2023-05-17 18:56 ` Kees Cook
@ 2023-06-30 15:24 ` Daniel Thompson
2023-06-30 15:31 ` Arnd Bergmann
2 siblings, 1 reply; 6+ messages in thread
From: Daniel Thompson @ 2023-06-30 15:24 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jason Wessel, kgdb-bugreport, Douglas Anderson, Arnd Bergmann,
Peter Zijlstra, Dmitry Vyukov, Kees Cook, Rafael J. Wysocki,
linux-kernel
On Wed, May 17, 2023 at 02:54:09PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> kdb_send_sig() is defined in the signal code and called from kdb,
> but the declaration is part of the kdb internal code.
> Include this from signal.c as well to avoid the warning:
>
> kernel/signal.c:4789:6: error: no previous prototype for 'kdb_send_sig' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Sorry to be so late with this feedback! I got as far as queuing this up
for merge before the penny dropped...
> ---
> kernel/signal.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/signal.c b/kernel/signal.c
> index 8f6330f0e9ca..d38df14f71ac 100644
> --- a/kernel/signal.c
> +++ b/kernel/signal.c
> @@ -4780,6 +4780,8 @@ void __init signals_init(void)
>
> #ifdef CONFIG_KGDB_KDB
> #include <linux/kdb.h>
> +#include "debug/kdb/kdb_private.h"
> +
Isn't is better to move the prototype for kdb_send_sig() into
linux/kdb.h instead?
That's what other kdb helpers spread across the kernel do
(kdb_walk_kallsyms() for example).
Daniel.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kdb: include header in signal handling code
2023-06-30 15:24 ` Daniel Thompson
@ 2023-06-30 15:31 ` Arnd Bergmann
2023-06-30 15:39 ` Daniel Thompson
0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2023-06-30 15:31 UTC (permalink / raw)
To: Daniel Thompson, Arnd Bergmann
Cc: Jason Wessel, kgdb-bugreport, Doug Anderson, Peter Zijlstra,
Dmitry Vyukov, Kees Cook, Rafael J. Wysocki, linux-kernel
On Fri, Jun 30, 2023, at 17:24, Daniel Thompson wrote:
> On Wed, May 17, 2023 at 02:54:09PM +0200, Arnd Bergmann wrote:
>> diff --git a/kernel/signal.c b/kernel/signal.c
>> index 8f6330f0e9ca..d38df14f71ac 100644
>> --- a/kernel/signal.c
>> +++ b/kernel/signal.c
>> @@ -4780,6 +4780,8 @@ void __init signals_init(void)
>>
>> #ifdef CONFIG_KGDB_KDB
>> #include <linux/kdb.h>
>> +#include "debug/kdb/kdb_private.h"
>> +
>
> Isn't is better to move the prototype for kdb_send_sig() into
> linux/kdb.h instead?
>
> That's what other kdb helpers spread across the kernel do
> (kdb_walk_kallsyms() for example).
Right, that is probably better here. Not sure if it's worth
reworking the branch if you already merged it, the difference
seems rather minor.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kdb: include header in signal handling code
2023-06-30 15:31 ` Arnd Bergmann
@ 2023-06-30 15:39 ` Daniel Thompson
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Thompson @ 2023-06-30 15:39 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Jason Wessel, kgdb-bugreport, Doug Anderson,
Peter Zijlstra, Dmitry Vyukov, Kees Cook, Rafael J. Wysocki,
linux-kernel
On Fri, Jun 30, 2023 at 05:31:01PM +0200, Arnd Bergmann wrote:
> On Fri, Jun 30, 2023, at 17:24, Daniel Thompson wrote:
> > On Wed, May 17, 2023 at 02:54:09PM +0200, Arnd Bergmann wrote:
> >> diff --git a/kernel/signal.c b/kernel/signal.c
> >> index 8f6330f0e9ca..d38df14f71ac 100644
> >> --- a/kernel/signal.c
> >> +++ b/kernel/signal.c
> >> @@ -4780,6 +4780,8 @@ void __init signals_init(void)
> >>
> >> #ifdef CONFIG_KGDB_KDB
> >> #include <linux/kdb.h>
> >> +#include "debug/kdb/kdb_private.h"
> >> +
> >
> > Isn't is better to move the prototype for kdb_send_sig() into
> > linux/kdb.h instead?
> >
> > That's what other kdb helpers spread across the kernel do
> > (kdb_walk_kallsyms() for example).
>
> Right, that is probably better here. Not sure if it's worth
> reworking the branch if you already merged it, the difference
> seems rather minor.
I figure it will take me as long to rework the branch as it will to
write the covering letter on the pull-request to explain why kgdb/kdb
is messing around in kernel/signal.c ;-) .
Daniel.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-30 15:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17 12:54 [PATCH] kdb: include header in signal handling code Arnd Bergmann
2023-05-17 15:43 ` Doug Anderson
2023-05-17 18:56 ` Kees Cook
2023-06-30 15:24 ` Daniel Thompson
2023-06-30 15:31 ` Arnd Bergmann
2023-06-30 15:39 ` Daniel Thompson
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).