Skip to content

Commit b2a521d

Browse files
committed
Merge tag 'v6.1.138' into orange-pi-6.1-rk35xx
This is the 6.1.138 stable release * tag 'v6.1.138' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux: Linux 6.1.138 ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties ASoC: Use of_property_read_bool() drm/amd/display: Fix slab-use-after-free in hdcp drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp drm/amd/display: Change HDCP update sequence for DM drm/amd/display: Clean up style problems in amdgpu_dm_hdcp.c drm/amd/display: phase2 enable mst hdcp multiple displays iommu/arm-smmu-v3: Fix iommu_device_probe bug due to duplicated stream ids iommu/arm-smmu-v3: Use the new rb tree helpers dm: fix copying after src array boundaries irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode() irqchip/gic-v2m: Mark a few functions __init Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates" net: phy: microchip: force IRQ polling mode for lan88xx ARM: dts: opos6ul: add ksz8081 phy properties firmware: arm_ffa: Skip Rx buffer ownership release if not acquired firmware: arm_scmi: Balance device refcount when destroying devices Revert "x86/kexec: Allocate PGD for x86_64 transition page tables separately" sch_ets: make est_qlen_notify() idempotent sch_qfq: make qfq_qlen_notify() idempotent sch_hfsc: make hfsc_qlen_notify() idempotent sch_drr: make drr_qlen_notify() idempotent sch_htb: make htb_qlen_notify() idempotent PCI: imx6: Skip controller_id generation logic for i.MX7D md: move initialization and destruction of 'io_acct_set' to md.c net: vertexcom: mse102x: Fix RX error handling net: vertexcom: mse102x: Add range check for CMD_RTS net: vertexcom: mse102x: Fix LEN_MASK net: vertexcom: mse102x: Fix possible stuck of SPI interrupt net: hns3: defer calling ptp_clock_register() net: hns3: fixed debugfs tm_qset size net: hns3: fix an interrupt residual problem net: hns3: store rx VLAN tag offload state for VF net: fec: ERR007885 Workaround for conventional TX net: lan743x: Fix memleak issue when GSO enabled nvme-tcp: fix premature queue removal and I/O failover bnxt_en: Fix ethtool -d byte order for 32-bit values bnxt_en: Fix out-of-bound memcpy() during ethtool -w bnxt_en: Fix coredump logic to free allocated buffer net: ipv6: fix UDPv6 GSO segmentation with NAT net: dsa: felix: fix broken taprio gate states after clock jump net: dlink: Correct endianness handling of led_mode ice: Check VF VSI Pointer Value in ice_vc_add_fdir_fltr() net_sched: qfq: Fix double list add in class with netem as child qdisc net_sched: ets: Fix double list add in class with netem as child qdisc net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc net_sched: drr: Fix double list add in class with netem as child qdisc net: ethernet: mtk-star-emac: rearm interrupts in rx_poll only when advised net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll net: mscc: ocelot: delete PVID VLAN when readding it as non-PVID net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged net/mlx5: E-switch, Fix error handling for enabling roce net/mlx5: E-Switch, Initialize MAC Address for Default GID vxlan: vnifilter: Fix unlocked deletion of default FDB entry wifi: plfxlc: Remove erroneous assert in plfxlc_mac_release ASoC: soc-pcm: Fix hw_params() and DAPM widget sequence dm-bufio: don't schedule in atomic context KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop xfs: restrict when we try to align cow fork delalloc to cowextsz hints xfs: allow unlinked symlinks and dirs with zero size xfs: fix freeing speculative preallocations for preallocated files xfs: make sure sb_fdblocks is non-negative xfs: allow symlinks with short remote targets xfs: convert delayed extents to unwritten when zeroing post eof blocks xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional xfs: match lock mode in xfs_buffered_write_iomap_begin() xfs: revert commit 44af6c7e59b12 xfs: validate recovered name buffers when recovering xattr items xfs: check opcode and iovec count match in xlog_recover_attri_commit_pass2 xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery xfs: remove a racy if_bytes check in xfs_reflink_end_cow_extent xfs: fix xfs_bmap_add_extent_delay_real for partial conversions xfs: fix error returns from xfs_bmapi_write tracing: Fix oob write in trace_seq_to_buffer() cpufreq: Fix setting policy limits when frequency tables are used cpufreq: Avoid using inconsistent policy->min and policy->max ksmbd: fix use-after-free in kerberos authentication platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug iommu/vt-d: Apply quirk_iommu_igfx for 8086:0044 (QM57/QS57) iommu/amd: Fix potential buffer overflow in parse_ivrs_acpihid dm: always update the array size in realloc_argv on success dm-integrity: fix a warning on invalid table line wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage() mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value. parisc: Fix double SIGFPE crash arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays i2c: imx-lpi2c: Fix clock count when probe defers EDAC/altera: Set DDR and SDMMC interrupt mask before registration EDAC/altera: Test the correct error reg offset drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill() ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset Revert "rndis_host: Flag RNDIS modems as WWAN devices" Signed-off-by: Khusika Dhamar Gusti <[email protected]>
2 parents 9715ddc + 02b72cc commit b2a521d

