linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the random tree
@ 2022-12-14  1:53 Stephen Rothwell
  2022-12-14  5:37 ` Jason A. Donenfeld
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2022-12-14  1:53 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A. Donenfeld
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

arch/x86/mm/cpu_entry_area.c: In function 'init_cea_offsets':
arch/x86/mm/cpu_entry_area.c:39:23: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]
   39 |                 cea = prandom_u32_max(max_cea);
      |                       ^~~~~~~~~~~~~~~
      |                       prandom_u32_state
net/ipv4/tcp_plb.c: In function 'tcp_plb_update_state_upon_rto':
net/ipv4/tcp_plb.c:100:18: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]
  100 |         pause += prandom_u32_max(pause);
      |                  ^~~~~~~~~~~~~~~
      |                  prandom_u32_state

Caused by commit

  1effd020f82d ("prandom: remove prandom_u32_max()")

interacting with some new usages.  Why not leave this removal until
just after -rc1 has been released?

I have reverted this commit for today.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
* linux-next: build failure after merge of the random tree
@ 2024-03-25  1:01 Stephen Rothwell
  2024-03-26 16:08 ` Jason A. Donenfeld
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2024-03-25  1:01 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A. Donenfeld
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the random tree, today's linux-next build (i386 defconfig)
failed like this:

In file included from arch/x86/kernel/cpu/rdrand.c:12:
arch/x86/include/asm/archrandom.h: In function 'rdrand_long':
arch/x86/include/asm/archrandom.h:25:9: error: implicit declaration of function 'WARN_ON' [-Werror=implicit-function-declaration]
   25 |         WARN_ON(!ok);
      |         ^~~~~~~

Caused by commit

  c53d3006e1ed ("x86/archrandom: WARN if RDRAND fails and don't retry")

I have used the random tree from next-20240322 for today.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
* linux-next: build failure after merge of the random tree
@ 2022-12-13  3:36 Stephen Rothwell
  2022-12-13  4:02 ` Jason A. Donenfeld
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2022-12-13  3:36 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A. Donenfeld
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

drivers/char/hw_random/powernv-rng.c: In function 'powernv_rng_read':
drivers/char/hw_random/powernv-rng.c:26:17: error: implicit declaration of function 'pnv_get_random_long'; did you mean 'get_random_long'? [-Werror=implicit-function-declaration]
   26 |                 pnv_get_random_long(buf++);
      |                 ^~~~~~~~~~~~~~~~~~~
      |                 get_random_long
net/ipv4/tcp_plb.c: In function 'tcp_plb_update_state_upon_rto':
net/ipv4/tcp_plb.c:100:18: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]
  100 |         pause += prandom_u32_max(pause);
      |                  ^~~~~~~~~~~~~~~
      |                  prandom_u32_state

The latter call has been added recently, but the former is presumably
caused by commit

  5d1056fb3dd8 ("random: do not include <asm/archrandom.h> from random.h")

I have used the random tree from next-20221208 for today.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
* linux-next: build failure after merge of the random tree
@ 2022-10-31  6:09 Stephen Rothwell
  2022-10-31 10:31 ` Jason A. Donenfeld
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2022-10-31  6:09 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A. Donenfeld
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the random tree, today's linux-next build (arm64 defconfig)
failed like this:

