Skip to content

Commit 4b82acb

Browse files
committed
Merge tag 'v5.4.132' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-5.4.y
This is the 5.4.132 stable release Change-Id: I7a6e893730d6f9ec4ed1dcbfa32dd8f1f2a31604
2 parents 136d4a8 + 7c76bd6 commit 4b82acb

File tree

379 files changed

+2313
-1243
lines changed

Some content is hidden

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

379 files changed

+2313
-1243
lines changed

Documentation/ABI/testing/evm

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,30 @@ Description:
4242
modification of EVM-protected metadata and
4343
disable all further modification of policy
4444

45-
Note that once a key has been loaded, it will no longer be
46-
possible to enable metadata modification.
45+
Echoing a value is additive, the new value is added to the
46+
existing initialization flags.
47+
48+
For example, after::
49+
50+
echo 2 ><securityfs>/evm
51+
52+
another echo can be performed::
53+
54+
echo 1 ><securityfs>/evm
55+
56+
and the resulting value will be 3.
57+
58+
Note that once an HMAC key has been loaded, it will no longer
59+
be possible to enable metadata modification. Signaling that an
60+
HMAC key has been loaded will clear the corresponding flag.
61+
For example, if the current value is 6 (2 and 4 set)::
62+
63+
echo 1 ><securityfs>/evm
64+
65+
will set the new value to 3 (4 cleared).
66+
67+
Loading an HMAC key is the only way to disable metadata
68+
modification.
4769

4870
Until key loading has been signaled EVM can not create
4971
or validate the 'security.evm' xattr, but returns

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,12 @@
567567
loops can be debugged more effectively on production
568568
systems.
569569

570+
clocksource.max_cswd_read_retries= [KNL]
571+
Number of clocksource_watchdog() retries due to
572+
external delays before the clock will be marked
573+
unstable. Defaults to three retries, that is,
574+
four attempts to read the clock under test.
575+
570576
clearcpuid=BITNUM[,BITNUM...] [X86]
571577
Disable CPUID feature X for the kernel. See
572578
arch/x86/include/asm/cpufeatures.h for the valid bit

Documentation/hwmon/max31790.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Sysfs entries
3838
fan[1-12]_input RO fan tachometer speed in RPM
3939
fan[1-12]_fault RO fan experienced fault
4040
fan[1-6]_target RW desired fan speed in RPM
41-
pwm[1-6]_enable RW regulator mode, 0=disabled, 1=manual mode, 2=rpm mode
42-
pwm[1-6] RW fan target duty cycle (0-255)
41+
pwm[1-6]_enable RW regulator mode, 0=disabled (duty cycle=0%), 1=manual mode, 2=rpm mode
42+
pwm[1-6] RW read: current pwm duty cycle,
43+
write: target pwm duty cycle (0-255)
4344
================== === =======================================================

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 4
4-
SUBLEVEL = 131
4+
SUBLEVEL = 132
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

@@ -937,7 +937,7 @@ LDFLAGS_vmlinux += $(call ld-option, -X,)
937937
endif
938938

939939
ifeq ($(CONFIG_RELR),y)
940-
LDFLAGS_vmlinux += --pack-dyn-relocs=relr
940+
LDFLAGS_vmlinux += --pack-dyn-relocs=relr --use-android-relr-tags
941941
endif
942942

943943
# make the checker run with the right architecture

arch/arm/boot/dts/sama5d4.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@
914914
0xffffffff 0x3ffcfe7c 0x1c010101 /* pioA */
915915
0x7fffffff 0xfffccc3a 0x3f00cc3a /* pioB */
916916
0xffffffff 0x3ff83fff 0xff00ffff /* pioC */
917-
0x0003ff00 0x8002a800 0x00000000 /* pioD */
917+
0xb003ff00 0x8002a800 0x00000000 /* pioD */
918918
0xffffffff 0x7fffffff 0x76fff1bf /* pioE */
919919
>;
920920

arch/arm/kernel/perf_event_v7.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,10 @@ static inline void armv7pmu_write_counter(struct perf_event *event, u64 value)
773773
pr_err("CPU%u writing wrong counter %d\n",
774774
smp_processor_id(), idx);
775775
} else if (idx == ARMV7_IDX_CYCLE_COUNTER) {
776-
asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (value));
776+
asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" ((u32)value));
777777
} else {
778778
armv7_pmnc_select_counter(idx);
779-
asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (value));
779+
asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" ((u32)value));
780780
}
781781
}
782782