File tree

101 files changed

+1467
-837
lines changed

Some content is hidden

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

101 files changed

+1467
-837
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 = 1
4-
SUBLEVEL = 137
4+
SUBLEVEL = 138
55
EXTRAVERSION =
66
NAME = Curry Ramen
77

arch/arm/boot/dts/imx6ul-imx6ull-opos6ul.dtsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
reg = <1>;
4141
interrupt-parent = <&gpio4>;
4242
interrupts = <16 IRQ_TYPE_LEVEL_LOW>;
43+
micrel,led-mode = <1>;
44+
clocks = <&clks IMX6UL_CLK_ENET_REF>;
45+
clock-names = "rmii-ref";
4346
status = "okay";
4447
};
4548
};

arch/arm64/kernel/proton-pack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,10 +891,12 @@ static u8 spectre_bhb_loop_affected(void)
891891
static const struct midr_range spectre_bhb_k132_list[] = {
892892
MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
893893
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
894+
{},
894895
};
895896
static const struct midr_range spectre_bhb_k38_list[] = {
896897
MIDR_ALL_VERSIONS(MIDR_CORTEX_A715),
897898
MIDR_ALL_VERSIONS(MIDR_CORTEX_A720),
899+
{},
898900
};
899901
static const struct midr_range spectre_bhb_k32_list[] = {
900902
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),

arch/parisc/math-emu/driver.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,19 @@ handle_fpe(struct pt_regs *regs)
103103

104104
memcpy(regs->fr, frcopy, sizeof regs->fr);
105105
if (signalcode != 0) {
106-
force_sig_fault(signalcode >> 24, signalcode & 0xffffff,
107-
(void __user *) regs->iaoq[0]);
108-
return -1;
106+
int sig = signalcode >> 24;
107+
108+
if (sig == SIGFPE) {
109+
/*
110+
* Clear floating point trap bit to avoid trapping
111+
* again on the first floating-point instruction in
112+
* the userspace signal handler.
113+
*/
114+
regs->fr[0] &= ~(1ULL << 38);
115+
}
116+
force_sig_fault(sig, signalcode & 0xffffff,
117+
(void __user *) regs->iaoq[0]);
118+
return -1;
109119
}
110120

111121
return signalcode ? -1 : 0;

arch/x86/events/intel/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4177,7 +4177,7 @@ static struct perf_guest_switch_msr *intel_guest_get_msrs(int *nr, void *data)
41774177
arr[pebs_enable] = (struct perf_guest_switch_msr){
41784178
.msr = MSR_IA32_PEBS_ENABLE,
41794179
.host = cpuc->pebs_enabled & ~cpuc->intel_ctrl_guest_mask,
4180-
.guest = pebs_mask & ~cpuc->intel_ctrl_host_mask,
4180+
.guest = pebs_mask & ~cpuc->intel_ctrl_host_mask & kvm_pmu->pebs_enable,
41814181
};
41824182

