Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit cb00323

Browse files
committed
Merge tag 'v6.11.5' into 6.11
This is the 6.11.5 stable release
2 parents 304e2da + 05b1367 commit cb00323

File tree

121 files changed

+858
-451
lines changed

Some content is hidden

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

121 files changed

+858
-451
lines changed

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 = 6
33
PATCHLEVEL = 11
4-
SUBLEVEL = 4
4+
SUBLEVEL = 5
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/arm64/boot/dts/marvell/cn9130-sr-som.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
};
137137

138138
cp0_mdio_pins: cp0-mdio-pins {
139-
marvell,pins = "mpp40", "mpp41";
139+
marvell,pins = "mpp0", "mpp1";
140140
marvell,function = "ge";
141141
};
142142

arch/arm64/include/asm/uprobes.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
#include <asm/insn.h>
1111
#include <asm/probes.h>
1212

13-
#define MAX_UINSN_BYTES AARCH64_INSN_SIZE
14-
1513
#define UPROBE_SWBP_INSN cpu_to_le32(BRK64_OPCODE_UPROBES)
1614
#define UPROBE_SWBP_INSN_SIZE AARCH64_INSN_SIZE
17-
#define UPROBE_XOL_SLOT_BYTES MAX_UINSN_BYTES
15+
#define UPROBE_XOL_SLOT_BYTES AARCH64_INSN_SIZE
1816

1917
typedef __le32 uprobe_opcode_t;
2018