arch/arm64/boot/dts/marvell/armada-37xx.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134

135135
uart0: serial@12000 {
136136
compatible = "marvell,armada-3700-uart";
137-
reg = <0x12000 0x200>;
137+
reg = <0x12000 0x18>;
138138
clocks = <&xtalclk>;
139139
interrupts =
140140
<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,

arch/arm64/include/asm/asm-uaccess.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
.macro __uaccess_ttbr0_disable, tmp1
1616
mrs \tmp1, ttbr1_el1 // swapper_pg_dir
1717
bic \tmp1, \tmp1, #TTBR_ASID_MASK
18-
sub \tmp1, \tmp1, #RESERVED_TTBR0_SIZE // reserved_ttbr0 just before swapper_pg_dir
18+
sub \tmp1, \tmp1, #PAGE_SIZE // reserved_pg_dir just before swapper_pg_dir
1919
msr ttbr0_el1, \tmp1 // set reserved TTBR0_EL1
2020
isb
21-
add \tmp1, \tmp1, #RESERVED_TTBR0_SIZE
21+
add \tmp1, \tmp1, #PAGE_SIZE
2222
msr ttbr1_el1, \tmp1 // set reserved ASID
2323
isb
2424
.endm

arch/arm64/include/asm/kernel-pgtable.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,6 @@
8989
#define INIT_DIR_SIZE (PAGE_SIZE * EARLY_PAGES(KIMAGE_VADDR + TEXT_OFFSET, _end))
9090
#define IDMAP_DIR_SIZE (IDMAP_PGTABLE_LEVELS * PAGE_SIZE)
9191

92-
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
93-
#define RESERVED_TTBR0_SIZE (PAGE_SIZE)
94-
#else
95-
#define RESERVED_TTBR0_SIZE (0)
96-
#endif
97-
9892
/* Initial memory map size */
9993
#if ARM64_SWAPPER_USES_SECTION_MAPS
10094
#define SWAPPER_BLOCK_SHIFT SECTION_SHIFT

arch/arm64/include/asm/mmu_context.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ static inline void contextidr_thread_switch(struct task_struct *next)
3636
}
3737

