Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: build failure after merge of the origin tree
@ 2020-07-30 22:58 Stephen Rothwell
  2020-07-30 23:15 ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2020-07-30 22:58 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Willy Tarreau, Russell King, Linux Arm Kernel List


[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]

Hi all,

After merging the origin tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:

In file included from include/linux/random.h:14,
                 from arch/arm/kernel/signal.c:8:
arch/arm/include/asm/percpu.h: In function '__my_cpu_offset':
arch/arm/include/asm/percpu.h:29:34: error: 'current_stack_pointer' undeclared (first use in this function); did you mean 'user_stack_pointer'?
   29 |   : "Q" (*(const unsigned long *)current_stack_pointer));
      |                                  ^~~~~~~~~~~~~~~~~~~~~
      |                                  user_stack_pointer

Presumably aused by commit

  1c9df907da83 ("random: fix circular include dependency on arm64 after addition of percpu.h")

I have added this fix patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 31 Jul 2020 08:50:31 +1000
Subject: [PATCH] arm: include asm/thread_info.h in asm/percpu.h

This need was uncovered by commit

  1c9df907da83 ("random: fix circular include dependency on arm64 after addition of percpu.h")

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/arm/include/asm/percpu.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/percpu.h b/arch/arm/include/asm/percpu.h
index f44f448537f2..ebfa06bebea5 100644
--- a/arch/arm/include/asm/percpu.h
+++ b/arch/arm/include/asm/percpu.h
@@ -10,6 +10,9 @@
  * in the TPIDRPRW. TPIDRPRW only exists on V6K and V7
  */
 #if defined(CONFIG_SMP) && !defined(CONFIG_CPU_V6)
+
+#include <asm/thread_info.h>	/* for current_stack_pointer */
+
 static inline void set_my_cpu_offset(unsigned long off)
 {
 	/* Set TPIDRPRW */
-- 
2.27.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30 22:58 linux-next: build failure after merge of the origin tree Stephen Rothwell
@ 2020-07-30 23:15 ` Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2020-07-30 23:15 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Willy Tarreau, Russell King, Linux Arm Kernel List


[-- Attachment #1: Type: text/plain, Size: 994 bytes --]

Hi all,

On Fri, 31 Jul 2020 08:58:36 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the origin tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
> 
> In file included from include/linux/random.h:14,
>                  from arch/arm/kernel/signal.c:8:
> arch/arm/include/asm/percpu.h: In function '__my_cpu_offset':
> arch/arm/include/asm/percpu.h:29:34: error: 'current_stack_pointer' undeclared (first use in this function); did you mean 'user_stack_pointer'?
>    29 |   : "Q" (*(const unsigned long *)current_stack_pointer));
>       |                                  ^~~~~~~~~~~~~~~~~~~~~
>       |                                  user_stack_pointer
> 
> Presumably aused by commit
> 
>   1c9df907da83 ("random: fix circular include dependency on arm64 after addition of percpu.h")
> 
> I have added this fix patch for today:

Looks like I sould read further ahead in my email :-)

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30 18:24     ` Linus Torvalds
@ 2020-07-30 18:47       ` Kees Cook
  0 siblings, 0 replies; 41+ messages in thread
From: Kees Cook @ 2020-07-30 18:47 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, Emese Revfy, Linux Next Mailing List,
	Linux Kernel Mailing List, Willy Tarreau, Catalin Marinas,
	Will Deacon, Sami Tolvanen

On Thu, Jul 30, 2020 at 11:24:44AM -0700, Linus Torvalds wrote:
> On Wed, Jul 29, 2020 at 8:17 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > I'll look into this more tomorrow. (But yes, __latent_entropy is
> > absolutely used for globals already, as you found, but this is the first
> > percpu it was applied to...)
> 
> Note that it was always per-cpu.
> 
> The only thing that changed was that it was declared static in
> lib/random.c vs being externally visible.

Yup, thanks. I realized that a bit after sending my email. :)

> Unrelated side note: I notice that the plugins could be simplified a
> bit now that we require gcc 4.9 or later. There's a fair amount of
> cruft for the earlier gcc versions.

Yup -- Masahiro keeps poking the build system, but I haven't cleaned up
the header file macros to keep up with the recent jumps. (It falls a bit
low on my TODO list since it's a bit of a mechanical cleanup. I'm open
to anyone that would like to send patches, though!)

> I'm not sure how seriously the gcc plugins are actually maintained (no
> offense) aside from just keeping them limping along. Does anybody
> actually use them in production? I thought google had mostly moved on
> to clang.

They're part of regular testing, and there is ongoing development
(e.g. see Alex Popov's recent series[1], which is in -next waiting for
the v5.9 merge window). I hear regularly from folks using randstruct,
stackleak, structleak, and latent_entropy. But yes, Google has moved
to Clang where we're using Clang's implementation of structleak
(auto-var-init) but there has been work to get randstruct ported (as
desired by at least one Android vendor), though it's currently stalled.

-Kees

[1] https://lore.kernel.org/lkml/20200624123330.83226-1-alex.popov@linux.com/

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  3:17   ` Kees Cook
  2020-07-30  3:22     ` Willy Tarreau
@ 2020-07-30 18:24     ` Linus Torvalds
  2020-07-30 18:47       ` Kees Cook
  1 sibling, 1 reply; 41+ messages in thread
From: Linus Torvalds @ 2020-07-30 18:24 UTC (permalink / raw)
  To: Kees Cook
  Cc: Stephen Rothwell, Emese Revfy, Linux Next Mailing List,
	Linux Kernel Mailing List, Willy Tarreau, Catalin Marinas,
	Will Deacon, Sami Tolvanen

On Wed, Jul 29, 2020 at 8:17 PM Kees Cook <keescook@chromium.org> wrote:
>
> I'll look into this more tomorrow. (But yes, __latent_entropy is
> absolutely used for globals already, as you found, but this is the first
> percpu it was applied to...)

Note that it was always per-cpu.

The only thing that changed was that it was declared static in
lib/random.c vs being externally visible.

So it's not about the percpu part - although that then showed the
arm64 circular include file problem. It's literally that now the exact
same thing is declared in a header file and not marked "static".

Now, I don't think the __latent_entropy code ever really worked all
that well for per-cpu initializations. It ends up generating one
single initializer, which obviously isn't optimal. But I guess it's as
good as it gets.

Unrelated side note: I notice that the plugins could be simplified a
bit now that we require gcc 4.9 or later. There's a fair amount of
cruft for the earlier gcc versions.

I'm not sure how seriously the gcc plugins are actually maintained (no
offense) aside from just keeping them limping along. Does anybody
actually use them in production? I thought google had mostly moved on
to clang.

                Linus

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  6:14       ` Willy Tarreau
  2020-07-30  9:59         ` Marc Zyngier
@ 2020-07-30 17:49         ` Kees Cook
  1 sibling, 0 replies; 41+ messages in thread
From: Kees Cook @ 2020-07-30 17:49 UTC (permalink / raw)
  To: Willy Tarreau
  Cc: Linus Torvalds, Stephen Rothwell, Emese Revfy,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Catalin Marinas, Will Deacon, Sami Tolvanen, Daniel Díaz

On Thu, Jul 30, 2020 at 08:14:07AM +0200, Willy Tarreau wrote:
> On Thu, Jul 30, 2020 at 05:22:50AM +0200, Willy Tarreau wrote:
> > On Wed, Jul 29, 2020 at 08:17:48PM -0700, Kees Cook wrote:
> > > And just another heads-up, the patch[1] (which was never sent to a public
> > > list) also breaks arm64 (circular header needs?):
> > (...)
> > 
> > Definitely, we've just got a report about this, I'll have a look once
> > I'm at the office. I'd like to check that we don't obviously break
> > another arch by just removing percpu. If at least shuffling them around
> > is sufficient that'd be nice. Otherwise we'll likely need a separate
> > header (which is not a bad thing for the long term).
> 
> So Linus proposed a clean solution which might be harder to backport
> but looks better for 5.8. However the attached one addresses the issue
> for me on arm64 and still works on x86_64, arm, mips. I think we should
> go with this one first then apply Linus' one on top of it to be long
> term proof, and backport only the first one. Linus ?
> 
> Willy

> From 18fba9e2dfb16605a722e01f95d9e2d020efaa42 Mon Sep 17 00:00:00 2001
> From: Willy Tarreau <w@1wt.eu>
> Date: Thu, 30 Jul 2020 07:59:24 +0200
> Subject: random: fix circular include dependency on arm64 after addition of
>  percpu.h
> MIME-Version: 1.0
> Content-Type: text/plain; charset=latin1
> Content-Transfer-Encoding: 8bit
> 
> Daniel Díaz and Kees Cook independently reported that commit f227e3ec3b5c
> ("random32: update the net random state on interrupt and activity") broke
> arm64 due to a circular dependency on include files since the addition of
> percpu.h in random.h.
> 
> The correct fix would definitely be to move all the prandom32 stuff out
> of random.h but for backporting, a smaller solution is preferred. This
> one replaces linux/percpu.h with asm/percpu.h, and this fixes the problem
> on x86_64, arm64, arm, and mips. Note that moving percpu.h around didn't
> change anything and that removing it entirely broke differently. When
> backporting, such options might still be considered if this patch fails
> to help.
> 
> Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
> Reported-by: Kees Cook <keescook@chromium.org>

FWIW, I was only a messenger. Sami (in Cc) pointed it out to me right
before I got the email from Linus for the x86 plugin breakage. :)