41834183
if (arr[pebs_enable].host) {

arch/x86/include/asm/kexec.h

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# define PAGES_NR 4
1717
#endif
1818

19-
# define KEXEC_CONTROL_PAGE_SIZE 4096
2019
# define KEXEC_CONTROL_CODE_MAX_SIZE 2048
2120

2221
#ifndef __ASSEMBLY__
@@ -45,6 +44,7 @@ struct kimage;
4544
/* Maximum address we can use for the control code buffer */
4645
# define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
4746

47+
# define KEXEC_CONTROL_PAGE_SIZE 4096
4848

4949
/* The native architecture */
5050
# define KEXEC_ARCH KEXEC_ARCH_386
@@ -59,6 +59,9 @@ struct kimage;
5959
/* Maximum address we can use for the control pages */
6060
# define KEXEC_CONTROL_MEMORY_LIMIT (MAXMEM-1)
6161

62+
/* Allocate one page for the pdp and the second for the code */
63+
# define KEXEC_CONTROL_PAGE_SIZE (4096UL + 4096UL)
64+
6265
/* The native architecture */
6366
# define KEXEC_ARCH KEXEC_ARCH_X86_64
6467
#endif
@@ -143,19 +146,6 @@ struct kimage_arch {
143146
};
144147
#else
145148
struct kimage_arch {
146-
/*
147-
* This is a kimage control page, as it must not overlap with either
148-
* source or destination address ranges.
149-
*/
150-
pgd_t *pgd;
151-
/*
152-
* The virtual mapping of the control code page itself is used only
153-
* during the transition, while the current kernel's pages are all
154-
* in place. Thus the intermediate page table pages used to map it
155-
* are not control pages, but instead just normal pages obtained
156-
* with get_zeroed_page(). And have to be tracked (below) so that
157-
* they can be freed.
158-
*/
159149
p4d_t *p4d;
160150
pud_t *pud;
161151
pmd_t *pmd;

arch/x86/include/asm/kvm-x86-ops.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ KVM_X86_OP(set_idt)
4747
KVM_X86_OP(get_gdt)
4848
KVM_X86_OP(set_gdt)
4949
KVM_X86_OP(sync_dirty_debug_regs)
50+
KVM_X86_OP(set_dr6)
5051
KVM_X86_OP(set_dr7)
5152
KVM_X86_OP(cache_reg)
5253
KVM_X86_OP(get_rflags)

arch/x86/include/asm/kvm_host.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,7 @@ struct kvm_x86_ops {
14991499
void (*get_gdt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt);
15001500
void (*set_gdt)(struct kvm_vcpu *vcpu, struct desc_ptr *dt);
15011501
void (*sync_dirty_debug_regs)(struct kvm_vcpu *vcpu);
1502+
void (*set_dr6)(struct kvm_vcpu *vcpu, unsigned long value);
15021503
void (*set_dr7)(struct kvm_vcpu *vcpu, unsigned long value);
15031504
void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg);
15041505
unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);

arch/x86/kernel/machine_kexec_64.c

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ static void free_transition_pgtable(struct kimage *image)
149149
image->arch.pte = NULL;
150150
}
151151

152-
static int init_transition_pgtable(struct kimage *image, pgd_t *pgd,
153-
unsigned long control_page)
152+
static int init_transition_pgtable(struct kimage *image, pgd_t *pgd)
154153
{
155154
pgprot_t prot = PAGE_KERNEL_EXEC_NOENC;
156155
unsigned long vaddr, paddr;
@@ -161,7 +160,7 @@ static int init_transition_pgtable(struct kimage *image, pgd_t *pgd,
161160
pte_t *pte;
162161

163162
vaddr = (unsigned long)relocate_kernel;
164-
paddr = control_page;
163+
paddr = __pa(page_address(image->control_code_page)+PAGE_SIZE);
165164
pgd += pgd_index(vaddr);
166165
if (!pgd_present(*pgd)) {
167166
p4d = (p4d_t *)get_zeroed_page(GFP_KERNEL);
@@ -220,7 +219,7 @@ static void *alloc_pgt_page(void *data)
220219
return p;
221220
}
222221

223-
static int init_pgtable(struct kimage *image, unsigned long control_page)
222+
static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
224223
{
225224
struct x86_mapping_info info = {
226225
.alloc_pgt_page = alloc_pgt_page,
@@ -229,12 +228,12 @@ static int init_pgtable(struct kimage *image, unsigned long control_page)
229228
.kernpg_flag = _KERNPG_TABLE_NOENC,
230229
};
231230
unsigned long mstart, mend;
231+
pgd_t *level4p;
232232
int result;
233233
int i;
234234

235-
image->arch.pgd = alloc_pgt_page(image);
236-
if (!image->arch.pgd)
237-
return -ENOMEM;
235+
level4p = (pgd_t *)__va(start_pgtable);
236+
clear_page(level4p);
238237

239238
if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
240239
info.page_flag |= _PAGE_ENC;
@@ -248,8 +247,8 @@ static int init_pgtable(struct kimage *image, unsigned long control_page)
248247
mstart = pfn_mapped[i].start << PAGE_SHIFT;
249248
mend = pfn_mapped[i].end << PAGE_SHIFT;
250249

251-
result = kernel_ident_mapping_init(&info, image->arch.pgd,
252-
mstart, mend);
250+
result = kernel_ident_mapping_init(&info,
251+
level4p, mstart, mend);
253252
if (result)
254253
return result;
255254
}
@@ -264,8 +263,8 @@ static int init_pgtable(struct kimage *image, unsigned long control_page)
264263
mstart = image->segment[i].mem;
265264
mend = mstart + image->segment[i].memsz;
266265

267-
result = kernel_ident_mapping_init(&info, image->arch.pgd,
268-
mstart, mend);
266+
result = kernel_ident_mapping_init(&info,
267+
level4p, mstart, mend);
269268

270269
if (result)
271270
return result;
@@ -275,19 +274,15 @@ static int init_pgtable(struct kimage *image, unsigned long control_page)
275274
* Prepare EFI systab and ACPI tables for kexec kernel since they are
276275
* not covered by pfn_mapped.
277276
*/
278-
result = map_efi_systab(&info, image->arch.pgd);
277+
result = map_efi_systab(&info, level4p);
279278
if (result)
280279
return result;
281280

282-
result = map_acpi_tables(&info, image->arch.pgd);
281+
result = map_acpi_tables(&info, level4p);
283282
if (result)
284283
return result;
285284

286-
/*
287-
* This must be last because the intermediate page table pages it
288-
* allocates will not be control pages and may overlap the image.
289-
*/
290-
return init_transition_pgtable(image, image->arch.pgd, control_page);
285+
return init_transition_pgtable(image, level4p);
291286
}
292287

293288
static void load_segments(void)
@@ -304,14 +299,14 @@ static void load_segments(void)
304299

305300
int machine_kexec_prepare(struct kimage *image)
306301
{
307-
unsigned long control_page;
302+
unsigned long start_pgtable;
308303
int result;
309304

310305
/* Calculate the offsets */
311-
control_page = page_to_pfn(image->control_code_page) << PAGE_SHIFT;
306+
start_pgtable = page_to_pfn(image->control_code_page) << PAGE_SHIFT;
312307

313308
/* Setup the identity mapped 64bit page table */
314-
result = init_pgtable(image, control_page);
309+
result = init_pgtable(image, start_pgtable);
315310
if (result)
316311
return result;
317312

@@ -358,12 +353,13 @@ void machine_kexec(struct kimage *image)
358353
#endif
359354
}
360355

361-
control_page = page_address(image->control_code_page);
356+
control_page = page_address(image->control_code_page) + PAGE_SIZE;
362357
__memcpy(control_page, relocate_kernel, KEXEC_CONTROL_CODE_MAX_SIZE);
363358

364359
page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page);
365360
page_list[VA_CONTROL_PAGE] = (unsigned long)control_page;
366-
page_list[PA_TABLE_PAGE] = (unsigned long)__pa(image->arch.pgd);
361+
page_list[PA_TABLE_PAGE] =
362+
(unsigned long)__pa(page_address(image->control_code_page));
367363