3838
/*
39-
* Set TTBR0 to empty_zero_page. No translations will be possible via TTBR0.
39+
* Set TTBR0 to reserved_pg_dir. No translations will be possible via TTBR0.
4040
*/
4141
static inline void cpu_set_reserved_ttbr0(void)
4242
{
43-
unsigned long ttbr = phys_to_ttbr(__pa_symbol(empty_zero_page));
43+
unsigned long ttbr = phys_to_ttbr(__pa_symbol(reserved_pg_dir));
4444

4545
write_sysreg(ttbr, ttbr0_el1);
4646
isb();
@@ -184,9 +184,9 @@ static inline void update_saved_ttbr0(struct task_struct *tsk,
184184
return;
185185

186186
if (mm == &init_mm)
187-
ttbr = __pa_symbol(empty_zero_page);
187+
ttbr = phys_to_ttbr(__pa_symbol(reserved_pg_dir));
188188
else
189-
ttbr = virt_to_phys(mm->pgd) | ASID(mm) << 48;
189+
ttbr = phys_to_ttbr(virt_to_phys(mm->pgd)) | ASID(mm) << 48;
190190

191191
WRITE_ONCE(task_thread_info(tsk)->ttbr0, ttbr);
192192
}

arch/arm64/include/asm/pgtable.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
466466
extern pgd_t idmap_pg_dir[PTRS_PER_PGD];
467467
extern pgd_t idmap_pg_end[];
468468
extern pgd_t tramp_pg_dir[PTRS_PER_PGD];
469+
extern pgd_t reserved_pg_dir[PTRS_PER_PGD];
469470

470471
extern void set_swapper_pgd(pgd_t *pgdp, pgd_t pgd);
471472

arch/arm64/include/asm/uaccess.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ static inline void __uaccess_ttbr0_disable(void)
112112
local_irq_save(flags);
113113
ttbr = read_sysreg(ttbr1_el1);
114114
ttbr &= ~TTBR_ASID_MASK;
115-
/* reserved_ttbr0 placed before swapper_pg_dir */
116-
write_sysreg(ttbr - RESERVED_TTBR0_SIZE, ttbr0_el1);
115+
/* reserved_pg_dir placed before swapper_pg_dir */
116+
write_sysreg(ttbr - PAGE_SIZE, ttbr0_el1);
117117
isb();
118118
/* Set reserved ASID */
119119
write_sysreg(ttbr, ttbr1_el1);

arch/arm64/kernel/entry.S

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,9 +1018,10 @@ ENDPROC(el0_svc)
10181018
*/
10191019
.pushsection ".entry.tramp.text", "ax"
10201020

1021+
// Move from tramp_pg_dir to swapper_pg_dir
10211022
.macro tramp_map_kernel, tmp
10221023
mrs \tmp, ttbr1_el1
1023-
add \tmp, \tmp, #(PAGE_SIZE + RESERVED_TTBR0_SIZE)
1024+
add \tmp, \tmp, #(2 * PAGE_SIZE)
10241025
bic \tmp, \tmp, #USER_ASID_FLAG
10251026
msr ttbr1_el1, \tmp
10261027
#ifdef CONFIG_QCOM_FALKOR_ERRATUM_1003
@@ -1037,9 +1038,10 @@ alternative_else_nop_endif
10371038
#endif /* CONFIG_QCOM_FALKOR_ERRATUM_1003 */
10381039
.endm
10391040

1041+
// Move from swapper_pg_dir to tramp_pg_dir
10401042
.macro tramp_unmap_kernel, tmp
10411043
mrs \tmp, ttbr1_el1
1042-
sub \tmp, \tmp, #(PAGE_SIZE + RESERVED_TTBR0_SIZE)
1044+
sub \tmp, \tmp, #(2 * PAGE_SIZE)
10431045
orr \tmp, \tmp, #USER_ASID_FLAG
10441046
msr ttbr1_el1, \tmp
10451047
/*

arch/arm64/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ void __init setup_arch(char **cmdline_p)
356356
* faults in case uaccess_enable() is inadvertently called by the init
357357
* thread.
358358
*/
359-
init_task.thread_info.ttbr0 = __pa_symbol(empty_zero_page);
359+
init_task.thread_info.ttbr0 = phys_to_ttbr(__pa_symbol(reserved_pg_dir));
360360
#endif
361361

362362
#ifdef CONFIG_VT

arch/arm64/kernel/vmlinux.lds.S

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,11 @@ SECTIONS
157157
. += PAGE_SIZE;
158158
#endif
159159

160-
#ifdef CONFIG_ARM64_SW_TTBR0_PAN
161-
reserved_ttbr0 = .;
162-
. += RESERVED_TTBR0_SIZE;
163-
#endif
160+
reserved_pg_dir = .;
161+
. += PAGE_SIZE;
162+
164163
swapper_pg_dir = .;
165164
. += PAGE_SIZE;
166-
swapper_pg_end = .;
167165

168166
. = ALIGN(SEGMENT_ALIGN);
169167
__init_begin = .;

arch/arm64/mm/proc.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ ENDPROC(cpu_do_switch_mm)
166166
.pushsection ".idmap.text", "awx"
167167

168168
.macro __idmap_cpu_set_reserved_ttbr1, tmp1, tmp2
169-
adrp \tmp1, empty_zero_page
169+
adrp \tmp1, reserved_pg_dir
170170
phys_to_ttbr \tmp2, \tmp1
171171
offset_ttbr1 \tmp2, \tmp1
172172
msr ttbr1_el1, \tmp2

arch/ia64/kernel/mca_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ init_record_index_pools(void)
343343

344344
/* - 2 - */
345345
sect_min_size = sal_log_sect_min_sizes[0];
346-
for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++)
346+
for (i = 1; i < ARRAY_SIZE(sal_log_sect_min_sizes); i++)
347347
if (sect_min_size > sal_log_sect_min_sizes[i])
348348
sect_min_size = sal_log_sect_min_sizes[i];
349349

arch/m68k/Kconfig.machine

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ config ATARI
2323
this kernel on an Atari, say Y here and browse the material
2424
available in <file:Documentation/m68k>; otherwise say N.
2525

26+
config ATARI_KBD_CORE
27+
bool
28+
2629
config MAC
2730
bool "Macintosh support"
2831
depends on MMU

arch/mips/include/asm/highmem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extern pte_t *pkmap_page_table;
3636
* easily, subsequent pte tables have to be allocated in one physical
3737
* chunk of RAM.
3838
*/
39-
#ifdef CONFIG_PHYS_ADDR_T_64BIT
39+
#if defined(CONFIG_PHYS_ADDR_T_64BIT) || defined(CONFIG_MIPS_HUGE_TLB_SUPPORT)
4040
#define LAST_PKMAP 512
4141
#else
4242
#define LAST_PKMAP 1024

