Commit graph

576 commits

Author SHA1 Message Date
Ksawlii
33a4759f21 defconfigs: Regenerate with regen.sh 2025-01-18 22:53:46 +01:00
Ksawlii
46ef9e7f51 defconfigs: Regenerate with regen.sh 2025-01-17 00:03:07 +01:00
Ksawlii
046f1b47c2 defconfigs: Regenerate with regen.sh 2025-01-16 23:53:44 +01:00
Tim Zimmermann
50596b1299 configs: s5e8825: Rename AP interface from swlan0 to wlan1
* Needed to get STA/AP concurrency working
* See https://source.android.com/devices/tech/connect/wifi-sta-ap-concurrency?hl=en

Change-Id: I9c3331d14e12325e12ac5af41590ad83ee37ec95
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-16 23:08:04 +01:00
Ksawlii
bea7ef974b defconfigs: Increase log buffer to 1MB 2025-01-16 21:56:54 +01:00
Ksawlii
09fb15e899 defconfig: Disable CONFIG_KSU on vanilla builds 2025-01-15 16:49:21 +01:00
Ksawlii
552619876d defconfigs: Regenerate with regenerate.sh
regenerate.sh: Best work frfr
2025-01-15 16:47:28 +01:00
Nahuel Gómez
1c7179186b configs: turn down undervolt to a safe value
We need to investigate reports of random reboots.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-15 16:40:13 +01:00
Nahuel Gómez
f4634f8802 fvmap: move undervolting settings to Kconfig
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-15 16:40:04 +01:00
Nahuel Gómez
e89716836f configs: disable EFI support
We don't use it.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2025-01-15 16:39:25 +01:00
Ksawlii
98564339fe defconfigs: enable CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3 2025-01-15 16:39:12 +01:00
Leon Romanovsky
4331cbd62a ARC: build: Try to guess GCC variant of cross compiler
[ Upstream commit 824927e88456331c7a999fdf5d9d27923b619590 ]

ARC GCC compiler is packaged starting from Fedora 39i and the GCC
variant of cross compile tools has arc-linux-gnu- prefix and not
arc-linux-. This is causing that CROSS_COMPILE variable is left unset.

This change allows builds without need to supply CROSS_COMPILE argument
if distro package is used.

Before this change:
$ make -j 128 ARCH=arc W=1 drivers/infiniband/hw/mlx4/
  gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
  gcc: error: unrecognized command-line option ‘-mmedium-calls’
  gcc: error: unrecognized command-line option ‘-mlock’
  gcc: error: unrecognized command-line option ‘-munaligned-access’

[1] https://packages.fedoraproject.org/pkgs/cross-gcc/gcc-arc-linux-gnu/index.html
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:56 +01:00
Naman Jain
a5135d9c45 x86/hyperv: Fix hv tsc page based sched_clock for hibernation
commit bcc80dec91ee745b3d66f3e48f0ec2efdea97149 upstream.

read_hv_sched_clock_tsc() assumes that the Hyper-V clock counter is
bigger than the variable hv_sched_clock_offset, which is cached during
early boot, but depending on the timing this assumption may be false
when a hibernated VM starts again (the clock counter starts from 0
again) and is resuming back (Note: hv_init_tsc_clocksource() is not
called during hibernation/resume); consequently,
read_hv_sched_clock_tsc() may return a negative integer (which is
interpreted as a huge positive integer since the return type is u64)
and new kernel messages are prefixed with huge timestamps before
read_hv_sched_clock_tsc() grows big enough (which typically takes
several seconds).

Fix the issue by saving the Hyper-V clock counter just before the
suspend, and using it to correct the hv_sched_clock_offset in
resume. This makes hv tsc page based sched_clock continuous and ensures
that post resume, it starts from where it left off during suspend.
Override x86_platform.save_sched_clock_state and
x86_platform.restore_sched_clock_state routines to correct this as soon
as possible.

Note: if Invariant TSC is available, the issue doesn't happen because
1) we don't register read_hv_sched_clock_tsc() for sched clock:
See commit e5313f1c5404 ("clocksource/drivers/hyper-v: Rework
clocksource and sched clock setup");
2) the common x86 code adjusts TSC similarly: see
__restore_processor_state() ->  tsc_verify_tsc_adjust(true) and
x86_platform.restore_sched_clock_state().

