Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

PATCH Applied Stephen Rothwell 3 participants 8 messages Oct 25, 2021 – Oct 28, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

arch/x86/kernel/fpu/core.c: In function 'fpu_alloc_guest_fpstate':
arch/x86/kernel/fpu/core.c:187:12: error: implicit declaration of function 'vzalloc'; did you mean 'kzalloc'? [-Werror=implicit-function-declaration]

  187 |  fpstate = vzalloc(size);
      |            ^~~~~~~
      |            kzalloc

arch/x86/kernel/fpu/core.c:187:10: error: assignment to 'struct fpstate *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
187 | fpstate = vzalloc(size);
| ^
arch/x86/kernel/fpu/core.c: In function 'fpu_free_guest_fpstate':
arch/x86/kernel/fpu/core.c:212:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]

  212 |  vfree(fps);
      |  ^~~~~
      |  kfree

cc1: all warnings being treated as errors

Caused by commit

69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")

I have applied the following patch for today (because it was quicker than using the tip tree from next-20211022).

From: Stephen Rothwell <[email protected]>
Date: Mon, 25 Oct 2021 15:04:13 +1100
Subject: [PATCH] x86/fpu: include vmalloc.h for vzalloc etc

Fixes 69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/fpu/core.c +1 -0
index 9c475e2efd4d..c55013fc82ab 100644
@@ -16,6 +16,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/pkeys.h>
+#include <linux/vmalloc.h>
 
 #include "context.h"
 #include "internal.h"
Signature · 5 lines
2.33.0

-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen,

Quoted 18 lines · Stephen Rothwell

Hi all,

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

arch/x86/kernel/fpu/core.c: In function 'fpu_alloc_guest_fpstate':
arch/x86/kernel/fpu/core.c:187:12: error: implicit declaration of function 'vzalloc'; did you mean 'kzalloc'? [-Werror=implicit-function-declaration]

  187 |  fpstate = vzalloc(size);
      |            ^~~~~~~
      |            kzalloc

arch/x86/kernel/fpu/core.c:187:10: error: assignment to 'struct fpstate *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
187 | fpstate = vzalloc(size);
| ^
arch/x86/kernel/fpu/core.c: In function 'fpu_free_guest_fpstate':
arch/x86/kernel/fpu/core.c:212:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]

  212 |  vfree(fps);
      |  ^~~~~
      |  kfree
Quoted 8 lines

cc1: all warnings being treated as errors

Caused by commit

69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")

I have applied the following patch for today (because it was quicker than using the tip tree from next-20211022).

I cannot reproduce here. It could be uncovered by some stuff you merge before tip/auto-latest or so.

Quoted 16 lines

From: Stephen Rothwell <[email protected]>
Date: Mon, 25 Oct 2021 15:04:13 +1100
Subject: [PATCH] x86/fpu: include vmalloc.h for vzalloc etc

Fixes 69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/fpu/core.c +0 -0
index 9c475e2efd4d..c55013fc82ab 100644

arch/x86/kernel/fpu/core.c line 22

Quoted 7 lines
arch/x86/kernel/fpu/core.c +1 -0
@@ -16,6 +16,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/pkeys.h>
+#include <linux/vmalloc.h>
 
 #include "context.h"
 #include "internal.h"

I'm thinking I could simply fold in your change into 69f6ed1d14c6 ...

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
#2 lore raw

Hi Borislav,

Quoted 3 lines · On Mon, 25 Oct 2021 09:42:12 +0200 Borislav Petkov <[email protected]> wrote:

I cannot reproduce here. It could be uncovered by some stuff you merge before tip/auto-latest or so.

Yeah, I fugured something like that must have happened.

Quoted 20 lines
Quoted 20 lines

From: Stephen Rothwell <[email protected]>
Date: Mon, 25 Oct 2021 15:04:13 +1100
Subject: [PATCH] x86/fpu: include vmalloc.h for vzalloc etc

Fixes 69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/fpu/core.c +1 -0
index 9c475e2efd4d..c55013fc82ab 100644
@@ -16,6 +16,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/pkeys.h>
+#include <linux/vmalloc.h>
 
Quoted 5 lines

arch/x86/kernel/fpu/core.c line 22

Quoted 3 lines
arch/x86/kernel/fpu/core.c +0 -0
 #include "context.h"
 #include "internal.h"

I'm thinking I could simply fold in your change into 69f6ed1d14c6 ...

That will certainly make it more robust against people cleaning up include files.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 2 lines · Stephen Rothwell

That will certainly make it more robust against people cleaning up include files.

Ok, rebased and pushed out. You could try it now.

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
#4 lore raw
In reply to Stephen Rothwell