But yes, thanks, this seems to work for me.

> Fixes: f227e3ec3b5c

nit:

Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity")

-Kees

> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Willy Tarreau <w@1wt.eu>
> ---
>  include/linux/random.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/random.h b/include/linux/random.h
> index f310897f051d..9ab7443bd91b 100644
> --- a/include/linux/random.h
> +++ b/include/linux/random.h
> @@ -11,7 +11,7 @@
>  #include <linux/kernel.h>
>  #include <linux/list.h>
>  #include <linux/once.h>
> -#include <linux/percpu.h>
> +#include <asm/percpu.h>
>  
>  #include <uapi/linux/random.h>
>  
> -- 
> 2.20.1
> 


-- 
Kees Cook

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30 10:09           ` Catalin Marinas
@ 2020-07-30 15:00             ` Will Deacon
  0 siblings, 0 replies; 41+ messages in thread
From: Will Deacon @ 2020-07-30 15:00 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Marc Zyngier, Willy Tarreau, Kees Cook, Linus Torvalds,
	Stephen Rothwell, Emese Revfy, Linux Next Mailing List,
	Linux Kernel Mailing List, Sami Tolvanen, Daniel Díaz

On Thu, Jul 30, 2020 at 11:09:23AM +0100, Catalin Marinas wrote:
> On Thu, Jul 30, 2020 at 10:59:09AM +0100, Marc Zyngier wrote:
> > From 33d819f4efa0a4474b5dc2e4bcaef1b886ca30c3 Mon Sep 17 00:00:00 2001
> > From: Marc Zyngier <maz@kernel.org>
> > Date: Thu, 30 Jul 2020 10:53:05 +0100
> > Subject: [PATCH] arm64: Drop unnecessary include from asm/smp.h
> > 
> > asm/pointer_auth.h is not needed anymore in asm/smp.h, as 62a679cb2825
> > ("arm64: simplify ptrauth initialization") removed the keys from the
> > secondary_data structure.
> > 
> > This also cures a compilation issue introduced by f227e3ec3b5c
> > ("random32: update the net random state on interrupt and activity").
> > 
> > Fixes: 62a679cb2825 ("arm64: simplify ptrauth initialization")
> > Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and
> > activity")
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> >  arch/arm64/include/asm/smp.h | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h
> > index ea268d88b6f7..a0c8a0b65259 100644
> > --- a/arch/arm64/include/asm/smp.h
> > +++ b/arch/arm64/include/asm/smp.h
> > @@ -30,7 +30,6 @@
> >  #include <linux/threads.h>
> >  #include <linux/cpumask.h>
> >  #include <linux/thread_info.h>
> > -#include <asm/pointer_auth.h>
> > 
> >  DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);
> 
> I think this arm64 patch makes sense irrespective of any other generic
> fixes. If Will wants to take it as a fix:
> 
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> (otherwise I'll queue it for 5.9)

Cheers, I'll pick this up asap.

Will

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  9:59         ` Marc Zyngier
@ 2020-07-30 10:09           ` Catalin Marinas
  2020-07-30 15:00             ` Will Deacon
  0 siblings, 1 reply; 41+ messages in thread
From: Catalin Marinas @ 2020-07-30 10:09 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: Willy Tarreau, Kees Cook, Linus Torvalds, Stephen Rothwell,
	Emese Revfy, Linux Next Mailing List, Linux Kernel Mailing List,
	Will Deacon, Sami Tolvanen, Daniel Díaz

On Thu, Jul 30, 2020 at 10:59:09AM +0100, Marc Zyngier wrote:
> From 33d819f4efa0a4474b5dc2e4bcaef1b886ca30c3 Mon Sep 17 00:00:00 2001
> From: Marc Zyngier <maz@kernel.org>
> Date: Thu, 30 Jul 2020 10:53:05 +0100
> Subject: [PATCH] arm64: Drop unnecessary include from asm/smp.h
> 
> asm/pointer_auth.h is not needed anymore in asm/smp.h, as 62a679cb2825
> ("arm64: simplify ptrauth initialization") removed the keys from the
> secondary_data structure.
> 
> This also cures a compilation issue introduced by f227e3ec3b5c
> ("random32: update the net random state on interrupt and activity").
> 
> Fixes: 62a679cb2825 ("arm64: simplify ptrauth initialization")
> Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and
> activity")
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
>  arch/arm64/include/asm/smp.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h
> index ea268d88b6f7..a0c8a0b65259 100644
> --- a/arch/arm64/include/asm/smp.h
> +++ b/arch/arm64/include/asm/smp.h
> @@ -30,7 +30,6 @@
>  #include <linux/threads.h>
>  #include <linux/cpumask.h>
>  #include <linux/thread_info.h>
> -#include <asm/pointer_auth.h>
> 
>  DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);

I think this arm64 patch makes sense irrespective of any other generic
fixes. If Will wants to take it as a fix:

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

(otherwise I'll queue it for 5.9)

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  6:14       ` Willy Tarreau
@ 2020-07-30  9:59         ` Marc Zyngier
  2020-07-30 10:09           ` Catalin Marinas
  2020-07-30 17:49         ` Kees Cook
  1 sibling, 1 reply; 41+ messages in thread
From: Marc Zyngier @ 2020-07-30  9:59 UTC (permalink / raw)
  To: Willy Tarreau
  Cc: Kees Cook, Linus Torvalds, Stephen Rothwell, Emese Revfy,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Catalin Marinas, Will Deacon, Sami Tolvanen, Daniel Díaz

On 2020-07-30 07:14, Willy Tarreau wrote:
> On Thu, Jul 30, 2020 at 05:22:50AM +0200, Willy Tarreau wrote:
>> On Wed, Jul 29, 2020 at 08:17:48PM -0700, Kees Cook wrote:
>> > And just another heads-up, the patch[1] (which was never sent to a public
>> > list) also breaks arm64 (circular header needs?):
>> (...)
>> 
>> Definitely, we've just got a report about this, I'll have a look once
>> I'm at the office. I'd like to check that we don't obviously break
>> another arch by just removing percpu. If at least shuffling them 
>> around
>> is sufficient that'd be nice. Otherwise we'll likely need a separate
>> header (which is not a bad thing for the long term).
> 
> So Linus proposed a clean solution which might be harder to backport
> but looks better for 5.8. However the attached one addresses the issue
> for me on arm64 and still works on x86_64, arm, mips. I think we should
> go with this one first then apply Linus' one on top of it to be long
> term proof, and backport only the first one. Linus ?

So for what it's worth, this patch fixes the arm64 compilation problem
for me:

Tested-by: Marc Zyngier <maz@kernel.org>

I had come up with a different fix, only touching arm64 (see below).

Thanks,

         M.

 From 33d819f4efa0a4474b5dc2e4bcaef1b886ca30c3 Mon Sep 17 00:00:00 2001
 From: Marc Zyngier <maz@kernel.org>
Date: Thu, 30 Jul 2020 10:53:05 +0100
Subject: [PATCH] arm64: Drop unnecessary include from asm/smp.h

asm/pointer_auth.h is not needed anymore in asm/smp.h, as 62a679cb2825
("arm64: simplify ptrauth initialization") removed the keys from the
secondary_data structure.

This also cures a compilation issue introduced by f227e3ec3b5c
("random32: update the net random state on interrupt and activity").

Fixes: 62a679cb2825 ("arm64: simplify ptrauth initialization")
Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt 
and activity")
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
  arch/arm64/include/asm/smp.h | 1 -
  1 file changed, 1 deletion(-)

diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h
index ea268d88b6f7..a0c8a0b65259 100644
--- a/arch/arm64/include/asm/smp.h
+++ b/arch/arm64/include/asm/smp.h
@@ -30,7 +30,6 @@
  #include <linux/threads.h>
  #include <linux/cpumask.h>
  #include <linux/thread_info.h>
-#include <asm/pointer_auth.h>

  DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);

-- 
2.27.0


-- 
Who you jivin' with that Cosmik Debris?

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  3:22     ` Willy Tarreau
@ 2020-07-30  6:14       ` Willy Tarreau
  2020-07-30  9:59         ` Marc Zyngier
  2020-07-30 17:49         ` Kees Cook
  0 siblings, 2 replies; 41+ messages in thread
From: Willy Tarreau @ 2020-07-30  6:14 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, Stephen Rothwell, Emese Revfy,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Catalin Marinas, Will Deacon, Sami Tolvanen, Daniel Díaz


[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

On Thu, Jul 30, 2020 at 05:22:50AM +0200, Willy Tarreau wrote:
> On Wed, Jul 29, 2020 at 08:17:48PM -0700, Kees Cook wrote:
> > And just another heads-up, the patch[1] (which was never sent to a public
> > list) also breaks arm64 (circular header needs?):
> (...)
> 
> Definitely, we've just got a report about this, I'll have a look once
> I'm at the office. I'd like to check that we don't obviously break
> another arch by just removing percpu. If at least shuffling them around
> is sufficient that'd be nice. Otherwise we'll likely need a separate
> header (which is not a bad thing for the long term).

So Linus proposed a clean solution which might be harder to backport
but looks better for 5.8. However the attached one addresses the issue
for me on arm64 and still works on x86_64, arm, mips. I think we should
go with this one first then apply Linus' one on top of it to be long
term proof, and backport only the first one. Linus ?

Willy

[-- Attachment #2: 0001-random-fix-circular-include-dependency-on-arm64-afte.patch --]
[-- Type: text/plain, Size: 1694 bytes --]

From 18fba9e2dfb16605a722e01f95d9e2d020efaa42 Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w@1wt.eu>
Date: Thu, 30 Jul 2020 07:59:24 +0200
Subject: random: fix circular include dependency on arm64 after addition of
 percpu.h
MIME-Version: 1.0
Content-Type: text/plain; charset=latin1
Content-Transfer-Encoding: 8bit

Daniel Díaz and Kees Cook independently reported that commit f227e3ec3b5c
("random32: update the net random state on interrupt and activity") broke
arm64 due to a circular dependency on include files since the addition of
percpu.h in random.h.

The correct fix would definitely be to move all the prandom32 stuff out
of random.h but for backporting, a smaller solution is preferred. This
one replaces linux/percpu.h with asm/percpu.h, and this fixes the problem
on x86_64, arm64, arm, and mips. Note that moving percpu.h around didn't
change anything and that removing it entirely broke differently. When
backporting, such options might still be considered if this patch fails
to help.

Reported-by: Daniel Díaz <daniel.diaz@linaro.org>
Reported-by: Kees Cook <keescook@chromium.org>
Fixes: f227e3ec3b5c
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
 include/linux/random.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/random.h b/include/linux/random.h
index f310897f051d..9ab7443bd91b 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/once.h>
-#include <linux/percpu.h>
+#include <asm/percpu.h>
 
 #include <uapi/linux/random.h>
 
-- 
2.20.1


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  3:17   ` Kees Cook
@ 2020-07-30  3:22     ` Willy Tarreau
  2020-07-30  6:14       ` Willy Tarreau
  2020-07-30 18:24     ` Linus Torvalds
  1 sibling, 1 reply; 41+ messages in thread
From: Willy Tarreau @ 2020-07-30  3:22 UTC (permalink / raw)
  To: Kees Cook
  Cc: Linus Torvalds, Stephen Rothwell, Emese Revfy,
	Linux Next Mailing List, Linux Kernel Mailing List,
	Catalin Marinas, Will Deacon, Sami Tolvanen

Hi Kees,

On Wed, Jul 29, 2020 at 08:17:48PM -0700, Kees Cook wrote:
> And just another heads-up, the patch[1] (which was never sent to a public
> list) also breaks arm64 (circular header needs?):
(...)

Definitely, we've just got a report about this, I'll have a look once
I'm at the office. I'd like to check that we don't obviously break
another arch by just removing percpu. If at least shuffling them around
is sufficient that'd be nice. Otherwise we'll likely need a separate
header (which is not a bad thing for the long term).

Thanks!
Willy

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-29 23:43 ` Linus Torvalds
  2020-07-30  0:09   ` Linus Torvalds
@ 2020-07-30  3:17   ` Kees Cook
  2020-07-30  3:22     ` Willy Tarreau
  2020-07-30 18:24     ` Linus Torvalds
  1 sibling, 2 replies; 41+ messages in thread
From: Kees Cook @ 2020-07-30  3:17 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, Emese Revfy, Linux Next Mailing List,
	Linux Kernel Mailing List, Willy Tarreau, Catalin Marinas,
	Will Deacon, Sami Tolvanen

On Wed, Jul 29, 2020 at 04:43:04PM -0700, Linus Torvalds wrote:
> On Wed, Jul 29, 2020 at 4:08 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > include/linux/random.h:123:24: error: variable 'net_rand_state' with 'latent_entropy' attribute must not be local
> >   123 | DECLARE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy;
> 
> Hmm.
> 
> Ok, this shows a limitation of my allmodconfig testing (and all my
> normal builds) - no plugins. So that problem wasn't as obvious as it
> should have been.

I'll look into this more tomorrow. (But yes, __latent_entropy is
absolutely used for globals already, as you found, but this is the first
percpu it was applied to...)

