5.19.6-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainerPATCH 147/158 arm64: fix rodata=full
In reply to Greg Kroah-HartmanFrom: Mark Rutland <[email protected]>
commit 2e8cff0a0eee87b27f0cf87ad8310eb41b5886ab upstream.
On arm64, "rodata=full" has been suppored (but not documented) since commit:
c55191e96caa9d78 ("arm64: mm: apply r/o permissions of VM areas to its linear alias as well")
As it's necessary to determine the rodata configuration early during boot, arm64 has an early_param() handler for this, whereas init/main.c has a __setup() handler which is run later.
Unfortunately, this split meant that since commit:
f9a40b0890658330 ("init/main.c: return 1 from handled __setup() functions")
... passing "rodata=full" would result in a spurious warning from the __setup() handler (though RO permissions would be configured appropriately).
Further, "rodata=full" has been broken since commit:
0d6ea3ac94ca77c5 ("lib/kstrtox.c: add "false"/"true" support to kstrtobool()")
... which caused strtobool() to parse "full" as false (in addition to many other values not documented for the "rodata=" kernel parameter.
This patch fixes this breakage by:
* Moving the core parameter parser to an __early_param(), such that it is available early.
* Adding an (optional) arch hook which arm64 can use to parse "full".
* Updating the documentation to mention that "full" is valid for arm64.
* Having the core parameter parser handle "on" and "off" explicitly, such that any undocumented values (e.g. typos such as "ful") are reported as errors rather than being silently accepted.
Note that __setup() and early_param() have opposite conventions for their return values, where __setup() uses 1 to indicate a parameter was handled and early_param() uses 0 to indicate a parameter was handled.
--- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/arm64/include/asm/setup.h | 17 +++++++++++++++++ arch/arm64/mm/mmu.c | 18 ------------------ init/main.c | 18 +++++++++++++++--- 4 files changed, 34 insertions(+), 21 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +2 -0
@@ -5260,6 +5260,8 @@ rodata= [KNL] on Mark read-only kernel memory as read-only (default). off Leave read-only kernel memory writable for debugging. + full Mark read-only kernel memory and aliases as read-only + [arm64] rockchip.usb_uart Enable the uart passthrough on the designated usb port
arch/arm64/include/asm/setup.h +17 -0
@@ -3,6 +3,8 @@#ifndef __ARM64_ASM_SETUP_H#define __ARM64_ASM_SETUP_H +#include <linux/string.h> +#include <uapi/asm/setup.h> void *get_early_fdt_ptr (void );
@@ -14,4 +16,19 @@ void early_fdt_map(u64 dt_phys);extern phys_addr_t __fdt_pointer__initdata ; extern u64 __cacheline_aligned boot_args[4]; +static inline bool arch_parse_debug_rodata (char *arg) +{ +extern bool rodata_enabled; +extern bool rodata_full; + +if (arg && !strcmp (arg,"full" )) { + rodata_enabled = true; + rodata_full = true; +return true; + } + +return false; +} +#define arch_parse_debug_rodata arch_parse_debug_rodata +#endif
arch/arm64/mm/mmu.c +0 -18
@@ -625,24 +625,6 @@ static void __init map_kernel_segment(pgvm_area_add_early (vma); } -static int __init parse_rodata (char *arg) -{ -int ret =strtobool (arg, &rodata_enabled); -if (!ret) { - rodata_full = false; -return 0 ; - } - -/* permit 'full' in addition to boolean options */ -if (strcmp (arg,"full" )) -return -EINVAL ; - - rodata_enabled = true; - rodata_full = true; -return 0 ; -} -early_param ("rodata" , parse_rodata); -#ifdef CONFIG_UNMAP_KERNEL_AT_EL0 static int __init map_entry_trampoline (void ) {
init/main.c +15 -3
@@ -1446,13 +1446,25 @@ static noinline void __init kernel_init_#if defined(CONFIG_STRICT_KERNEL_RWX ) || defined(CONFIG_STRICT_MODULE_RWX )bool rodata_enabled__ro_after_init = true; + +#ifndef arch_parse_debug_rodata +static inline bool arch_parse_debug_rodata (char *str) {return false; } +#endif +static int __init set_debug_rodata (char *str) { -if (strtobool (str, &rodata_enabled)) +if (arch_parse_debug_rodata (str)) +return 0 ; + +if (str && !strcmp (str,"on" )) + rodata_enabled = true; +else if (str && !strcmp (str,"off" )) + rodata_enabled = false; +else pr_warn ("Invalid option string for rodata: '%s'\n" , str); -return 1 ; +return 0 ; } -__setup ("rodata=" , set_debug_rodata); +early_param ("rodata" , set_debug_rodata);#endif #ifdef CONFIG_STRICT_KERNEL_RWX
Greg Kroah-Hartman
maintainerPATCH 148/158 arm64/signal: Flush FPSIMD register state when disabling streaming mode
In reply to Greg Kroah-HartmanFrom: Mark Brown <[email protected]>
commit ea64baacbc36a0d552aec0d87107182f40211131 upstream.
When handling a signal delivered to a context with streaming mode enabled we will disable streaming mode for the signal handler, when doing so we should also flush the saved FPSIMD register state like exiting streaming mode in the hardware would do so that if that state is reloaded we get the same behaviour. Without this we will reload whatever the last FPSIMD state that was saved for the task was.
--- arch/arm64/kernel/signal.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/kernel/signal.c +10 -0
@@ -922,6 +922,16 @@ static void setup_return(struct pt_regs/* Signal handlers are invoked with ZA and streaming mode disabled */ if (system_supports_sme ()) { +/* +* If we were in streaming mode the saved register +* state was SVE but we will exit SM and use the +* FPSIMD register state - flush the saved FPSIMD +* register state in case it gets loaded. +*/ +if (current->thread.svcr &SVCR_SM_MASK ) +memset (¤t->thread.uw.fpsimd_state,0 , +sizeof (current->thread.uw.fpsimd_state)); + current->thread.svcr &= ~(SVCR_ZA_MASK |SVCR_SM_MASK );sme_smstop ();
Greg Kroah-Hartman
maintainerPATCH 149/158 arm64/sme: Dont flush SVE register state when allocating SME storage
In reply to Greg Kroah-HartmanFrom: Mark Brown <[email protected]>
commit 826a4fdd2ada9e5923c58bdd168f31a42e958ffc upstream.
Currently when taking a SME access trap we allocate storage for the SVE register state in order to be able to handle storage of streaming mode SVE. Due to the original usage in a purely SVE context the SVE register state allocation this also flushes the register state for SVE if storage was already allocated but in the SME context this is not desirable. For a SME access trap to be taken the task must not be in streaming mode so either there already is SVE register state present for regular SVE mode which would be corrupted or the task does not have TIF_SVE and the flush is redundant.
Fix this by adding a flag to sve_alloc() indicating if we are in a SVE context and need to flush the state. Freshly allocated storage is always zeroed either way.
--- arch/arm64/include/asm/fpsimd.h | 4 ++-- arch/arm64/kernel/fpsimd.c | 10 ++++++---- arch/arm64/kernel/ptrace.c | 6 +++--- arch/arm64/kernel/signal.c | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-)
arch/arm64/include/asm/fpsimd.h +2 -2
@@ -153,7 +153,7 @@ struct vl_info {#ifdef CONFIG_ARM64_SVE -extern void sve_alloc (struct task_struct *task); +extern void sve_alloc (struct task_struct *task,bool flush);extern void fpsimd_release_task (struct task_struct *task);extern void fpsimd_sync_to_sve (struct task_struct *task);extern void fpsimd_force_sync_to_sve (struct task_struct *task);
@@ -256,7 +256,7 @@ size_t sve_state_size(struct task_struct#else /* ! CONFIG_ARM64_SVE */ -static inline void sve_alloc (struct task_struct *task) { } +static inline void sve_alloc (struct task_struct *task,bool flush) { }static inline void fpsimd_release_task (struct task_struct *task) { }static inline void sve_sync_to_fpsimd (struct task_struct *task) { }static inline void sve_sync_from_fpsimd_zeropad (struct task_struct *task) { }
arch/arm64/kernel/fpsimd.c +6 -4
@@ -716,10 +716,12 @@ size_t sve_state_size(struct task_struct* do_sve_acc() case, there is no ABI requirement to hide stale data * written previously be task. */ -void sve_alloc (struct task_struct *task) +void sve_alloc (struct task_struct *task,bool flush) {if (task->thread.sve_state) { -memset (task->thread.sve_state,0 ,sve_state_size (task)); +if (flush) +memset (task->thread.sve_state,0 , +sve_state_size (task));return ; }
@@ -1389,7 +1391,7 @@ void do_sve_acc(unsigned long esr, strucreturn ; } -sve_alloc (current); +sve_alloc (current, true);if (!current->thread.sve_state) {force_sig (SIGKILL );return ;
@@ -1440,7 +1442,7 @@ void do_sme_acc(unsigned long esr, strucreturn ; } -sve_alloc (current); +sve_alloc (current, false);sme_alloc (current);if (!current->thread.sve_state || !current->thread.za_state) {force_sig (SIGKILL );
arch/arm64/kernel/ptrace.c +3 -3
@@ -882,7 +882,7 @@ static int sve_set_common(struct task_st* state and ensure there's storage. */ if (target->thread.svcr != old_svcr) -sve_alloc (target); +sve_alloc (target, true); }/* Registers: FPSIMD-only case */
@@ -912,7 +912,7 @@ static int sve_set_common(struct task_st goto out; } -sve_alloc (target); +sve_alloc (target, true);if (!target->thread.sve_state) { ret = -ENOMEM ;clear_tsk_thread_flag (target,TIF_SVE );
@@ -1082,7 +1082,7 @@ static int za_set(struct task_struct *ta/* Ensure there is some SVE storage for streaming mode */ if (!target->thread.sve_state) { -sve_alloc (target); +sve_alloc (target, false);if (!target->thread.sve_state) {clear_thread_flag (TIF_SME ); ret = -ENOMEM ;
arch/arm64/kernel/signal.c +1 -1
@@ -307,7 +307,7 @@ static int restore_sve_fpsimd_context(stfpsimd_flush_task_state (current);/* From now, fpsimd_thread_switch() won't touch thread.sve_state */ -sve_alloc (current); +sve_alloc (current, true);if (!current->thread.sve_state) {clear_thread_flag (TIF_SVE );return -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 150/158 arm64/sme: Dont flush SVE register state when handling SME traps
In reply to Greg Kroah-HartmanFrom: Mark Brown <[email protected]>
commit 714f3cbd70a4db9f9b7fe5b8a032896ed33fb824 upstream.
Currently as part of handling a SME access trap we flush the SVE register state. This is not needed and would corrupt register state if the task has access to the SVE registers already. For non-streaming mode accesses the required flushing will be done in the SVE access trap. For streaming mode SVE register accesses the architecture guarantees that the register state will be flushed when streaming mode is entered or exited so there is no need for us to do so. Simply remove the register initialisation.
--- arch/arm64/kernel/fpsimd.c | 11 ----------- 1 file changed, 11 deletions(-)
arch/arm64/kernel/fpsimd.c +0 -11
@@ -1463,17 +1463,6 @@ void do_sme_acc(unsigned long esr, strucfpsimd_bind_task_to_cpu (); } -/* -* If SVE was not already active initialise the SVE registers, -* any non-shared state between the streaming and regular SVE -* registers is architecturally guaranteed to be zeroed when -* we enter streaming mode. We do not need to initialize ZA -* since ZA must be disabled at this point and enabling ZA is -* architecturally defined to zero ZA. -*/ -if (system_supports_sve () && !test_thread_flag (TIF_SVE )) -sve_init_regs (); -put_cpu_fpsimd_context (); }
Greg Kroah-Hartman
maintainerPATCH 151/158 scsi: ufs: core: Enable link lost interrupt
In reply to Greg Kroah-HartmanFrom: Kiwoong Kim <[email protected]>
commit 6d17a112e9a63ff6a5edffd1676b99e0ffbcd269 upstream.
Link lost is treated as fatal error with commit c99b9b230149 ("scsi: ufs:
Treat link loss as fatal error"), but the event isn't registered as interrupt source. Enable it.
--- include/ufs/ufshci.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
include/ufs/ufshci.h +1 -5
@@ -135,11 +135,7 @@ static inline u32 ufshci_version(u32 maj#define UFSHCD_UIC_MASK (UIC_COMMAND_COMPL | UFSHCD_UIC_PWR_MASK) -#define UFSHCD_ERROR_MASK (UIC_ERROR |\ - DEVICE_FATAL_ERROR |\ - CONTROLLER_FATAL_ERROR |\ - SYSTEM_BUS_FATAL_ERROR |\ - CRYPTO_ENGINE_FATAL_ERROR) +#define UFSHCD_ERROR_MASK (UIC_ERROR | INT_FATAL_ERRORS)#define INT_FATAL_ERRORS (DEVICE_FATAL_ERROR |\ CONTROLLER_FATAL_ERROR |\
Greg Kroah-Hartman
maintainerPATCH 152/158 scsi: storvsc: Remove WQ_MEM_RECLAIM from storvsc_error_wq
In reply to Greg Kroah-HartmanFrom: Saurabh Sengar <[email protected]>
commit d957e7ffb2c72410bcc1a514153a46719255a5da upstream.
storvsc_error_wq workqueue should not be marked as WQ_MEM_RECLAIM as it doesn't need to make forward progress under memory pressure. Marking this workqueue as WQ_MEM_RECLAIM may cause deadlock while flushing a non-WQ_MEM_RECLAIM workqueue. In the current state it causes the following warning:
[ 14.506347] ------------[ cut here ]------------ [ 14.506354] workqueue: WQ_MEM_RECLAIM storvsc_error_wq_0:storvsc_remove_lun is flushing !WQ_MEM_RECLAIM events_freezable_power_:disk_events_workfn [ 14.506360] WARNING: CPU: 0 PID: 8 at <-snip->kernel/workqueue.c:2623 check_flush_dependency+0xb5/0x130 [ 14.506390] CPU: 0 PID: 8 Comm: kworker/u4:0 Not tainted 5.4.0-1086-azure #91~18.04.1-Ubuntu [ 14.506391] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 05/09/2022 [ 14.506393] Workqueue: storvsc_error_wq_0 storvsc_remove_lun [ 14.506395] RIP: 0010:check_flush_dependency+0xb5/0x130 <-snip-> [ 14.506408] Call Trace: [ 14.506412] __flush_work+0xf1/0x1c0 [ 14.506414] __cancel_work_timer+0x12f/0x1b0 [ 14.506417] ? kernfs_put+0xf0/0x190 [ 14.506418] cancel_delayed_work_sync+0x13/0x20 [ 14.506420] disk_block_events+0x78/0x80 [ 14.506421] del_gendisk+0x3d/0x2f0 [ 14.506423] sr_remove+0x28/0x70 [ 14.506427] device_release_driver_internal+0xef/0x1c0 [ 14.506428] device_release_driver+0x12/0x20 [ 14.506429] bus_remove_device+0xe1/0x150 [ 14.506431] device_del+0x167/0x380 [ 14.506432] __scsi_remove_device+0x11d/0x150 [ 14.506433] scsi_remove_device+0x26/0x40 [ 14.506434] storvsc_remove_lun+0x40/0x60 [ 14.506436] process_one_work+0x209/0x400 [ 14.506437] worker_thread+0x34/0x400 [ 14.506439] kthread+0x121/0x140 [ 14.506440] ? process_one_work+0x400/0x400 [ 14.506441] ? kthread_park+0x90/0x90 [ 14.506443] ret_from_fork+0x35/0x40 [ 14.506445] ---[ end trace 2d9633159fdc6ee7 ]---
--- drivers/scsi/storvsc_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +1 -1
@@ -2012,7 +2012,7 @@ static int storvsc_probe(struct hv_devic*/ host_dev->handle_error_wq =alloc_ordered_workqueue ("storvsc_error_wq_%d" , -WQ_MEM_RECLAIM , +0 , host->host_no);if (!host_dev->handle_error_wq) { ret = -ENOMEM ;
Greg Kroah-Hartman
maintainerPATCH 153/158 scsi: core: Fix passthrough retry counter handling
In reply to Greg Kroah-HartmanFrom: Mike Christie <[email protected]>
commit fac8e558da9485e13a0ae0488aa0b8a8c307cd34 upstream.
Passthrough users will set the scsi_cmnd->allowed value and were expecting up to $allowed retries. The problem is that before:
commit 6aded12b10e0 ("scsi: core: Remove struct scsi_request")
we used to set the retries on the scsi_request then copy them over to scsi_cmnd->allowed in scsi_setup_scsi_cmnd. With that patch we now set scsi_cmnd->allowed to 0 in scsi_prepare_cmd and overwrite what the passthrough user set.
This moves the allowed initialization to after the blk_rq_is_passthrough() check so it's only done for the non-passthrough path where the ULD init_command will normally set an allowed value it prefers.
--- drivers/scsi/scsi_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/scsi_lib.c +2 -1
@@ -1549,7 +1549,6 @@ static blk_status_t scsi_prepare_cmd(strscsi_init_command (sdev, cmd); cmd->eh_eflags =0 ; - cmd->allowed =0 ; cmd->prot_type =0 ; cmd->prot_flags =0 ; cmd->submitter =0 ;
@@ -1600,6 +1599,8 @@ static blk_status_t scsi_prepare_cmd(strreturn ret; } +/* Usually overridden by the ULP */ + cmd->allowed =0 ;memset (cmd->cmnd,0 ,sizeof (cmd->cmnd));return scsi_cmd_to_driver (cmd)->init_command (cmd); }
Greg Kroah-Hartman
maintainerPATCH 154/158 riscv: dts: microchip: mpfs: fix incorrect pcie child node name
In reply to Greg Kroah-HartmanFrom: Conor Dooley <[email protected]>
commit 3f67e69976035352db110443916bcce32c7f64ac upstream.
Recent versions of dt-schema complain about the PCIe controller's child
node name:arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: pcie@2000000000: Unevaluated properties are not allowed ('clock-names', 'clocks', 'legacy-interrupt-controller', 'microchip,axi-m-atr0' were unexpected)
From schema: Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml
Make the dts match the correct property name in the dts.
--- arch/riscv/boot/dts/microchip/mpfs.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/boot/dts/microchip/mpfs.dtsi +1 -1
@@ -448,7 +448,7 @@ msi-controller; microchip,axi-m-atr0 = <0x10 0x0>; status = "disabled"; - pcie_intc: legacy-interrupt-controller { + pcie_intc: interrupt-controller { #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller;
Greg Kroah-Hartman
maintainerPATCH 155/158 riscv: dts: microchip: mpfs: remove ti,fifo-depth property
In reply to Greg Kroah-HartmanFrom: Conor Dooley <[email protected]>
commit 72a05748cbd285567d69f173f8694e3471b79f20 upstream.
Recent versions of dt-schema warn about a previously undetected undocument property on the icicle & polarberry devicetrees:
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: ethernet@20112000: ethernet-phy@8: Unevaluated properties are not allowed ('ti,fifo-depth' was unexpected)
From schema: Documentation/devicetree/bindings/net/cdns,macb.yaml
I know what you're thinking, the binding doesn't look to be the problem and I agree. I am not sure why a TI vendor property was ever actually added since it has no meaning... just get rid of it.
--- arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 2 -- arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 2 -- 2 files changed, 4 deletions(-)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts +0 -2
@@ -84,12 +84,10 @@ phy1: ethernet-phy@9 { reg = <9>; - ti,fifo-depth = <0x1>; }; phy0: ethernet-phy@8 { reg = <8>; - ti,fifo-depth = <0x1>; }; };
arch/riscv/boot/dts/microchip/mpfs-polarberry.dts +0 -2
@@ -54,12 +54,10 @@ phy1: ethernet-phy@5 { reg = <5>; - ti,fifo-depth = <0x01>; }; phy0: ethernet-phy@4 { reg = <4>; - ti,fifo-depth = <0x01>; }; };
Greg Kroah-Hartman
maintainerPATCH 156/158 riscv: dts: microchip: mpfs: remove bogus card-detect-delay
In reply to Greg Kroah-HartmanFrom: Conor Dooley <[email protected]>
commit 2b55915d27dcaa35f54bad7925af0a76001079bc upstream.
Recent versions of dt-schema warn about a previously undetected
undocumented property:arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dtb: mmc@20008000: Unevaluated properties are not allowed ('card-detect-delay' was unexpected)
From schema: Documentation/devicetree/bindings/mmc/cdns,sdhci.yaml
There are no GPIOs connected to MSSIO6B4 pin K3 so adding the common cd-debounce-delay-ms property makes no sense. The Cadence IP has a register that sets the card detect delay as "DP * tclk". On MPFS, this clock frequency is not configurable (it must be 200 MHz) & the FPGA comes out of reset with this register already set.
--- arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts | 1 - arch/riscv/boot/dts/microchip/mpfs-polarberry.dts | 1 - 2 files changed, 2 deletions(-)
arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts +0 -1
@@ -100,7 +100,6 @@ &mmc { disable-wp; cap-sd-highspeed; cap-mmc-highspeed; - card-detect-delay = <200>; mmc-ddr-1_8v; mmc-hs200-1_8v; sd-uhs-sdr12;
arch/riscv/boot/dts/microchip/mpfs-polarberry.dts +0 -1
@@ -70,7 +70,6 @@ &mmc { disable-wp; cap-sd-highspeed; cap-mmc-highspeed; - card-detect-delay = <200>; mmc-ddr-1_8v; mmc-hs200-1_8v; sd-uhs-sdr12;
Signature · 1 line
2.37.2
Greg Kroah-Hartman
maintainerPATCH 157/158 riscv: dts: microchip: mpfs: remove pci axi address translation property
In reply to Greg Kroah-HartmanFrom: Conor Dooley <[email protected]>
commit e4009c5fa77b4356aa37ce002e9f9952dfd7a615 upstream.
An AXI master address translation table property was inadvertently added to the device tree & this was not caught by dtbs_check at the time. Remove the property - it should not be in mpfs.dtsi anyway as it would be more suitable in -fabric.dtsi nor does it actually apply to the version of the reference design we are using for upstream.
--- arch/riscv/boot/dts/microchip/mpfs.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/riscv/boot/dts/microchip/mpfs.dtsi +0 -1
@@ -446,7 +446,6 @@ ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>; msi-parent = <&pcie>; msi-controller; - microchip,axi-m-atr0 = <0x10 0x0>; status = "disabled"; pcie_intc: interrupt-controller { #address-cells = <0>;
Greg Kroah-Hartman
maintainerPATCH 158/158 bpf: Dont use tnum_range on array range checking for poke descriptors
In reply to Greg Kroah-HartmanFrom: Daniel Borkmann <[email protected]>
commit a657182a5c5150cdfacb6640aad1d2712571a409 upstream.
Hsin-Wei reported a KASAN splat triggered by their BPF runtime fuzzer which is based on a customized syzkaller:
BUG: KASAN: slab-out-of-bounds in bpf_int_jit_compile+0x1257/0x13f0 Read of size 8 at addr ffff888004e90b58 by task syz-executor.0/1489 CPU: 1 PID: 1489 Comm: syz-executor.0 Not tainted 5.19.0 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x9c/0xc9 print_address_description.constprop.0+0x1f/0x1f0 ? bpf_int_jit_compile+0x1257/0x13f0 kasan_report.cold+0xeb/0x197 ? kvmalloc_node+0x170/0x200 ? bpf_int_jit_compile+0x1257/0x13f0 bpf_int_jit_compile+0x1257/0x13f0 ? arch_prepare_bpf_dispatcher+0xd0/0xd0 ? rcu_read_lock_sched_held+0x43/0x70 bpf_prog_select_runtime+0x3e8/0x640 ? bpf_obj_name_cpy+0x149/0x1b0 bpf_prog_load+0x102f/0x2220 ? __bpf_prog_put.constprop.0+0x220/0x220 ? find_held_lock+0x2c/0x110 ? __might_fault+0xd6/0x180 ? lock_downgrade+0x6e0/0x6e0 ? lock_is_held_type+0xa6/0x120 ? __might_fault+0x147/0x180 __sys_bpf+0x137b/0x6070 ? bpf_perf_link_attach+0x530/0x530 ? new_sync_read+0x600/0x600 ? __fget_files+0x255/0x450 ? lock_downgrade+0x6e0/0x6e0 ? fput+0x30/0x1a0 ? ksys_write+0x1a8/0x260 __x64_sys_bpf+0x7a/0xc0 ? syscall_enter_from_user_mode+0x21/0x70 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f917c4e2c2d
The problem here is that a range of tnum_range(0, map->max_entries - 1) has limited ability to represent the concrete tight range with the tnum as the set of resulting states from value + mask can result in a superset of the actual intended range, and as such a tnum_in(range, reg->var_off) check may yield true when it shouldn't, for example tnum_range(0, 2) would result in 00XX -> v = 0000, m = 0011 such that the intended set of {0, 1, 2} is here represented by a less precise superset of {0, 1, 2, 3}. As the register is known const scalar, really just use the concrete reg->var_off.value for the upper index check.
--- kernel/bpf/verifier.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
kernel/bpf/verifier.c +4 -6
@@ -6999,8 +6999,7 @@ record_func_key(struct bpf_verifier_envstruct bpf_insn_aux_data *aux = &env->insn_aux_data[insn_idx];struct bpf_reg_state *regs =cur_regs (env), *reg;struct bpf_map *map = meta->map_ptr; -struct tnum range; -u64 val; +u64 val, max;int err;if (func_id != BPF_FUNC_tail_call)
@@ -7010,10 +7009,11 @@ record_func_key(struct bpf_verifier_envreturn -EINVAL ; } - range =tnum_range (0 , map->max_entries -1 ); reg = ®s[BPF_REG_3 ]; + val = reg->var_off.value; + max = map->max_entries; -if (!register_is_const (reg) || !tnum_in (range, reg->var_off)) { +if (!(register_is_const (reg) && val < max)) {bpf_map_key_store (aux,BPF_MAP_KEY_POISON );return 0 ; }
@@ -7021,8 +7021,6 @@ record_func_key(struct bpf_verifier_env err =mark_chain_precision (env,BPF_REG_3 );if (err)return err; - - val = reg->var_off.value;if (bpf_map_key_unseen (aux))bpf_map_key_store (aux, val); else if (!bpf_map_key_poisoned(aux) &&
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.thanks,
greg k-h
On ARCH_BRCMSTB using 32-bit and 64-bit ARM kernels and build tested on BMIPS_GENERIC:
Signature · 1 line
Florian
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.thanks,
greg k-h
Hi Greg,
Compiled and booted on my test system Lenovo P50s: Intel Core i7 No emergency and critical messages in the dmesg
./perf bench sched all
# Running sched/messaging benchmark...
# 20 sender and receiver processes per group
# 10 groups == 400 processes run
Total time: 0.692 [sec]
# Running sched/pipe benchmark...
# Executed 1000000 pipe operations between two processes
Total time: 8.521 [sec]
8.521891 usecs/op
117344 ops/secThanks
-Zan
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
Build results:
total: 150 pass: 150 fail: 0 Qemu test results: total: 489 pass: 489 fail: 0
Guenter
Hello!
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro's test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 5.19.6-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-5.19.y
* git commit: 5cfa6cf5bd86ffb0f956ff2ac4876ec6905dd3cf
* git describe: v5.19.4-161-g5cfa6cf5bd86
* test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.19.y/build/v5.19.4-161-g5cfa6cf5bd86
## No test regressions (compared to v5.19.5)
## No metric regressions (compared to v5.19.5)
## No test fixes (compared to v5.19.5)
## No metric fixes (compared to v5.19.5)
## Test result summary
total: 112530, pass: 101420, fail: 894, skip: 9953, xfail: 263
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 306 total, 303 passed, 3 failed
* arm64: 68 total, 65 passed, 3 failed
* i386: 57 total, 51 passed, 6 failed
* mips: 50 total, 47 passed, 3 failed
* parisc: 14 total, 14 passed, 0 failed
* powerpc: 65 total, 56 passed, 9 failed
* riscv: 32 total, 26 passed, 6 failed
* s390: 22 total, 20 passed, 2 failed
* sh: 26 total, 24 passed, 2 failed
* sparc: 14 total, 14 passed, 0 failed
* x86_64: 61 total, 58 passed, 3 failed
## Test suites summary
* fwts
* igt-gpu-tools
* kunit
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-open-posix-tests
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* network-basic-tests
* packetdrill
* rcutorture
* v4l2-compliance
* vdso
Greetings!
Daniel Díaz
[email protected]
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
Build test (gcc version 12.2.1 20220819):
mips: 59 configs -> 1 failure
arm: 99 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
csky allmodconfig -> fails
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failure
mips and csky are known failure. Fix not yet in mainline.
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
mips: Booted on ci20 board. No regression. [3]
DRM warnings in rpi4b, now fixed in mainline. Will need:258e483a4d5e ("drm/vc4: hdmi: Rework power up") 72e2329e7c9b ("drm/vc4: hdmi: Depends on CONFIG_PM")
[1]. https://openqa.qa.codethink.co.uk/tests/1731
[2]. https://openqa.qa.codethink.co.uk/tests/1734
[3]. https://openqa.qa.codethink.co.uk/tests/1736
--
Regards
Sudip
Greg Kroah-Hartman
maintainerQuoted 31 lines · Sudip Mukherjee (Codethink)
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
Build test (gcc version 12.2.1 20220819):
mips: 59 configs -> 1 failure
arm: 99 configs -> no failure
arm64: 3 configs -> no failurex86_64: 4 configs -> no failure
alpha allmodconfig -> no failure
csky allmodconfig -> fails
powerpc allmodconfig -> no failure
riscv allmodconfig -> no failure
s390 allmodconfig -> no failure
xtensa allmodconfig -> no failuremips and csky are known failure. Fix not yet in mainline.
Boot test:
x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
arm64: Booted on rpi4b (4GB model). No regression. [2]
mips: Booted on ci20 board. No regression. [3]
Quoted 4 lines
DRM warnings in rpi4b, now fixed in mainline. Will need:
258e483a4d5e("drm/vc4: hdmi: Rework power up")72e2329e7c9b("drm/vc4: hdmi: Depends onCONFIG_PM")
Both now queued up, thanks!
greg k-h
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.1.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Successfully cross-compiled for arm64 (bcm2711_defconfig, GCC 10.2.0) and powerpc (ps3_defconfig, GCC 12.1.0).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Hey Greg,
Ran tests and boot tested on my system, no regression found
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
Hi Greg,
5.19.6-rc1 tested.
Run tested on:
- Intel Tiger Lake x86_64 (nuc11 i7-1165G7)
In addition - build tested for:
- Allwinner A64
- Allwinner H3
- Allwinner H5
- Allwinner H6
- NXP iMX6
- NXP iMX8
- Qualcomm Dragonboard
- Rockchip RK3288
- Rockchip RK3328
- Rockchip RK3399pro
- Samsung Exynos
--
Rudi
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.thanks,
greg k-h
Tested rc1 against the Fedora build system (aarch64, armv7, ppc64le, s390x, x86_64), and boot tested x86_64. No regressions noted.
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.19.6 release. There are 158 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Responses should be made by Wed, 31 Aug 2022 10:57:37 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.19.6-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.19.y
and the diffstat can be found below.
openSUSE configs¹⁾ all green.
¹⁾ armv6hl armv7hl arm64 i386 ppc64 ppc64le riscv64 s390x x86_64
Signature · 2 lines
js suse labs