arch/arm64/kernel/pi/kaslr_early.c: In function 'kaslr_early_init':
arch/arm64/kernel/pi/kaslr_early.c:97:22: error: implicit declaration of function '__early_cpu_has_rndr' [-Werror=implicit-function-declaration]
   97 |                 if (!__early_cpu_has_rndr() ||
      |                      ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Caused by commit

  70ae866ab6b3 ("random: remove early archrandom abstraction")

I have used the ramdom tree from next-20221028 for today.

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply	[flat|nested] 14+ messages in thread
* linux-next: build failure after merge of the random tree
@ 2022-10-24  2:23 Stephen Rothwell
  2022-10-24  4:28 ` Jason A. Donenfeld
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2022-10-24  2:23 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A. Donenfeld, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Peter Zijlstra
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

arch/x86/mm/cpu_entry_area.c: In function 'init_cea_offsets':
arch/x86/mm/cpu_entry_area.c:38:23: error: implicit declaration of function 'prandom_u32_max'; did you mean 'prandom_u32_state'? [-Werror=implicit-function-declaration]
   38 |                 cea = prandom_u32_max(max_cea);
      |                       ^~~~~~~~~~~~~~~
      |                       prandom_u32_state
cc1: all warnings being treated as errors

Caused by commit

  921b09c09fe7 ("prandom: remove prandom_u32_max()")

interacting with commit

  1248fb6a8201 ("x86/mm: Randomize per-cpu entry area")

from the tip tree.

I have applied the following fix up patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 24 Oct 2022 12:37:28 +1100
Subject: [PATCH] fix up for "prandom: remove prandom_u32_max()"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/x86/mm/cpu_entry_area.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/cpu_entry_area.c b/arch/x86/mm/cpu_entry_area.c
index ad1f750517a1..7a1b63fb80d3 100644
--- a/arch/x86/mm/cpu_entry_area.c
+++ b/arch/x86/mm/cpu_entry_area.c
@@ -35,7 +35,7 @@ static __init void init_cea_offsets(void)
 		unsigned int cea;
 
 again:
-		cea = prandom_u32_max(max_cea);
+		cea = get_random_u32_below(max_cea);
 
 		/* Make sure that no previous CPU shares the offset: */
 		for_each_possible_cpu(j) {
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* linux-next: build failure after merge of the random tree
@ 2022-03-03  8:04 Stephen Rothwell
  2022-03-03 10:41 ` Jason A. Donenfeld
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2022-03-03  8:04 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A. Donenfeld
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

After merging the random tree, today's linux-next build (arm64 defconfig)
failed like this:

In file included from include/linux/srcu.h:49,
                 from include/linux/notifier.h:16,
                 from include/linux/random.h:10,
                 from arch/arm64/include/asm/pointer_auth.h:7,
                 from arch/arm64/include/asm/processor.h:43,
                 from include/linux/mutex.h:19,
                 from include/linux/kernfs.h:11,
                 from include/linux/sysfs.h:16,
                 from include/linux/kobject.h:20,
                 from include/linux/of.h:17,
                 from include/linux/irqdomain.h:35,
                 from include/linux/acpi.h:13,
                 from include/acpi/apei.h:9,
                 from include/acpi/ghes.h:5,
                 from include/linux/arm_sdei.h:8,
                 from arch/arm64/kernel/asm-offsets.c:10:
include/linux/srcutree.h:67:22: error: field 'srcu_cb_mutex' has incomplete type
   67 |         struct mutex srcu_cb_mutex;             /* Serialize CB preparation. */
      |                      ^~~~~~~~~~~~~
include/linux/srcutree.h:69:22: error: field 'srcu_gp_mutex' has incomplete type
   69 |         struct mutex srcu_gp_mutex;             /* Serialize GP work. */
      |                      ^~~~~~~~~~~~~
include/linux/srcutree.h:80:22: error: field 'srcu_barrier_mutex' has incomplete type
   80 |         struct mutex srcu_barrier_mutex;        /* Serialize barrier ops. */
      |                      ^~~~~~~~~~~~~~~~~~
In file included from include/linux/random.h:10,
                 from arch/arm64/include/asm/pointer_auth.h:7,
                 from arch/arm64/include/asm/processor.h:43,
                 from include/linux/mutex.h:19,
                 from include/linux/kernfs.h:11,
                 from include/linux/sysfs.h:16,
                 from include/linux/kobject.h:20,
                 from include/linux/of.h:17,
                 from include/linux/irqdomain.h:35,
                 from include/linux/acpi.h:13,
                 from include/acpi/apei.h:9,
                 from include/acpi/ghes.h:5,
                 from include/linux/arm_sdei.h:8,
                 from arch/arm64/kernel/asm-offsets.c:10:
include/linux/notifier.h:75:22: error: field 'mutex' has incomplete type
   75 |         struct mutex mutex;
      |                      ^~~~~

Caused by commit

  c3b03baac3f2 ("random: replace custom notifier chain with standard one")

Which added the include of linux/notifier.h to linux/random.h :-(

I have added this patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 3 Mar 2022 18:43:56 +1100
Subject: [PATCH] fix up for "random: replace custom notifier chain with standard one"

Only the forward declaration of struct notifier_block is needed.
This prevents a circular include dependency on arm64 (at least).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/random.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/random.h b/include/linux/random.h
index 7fccbc7e5a75..c0baffe7afb1 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -7,10 +7,11 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/once.h>
-#include <linux/notifier.h>
 
 #include <uapi/linux/random.h>
 
+struct notifier_block;
+
 extern void add_device_randomness(const void *, size_t);
 extern void add_bootloader_randomness(const void *, size_t);
 
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* linux-next: build failure after merge of the random tree
@ 2018-06-29  6:06 Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2018-06-29  6:06 UTC (permalink / raw)
  To: Theodore Ts'o, Linus Torvalds
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Herbert Xu

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

Hi Theodore,

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

In file included from include/linux/mmzone.h:10:0,
                 from include/linux/gfp.h:6,
                 from include/linux/umh.h:4,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from drivers/char/random.c:242:
drivers/char/random.c: In function 'random_ioctl':
drivers/char/random.c:1973:32: error: 'random_wait' undeclared (first use in this function); did you mean 'random_write'?
    wake_up_interruptible_poll(&random_wait, POLLIN);
                                ^
include/linux/wait.h:216:12: note: in definition of macro 'wake_up_interruptible_poll'
  __wake_up(x, TASK_INTERRUPTIBLE, 1, poll_to_key(m))
            ^
drivers/char/random.c:1973:32: note: each undeclared identifier is reported only once for each function it appears in
    wake_up_interruptible_poll(&random_wait, POLLIN);
                                ^
include/linux/wait.h:216:12: note: in definition of macro 'wake_up_interruptible_poll'
  __wake_up(x, TASK_INTERRUPTIBLE, 1, poll_to_key(m))
            ^

Caused by commit

  e4f3df9712bb ("random: Wake up writers when random pools are zapped")

interacting with commit

  a11e1d432b51 ("Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL")

from Linus' tree.

I took a stab and applied the following patch:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 29 Jun 2018 15:43:01 +1000
Subject: [PATCH] random: fix up for revert of poll_mask changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/char/random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 00db7aed3204..d686aa2a129b 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1970,7 +1970,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
 		input_pool.entropy_count = 0;
 		blocking_pool.entropy_count = 0;
 		if (random_write_wakeup_bits) {
-			wake_up_interruptible_poll(&random_wait, POLLIN);
+			wake_up_interruptible_poll(&random_write_wait, POLLIN);
 			kill_fasync(&fasync, SIGIO, POLL_OUT);
 		}
 		return 0;
-- 
2.17.1

-- 
Cheers,
Stephen Rothwell

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

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

end of thread, other threads:[~2024-03-26 16:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14  1:53 linux-next: build failure after merge of the random tree Stephen Rothwell
2022-12-14  5:37 ` Jason A. Donenfeld
  -- strict thread matches above, loose matches on Subject: below --
2024-03-25  1:01 Stephen Rothwell
2024-03-26 16:08 ` Jason A. Donenfeld
2022-12-13  3:36 Stephen Rothwell
2022-12-13  4:02 ` Jason A. Donenfeld
2022-10-31  6:09 Stephen Rothwell
2022-10-31 10:31 ` Jason A. Donenfeld
2022-10-24  2:23 Stephen Rothwell
2022-10-24  4:28 ` Jason A. Donenfeld
2022-10-24  6:33   ` Stephen Rothwell
2022-03-03  8:04 Stephen Rothwell
2022-03-03 10:41 ` Jason A. Donenfeld
2018-06-29  6:06 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).