Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Deepin-Kernel-SIG] [Upstream] Update kernel base to 6.6.60 #465

Merged
merged 151 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
6abcd33
thermal: core: Make thermal_zone_device_unregister() return after fre…
rafaeljw Dec 8, 2023
fe9ad53
thermal: core: Rework thermal zone availability check
rafaeljw Dec 8, 2023
9fda185
thermal: core: Free tzp copy along with the thermal zone
rafaeljw Oct 3, 2024
ff1fc9f
Input: xpad - sort xpad_device by vendor and product ID
appsforartists Feb 8, 2024
1f56394
Input: xpad - add support for 8BitDo Ultimate 2C Wireless Controller
KarlK90 Oct 16, 2024
9e2c3b0
cgroup: Fix potential overflow issue when checking max_depth
Oct 12, 2024
af9bee7
spi: geni-qcom: Fix boot warning related to pm_runtime and devres
Oct 8, 2024
b85ea83
wifi: iwlegacy: Fix "field-spanning write" warning in il_enqueue_hcmd()
bwhacks Sep 11, 2024
f57414c
mac80211: MAC80211_MESSAGE_TRACING should depend on TRACING
geertu Sep 24, 2024
23eda8d
wifi: mac80211: skip non-uploaded keys in ieee80211_iter_keys
nbd168 Oct 6, 2024
ab2b5b4
wifi: ath11k: Fix invalid ring usage in full monitor mode
repk Sep 24, 2024
a7b8455
wifi: brcm80211: BRCM_TRACING should depend on TRACING
geertu Sep 24, 2024
d6a04ef
RDMA/cxgb4: Dump vendor specific QP details
rleon Oct 7, 2024
8180414
RDMA/mlx5: Round max_rd_atomic/max_dest_rd_atomic up instead of down
PatrisiousHaddad Oct 10, 2024
3ff1f70
RDMA/bnxt_re: Fix the usage of control path spin locks
selvintxavier Oct 14, 2024
7f452e0
RDMA/bnxt_re: synchronize the qp-handle table array
selvintxavier Oct 14, 2024
a76145d
wifi: iwlwifi: mvm: disconnect station vifs if recovery failed
egrumbach Jan 28, 2024
709f302
wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd()
gabayd Oct 10, 2024
ce732fc
wifi: iwlwifi: mvm: don't add default link in fw restart flow
egrumbach Oct 10, 2024
1c214d1
ASoC: cs42l51: Fix some error handling paths in cs42l51_probe()
tititiou36 Oct 26, 2024
16c9a85
macsec: Fix use-after-free while sending the offloading packet
Oct 21, 2024
f1faec8
net: stmmac: dwmac4: Fix high address display by updating reg_space[]…
Oct 21, 2024
2b95f53
net: stmmac: TSO: Fix unbalanced DMA map/unmap for non-paged SKB data
Oct 21, 2024
ffbbfc2
ipv4: ip_tunnel: Fix suspicious RCU usage warning in ip_tunnel_init_f…
idosch Oct 22, 2024
6669511
gtp: allow -1 to be specified as file description from userspace
ummakynes Oct 22, 2024
ff5efcd
net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT
tammela Oct 24, 2024
1fb5f11
selftests/bpf: Add bpf_percpu_obj_{new,drop}() macro in bpf_experimen…
Aug 27, 2023
4413150
bpf: Force checkpoint when jmp history is too long
eddyz87 Oct 29, 2024
c7f084d
netdevsim: Add trailing zero to terminate the string in nsim_nexthop_…
Gax-c Oct 22, 2024
8350a67
bpf: Fix out-of-bounds write in trie_get_next_key()
byeonguk-jeong Oct 26, 2024
7c91f0d
net: fix crash when config small gso_max_size/gso_ipv4_max_size
Oct 23, 2024
a1ceb51
netfilter: Fix use-after-free in get_info()
Oct 24, 2024
2cb4dd5
netfilter: nf_reject_ipv6: fix potential crash in nf_send_reset6()
Oct 25, 2024
7b96fa5
Bluetooth: hci: fix null-ptr-deref in hci_read_supported_codecs
swkim101 Oct 29, 2024
2565fd8
net: skip offload for NETIF_F_IPV6_CSUM if ipv6 header contains exten…
Oct 24, 2024
1b0d627
mlxsw: spectrum_ptp: Add missing verification before pushing Tx header
Oct 25, 2024
c42e486
mlxsw: spectrum_ipip: Fix memory leak when changing remote IPv6 address
idosch Oct 25, 2024
86246cd
netfilter: nft_payload: sanitize offset and length before calling skb…
ummakynes Oct 30, 2024
f40eaff
bpf, test_run: Fix LIVE_FRAME frame update after a page has been recy…
tohojo Oct 30, 2024
8dd6b18
iomap: improve shared block detection in iomap_unshare_iter
Sep 10, 2024
820a318
iomap: don't bother unsharing delalloc extents
Oct 2, 2024
27c84ab
iomap: share iomap_unshare_iter predicate code with fsdax
Oct 3, 2024
7cb986a
fsdax: remove zeroing code from dax_unshare_iter
Oct 3, 2024
ad2929c
fsdax: dax_unshare_iter needs to copy entire blocks
Oct 3, 2024
96b04e6
iomap: turn iomap_want_unshare_iter into an inline function
Oct 15, 2024
b4b5e64
kasan: Fix Software Tag-Based KASAN with GCC
melver Oct 21, 2024
f25d9d5
firmware: arm_sdei: Fix the input parameter of cpuhp_remove_state()
fenghusthu Oct 16, 2024
f042816
afs: Automatically generate trace tag enums
dhowells Feb 23, 2023
f20d03e
afs: Fix missing subdir edit when renamed between parent dirs
dhowells Oct 23, 2024
52f83a6
ACPI: CPPC: Make rmw_lock a raw_spin_lock
pierregondois Oct 28, 2024
bec897b
smb: client: fix parsing of device numbers
pcacjr Sep 19, 2024
34d319c
smb: client: set correct device number on nfs reparse points
pcacjr Sep 19, 2024
ad64656
cxl/events: Fix Trace DRAM Event Record
shijujose4 Oct 14, 2024
a1a4b47
ntfs3: Add bounds checking to mi_enum_attr()
LLfam Aug 23, 2024
a24ad6e
fs/ntfs3: Check if more than chunk-size bytes are written
mrwigglewaffles May 15, 2024
9a282da
fs/ntfs3: Fix warning possible deadlock in ntfs_set_state
aalexandrovich Aug 19, 2024
313e881
fs/ntfs3: Stale inode instead of bad
aalexandrovich Aug 22, 2024
6600cce
fs/ntfs3: Add rough attr alloc_size check
aalexandrovich Aug 19, 2024
318500c
fs/ntfs3: Fix possible deadlock in mi_read
aalexandrovich Aug 28, 2024
66b2865
fs/ntfs3: Additional check in ni_clear()
aalexandrovich Sep 9, 2024
cdc7a7a
fs/ntfs3: Fix general protection fault in run_is_mapped_full
aalexandrovich Aug 30, 2024
639ddc6
fs/ntfs3: Additional check in ntfs_file_release
aalexandrovich Sep 4, 2024
379d8c8
scsi: scsi_transport_fc: Allow setting rport state to current state
bmarzins Sep 17, 2024
0aa1a86
cifs: Improve creating native symlinks pointing to directory
pali Oct 5, 2024
3ce1bd9
cifs: Fix creating native symlinks pointing to current or parent dire…
pali Oct 5, 2024
c5657db
thermal: intel: int340x: processor: Remove MMIO RAPL CPU hotplug support
zhang-rui Sep 30, 2024
7ffcdd5
thermal: intel: int340x: processor: Add MMIO RAPL PL4 support
zhang-rui Sep 30, 2024
a1fc528
net: amd: mvme147: Fix probe banner message
fifteenhex Oct 7, 2024
c28e21d
NFS: remove revoked delegation from server's delegation list
daimngo Oct 8, 2024
1119237
misc: sgi-gru: Don't disable preemption in GRU driver
Sep 19, 2024
4367e5a
usb: gadget: dummy_hcd: Switch to hrtimer transfer scheduler
sylv-io Apr 11, 2024
3f2cfe8
usb: gadget: dummy_hcd: Set transfer interval to 1 microframe
sylv-io Apr 11, 2024
da4d67b
usb: gadget: dummy_hcd: execute hrtimer callback in softirq context
xairy Sep 4, 2024
a7102f6
USB: gadget: dummy-hcd: Fix "task hung" problem
AlanStern Oct 16, 2024
9cb1719
rcu-tasks: Pull sampling of ->percpu_dequeue_lim out of loop
paulmckrcu Aug 2, 2023
bf695e9
rcu-tasks: Add data to eliminate RCU-tasks/do_exit() deadlocks
paulmckrcu Feb 5, 2024
4c708fb
rcu-tasks: Initialize data to eliminate RCU-tasks/do_exit() deadlocks
paulmckrcu Feb 5, 2024
a090a7b
rcu-tasks: Fix access non-existent percpu rtpcp variable in rcu_tasks…
Jul 10, 2024
3e5202d
ALSA: usb-audio: Add quirks for Dell WD19 dock
jscissr Oct 29, 2024
8d3cce6
usbip: tools: Fix detach_port() invalid port error path
Oct 24, 2024
d56a231
usb: phy: Fix API devm_usb_put_phy() can not release the phy
zijun-hu Oct 20, 2024
a99b0a1
usb: typec: fix unreleased fwnode_handle in typec_port_register_altmo…
javiercarrascocruz Oct 21, 2024
bda3be7
usb: typec: qcom-pmic-typec: use fwnode_handle_put() to release fwnodes
javiercarrascocruz Oct 20, 2024
21fe90a
phy: qcom: qmp-usb: fix NULL-deref on runtime suspend
jhovold Sep 11, 2024
e24836d
phy: qcom: qmp-usb-legacy: fix NULL-deref on runtime suspend
jhovold Sep 11, 2024
160677b
xhci: Fix Link TRB DMA in command ring stopped completion event
Oct 22, 2024
6f8f966
xhci: Use pm_runtime_get to prevent RPM on unsupported systems
Oct 24, 2024
8e0bc5c
Revert "driver core: Fix uevent_show() vs driver detach race"
gregkh Oct 29, 2024
3f0535b
Revert "selftests/mm: fix deadlock for fork after pthread_create on ARM"
edliaw Oct 18, 2024
780a059
Revert "selftests/mm: replace atomic_bool with pthread_barrier_t"
edliaw Oct 18, 2024
9f66994
wifi: mac80211: do not pass a stopped vif to the driver in .get_txpower
nbd168 Oct 2, 2024
e3c1dcd
wifi: ath10k: Fix memory leak in management tx
Oct 15, 2024
b5126b8
wifi: cfg80211: clear wdev->cqm_config pointer on free
jmberg-intel Oct 22, 2024
3d2d56d
wifi: iwlegacy: Clear stale interrupts before resuming device
vsyrjala Oct 1, 2024
55f6d35
staging: iio: frequency: ad9832: fix division by zero in ad9832_calc_…
Oct 22, 2024
5d2c8b8
iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()
Oct 22, 2024
1b8624c
iio: gts-helper: Fix memory leaks for the error path of iio_gts_build…
Oct 16, 2024
e4227c7
iio: gts-helper: Fix memory leaks in iio_gts_build_avail_scale_table()
Oct 11, 2024
1e0134b
iio: light: veml6030: fix microlux value calculation
javiercarrascocruz Oct 16, 2024
4801cad
nilfs2: fix potential deadlock with newly created symlinks
konis Oct 20, 2024
21e8714
RISC-V: ACPI: fix early_ioremap to early_memremap
cuiyunhui Oct 14, 2024
cc3327a
mm: shmem: fix data-race in shmem_getattr()
name2965 Sep 9, 2024
1f706a5
tools/mm: -Werror fixes in page-types/slabinfo
wwladikw Oct 22, 2024
3d84274
thunderbolt: Honor TMU requirements in the domain when setting TMU mode
Oct 10, 2024
03e3899
cxl/port: Fix use-after-free, permit out-of-order decoder shutdown
djbw Oct 23, 2024
756c689
mmc: sdhci-pci-gli: GL9767: Fix low power mode on the set clock function
benchuanggli Oct 25, 2024
c2e37dd
mmc: sdhci-pci-gli: GL9767: Fix low power mode in the SD Express process
benchuanggli Oct 25, 2024
c55c739
block: fix sanity checks in blk_rq_map_user_bvec
Oct 23, 2024
b56eaf6
cgroup/bpf: use a dedicated workqueue for cgroup bpf destruction
Oct 8, 2024
154f2fb
phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
Oct 21, 2024
9296b69
spi: spi-fsl-dspi: Fix crash when not using GPIO chip select
nxpfrankli Oct 23, 2024
00305a0
riscv: vdso: Prevent the compiler from inserting calls to memset()
Oct 16, 2024
b1bdbce
Input: edt-ft5x06 - fix regmap leak when probe fails
dtor Oct 19, 2024
ffbee7c
ALSA: hda/realtek: Limit internal Mic boost on Dell platform
KailangYang Oct 18, 2024
6b03196
riscv: efi: Set NX compat flag in PE/COFF header
xypron Sep 29, 2024
796d8b9
riscv: Use '%u' to format the output of 'cpu'
Avenger-285714 Oct 17, 2024
358d5e9
riscv: Remove unused GENERATING_ASM_OFFSETS
Oct 8, 2024
feec95f
riscv: Remove duplicated GET_RM
Oct 8, 2024
6b004ce
cxl/port: Fix cxl_bus_rescan() vs bus_rescan_devices()
djbw Oct 23, 2024
c6541ba
cxl/acpi: Ensure ports ready at cxl_acpi_probe() return
djbw Oct 23, 2024
4d89859
sched/numa: Fix the potential null pointer dereference in task_numa_w…
Oct 25, 2024
91c2537
iov_iter: fix copy_page_from_iter_atomic() if KMAP_LOCAL_FORCE_MAP
Oct 27, 2024
5c228e8
mptcp: init: protect sched with rcu_read_lock
matttbe Oct 21, 2024
758f706
mei: use kvmalloc for read buffer
ausyskin Oct 15, 2024
f1117e0
mm/page_alloc: let GFP_ATOMIC order-0 allocs access highatomic reserves
mfleming Oct 11, 2024
30d0698
x86/traps: Enable UBSAN traps on x86
gatlinnewhouse Jul 24, 2024
6efec22
x86/traps: move kmsan check after instrumentation_begin
novitoll Oct 16, 2024
854493e
ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow
ea1davis Oct 16, 2024
f03d4b4
mctp i2c: handle NULL header address
mkj Oct 22, 2024
4fb9531
xfs: fix finding a last resort AG in xfs_filestream_pick_ag
Oct 23, 2024
1be9e71
ALSA: hda/realtek: Fix headset mic on TUXEDO Gemini 17 Gen3
tuxedoxt Oct 29, 2024
e8bbd91
ALSA: hda/realtek: Fix headset mic on TUXEDO Stellaris 16 Gen6 mb1
tuxedoxt Oct 29, 2024
ae49015
nvmet-auth: assign dh_key to NULL after kfree_sensitive
Sep 16, 2024
52e946d
kasan: remove vmalloc_percpu test
xairy Oct 22, 2024
e327b9e
io_uring/rw: fix missing NOWAIT check for O_DIRECT start write
axboe Oct 31, 2024
4dfae00
vmscan,migrate: fix page count imbalance on node stats when demoting …
Oct 25, 2024
799ad61
arm64: dts: imx8ulp: correct the flexspi compatible string
Sep 5, 2024
a09b867
io_uring: always lock __io_cqring_overflow_flush
isilence Apr 10, 2024
b3156c7
wifi: mac80211: fix NULL dereference at band check in starting tx ba …
Jun 17, 2024
85c3446
nilfs2: fix kernel bug due to missing clearing of checked flag
konis Oct 17, 2024
daf021b
wifi: iwlwifi: mvm: fix 6 GHz scan construction
jmberg-intel Oct 23, 2024
809a601
mm: huge_memory: add vma_thp_disabled() and thp_disabled_by_hw()
Oct 11, 2024
2828f7b
mm: don't install PMD mappings when THPs are disabled by the hw/proce…
davidhildenbrand Oct 11, 2024
7a104a9
mtd: spi-nor: winbond: fix w25q128 regression
mwalle Jun 21, 2024
4a968a1
SUNRPC: Remove BUG_ON call sites
chucklever Sep 19, 2023
d4b6a8d
ASoC: SOF: ipc4-topology: Add definition for generic switch/enum control
ujfalusi Sep 19, 2023
eddac83
ASoC: SOF: ipc4-control: Add support for ALSA switch control
ujfalusi Sep 19, 2023
c43e647
ASoC: SOF: ipc4-control: Add support for ALSA enum control
ujfalusi Sep 19, 2023
f477b8d
drm/amd/display: Add null checks for 'stream' and 'plane' before dere…
srishanm May 27, 2024
215c002
fs/ntfs3: Sequential field availability check in mi_enum_attr()
aalexandrovich Sep 5, 2024
36f4a3a
Linux 6.6.60
gregkh Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
SUBLEVEL = 59
SUBLEVEL = 60
EXTRAVERSION =
NAME = Pinguïn Aangedreven

Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/freescale/imx8ulp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
};

