Go to file
Jason A. Donenfeld 7f576b2593 random: add helpers for random numbers with given floor or range
Now that we have get_random_u32_below(), it's nearly trivial to make
inline helpers to compute get_random_u32_above() and
get_random_u32_inclusive(), which will help clean up open coded loops
and manual computations throughout the tree.

One snag is that in order to make get_random_u32_inclusive() operate on
closed intervals, we have to do some (unlikely) special case handling if
get_random_u32_inclusive(0, U32_MAX) is called. The least expensive way
of doing this is actually to adjust the slowpath of
get_random_u32_below() to have its undefined 0 result just return the
output of get_random_u32(). We can make this basically free by calling
get_random_u32() before the branch, so that the branch latency gets
interleaved.

Cc: stable@vger.kernel.org # to ease future backports that use this api
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-11-18 02:15:12 +01:00
Documentation 22 hotfixes. 8 are cc:stable and the remainder address issues which were 2022-11-11 17:18:42 -08:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
arch - fix jump label branch range check 2022-11-13 07:57:33 -08:00
block block-6.1-2022-11-11 2022-11-11 14:08:30 -08:00
certs certs: make system keyring depend on built-in x509 parser 2022-09-24 04:31:18 +09:00
crypto treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
drivers random: add helpers for random numbers with given floor or range 2022-11-18 02:15:12 +01:00
fs 22 hotfixes. 8 are cc:stable and the remainder address issues which were 2022-11-11 17:18:42 -08:00
include random: add helpers for random numbers with given floor or range 2022-11-18 02:15:12 +01:00
init init: Kconfig: fix spelling mistake "satify" -> "satisfy" 2022-10-20 21:27:22 -07:00
io_uring io_uring/poll: lockdep annote io_poll_req_insert_locked 2022-11-11 09:59:27 -07:00
ipc ipc/msg.c: fix percpu_counter use after free 2022-10-28 13:37:22 -07:00
kernel kcsan: remove rng selftest 2022-11-17 17:36:47 +01:00
lib maple_tree: don't set a new maximum on the node when not reusing nodes 2022-11-08 15:57:25 -08:00
mm 22 hotfixes. 8 are cc:stable and the remainder address issues which were 2022-11-11 17:18:42 -08:00
net mctp: Fix an error handling path in mctp_init() 2022-11-09 19:26:08 -08:00
rust Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
samples VFIO updates for v6.1-rc1 2022-10-12 14:46:48 -07:00
scripts s390 updates for 6.1-rc5 2022-11-11 11:49:20 -08:00
security lsm/stable-6.1 PR 20221031 2022-10-31 12:09:42 -07:00
sound ALSA: memalloc: Try dma_alloc_noncontiguous() at first 2022-11-12 09:48:51 +01:00
tools 22 hotfixes. 8 are cc:stable and the remainder address issues which were 2022-11-11 17:18:42 -08:00
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file 2022-10-03 14:21:44 -07:00
virt Merge tag 'kvmarm-fixes-6.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD 2022-11-06 03:30:49 -05:00
.clang-format PCI/DOE: Add DOE mailbox support functions 2022-07-19 15:38:04 -07:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes
.gitignore Kbuild: add Rust support 2022-09-28 09:02:20 +02:00
.mailmap mailmap: update email for Qais Yousef 2022-10-20 21:27:21 -07:00
.rustfmt.toml rust: add `.rustfmt.toml` 2022-09-28 09:02:20 +02:00
COPYING
CREDITS MAINTAINERS: Move Vivien to CREDITS 2022-11-10 13:53:53 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS hyperv-fixes for v6.1-rc5 2022-11-11 09:24:03 -08:00
Makefile Linux 6.1-rc5 2022-11-13 13:12:55 -08:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.