Cc: stable@vger.kernel.org
Fixes: 1349401ff1aa ("clocksource/drivers/hyper-v: Suspend/resume Hyper-V clocksource for hibernation")
Co-developed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Link: https://lore.kernel.org/r/20240917053917.76787-1-namjain@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Message-ID: <20240917053917.76787-1-namjain@linux.microsoft.com>
Signed-off-by: Naman Jain <namjain@linux.microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-15 16:29:52 +01:00
Catalin Marinas
e720f4eea6 arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs
[ Upstream commit c0900d15d31c2597dd9f634c8be2b71762199890 ]

Linux currently sets the TCR_EL1.AS bit unconditionally during CPU
bring-up. On an 8-bit ASID CPU, this is RES0 and ignored, otherwise
16-bit ASIDs are enabled. However, if running in a VM and the hypervisor
reports 8-bit ASIDs (ID_AA64MMFR0_EL1.ASIDBits == 0) on a 16-bit ASIDs
CPU, Linux uses bits 8 to 63 as a generation number for tracking old
process ASIDs. The bottom 8 bits of this generation end up being written
to TTBR1_EL1 and also used for the ASID-based TLBI operations as the
upper 8 bits of the ASID. Following an ASID roll-over event we can have
threads of the same application with the same 8-bit ASID but different
generation numbers running on separate CPUs. Both TLB caching and the
TLBI operations will end up using different actual 16-bit ASIDs for the
same process.

A similar scenario can happen in a big.LITTLE configuration if the boot
CPU only uses 8-bit ASIDs while secondary CPUs have 16-bit ASIDs.

Ensure that the ASID generation is only tracked by bits 16 and up,
leaving bits 15:8 as 0 if the kernel uses 8-bit ASIDs. Note that
clearing TCR_EL1.AS is not sufficient since the architecture requires
that the top 8 bits of the ASID passed to TLBI instructions are 0 rather
than ignored in such configuration.

Cc: stable@vger.kernel.org
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: James Morse <james.morse@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241203151941.353796-1-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:51 +01:00
Yunfeng Ye
91be5d2232 arm64: mm: Rename asid2idx() to ctxid2asid()
[ Upstream commit a3a5b763410c7bceacf41a52071134d9dc26202a ]