> Adding the gcc plugin people. Otherwise the only option seems to be to
> just remove that __latent_entropy marker.

And just another heads-up, the patch[1] (which was never sent to a public
list) also breaks arm64 (circular header needs?):

$ make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 defconfig
...
$ make -j$(getconf _NPROCESSORS_ONLN) CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64
...
In file included from ./arch/arm64/include/asm/smp.h:33,
                 from ./include/linux/smp.h:82,
                 from ./include/linux/percpu.h:7,
                 from ./include/linux/random.h:14,
                 from arch/arm64/kernel/pointer_auth.c:5:
./arch/arm64/include/asm/pointer_auth.h: In function ‘ptrauth_keys_init_user’:
./arch/arm64/include/asm/pointer_auth.h:40:3: error: implicit declaration of function ‘get_random_bytes’; did you mean ‘get_random_once’? [-Werror=implicit-function-declaration]
   40 |   get_random_bytes(&keys->apia, sizeof(keys->apia));
      |   ^~~~~


[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f227e3ec3b5cad859ad15666874405e8c1bbc1d4

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  2:12     ` Linus Torvalds
@ 2020-07-30  2:30       ` Willy Tarreau
  0 siblings, 0 replies; 41+ messages in thread
From: Willy Tarreau @ 2020-07-30  2:30 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stephen Rothwell, Emese Revfy, Kees Cook,
	Linux Next Mailing List, Linux Kernel Mailing List

On Wed, Jul 29, 2020 at 07:12:58PM -0700, Linus Torvalds wrote:
> On Wed, Jul 29, 2020 at 5:09 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Removing the __latent_entropy marker obviously fixes things.
> 
> Ok, I did that for now. I spent a few minutes looking at the gcc
> plugin in case I'd be hit by some sudden stroke of genius, but that
> didn't happen, so let's avoid the issue until somebody who knows the
> gcc plugins better can come up with what the right solution is.

I've looked if we couldn't we work around this by declaring another
static variable with __latent_entropy and use it to initialize
net_rand_state early, for example in prandom_init(), but there we
already fill net_rand_state with randoms so I'm wondering if that
__latent_entropy is used before prandom_init() or if its sole purpose
is to provide extra initial entropy to be combined with the one
prandom_init() will add.

Willy

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-30  0:09   ` Linus Torvalds
@ 2020-07-30  2:12     ` Linus Torvalds
  2020-07-30  2:30       ` Willy Tarreau
  0 siblings, 1 reply; 41+ messages in thread
From: Linus Torvalds @ 2020-07-30  2:12 UTC (permalink / raw)
  To: Stephen Rothwell, Emese Revfy, Kees Cook
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Willy Tarreau

On Wed, Jul 29, 2020 at 5:09 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Removing the __latent_entropy marker obviously fixes things.

Ok, I did that for now. I spent a few minutes looking at the gcc
plugin in case I'd be hit by some sudden stroke of genius, but that
didn't happen, so let's avoid the issue until somebody who knows the
gcc plugins better can come up with what the right solution is.

            Linus

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-29 23:43 ` Linus Torvalds
@ 2020-07-30  0:09   ` Linus Torvalds
  2020-07-30  2:12     ` Linus Torvalds
  2020-07-30  3:17   ` Kees Cook
  1 sibling, 1 reply; 41+ messages in thread
From: Linus Torvalds @ 2020-07-30  0:09 UTC (permalink / raw)
  To: Stephen Rothwell, Emese Revfy, Kees Cook
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Willy Tarreau

On Wed, Jul 29, 2020 at 4:43 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Ok, this shows a limitation of my allmodconfig testing (and all my
> normal builds) - no plugins. So that problem wasn't as obvious as it
> should have been.

Ok, that was easy to install and get the coverage, and now I see the error.

Except I still don't know the gcc plugins well enough to fix it at the
plugin level. And the gcc docs only talk about TREE_STATIC() for
functions, not for variables. Apparently variables should use
DECL_THIS_EXTERN or DECL_THIS_STATIC according to the docs I find, but
..

Removing the __latent_entropy marker obviously fixes things.

               Linus

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-07-29 23:08 Stephen Rothwell
@ 2020-07-29 23:43 ` Linus Torvalds
  2020-07-30  0:09   ` Linus Torvalds
  2020-07-30  3:17   ` Kees Cook
  0 siblings, 2 replies; 41+ messages in thread
From: Linus Torvalds @ 2020-07-29 23:43 UTC (permalink / raw)
  To: Stephen Rothwell, Emese Revfy, Kees Cook
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Willy Tarreau

On Wed, Jul 29, 2020 at 4:08 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> include/linux/random.h:123:24: error: variable 'net_rand_state' with 'latent_entropy' attribute must not be local
>   123 | DECLARE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy;

Hmm.

Ok, this shows a limitation of my allmodconfig testing (and all my
normal builds) - no plugins. So that problem wasn't as obvious as it
should have been.

That error isn't very helpful, in that I think it actually is very
wrong. The variable really isn't local at all.

I think what the plugin *means* by "local" is "automatic", and I think
it uses the wrong test for it. IOW, looking at the plugin, it does

                if (!TREE_STATIC(*node)) {
                        *no_add_attrs = true;
                        error("variable %qD with %qE attribute must
not be local",
                                *node, name);

and what I think it really wants is that it has a static address - so
a global variable is fine - as opposed to being an actual static
declaration.

Also looking at the plugin, I suspect it is going to be very unhappy
about the fact that the attribute is there both on a declaration and
on the actual definition. The code later seems to really only want to
work on the definition, since it's creating an initializer..

IOW, I get the feeling that the plugin is confused, and it so happened
that the only variables we'd marked for latent entropy were static
ones. But I haven't done gcc plugins, so...

Adding the gcc plugin people. Otherwise the only option seems to be to
just remove that __latent_entropy marker.

                    Linus

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2020-07-29 23:08 Stephen Rothwell
  2020-07-29 23:43 ` Linus Torvalds
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2020-07-29 23:08 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Willy Tarreau


[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]

Hi all,

After merging the origin tree, today's linux-next build (x86_64
allmodconfig) failed like this:

In file included from include/asm-generic/percpu.h:7,
                 from arch/x86/include/asm/percpu.h:556,
                 from arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:78,
                 from include/linux/spinlock.h:51,
                 from include/linux/seqlock.h:36,
                 from include/linux/time.h:6,
                 from include/linux/stat.h:19,
                 from include/linux/module.h:13,
                 from arch/x86/crypto/glue_helper.c:13:
include/linux/random.h:123:24: error: variable 'net_rand_state' with 'latent_entropy' attribute must not be local
  123 | DECLARE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy;
      |                        ^~~~~~~~~
include/linux/percpu-defs.h:88:38: note: in definition of macro 'DECLARE_PER_CPU_SECTION'
   88 |  extern __PCPU_ATTRS(sec) __typeof__(type) name
      |                                      ^~~~
include/linux/random.h:123:1: note: in expansion of macro 'DECLARE_PER_CPU'
  123 | DECLARE_PER_CPU(struct rnd_state, net_rand_state) __latent_entropy;
      | ^~~~~~~~~~~~~~~

Caused by commit

  f227e3ec3b5c ("random32: update the net random state on interrupt and activity")

I have reverted that commit for today.

In case it matters:

$ x86_64-linux-gnu-gcc --version
x86_64-linux-gnu-gcc (Debian 9.3.0-13) 9.3.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-06-05  0:04 ` Josh Poimboeuf
@ 2020-06-05  9:48   ` Jessica Yu
  0 siblings, 0 replies; 41+ messages in thread
From: Jessica Yu @ 2020-06-05  9:48 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Stephen Rothwell, Linus Torvalds, Linux Next Mailing List,
	Linux Kernel Mailing List, Jiri Kosina, Max Filippov,
	Peter Zijlstra

+++ Josh Poimboeuf [04/06/20 19:04 -0500]:
>On Fri, Jun 05, 2020 at 08:37:15AM +1000, Stephen Rothwell wrote:
>> Hi all,
>>
>> After merging the origin tree, today's linux-next build (powerpc
>> ppc64_defconfig) failed like this:
>>
>> kernel/module.c: In function 'do_init_module':
>> kernel/module.c:3593:2: error: implicit declaration of function 'module_enable_ro'; did you mean 'module_enable_x'? [-Werror=implicit-function-declaration]
>>  3593 |  module_enable_ro(mod, true);
>>       |  ^~~~~~~~~~~~~~~~
>>       |  module_enable_x
>>
>> Caused by commit
>>
>>   e6eff4376e28 ("module: Make module_enable_ro() static again")
>>
>> This config has neither CONFIG_ARCH_HAS_STRICT_MODULE_RWX or
>> CONFIG_ARCH_HAS_STRICT_MODULE_RWX set.  This failure was hidden in
>> linux-next due to commit
>>
>>   db991af02f11 ("module: break nested ARCH_HAS_STRICT_MODULE_RWX and STRICT_MODULE_RWX #ifdefs")
>>
>> from the modules tree. I have cherry-picked that commit for today.
>
>Sorry, I guessed we missed that dependency between the live-patching and
>module trees.
>
>Jessica, are you planning on sending a pull request?

Yep, just sent. So hopefully this gets resolved in the next day or two.


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-06-04 22:37 Stephen Rothwell
@ 2020-06-05  0:04 ` Josh Poimboeuf
  2020-06-05  9:48   ` Jessica Yu
  0 siblings, 1 reply; 41+ messages in thread
From: Josh Poimboeuf @ 2020-06-05  0:04 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Torvalds, Linux Next Mailing List,
	Linux Kernel Mailing List, Jessica Yu, Jiri Kosina, Max Filippov,
	Peter Zijlstra

On Fri, Jun 05, 2020 at 08:37:15AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the origin tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> kernel/module.c: In function 'do_init_module':
> kernel/module.c:3593:2: error: implicit declaration of function 'module_enable_ro'; did you mean 'module_enable_x'? [-Werror=implicit-function-declaration]
>  3593 |  module_enable_ro(mod, true);
>       |  ^~~~~~~~~~~~~~~~
>       |  module_enable_x
> 
> Caused by commit
> 
>   e6eff4376e28 ("module: Make module_enable_ro() static again")
> 
> This config has neither CONFIG_ARCH_HAS_STRICT_MODULE_RWX or
> CONFIG_ARCH_HAS_STRICT_MODULE_RWX set.  This failure was hidden in
> linux-next due to commit
> 
>   db991af02f11 ("module: break nested ARCH_HAS_STRICT_MODULE_RWX and STRICT_MODULE_RWX #ifdefs")
> 
> from the modules tree. I have cherry-picked that commit for today.

Sorry, I guessed we missed that dependency between the live-patching and
module trees.

Jessica, are you planning on sending a pull request?

-- 
Josh


^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2020-06-04 22:37 Stephen Rothwell
  2020-06-05  0:04 ` Josh Poimboeuf
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2020-06-04 22:37 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Jessica Yu,
	Josh Poimboeuf


[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Hi all,

After merging the origin tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

kernel/module.c: In function 'do_init_module':
kernel/module.c:3593:2: error: implicit declaration of function 'module_enable_ro'; did you mean 'module_enable_x'? [-Werror=implicit-function-declaration]
 3593 |  module_enable_ro(mod, true);
      |  ^~~~~~~~~~~~~~~~
      |  module_enable_x

Caused by commit

  e6eff4376e28 ("module: Make module_enable_ro() static again")

This config has neither CONFIG_ARCH_HAS_STRICT_MODULE_RWX or
CONFIG_ARCH_HAS_STRICT_MODULE_RWX set.  This failure was hidden in
linux-next due to commit

  db991af02f11 ("module: break nested ARCH_HAS_STRICT_MODULE_RWX and STRICT_MODULE_RWX #ifdefs")

from the modules tree. I have cherry-picked that commit for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2020-04-20 10:23 Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2020-04-20 10:23 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, kernelci.org bot


[-- Attachment #1: Type: text/plain, Size: 395 bytes --]

Hi all,

[reported by the kernelci.org bot]

The following error occurs in Linus' tree, build (riscv allnoconfig):

arch/riscv/kernel/stacktrace.c:78:8: error: ‘sp_in_global’ undeclared (first use in this function); did you mean ‘spin_lock’?

Caused by commit

  52e7c52d2ded ("RISC-V: Stop relying on GCC's register allocator's hueristics")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-01-31  4:17 ` Randy Dunlap
@ 2020-01-31  9:39   ` Daniel Lezcano
  0 siblings, 0 replies; 41+ messages in thread
From: Daniel Lezcano @ 2020-01-31  9:39 UTC (permalink / raw)
  To: Randy Dunlap, Stephen Rothwell
  Cc: Linus Torvalds, Linux Next Mailing List,
	Linux Kernel Mailing List, Michael Ellerman

On 31/01/2020 05:17, Randy Dunlap wrote:
> On 1/30/20 8:12 PM, Stephen Rothwell wrote:
>> Hi all,
>>
>> [At Michael's suggestion I have started doing htmldocs builds at the
>> end of linux-next runs.  Unfortunately, this currently fails for Linus'
>> tree.]
>>
>> In Linus' tree, today's linux-next build (htmldocs) failed like this:
>>
>> docutils.utils.SystemMessage: Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title.
>>
>> Caused by commit
>>
>>   0a1990a2d1f2 ("thermal/drivers/cpu_cooling: Add idle cooling device documentation")
>>
> 
> 
> I sent a patch for that on 2020-JAN-20 but no one has replied to the patch:
> 
> https://lore.kernel.org/linux-pm/712c1152-56b5-307f-b3f3-ed03a30b804a@infradead.org/

Right, sorry for that. I'll pick it and send a PR.

Thanks for the fix.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2020-01-31  4:12 Stephen Rothwell
@ 2020-01-31  4:17 ` Randy Dunlap
  2020-01-31  9:39   ` Daniel Lezcano
  0 siblings, 1 reply; 41+ messages in thread
From: Randy Dunlap @ 2020-01-31  4:17 UTC (permalink / raw)
  To: Stephen Rothwell, Daniel Lezcano
  Cc: Linus Torvalds, Linux Next Mailing List,
	Linux Kernel Mailing List, Michael Ellerman

On 1/30/20 8:12 PM, Stephen Rothwell wrote:
> Hi all,
> 
> [At Michael's suggestion I have started doing htmldocs builds at the
> end of linux-next runs.  Unfortunately, this currently fails for Linus'
> tree.]
> 
> In Linus' tree, today's linux-next build (htmldocs) failed like this:
> 
> docutils.utils.SystemMessage: Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title.
> 
> Caused by commit
> 
>   0a1990a2d1f2 ("thermal/drivers/cpu_cooling: Add idle cooling device documentation")
> 


I sent a patch for that on 2020-JAN-20 but no one has replied to the patch:

https://lore.kernel.org/linux-pm/712c1152-56b5-307f-b3f3-ed03a30b804a@infradead.org/


-- 
~Randy


^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2020-01-31  4:12 Stephen Rothwell
  2020-01-31  4:17 ` Randy Dunlap
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2020-01-31  4:12 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Linus Torvalds, Linux Next Mailing List,
	Linux Kernel Mailing List, Michael Ellerman


[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

Hi all,

[At Michael's suggestion I have started doing htmldocs builds at the
end of linux-next runs.  Unfortunately, this currently fails for Linus'
tree.]

In Linus' tree, today's linux-next build (htmldocs) failed like this:

docutils.utils.SystemMessage: Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title.

Caused by commit

  0a1990a2d1f2 ("thermal/drivers/cpu_cooling: Add idle cooling device documentation")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-10-09 23:52   ` Yasuaki Ishimatsu
@ 2012-10-10  3:12     ` Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2012-10-10  3:12 UTC (permalink / raw)
  To: Yasuaki Ishimatsu
  Cc: Andrew Morton, Linus Torvalds, linux-next, linux-kernel, ppc-dev


[-- Attachment #1: Type: text/plain, Size: 1684 bytes --]

Hi,

On Wed, 10 Oct 2012 08:52:21 +0900 Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com> wrote:
>
> 2012/10/10 8:45, Andrew Morton wrote:
> > On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> >> Hi Linus,
> >>
> >> In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
> >> like this:
> >>
> >> arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
> >> arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
> >>
> >> Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
> >> nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
> >>
> >> I can't see what the point of the "pfn" variable is
> >
> > This:
> >
> > --- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
> > +++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
> > @@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
> >   	sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
> >   	for (i = 0; i < sections_to_remove; i++) {
> >   		unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
> > -		ret = __remove_pages(zone, start_pfn,  PAGES_PER_SECTION);
> > +		ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
> >   		if (ret)
> >   			return ret;
> >   	}
> 
> I believe the error to be fixed with this patch.
> Could you try it?

The certainly fixes the build problem.  I can't comment in the semantics
of the patch.

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>  (Build only)
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-10-09 23:45 ` Andrew Morton
  2012-10-09 23:52   ` Yasuaki Ishimatsu
@ 2012-10-10  0:07   ` Stephen Rothwell
  1 sibling, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2012-10-10  0:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linus Torvalds, linux-next, linux-kernel, Yasuaki Ishimatsu, ppc-dev


[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]

Hi Andrew,

On Tue, 9 Oct 2012 16:45:14 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > I can't see what the point of the "pfn" variable is
> 
> This:
> 
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
> +++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
>  	sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
>  	for (i = 0; i < sections_to_remove; i++) {
>  		unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
> -		ret = __remove_pages(zone, start_pfn,  PAGES_PER_SECTION);
> +		ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
>  		if (ret)
>  			return ret;
>  	}

Can we get that fix to Linus ASAP, please?

> > and this patch never
> > appeared in linux-next before being merged.  :-(
> 
> It was first sighted October 3.

Yeah, my mistake. But it never made it to linux-next.

> > I have reverted that commit for today.
> > 
> > If this patch truly was authored yesterday (according the Author Date in
> > git), why was it merged yesterday while still under discussion?  And the
> > latest update to it still has this build problem ... did anyone even try
> > to build this for powerpc (since that architecture was obviously
> > affected)?
> 
> Apparently not - the ppc bit was a best-effort fixup for a patch which
> addresses an x86 problem.

Right, and that is one of the reasons we have linux-next - to test for
cross architecture problems.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-10-09 23:45 ` Andrew Morton
@ 2012-10-09 23:52   ` Yasuaki Ishimatsu
  2012-10-10  3:12     ` Stephen Rothwell
  2012-10-10  0:07   ` Stephen Rothwell
  1 sibling, 1 reply; 41+ messages in thread
From: Yasuaki Ishimatsu @ 2012-10-09 23:52 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Linus Torvalds, linux-next, linux-kernel, ppc-dev

Hi Stephen,

2012/10/10 8:45, Andrew Morton wrote:
> On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
>> Hi Linus,
>>
>> In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
>> like this:
>>
>> arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
>> arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
>>
>> Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
>> nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
>>
>> I can't see what the point of the "pfn" variable is
>
> This:
>
> --- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
> +++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
> @@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
>   	sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
>   	for (i = 0; i < sections_to_remove; i++) {
>   		unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
> -		ret = __remove_pages(zone, start_pfn,  PAGES_PER_SECTION);
> +		ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
>   		if (ret)
>   			return ret;
>   	}

I believe the error to be fixed with this patch.
Could you try it?

Thanks,
Yasuaki Ishimatsu

>
>> and this patch never
>> appeared in linux-next before being merged.  :-(
>
> It was first sighted October 3.
>
>> I have reverted that commit for today.
>>
>> If this patch truly was authored yesterday (according the Author Date in
>> git), why was it merged yesterday while still under discussion?  And the
>> latest update to it still has this build problem ... did anyone even try
>> to build this for powerpc (since that architecture was obviously
>> affected)?
>
> Apparently not - the ppc bit was a best-effort fixup for a patch which
> addresses an x86 problem.
>

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-10-09 23:21 Stephen Rothwell
@ 2012-10-09 23:45 ` Andrew Morton
  2012-10-09 23:52   ` Yasuaki Ishimatsu
  2012-10-10  0:07   ` Stephen Rothwell
  0 siblings, 2 replies; 41+ messages in thread
From: Andrew Morton @ 2012-10-09 23:45 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus Torvalds, linux-next, linux-kernel, Yasuaki Ishimatsu, ppc-dev

On Wed, 10 Oct 2012 10:21:50 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Linus,
> 
> In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
> like this:
> 
> arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
> arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]
> 
> Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
> nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").
> 
> I can't see what the point of the "pfn" variable is

This:

--- a/arch/powerpc/platforms/pseries/hotplug-memory.c~a
+++ a/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -101,7 +101,7 @@ static int pseries_remove_memblock(unsig
 	sections_to_remove = (memblock_size >> PAGE_SHIFT) / PAGES_PER_SECTION;
 	for (i = 0; i < sections_to_remove; i++) {
 		unsigned long pfn = start_pfn + i * PAGES_PER_SECTION;
-		ret = __remove_pages(zone, start_pfn,  PAGES_PER_SECTION);
+		ret = __remove_pages(zone, pfn, PAGES_PER_SECTION);
 		if (ret)
 			return ret;
 	}

> and this patch never
> appeared in linux-next before being merged.  :-(

It was first sighted October 3.

> I have reverted that commit for today.
> 
> If this patch truly was authored yesterday (according the Author Date in
> git), why was it merged yesterday while still under discussion?  And the
> latest update to it still has this build problem ... did anyone even try
> to build this for powerpc (since that architecture was obviously
> affected)?

Apparently not - the ppc bit was a best-effort fixup for a patch which
addresses an x86 problem.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2012-10-09 23:21 Stephen Rothwell
  2012-10-09 23:45 ` Andrew Morton
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2012-10-09 23:21 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-next, linux-kernel, Yasuaki Ishimatsu, Andrew Morton, ppc-dev


[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

Hi Linus,

In Linus' tree, today's linux-next build (powerpc ppc64_defconfig) failed
like this:

arch/powerpc/platforms/pseries/hotplug-memory.c: In function 'pseries_remove_memblock':
arch/powerpc/platforms/pseries/hotplug-memory.c:103:17: error: unused variable 'pfn' [-Werror=unused-variable]

Caused by commit d760afd4d257 ("memory-hotplug: suppress "Trying to free
nonexistent resource <XXXXXXXXXXXXXXXX-YYYYYYYYYYYYYYYY>" warning").

I can't see what the point of the "pfn" variable is and this patch never
appeared in linux-next before being merged.  :-(

I have reverted that commit for today.

If this patch truly was authored yesterday (according the Author Date in
git), why was it merged yesterday while still under discussion?  And the
latest update to it still has this build problem ... did anyone even try
to build this for powerpc (since that architecture was obviously
affected)?  (Cross compilers available here
http://www.kernel.org/pub/tools/crosstool/).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-06-04  2:57 Stephen Rothwell
@ 2012-06-04  7:39 ` Paul Mundt
  0 siblings, 0 replies; 41+ messages in thread
From: Paul Mundt @ 2012-06-04  7:39 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Al Viro, linux-next, linux-kernel, Linus Torvalds

On Mon, Jun 04, 2012 at 12:57:24PM +1000, Stephen Rothwell wrote:
> Hi Al,
> 
> Building the origin tree (v3.5-rc1 sh lboxre2_defconfig and other sh
> configs) failed like this:
> 
> arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)
> 
> Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
> without SIGPENDING (and never should be)").  Missing include of kernel.h.
> 
Ideally bug.h should be including linux/kernel.h itself due to its
TAINT_WARN dependence, it just seems to be getting lucky on other
platforms who either don't have this combination or pull in kernel.h from
somewhere else.

That commit also introduces a linux/bug.h include for WARN_ON() in
linux/thread_info.h which would be similarly insufficient for any
TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK platform that also uses
asm-generic/bug.h. 

Given that, I'd prefer stuffing the include in asm-generic directly:

---

bug.h: need linux/kernel.h for TAINT_WARN.

asm-generic/bug.h uses taint flags that are only defined in
linux/kernel.h, resulting in build failures on platforms that
don't include linux/kernel.h some other way:

	arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)

Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
without SIGPENDING (and never should be)").

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

---

diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 2520a6e..9f02005 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -2,6 +2,7 @@
 #define _ASM_GENERIC_BUG_H
 
 #include <linux/compiler.h>
+#include <linux/kernel.h>
 
 #ifdef CONFIG_BUG
 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2012-06-04  2:57 Stephen Rothwell
  2012-06-04  7:39 ` Paul Mundt
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2012-06-04  2:57 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-next, linux-kernel, Linus Torvalds, Paul Mundt


[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Hi Al,

Building the origin tree (v3.5-rc1 sh lboxre2_defconfig and other sh
configs) failed like this:

arch/sh/include/asm/thread_info.h:172:2: error: 'TAINT_WARN' undeclared (first use in this function)

Caused by commit edd63a2763bd ("set_restore_sigmask() is never called
without SIGPENDING (and never should be)").  Missing include of kernel.h.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-01-19  8:21 ` Jens Axboe
@ 2012-01-19  8:23   ` Jens Axboe
  0 siblings, 0 replies; 41+ messages in thread
From: Jens Axboe @ 2012-01-19  8:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Matthew Wilcox, linux-next, linux-kernel, Linus Torvalds, Rusty Russell

On 01/19/2012 09:21 AM, Jens Axboe wrote:
> On 01/19/2012 12:31 AM, Stephen Rothwell wrote:
>> Hi Linus,
>>
>> After merging the origin tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined!
>>
>> This is weird, as CONFIG_BLOCK and CONFIG_XEN are both set in this build
>> and I started with an empty object directory.  And biomerge.o has been
>> built.
>>
>> Ah ha!
>>
>> drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default]
>> drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
>> drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default]
>>
>> drivers/xen/biomerge.c does not include export.h.  It would be nice if
>> this produced an error, not just the warnings above.  Caused by commit
>> 0b934ccd707f ("Xen: Export xen_biovec_phys_mergeable") (which was never
>> in linux-next :-().
>>
>> I applied the following patch for today:
> 
> Thanks Stephen, applied.

Already in, even better :-)

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2012-01-18 23:31 Stephen Rothwell
@ 2012-01-19  8:21 ` Jens Axboe
  2012-01-19  8:23   ` Jens Axboe
  0 siblings, 1 reply; 41+ messages in thread
From: Jens Axboe @ 2012-01-19  8:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Matthew Wilcox, linux-next, linux-kernel, Linus Torvalds, Rusty Russell

On 01/19/2012 12:31 AM, Stephen Rothwell wrote:
> Hi Linus,
> 
> After merging the origin tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined!
> 
> This is weird, as CONFIG_BLOCK and CONFIG_XEN are both set in this build
> and I started with an empty object directory.  And biomerge.o has been
> built.
> 
> Ah ha!
> 
> drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default]
> drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
> drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default]
> 
> drivers/xen/biomerge.c does not include export.h.  It would be nice if
> this produced an error, not just the warnings above.  Caused by commit
> 0b934ccd707f ("Xen: Export xen_biovec_phys_mergeable") (which was never
> in linux-next :-().
> 
> I applied the following patch for today:

Thanks Stephen, applied.

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2012-01-18 23:31 Stephen Rothwell
  2012-01-19  8:21 ` Jens Axboe
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2012-01-18 23:31 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: linux-next, linux-kernel, Linus Torvalds, Jens Axboe, Rusty Russell


[-- Attachment #1: Type: text/plain, Size: 2173 bytes --]

Hi Linus,

After merging the origin tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined!

This is weird, as CONFIG_BLOCK and CONFIG_XEN are both set in this build
and I started with an empty object directory.  And biomerge.o has been
built.

Ah ha!

drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default]
drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default]

drivers/xen/biomerge.c does not include export.h.  It would be nice if
this produced an error, not just the warnings above.  Caused by commit
0b934ccd707f ("Xen: Export xen_biovec_phys_mergeable") (which was never
in linux-next :-().

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 19 Jan 2012 10:24:31 +1100
Subject: [PATCH] xen: using EXPORT_SYMBOL requires including export.h

Fixes these warnings:

drivers/xen/biomerge.c:14:1: warning: data definition has no type or storage class [enabled by default]
drivers/xen/biomerge.c:14:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL' [-Wimplicit-int]
drivers/xen/biomerge.c:14:1: warning: parameter names (without types) in function declaration [enabled by default]

And this build error:

ERROR: "xen_biovec_phys_mergeable" [drivers/block/nvme.ko] undefined!

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/xen/biomerge.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c
index 18c1bb6..0edb91c 100644
--- a/drivers/xen/biomerge.c
+++ b/drivers/xen/biomerge.c
@@ -1,5 +1,6 @@
 #include <linux/bio.h>
 #include <linux/io.h>
+#include <linux/export.h>
 #include <xen/page.h>
 
 bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
-- 
1.7.9.rc0.23.g7e521

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* RE: linux-next: build failure after merge of the origin tree
  2011-11-07 16:46         ` Rose, Gregory V
@ 2011-11-07 17:46           ` Rose, Gregory V
  0 siblings, 0 replies; 41+ messages in thread
From: Rose, Gregory V @ 2011-11-07 17:46 UTC (permalink / raw)
  To: Rose, Gregory V, Kirsher, Jeffrey T, David Miller
  Cc: sfr, torvalds, linux-next, linux-kernel, netdev


[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]

> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
> On Behalf Of Rose, Gregory V
> Sent: Monday, November 07, 2011 8:47 AM
> To: Kirsher, Jeffrey T; David Miller
> Cc: sfr@canb.auug.org.au; torvalds@linux-foundation.org; linux-
> next@vger.kernel.org; linux-kernel@vger.kernel.org; netdev@vger.kernel.org
> Subject: RE: linux-next: build failure after merge of the origin tree
> 
> 
> 
> > -----Original Message-----
> > From: Kirsher, Jeffrey T
> > Sent: Sunday, November 06, 2011 9:30 PM
> > To: David Miller
> > Cc: sfr@canb.auug.org.au; torvalds@linux-foundation.org; linux-
> > next@vger.kernel.org; linux-kernel@vger.kernel.org; Rose, Gregory V;
> > netdev@vger.kernel.org
> > Subject: Re: linux-next: build failure after merge of the origin tree
> >
> >
> >
> > Cheers,
> > Jeff
> >
> > On Nov 6, 2011, at 19:38, "David Miller" <davem@davemloft.net> wrote:
> >
> > > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > > Date: Mon, 7 Nov 2011 13:47:06 +1100
> > >
> > >>> If you just revert the commit in origin from -next, then you will
> get
> > >>> conflicts with you pull the net.git tree in.
> > >>
> > >> I got no conflicts when I merged in the net tree and can see no fix
> for
> > >> this problem in the net tree.  My current head of the net tree is
> > 1a6422f
> > >> "etherh: Add MAINTAINERS entry for etherh".
> > >
> > > Ok, Jeff please take a look at this and send me a fix soon.
> > >
> > > Thanks.
> >
> > Ok Dave, at this point, I am puttying together a patch to revert this
> fix
> > since it appears that more trouble comes with this fix.  I will take a
> > look at it quickly before sending out a patch to fix the issue.
> 
> My bad...  I fixed a compiler warning that occurred with CONFIG_PCI_IOV
> turned on and didn't realize that my patch would cause an error when
> turning it back off.
> 
> I'll have it fixed ASAP.
> 
> - Greg

I have posted a fix for this problem to netdev and attached it to this email.

Again, my apologies for the mix up.

- Greg


> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Type: message/rfc822, Size: 5342 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* RE: linux-next: build failure after merge of the origin tree
  2011-11-07  5:29       ` Kirsher, Jeffrey T
@ 2011-11-07 16:46         ` Rose, Gregory V
  2011-11-07 17:46           ` Rose, Gregory V
  0 siblings, 1 reply; 41+ messages in thread
From: Rose, Gregory V @ 2011-11-07 16:46 UTC (permalink / raw)
  To: Kirsher, Jeffrey T, David Miller
  Cc: sfr, torvalds, linux-next, linux-kernel, netdev



> -----Original Message-----
> From: Kirsher, Jeffrey T
> Sent: Sunday, November 06, 2011 9:30 PM
> To: David Miller
> Cc: sfr@canb.auug.org.au; torvalds@linux-foundation.org; linux-
> next@vger.kernel.org; linux-kernel@vger.kernel.org; Rose, Gregory V;
> netdev@vger.kernel.org
> Subject: Re: linux-next: build failure after merge of the origin tree
> 
> 
> 
> Cheers,
> Jeff
> 
> On Nov 6, 2011, at 19:38, "David Miller" <davem@davemloft.net> wrote:
> 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 7 Nov 2011 13:47:06 +1100
> >
> >>> If you just revert the commit in origin from -next, then you will get
> >>> conflicts with you pull the net.git tree in.
> >>
> >> I got no conflicts when I merged in the net tree and can see no fix for
> >> this problem in the net tree.  My current head of the net tree is
> 1a6422f
> >> "etherh: Add MAINTAINERS entry for etherh".
> >
> > Ok, Jeff please take a look at this and send me a fix soon.
> >
> > Thanks.
> 
> Ok Dave, at this point, I am puttying together a patch to revert this fix
> since it appears that more trouble comes with this fix.  I will take a
> look at it quickly before sending out a patch to fix the issue.

My bad...  I fixed a compiler warning that occurred with CONFIG_PCI_IOV turned on and didn't realize that my patch would cause an error when turning it back off.

I'll have it fixed ASAP.

- Greg

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2011-11-07  3:36     ` David Miller
@ 2011-11-07  5:29       ` Kirsher, Jeffrey T
  2011-11-07 16:46         ` Rose, Gregory V
  0 siblings, 1 reply; 41+ messages in thread
From: Kirsher, Jeffrey T @ 2011-11-07  5:29 UTC (permalink / raw)
  To: David Miller
  Cc: sfr, torvalds, linux-next, linux-kernel, Rose, Gregory V, netdev



Cheers,
Jeff

On Nov 6, 2011, at 19:38, "David Miller" <davem@davemloft.net> wrote:

> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 7 Nov 2011 13:47:06 +1100
> 
>>> If you just revert the commit in origin from -next, then you will get
>>> conflicts with you pull the net.git tree in.
>> 
>> I got no conflicts when I merged in the net tree and can see no fix for
>> this problem in the net tree.  My current head of the net tree is 1a6422f
>> "etherh: Add MAINTAINERS entry for etherh".
> 
> Ok, Jeff please take a look at this and send me a fix soon.
> 
> Thanks.

Ok Dave, at this point, I am puttying together a patch to revert this fix since it appears that more trouble comes with this fix.  I will take a look at it quickly before sending out a patch to fix the issue.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2011-11-07  2:47   ` Stephen Rothwell
@ 2011-11-07  3:36     ` David Miller
  2011-11-07  5:29       ` Kirsher, Jeffrey T
  0 siblings, 1 reply; 41+ messages in thread
From: David Miller @ 2011-11-07  3:36 UTC (permalink / raw)
  To: sfr
  Cc: torvalds, linux-next, linux-kernel, gregory.v.rose,
	jeffrey.t.kirsher, netdev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 7 Nov 2011 13:47:06 +1100

>> If you just revert the commit in origin from -next, then you will get
>> conflicts with you pull the net.git tree in.
> 
> I got no conflicts when I merged in the net tree and can see no fix for
> this problem in the net tree.  My current head of the net tree is 1a6422f
> "etherh: Add MAINTAINERS entry for etherh".

Ok, Jeff please take a look at this and send me a fix soon.

Thanks.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2011-11-07  1:52 ` David Miller
@ 2011-11-07  2:47   ` Stephen Rothwell
  2011-11-07  3:36     ` David Miller
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2011-11-07  2:47 UTC (permalink / raw)
  To: David Miller
  Cc: torvalds, linux-next, linux-kernel, gregory.v.rose,
	jeffrey.t.kirsher, netdev


[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

Hi Dave,

On Sun, 06 Nov 2011 20:52:59 -0500 (EST) David Miller <davem@davemloft.net> wrote:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 7 Nov 2011 10:12:02 +1100
> 
> > Starting with the origin tree, today's linux-next build (powerpc
> > ppc64_defconfig) failed like this:
>  ...
> > Caused by commit 9487dc844054 ("ixgbe: Fix compiler warnings") which hid
> > the declarations of ixgbe_disable_sriov() and ixgbe_check_vf_assignment()
> > when CONFIG_PCI_IOV is not defined.
> > 
> > I have reverted that commit for today.
> 
> It should be fixed in net.git, can you please check that the build
> succeeds after you pull it into -next?

I reverted the commit above ...

> If you just revert the commit in origin from -next, then you will get
> conflicts with you pull the net.git tree in.

I got no conflicts when I merged in the net tree and can see no fix for
this problem in the net tree.  My current head of the net tree is 1a6422f
"etherh: Add MAINTAINERS entry for etherh".

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: linux-next: build failure after merge of the origin tree
  2011-11-06 23:12 Stephen Rothwell
@ 2011-11-07  1:52 ` David Miller
  2011-11-07  2:47   ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: David Miller @ 2011-11-07  1:52 UTC (permalink / raw)
  To: sfr
  Cc: torvalds, linux-next, linux-kernel, gregory.v.rose,
	jeffrey.t.kirsher, netdev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 7 Nov 2011 10:12:02 +1100

> Starting with the origin tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
 ...
> Caused by commit 9487dc844054 ("ixgbe: Fix compiler warnings") which hid
> the declarations of ixgbe_disable_sriov() and ixgbe_check_vf_assignment()
> when CONFIG_PCI_IOV is not defined.
> 
> I have reverted that commit for today.

It should be fixed in net.git, can you please check that the build
succeeds after you pull it into -next?

If you just revert the commit in origin from -next, then you will get
conflicts with you pull the net.git tree in.

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2011-11-06 23:12 Stephen Rothwell
  2011-11-07  1:52 ` David Miller
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2011-11-06 23:12 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-next, linux-kernel, Greg Rose, Jeff Kirsher, David Miller, netdev


[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

Hi Linus,

Starting with the origin tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_set_interrupt_capability':
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:4724:3: error: implicit declaration of function 'ixgbe_disable_sriov'
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_remove':
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:7773:3: error: implicit declaration of function 'ixgbe_check_vf_assignment'

Caused by commit 9487dc844054 ("ixgbe: Fix compiler warnings") which hid
the declarations of ixgbe_disable_sriov() and ixgbe_check_vf_assignment()
when CONFIG_PCI_IOV is not defined.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* linux-next: build failure after merge of the origin tree
@ 2011-07-25  1:16 Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2011-07-25  1:16 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-next, linux-kernel, Andrew Morton, Jonas Bonn, Alan Cox

Hi Linus,

After merging the origin tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: "__bad_udelay" [drivers/staging/gma500/psb_gfx.ko] undefined!

Presumably caused by commit a87e553fabe8 ("asm-generic: delay.h fix
udelay and ndelay for 8 bit args").
drivers/staging/gma500/psb_intel_display.c has a udelay
(20000) which is explicitly disallowed by this patch.

I have added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 25 Jul 2011 11:13:13 +1000
Subject: [PATCH] gma500: udlay(20000) is too large

So we use mdelay(20) instead.  Fixes this build error:

ERROR: "__bad_udelay" [drivers/staging/gma500/psb_gfx.ko] undefined!

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/staging/gma500/psb_intel_display.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/gma500/psb_intel_display.c b/drivers/staging/gma500/psb_intel_display.c
index 4f47d09..09e378d 100644
--- a/drivers/staging/gma500/psb_intel_display.c
+++ b/drivers/staging/gma500/psb_intel_display.c
@@ -331,7 +331,7 @@ static bool psb_intel_find_best_PLL(struct drm_crtc *crtc, int target,
 void psb_intel_wait_for_vblank(struct drm_device *dev)
 {
 	/* Wait for 20ms, i.e. one cycle at 50hz. */
-	udelay(20000);
+	mdelay(20);
 }
 
 int psb_intel_pipe_set_base(struct drm_crtc *crtc,
-- 
1.7.5.4


-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, back to index

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 22:58 linux-next: build failure after merge of the origin tree Stephen Rothwell
2020-07-30 23:15 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2020-07-29 23:08 Stephen Rothwell
2020-07-29 23:43 ` Linus Torvalds
2020-07-30  0:09   ` Linus Torvalds
2020-07-30  2:12     ` Linus Torvalds
2020-07-30  2:30       ` Willy Tarreau
2020-07-30  3:17   ` Kees Cook
2020-07-30  3:22     ` Willy Tarreau
2020-07-30  6:14       ` Willy Tarreau
2020-07-30  9:59         ` Marc Zyngier
2020-07-30 10:09           ` Catalin Marinas
2020-07-30 15:00             ` Will Deacon
2020-07-30 17:49         ` Kees Cook
2020-07-30 18:24     ` Linus Torvalds
2020-07-30 18:47       ` Kees Cook
2020-06-04 22:37 Stephen Rothwell
2020-06-05  0:04 ` Josh Poimboeuf
2020-06-05  9:48   ` Jessica Yu
2020-04-20 10:23 Stephen Rothwell
2020-01-31  4:12 Stephen Rothwell
2020-01-31  4:17 ` Randy Dunlap
2020-01-31  9:39   ` Daniel Lezcano
2012-10-09 23:21 Stephen Rothwell
2012-10-09 23:45 ` Andrew Morton
2012-10-09 23:52   ` Yasuaki Ishimatsu
2012-10-10  3:12     ` Stephen Rothwell
2012-10-10  0:07   ` Stephen Rothwell
2012-06-04  2:57 Stephen Rothwell
2012-06-04  7:39 ` Paul Mundt
2012-01-18 23:31 Stephen Rothwell
2012-01-19  8:21 ` Jens Axboe
2012-01-19  8:23   ` Jens Axboe
2011-11-06 23:12 Stephen Rothwell
2011-11-07  1:52 ` David Miller
2011-11-07  2:47   ` Stephen Rothwell
2011-11-07  3:36     ` David Miller
2011-11-07  5:29       ` Kirsher, Jeffrey T
2011-11-07 16:46         ` Rose, Gregory V
2011-11-07 17:46           ` Rose, Gregory V
2011-07-25  1:16 Stephen Rothwell

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git