flexspi2: spi@29810000 {
compatible = "nxp,imx8mm-fspi";
compatible = "nxp,imx8ulp-fspi";
reg = <0x29810000 0x10000>, <0x60000000 0x10000000>;
reg-names = "fspi_base", "fspi_mmap";
#address-cells = <1>;
Expand Down
4 changes: 2 additions & 2 deletions arch/riscv/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,15 @@ void __init __iomem *__acpi_map_table(unsigned long phys, unsigned long size)
if (!size)
return NULL;

return early_ioremap(phys, size);
return early_memremap(phys, size);
}

void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
{
if (!map || !size)
return;

early_iounmap(map, size);
early_memunmap(map, size);
}

void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
Expand Down
2 changes: 0 additions & 2 deletions arch/riscv/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright (C) 2017 SiFive
*/

#define GENERATING_ASM_OFFSETS

#include <linux/kbuild.h>
#include <linux/mm.h>
#include <linux/sched.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/cpu-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)
if (cpu_ops[cpu]->cpu_is_stopped)
ret = cpu_ops[cpu]->cpu_is_stopped(cpu);
if (ret)
pr_warn("CPU%d may not have stopped: %d\n", cpu, ret);
pr_warn("CPU%u may not have stopped: %d\n", cpu, ret);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/kernel/efi-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extra_header_fields:
.long efi_header_end - _start // SizeOfHeaders
.long 0 // CheckSum
.short IMAGE_SUBSYSTEM_EFI_APPLICATION // Subsystem
.short 0 // DllCharacteristics
.short IMAGE_DLL_CHARACTERISTICS_NX_COMPAT // DllCharacteristics
.quad 0 // SizeOfStackReserve
.quad 0 // SizeOfStackCommit
.quad 0 // SizeOfHeapReserve
Expand Down
2 changes: 0 additions & 2 deletions arch/riscv/kernel/traps_misaligned.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@
#define REG_PTR(insn, pos, regs) \
(ulong *)((ulong)(regs) + REG_OFFSET(insn, pos))