The commit 0c8ea531b774 ("arm64: mm: Allocate ASIDs in pairs") introduce
the asid2idx and idx2asid macro, but these macros are not really useful
after the commit f88f42f853a8 ("arm64: context: Free up kernel ASIDs if
KPTI is not in use").

The code "(asid & ~ASID_MASK)" can be instead by a macro, which is the
same code with asid2idx(). So rename it to ctxid2asid() for a better
understanding.

Also we add asid2ctxid() macro, the contextid can be generated based on
the asid and generation through this macro.

Signed-off-by: Yunfeng Ye <yeyunfeng@huawei.com>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/c31516eb-6d15-94e0-421c-305fc010ea79@huawei.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Stable-dep-of: c0900d15d31c ("arm64: Ensure bits ASID[15:8] are masked out when the kernel uses 8-bit ASIDs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:51 +01:00
Jiaxun Yang
61e1810272 MIPS: Probe toolchain support of -msym32
[ Upstream commit 18ca63a2e23c5e170d2d7552b64b1f5ad019cd9b ]

msym32 is not supported by LLVM toolchain.
Workaround by probe toolchain support of msym32 for KBUILD_SYM32
feature.

Link: https://github.com/ClangBuiltLinux/linux/issues/1544
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:50 +01:00
Jiaxun Yang
8965bf921f MIPS: Loongson64: DTS: Fix msi node for ls7a
[ Upstream commit 98a9e2ac3755a353eefea8c52e23d5b0c50f3899 ]

Add it to silent warning:
arch/mips/boot/dts/loongson/ls7a-pch.dtsi:68.16-416.5: Warning (interrupt_provider): /bus@10000000/pci@1a000000: '#interrupt-cells' found, but node is not an interrupt provider
arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts:32.31-40.4: Warning (interrupt_provider): /bus@10000000/msi-controller@2ff00000: Missing '#interrupt-cells' in interrupt provider
arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider'

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-01-15 16:29:40 +01:00
Juergen Gross
63ab2df174 x86/xen: remove hypercall page
commit 7fa0da5373685e7ed249af3fa317ab1e1ba8b0a6 upstream.

The hypercall page is no longer needed. It can be removed, as from the
Xen perspective it is optional.

But, from Linux's perspective, it removes naked RET instructions that
escape the speculative protections that Call Depth Tracking and/or
Untrain Ret are trying to achieve.

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:19 +01:00
Juergen Gross
90889c6338 x86/xen: use new hypercall functions instead of hypercall page
commit b1c2cb86f4a7861480ad54bb9a58df3cbebf8e92 upstream.

Call the Xen hypervisor via the new xen_hypercall_func static-call
instead of the hypercall page.

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Co-developed-by: Peter Zijlstra <peterz@infradead.org>
Co-developed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:19 +01:00
Juergen Gross
eb9a9d9090 x86/xen: add central hypercall functions
commit b4845bb6383821a9516ce30af3a27dc873e37fd4 upstream.

Add generic hypercall functions usable for all normal (i.e. not iret)
hypercalls. Depending on the guest type and the processor vendor
different functions need to be used due to the to be used instruction
for entering the hypervisor:

- PV guests need to use syscall
- HVM/PVH guests on Intel need to use vmcall
- HVM/PVH guests on AMD and Hygon need to use vmmcall

As PVH guests need to issue hypercalls very early during boot, there
is a 4th hypercall function needed for HVM/PVH which can be used on
Intel and AMD processors. It will check the vendor type and then set
the Intel or AMD specific function to use via static_call().

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Co-developed-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:19 +01:00
Juergen Gross
63e82a4447 x86/xen: don't do PV iret hypercall through hypercall page
commit a2796dff62d6c6bfc5fbebdf2bee0d5ac0438906 upstream.

Instead of jumping to the Xen hypercall page for doing the iret
hypercall, directly code the required sequence in xen-asm.S.

This is done in preparation of no longer using hypercall page at all,
as it has shown to cause problems with speculation mitigations.

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:19 +01:00
Juergen Gross
5f757e0171 x86/static-call: provide a way to do very early static-call updates
commit 0ef8047b737d7480a5d4c46d956e97c190f13050 upstream.

Add static_call_update_early() for updating static-call targets in
very early boot.

This will be needed for support of Xen guest type specific hypercall
functions.

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Co-developed-by: Peter Zijlstra <peterz@infradead.org>
Co-developed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:18 +01:00
Juergen Gross
c3719bc074 x86: make get_cpu_vendor() accessible from Xen code
commit efbcd61d9bebb771c836a3b8bfced8165633db7c upstream.

In order to be able to differentiate between AMD and Intel based
systems for very early hypercalls without having to rely on the Xen
hypercall page, make get_cpu_vendor() non-static.

Refactor early_cpu_init() for the same reason by splitting out the
loop initializing cpu_devs() into an externally callable function.

This is part of XSA-466 / CVE-2024-53241.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:18 +01:00
Greg Kroah-Hartman
e01af5babf Revert "clkdev: remove CONFIG_CLKDEV_LOOKUP"
This reverts commit d08932bb6e38 which is
commit 2f4574dd6dd19eb3e8ab0415a3ae960d04be3a65 upstream.

It is reported to cause build errors in m68k, so revert it.

Link: https://lore.kernel.org/r/68b0559e-47e8-4756-b3de-67d59242756e@roeck-us.net
Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Ross Burton <ross.burton@arm.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-02 17:01:18 +01:00
Sami Tolvanen
95be6620aa BACKPORT: FROMLIST: arm64: vdso: disable Shadow Call Stack
Shadow stacks are only available in the kernel, so disable SCS
instrumentation for the vDSO.

Bug: 145210207
Change-Id: I6e01b2c7788ba52d3b754b1fbd5bfb908b45741b
(am from https://lore.kernel.org/patchwork/patch/1149061/)
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2024-12-18 19:47:08 +01:00
75d1ed86e7 Revert "defconfig: a53x*: Nuked a lot (commit history broke a little)"
This reverts commit 0029c23ea7.
2024-12-18 18:44:49 +01:00
cb12fcb606 Revert "defconfig: a53x*: Readd CONFIG_EXYNOS_DEBUG_INFO"
This reverts commit 3296330133.
2024-12-18 18:24:47 +01:00
3296330133 defconfig: a53x*: Readd CONFIG_EXYNOS_DEBUG_INFO 2024-12-18 18:15:48 +01:00
0029c23ea7 defconfig: a53x*: Nuked a lot (commit history broke a little) 2024-12-18 17:57:28 +01:00
Nahuel Gómez
958fb60b40 configs: use bbr as default tcp cong. algorithm
We already have the BBRv3 patches merged.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-18 15:14:17 +01:00
Nahuel Gómez
375f7e1318 ARM64: dts/s5e8825: GPU undervolt to 790mV
This is a base value only though, I'm not sure if it actually works.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-18 15:01:20 +01:00
b6b17fef92 Revert "defconfig: a53x_defconfig: Nuke KPROBE"
This reverts commit d30b19e276.
2024-12-18 14:59:29 +01:00
d30b19e276 defconfig: a53x_defconfig: Nuke KPROBE 2024-12-18 14:14:56 +01:00
Ksawlii
d1a6ca7818 defconfigs: a53x*: Regenerated with newer clang (19) and Linux 5.10.231 2024-12-18 12:27:51 +01:00
Nahuel Gómez
633af00caf configs: drop HICCUP_CC_DISABLE
Match a33x defconfig

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-18 12:15:20 +01:00
53464baf85 Reapply "configs: kill SCHEDSTATS and SCHED_DEBUG"
This reverts commit 326c808f5c.
2024-12-18 11:25:40 +01:00
f656b91682 Reapply "configs: drop KZEROD"
This reverts commit 0cb16ca2c7.
2024-12-18 11:25:29 +01:00
55d2e44b8e Reapply "ARM64: dts/s5e8825: disable more unused stuff"
This reverts commit 30bd5b7761.
2024-12-18 11:24:33 +01:00
178633ff08 Reapply "configs: disable some unnecessary DSS stuff"
This reverts commit 47e32f67d1.
2024-12-18 11:24:28 +01:00
52028ebf99 Reapply "ARM64: dts/s5e8825: drop more reserved memory"
This reverts commit 46ca369f57.
2024-12-18 11:24:24 +01:00
0147ae88b9 Revert "ARM64: dts: s5e8825: disable some debug stuff"
This reverts commit 554d5fd356.
2024-12-18 11:05:39 +01:00
46ca369f57 Revert "ARM64: dts/s5e8825: drop more reserved memory"
This reverts commit 9632f64cde.
2024-12-18 09:37:47 +01:00
47e32f67d1 Revert "configs: disable some unnecessary DSS stuff"
This reverts commit b8c6547f74.
2024-12-18 00:32:45 +01:00
30bd5b7761 Revert "ARM64: dts/s5e8825: disable more unused stuff"
This reverts commit 171825cf94.
2024-12-18 00:32:35 +01:00
0cb16ca2c7 Revert "configs: drop KZEROD"
This reverts commit cb9bb6b647.
2024-12-17 23:30:37 +01:00
08513bfea7 defconfig: a53x_defconfig: Set FRAME_WARN to 0 2024-12-17 23:22:38 +01:00
Ksawlii
326c808f5c Revert "configs: kill SCHEDSTATS and SCHED_DEBUG"
This reverts commit a0e697bdf0.
2024-12-17 22:26:44 +01:00
Nahuel Gómez
b8c6547f74 configs: disable some unnecessary DSS stuff
We can't disable the whole driver because it handles last_kmsg.

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:36:22 +01:00
Nahuel Gómez
cb9bb6b647 configs: drop KZEROD
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:35:27 +01:00
Nahuel Gómez
9632f64cde ARM64: dts/s5e8825: drop more reserved memory
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
2024-12-17 20:35:06 +01:00