Commit graph

484 commits

Author SHA1 Message Date
Ksawlii
99782ed53a defconfigs: a53x*: Regenerated with newer clang and Linux 5.10.230 Stable 2024-12-07 19:18:06 +01:00
Michael Ellerman
62519b10a4 powerpc/powernv: Free name on error in opal_event_init()
[ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ]

In opal_event_init() if request_irq() fails name is not freed, leading
to a memory leak. The code only runs at boot time, there's no way for a
user to trigger it, so there's no security impact.

Fix the leak by freeing name in the error path.

Reported-by: 2639161967 <2639161967@qq.com>
Closes: https://lore.kernel.org/linuxppc-dev/87wmjp3wig.fsf@mail.lhotse
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20240920093520.67997-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:27 +01:00
Heiko Stuebner
00f08e5133 ARM: dts: rockchip: Fix the realtek audio codec on rk3036-kylin
[ Upstream commit 77a9a7f2d3b94d29d13d71b851114d593a2147cf ]

Both the node name as well as the compatible were not named
according to the binding expectations, fix that.

Fixes: 47bf3a5c9e2a ("ARM: dts: rockchip: add the sound setup for rk3036-kylin board")
Cc: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-15-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:21 +01:00
Heiko Stuebner
dc348605cf ARM: dts: rockchip: Fix the spi controller on rk3036
[ Upstream commit 8bade1ad1f0821aef31f6a8fb1027ae292566d85 ]

Compatible and clock names did not match the existing binding.
So set the correct values and re-order+rename the clocks.

It looks like no rk3036 board did use the spi controller so far,
so this was never detected on a running device yet.

Fixes: f629fcfab2cd ("ARM: dts: rockchip: support the spi for rk3036")
Cc: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-14-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:21 +01:00
Heiko Stuebner
e869f22b4e ARM: dts: rockchip: drop grf reference from rk3036 hdmi
[ Upstream commit 1580ccb6ed9dc76b8ff3e2d8912e8215c8b0fa6d ]

Neither the binding nor the driver implementation specify/use the grf
reference provided in the rk3036. And neither does the newer rk3128
user of the hdmi controller. So drop the rockchip,grf property.

Fixes: b7217cf19c63 ("ARM: dts: rockchip: add hdmi device node for rk3036")
Cc: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-13-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:21 +01:00
Heiko Stuebner
111f7a688b ARM: dts: rockchip: fix rk3036 acodec node
[ Upstream commit c7206853cd7d31c52575fb1dc7616b4398f3bc8f ]

The acodec node is not conformant to the binding.

Set the correct nodename, use the correct compatible, add the needed
#sound-dai-cells and sort the rockchip,grf below clocks properties
as expected.

Fixes: faea098e1808 ("ARM: dts: rockchip: add core rk3036 dtsi")
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20241008203940.2573684-12-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:21 +01:00
Daniel Micay
df64e52e41 arm64: determine stack entropy based on mmap entropy
Stack mapping entropy is currently hard-wired to 11 bits of entropy on
32-bit and 18 bits of entropy on 64-bit. The stack itself gains an extra
8 bits of entropy from lower bit randomization within 16 byte alignment
constraints. The argument block could have all lower bits randomized but
it currently only gets the mapping randomization.

Rather than hard-wiring values this switches to using the mmap entropy
configuration like the mmap base and executable base, resulting in a
range of 8 to 16 bits on 32-bit and 18 to 24 bits on 64-bit (with 4k
pages and 3 level page tables) depending on kernel configuration and
overridable via the sysctl entries.

It's worth noting that since these kernel configuration options default
to the minimum supported entropy value, the entropy on 32-bit will drop
from 11 to 8 bits for builds using the defaults. However, following the
configuration seems like the right thing to do regardless. At the very
least, changing the defaults for COMPAT (32-bit processes on 64-bit)
should be considered due to the larger address space compared to real
32-bit.