#define GET_RM(insn) (((insn) >> 12) & 7)

#define GET_RS1(insn, regs) (*REG_PTR(insn, SH_RS1, regs))
#define GET_RS2(insn, regs) (*REG_PTR(insn, SH_RS2, regs))
#define GET_RS1S(insn, regs) (*REG_PTR(RVC_RS1S(insn), 0, regs))
Expand Down
1 change: 1 addition & 0 deletions arch/riscv/kernel/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o

ccflags-y := -fno-stack-protector
ccflags-y += -DDISABLE_BRANCH_PROFILING
ccflags-y += -fno-builtin

ifneq ($(c-gettimeofday-y),)
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
Expand Down
12 changes: 12 additions & 0 deletions arch/x86/include/asm/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
#define INSN_UD2 0x0b0f
#define LEN_UD2 2

/*
* In clang we have UD1s reporting UBSAN failures on X86, 64 and 32bit.
*/
#define INSN_ASOP 0x67
#define OPCODE_ESCAPE 0x0f
#define SECOND_BYTE_OPCODE_UD1 0xb9
#define SECOND_BYTE_OPCODE_UD2 0x0b

#define BUG_NONE 0xffff
#define BUG_UD1 0xfffe
#define BUG_UD2 0xfffd

#ifdef CONFIG_GENERIC_BUG

