2023-12-22 04:46:07

by Randy Dunlap

[permalink] [raw]
Subject: [PATCH v2] LoongArch: signal.c: add header file to fix build error

loongarch's signal.c uses rseq_signal_deliver() so it should
pull in the appropriate header to prevent a build error:

../arch/loongarch/kernel/signal.c: In function 'handle_signal':
../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implicit-function-declaration]
1034 | rseq_signal_deliver(ksig, regs);
| ^~~~~~~~~~~~~~~~~~~

Fixes: b74baf4ad05b ("LoongArch: Add signal handling support")
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: WANG Xuerui <[email protected]>
Cc: [email protected]
Cc: Kent Overstreet <[email protected]>
---
v2: repair Cc: list

arch/loongarch/kernel/signal.c | 1 +
1 file changed, 1 insertion(+)

diff -- a/arch/loongarch/kernel/signal.c b/arch/loongarch/kernel/signal.c
--- a/arch/loongarch/kernel/signal.c
+++ b/arch/loongarch/kernel/signal.c
@@ -15,6 +15,7 @@
#include <linux/context_tracking.h>
#include <linux/entry-common.h>
#include <linux/irqflags.h>
+#include <linux/rseq.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/personality.h>


2023-12-22 04:59:26

by Huacai Chen

[permalink] [raw]
Subject: Re: [PATCH v2] LoongArch: signal.c: add header file to fix build error

Hi, Randy,

I cannot reproduce it with the default config file.

Huacai

On Fri, Dec 22, 2023 at 12:46 PM Randy Dunlap <[email protected]> wrote:
>
> loongarch's signal.c uses rseq_signal_deliver() so it should
> pull in the appropriate header to prevent a build error:
>
> ../arch/loongarch/kernel/signal.c: In function 'handle_signal':
> ../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implicit-function-declaration]
> 1034 | rseq_signal_deliver(ksig, regs);
> | ^~~~~~~~~~~~~~~~~~~
>
> Fixes: b74baf4ad05b ("LoongArch: Add signal handling support")
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: Huacai Chen <[email protected]>
> Cc: WANG Xuerui <[email protected]>
> Cc: [email protected]
> Cc: Kent Overstreet <[email protected]>
> ---
> v2: repair Cc: list
>
> arch/loongarch/kernel/signal.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff -- a/arch/loongarch/kernel/signal.c b/arch/loongarch/kernel/signal.c
> --- a/arch/loongarch/kernel/signal.c
> +++ b/arch/loongarch/kernel/signal.c
> @@ -15,6 +15,7 @@
> #include <linux/context_tracking.h>
> #include <linux/entry-common.h>
> #include <linux/irqflags.h>
> +#include <linux/rseq.h>
> #include <linux/sched.h>
> #include <linux/mm.h>
> #include <linux/personality.h>

2023-12-23 10:28:19

by Huacai Chen

[permalink] [raw]
Subject: Re: [PATCH v2] LoongArch: signal.c: add header file to fix build error

On Fri, Dec 22, 2023 at 12:59 PM Huacai Chen <[email protected]> wrote:
>
> Hi, Randy,
>
> I cannot reproduce it with the default config file.
Oh, I know, this error only occurs in linux-next, but I think this
patch should be squashed into "rseq: Split out rseq.h from sched.h".
Or as a fix applied to the bcachefs tree rather than the loongarch
tree.

Huacai

>
> Huacai
>
> On Fri, Dec 22, 2023 at 12:46 PM Randy Dunlap <[email protected]> wrote:
> >
> > loongarch's signal.c uses rseq_signal_deliver() so it should
> > pull in the appropriate header to prevent a build error:
> >
> > ../arch/loongarch/kernel/signal.c: In function 'handle_signal':
> > ../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implicit-function-declaration]
> > 1034 | rseq_signal_deliver(ksig, regs);
> > | ^~~~~~~~~~~~~~~~~~~
> >
> > Fixes: b74baf4ad05b ("LoongArch: Add signal handling support")
> > Signed-off-by: Randy Dunlap <[email protected]>
> > Cc: Huacai Chen <[email protected]>
> > Cc: WANG Xuerui <[email protected]>
> > Cc: [email protected]
> > Cc: Kent Overstreet <[email protected]>
> > ---
> > v2: repair Cc: list
> >
> > arch/loongarch/kernel/signal.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff -- a/arch/loongarch/kernel/signal.c b/arch/loongarch/kernel/signal.c
> > --- a/arch/loongarch/kernel/signal.c
> > +++ b/arch/loongarch/kernel/signal.c
> > @@ -15,6 +15,7 @@
> > #include <linux/context_tracking.h>
> > #include <linux/entry-common.h>
> > #include <linux/irqflags.h>
> > +#include <linux/rseq.h>
> > #include <linux/sched.h>
> > #include <linux/mm.h>
> > #include <linux/personality.h>

2023-12-23 17:17:39

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH v2] LoongArch: signal.c: add header file to fix build error



On 12/23/23 02:27, Huacai Chen wrote:
> On Fri, Dec 22, 2023 at 12:59 PM Huacai Chen <[email protected]> wrote:
>>
>> Hi, Randy,
>>
>> I cannot reproduce it with the default config file.
> Oh, I know, this error only occurs in linux-next, but I think this
> patch should be squashed into "rseq: Split out rseq.h from sched.h".
> Or as a fix applied to the bcachefs tree rather than the loongarch
> tree.

Yes, I think Kent is taking care of it.

Yes, in linux-next.

Thanks.

> Huacai
>
>>
>> Huacai
>>
>> On Fri, Dec 22, 2023 at 12:46 PM Randy Dunlap <[email protected]> wrote:
>>>
>>> loongarch's signal.c uses rseq_signal_deliver() so it should
>>> pull in the appropriate header to prevent a build error:
>>>
>>> ../arch/loongarch/kernel/signal.c: In function 'handle_signal':
>>> ../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implicit-function-declaration]
>>> 1034 | rseq_signal_deliver(ksig, regs);
>>> | ^~~~~~~~~~~~~~~~~~~
>>>
>>> Fixes: b74baf4ad05b ("LoongArch: Add signal handling support")
>>> Signed-off-by: Randy Dunlap <[email protected]>
>>> Cc: Huacai Chen <[email protected]>
>>> Cc: WANG Xuerui <[email protected]>
>>> Cc: [email protected]
>>> Cc: Kent Overstreet <[email protected]>
>>> ---
>>> v2: repair Cc: list
>>>
>>> arch/loongarch/kernel/signal.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff -- a/arch/loongarch/kernel/signal.c b/arch/loongarch/kernel/signal.c
>>> --- a/arch/loongarch/kernel/signal.c
>>> +++ b/arch/loongarch/kernel/signal.c
>>> @@ -15,6 +15,7 @@
>>> #include <linux/context_tracking.h>
>>> #include <linux/entry-common.h>
>>> #include <linux/irqflags.h>
>>> +#include <linux/rseq.h>
>>> #include <linux/sched.h>
>>> #include <linux/mm.h>
>>> #include <linux/personality.h>

--
#Randy
https://people.kernel.org/tglx/notes-about-netiquette
https://subspace.kernel.org/etiquette.html