Signed-off-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2024-11-30 02:16:49 +01:00
Ksawlii
803bfc3405 defconfig: s5e8825-a53xxx: Readded 2024-11-24 19:52:41 +00:00
Ksawlii
2a8664befc defconfig: a53x*: Regenerated with clang-r475365b (16.0.2) 2024-11-24 19:37:18 +00:00
Ksawlii
d7dc13778c defconfigs: Deleted useless ones 2024-11-24 19:06:27 +00:00
Ksawlii
5aaf20211d ARM64: dts/s5e8825: make GPU lean more towards 702 MHz 2024-11-24 19:21:47 +01:00
Ksawlii
e3091fa704 ARM64: dts/s5e8825: boost memory up to 2093 MHz 2024-11-24 19:20:03 +01:00
Ksawlii
0bffcfb5ef Revert "arm64: cpufeature: Fix the visibility of compat hwcaps"
This reverts commit 3890786229.
2024-11-24 00:23:54 +01:00
Ksawlii
e59068c50c Revert "ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode"
This reverts commit 2f304f77ef.
2024-11-24 00:23:54 +01:00
Ksawlii
40b2071803 Revert "um: line: always fill *error_out in setup_one_line()"
This reverts commit 02eb370a4c.
2024-11-24 00:23:40 +01:00
Ksawlii
631e573f84 Revert "s390/vmlinux.lds.S: Move ro_after_init section behind rodata section"
This reverts commit 4c852d5c4e.
2024-11-24 00:23:39 +01:00
Ksawlii
7774e178bc Revert "MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed"
This reverts commit cc75a38dcd.
2024-11-24 00:23:38 +01:00
Ksawlii
dd167a1c23 Revert "arm64: acpi: Move get_cpu_for_acpi_id() to a header"
This reverts commit 48434a5b6c.
2024-11-24 00:23:36 +01:00
Ksawlii
c016244326 Revert "arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry"
This reverts commit c71f1763b9.
2024-11-24 00:23:36 +01:00
Ksawlii
e8049e38f9 Revert "powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL"
This reverts commit e97c59c35e.
2024-11-24 00:23:35 +01:00
Ksawlii
1bb9dd50fe Revert "microblaze: don't treat zero reserved memory regions as error"
This reverts commit 4e833b217e.
2024-11-24 00:23:33 +01:00
Ksawlii
92c7fd94e3 Revert "x86/ibt,ftrace: Search for __fentry__ location"
This reverts commit f6f1a8e333.
2024-11-24 00:23:31 +01:00
Ksawlii
8d240a5244 Revert "ARM: dts: microchip: sam9x60: Fix rtc/rtt clocks"
This reverts commit ac09b8b744.
2024-11-24 00:23:28 +01:00
Ksawlii
1fe8113a14 Revert "ARM: dts: imx7d-zii-rmu2: fix Ethernet PHY pinctrl property"
This reverts commit a80b20986e.
2024-11-24 00:23:28 +01:00
Ksawlii
0ab0424d78 Revert "ARM: versatile: fix OF node leak in CPUs prepare"
This reverts commit be77137123.
2024-11-24 00:23:28 +01:00
Ksawlii
3d4f7d0a91 Revert "m68k: Fix kernel_clone_args.flags in m68k_clone()"
This reverts commit 1ed7b9f02f.
2024-11-24 00:23:27 +01:00
Ksawlii
5fcfbc6d9d Revert "xen: use correct end address of kernel for conflict checking"
This reverts commit 5e2ec8dda3.
2024-11-24 00:23:24 +01:00
Ksawlii
b2f8d7bb11 Revert "riscv: Fix fp alignment bug in perf_callchain_user()"
This reverts commit 82b35b5043.
2024-11-24 00:23:20 +01:00
Ksawlii
ac6c389c56 Revert "x86/mm: Switch to new Intel CPU model defines"
This reverts commit d0b89ceba6.
2024-11-24 00:23:18 +01:00
Ksawlii
e998f5437f Revert "perf/x86/intel/pt: Fix sampling synchronization"
This reverts commit 8cfe7610cd.
2024-11-24 00:23:16 +01:00
Ksawlii
f6fecb09e8 Revert "x86/syscall: Avoid memcpy() for ia32 syscall_get_arguments()"
This reverts commit 23a2b0d100.
2024-11-24 00:23:07 +01:00
Ksawlii
6ea511d384 Revert "parisc: Fix itlb miss handler for 64-bit programs"
This reverts commit 74ec758daf.
2024-11-24 00:23:05 +01:00
Ksawlii
5840e6db2a Revert "parisc: Fix 64-bit userspace syscall path"
This reverts commit 3af6b47055.
2024-11-24 00:23:03 +01:00
Ksawlii
da201d9ae8 Revert "riscv: define ILLEGAL_POINTER_VALUE for 64bit"
This reverts commit e1bc326def.
2024-11-24 00:23:02 +01:00
Ksawlii
def59d9260 Revert "arm64: Add Cortex-715 CPU part definition"
This reverts commit c5a642ce49.
2024-11-24 00:23:00 +01:00
Ksawlii
8d472331b4 Revert "arm64: cputype: Add Neoverse-N3 definitions"
This reverts commit 7ca4112f21.
2024-11-24 00:23:00 +01:00
Ksawlii
605451724a Revert "s390/facility: Disable compile time optimization for decompressor code"
This reverts commit f66d16cd53.
2024-11-24 00:22:59 +01:00
Ksawlii
809e38d7df Revert "s390/mm: Add cond_resched() to cmm_alloc/free_pages()"
This reverts commit b64679781a.
2024-11-24 00:22:59 +01:00
Ksawlii
ec15971004 Revert "s390/cpum_sf: Remove WARN_ON_ONCE statements"
This reverts commit 9c06859c81.
2024-11-24 00:22:59 +01:00
Ksawlii
b53604d807 Revert "arm64: probes: Remove broken LDR (literal) uprobe support"
This reverts commit ff921f0c79.
2024-11-24 00:22:53 +01:00
Ksawlii
1b5a5af29c Revert "arm64: probes: Fix simulate_ldr*_literal()"
This reverts commit f2ddadb749.
2024-11-24 00:22:53 +01:00
Ksawlii
f1cb82372f Revert "x86/resctrl: Annotate get_mem_config() functions as __init"
This reverts commit 8436a07c7a.
2024-11-24 00:22:51 +01:00
Ksawlii
57c42b3af7 Revert "x86/apic: Always explicitly disarm TSC-deadline timer"
This reverts commit 5a5d98e292.
2024-11-24 00:22:51 +01:00
Ksawlii
e19e6b3388 Revert "x86/entry_32: Do not clobber user EFLAGS.ZF"
This reverts commit 632fba79b9.
2024-11-24 00:22:51 +01:00
Ksawlii
5e83655d80 Revert "x86/entry_32: Clear CPU buffers after register restore in NMI return"
This reverts commit 0c7e61432d.
2024-11-24 00:22:51 +01:00
Ksawlii
62d9425e52 Revert "powerpc/mm: Always update max/min_low_pfn in mem_topology_setup()"
This reverts commit d3b3390017.
2024-11-24 00:22:51 +01:00
Pawan Gupta
9bae1af719 x86/bugs: Use code segment selector for VERW operand
commit e4d2102018542e3ae5e297bc6e229303abff8a0f upstream.