368364
if (image->type == KEXEC_TYPE_DEFAULT)
369365
page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page)
@@ -582,7 +578,8 @@ static void kexec_mark_crashkres(bool protect)
582578

583579
/* Don't touch the control code page used in crash_kexec().*/
584580
control = PFN_PHYS(page_to_pfn(kexec_crash_image->control_code_page));
585-
kexec_mark_range(crashk_res.start, control - 1, protect);
581+
/* Control code page is located in the 2nd page. */
582+
kexec_mark_range(crashk_res.start, control + PAGE_SIZE - 1, protect);
586583
control += KEXEC_CONTROL_PAGE_SIZE;
587584
kexec_mark_range(control, crashk_res.end, protect);
588585
}

arch/x86/kvm/svm/svm.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,11 +1920,11 @@ static void new_asid(struct vcpu_svm *svm, struct svm_cpu_data *sd)
19201920
svm->asid = sd->next_asid++;
19211921
}
19221922

1923-
static void svm_set_dr6(struct vcpu_svm *svm, unsigned long value)
1923+
static void svm_set_dr6(struct kvm_vcpu *vcpu, unsigned long value)
19241924
{
1925-
struct vmcb *vmcb = svm->vmcb;
1925+
struct vmcb *vmcb = to_svm(vcpu)->vmcb;
19261926

1927-
if (svm->vcpu.arch.guest_state_protected)
1927+
if (vcpu->arch.guest_state_protected)
19281928
return;
19291929

19301930
if (unlikely(value != vmcb->save.dr6)) {
@@ -4035,10 +4035,8 @@ static __no_kcsan fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)
40354035
* Run with all-zero DR6 unless needed, so that we can get the exact cause
40364036
* of a #DB.
40374037
*/
4038-
if (unlikely(vcpu->arch.switch_db_regs & KVM_DEBUGREG_WONT_EXIT))
4039-
svm_set_dr6(svm, vcpu->arch.dr6);
4040-
else
4041-
svm_set_dr6(svm, DR6_ACTIVE_LOW);
4038+
if (likely(!(vcpu->arch.switch_db_regs & KVM_DEBUGREG_WONT_EXIT)))
4039+
svm_set_dr6(vcpu, DR6_ACTIVE_LOW);
40424040

40434041
clgi();
40444042
kvm_load_guest_xsave_state(vcpu);
@@ -4807,6 +4805,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
48074805
.set_idt = svm_set_idt,
48084806
.get_gdt = svm_get_gdt,
48094807
.set_gdt = svm_set_gdt,
4808+
.set_dr6 = svm_set_dr6,
48104809
.set_dr7 = svm_set_dr7,
48114810
.sync_dirty_debug_regs = svm_sync_dirty_debug_regs,
48124811
.cache_reg = svm_cache_reg,

0 commit comments

Comments
 (0)