Skip to content

Commit e080cf3

Browse files
committed
Merge tag 'v6.1.140' into orange-pi-6.1-rk35xx
This is the 6.1.140 stable release * tag 'v6.1.140' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux: Linux 6.1.140 x86/modules: Set VM_FLUSH_RESET_PERMS in module_alloc() drm/amdgpu: fix pm notifier handling spi: cadence-qspi: fix pointer reference in runtime PM hooks ipv4: Fix uninit-value access in __ip_make_skb() ipv6: Fix potential uninit-value access in __ip6_make_skb() bnxt_en: Fix receive ring space parameters when XDP is active platform/x86/amd/pmc: Only disable IRQ1 wakeup where i8042 actually enabled it arm64/sme: Always exit sme_alloc() early with existing storage netfilter: nf_tables: do not defer rule destruction via call_rcu netfilter: nf_tables: wait for rcu grace period on net_device removal netfilter: nf_tables: pass nft_chain to destroy function, not nft_ctx btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info() sctp: add mutual exclusion in proc_sctp_do_udp_port() hwpoison, memory_hotplug: lock folio before unmap hwpoisoned folio LoongArch: Explicitly specify code model in Makefile bpf, arm64: Fix address emission with tag-based KASAN enabled bpf, arm64: Fix trampoline for BPF_TRAMP_F_CALL_ORIG riscv: mm: Fix the out of bound issue of vmemmap address mm/vmscan: fix a bug calling wakeup_kswapd() with a wrong zone index selftests/mm: compaction_test: support platform with huge mount of memory usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control() usb: typec: fix potential array underflow in ucsi_ccg_sync_control() usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group usb: typec: ucsi: displayport: Fix deadlock dmaengine: idxd: fix memory leak in error handling path of idxd_pci_probe dmaengine: idxd: fix memory leak in error handling path of idxd_alloc dmaengine: idxd: Add missing idxd cleanup to fix memory leak in remove call dmaengine: idxd: Add missing cleanups in cleanup internals dmaengine: idxd: Add missing cleanup for early error out in idxd_setup_internals dmaengine: idxd: fix memory leak in error handling path of idxd_setup_groups dmaengine: idxd: fix memory leak in error handling path of idxd_setup_engines dmaengine: idxd: fix memory leak in error handling path of idxd_setup_wqs dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy dmaengine: ti: k3-udma: Add missing locking net: qede: Initialize qede_ll_ops with designated initializer wifi: mt76: disable napi on driver removal smb: client: fix memory leak during error handling for POSIX mkdir scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer phy: renesas: rcar-gen3-usb2: Set timing registers only once phy: renesas: rcar-gen3-usb2: Fix role detection on unbind/bind phy: Fix error handling in tegra_xusb_port_init tracing: samples: Initialize trace_array_printk() with the correct function ftrace: Fix preemption accounting for stacktrace filter command ftrace: Fix preemption accounting for stacktrace trigger command Drivers: hv: vmbus: Remove vmbus_sendpacket_pagebuffer() Drivers: hv: Allow vmbus_sendpacket_mpb_desc() to create multiple ranges hv_netvsc: Remove rmsg_pgcnt hv_netvsc: Preserve contiguous PFN grouping in the page buffer array hv_netvsc: Use vmbus_sendpacket_mpb_desc() to send VMBus messages dma-buf: insert memory barrier before updating num_fences ALSA: usb-audio: Add sample rate quirk for Microdia JP001 USB Camera ALSA: usb-audio: Add sample rate quirk for Audioengine D1 ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2() ACPI: PPTT: Fix processor subtable walk drm/amd/display: Avoid flooding unnecessary info messages drm/amd/display: Correct the reply value when AUX write incomplete btrfs: fix discard worker infinite loop after disabling discard LoongArch: Fix MAX_REG_OFFSET calculation dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" NFSv4/pnfs: Reset the layout state after a layoutreturn net/tls: fix kernel panic when alloc_page failed octeontx2-pf: macsec: Fix incorrect max transmit size in TX secy regulator: max20086: fix invalid memory access qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd() net/mlx5e: Disable MACsec offload for uplink representor profile ALSA: sh: SND_AICA should depend on SH_DMA_API nvme-pci: acquire cq_poll_lock in nvme_poll_irqdisable nvme-pci: make nvme_pci_npages_prp() __always_inline net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING net: cadence: macb: Fix a possible deadlock in macb_halt_tx. net: mctp: Ensure keys maintain only one ref to corresponding dev net_sched: Flush gso_skb list too during ->change() spi: loopback-test: Do not split 1024-byte hexdumps nfs: handle failure of nfs_get_lock_context in unlock path HID: uclogic: Add NULL check in uclogic_input_configured() HID: thrustmaster: fix memory leak in thrustmaster_interrupts() RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug clocksource/i8253: Use raw_spinlock_irqsave() in clockevent_i8253_disable() iio: chemical: sps30: use aligned_s64 for timestamp iio: adc: ad7768-1: Fix insufficient alignment of timestamp. Revert "drm/amd: Stop evicting resources on APUs in suspend" drm/amd: Add Suspend/Hibernate notification callback support drm/amdgpu: trigger flr_work if reading pf2vf data failed drm/amdgpu: Fix the runtime resume failure issue drm/amd: Stop evicting resources on APUs in suspend iio: adc: ad7266: Fix potential timestamp alignment issue. tpm: tis: Double the timeout B to 4s tracing: probes: Fix a possible race in trace_probe_log APIs platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection binfmt_elf: Move brk for static PIE even if ASLR disabled binfmt_elf: Honor PT_LOAD alignment for static PIE binfmt_elf: Calculate total_size earlier selftests/exec: Build both static and non-static load_address tests binfmt_elf: Leave a gap between .bss and brk selftests/exec: load_address: conform test to TAP format output binfmt_elf: elf_bss no longer used by load_elf_binary() binfmt_elf: Support segments with 0 filesz and misaligned starts binfmt: Fix whitespace issues Signed-off-by: Khusika Dhamar Gusti <[email protected]>
2 parents 187e076 + da3c517 commit e080cf3

