* [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h>
@ 2024-09-09 7:05 Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
` (18 more replies)
0 siblings, 19 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Dave Hansen, Andy Lutomirski, Peter Zijlstra,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
David Airlie, Daniel Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Hans Verkuil, Mauro Carvalho Chehab,
Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Eric Biggers, Theodore Y. Ts'o, Jaegeuk Kim,
Jason A. Donenfeld, Linus Torvalds, Hannes Reinecke,
James E.J. Bottomley, Martin K. Petersen, Alexei Starovoitov,
Daniel Borkmann, John Fastabend, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Andrew Morton,
Brendan Higgins, David Gow, Rae Moar, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jiri Pirko,
Petr Mladek, Steven Rostedt, Andy Shevchenko, Rasmus Villemoes,
Sergey Senozhatsky, Stephen Hemminger, Jamal Hadi Salim,
Cong Wang, Kent Overstreet
There were several attempts to resolve circular include dependency
after the addition of percpu.h: 1c9df907da83 ("random: fix circular
include dependency on arm64 after addition of percpu.h"), c0842fbc1b18
("random32: move the pseudo-random 32-bit definitions to prandom.h") and
finally d9f29deb7fe8 ("prandom: Remove unused include") that completely
removes the inclusion of <linux/percpu.h>.
Due to legacy reasons, <linux/random.h> includes <linux/prandom.h>, but
with the commit entry remark:
--quote--
A further cleanup step would be to remove this from <linux/random.h>
entirely, and make people who use the prandom infrastructure include
just the new header file. That's a bit of a churn patch, but grepping
for "prandom_" and "next_pseudo_random32" "struct rnd_state" should
catch most users.
But it turns out that that nice cleanup step is fairly painful, because
a _lot_ of code currently seems to depend on the implicit include of
<linux/random.h>, which can currently come in a lot of ways, including
such fairly core headfers as <linux/net.h>.
So the "nice cleanup" part may or may never happen.
--/quote--
We would like to include <linux/percpu.h> in <linux/prandom.h>.
In [1] we would like to repurpose __percpu tag as a named address space
qualifier, where __percpu macro uses defines from <linux/percpu.h>.
The major roadblock to inclusion of <linux/percpu.h> is the above
mentioned legacy inclusion of <linux/prandom.h> in <linux/random.h> that
causes circular include dependency that prevents <linux/percpu.h>
inclusion.
This patch series is the "nice cleanup" part that:
a) Substitutes the inclusion of <linux/random.h> with the
inclusion of <linux/prandom.h> where needed (patches 1 - 17).
b) Removes legacy inclusion of <linux/prandom.h> from
<linux/random.h> (patch 18).
c) Includes <linux/percpu.h> in <linux/prandom.h> (patch 19).
The whole series was tested by compiling the kernel for x86_64 allconfig
and some popular architectures, namely arm64 defconfig, powerpc defconfig
and loongarch defconfig.
[1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: x86@kernel.org
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hannes Reinecke <hare@suse.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: Song Liu <song@kernel.org>
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Stanislav Fomichev <sdf@fomichev.me>
Cc: Hao Luo <haoluo@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <rmoar@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
---
v2: - Reword commit messages to mention the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>
- Add missing substitution in crypto/testmgr.c
(reported by kernel test robot)
- Add Acked-by:.
Uros Bizjak (19):
x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h>
crypto: testmgr: Include <linux/prandom.h> instead of <linux/random.h>
drm/i915/selftests: Include <linux/prandom.h> instead of
<linux/random.h>
drm/lib: Include <linux/prandom.h> instead of <linux/random.h>
media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c
mtd: tests: Include <linux/prandom.h> instead of <linux/random.h>
fscrypt: Include <linux/once.h> in fs/crypto/keyring.c
scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h>
bpf: Include <linux/prandom.h> instead of <linux/random.h>
lib/interval_tree_test.c: Include <linux/prandom.h> instead of
<linux/random.h>
kunit: string-stream-test: Include <linux/prandom.h> instead of
<linux/random.h>
random32: Include <linux/prandom.h> instead of <linux/random.h>
lib/rbtree-test: Include <linux/prandom.h> instead of <linux/random.h>
bpf/tests: Include <linux/prandom.h> instead of <linux/random.h>
lib/test_parman: Include <linux/prandom.h> instead of <linux/random.h>
lib/test_scanf: Include <linux/prandom.h> instead of <linux/random.h>
netem: Include <linux/prandom.h> in sch_netem.c
random: Do not include <linux/prandom.h> in <linux/random.h>
prandom: Include <linux/percpu.h> in <linux/prandom.h>
arch/x86/mm/kaslr.c | 2 +-
crypto/testmgr.c | 2 +-
drivers/gpu/drm/i915/selftests/i915_gem.c | 2 +-
drivers/gpu/drm/i915/selftests/i915_random.h | 2 +-
drivers/gpu/drm/i915/selftests/scatterlist.c | 2 +-
drivers/gpu/drm/lib/drm_random.h | 2 +-
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 1 +
drivers/mtd/tests/oobtest.c | 2 +-
drivers/mtd/tests/pagetest.c | 2 +-
drivers/mtd/tests/subpagetest.c | 2 +-
fs/crypto/keyring.c | 1 +
include/linux/prandom.h | 1 +
include/linux/random.h | 7 -------
include/scsi/libfcoe.h | 2 +-
kernel/bpf/core.c | 2 +-
lib/interval_tree_test.c | 2 +-
lib/kunit/string-stream-test.c | 1 +
lib/random32.c | 2 +-
lib/rbtree_test.c | 2 +-
lib/test_bpf.c | 2 +-
lib/test_parman.c | 2 +-
lib/test_scanf.c | 2 +-
net/sched/sch_netem.c | 1 +
23 files changed, 22 insertions(+), 24 deletions(-)
--
2.46.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v2 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 02/19] crypto: testmgr: " Uros Bizjak
` (17 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Dave Hansen, Andy Lutomirski, Peter Zijlstra,
Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/mm/kaslr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
index 230f1dee4f09..e17e6e27b7ec 100644
--- a/arch/x86/mm/kaslr.c
+++ b/arch/x86/mm/kaslr.c
@@ -22,7 +22,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/memblock.h>
#include <linux/pgtable.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 02/19] crypto: testmgr: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 03/19] drm/i915/selftests: " Uros Bizjak
` (16 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Herbert Xu, David S. Miller
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
---
crypto/testmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index f02cb075bd68..eeb7edd99a93 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -23,7 +23,7 @@
#include <linux/fips.h>
#include <linux/module.h>
#include <linux/once.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
#include <linux/string.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 03/19] drm/i915/selftests: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 02/19] crypto: testmgr: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 04/19] drm/lib: " Uros Bizjak
` (15 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, David Airlie, Daniel Vetter
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Acked-by: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
drivers/gpu/drm/i915/selftests/i915_gem.c | 2 +-
drivers/gpu/drm/i915/selftests/i915_random.h | 2 +-
drivers/gpu/drm/i915/selftests/scatterlist.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
index 61da4ed9d521..0727492576be 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -4,7 +4,7 @@
* Copyright © 2018 Intel Corporation
*/
-#include <linux/random.h>
+#include <linux/prandom.h>
#include "gem/i915_gem_internal.h"
#include "gem/i915_gem_pm.h"
diff --git a/drivers/gpu/drm/i915/selftests/i915_random.h b/drivers/gpu/drm/i915/selftests/i915_random.h
index 05364eca20f7..70330a2e80f2 100644
--- a/drivers/gpu/drm/i915/selftests/i915_random.h
+++ b/drivers/gpu/drm/i915/selftests/i915_random.h
@@ -26,7 +26,7 @@
#define __I915_SELFTESTS_RANDOM_H__
#include <linux/math64.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include "../i915_selftest.h"
diff --git a/drivers/gpu/drm/i915/selftests/scatterlist.c b/drivers/gpu/drm/i915/selftests/scatterlist.c
index 805c4bfb85fe..7e59591bbed6 100644
--- a/drivers/gpu/drm/i915/selftests/scatterlist.c
+++ b/drivers/gpu/drm/i915/selftests/scatterlist.c
@@ -22,7 +22,7 @@
*/
#include <linux/prime_numbers.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include "i915_selftest.h"
#include "i915_utils.h"
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 04/19] drm/lib: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (2 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 03/19] drm/i915/selftests: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 05/19] media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c Uros Bizjak
` (14 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
drivers/gpu/drm/lib/drm_random.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/lib/drm_random.h b/drivers/gpu/drm/lib/drm_random.h
index 5543bf0474bc..9f827260a89d 100644
--- a/drivers/gpu/drm/lib/drm_random.h
+++ b/drivers/gpu/drm/lib/drm_random.h
@@ -6,7 +6,7 @@
* be transposed to lib/ at the earliest convenience.
*/
-#include <linux/random.h>
+#include <linux/prandom.h>
#define DRM_RND_STATE_INITIALIZER(seed__) ({ \
struct rnd_state state__; \
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 05/19] media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (3 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 04/19] drm/lib: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 06/19] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
` (13 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Hans Verkuil, Mauro Carvalho Chehab
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
---
drivers/media/test-drivers/vivid/vivid-vid-cap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/test-drivers/vivid/vivid-vid-cap.c b/drivers/media/test-drivers/vivid/vivid-vid-cap.c
index 69620e0a35a0..184460eb356e 100644
--- a/drivers/media/test-drivers/vivid/vivid-vid-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-vid-cap.c
@@ -10,6 +10,7 @@
#include <linux/sched.h>
#include <linux/vmalloc.h>
#include <linux/videodev2.h>
+#include <linux/prandom.h>
#include <linux/v4l2-dv-timings.h>
#include <media/v4l2-common.h>
#include <media/v4l2-event.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 06/19] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (4 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 05/19] media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 07/19] fscrypt: Include <linux/once.h> in fs/crypto/keyring.c Uros Bizjak
` (12 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Miquel Raynal, Richard Weinberger,
Vignesh Raghavendra
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
---
drivers/mtd/tests/oobtest.c | 2 +-
drivers/mtd/tests/pagetest.c | 2 +-
drivers/mtd/tests/subpagetest.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/tests/oobtest.c b/drivers/mtd/tests/oobtest.c
index 13fed398937e..e1ee68f8b8f8 100644
--- a/drivers/mtd/tests/oobtest.c
+++ b/drivers/mtd/tests/oobtest.c
@@ -17,7 +17,7 @@
#include <linux/mtd/mtd.h>
#include <linux/slab.h>
#include <linux/sched.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include "mtd_test.h"
diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c
index 8eb40b6e6dfa..6878700d2fc0 100644
--- a/drivers/mtd/tests/pagetest.c
+++ b/drivers/mtd/tests/pagetest.c
@@ -17,7 +17,7 @@
#include <linux/mtd/mtd.h>
#include <linux/slab.h>
#include <linux/sched.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include "mtd_test.h"
diff --git a/drivers/mtd/tests/subpagetest.c b/drivers/mtd/tests/subpagetest.c
index 05250a080139..f34bbf033c4d 100644
--- a/drivers/mtd/tests/subpagetest.c
+++ b/drivers/mtd/tests/subpagetest.c
@@ -15,7 +15,7 @@
#include <linux/mtd/mtd.h>
#include <linux/slab.h>
#include <linux/sched.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include "mtd_test.h"
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 07/19] fscrypt: Include <linux/once.h> in fs/crypto/keyring.c
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (5 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 06/19] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 08/19] scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
` (11 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Eric Biggers, Theodore Y. Ts'o, Jaegeuk Kim
Include <linux/once.h> header to allow the removal of legacy
inclusion of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
---
v2: Include <linux/once.h> instead of <linux/prandom.h>
---
fs/crypto/keyring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c
index 6681a71625f0..82fcc5683649 100644
--- a/fs/crypto/keyring.c
+++ b/fs/crypto/keyring.c
@@ -22,6 +22,7 @@
#include <crypto/skcipher.h>
#include <linux/key-type.h>
#include <linux/random.h>
+#include <linux/once.h>
#include <linux/seq_file.h>
#include "fscrypt_private.h"
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 08/19] scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (6 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 07/19] fscrypt: Include <linux/once.h> in fs/crypto/keyring.c Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 09/19] bpf: " Uros Bizjak
` (10 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Hannes Reinecke, James E.J. Bottomley,
Martin K. Petersen
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
---
include/scsi/libfcoe.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h
index 3c5899290aed..6616348e59b9 100644
--- a/include/scsi/libfcoe.h
+++ b/include/scsi/libfcoe.h
@@ -15,7 +15,7 @@
#include <linux/skbuff.h>
#include <linux/workqueue.h>
#include <linux/local_lock.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <scsi/fc/fc_fcoe.h>
#include <scsi/libfc.h>
#include <scsi/fcoe_sysfs.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 09/19] bpf: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (7 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 08/19] scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 10/19] lib/interval_tree_test.c: " Uros Bizjak
` (9 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Alexei Starovoitov, Daniel Borkmann, John Fastabend,
Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
Yonghong Song, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: Song Liu <song@kernel.org>
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Stanislav Fomichev <sdf@fomichev.me>
Cc: Hao Luo <haoluo@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
---
kernel/bpf/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 7ee62e38faf0..3f0d1eb7f5b0 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -21,7 +21,7 @@
#include <linux/filter.h>
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/bpf.h>
#include <linux/btf.h>
#include <linux/objtool.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 10/19] lib/interval_tree_test.c: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (8 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 09/19] bpf: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 11/19] kunit: string-stream-test: " Uros Bizjak
` (8 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Andrew Morton
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
lib/interval_tree_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/interval_tree_test.c b/lib/interval_tree_test.c
index f37f4d44faa9..837064b83a6c 100644
--- a/lib/interval_tree_test.c
+++ b/lib/interval_tree_test.c
@@ -2,7 +2,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/interval_tree.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/slab.h>
#include <asm/timex.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 11/19] kunit: string-stream-test: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (9 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 10/19] lib/interval_tree_test.c: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 12/19] random32: " Uros Bizjak
` (7 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Brendan Higgins, David Gow, Rae Moar
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <rmoar@google.com>
---
lib/kunit/string-stream-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/kunit/string-stream-test.c b/lib/kunit/string-stream-test.c
index 7511442ea98f..7734e33156f9 100644
--- a/lib/kunit/string-stream-test.c
+++ b/lib/kunit/string-stream-test.c
@@ -9,6 +9,7 @@
#include <kunit/static_stub.h>
#include <kunit/test.h>
#include <linux/ktime.h>
+#include <linux/prandom.h>
#include <linux/slab.h>
#include <linux/timekeeping.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 12/19] random32: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (10 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 11/19] kunit: string-stream-test: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 13/19] lib/rbtree-test: " Uros Bizjak
` (6 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Andrew Morton, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
---
lib/random32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/random32.c b/lib/random32.c
index 32060b852668..31fc2ca68856 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -36,7 +36,7 @@
#include <linux/percpu.h>
#include <linux/export.h>
#include <linux/jiffies.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/sched.h>
#include <linux/bitops.h>
#include <linux/slab.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 13/19] lib/rbtree-test: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (11 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 12/19] random32: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 14/19] bpf/tests: " Uros Bizjak
` (5 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Andrew Morton
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
lib/rbtree_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c
index 41ae3c7570d3..8655a76d29a1 100644
--- a/lib/rbtree_test.c
+++ b/lib/rbtree_test.c
@@ -2,7 +2,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/rbtree_augmented.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/slab.h>
#include <asm/timex.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 14/19] bpf/tests: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (12 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 13/19] lib/rbtree-test: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 15/19] lib/test_parman: " Uros Bizjak
` (4 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Andrew Morton, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eduard Zingerman, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
Hao Luo, Jiri Olsa
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Martin KaFai Lau <martin.lau@linux.dev>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: Song Liu <song@kernel.org>
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Stanislav Fomichev <sdf@fomichev.me>
Cc: Hao Luo <haoluo@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
---
lib/test_bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index ca4b0eea81a2..eb4a1915e4d2 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -14,7 +14,7 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/if_vlan.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/highmem.h>
#include <linux/sched.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 15/19] lib/test_parman: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (13 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 14/19] bpf/tests: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 16/19] lib/test_scanf: " Uros Bizjak
` (3 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Andrew Morton, Jiri Pirko
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Pirko <jiri@resnulli.us>
---
lib/test_parman.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_parman.c b/lib/test_parman.c
index 35e32243693c..f9b97426a337 100644
--- a/lib/test_parman.c
+++ b/lib/test_parman.c
@@ -39,7 +39,7 @@
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/err.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/parman.h>
#define TEST_PARMAN_PRIO_SHIFT 7 /* defines number of prios for testing */
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 16/19] lib/test_scanf: Include <linux/prandom.h> instead of <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (14 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 15/19] lib/test_parman: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 17/19] netem: Include <linux/prandom.h> in sch_netem.c Uros Bizjak
` (2 subsequent siblings)
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Petr Mladek, Steven Rostedt, Andy Shevchenko,
Rasmus Villemoes, Sergey Senozhatsky, Andrew Morton
Substitute the inclusion of <linux/random.h> header with
<linux/prandom.h> to allow the removal of legacy inclusion
of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
lib/test_scanf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_scanf.c b/lib/test_scanf.c
index 7257b1768545..44f8508c9d88 100644
--- a/lib/test_scanf.c
+++ b/lib/test_scanf.c
@@ -11,7 +11,7 @@
#include <linux/module.h>
#include <linux/overflow.h>
#include <linux/printk.h>
-#include <linux/random.h>
+#include <linux/prandom.h>
#include <linux/slab.h>
#include <linux/string.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 17/19] netem: Include <linux/prandom.h> in sch_netem.c
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (15 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 16/19] lib/test_scanf: " Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 18/19] random: Do not include <linux/prandom.h> in <linux/random.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h> Uros Bizjak
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Stephen Hemminger, Jamal Hadi Salim, Cong Wang,
Jiri Pirko, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni
Include <linux/prandom.h> header to allow the removal of legacy
inclusion of <linux/prandom.h> from <linux/random.h>.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
---
net/sched/sch_netem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 0f8d581438c3..2d919f590772 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -17,6 +17,7 @@
#include <linux/errno.h>
#include <linux/skbuff.h>
#include <linux/vmalloc.h>
+#include <linux/prandom.h>
#include <linux/rtnetlink.h>
#include <linux/reciprocal_div.h>
#include <linux/rbtree.h>
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 18/19] random: Do not include <linux/prandom.h> in <linux/random.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (16 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 17/19] netem: Include <linux/prandom.h> in sch_netem.c Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h> Uros Bizjak
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Theodore Ts'o, Jason A. Donenfeld,
Linus Torvalds
Files that use prandom infrastructure are now converted to
use <linux/prandom.h> header instead of <linux/random.h>.
Remove the legacy inclusion of <linux/prandom.h> from
<linux/random.h>.
This is the "nice cleanup" part, wished in c0842fbc1b18.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Fixes: c0842fbc1b18 ("random32: move the pseudo-random 32-bit definitions to prandom.h")
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
---
include/linux/random.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/include/linux/random.h b/include/linux/random.h
index b0a940af4fff..333cecfca93f 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -145,13 +145,6 @@ declare_get_random_var_wait(u64, u32)
declare_get_random_var_wait(long, unsigned long)
#undef declare_get_random_var
-/*
- * This is designed to be standalone for just prandom
- * users, but for now we include it from <linux/random.h>
- * for legacy reasons.
- */
-#include <linux/prandom.h>
-
#ifdef CONFIG_SMP
int random_prepare_cpu(unsigned int cpu);
int random_online_cpu(unsigned int cpu);
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v2 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h>
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
` (17 preceding siblings ...)
2024-09-09 7:05 ` [PATCH v2 18/19] random: Do not include <linux/prandom.h> in <linux/random.h> Uros Bizjak
@ 2024-09-09 7:05 ` Uros Bizjak
18 siblings, 0 replies; 20+ messages in thread
From: Uros Bizjak @ 2024-09-09 7:05 UTC (permalink / raw)
To: x86, linux-crypto, intel-gfx, dri-devel, linux-media, linux-mtd,
linux-fscrypt, linux-scsi, bpf, linux-kselftest, kunit-dev
Cc: Uros Bizjak, Theodore Ts'o, Jason A. Donenfeld,
Kent Overstreet
<linux/percpu.h> include was removed from <linux/prandom.h>
in d9f29deb7fe8 ("prandom: Remove unused include") because
this inclusion broke arm64 due to a circular dependency
on include files.
__percpu tag is defined in include/linux/compiler_types.h, so there
is currently no direct need for the inclusion of <linux/percpu.h>.
However, in [1] we would like to repurpose __percpu tag as a named
address space qualifier, where __percpu macro uses defines from
<linux/percpu.h>.
The circular dependency was removed in xxxxxxxxxxxx ("random: Do not
include <linux/prandom.h> in <linux/random.h>") and it cleared
the path for the inclusion of <linux/percpu.h> in <linux/prandom.h>.
This patch is basically a revert of d9f29deb7fe8
("prandom: Remove unused include").
[1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
---
include/linux/prandom.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/prandom.h b/include/linux/prandom.h
index f7f1e5251c67..f2ed5b72b3d6 100644
--- a/include/linux/prandom.h
+++ b/include/linux/prandom.h
@@ -10,6 +10,7 @@
#include <linux/types.h>
#include <linux/once.h>
+#include <linux/percpu.h>
#include <linux/random.h>
struct rnd_state {
--
2.46.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
end of thread, other threads:[~2024-09-09 7:08 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09 7:05 [PATCH v2 00/19] random: Resolve circular include dependency and include <linux/percpu.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 01/19] x86/kaslr: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 02/19] crypto: testmgr: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 03/19] drm/i915/selftests: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 04/19] drm/lib: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 05/19] media: vivid: Include <linux/prandom.h> in vivid-vid-cap.c Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 06/19] mtd: tests: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 07/19] fscrypt: Include <linux/once.h> in fs/crypto/keyring.c Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 08/19] scsi: libfcoe: Include <linux/prandom.h> instead of <linux/random.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 09/19] bpf: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 10/19] lib/interval_tree_test.c: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 11/19] kunit: string-stream-test: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 12/19] random32: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 13/19] lib/rbtree-test: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 14/19] bpf/tests: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 15/19] lib/test_parman: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 16/19] lib/test_scanf: " Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 17/19] netem: Include <linux/prandom.h> in sch_netem.c Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 18/19] random: Do not include <linux/prandom.h> in <linux/random.h> Uros Bizjak
2024-09-09 7:05 ` [PATCH v2 19/19] prandom: Include <linux/percpu.h> in <linux/prandom.h> Uros Bizjak
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).