random: Resolve circular include dependency and include <linux/percpu.h>
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest19 patches 3 repliesIn review
- v2 posting 2/219 patches 9 repliesSuperseded
- v2 posting 1/219 patches 0 repliesSuperseded
Patches in v3 No applies recorded yet
Reviews trailers per patch
8 of 19 patches have a Reviewed-by or Acked-by.
| Patch | Jani Nikula | Hans Verkuil | Miquel Raynal | Eric Biggers | Bart Van Assche | Petr Mladek | Stephen Hemminger | Herbert Xu |
|---|---|---|---|---|---|---|---|---|
| 1/19 | ||||||||
| 2/19 | A-b | |||||||
| 3/19 | A-b | |||||||
| 4/19 | ||||||||
| 5/19 | A-b | |||||||
| 6/19 | A-b | |||||||
| 7/19 | A-b | |||||||
| 8/19 | R-b | |||||||
| 9/19 | ||||||||
| 10/19 | ||||||||
| 11/19 | ||||||||
| 12/19 | ||||||||
| 13/19 | ||||||||
| 14/19 | ||||||||
| 15/19 | ||||||||
| 16/19 | A-b | |||||||
| 17/19 | A-b | |||||||
| 18/19 | ||||||||
| 19/19 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 8 reviewers.
Cover letter [PATCH v3 00/19] random: Resolve circular include dependency and include <linux/percpu.h>
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/[email protected]/
---
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: tags.
v3: - Update to linux 6.12rc1.
- Add more Acked-by: tags.
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>
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(-)
Signature · 1 line
2.46.2