Hi all,

Quoted 50 lines · On Mon, 25 Oct 2021 15:11:44 +1100 Stephen Rothwell <[email protected]>…

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

arch/x86/kernel/fpu/core.c: In function 'fpu_alloc_guest_fpstate':
arch/x86/kernel/fpu/core.c:187:12: error: implicit declaration of function 'vzalloc'; did you mean 'kzalloc'? [-Werror=implicit-function-declaration]

  187 |  fpstate = vzalloc(size);
      |            ^~~~~~~
      |            kzalloc

arch/x86/kernel/fpu/core.c:187:10: error: assignment to 'struct fpstate *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
187 | fpstate = vzalloc(size);
| ^
arch/x86/kernel/fpu/core.c: In function 'fpu_free_guest_fpstate':
arch/x86/kernel/fpu/core.c:212:2: error: implicit declaration of function 'vfree'; did you mean 'kfree'? [-Werror=implicit-function-declaration]

  212 |  vfree(fps);
      |  ^~~~~
      |  kfree

cc1: all warnings being treated as errors

Caused by commit

69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")

I have applied the following patch for today (because it was quicker than using the tip tree from next-20211022).

From: Stephen Rothwell <[email protected]>
Date: Mon, 25 Oct 2021 15:04:13 +1100
Subject: [PATCH] x86/fpu: include vmalloc.h for vzalloc etc

Fixes 69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/fpu/core.c +1 -0
index 9c475e2efd4d..c55013fc82ab 100644
@@ -16,6 +16,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/pkeys.h>
+#include <linux/vmalloc.h>
 
 #include "context.h"
 #include "internal.h"
Signature · 1 line
2.33.0

This build failure has returned today :-(

Signature · 2 lines
Cheers,
Stephen Rothwell
#5 lore raw

Hi Stephen,

Quoted 1 line · Stephen Rothwell

This build failure has returned today :-(

Sorry about that.

I had the original patch updated but then it is very possible I fat-fingered the branch during the patch frenzy in the past days here.

Now I've applied yours because it happening a second time simply warrants having this as a separate patch.

Thx.

Signature · 4 lines
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg
#6 lore raw

[tip: x86/fpu] x86/fpu: Include vmalloc.h for vzalloc()

In reply to Stephen Rothwell
The following commit has been merged into the x86/fpu branch of tip:

The following commit has been merged into the x86/fpu branch of tip:

Commit-ID:     6ccd63f07775961b3212c098abad05bcda931045
Gitweb:        https://git.kernel.org/tip/6ccd63f07775961b3212c098abad05bcda931045
Author:        Stephen Rothwell <[email protected]>
AuthorDate:    Mon, 25 Oct 2021 15:04:13 +11:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Thu, 28 Oct 2021 10:12:54 +02:00

x86/fpu: Include vmalloc.h for vzalloc()

Explicitly include that header to avoid build errors when vzalloc() becomes "invisible" to the compiler due to header reorganizations.

This is not a problem in the tip tree but occurred when integrating linux-next.

[ bp: Commit message. ]

Fixes 69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/fpu/core.c +1 -0
index 290836d..8ea306b 100644
@@ -16,6 +16,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/pkeys.h>
+#include <linux/vmalloc.h>
 
 #include "context.h"
 #include "internal.h"
#7 lore raw

[tip: x86/fpu] x86/fpu: Include vmalloc.h for vzalloc()

In reply to Stephen Rothwell
The following commit has been merged into the x86/fpu branch of tip:

The following commit has been merged into the x86/fpu branch of tip:

Commit-ID:     868c250bb4639531ff33b2d879fbef39c1d9ed39
Gitweb:        https://git.kernel.org/tip/868c250bb4639531ff33b2d879fbef39c1d9ed39
Author:        Stephen Rothwell <[email protected]>
AuthorDate:    Mon, 25 Oct 2021 15:04:13 +11:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Thu, 28 Oct 2021 14:35:27 +02:00

x86/fpu: Include vmalloc.h for vzalloc()

Explicitly include that header to avoid build errors when vzalloc() becomes "invisible" to the compiler due to header reorganizations.

This is not a problem in the tip tree but occurred when integrating linux-next.

[ bp: Commit message. ]

Fixes 69f6ed1d14c6 ("x86/fpu: Provide infrastructure for KVM FPU cleanup")
---
 arch/x86/kernel/fpu/core.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/kernel/fpu/core.c +1 -0
index 290836d..8ea306b 100644
@@ -16,6 +16,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/pkeys.h>
+#include <linux/vmalloc.h>
 
 #include "context.h"
 #include "internal.h"