#ifdef CONFIG_X86_32
Expand Down
71 changes: 60 additions & 11 deletions arch/x86/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <linux/hardirq.h>
#include <linux/atomic.h>
#include <linux/iommu.h>
#include <linux/ubsan.h>

#include <asm/stacktrace.h>
#include <asm/processor.h>
Expand Down Expand Up @@ -89,6 +90,47 @@ __always_inline int is_valid_bugaddr(unsigned long addr)
return *(unsigned short *)addr == INSN_UD2;
}

/*
* Check for UD1 or UD2, accounting for Address Size Override Prefixes.
* If it's a UD1, get the ModRM byte to pass along to UBSan.
*/
__always_inline int decode_bug(unsigned long addr, u32 *imm)
{
u8 v;

if (addr < TASK_SIZE_MAX)
return BUG_NONE;

v = *(u8 *)(addr++);
if (v == INSN_ASOP)
v = *(u8 *)(addr++);
if (v != OPCODE_ESCAPE)
return BUG_NONE;

v = *(u8 *)(addr++);
if (v == SECOND_BYTE_OPCODE_UD2)
return BUG_UD2;

if (!IS_ENABLED(CONFIG_UBSAN_TRAP) || v != SECOND_BYTE_OPCODE_UD1)
return BUG_NONE;

/* Retrieve the immediate (type value) for the UBSAN UD1 */
v = *(u8 *)(addr++);
if (X86_MODRM_RM(v) == 4)
addr++;

*imm = 0;
if (X86_MODRM_MOD(v) == 1)
*imm = *(u8 *)addr;
else if (X86_MODRM_MOD(v) == 2)
*imm = *(u32 *)addr;
else
WARN_ONCE(1, "Unexpected MODRM_MOD: %u\n", X86_MODRM_MOD(v));

return BUG_UD1;
}