Robert Gill reported below #GP in 32-bit mode when dosemu software was
executing vm86() system call:

  general protection fault: 0000 [#1] PREEMPT SMP
  CPU: 4 PID: 4610 Comm: dosemu.bin Not tainted 6.6.21-gentoo-x86 #1
  Hardware name: Dell Inc. PowerEdge 1950/0H723K, BIOS 2.7.0 10/30/2010
  EIP: restore_all_switch_stack+0xbe/0xcf
  EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
  ESI: 00000000 EDI: 00000000 EBP: 00000000 ESP: ff8affdc
  DS: 0000 ES: 0000 FS: 0000 GS: 0033 SS: 0068 EFLAGS: 00010046
  CR0: 80050033 CR2: 00c2101c CR3: 04b6d000 CR4: 000406d0
  Call Trace:
   show_regs+0x70/0x78
   die_addr+0x29/0x70
   exc_general_protection+0x13c/0x348
   exc_bounds+0x98/0x98
   handle_exception+0x14d/0x14d
   exc_bounds+0x98/0x98
   restore_all_switch_stack+0xbe/0xcf
   exc_bounds+0x98/0x98
   restore_all_switch_stack+0xbe/0xcf

This only happens in 32-bit mode when VERW based mitigations like MDS/RFDS
are enabled. This is because segment registers with an arbitrary user value
can result in #GP when executing VERW. Intel SDM vol. 2C documents the
following behavior for VERW instruction:

  #GP(0) - If a memory operand effective address is outside the CS, DS, ES,
	   FS, or GS segment limit.

CLEAR_CPU_BUFFERS macro executes VERW instruction before returning to user
space. Use %cs selector to reference VERW operand. This ensures VERW will
not #GP for an arbitrary user %ds.

[ mingo: Fixed the SOB chain. ]

Fixes: a0e2dab44d22 ("x86/entry_32: Add VERW just before userspace transition")
Reported-by: Robert Gill <rtgill82@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com
Cc: stable@vger.kernel.org # 5.10+
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218707
Closes: https://lore.kernel.org/all/8c77ccfd-d561-45a1-8ed5-6b75212c7a58@leemhuis.info/
Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Suggested-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Chunyan Zhang
af2887171f riscv: Remove duplicated GET_RM
[ Upstream commit 164f66de6bb6ef454893f193c898dc8f1da6d18b ]

The macro GET_RM defined twice in this file, one can be removed.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Fixes: 956d705dd279 ("riscv: Unaligned load/store handling for M_MODE")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20241008094141.549248-3-zhangchunyan@iscas.ac.cn
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:06 +01:00
Chunyan Zhang
9090748908 riscv: Remove unused GENERATING_ASM_OFFSETS
[ Upstream commit 46d4e5ac6f2f801f97bcd0ec82365969197dc9b1 ]

The macro is not used in the current version of kernel, it looks like
can be removed to avoid a build warning:

../arch/riscv/kernel/asm-offsets.c: At top level:
../arch/riscv/kernel/asm-offsets.c:7: warning: macro "GENERATING_ASM_OFFSETS" is not used [-Wunused-macros]
    7 | #define GENERATING_ASM_OFFSETS

Fixes: 9639a44394b9 ("RISC-V: Provide a cleaner raw_smp_processor_id()")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Link: https://lore.kernel.org/r/20241008094141.549248-2-zhangchunyan@iscas.ac.cn
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:05 +01:00
WangYuli
c062db9752 riscv: Use '%u' to format the output of 'cpu'
[ Upstream commit e0872ab72630dada3ae055bfa410bf463ff1d1e0 ]

'cpu' is an unsigned integer, so its conversion specifier should
be %u, not %d.

Suggested-by: Wentao Guan <guanwentao@uniontech.com>
Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2409122309090.40372@angie.orcam.me.uk/
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Tested-by: Charlie Jenkins <charlie@rivosinc.com>
Fixes: f1e58583b9c7 ("RISC-V: Support cpu hotplug")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/4C127DEECDA287C8+20241017032010.96772-1-wangyuli@uniontech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:05 +01:00