Skip to content

Commit 8299898

Browse files
committed
Merge remote-tracking branch 'stable/linux-5.7.y' into v5.7+
2 parents 952f8de + 264e468 commit 8299898

171 files changed

Lines changed: 1259 additions & 672 deletions

File tree

Some content is hidden

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

Documentation/lzo.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,15 @@ Byte sequences
159159
distance = 16384 + (H << 14) + D
160160
state = S (copy S literals after this block)
161161
End of stream is reached if distance == 16384
162+
In version 1 only, to prevent ambiguity with the RLE case when
163+
((distance & 0x803f) == 0x803f) && (261 <= length <= 264), the
164+
compressor must not emit block copies where distance and length
165+
meet these conditions.
162166

163167
In version 1 only, this instruction is also used to encode a run of
164-
zeros if distance = 0xbfff, i.e. H = 1 and the D bits are all 1.
168+
zeros if distance = 0xbfff, i.e. H = 1 and the D bits are all 1.
165169
In this case, it is followed by a fourth byte, X.
166-
run length = ((X << 3) | (0 0 0 0 0 L L L)) + 4.
170+
run length = ((X << 3) | (0 0 0 0 0 L L L)) + 4
167171

168172
0 0 1 L L L L L (32..63)
169173
Copy of small block within 16kB distance (preferably less than 34B)

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 = 5
33
PATCHLEVEL = 7
4-
SUBLEVEL = 2
4+
SUBLEVEL = 3
55
EXTRAVERSION =
66
NAME = Kleptomaniac Octopus
77

arch/arm/boot/dts/at91-sama5d2_ptc_ek.dts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@
125125
bus-width = <8>;
126126
pinctrl-names = "default";
127127
pinctrl-0 = <&pinctrl_sdmmc0_default>;
128-
non-removable;
129-
mmc-ddr-1_8v;
130128
status = "okay";
131129
};
132130

arch/arm64/include/asm/acpi.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/efi.h>
1313
#include <linux/memblock.h>
1414
#include <linux/psci.h>
15+
#include <linux/stddef.h>
1516

1617
#include <asm/cputype.h>
1718
#include <asm/io.h>
@@ -31,14 +32,14 @@
3132
* is therefore used to delimit the MADT GICC structure minimum length
3233
* appropriately.
3334
*/
34-
#define ACPI_MADT_GICC_MIN_LENGTH ACPI_OFFSET( \
35+
#define ACPI_MADT_GICC_MIN_LENGTH offsetof( \
3536
struct acpi_madt_generic_interrupt, efficiency_class)
3637

3738
#define BAD_MADT_GICC_ENTRY(entry, end) \
3839
(!(entry) || (entry)->header.length < ACPI_MADT_GICC_MIN_LENGTH || \
3940
(unsigned long)(entry) + (entry)->header.length > (end))
4041

41-
#define ACPI_MADT_GICC_SPE (ACPI_OFFSET(struct acpi_madt_generic_interrupt, \
42+
#define ACPI_MADT_GICC_SPE (offsetof(struct acpi_madt_generic_interrupt, \
4243
spe_interrupt) + sizeof(u16))
4344

4445
/* Basic configuration for ACPI */

arch/arm64/include/asm/kvm_emulate.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ static inline void vcpu_ptrauth_disable(struct kvm_vcpu *vcpu)
112112
vcpu->arch.hcr_el2 &= ~(HCR_API | HCR_APK);
113113
}
114114