static nokprobe_inline int
do_trap_no_signal(struct task_struct *tsk, int trapnr, const char *str,
struct pt_regs *regs, long error_code)
Expand Down Expand Up @@ -214,30 +256,37 @@ static inline void handle_invalid_op(struct pt_regs *regs)
static noinstr bool handle_bug(struct pt_regs *regs)
{
bool handled = false;
int ud_type;
u32 imm;

/*
* Normally @regs are unpoisoned by irqentry_enter(), but handle_bug()
* is a rare case that uses @regs without passing them to
* irqentry_enter().
*/
kmsan_unpoison_entry_regs(regs);
if (!is_valid_bugaddr(regs->ip))
ud_type = decode_bug(regs->ip, &imm);
if (ud_type == BUG_NONE)
return handled;

/*
* All lies, just get the WARN/BUG out.
*/
instrumentation_begin();
/*
* Normally @regs are unpoisoned by irqentry_enter(), but handle_bug()
* is a rare case that uses @regs without passing them to
* irqentry_enter().
*/
kmsan_unpoison_entry_regs(regs);
/*
* Since we're emulating a CALL with exceptions, restore the interrupt
* state to what it was at the exception site.
*/
if (regs->flags & X86_EFLAGS_IF)
raw_local_irq_enable();
if (report_bug(regs->ip, regs) == BUG_TRAP_TYPE_WARN ||
handle_cfi_failure(regs) == BUG_TRAP_TYPE_WARN) {
regs->ip += LEN_UD2;
handled = true;
if (ud_type == BUG_UD2) {
if (report_bug(regs->ip, regs) == BUG_TRAP_TYPE_WARN ||
handle_cfi_failure(regs) == BUG_TRAP_TYPE_WARN) {
regs->ip += LEN_UD2;
handled = true;
}
} else if (IS_ENABLED(CONFIG_UBSAN_TRAP)) {
pr_crit("%s at %pS\n", report_ubsan_failure(regs, imm), (void *)regs->ip);
}
if (regs->flags & X86_EFLAGS_IF)
raw_local_irq_disable();
Expand Down
4 changes: 1 addition & 3 deletions block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,7 @@ static int blk_rq_map_user_bvec(struct request *rq, const struct iov_iter *iter)
if (nsegs >= nr_segs || bytes > UINT_MAX - bv->bv_len)
goto put_bio;
if (bytes + bv->bv_len > nr_iter)
goto put_bio;
if (bv->bv_offset + bv->bv_len > PAGE_SIZE)
goto put_bio;
break;

nsegs++;
bytes += bv->bv_len;
Expand Down
9 changes: 5 additions & 4 deletions drivers/acpi/cppc_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr)

/* Store CPU Logical ID */
cpc_ptr->cpu_id = pr->id;
spin_lock_init(&cpc_ptr->rmw_lock);
raw_spin_lock_init(&cpc_ptr->rmw_lock);

/* Parse PSD data for this CPU */
ret = acpi_get_psd(cpc_ptr, handle);
Expand Down Expand Up @@ -1087,6 +1087,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
struct cpc_reg *reg = &reg_res->cpc_entry.reg;
struct cpc_desc *cpc_desc;
unsigned long flags;

size = GET_BIT_WIDTH(reg);

Expand Down Expand Up @@ -1126,7 +1127,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
return -ENODEV;
}

