Skip to content

Commit 015f279

Browse files
committed
Merge tag 'v4.19.249' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux into 12.1-alioth
This is the 4.19.249 stable release
2 parents 2221ffa + 6a10ec7 commit 015f279

File tree

108 files changed

+1920
-2405
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1920
-2405
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3732,6 +3732,12 @@
37323732
fully seed the kernel's CRNG. Default is controlled
37333733
by CONFIG_RANDOM_TRUST_CPU.
37343734

3735+
random.trust_bootloader={on,off}
3736+
[KNL] Enable or disable trusting the use of a
3737+
seed passed by the bootloader (if available) to
3738+
fully seed the kernel's CRNG. Default is controlled
3739+
by CONFIG_RANDOM_TRUST_BOOTLOADER.
3740+
37353741
ras=option[,option,...] [KNL] RAS-specific options
37363742

37373743
cec_disable [X86]

Documentation/sysctl/kernel.txt

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,40 @@ The kernel command line parameter printk.devkmsg= overrides this and is
850850
a one-time setting until next reboot: once set, it cannot be changed by
851851
this sysctl interface anymore.
852852

853-
==============================================================
853+
pty
854+
===
855+
856+
See Documentation/filesystems/devpts.rst.
857+
858+
859+
random
860+
======
861+
862+
This is a directory, with the following entries:
863+
864+
* ``boot_id``: a UUID generated the first time this is retrieved, and
865+
unvarying after that;
866+
867+
* ``uuid``: a UUID generated every time this is retrieved (this can
868+
thus be used to generate UUIDs at will);
869+
870+
* ``entropy_avail``: the pool's entropy count, in bits;
871+
872+
* ``poolsize``: the entropy pool size, in bits;
873+
874+
* ``urandom_min_reseed_secs``: obsolete (used to determine the minimum
875+
number of seconds between urandom pool reseeding). This file is
876+
writable for compatibility purposes, but writing to it has no effect
877+
on any RNG behavior;
878+
879+
* ``write_wakeup_threshold``: when the entropy count drops below this
880+
(as a number of bits), processes waiting to write to ``/dev/random``
881+
are woken up. This file is writable for compatibility purposes, but
882+
writing to it has no effect on any RNG behavior.
883+
854884

855-
randomize_va_space:
885+
randomize_va_space
886+
==================
856887

857888
This option can be used to select the type of process address
858889
space randomization that is used in the system, for architectures

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12280,6 +12280,7 @@ F: arch/mips/configs/generic/board-ranchu.config
1228012280

1228112281
RANDOM NUMBER DRIVER
1228212282
M: "Theodore Ts'o" <[email protected]>
12283+
M: Jason A. Donenfeld <[email protected]>
1228312284
S: Maintained
1228412285
F: drivers/char/random.c
1228512286

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 4
33
PATCHLEVEL = 19
4-
SUBLEVEL = 248
4+
SUBLEVEL = 249
55
EXTRAVERSION =
66
NAME = "People's Front"
77

arch/alpha/include/asm/timex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ static inline cycles_t get_cycles (void)
2828
__asm__ __volatile__ ("rpcc %0" : "=r"(ret));
2929
return ret;
3030
}
31+
#define get_cycles get_cycles
3132

3233
#endif

arch/arm/include/asm/timex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414

1515
typedef unsigned long cycles_t;
1616
#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
17+
#define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_entropy_fallback())
1718

1819
#endif

arch/arm64/kernel/ftrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr)
7272
{
7373
unsigned long pc = rec->ip;
7474
u32 old, new;
75-
long offset = (long)pc - (long)addr;
75+
long offset = (long)addr - (long)pc;
7676

7777
if (offset < -SZ_128M || offset >= SZ_128M) {
7878
#ifdef CONFIG_ARM64_MODULE_PLTS
@@ -151,7 +151,7 @@ int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec,
151151
unsigned long pc = rec->ip;
152152
bool validate = true;
153153
u32 old = 0, new;
154-
long offset = (long)pc - (long)addr;
154+
long offset = (long)addr - (long)pc;
155155

156156
if (offset < -SZ_128M || offset >= SZ_128M) {
157157
#ifdef CONFIG_ARM64_MODULE_PLTS

arch/ia64/include/asm/timex.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ get_cycles (void)
3939
ret = ia64_getreg(_IA64_REG_AR_ITC);
4040
return ret;
4141
}
42+
#define get_cycles get_cycles
4243

4344
extern void ia64_cpu_local_tick (void);
4445
extern unsigned long long ia64_native_sched_clock (void);

arch/m68k/include/asm/timex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static inline unsigned long random_get_entropy(void)
3535
{
3636
if (mach_random_get_entropy)
3737
return mach_random_get_entropy();
38-
return 0;
38+
return random_get_entropy_fallback();
3939
}
4040
#define random_get_entropy random_get_entropy
4141

arch/mips/include/asm/timex.h

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,24 @@ static inline cycles_t get_cycles(void)
7676
else
7777
return 0; /* no usable counter */
7878
}
79+
#define get_cycles get_cycles
7980

8081
/*
8182
* Like get_cycles - but where c0_count is not available we desperately
8283
* use c0_random in an attempt to get at least a little bit of entropy.
83-
*
84-
* R6000 and R6000A neither have a count register nor a random register.
85-
* That leaves no entropy source in the CPU itself.
8684
*/
8785
static inline unsigned long random_get_entropy(void)
8886
{
89-
unsigned int prid = read_c0_prid();
90-
unsigned int imp = prid & PRID_IMP_MASK;
87+
unsigned int c0_random;
9188

92-
if (can_use_mips_counter(prid))
89+
if (can_use_mips_counter(read_c0_prid()))
9390
return read_c0_count();
94-
else if (likely(imp != PRID_IMP_R6000 && imp != PRID_IMP_R6000A))
95-
return read_c0_random();
91+
92+
if (cpu_has_3kex)
93+
c0_random = (read_c0_random() >> 8) & 0x3f;
9694
else
97-
return 0; /* no usable register */
95+
c0_random = read_c0_random() & 0x3f;
96+
return (random_get_entropy_fallback() << 6) | (0x3f - c0_random);
9897
}
9998
#define random_get_entropy random_get_entropy
10099

0 commit comments

Comments
 (0)