115-
static inline void vcpu_ptrauth_setup_lazy(struct kvm_vcpu *vcpu)
116-
{
117-
if (vcpu_has_ptrauth(vcpu))
118-
vcpu_ptrauth_disable(vcpu);
119-
}
120-
121115
static inline unsigned long vcpu_get_vsesr(struct kvm_vcpu *vcpu)
122116
{
123117
return vcpu->arch.vsesr_el2;

arch/arm64/include/asm/kvm_host.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,10 @@ void vcpu_write_sys_reg(struct kvm_vcpu *vcpu, u64 val, int reg);
405405
* CP14 and CP15 live in the same array, as they are backed by the
406406
* same system registers.
407407
*/
408-
#define vcpu_cp14(v,r) ((v)->arch.ctxt.copro[(r)])
409-
#define vcpu_cp15(v,r) ((v)->arch.ctxt.copro[(r)])
408+
#define CPx_BIAS IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)
409+
410+
#define vcpu_cp14(v,r) ((v)->arch.ctxt.copro[(r) ^ CPx_BIAS])
411+
#define vcpu_cp15(v,r) ((v)->arch.ctxt.copro[(r) ^ CPx_BIAS])
410412

411413
struct kvm_vm_stat {
412414
ulong remote_tlb_flush;

arch/arm64/kvm/handle_exit.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -162,31 +162,16 @@ static int handle_sve(struct kvm_vcpu *vcpu, struct kvm_run *run)
162162
return 1;
163163
}
164164

165-
#define __ptrauth_save_key(regs, key) \
166-
({ \
167-
regs[key ## KEYLO_EL1] = read_sysreg_s(SYS_ ## key ## KEYLO_EL1); \
168-
regs[key ## KEYHI_EL1] = read_sysreg_s(SYS_ ## key ## KEYHI_EL1); \
169-
})
170-
171165
/*
172166
* Handle the guest trying to use a ptrauth instruction, or trying to access a
173167
* ptrauth register.
174168
*/
175169
void kvm_arm_vcpu_ptrauth_trap(struct kvm_vcpu *vcpu)
176170
{
177-
struct kvm_cpu_context *ctxt;
178-
179-
if (vcpu_has_ptrauth(vcpu)) {
171+
if (vcpu_has_ptrauth(vcpu))
180172
vcpu_ptrauth_enable(vcpu);
181-
ctxt = vcpu->arch.host_cpu_context;
182-
__ptrauth_save_key(ctxt->sys_regs, APIA);
183-
__ptrauth_save_key(ctxt->sys_regs, APIB);
184-
__ptrauth_save_key(ctxt->sys_regs, APDA);
185-
__ptrauth_save_key(ctxt->sys_regs, APDB);
186-
__ptrauth_save_key(ctxt->sys_regs, APGA);
187-
} else {
173+
else
188174
kvm_inject_undefined(vcpu);
189-
}
190175
}
191176

192177
/*

arch/arm64/kvm/sys_regs.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,10 +1305,16 @@ static bool access_clidr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
13051305
static bool access_csselr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
13061306
const struct sys_reg_desc *r)
13071307
{
1308+
int reg = r->reg;
1309+
1310+
/* See the 32bit mapping in kvm_host.h */
1311+
if (p->is_aarch32)
1312+
reg = r->reg / 2;
1313+
13081314
if (p->is_write)
1309-
vcpu_write_sys_reg(vcpu, p->regval, r->reg);
1315+
vcpu_write_sys_reg(vcpu, p->regval, reg);
13101316
else
1311-
p->regval = vcpu_read_sys_reg(vcpu, r->reg);
1317+
p->regval = vcpu_read_sys_reg(vcpu, reg);
13121318
return true;
13131319
}
13141320

arch/mips/include/asm/kvm_host.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,12 @@ enum emulation_result {
274274
#define MIPS3_PG_SHIFT 6
275275
#define MIPS3_PG_FRAME 0x3fffffc0
276276

277+
#if defined(CONFIG_64BIT)
278+
#define VPN2_MASK GENMASK(cpu_vmbits - 1, 13)
279+
#else
277280
#define VPN2_MASK 0xffffe000
278-
#define KVM_ENTRYHI_ASID MIPS_ENTRYHI_ASID
281+
#endif
282+
#define KVM_ENTRYHI_ASID cpu_asid_mask(&boot_cpu_data)
279283
#define TLB_IS_GLOBAL(x) ((x).tlb_lo[0] & (x).tlb_lo[1] & ENTRYLO_G)
280284
#define TLB_VPN2(x) ((x).tlb_hi & VPN2_MASK)
281285
#define TLB_ASID(x) ((x).tlb_hi & KVM_ENTRYHI_ASID)

arch/powerpc/mm/ptdump/ptdump.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ struct pg_state {
6060
unsigned long start_address;
6161
unsigned long start_pa;
6262
unsigned long last_pa;
63+
unsigned long page_size;
6364
unsigned int level;
6465
u64 current_flags;
6566
bool check_wx;
@@ -157,9 +158,9 @@ static void dump_addr(struct pg_state *st, unsigned long addr)
157158
#endif
158159

159160
pt_dump_seq_printf(st->seq, REG "-" REG " ", st->start_address, addr - 1);
160-
if (st->start_pa == st->last_pa && st->start_address + PAGE_SIZE != addr) {
161+
if (st->start_pa == st->last_pa && st->start_address + st->page_size != addr) {
161162
pt_dump_seq_printf(st->seq, "[" REG "]", st->start_pa);
162-
delta = PAGE_SIZE >> 10;
163+
delta = st->page_size >> 10;
163164
} else {
164165
pt_dump_seq_printf(st->seq, " " REG " ", st->start_pa);
165166
delta = (addr - st->start_address) >> 10;
@@ -190,7 +191,7 @@ static void note_prot_wx(struct pg_state *st, unsigned long addr)
190191
}
191192

192193
static void note_page(struct pg_state *st, unsigned long addr,
193-
unsigned int level, u64 val)
194+
unsigned int level, u64 val, unsigned long page_size)
194195
{
195196
u64 flag = val & pg_level[level].mask;
196197
u64 pa = val & PTE_RPN_MASK;
@@ -202,6 +203,7 @@ static void note_page(struct pg_state *st, unsigned long addr,
202203
st->start_address = addr;
203204
st->start_pa = pa;
204205
st->last_pa = pa;
206+
st->page_size = page_size;
205207
pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name);
206208
/*
207209
* Dump the section of virtual memory when:
@@ -213,7 +215,7 @@ static void note_page(struct pg_state *st, unsigned long addr,
213215
*/
214216
} else if (flag != st->current_flags || level != st->level ||
215217
addr >= st->marker[1].start_address ||
216-
(pa != st->last_pa + PAGE_SIZE &&
218+
(pa != st->last_pa + st->page_size &&
217219
(pa != st->start_pa || st->start_pa != st->last_pa))) {
218220

219221
/* Check the PTE flags */
@@ -241,6 +243,7 @@ static void note_page(struct pg_state *st, unsigned long addr,
241243
st->start_address = addr;
242244
st->start_pa = pa;
243245
st->last_pa = pa;
246+
st->page_size = page_size;
244247
st->current_flags = flag;
245248
st->level = level;
246249
} else {
@@ -256,7 +259,7 @@ static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start)
256259

257260
for (i = 0; i < PTRS_PER_PTE; i++, pte++) {
258261
addr = start + i * PAGE_SIZE;
259-
note_page(st, addr, 4, pte_val(*pte));
262+
note_page(st, addr, 4, pte_val(*pte), PAGE_SIZE);
260263

261264
}
262265
}
@@ -273,7 +276,7 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
273276
/* pmd exists */
274277
walk_pte(st, pmd, addr);
275278
else
276-
note_page(st, addr, 3, pmd_val(*pmd));
279+
note_page(st, addr, 3, pmd_val(*pmd), PMD_SIZE);
277280
}
278281
}
279282

@@ -289,7 +292,7 @@ static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start)
289292
/* pud exists */
290293
walk_pmd(st, pud, addr);
291294
else
292-
note_page(st, addr, 2, pud_val(*pud));
295+
note_page(st, addr, 2, pud_val(*pud), PUD_SIZE);
293296
}
294297
}
295298

@@ -308,7 +311,7 @@ static void walk_pagetables(struct pg_state *st)
308311
/* pgd exists */
309312
walk_pud(st, pgd, addr);
310313
else
311-
note_page(st, addr, 1, pgd_val(*pgd));
314+
note_page(st, addr, 1, pgd_val(*pgd), PGDIR_SIZE);
312315
}
313316
}
314317

@@ -363,7 +366,7 @@ static int ptdump_show(struct seq_file *m, void *v)
363366

364367
/* Traverse kernel page tables */
365368
walk_pagetables(&st);
366-
note_page(&st, 0, 0, 0);
369+
note_page(&st, 0, 0, 0, 0);
367370
return 0;
368371
}
369372

0 commit comments

Comments
 (0)