spin_lock(&cpc_desc->rmw_lock);
raw_spin_lock_irqsave(&cpc_desc->rmw_lock, flags);
switch (size) {
case 8:
prev_val = readb_relaxed(vaddr);
Expand All @@ -1141,7 +1142,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
prev_val = readq_relaxed(vaddr);
break;
default:
spin_unlock(&cpc_desc->rmw_lock);
raw_spin_unlock_irqrestore(&cpc_desc->rmw_lock, flags);
return -EFAULT;
}
val = MASK_VAL_WRITE(reg, prev_val, val);
Expand Down Expand Up @@ -1174,7 +1175,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
}

if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY)
spin_unlock(&cpc_desc->rmw_lock);
raw_spin_unlock_irqrestore(&cpc_desc->rmw_lock, flags);

return ret_val;
}
Expand Down
48 changes: 40 additions & 8 deletions drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <linux/mutex.h>
#include <linux/pm_runtime.h>
#include <linux/netdevice.h>
#include <linux/rcupdate.h>
#include <linux/sched/signal.h>
#include <linux/sched/mm.h>
#include <linux/string_helpers.h>
Expand Down Expand Up @@ -2566,7 +2565,6 @@ static const char *dev_uevent_name(const struct kobject *kobj)
static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)
{
const struct device *dev = kobj_to_dev(kobj);
struct device_driver *driver;
int retval = 0;

/* add device node properties if present */
Expand Down Expand Up @@ -2595,12 +2593,8 @@ static int dev_uevent(const struct kobject *kobj, struct kobj_uevent_env *env)
if (dev->type && dev->type->name)
add_uevent_var(env, "DEVTYPE=%s", dev->type->name);

/* Synchronize with module_remove_driver() */
rcu_read_lock();
driver = READ_ONCE(dev->driver);
if (driver)
add_uevent_var(env, "DRIVER=%s", driver->name);
rcu_read_unlock();
if (dev->driver)
add_uevent_var(env, "DRIVER=%s", dev->driver->name);

/* Add common DT information about the device */
of_device_uevent(dev, env);
Expand Down Expand Up @@ -2670,8 +2664,11 @@ static ssize_t uevent_show(struct device *dev, struct device_attribute *attr,
if (!env)
return -ENOMEM;

/* Synchronize with really_probe() */
device_lock(dev);
/* let the kset specific function add its keys */
retval = kset->uevent_ops->uevent(&dev->kobj, env);
device_unlock(dev);
if (retval)
goto out;

Expand Down Expand Up @@ -4014,6 +4011,41 @@ int device_for_each_child_reverse(struct device *parent, void *data,
}
EXPORT_SYMBOL_GPL(device_for_each_child_reverse);

/**
* device_for_each_child_reverse_from - device child iterator in reversed order.
* @parent: parent struct device.
* @from: optional starting point in child list
* @fn: function to be called for each device.
* @data: data for the callback.
*
* Iterate over @parent's child devices, starting at @from, and call @fn
* for each, passing it @data. This helper is identical to
* device_for_each_child_reverse() when @from is NULL.
*
* @fn is checked each iteration. If it returns anything other than 0,
* iteration stop and that value is returned to the caller of
* device_for_each_child_reverse_from();
*/
int device_for_each_child_reverse_from(struct device *parent,
struct device *from, const void *data,
int (*fn)(struct device *, const void *))
{
struct klist_iter i;
struct device *child;
int error = 0;

if (!parent->p)
return 0;

klist_iter_init_node(&parent->p->klist_children, &i,
(from ? &from->p->knode_parent : NULL));
while ((child = prev_device(&i)) && !error)
error = fn(child, data);
klist_iter_exit(&i);
return error;
}
EXPORT_SYMBOL_GPL(device_for_each_child_reverse_from);

/**
* device_find_child - device iterator for locating a particular device.
* @parent: parent struct device
Expand Down
4 changes: 0 additions & 4 deletions drivers/base/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/rcupdate.h>
#include "base.h"

static char *make_driver_name(struct device_driver *drv)
Expand Down Expand Up @@ -102,9 +101,6 @@ void module_remove_driver(struct device_driver *drv)
if (!drv)
return;

/* Synchronize with dev_uevent() */
synchronize_rcu();

sysfs_remove_link(&drv->p->kobj, "module");

if (drv->owner)
Expand Down
7 changes: 7 additions & 0 deletions drivers/cxl/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,13 @@ static void __exit cxl_acpi_exit(void)

/* load before dax_hmem sees 'Soft Reserved' CXL ranges */
subsys_initcall(cxl_acpi_init);

/*
* Arrange for host-bridge ports to be active synchronous with
* cxl_acpi_probe() exit.
*/
MODULE_SOFTDEP("pre: cxl_port");

module_exit(cxl_acpi_exit);
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(CXL);
Expand Down
Loading
Loading