File tree

106 files changed

+938
-533
lines changed

Some content is hidden

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

106 files changed

+938
-533
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 = 139
4+
SUBLEVEL = 140
55
EXTRAVERSION =
66
NAME = Curry Ramen
77

arch/arm64/kernel/fpsimd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,8 +1259,10 @@ void fpsimd_release_task(struct task_struct *dead_task)
12591259
*/
12601260
void sme_alloc(struct task_struct *task, bool flush)
12611261
{
1262-
if (task->thread.za_state && flush) {
1263-
memset(task->thread.za_state, 0, za_state_size(task));
1262+
if (task->thread.za_state) {
1263+
if (flush)
1264+
memset(task->thread.za_state, 0,
1265+
za_state_size(task));
12641266
return;
12651267
}
12661268

arch/arm64/net/bpf_jit_comp.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,11 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
19421942
emit(A64_STR64I(A64_R(20), A64_SP, regs_off + 8), ctx);
19431943

19441944
if (flags & BPF_TRAMP_F_CALL_ORIG) {
1945-
emit_addr_mov_i64(A64_R(0), (const u64)im, ctx);
1945+
/* for the first pass, assume the worst case */
1946+
if (!ctx->image)
1947+
ctx->idx += 4;
1948+
else
1949+
emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
19461950
emit_call((const u64)__bpf_tramp_enter, ctx);
19471951
}
19481952

@@ -1986,7 +1990,11 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
19861990

19871991
if (flags & BPF_TRAMP_F_CALL_ORIG) {
19881992
im->ip_epilogue = ctx->image + ctx->idx;
1989-
emit_addr_mov_i64(A64_R(0), (const u64)im, ctx);
1993+
/* for the first pass, assume the worst case */
1994+
if (!ctx->image)
1995+
ctx->idx += 4;
1996+
else
1997+
emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
19901998
emit_call((const u64)__bpf_tramp_exit, ctx);
19911999
}
19922000

arch/loongarch/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ endif
3838

3939
ifdef CONFIG_64BIT
4040
ld-emul = $(64bit-emul)
41-
cflags-y += -mabi=lp64s
41+
cflags-y += -mabi=lp64s -mcmodel=normal
4242
endif
4343

4444
cflags-y += -pipe -msoft-float

arch/loongarch/include/asm/ptrace.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long v
5454

5555
/* Query offset/name of register from its name/offset */
5656
extern int regs_query_register_offset(const char *name);
57-
#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
57+
#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
5858

5959
/**
6060
* regs_get_register() - get register value from its offset

arch/riscv/include/asm/page.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ struct kernel_mapping {
115115

116116
extern struct kernel_mapping kernel_map;
117117
extern phys_addr_t phys_ram_base;
118+
extern unsigned long vmemmap_start_pfn;
118119

119120
#define is_kernel_mapping(x) \
120121
((x) >= kernel_map.virt_addr && (x) < (kernel_map.virt_addr + kernel_map.size))

arch/riscv/include/asm/pgtable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
* Define vmemmap for pfn_to_page & page_to_pfn calls. Needed if kernel
8080
* is configured with CONFIG_SPARSEMEM_VMEMMAP enabled.
8181
*/
82-
#define vmemmap ((struct page *)VMEMMAP_START - (phys_ram_base >> PAGE_SHIFT))
82+
#define vmemmap ((struct page *)VMEMMAP_START - vmemmap_start_pfn)
8383

8484
#define PCI_IO_SIZE SZ_16M
8585
#define PCI_IO_END VMEMMAP_START

arch/riscv/mm/init.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <linux/hugetlb.h>
2323

2424
#include <asm/fixmap.h>
25+
#include <asm/sparsemem.h>
2526
#include <asm/tlbflush.h>
2627
#include <asm/sections.h>
2728
#include <asm/soc.h>
@@ -52,6 +53,13 @@ EXPORT_SYMBOL(pgtable_l5_enabled);
5253
phys_addr_t phys_ram_base __ro_after_init;
5354
EXPORT_SYMBOL(phys_ram_base);
5455

56+
#ifdef CONFIG_SPARSEMEM_VMEMMAP
57+
#define VMEMMAP_ADDR_ALIGN (1ULL << SECTION_SIZE_BITS)
58+
59+
unsigned long vmemmap_start_pfn __ro_after_init;
60+
EXPORT_SYMBOL(vmemmap_start_pfn);
61+
#endif
62+
5563
unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]
5664
__page_aligned_bss;
5765
EXPORT_SYMBOL(empty_zero_page);
@@ -210,8 +218,12 @@ static void __init setup_bootmem(void)
210218
memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
211219

212220
phys_ram_end = memblock_end_of_DRAM();
213-
if (!IS_ENABLED(CONFIG_XIP_KERNEL))
221+
if (!IS_ENABLED(CONFIG_XIP_KERNEL)) {
214222
phys_ram_base = memblock_start_of_DRAM();
223+
#ifdef CONFIG_SPARSEMEM_VMEMMAP
224+
vmemmap_start_pfn = round_down(phys_ram_base, VMEMMAP_ADDR_ALIGN) >> PAGE_SHIFT;
225+
#endif
226+
}
215227
/*
216228
* Reserve physical address space that would be mapped to virtual
217229
* addresses greater than (void *)(-PAGE_SIZE) because:
@@ -946,6 +958,9 @@ asmlinkage void __init setup_vm(uintptr_t dtb_pa)
946958
kernel_map.xiprom_sz = (uintptr_t)(&_exiprom) - (uintptr_t)(&_xiprom);
947959

948960
phys_ram_base = CONFIG_PHYS_RAM_BASE;
961+
#ifdef CONFIG_SPARSEMEM_VMEMMAP
962+
vmemmap_start_pfn = round_down(phys_ram_base, VMEMMAP_ADDR_ALIGN) >> PAGE_SHIFT;
963+
#endif
949964
kernel_map.phys_addr = (uintptr_t)CONFIG_PHYS_RAM_BASE;
950965
kernel_map.size = (uintptr_t)(&_end) - (uintptr_t)(&_start);
951966

arch/x86/kernel/ftrace.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,6 @@ create_trampoline(struct ftrace_ops *ops, unsigned int *tramp_size)
415415
/* ALLOC_TRAMP flags lets us know we created it */
416416
ops->flags |= FTRACE_OPS_FL_ALLOC_TRAMP;
417417

418-
set_vm_flush_reset_perms(trampoline);
419-
420418
if (likely(system_state != SYSTEM_BOOTING))
421419
set_memory_ro((unsigned long)trampoline, npages);
422420
set_memory_x((unsigned long)trampoline, npages);

arch/x86/kernel/kprobes/core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ void *alloc_insn_page(void)
427427
if (!page)
428428
return NULL;
429429

430-
set_vm_flush_reset_perms(page);
431430
/*
432431
* First make the page read-only, and only then make it executable to
433432
* prevent it from being W+X in between.

0 commit comments

Comments
 (0)