@@ -23,8 +21,8 @@ struct arch_uprobe_task {
2321

2422
struct arch_uprobe {
2523
union {
26-
u8 insn[MAX_UINSN_BYTES];
27-
u8 ixol[MAX_UINSN_BYTES];
24+
__le32 insn;
25+
__le32 ixol;
2826
};
2927
struct arch_probe_insn api;
3028
bool simulate;

arch/arm64/kernel/probes/decode-insn.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ arm_probe_decode_insn(probe_opcode_t insn, struct arch_probe_insn *api)
9999
aarch64_insn_is_blr(insn) ||
100100
aarch64_insn_is_ret(insn)) {
101101
api->handler = simulate_br_blr_ret;
102-
} else if (aarch64_insn_is_ldr_lit(insn)) {
103-
api->handler = simulate_ldr_literal;
104-
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
105-
api->handler = simulate_ldrsw_literal;
106102
} else {
107103
/*
108104
* Instruction cannot be stepped out-of-line and we don't
@@ -140,6 +136,17 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
140136
probe_opcode_t insn = le32_to_cpu(*addr);
141137
probe_opcode_t *scan_end = NULL;
142138
unsigned long size = 0, offset = 0;
139+
struct arch_probe_insn *api = &asi->api;
140+
141+
if (aarch64_insn_is_ldr_lit(insn)) {
142+
api->handler = simulate_ldr_literal;
143+
decoded = INSN_GOOD_NO_SLOT;
144+
} else if (aarch64_insn_is_ldrsw_lit(insn)) {
145+
api->handler = simulate_ldrsw_literal;
146+
decoded = INSN_GOOD_NO_SLOT;
147+
} else {
148+
decoded = arm_probe_decode_insn(insn, &asi->api);
149+
}
143150

144151
/*
145152
* If there's a symbol defined in front of and near enough to
@@ -157,7 +164,6 @@ arm_kprobe_decode_insn(kprobe_opcode_t *addr, struct arch_specific_insn *asi)
157164
else
158165
scan_end = addr - MAX_ATOMIC_CONTEXT_SIZE;
159166
}
160-
decoded = arm_probe_decode_insn(insn, &asi->api);
161167

162168
if (decoded != INSN_REJECTED && scan_end)
163169
if (is_probed_address_atomic(addr - 1, scan_end))

arch/arm64/kernel/probes/simulate-insn.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,32 +171,28 @@ simulate_tbz_tbnz(u32 opcode, long addr, struct pt_regs *regs)
171171
void __kprobes
172172
simulate_ldr_literal(u32 opcode, long addr, struct pt_regs *regs)
173173
{
174-
u64 *load_addr;
174+
unsigned long load_addr;
175175
int xn = opcode & 0x1f;
176-
int disp;
177176

178-
disp = ldr_displacement(opcode);
179-
load_addr = (u64 *) (addr + disp);
177+
load_addr = addr + ldr_displacement(opcode);
180178

181179
if (opcode & (1 << 30)) /* x0-x30 */
182-
set_x_reg(regs, xn, *load_addr);
180+
set_x_reg(regs, xn, READ_ONCE(*(u64 *)load_addr));
183181
else /* w0-w30 */
184-
set_w_reg(regs, xn, *load_addr);
182+
set_w_reg(regs, xn, READ_ONCE(*(u32 *)load_addr));
185183

186184
instruction_pointer_set(regs, instruction_pointer(regs) + 4);
187185
}
188186

189187
void __kprobes
190188
simulate_ldrsw_literal(u32 opcode, long addr, struct pt_regs *regs)
191189
{
192-
s32 *load_addr;
190+
unsigned long load_addr;
193191
int xn = opcode & 0x1f;
194-
int disp;
195192

196-
disp = ldr_displacement(opcode);
197-
load_addr = (s32 *) (addr + disp);
193+
load_addr = addr + ldr_displacement(opcode);
198194

199-
set_x_reg(regs, xn, *load_addr);
195+
set_x_reg(regs, xn, READ_ONCE(*(s32 *)load_addr));
200196

201197
instruction_pointer_set(regs, instruction_pointer(regs) + 4);
202198
}

arch/arm64/kernel/probes/uprobes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
4242
else if (!IS_ALIGNED(addr, AARCH64_INSN_SIZE))
4343
return -EINVAL;
4444

45-
insn = *(probe_opcode_t *)(&auprobe->insn[0]);
45+
insn = le32_to_cpu(auprobe->insn);
4646

4747
switch (arm_probe_decode_insn(insn, &auprobe->api)) {
4848
case INSN_REJECTED:
@@ -108,7 +108,7 @@ bool arch_uprobe_skip_sstep(struct arch_uprobe *auprobe, struct pt_regs *regs)
108108
if (!auprobe->simulate)
109109
return false;
110110

111-
insn = *(probe_opcode_t *)(&auprobe->insn[0]);
111+
insn = le32_to_cpu(auprobe->insn);
112112
addr = instruction_pointer(regs);
113113

114114
if (auprobe->api.handler)

arch/s390/kvm/diag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int __diag_page_ref_service(struct kvm_vcpu *vcpu)
7777
vcpu->stat.instruction_diagnose_258++;
7878
if (vcpu->run->s.regs.gprs[rx] & 7)
7979
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
80-
rc = read_guest(vcpu, vcpu->run->s.regs.gprs[rx], rx, &parm, sizeof(parm));
80+
rc = read_guest_real(vcpu, vcpu->run->s.regs.gprs[rx], &parm, sizeof(parm));
8181
if (rc)
8282
return kvm_s390_inject_prog_cond(vcpu, rc);
8383
if (parm.parm_version != 2 || parm.parm_len < 5 || parm.code != 0x258)

arch/s390/kvm/gaccess.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,8 @@ static int access_guest_page(struct kvm *kvm, enum gacc_mode mode, gpa_t gpa,
828828
const gfn_t gfn = gpa_to_gfn(gpa);
829829
int rc;
830830

831+
if (!gfn_to_memslot(kvm, gfn))
832+
return PGM_ADDRESSING;
831833
if (mode == GACC_STORE)
832834
rc = kvm_write_guest_page(kvm, gfn, data, offset, len);
833835
else
@@ -985,6 +987,8 @@ int access_guest_real(struct kvm_vcpu *vcpu, unsigned long gra,
985987
gra += fragment_len;
986988
data += fragment_len;
987989
}
990+
if (rc > 0)
991+
vcpu->arch.pgm.code = rc;
988992
return rc;
989993
}
990994

arch/s390/kvm/gaccess.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,12 @@ int read_guest_abs(struct kvm_vcpu *vcpu, unsigned long gpa, void *data,
405405
* @len: number of bytes to copy
406406
*
407407
* Copy @len bytes from @data (kernel space) to @gra (guest real address).
408-
* It is up to the caller to ensure that the entire guest memory range is
409-
* valid memory before calling this function.
410408
* Guest low address and key protection are not checked.
411409
*
412-
* Returns zero on success or -EFAULT on error.
410+
* Returns zero on success, -EFAULT when copying from @data failed, or
411+
* PGM_ADRESSING in case @gra is outside a memslot. In this case, pgm check info
412+
* is also stored to allow injecting into the guest (if applicable) using
413+
* kvm_s390_inject_prog_cond().
413414
*
414415
* If an error occurs data may have been copied partially to guest memory.
415416
*/
@@ -428,11 +429,12 @@ int write_guest_real(struct kvm_vcpu *vcpu, unsigned long gra, void *data,
428429
* @len: number of bytes to copy
429430
*
430431
* Copy @len bytes from @gra (guest real address) to @data (kernel space).
431-
* It is up to the caller to ensure that the entire guest memory range is
432-
* valid memory before calling this function.
433432
* Guest key protection is not checked.
434433
*
435-
* Returns zero on success or -EFAULT on error.
434+
* Returns zero on success, -EFAULT when copying to @data failed, or
435+
* PGM_ADRESSING in case @gra is outside a memslot. In this case, pgm check info
436+
* is also stored to allow injecting into the guest (if applicable) using
437+
* kvm_s390_inject_prog_cond().
436438
*
437439
* If an error occurs data may have been copied partially to kernel space.
438440
*/

arch/x86/entry/entry.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <asm/unwind_hints.h>
1010
#include <asm/segment.h>
1111
#include <asm/cache.h>
12+
#include <asm/cpufeatures.h>
13+
#include <asm/nospec-branch.h>
1214

1315
#include "calling.h"
1416

@@ -19,6 +21,9 @@ SYM_FUNC_START(entry_ibpb)
1921
movl $PRED_CMD_IBPB, %eax
2022
xorl %edx, %edx
2123
wrmsr
24+
25+
/* Make sure IBPB clears return stack preductions too. */
26+
FILL_RETURN_BUFFER %rax, RSB_CLEAR_LOOPS, X86_BUG_IBPB_NO_RET
2227
RET
2328
SYM_FUNC_END(entry_ibpb)
2429
/* For KVM */

0 commit comments

Comments
 (0)