arch/powerpc/include/asm/cputhreads.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,36 @@ static inline int cpu_last_thread_sibling(int cpu)
9999
return cpu | (threads_per_core - 1);
100100
}
101101

102+
/*
103+
* tlb_thread_siblings are siblings which share a TLB. This is not
104+
* architected, is not something a hypervisor could emulate and a future
105+
* CPU may change behaviour even in compat mode, so this should only be
106+
* used on PowerNV, and only with care.
107+
*/
108+
static inline int cpu_first_tlb_thread_sibling(int cpu)
109+
{
110+
if (cpu_has_feature(CPU_FTR_ARCH_300) && (threads_per_core == 8))
111+
return cpu & ~0x6; /* Big Core */
112+
else
113+
return cpu_first_thread_sibling(cpu);
114+
}
115+
116+
static inline int cpu_last_tlb_thread_sibling(int cpu)
117+
{
118+
if (cpu_has_feature(CPU_FTR_ARCH_300) && (threads_per_core == 8))
119+
return cpu | 0x6; /* Big Core */
120+
else
121+
return cpu_last_thread_sibling(cpu);
122+
}
123+
124+
static inline int cpu_tlb_thread_sibling_step(void)
125+
{
126+
if (cpu_has_feature(CPU_FTR_ARCH_300) && (threads_per_core == 8))
127+
return 2; /* Big Core */
128+
else
129+
return 1;
130+
}
131+
102132
static inline u32 get_tensr(void)
103133
{
104134
#ifdef CONFIG_BOOKE

arch/powerpc/kernel/smp.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,8 @@ static void nmi_stop_this_cpu(struct pt_regs *regs)
588588
/*
589589
* IRQs are already hard disabled by the smp_handle_nmi_ipi.
590590
*/
591+
set_cpu_online(smp_processor_id(), false);
592+
591593
spin_begin();
592594
while (1)
593595
spin_cpu_relax();
@@ -603,6 +605,15 @@ void smp_send_stop(void)
603605
static void stop_this_cpu(void *dummy)
604606
{
605607
hard_irq_disable();
608+
609+
/*
610+
* Offlining CPUs in stop_this_cpu can result in scheduler warnings,
611+
* (see commit de6e5d38417e), but printk_safe_flush_on_panic() wants
612+
* to know other CPUs are offline before it breaks locks to flush
613+
* printk buffers, in case we panic()ed while holding the lock.
614+
*/
615+
set_cpu_online(smp_processor_id(), false);
616+
606617
spin_begin();
607618
while (1)
608619
spin_cpu_relax();

arch/powerpc/kernel/stacktrace.c

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <asm/ptrace.h>
2020
#include <asm/processor.h>
2121
#include <linux/ftrace.h>
22+
#include <linux/delay.h>
2223
#include <asm/kprobes.h>
2324

2425
#include <asm/paca.h>
@@ -230,17 +231,31 @@ static void handle_backtrace_ipi(struct pt_regs *regs)
230231

231232
static void raise_backtrace_ipi(cpumask_t *mask)
232233
{
234+
struct paca_struct *p;
233235
unsigned int cpu;
236+
u64 delay_us;
234237

235238
for_each_cpu(cpu, mask) {
236-
if (cpu == smp_processor_id())
239+
if (cpu == smp_processor_id()) {
237240
handle_backtrace_ipi(NULL);
238-
else
239-
smp_send_safe_nmi_ipi(cpu, handle_backtrace_ipi, 5 * USEC_PER_SEC);
240-
}
241+
continue;
242+
}
241243

242-
for_each_cpu(cpu, mask) {
243-
struct paca_struct *p = paca_ptrs[cpu];
244+
delay_us = 5 * USEC_PER_SEC;
245+
246+
if (smp_send_safe_nmi_ipi(cpu, handle_backtrace_ipi, delay_us)) {
247+
// Now wait up to 5s for the other CPU to do its backtrace
248+
while (cpumask_test_cpu(cpu, mask) && delay_us) {
249+
udelay(1);
250+
delay_us--;
251+
}
252+
253+
// Other CPU cleared itself from the mask
254+
if (delay_us)
255+
continue;
256+
}
257+
258+
p = paca_ptrs[cpu];
244259

245260
cpumask_clear_cpu(cpu, mask);
246261

0 commit comments

Comments
 (0)