Go to file
Linus Torvalds 8fa6737f43 random32: move the pseudo-random 32-bit definitions to prandom.h
commit c0842fbc1b18c7a044e6ff3e8fa78bfa822c7d1a upstream.

The addition of percpu.h to the list of includes in random.h revealed
some circular dependencies on arm64 and possibly other platforms.  This
include was added solely for the pseudo-random definitions, which have
nothing to do with the rest of the definitions in this file but are
still there for legacy reasons.

This patch moves the pseudo-random parts to linux/prandom.h and the
percpu.h include with it, which is now guarded by _LINUX_PRANDOM_H and
protected against recursive inclusion.

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.

Fixes: 1c9df907da83 ("random: fix circular include dependency on arm64 after addition of percpu.h")
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-16 16:32:59 +08:00
Documentation doc: dt: bindings: usb: dwc3: Update entries for disabling SS instances in park mode 2021-03-16 16:31:55 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch ARM: percpu.h: fix build error 2021-03-16 16:32:58 +08:00
block block: fix get_max_segment_size() overflow on 32bit arch 2021-03-16 16:32:16 +08:00
certs Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
crypto keys: asymmetric: fix error return code in software_key_query() 2021-03-16 16:32:01 +08:00
drivers random32: update the net random state on interrupt and activity 2021-03-16 16:32:58 +08:00
fs Revert "cifs: Fix the target file was deleted when rename failed." 2021-03-16 16:32:35 +08:00
include random32: move the pseudo-random 32-bit definitions to prandom.h 2021-03-16 16:32:59 +08:00
init x86: Fix early boot crash on gcc-10, third try 2021-03-16 16:28:02 +08:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel random32: update the net random state on interrupt and activity 2021-03-16 16:32:58 +08:00
lib random32: remove net_rand_state from the latent entropy gcc plugin 2021-03-16 16:32:59 +08:00
mm mm/filemap.c: don't bother dropping mmap_sem for zero size readahead 2021-03-16 16:32:44 +08:00
net Bluetooth: fix kernel oops in store_pending_adv_report 2021-03-16 16:32:53 +08:00
package config/arm64: OPEN CONFIG_PSI and phytium configs 2021-03-16 11:02:59 +08:00
samples samples/vfs: avoid warning in statx override 2021-03-16 16:31:20 +08:00
scripts scripts/gdb: fix lx-symbols 'gdb.error' while loading modules 2021-03-16 16:32:29 +08:00
security apparmor: ensure that dfa state tables have entries 2021-03-16 16:32:02 +08:00
sound ALSA: hda/hdmi: Fix keep_power assignment for non-component devices 2021-03-16 16:32:45 +08:00
tools perf bench: Share some global variables to fix build with gcc 10 2021-03-16 16:32:58 +08:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: arm64: Don't inherit exec permission across page-table levels 2021-03-16 16:32:57 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation 2021-03-16 16:32:37 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0