5.15.181-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 276/373 PCI: Assign PCI domain IDs by ida_alloc()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit c14f7ccc9f5dcf9d06ddeec706f85405b2c80600 ]
Replace assignment of PCI domain IDs from atomic_inc_return() to ida_alloc().
Use two IDAs, one for static domain allocations (those which are defined in device tree) and second for dynamic allocations (all other).
During removal of root bus / host bridge, also release the domain ID. The released ID can be reused again, for example when dynamically loading and unloading native PCI host bridge drivers.
This change also allows to mix static device tree assignment and dynamic by kernel as all static allocations are reserved in dynamic pool.
Stable-dep-of: 804443c1f278 ("PCI: Fix reference leak in pci_register_host_bridge()")
--- drivers/pci/pci.c | 103 +++++++++++++++++++++++++------------------ drivers/pci/probe.c | 7 +++ drivers/pci/remove.c | 6 +++ include/linux/pci.h | 1 + 4 files changed, 74 insertions(+), 43 deletions(-)
drivers/pci/pci.c +60 -43
@@ -6709,60 +6709,70 @@ static void pci_no_domains(void) }#ifdef CONFIG_PCI_DOMAINS_GENERIC -static atomic_t __domain_nr =ATOMIC_INIT (-1 ); +static DEFINE_IDA (pci_domain_nr_static_ida); +static DEFINE_IDA (pci_domain_nr_dynamic_ida); -static int pci_get_new_domain_nr (void ) +static void of_pci_reserve_static_domain_nr (void ) { -return atomic_inc_return (&__domain_nr); +struct device_node *np; +int domain_nr; + +for_each_node_by_type (np,"pci" ) { + domain_nr =of_get_pci_domain_nr (np); +if (domain_nr <0 ) +continue ; +/* +* Permanently allocate domain_nr in dynamic_ida +* to prevent it from dynamic allocation. +*/ +ida_alloc_range (&pci_domain_nr_dynamic_ida, + domain_nr, domain_nr,GFP_KERNEL ); + } }static int of_pci_bus_find_domain_nr (struct device *parent) { -static int use_dt_domains =-1 ; -int domain =-1 ; +static bool static_domains_reserved = false; +int domain_nr; -if (parent) - domain =of_get_pci_domain_nr (parent->of_node); +/* On the first call scan device tree for static allocations. */ +if (!static_domains_reserved) { +of_pci_reserve_static_domain_nr (); + static_domains_reserved = true; + } + +if (parent) { +/* +* If domain is in DT, allocate it in static IDA. This +* prevents duplicate static allocations in case of errors +* in DT. +*/ + domain_nr =of_get_pci_domain_nr (parent->of_node); +if (domain_nr >=0 ) +return ida_alloc_range (&pci_domain_nr_static_ida, + domain_nr, domain_nr, +GFP_KERNEL ); + }/* -* Check DT domain and use_dt_domains values. -* -* If DT domain property is valid (domain >= 0) and -* use_dt_domains != 0, the DT assignment is valid since this means -* we have not previously allocated a domain number by using -* pci_get_new_domain_nr(); we should also update use_dt_domains to -* 1, to indicate that we have just assigned a domain number from -* DT. -* -* If DT domain property value is not valid (ie domain < 0), and we -* have not previously assigned a domain number from DT -* (use_dt_domains != 1) we should assign a domain number by -* using the: -* -* pci_get_new_domain_nr() -* -* API and update the use_dt_domains value to keep track of method we -* are using to assign domain numbers (use_dt_domains = 0). -* -* All other combinations imply we have a platform that is trying -* to mix domain numbers obtained from DT and pci_get_new_domain_nr(), -* which is a recipe for domain mishandling and it is prevented by -* invalidating the domain value (domain = -1) and printing a -* corresponding error. +* If domain was not specified in DT, choose a free ID from dynamic +* allocations. All domain numbers from DT are permanently in +* dynamic allocations to prevent assigning them to other DT nodes +* without static domain. */ -if (domain >=0 && use_dt_domains) { - use_dt_domains =1 ; - }else if (domain <0 && use_dt_domains !=1 ) { - use_dt_domains =0 ; - domain =pci_get_new_domain_nr (); - }else { -if (parent) -pr_err ("Node %pOF has " , parent->of_node); -pr_err ("Inconsistent \"linux,pci-domain\" property in DT\n" ); - domain =-1 ; - } +return ida_alloc (&pci_domain_nr_dynamic_ida,GFP_KERNEL ); +} -return domain; +static void of_pci_bus_release_domain_nr (struct pci_bus *bus,struct device *parent) +{ +if (bus->domain_nr <0 ) +return ; + +/* Release domain from IDA where it was allocated. */ +if (of_get_pci_domain_nr (parent->of_node) == bus->domain_nr) +ida_free (&pci_domain_nr_static_ida, bus->domain_nr); +else +ida_free (&pci_domain_nr_dynamic_ida, bus->domain_nr); }int pci_bus_find_domain_nr (struct pci_bus *bus,struct device *parent)
@@ -6770,6 +6780,13 @@ int pci_bus_find_domain_nr(struct pci_bus *bus, struct device *parent)return acpi_disabled ?of_pci_bus_find_domain_nr (parent) : acpi_pci_bus_find_domain_nr(bus); } + +void pci_bus_release_domain_nr (struct pci_bus *bus,struct device *parent) +{ +if (!acpi_disabled) +return ; +of_pci_bus_release_domain_nr (bus, parent); +}#endif /**
drivers/pci/probe.c +7 -0
@@ -908,6 +908,10 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) bus->domain_nr =pci_bus_find_domain_nr (bus, parent); else bus->domain_nr = bridge->domain_nr; +if (bus->domain_nr <0 ) { + err = bus->domain_nr; + goto free; + }#endif b =pci_find_bus (pci_domain_nr (bus), bridge->busnr);
@@ -1029,6 +1033,9 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)device_del (&bridge->dev); free: +#ifdef CONFIG_PCI_DOMAINS_GENERIC +pci_bus_release_domain_nr (bus ,parent ); +#endif kfree (bus);return err; }
drivers/pci/remove.c +6 -0
@@ -160,6 +160,12 @@ void pci_remove_root_bus(struct pci_bus *bus)pci_remove_bus (bus); host_bridge->bus =NULL ; +#ifdef CONFIG_PCI_DOMAINS_GENERIC +/* Release domain_nr if it was dynamically allocated */ +if (host_bridge->domain_nr ==PCI_DOMAIN_NR_NOT_SET ) +pci_bus_release_domain_nr (bus, host_bridge->dev.parent); +#endif +/* remove the host bridge */ device_del (&host_bridge->dev); }
include/linux/pci.h +1 -0
@@ -1719,6 +1719,7 @@ static inline int acpi_pci_bus_find_domain_nr(struct pci_bus *bus) {return 0 ; }#endif int pci_bus_find_domain_nr (struct pci_bus *bus,struct device *parent); +void pci_bus_release_domain_nr (struct pci_bus *bus,struct device *parent);#endif /* Some architectures require additional setup to direct VGA traffic */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 277/373 PCI: Fix reference leak in pci_register_host_bridge()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ma Ke <[email protected]>
[ Upstream commit 804443c1f27883926de94c849d91f5b7d7d696e9 ]
If device_register() fails, call put_device() to give up the reference to avoid a memory leak, per the comment at device_register().
Found by code review.
[bhelgaas: squash Dan Carpenter's double free fix from
https://lore.kernel.org/r/[email protected]]
--- drivers/pci/probe.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/pci/probe.c +7 -2
@@ -888,6 +888,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)resource_size_t offset, next_offset;LIST_HEAD (resources);struct resource *res, *next_res; +bool bus_registered = false;char addr[64 ], *fmt;const char *name;int err;
@@ -951,6 +952,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) name =dev_name (&bus->dev); err =device_register (&bus->dev); + bus_registered = true;if (err) goto unregister;
@@ -1031,12 +1033,15 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge) unregister:put_device (&bridge->dev);device_del (&bridge->dev); - free: #ifdef CONFIG_PCI_DOMAINS_GENERICpci_bus_release_domain_nr (bus ,parent );#endif -kfree (bus); +if (bus_registered) +put_device (&bus->dev); +else +kfree (bus); +return err; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 278/373 ksmbd: Prevent integer overflow in calculation of deadtime
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Denis Arefev <[email protected]>
[ Upstream commit a93ff742820f75bf8bb3fcf21d9f25ca6eb3d4c6 ]
The user can set any value for 'deadtime'. This affects the arithmetic expression 'req->deadtime * SMB_ECHO_INTERVAL', which is subject to overflow. The added check makes the server behavior more predictable.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- fs/ksmbd/transport_ipc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
fs/ksmbd/transport_ipc.c +6 -1
@@ -294,7 +294,11 @@ static int ipc_server_config_on_startup(struct ksmbd_startup_request *req) server_conf.signing = req->signing; server_conf.tcp_port = req->tcp_port; server_conf.ipc_timeout = req->ipc_timeout *HZ ; - server_conf.deadtime = req->deadtime *SMB_ECHO_INTERVAL ; +if (check_mul_overflow (req->deadtime,SMB_ECHO_INTERVAL , + &server_conf.deadtime)) { + ret = -EINVAL ; + goto out; + } server_conf.share_fake_fscaps = req->share_fake_fscaps;ksmbd_init_domain (req->sub_auth);
@@ -317,6 +321,7 @@ static int ipc_server_config_on_startup(struct ksmbd_startup_request *req) ret |=ksmbd_set_work_group (req->work_group); ret |=ksmbd_tcp_set_interfaces (KSMBD_STARTUP_CONFIG_INTERFACES (req), req->ifc_list_sz); +out:if (ret) { pr_err("Server configuration error: %s %s %s\n", req->netbios_name, req->server_string,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 279/373 selftests/mm: generate a temporary mountpoint for cgroup filesystem
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <[email protected]>
[ Upstream commit 9c02223e2d9df5cb37c51aedb78f3960294e09b5 ]
Currently if the filesystem for the cgroups version it wants to use is not mounted charge_reserved_hugetlb.sh and hugetlb_reparenting_test.sh tests will attempt to mount it on the hard coded path /dev/cgroup/memory, deleting that directory when the test finishes. This will fail if there is not a preexisting directory at that path, and since the directory is deleted subsequent runs of the test will fail. Instead of relying on this hard coded directory name use mktemp to generate a temporary directory to use as a mountpoint, fixing both the assumption and the disruption caused by deleting a preexisting directory.
This means that if the relevant cgroup filesystem is not already mounted then we rely on having coreutils (which provides mktemp) installed. I suspect that many current users are relying on having things automounted by default, and given that the script relies on bash it's probably not an unreasonable requirement.
--- tools/testing/selftests/vm/charge_reserved_hugetlb.sh | 4 ++-- tools/testing/selftests/vm/hugetlb_reparenting_test.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/vm/charge_reserved_hugetlb.sh +2 -2
@@ -27,7 +27,7 @@ fi if [[ $cgroup2 ]]; then cgroup_path=$(mount -t cgroup2 | head -1 | awk '{print $3}') if [[ -z "$cgroup_path" ]]; then - cgroup_path=/dev/cgroup/memory + cgroup_path=$(mktemp -d) mount -t cgroup2 none $cgroup_path do_umount=1 fi
@@ -35,7 +35,7 @@ if [[ $cgroup2 ]]; then else cgroup_path=$(mount -t cgroup | grep ",hugetlb" | awk '{print $3}') if [[ -z "$cgroup_path" ]]; then - cgroup_path=/dev/cgroup/memory + cgroup_path=$(mktemp -d) mount -t cgroup memory,hugetlb $cgroup_path do_umount=1 fi
tools/testing/selftests/vm/hugetlb_reparenting_test.sh +1 -1
@@ -22,7 +22,7 @@ fi if [[ $cgroup2 ]]; then CGROUP_ROOT=$(mount -t cgroup2 | head -1 | awk '{print $3}') if [[ -z "$CGROUP_ROOT" ]]; then - CGROUP_ROOT=/dev/cgroup/memory + CGROUP_ROOT=$(mktemp -d) mount -t cgroup2 none $CGROUP_ROOT do_umount=1 fi
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 280/373 kmsan: disable strscpy() optimization under KMSAN
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Potapenko <[email protected]>
[ Upstream commit 2de6f3bf75058e35eff04e6fab7ca41533bdb027 ]
Disable the efficient 8-byte reading under KMSAN to avoid false positives.
Stable-dep-of: d94c12bd97d5 ("string: Add load_unaligned_zeropad() code path to sized_strscpy()")
--- lib/string.c | 8 ++++++++ 1 file changed, 8 insertions(+)
lib/string.c +8 -0
@@ -202,6 +202,14 @@ ssize_t strscpy(char *dest, const char *src, size_t count) max =0 ;#endif +/* +* read_word_at_a_time() below may read uninitialized bytes after the +* trailing zero and use them in comparisons. Disable this optimization +* under KMSAN to prevent false positive reports. +*/ +if (IS_ENABLED (CONFIG_KMSAN )) + max =0 ; +while (max >=sizeof (unsigned long )) {unsigned long c, data;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 281/373 string: Add load_unaligned_zeropad() code path to sized_strscpy()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Collingbourne <[email protected]>
[ Upstream commit d94c12bd97d567de342fd32599e7cd9e50bfa140 ]
The call to read_word_at_a_time() in sized_strscpy() is problematic with MTE because it may trigger a tag check fault when reading across a tag granule (16 bytes) boundary. To make this code MTE compatible, let's start using load_unaligned_zeropad() on architectures where it is available (i.e. architectures that define CONFIG_DCACHE_WORD_ACCESS). Because load_unaligned_zeropad() takes care of page boundaries as well as tag granule boundaries, also disable the code preventing crossing page boundaries when using load_unaligned_zeropad().
--- lib/string.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
lib/string.c +10 -3
@@ -186,6 +186,7 @@ ssize_t strscpy(char *dest, const char *src, size_t count)if (count ==0 ||WARN_ON_ONCE (count >INT_MAX ))return -E2BIG ; +#ifndef CONFIG_DCACHE_WORD_ACCESS #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS /* * If src is unaligned, don't cross a page boundary,
@@ -200,12 +201,14 @@ ssize_t strscpy(char *dest, const char *src, size_t count)/* If src or dest is unaligned, don't do word-at-a-time. */ if (((long ) dest | (long ) src) & (sizeof (long ) -1 )) max =0 ; +#endif #endif /* -* read_word_at_a_time() below may read uninitialized bytes after the -* trailing zero and use them in comparisons. Disable this optimization -* under KMSAN to prevent false positive reports. +* load_unaligned_zeropad() or read_word_at_a_time() below may read +* uninitialized bytes after the trailing zero and use them in +* comparisons. Disable this optimization under KMSAN to prevent +* false positive reports. */ if (IS_ENABLED (CONFIG_KMSAN )) max =0 ;
@@ -213,7 +216,11 @@ ssize_t strscpy(char *dest, const char *src, size_t count)while (max >=sizeof (unsigned long )) {unsigned long c, data; +#ifdef CONFIG_DCACHE_WORD_ACCESS + c =load_unaligned_zeropad (src+res); +#else c =read_word_at_a_time (src+res); +#endif if (has_zero (c, &data, &constants)) { data =prep_zero_mask (c, data, &constants); data =create_zero_mask (data);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 282/373 drm/msm/a6xx: Improve gpu recovery sequence
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Akhil P Oommen <[email protected]>
[ Upstream commit 3a9dd708b902a1a646c3725151554cbef16c2c28 ]
We can do a few more things to improve our chance at a successful gpu recovery, especially during a hangcheck timeout:
1. Halt CP and GMU core
2. Do RBBM GBIF HALT sequence
3. Do a soft reset of GPU core
Patchwork: https://patchwork.freedesktop.org/patch/498400/
Stable-dep-of: f561db72a663 ("drm/msm/a6xx: Fix stale rpmh votes from GPU")
--- drivers/gpu/drm/msm/adreno/a6xx.xml.h | 4 ++ drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 77 ++++++++++++++++----------- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++ 3 files changed, 58 insertions(+), 30 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx.xml.h +4 -0
@@ -1354,6 +1354,10 @@ static inline uint32_t REG_A6XX_RBBM_PERFCTR_RBBM_SEL(uint32_t i0) { return 0x00#define REG_A6XX_RBBM_GBIF_CLIENT_QOS_CNTL 0x00000011 +#define REG_A6XX_RBBM_GBIF_HALT 0x00000016 + +#define REG_A6XX_RBBM_GBIF_HALT_ACK 0x00000017 +#define REG_A6XX_RBBM_WAIT_FOR_GPU_IDLE_CMD 0x0000001c#define A6XX_RBBM_WAIT_FOR_GPU_IDLE_CMD_WAIT_GPU_IDLE 0x00000001
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +47 -30
98 lines not on this page · raw message
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +7 -0
@@ -891,6 +891,10 @@ static int hw_init(struct msm_gpu *gpu)/* Make sure the GMU keeps the GPU on while we set it up */ a6xx_gmu_set_oob (&a6xx_gpu->gmu,GMU_OOB_GPU_SET ); +/* Clear GBIF halt in case GX domain was not collapsed */ +if (a6xx_has_gbif (adreno_gpu)) +gpu_write (gpu,REG_A6XX_RBBM_GBIF_HALT ,0 ); +gpu_write (gpu,REG_A6XX_RBBM_SECVID_TSB_CNTL ,0 );/*
@@ -1174,6 +1178,9 @@ static void a6xx_recover(struct msm_gpu *gpu)if (hang_debug)a6xx_dump (gpu); +/* Halt SQE first */ +gpu_write (gpu,REG_A6XX_CP_SQE_CNTL ,3 ); +/* * Turn off keep alive that might have been enabled by the hang * interrupt
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 283/373 drm/msm/a6xx: Handle GMU prepare-slumber hfi failure
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Akhil P Oommen <[email protected]>
[ Upstream commit d6463fd4e97545ef4f7069d13a5fa3ac0924dae2 ]
When prepare-slumber hfi fails, we should follow a6xx_gmu_force_off() sequence.
Patchwork: https://patchwork.freedesktop.org/patch/498401/
Stable-dep-of: f561db72a663 ("drm/msm/a6xx: Fix stale rpmh votes from GPU")
--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +5 -1
@@ -1082,7 +1082,11 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu)a6xx_bus_clear_pending_transactions (adreno_gpu);/* tell the GMU we want to slumber */ -a6xx_gmu_notify_slumber (gmu); + ret =a6xx_gmu_notify_slumber (gmu); +if (ret) { +a6xx_gmu_force_off (gmu); +return ; + } ret = gmu_poll_timeout(gmu, REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS, val,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 284/373 drm/msm/a6xx: Avoid gx gbit halt during rpm suspend
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Akhil P Oommen <[email protected]>
[ Upstream commit f4a75b5933c998e60fd812a7680e0971eb1c7cee ]
As per the downstream driver, gx gbif halt is required only during recovery sequence. So lets avoid it during regular rpm suspend.
Patchwork: https://patchwork.freedesktop.org/patch/515279/
Stable-dep-of: f561db72a663 ("drm/msm/a6xx: Fix stale rpmh votes from GPU")
--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 15 +++++++++------ drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +++++++ drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 1 + 3 files changed, 17 insertions(+), 6 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +9 -6
@@ -872,7 +872,8 @@ static void a6xx_gmu_rpmh_off(struct a6xx_gmu *gmu)#define GBIF_CLIENT_HALT_MASK BIT(0)#define GBIF_ARB_HALT_MASK BIT(1) -static void a6xx_bus_clear_pending_transactions (struct adreno_gpu *adreno_gpu) +static void a6xx_bus_clear_pending_transactions (struct adreno_gpu *adreno_gpu, +bool gx_off) {struct msm_gpu *gpu = &adreno_gpu->base;
@@ -885,9 +886,11 @@ static void a6xx_bus_clear_pending_transactions(struct adreno_gpu *adreno_gpu)return ; } -/* Halt the gx side of GBIF */ -gpu_write (gpu,REG_A6XX_RBBM_GBIF_HALT ,1 ); -spin_until (gpu_read (gpu,REG_A6XX_RBBM_GBIF_HALT_ACK ) &1 ); +if (gx_off) { +/* Halt the gx side of GBIF */ +gpu_write (gpu,REG_A6XX_RBBM_GBIF_HALT ,1 ); +spin_until (gpu_read (gpu,REG_A6XX_RBBM_GBIF_HALT_ACK ) &1 ); + }/* Halt new client requests on GBIF */ gpu_write (gpu,REG_A6XX_GBIF_HALT ,GBIF_CLIENT_HALT_MASK );
@@ -925,7 +928,7 @@ static void a6xx_gmu_force_off(struct a6xx_gmu *gmu)/* Halt the gmu cm3 core */ gmu_write (gmu,REG_A6XX_GMU_CM3_SYSRESET ,1 ); -a6xx_bus_clear_pending_transactions (adreno_gpu); +a6xx_bus_clear_pending_transactions (adreno_gpu, true);/* Reset GPU core blocks */ gpu_write (gpu,REG_A6XX_RBBM_SW_RESET_CMD ,1 );
@@ -1079,7 +1082,7 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu)return ; } -a6xx_bus_clear_pending_transactions (adreno_gpu); +a6xx_bus_clear_pending_transactions (adreno_gpu, a6xx_gpu->hung);/* tell the GMU we want to slumber */ ret =a6xx_gmu_notify_slumber (gmu);
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +7 -0
@@ -1178,6 +1178,12 @@ static void a6xx_recover(struct msm_gpu *gpu)if (hang_debug)a6xx_dump (gpu); +/* +* To handle recovery specific sequences during the rpm suspend we are +* about to trigger +*/ + a6xx_gpu->hung = true; +/* Halt SQE first */ gpu_write (gpu,REG_A6XX_CP_SQE_CNTL ,3 );
@@ -1191,6 +1197,7 @@ static void a6xx_recover(struct msm_gpu *gpu) gpu->funcs->pm_resume (gpu);msm_gpu_hw_init (gpu); + a6xx_gpu->hung = false; }static const char *a6xx_uche_fault_block (struct msm_gpu *gpu,u32 mid)
drivers/gpu/drm/msm/adreno/a6xx_gpu.h +1 -0
@@ -32,6 +32,7 @@ struct a6xx_gpu {void *llc_slice;void *htw_llc_slice;bool have_mmu500; +bool hung; };#define to_a6xx_gpu (x) container_of(x, struct a6xx_gpu, base)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 285/373 drm/msm/a6xx: Fix stale rpmh votes from GPU
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Akhil P Oommen <[email protected]>
[ Upstream commit f561db72a663f8a73c2250bf3244ce1ce221bed7 ]
It was observed on sc7180 (A618 gpu) that GPU votes for GX rail and CNOC BCM nodes were not removed after GPU suspend. This was because we skipped sending 'prepare-slumber' request to gmu during suspend sequence in some cases. So, make sure we always call prepare-slumber hfi during suspend. Also, calling prepare-slumber without a prior oob-gpu handshake messes up gmu firmware's internal state. So, do that when required.
Patchwork: https://patchwork.freedesktop.org/patch/639569/
--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 72 +++++++++++++++------------ 1 file changed, 39 insertions(+), 33 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +39 -33
@@ -1066,49 +1066,50 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu) struct a6xx_gpu *a6xx_gpu = container_of(gmu, struct a6xx_gpu, gmu);struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;u32 val; +int ret;/* -* The GMU may still be in slumber unless the GPU started so check and -* skip putting it back into slumber if so +* GMU firmware's internal power state gets messed up if we send "prepare_slumber" hfi when +* oob_gpu handshake wasn't done after the last wake up. So do a dummy handshake here when +* required */ - val =gmu_read (gmu,REG_A6XX_GPU_GMU_CX_GMU_RPMH_POWER_STATE ); +if (adreno_gpu->base.needs_hw_init) { +if (a6xx_gmu_set_oob (&a6xx_gpu->gmu,GMU_OOB_GPU_SET )) + goto force_off; -if (val !=0xf ) { -int ret =a6xx_gmu_wait_for_idle (gmu); +a6xx_gmu_clear_oob (&a6xx_gpu->gmu,GMU_OOB_GPU_SET ); + } -/* If the GMU isn't responding assume it is hung */ -if (ret) { -a6xx_gmu_force_off (gmu); -return ; - } + ret =a6xx_gmu_wait_for_idle (gmu); -a6xx_bus_clear_pending_transactions (adreno_gpu, a6xx_gpu->hung); +/* If the GMU isn't responding assume it is hung */ +if (ret) + goto force_off; -/* tell the GMU we want to slumber */ - ret =a6xx_gmu_notify_slumber (gmu); -if (ret) { -a6xx_gmu_force_off (gmu); -return ; - } +a6xx_bus_clear_pending_transactions (adreno_gpu, a6xx_gpu->hung); - ret =gmu_poll_timeout (gmu, -REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS , val, - !(val &A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS_GPUBUSYIGNAHB ), -100 ,10000 ); +/* tell the GMU we want to slumber */ + ret =a6xx_gmu_notify_slumber (gmu); +if (ret) + goto force_off; -/* -* Let the user know we failed to slumber but don't worry too -* much because we are powering down anyway -*/ + ret =gmu_poll_timeout (gmu, +REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS , val, + !(val &A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS_GPUBUSYIGNAHB ), +100 ,10000 ); -if (ret) -DRM_DEV_ERROR (gmu->dev, -"Unable to slumber GMU: status = 0%x/0%x\n" , -gmu_read (gmu, -REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS ), -gmu_read (gmu, -REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS2 )); - } +/* +* Let the user know we failed to slumber but don't worry too +* much because we are powering down anyway +*/ + +if (ret) +DRM_DEV_ERROR (gmu->dev, +"Unable to slumber GMU: status = 0%x/0%x\n" , +gmu_read (gmu, +REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS ), +gmu_read (gmu, +REG_A6XX_GPU_GMU_AO_GPU_CX_BUSY_STATUS2 ));/* Turn off HFI */ a6xx_hfi_stop (gmu);
@@ -1118,6 +1119,11 @@ static void a6xx_gmu_shutdown(struct a6xx_gmu *gmu)/* Tell RPMh to power off the GPU */ a6xx_rpmh_stop (gmu); + +return ; + +force_off: +a6xx_gmu_force_off (gmu); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 286/373 dma/contiguous: avoid warning about unused size_bytes
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit d7b98ae5221007d3f202746903d4c21c7caf7ea9 ]
When building with W=1, this variable is unused for configs with CONFIG_CMA_SIZE_SEL_PERCENTAGE=y:
kernel/dma/contiguous.c:67:26: error: 'size_bytes' defined but not used [-Werror=unused-const-variable=]
Change this to a macro to avoid the warning.
--- kernel/dma/contiguous.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kernel/dma/contiguous.c +1 -2
@@ -69,8 +69,7 @@ struct cma *dma_contiguous_default_area;* Users, who want to set the size of global CMA area for their system * should use cma= kernel parameter. */ -static const phys_addr_t size_bytes__initconst = - (phys_addr_t )CMA_SIZE_MBYTES *SZ_1M ; +#define size_bytes ((phys_addr_t)CMA_SIZE_MBYTES * SZ_1M)static phys_addr_t size_cmdline__initdata =-1 ;static phys_addr_t base_cmdline__initdata ;static phys_addr_t limit_cmdline__initdata ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 287/373 cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Henry Martin <[email protected]>
[ Upstream commit 484d3f15cc6cbaa52541d6259778e715b2c83c54 ]
cpufreq_cpu_get_raw() can return NULL when the target CPU is not present in the policy->cpus mask. scmi_cpufreq_get_rate() does not check for this case, which results in a NULL pointer dereference.
Add NULL check after cpufreq_cpu_get_raw() to prevent this issue.
--- drivers/cpufreq/scmi-cpufreq.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/cpufreq/scmi-cpufreq.c +8 -2
@@ -32,11 +32,17 @@ static const struct scmi_perf_proto_ops *perf_ops;static unsigned int scmi_cpufreq_get_rate (unsigned int cpu) { -struct cpufreq_policy *policy =cpufreq_cpu_get_raw (cpu); -struct scmi_data *priv = policy->driver_data; +struct cpufreq_policy *policy; +struct scmi_data *priv;unsigned long rate;int ret; + policy =cpufreq_cpu_get_raw (cpu); +if (unlikely (!policy)) +return 0 ; + + priv = policy->driver_data; + ret = perf_ops->freq_get (ph, priv->domain_id, &rate, false);if (ret)return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 288/373 cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Henry Martin <[email protected]>
[ Upstream commit 73b24dc731731edf762f9454552cb3a5b7224949 ]
cpufreq_cpu_get_raw() can return NULL when the target CPU is not present in the policy->cpus mask. scpi_cpufreq_get_rate() does not check for this case, which results in a NULL pointer dereference.
--- drivers/cpufreq/scpi-cpufreq.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/cpufreq/scpi-cpufreq.c +10 -3
@@ -37,9 +37,16 @@ static struct scpi_ops *scpi_ops;static unsigned int scpi_cpufreq_get_rate (unsigned int cpu) { -struct cpufreq_policy *policy =cpufreq_cpu_get_raw (cpu); -struct scpi_data *priv = policy->driver_data; -unsigned long rate =clk_get_rate (priv->clk); +struct cpufreq_policy *policy; +struct scpi_data *priv; +unsigned long rate; + + policy =cpufreq_cpu_get_raw (cpu); +if (unlikely (!policy)) +return 0 ; + + priv = policy->driver_data; + rate =clk_get_rate (priv->clk);return rate /1000 ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 289/373 cpufreq: cppc: Fix invalid return value in .get() callback
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marc Zyngier <[email protected]>
[ Upstream commit 2b8e6b58889c672e1ae3601d9b2b070be4dc2fbc ]
Returning a negative error code in a function with an unsigned return type is a pretty bad idea. It is probably worse when the justification for the change is "our static analisys tool found it".
--- drivers/cpufreq/cppc_cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cppc_cpufreq.c +1 -1
@@ -620,7 +620,7 @@ static unsigned int cppc_cpufreq_get_rate(unsigned int cpu)int ret;if (!policy) -return -ENODEV ; +return 0 ; cpu_data = policy->driver_data;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 290/373 net: phy: leds: fix memory leak
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qingfang Deng <[email protected]>
[ Upstream commit b7f0ee992adf601aa00c252418266177eb7ac2bc ]
A network restart test on a router led to an out-of-memory condition, which was traced to a memory leak in the PHY LED trigger code.
The root cause is misuse of the devm API. The registration function (phy_led_triggers_register) is called from phy_attach_direct, not phy_probe, and the unregister function (phy_led_triggers_unregister) is called from phy_detach, not phy_remove. This means the register and unregister functions can be called multiple times for the same PHY device, but devm-allocated memory is not freed until the driver is unbound.
This also prevents kmemleak from detecting the leak, as the devm API internally stores the allocated pointer.
Fix this by replacing devm_kzalloc/devm_kcalloc with standard kzalloc/kcalloc, and add the corresponding kfree calls in the unregister path.
--- drivers/net/phy/phy_led_triggers.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
drivers/net/phy/phy_led_triggers.c +13 -10
@@ -91,9 +91,8 @@ int phy_led_triggers_register(struct phy_device *phy)if (!phy->phy_num_led_triggers)return 0 ; - phy->led_link_trigger =devm_kzalloc (&phy->mdio.dev, -sizeof (*phy->led_link_trigger), -GFP_KERNEL ); + phy->led_link_trigger =kzalloc (sizeof (*phy->led_link_trigger), +GFP_KERNEL );if (!phy->led_link_trigger) { err = -ENOMEM ; goto out_clear;
@@ -103,10 +102,9 @@ int phy_led_triggers_register(struct phy_device *phy)if (err) goto out_free_link; - phy->phy_led_triggers =devm_kcalloc (&phy->mdio.dev, - phy->phy_num_led_triggers, -sizeof (struct phy_led_trigger ), -GFP_KERNEL ); + phy->phy_led_triggers =kcalloc (phy->phy_num_led_triggers, +sizeof (struct phy_led_trigger ), +GFP_KERNEL );if (!phy->phy_led_triggers) { err = -ENOMEM ; goto out_unreg_link;
@@ -127,11 +125,11 @@ int phy_led_triggers_register(struct phy_device *phy) out_unreg:while (i--)phy_led_trigger_unregister (&phy->phy_led_triggers[i]); -devm_kfree (&phy->mdio.dev, phy->phy_led_triggers); +kfree (phy->phy_led_triggers); out_unreg_link:phy_led_trigger_unregister (phy->led_link_trigger); out_free_link: -devm_kfree (&phy->mdio.dev, phy->led_link_trigger); +kfree (phy->led_link_trigger); phy->led_link_trigger =NULL ; out_clear: phy->phy_num_led_triggers =0 ;
@@ -145,8 +143,13 @@ void phy_led_triggers_unregister(struct phy_device *phy)for (i =0 ; i < phy->phy_num_led_triggers; i++)phy_led_trigger_unregister (&phy->phy_led_triggers[i]); +kfree (phy->phy_led_triggers); + phy->phy_led_triggers =NULL ; -if (phy->led_link_trigger) +if (phy->led_link_trigger) {phy_led_trigger_unregister (phy->led_link_trigger); +kfree (phy->led_link_trigger); + phy->led_link_trigger =NULL ; + } }EXPORT_SYMBOL_GPL (phy_led_triggers_unregister);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 291/373 tipc: fix NULL pointer dereference in tipc_mon_reinit_self()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tung Nguyen <[email protected]>
[ Upstream commit d63527e109e811ef11abb1c2985048fdb528b4cb ]
syzbot reported:
tipc: Node number set to 1055423674
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 3 UID: 0 PID: 6017 Comm: kworker/3:5 Not tainted 6.15.0-rc1-syzkaller-00246-g900241a5cc15 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events tipc_net_finalize_work RIP: 0010:tipc_mon_reinit_self+0x11c/0x210 net/tipc/monitor.c:719 ... RSP: 0018:ffffc9000356fb68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000003ee87cba RDX: 0000000000000000 RSI: ffffffff8dbc56a7 RDI: ffff88804c2cc010 RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000007 R13: fffffbfff2111097 R14: ffff88804ead8000 R15: ffff88804ead9010 FS: 0000000000000000(0000) GS:ffff888097ab9000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000f720eb00 CR3: 000000000e182000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> tipc_net_finalize+0x10b/0x180 net/tipc/net.c:140 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> ... RIP: 0010:tipc_mon_reinit_self+0x11c/0x210 net/tipc/monitor.c:719 ... RSP: 0018:ffffc9000356fb68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000003ee87cba RDX: 0000000000000000 RSI: ffffffff8dbc56a7 RDI: ffff88804c2cc010 RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000007 R13: fffffbfff2111097 R14: ffff88804ead8000 R15: ffff88804ead9010 FS: 0000000000000000(0000) GS:ffff888097ab9000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000f720eb00 CR3: 000000000e182000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
There is a racing condition between workqueue created when enabling bearer and another thread created when disabling bearer right after that as follow:
enabling_bearer | disabling_bearer
--------------- | ----------------
tipc_disc_timeout() |
{ | bearer_disable()
... | {
schedule_work(&tn->work); | tipc_mon_delete()
... | {
} | ...
| write_lock_bh(&mon->lock);
| mon->self = NULL;
| write_unlock_bh(&mon->lock);
| ...
| }
tipc_net_finalize_work() | }
{ |
... |
tipc_net_finalize() |
{ |
... |
tipc_mon_reinit_self() |
{ |
... |
write_lock_bh(&mon->lock); |
mon->self->addr = tipc_own_addr(net); |
write_unlock_bh(&mon->lock); |
... |
} |
... |
} |
... |
} |'mon->self' is set to NULL in disabling_bearer thread and dereferenced later in enabling_bearer thread.
This commit fixes this issue by validating 'mon->self' before assigning node address to it.
--- net/tipc/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/tipc/monitor.c +2 -1
@@ -716,7 +716,8 @@ void tipc_mon_reinit_self(struct net *net)if (!mon)continue ;write_lock_bh (&mon->lock); - mon->self->addr =tipc_own_addr (net); +if (mon->self) + mon->self->addr =tipc_own_addr (net);write_unlock_bh (&mon->lock); } }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 292/373 net_sched: hfsc: Fix a UAF vulnerability in class handling
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <[email protected]>
[ Upstream commit 3df275ef0a6ae181e8428a6589ef5d5231e58b5c ]
This patch fixes a Use-After-Free vulnerability in the HFSC qdisc class handling. The issue occurs due to a time-of-check/time-of-use condition in hfsc_change_class() when working with certain child qdiscs like netem or codel.
The vulnerability works as follows:
1. hfsc_change_class() checks if a class has packets (q.qlen != 0)
2. It then calls qdisc_peek_len(), which for certain qdiscs (e.g., codel, netem) might drop packets and empty the queue
3. The code continues assuming the queue is still non-empty, adding the class to vttree
4. This breaks HFSC scheduler assumptions that only non-empty classes are in vttree
5. Later, when the class is destroyed, this can lead to a Use-After-Free
The fix adds a second queue length check after qdisc_peek_len() to verify the queue wasn't emptied.
--- net/sched/sch_hfsc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
net/sched/sch_hfsc.c +7 -2
@@ -959,6 +959,7 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,if (cl !=NULL ) {int old_flags; +int len =0 ;if (parentid) { if (cl->cl_parent &&
@@ -989,9 +990,13 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,if (usc !=NULL )hfsc_change_usc (cl, usc, cur_time); +if (cl->qdisc->q.qlen !=0 ) + len =qdisc_peek_len (cl->qdisc); +/* Check queue length again since some qdisc implementations +* (e.g., netem/codel) might empty the queue during the peek +* operation. +*/ if (cl->qdisc->q.qlen !=0 ) { -int len =qdisc_peek_len (cl->qdisc); -if (cl->cl_flags &HFSC_RSC ) {if (old_flags &HFSC_RSC )update_ed (cl, len);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 293/373 net_sched: hfsc: Fix a potential UAF in hfsc_dequeue() too
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cong Wang <[email protected]>
[ Upstream commit 6ccbda44e2cc3d26fd22af54c650d6d5d801addf ]
Similarly to the previous patch, we need to safe guard hfsc_dequeue() too. But for this one, we don't have a reliable reproducer.
--- net/sched/sch_hfsc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
net/sched/sch_hfsc.c +10 -4
@@ -1644,10 +1644,16 @@ hfsc_dequeue(struct Qdisc *sch)if (cl->qdisc->q.qlen !=0 ) {/* update ed */ next_len =qdisc_peek_len (cl->qdisc); -if (realtime) -update_ed (cl, next_len); -else -update_d (cl, next_len); +/* Check queue length again since some qdisc implementations +* (e.g., netem/codel) might empty the queue during the peek +* operation. +*/ +if (cl->qdisc->q.qlen !=0 ) { +if (realtime) +update_ed (cl, next_len); +else +update_d (cl, next_len); + } }else {/* the class becomes passive */ eltree_remove (cl);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 294/373 net: dsa: mt7530: sync driver-specific behavior of MT7531 variants
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit 497041d763016c2e8314d2f6a329a9b77c3797ca ]
MT7531 standalone and MMIO variants found in MT7988 and EN7581 share most basic properties. Despite that, assisted_learning_on_cpu_port and mtu_enforcement_ingress were only applied for MT7531 but not for MT7988 or EN7581, causing the expected issues on MMIO devices.
Apply both settings equally also for MT7988 and EN7581 by moving both assignments form mt7531_setup() to mt7531_setup_common().
This fixes unwanted flooding of packets due to unknown unicast during DA lookup, as well as issues with heterogenous MTU settings.
--- drivers/net/dsa/mt7530.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/dsa/mt7530.c +3 -3
@@ -2534,6 +2534,9 @@ mt7531_setup_common(struct dsa_switch *ds)struct mt7530_priv *priv = ds->priv;int ret, i; + ds->assisted_learning_on_cpu_port = true; + ds->mtu_enforcement_ingress = true; +mt753x_trap_frames (priv);/* Enable and reset MIB counters */
@@ -2673,9 +2676,6 @@ mt7531_setup(struct dsa_switch *ds)if (ret)return ret; - ds->assisted_learning_on_cpu_port = true; - ds->mtu_enforcement_ingress = true; -return 0 ; }
Signature · 1 line
2.39.5
Re: [PATCH 5.15 294/373] net: dsa: mt7530: sync driver-specific behavior of MT7531 variants
Hi Greg,
Quoted 13 lines · Greg Kroah-Hartman
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit
497041d763016c2e8314d2f6a329a9b77c3797ca]MT7531 standalone and MMIO variants found in MT7988 and EN7581 share most basic properties. Despite that,
assisted_learning_on_cpu_portandmtu_enforcement_ingresswere only applied for MT7531 but not for MT7988 or EN7581, causing the expected issues on MMIO devices.
Quoted 7 lines
Apply both settings equally also for MT7988 and EN7581 by moving both assignments form
mt7531_setup()tomt7531_setup_common().This fixes unwanted flooding of packets due to unknown unicast during DA lookup, as well as issues with heterogenous MTU settings.
Fixes 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_setup")
The commit 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_setup") is only present since v6.4 so backport to 5.15 and 6.1 doesn't make sense
Re: [PATCH 5.15 294/373] net: dsa: mt7530: sync driver-specific behavior of MT7531 variants
Hi again,
Quoted 17 lines · Daniel Golle
Quoted 16 lines · Greg Kroah-Hartman
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit
497041d763016c2e8314d2f6a329a9b77c3797ca]MT7531 standalone and MMIO variants found in MT7988 and EN7581 share most basic properties. Despite that,
assisted_learning_on_cpu_portandmtu_enforcement_ingresswere only applied for MT7531 but not for MT7988 or EN7581, causing the expected issues on MMIO devices.Apply both settings equally also for MT7988 and EN7581 by moving both assignments form
mt7531_setup()tomt7531_setup_common().
Quoted 8 lines
Quoted 4 lines
This fixes unwanted flooding of packets due to unknown unicast during DA lookup, as well as issues with heterogenous MTU settings.
Fixes 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_setup")The commit
7f54cc9772ce("net: dsa: mt7530: split-off common parts frommt7531_setup") is only present since v6.4 so backport to 5.15 and 6.1 doesn't make sense
I should have actually checked and only now noticed that 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_setup") has been picked to stable kernels down to Linux 5.15.
However, the bug only affects MMIO variants of the switch which are supported since commit 110c18bfed414 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch"), and that is present only since Linux 6.6.
Sorry about the confusion, I should have probably chosen that commit in the Fixes: tag despite the original mistake was introduced in commit 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_setup").
Greg Kroah-Hartman
maintainerRe: [PATCH 5.15 294/373] net: dsa: mt7530: sync driver-specific behavior of MT7531 variants
Quoted 38 lines · Daniel Golle
Hi again,
Quoted 17 lines · Daniel Golle
Quoted 16 lines · Greg Kroah-Hartman
5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Golle <[email protected]>
[ Upstream commit
497041d763016c2e8314d2f6a329a9b77c3797ca]MT7531 standalone and MMIO variants found in MT7988 and EN7581 share most basic properties. Despite that,
assisted_learning_on_cpu_portandmtu_enforcement_ingresswere only applied for MT7531 but not for MT7988 or EN7581, causing the expected issues on MMIO devices.Apply both settings equally also for MT7988 and EN7581 by moving both assignments form
mt7531_setup()tomt7531_setup_common().Quoted 8 lines
Quoted 4 lines
This fixes unwanted flooding of packets due to unknown unicast during DA lookup, as well as issues with heterogenous MTU settings.
Fixes 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_setup")The commit
7f54cc9772ce("net: dsa: mt7530: split-off common parts frommt7531_setup") is only present since v6.4 so backport to 5.15 and 6.1 doesn't make senseI should have actually checked and only now noticed that
7f54cc9772ce("net: dsa: mt7530: split-off common parts frommt7531_setup") has been picked to stable kernels down to Linux 5.15.However, the bug only affects MMIO variants of the switch which are supported since commit
110c18bfed414("net: dsa: mt7530: introduce driver for MT7988 built-in switch"), and that is present only since Linux 6.6.
Quoted 5 lines
Sorry about the confusion, I should have probably chosen that commit in the Fixes: tag despite the original mistake was introduced in commit
7f54cc9772ce("net: dsa: mt7530: split-off common parts frommt7531_setup").
Thanks for the info, I've dropped this from the 5.15.y and 6.1.y queues now.
greg k-h
Greg Kroah-Hartman
maintainerPATCH 295/373 iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Christopherson <[email protected]>
[ Upstream commit 07172206a26dcf3f0bf7c3ecaadd4242b008ea54 ]
Return -EINVAL instead of success if amd_ir_set_vcpu_affinity() is invoked without use_vapic; lying to KVM about whether or not the IRTE was configured to post IRQs is all kinds of bad.
Message-ID: <[email protected]>
--- drivers/iommu/amd/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/iommu.c +1 -1
@@ -3381,7 +3381,7 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)* we should not modify the IRTE */ if (!dev_data || !dev_data->use_vapic) -return 0 ; +return -EINVAL ; ir_data->cfg =irqd_cfg (data); pi_data->ir_data = ir_data;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 296/373 riscv: uprobes: Add missing fence.i after building the XOL buffer
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Björn Töpel <[email protected]>
[ Upstream commit 7d1d19a11cfbfd8bae1d89cc010b2cc397cd0c48 ]
The XOL (execute out-of-line) buffer is used to single-step the replaced instruction(s) for uprobes. The RISC-V port was missing a proper fence.i (i$ flushing) after constructing the XOL buffer, which can result in incorrect execution of stale/broken instructions.
This was found running the BPF selftests "test_progs:uprobe_autoattach, attach_probe" on the Spacemit K1/X60, where the uprobes tests randomly blew up.
--- arch/riscv/kernel/probes/uprobes.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
arch/riscv/kernel/probes/uprobes.c +2 -8
@@ -161,6 +161,7 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,/* Initialize the slot */ void *kaddr =kmap_atomic (page);void *dst = kaddr + (vaddr & ~PAGE_MASK ); +unsigned long start = (unsigned long )dst;memcpy (dst, src, len);
@@ -170,13 +171,6 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, *(uprobe_opcode_t *)dst = __BUG_INSN_32; } +flush_icache_range (start, start + len);kunmap_atomic (kaddr); - -/* -* We probably need flush_icache_user_page() but it needs vma. -* This should work on most of architectures by default. If -* architecture needs to do something different it can define -* its own version of the function. -*/ -flush_dcache_page (page); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 297/373 virtio_console: fix missing byte order handling for cols and rows
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Halil Pasic <[email protected]>
commit fbd3039a64b01b769040677c4fc68badeca8e3b2 upstream.
As per virtio spec the fields cols and rows are specified as little endian. Although there is no legacy interface requirement that would state that cols and rows need to be handled as native endian when legacy interface is used, unlike for the fields of the adjacent struct virtio_console_control, I decided to err on the side of caution based on some non-conclusive virtio spec repo archaeology and opt for using virtio16_to_cpu() much like for virtio_console_control.event. Strictly by the letter of the spec virtio_le_to_cpu() would have been sufficient. But when the legacy interface is not used, it boils down to the same.
And when using the legacy interface, the device formatting these as little endian when the guest is big endian would surprise me more than it using guest native byte order (which would make it compatible with the current implementation). Nevertheless somebody trying to implement the spec following it to the letter could end up forcing little endian byte order when the legacy interface is in use. So IMHO this ultimately needs a judgement call by the maintainers.
Message-Id: <[email protected]>
--- drivers/char/virtio_console.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/char/virtio_console.c +4 -3
@@ -1614,8 +1614,8 @@ static void handle_control_message(strucbreak ;case VIRTIO_CONSOLE_RESIZE : {struct { -__u16 rows; -__u16 cols; +__virtio16 rows; +__virtio16 cols; } size;if (!is_console_port (port))
@@ -1623,7 +1623,8 @@ static void handle_control_message(strucmemcpy (&size, buf->buf + buf->offset +sizeof (*cpkt),sizeof (size)); -set_console_size (port, size.rows, size.cols); +set_console_size (port,virtio16_to_cpu (vdev, size.rows), +virtio16_to_cpu (vdev, size.cols)); port->cons.hvc->irq_requested =1 ;resize_console (port);
Greg Kroah-Hartman
maintainerPATCH 298/373 net: selftests: initialize TCP header and skb payload with zero
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleksij Rempel <[email protected]>
commit 9e8d1013b0c38910cbc9e60de74dbe883878469d upstream.
Zero-initialize TCP header via memset() to avoid garbage values that may affect checksum or behavior during test transmission.
Also zero-fill allocated payload and padding regions using memset() after skb_put(), ensuring deterministic content for all outgoing test packets.
--- net/core/selftests.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
net/core/selftests.c +13 -5
@@ -100,10 +100,10 @@ static struct sk_buff *net_test_get_skb( ehdr->h_proto =htons (ETH_P_IP );if (attr->tcp) { +memset (thdr,0 ,sizeof (*thdr)); thdr->source =htons (attr->sport); thdr->dest =htons (attr->dport); thdr->doff =sizeof (struct tcphdr ) /4 ; - thdr->check =0 ; }else { uhdr->source =htons (attr->sport); uhdr->dest =htons (attr->dport);
@@ -144,10 +144,18 @@ static struct sk_buff *net_test_get_skb( attr->id = net_test_next_id; shdr->id = net_test_next_id++; -if (attr->size) -skb_put (skb, attr->size); -if (attr->max_size && attr->max_size > skb->len) -skb_put (skb, attr->max_size - skb->len); +if (attr->size) { +void *payload =skb_put (skb, attr->size); + +memset (payload,0 , attr->size); + } + +if (attr->max_size && attr->max_size > skb->len) { +size_t pad_len = attr->max_size - skb->len; +void *pad =skb_put (skb, pad_len); + +memset (pad,0 , pad_len); + } skb->csum =0 ; skb->ip_summed =CHECKSUM_PARTIAL ;
Greg Kroah-Hartman
maintainerPATCH 299/373 net: phy: microchip: force IRQ polling mode for lan88xx
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fiona Klute <[email protected]>
commit 30a41ed32d3088cd0d682a13d7f30b23baed7e93 upstream.
With lan88xx based devices the lan78xx driver can get stuck in an interrupt loop while bringing the device up, flooding the kernel log with messages like the following:
lan78xx 2-3:1.0 enp1s0u3: kevent 4 may have been dropped
Removing interrupt support from the lan88xx PHY driver forces the driver to use polling instead, which avoids the problem.
The issue has been observed with Raspberry Pi devices at least since 4.14 (see [1], bug report for their downstream kernel), as well as with Nvidia devices [2] in 2020, where disabling interrupts was the vendor-suggested workaround (together with the claim that phylib changes in 4.9 made the interrupt handling in lan78xx incompatible).
Iperf reports well over 900Mbits/sec per direction with client in --dualtest mode, so there does not seem to be a significant impact on throughput (lan88xx device connected via switch to the peer).
[1] https://github.com/raspberrypi/linux/issues/2447
[2] https://forums.developer.nvidia.com/t/jetson-xavier-and-lan7800-problem/142134/11
--- drivers/net/phy/microchip.c | 46 ++------------------------------------------ 1 file changed, 3 insertions(+), 43 deletions(-)
drivers/net/phy/microchip.c +3 -43
@@ -31,47 +31,6 @@ static int lan88xx_write_page(struct phyreturn __phy_write (phydev,LAN88XX_EXT_PAGE_ACCESS , page); } -static int lan88xx_phy_config_intr (struct phy_device *phydev) -{ -int rc; - -if (phydev->interrupts ==PHY_INTERRUPT_ENABLED ) { -/* unmask all source and clear them before enable */ - rc =phy_write (phydev,LAN88XX_INT_MASK ,0x7FFF ); - rc =phy_read (phydev,LAN88XX_INT_STS ); - rc =phy_write (phydev,LAN88XX_INT_MASK , -LAN88XX_INT_MASK_MDINTPIN_EN_ | -LAN88XX_INT_MASK_LINK_CHANGE_ ); - }else { - rc =phy_write (phydev,LAN88XX_INT_MASK ,0 ); -if (rc) -return rc; - -/* Ack interrupts after they have been disabled */ - rc =phy_read (phydev,LAN88XX_INT_STS ); - } - -return rc <0 ? rc :0 ; -} - -static irqreturn_t lan88xx_handle_interrupt (struct phy_device *phydev) -{ -int irq_status; - - irq_status =phy_read (phydev,LAN88XX_INT_STS ); -if (irq_status <0 ) { -phy_error (phydev); -return IRQ_NONE ; - } - -if (!(irq_status &LAN88XX_INT_STS_LINK_CHANGE_ )) -return IRQ_NONE ; - -phy_trigger_machine (phydev); - -return IRQ_HANDLED ; -} -static int lan88xx_suspend (struct phy_device *phydev) {struct lan88xx_priv *priv = phydev->priv;
@@ -388,8 +347,9 @@ static struct phy_driver microchip_phy_d .config_aneg = lan88xx_config_aneg, .link_change_notify = lan88xx_link_change_notify, - .config_intr = lan88xx_phy_config_intr, - .handle_interrupt = lan88xx_handle_interrupt, +/* Interrupt handling is broken, do not define related +* functions to force polling. +*/ .suspend = lan88xx_suspend, .resume = genphy_resume,
Greg Kroah-Hartman
maintainerPATCH 300/373 drm/amd/display: Fix gpu reset in multidisplay config
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roman Li <[email protected]>
commit 7eb287beeb60be1e4437be2b4e4e9f0da89aab97 upstream.
[Why]
The indexing of stream_status in dm_gpureset_commit_state() is incorrect. That leads to asserts in multi-display configuration after gpu reset.
[How]
Adjust the indexing logic to align stream_status with surface_updates.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
@@ -2590,16 +2590,16 @@ static void dm_gpureset_commit_state(strfor (k =0 ; k < dc_state->stream_count; k++) { bundle->stream_update.stream = dc_state->streams[k]; -for (m =0 ; m < dc_state->stream_status->plane_count; m++) { +for (m =0 ; m < dc_state->stream_status[k].plane_count; m++) { bundle->surface_updates[m].surface = - dc_state->stream_status->plane_states[m]; + dc_state->stream_status[k].plane_states[m]; bundle->surface_updates[m].surface->force_full_update = true; }update_planes_and_stream_adapter (dm->dc,UPDATE_TYPE_FULL , - dc_state->stream_status->plane_count, + dc_state->stream_status[k].plane_count, dc_state->streams[k], &bundle->stream_update, bundle->surface_updates);
Greg Kroah-Hartman
maintainerPATCH 301/373 KVM: SVM: Allocate IR data using atomic allocation
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Christopherson <[email protected]>
commit 7537deda36521fa8fff9133b39c46e31893606f2 upstream.
Allocate SVM's interrupt remapping metadata using GFP_ATOMIC as svm_ir_list_add() is called with IRQs are disabled and irqfs.lock held when kvm_irq_routing_update() reacts to GSI routing changes.
Message-ID: <[email protected]>
--- arch/x86/kvm/svm/avic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/svm/avic.c +1 -1
@@ -737,7 +737,7 @@ static int svm_ir_list_add(struct vcpu_s* Allocating new amd_iommu_pi_data, which will get * add to the per-vcpu ir_list. */ - ir =kzalloc (sizeof (struct amd_svm_iommu_ir ),GFP_KERNEL_ACCOUNT ); + ir =kzalloc (sizeof (struct amd_svm_iommu_ir ),GFP_ATOMIC | __GFP_ACCOUNT);if (!ir) { ret = -ENOMEM ; goto out;
Greg Kroah-Hartman
maintainerPATCH 302/373 mcb: fix a double free bug in chameleon_parse_gdd()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <[email protected]>
commit 7c7f1bfdb2249f854a736d9b79778c7e5a29a150 upstream.
In chameleon_parse_gdd(), if mcb_device_register() fails, 'mdev' would be released in mcb_device_register() via put_device(). Thus, goto 'err' label and free 'mdev' again causes a double free. Just return if mcb_device_register() fails.
--- drivers/mcb/mcb-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mcb/mcb-parse.c +1 -1
@@ -101,7 +101,7 @@ static int chameleon_parse_gdd(struct mc ret =mcb_device_register (bus, mdev);if (ret <0 ) - goto err; +return ret;return 0 ;
Greg Kroah-Hartman
maintainerPATCH 303/373 USB: storage: quirk for ADATA Portable HDD CH94
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit 9ab75eee1a056f896b87d139044dd103adc532b9 upstream.
Version 1.60 specifically needs this quirk.
Version 2.00 is known good.
--- drivers/usb/storage/unusual_uas.h | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/storage/unusual_uas.h +7 -0
@@ -83,6 +83,13 @@ UNUSUAL_DEV(0x0bc2, 0x331a, 0x0000, 0x99 USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NO_REPORT_LUNS), +/* Reported-by: Oliver Neukum <[email protected]> */ +UNUSUAL_DEV (0x125f ,0xa94a ,0x0160 ,0x0160 , +"ADATA" , +"Portable HDD CH94" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_NO_ATA_1X ), +/* Reported-by: Benjamin Tissoires <[email protected]> */ UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, "Initio Corporation",
Greg Kroah-Hartman
maintainerPATCH 304/373 mei: me: add panther lake H DID
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Usyskin <[email protected]>
commit 86ce5c0a1dec02e21b4c864b2bc0cc5880a2c13c upstream.
Add Panther Lake H device id.
--- drivers/misc/mei/hw-me-regs.h | 1 + drivers/misc/mei/pci-me.c | 1 + 2 files changed, 2 insertions(+)
drivers/misc/mei/hw-me-regs.h +1 -0
@@ -117,6 +117,7 @@#define MEI_DEV_ID_LNL_M 0xA870/* Lunar Lake Point M */ +#define MEI_DEV_ID_PTL_H 0xE370/* Panther Lake H */ #define MEI_DEV_ID_PTL_P 0xE470/* Panther Lake P */ /*
drivers/misc/mei/pci-me.c +1 -0
@@ -123,6 +123,7 @@ static const struct pci_device_id mei_me {MEI_PCI_DEVICE(MEI_DEV_ID_LNL_M, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_PTL_H, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_PTL_P, MEI_ME_PCH15_CFG)},/* required last entry */
Greg Kroah-Hartman
maintainerPATCH 305/373 KVM: x86: Reset IRTE to host control if *new* route isnt postable
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Christopherson <[email protected]>
commit 9bcac97dc42d2f4da8229d18feb0fe2b1ce523a2 upstream.
Restore an IRTE back to host control (remapped or posted MSI mode) if the *new* GSI route prevents posting the IRQ directly to a vCPU, regardless of the GSI routing type. Updating the IRTE if and only if the new GSI is an MSI results in KVM leaving an IRTE posting to a vCPU.
The dangling IRTE can result in interrupts being incorrectly delivered to the guest, and in the worst case scenario can result in use-after-free, e.g. if the VM is torn down, but the underlying host IRQ isn't freed.
Message-ID: <[email protected]>
--- arch/x86/kvm/svm/avic.c | 58 +++++++++++++++++++++-------------------- arch/x86/kvm/vmx/posted_intr.c | 28 +++++++------------ 2 files changed, 41 insertions(+), 45 deletions(-)
arch/x86/kvm/svm/avic.c +31 -27
@@ -801,6 +801,7 @@ int svm_update_pi_irte(struct kvm *kvm, {struct kvm_kernel_irq_routing_entry *e;struct kvm_irq_routing_table *irq_rt; +bool enable_remapped_mode = true;int idx, ret =0 ; if (!kvm_arch_has_assigned_device(kvm) ||
@@ -838,6 +839,8 @@ int svm_update_pi_irte(struct kvm *kvm, kvm_vcpu_apicv_active(&svm->vcpu)) {struct amd_iommu_pi_data pi; + enable_remapped_mode = false; +/* Try to enable guest_mode in IRTE */ pi.base =__sme_set (page_to_phys (svm->avic_backing_page) &AVIC_HPA_MASK );
@@ -856,33 +859,6 @@ int svm_update_pi_irte(struct kvm *kvm,*/ if (!ret && pi.is_guest_mode)svm_ir_list_add (svm, &pi); - }else { -/* Use legacy mode in IRTE */ -struct amd_iommu_pi_data pi; - -/** -* Here, pi is used to: -* - Tell IOMMU to use legacy mode for this interrupt. -* - Retrieve ga_tag of prior interrupt remapping data. -*/ - pi.prev_ga_tag =0 ; - pi.is_guest_mode = false; - ret =irq_set_vcpu_affinity (host_irq, &pi); - -/** -* Check if the posted interrupt was previously -* setup with the guest_mode by checking if the ga_tag -* was cached. If so, we need to clean up the per-vcpu -* ir_list. -*/ -if (!ret && pi.prev_ga_tag) { -int id =AVIC_GATAG_TO_VCPUID (pi.prev_ga_tag); -struct kvm_vcpu *vcpu; - - vcpu =kvm_get_vcpu_by_id (kvm, id); -if (vcpu) -svm_ir_list_del (to_svm (vcpu), &pi); - } }if (!ret && svm) {
@@ -898,6 +874,34 @@ int svm_update_pi_irte(struct kvm *kvm, } ret =0 ; +if (enable_remapped_mode) { +/* Use legacy mode in IRTE */ +struct amd_iommu_pi_data pi; + +/** +* Here, pi is used to: +* - Tell IOMMU to use legacy mode for this interrupt. +* - Retrieve ga_tag of prior interrupt remapping data. +*/ + pi.prev_ga_tag =0 ; + pi.is_guest_mode = false; + ret =irq_set_vcpu_affinity (host_irq, &pi); + +/** +* Check if the posted interrupt was previously +* setup with the guest_mode by checking if the ga_tag +* was cached. If so, we need to clean up the per-vcpu +* ir_list. +*/ +if (!ret && pi.prev_ga_tag) { +int id =AVIC_GATAG_TO_VCPUID (pi.prev_ga_tag); +struct kvm_vcpu *vcpu; + + vcpu =kvm_get_vcpu_by_id (kvm, id); +if (vcpu) +svm_ir_list_del (to_svm (vcpu), &pi); + } + } out:srcu_read_unlock (&kvm->irq_srcu, idx);return ret;
arch/x86/kvm/vmx/posted_intr.c +10 -18
@@ -270,6 +270,7 @@ int pi_update_irte(struct kvm *kvm, unsi {struct kvm_kernel_irq_routing_entry *e;struct kvm_irq_routing_table *irq_rt; +bool enable_remapped_mode = true;struct kvm_lapic_irq irq;struct kvm_vcpu *vcpu;struct vcpu_data vcpu_info;
@@ -308,21 +309,8 @@ int pi_update_irte(struct kvm *kvm, unsikvm_set_msi_irq (kvm, e, &irq);if (!kvm_intr_is_single_vcpu (kvm, &irq, &vcpu) || - !kvm_irq_is_postable (&irq)) { -/* -* Make sure the IRTE is in remapped mode if -* we don't handle it in posted mode. -*/ - ret =irq_set_vcpu_affinity (host_irq,NULL ); -if (ret <0 ) { -printk (KERN_INFO -"failed to back to remapped mode, irq: %u\n" , - host_irq); - goto out; - } - + !kvm_irq_is_postable (&irq))continue ; - } vcpu_info.pi_desc_addr =__pa (&to_vmx (vcpu)->pi_desc); vcpu_info.vector = irq.vector;
@@ -330,11 +318,12 @@ int pi_update_irte(struct kvm *kvm, unsitrace_kvm_pi_irte_update (host_irq, vcpu->vcpu_id, e->gsi, vcpu_info.vector, vcpu_info.pi_desc_addr, set); -if (set) - ret =irq_set_vcpu_affinity (host_irq, &vcpu_info); -else - ret =irq_set_vcpu_affinity (host_irq,NULL ); +if (!set) +continue ; + enable_remapped_mode = false; + + ret =irq_set_vcpu_affinity (host_irq, &vcpu_info);if (ret <0 ) {printk (KERN_INFO "%s: failed to update PI IRTE\n" , __func__);
@@ -342,6 +331,9 @@ int pi_update_irte(struct kvm *kvm, unsi } } +if (enable_remapped_mode) + ret =irq_set_vcpu_affinity (host_irq,NULL ); + ret =0 ; out:srcu_read_unlock (&kvm->irq_srcu, idx);
Greg Kroah-Hartman
maintainerPATCH 306/373 serial: sifive: lock port in startup()/shutdown() callbacks
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryo Takakura <[email protected]>
commit e1ca3ff28ab1e2c1e70713ef3fa7943c725742c3 upstream.
startup()/shutdown() callbacks access SIFIVE_SERIAL_IE_OFFS. The register is also accessed from write() callback.
If console were printing and startup()/shutdown() callback gets called, its access to the register could be overwritten.
Add port->lock to startup()/shutdown() callbacks to make sure their access to SIFIVE_SERIAL_IE_OFFS is synchronized against write() callback.
Rule: add
--- drivers/tty/serial/sifive.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/tty/serial/sifive.c +6 -0
@@ -595,8 +595,11 @@ static void sifive_serial_break_ctl(strustatic int sifive_serial_startup (struct uart_port *port) {struct sifive_serial_port *ssp =port_to_sifive_serial_port (port); +unsigned long flags; +uart_port_lock_irqsave (&ssp->port, &flags);__ssp_enable_rxwm (ssp); +uart_port_unlock_irqrestore (&ssp->port, flags);return 0 ; }
@@ -604,9 +607,12 @@ static int sifive_serial_startup(structstatic void sifive_serial_shutdown (struct uart_port *port) {struct sifive_serial_port *ssp =port_to_sifive_serial_port (port); +unsigned long flags; +uart_port_lock_irqsave (&ssp->port, &flags);__ssp_disable_rxwm (ssp);__ssp_disable_txwm (ssp); +uart_port_unlock_irqrestore (&ssp->port, flags); }/**
Greg Kroah-Hartman
maintainerPATCH 307/373 USB: serial: ftdi_sio: add support for Abacus Electrics Optical Probe
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ehrenreich <[email protected]>
commit b399078f882b6e5d32da18b6c696cc84b12f90d5 upstream.
Abacus Electrics makes optical probes for interacting with smart meters over an optical interface.
At least one version uses an FT232B chip (as detected by ftdi_sio) with a custom USB PID, which needs to be added to the list to make the device work in a plug-and-play fashion.
--- drivers/usb/serial/ftdi_sio.c | 2 ++ drivers/usb/serial/ftdi_sio_ids.h | 5 +++++ 2 files changed, 7 insertions(+)
drivers/usb/serial/ftdi_sio.c +2 -0
@@ -1071,6 +1071,8 @@ static const struct usb_device_id id_tab { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 1) }, { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 2) }, { USB_DEVICE_INTERFACE_NUMBER(ALTERA_VID, ALTERA_UB3_602E_PID, 3) }, +/* Abacus Electrics */ + { USB_DEVICE(FTDI_VID, ABACUS_OPTICAL_PROBE_PID) }, { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio_ids.h +5 -0
@@ -436,6 +436,11 @@#define LINX_FUTURE_2_PID 0xF44C/* Linx future device */ /* +* Abacus Electrics +*/ +#define ABACUS_OPTICAL_PROBE_PID 0xf458/* ABACUS ELECTRICS Optical Probe */ + +/* * Oceanic product ids */ #define FTDI_OCEANIC_PID 0xF460/* Oceanic dive instrument */
Greg Kroah-Hartman
maintainerPATCH 308/373 USB: serial: option: add Sierra Wireless EM9291
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Adam Xue <[email protected]>
commit 968e1cbb1f6293c3add9607f80b5ce3d29f57583 upstream.
Add Sierra Wireless EM9291.
Interface 0: MBIM control
1: MBIM data
3: AT port
4: Diagnostic port
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1199 ProdID=90e3 Rev=00.06 S: Manufacturer=Sierra Wireless, Incorporated S: Product=Sierra Wireless EM9291 S: SerialNumber=xxxxxxxxxxxxxxxx C: #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=(none) E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=(none) E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/serial/option.c +3 -0
@@ -611,6 +611,7 @@ static void option_instat_callback(struc/* Sierra Wireless products */ #define SIERRA_VENDOR_ID 0x1199#define SIERRA_PRODUCT_EM9191 0x90d3 +#define SIERRA_PRODUCT_EM9291 0x90e3/* UNISOC (Spreadtrum) products */ #define UNISOC_VENDOR_ID 0x1782
@@ -2432,6 +2433,8 @@ static const struct usb_device_id option { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) }, { USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */
Greg Kroah-Hartman
maintainerPATCH 309/373 USB: serial: simple: add OWON HDS200 series oscilloscope support
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Craig Hesling <[email protected]>
commit 4cc01410e1c1dd075df10f750775c81d1cb6672b upstream.
Add serial support for OWON HDS200 series oscilloscopes and likely many other pieces of OWON test equipment.
OWON HDS200 series devices host two USB endpoints, designed to facilitate bidirectional SCPI. SCPI is a predominately ASCII text protocol for test/measurement equipment. Having a serial/tty interface for these devices lowers the barrier to entry for anyone trying to write programs to communicate with them.
The following shows the USB descriptor for the OWON HDS272S running firmware V5.7.1:
Bus 001 Device 068: ID 5345:1234 Owon PDS6062T Oscilloscope Negotiated speed: Full Speed (12Mbps)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 [unknown] bDeviceSubClass 0 [unknown] bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x5345 Owon idProduct 0x1234 PDS6062T Oscilloscope bcdDevice 1.00 iManufacturer 1 oscilloscope iProduct 2 oscilloscope iSerial 3 oscilloscope bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0029
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 5 Physical Interface Device
bInterfaceSubClass 0 [unknown]
bInterfaceProtocol 0
iInterface 0
** UNRECOGNIZED: 09 21 11 01 00 01 22 5f 00 Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 32
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 32
Device Status: 0x0000
(Bus Powered)
OWON appears to be using the same USB Vendor and Product ID for many of their oscilloscopes. Looking at the discussion about the USB vendor/product ID, in the link bellow, suggests that this VID/PID is shared with VDS, SDS, PDS, and now the HDS series oscilloscopes. Available documentation for these devices seems to indicate that all use a similar SCPI protocol, some with RS232 options. It is likely that this same simple serial setup would work correctly for them all.
--- drivers/usb/serial/usb-serial-simple.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/serial/usb-serial-simple.c +7 -0
@@ -101,6 +101,11 @@ DEVICE(nokia, NOKIA_IDS); { USB_DEVICE(0x09d7, 0x0100) } /* NovAtel FlexPack GPS */DEVICE_N (novatel_gps,NOVATEL_IDS ,3 ); +/* OWON electronic test and measurement equipment driver */ +#define OWON_IDS () \ + { USB_DEVICE(0x5345, 0x1234) }/* HDS200 oscilloscopes and others */ +DEVICE (owon,OWON_IDS ); +/* Siemens USB/MPI adapter */ #define SIEMENS_IDS () \ { USB_DEVICE(0x908, 0x0004) }
@@ -135,6 +140,7 @@ static struct usb_serial_driver * const &motorola_tetra_device, &nokia_device, &novatel_gps_device, + &owon_device, &siemens_mpi_device, &suunto_device, &vivopay_device,
@@ -154,6 +160,7 @@ static const struct usb_device_id id_tabMOTOROLA_TETRA_IDS (),NOKIA_IDS (),NOVATEL_IDS (), +OWON_IDS (),SIEMENS_IDS (),SUUNTO_IDS (), VIVOPAY_IDS(),
Greg Kroah-Hartman
maintainerPATCH 310/373 usb: cdns3: Fix deadlock when using NCM gadget
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ralph Siemsen <[email protected]>
commit a1059896f2bfdcebcdc7153c3be2307ea319501f upstream.
The cdns3 driver has the same NCM deadlock as fixed in cdnsp by commit 58f2fcb3a845 ("usb: cdnsp: Fix deadlock issue during using NCM gadget").
Under PREEMPT_RT the deadlock can be readily triggered by heavy network traffic, for example using "iperf --bidir" over NCM ethernet link.
The deadlock occurs because the threaded interrupt handler gets preempted by a softirq, but both are protected by the same spinlock. Prevent deadlock by disabling softirq during threaded irq handler.
--- drivers/usb/cdns3/cdns3-gadget.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/cdns3/cdns3-gadget.c +2 -0
@@ -1960,6 +1960,7 @@ static irqreturn_t cdns3_device_thread_iunsigned int bit;unsigned long reg; +local_bh_disable ();spin_lock_irqsave (&priv_dev->lock, flags); reg =readl (&priv_dev->regs->usb_ists);
@@ -2001,6 +2002,7 @@ static irqreturn_t cdns3_device_thread_i irqend:writel (~0 , &priv_dev->regs->ep_ien);spin_unlock_irqrestore (&priv_dev->lock, flags); +local_bh_enable ();return ret; }
Greg Kroah-Hartman
maintainerPATCH 311/373 usb: chipidea: ci_hdrc_imx: fix usbmisc handling
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fedor Pchelkin <[email protected]>
commit 4e28f79e3dffa52d327b46d1a78dac16efb5810b upstream.
usbmisc is an optional device property so it is totally valid for the corresponding data->usbmisc_data to have a NULL value.
Check that before dereferencing the pointer.
Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool.
--- drivers/usb/chipidea/ci_hdrc_imx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/chipidea/ci_hdrc_imx.c +4 -2
@@ -509,7 +509,8 @@ disable_hsic_regulator:cpu_latency_qos_remove_request (&data->pm_qos_req); data->ci_pdev =NULL ; err_put: -put_device (data->usbmisc_data->dev); +if (data->usbmisc_data) +put_device (data->usbmisc_data->dev);return ret; }
@@ -533,7 +534,8 @@ static void ci_hdrc_imx_remove(struct plif (data->hsic_pad_regulator)regulator_disable (data->hsic_pad_regulator); } -put_device (data->usbmisc_data->dev); +if (data->usbmisc_data) +put_device (data->usbmisc_data->dev); }static void ci_hdrc_imx_shutdown (struct platform_device *pdev)
Greg Kroah-Hartman
maintainerPATCH 312/373 usb: chipidea: ci_hdrc_imx: fix call balance of regulator routines
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fedor Pchelkin <[email protected]>
commit 8cab0e9a3f3e8d700179e0d6141643d54a267fd5 upstream.
Upon encountering errors during the HSIC pinctrl handling section the regulator should be disabled.
Use devm_add_action_or_reset() to let the regulator-disabling routine be handled by device resource management stack.
Found by Linux Verification Center (linuxtesting.org).
--- drivers/usb/chipidea/ci_hdrc_imx.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/usb/chipidea/ci_hdrc_imx.c +17 -8
@@ -322,6 +322,13 @@ static int ci_hdrc_imx_notify_event(strureturn ret; } +static void ci_hdrc_imx_disable_regulator (void *arg) +{ +struct ci_hdrc_imx_data *data = arg; + +regulator_disable (data->hsic_pad_regulator); +} +static int ci_hdrc_imx_probe (struct platform_device *pdev) {struct ci_hdrc_imx_data *data;
@@ -379,6 +386,13 @@ static int ci_hdrc_imx_probe(struct plat "Failed to enable HSIC pad regulator\n"); goto err_put; } + ret =devm_add_action_or_reset (dev, + ci_hdrc_imx_disable_regulator, data); +if (ret) { +dev_err (dev, +"Failed to add regulator devm action\n" ); + goto err_put; + } } }
@@ -417,11 +431,11 @@ static int ci_hdrc_imx_probe(struct plat ret =imx_get_clks (dev);if (ret) - goto disable_hsic_regulator; + goto qos_remove_request; ret =imx_prepare_enable_clks (dev);if (ret) - goto disable_hsic_regulator; + goto qos_remove_request; data->phy =devm_usb_get_phy_by_phandle (dev,"fsl,usbphy" ,0 );if (IS_ERR (data->phy)) {
@@ -501,10 +515,7 @@ disable_device:ci_hdrc_remove_device (data->ci_pdev); err_clk:imx_disable_unprepare_clks (dev); -disable_hsic_regulator: -if (data->hsic_pad_regulator) -/* don't overwrite original ret (cf. EPROBE_DEFER) */ -regulator_disable (data->hsic_pad_regulator); +qos_remove_request:if (pdata.flags &CI_HDRC_PMQOS )cpu_latency_qos_remove_request (&data->pm_qos_req); data->ci_pdev =NULL ;
@@ -531,8 +542,6 @@ static void ci_hdrc_imx_remove(struct plimx_disable_unprepare_clks (&pdev->dev);if (data->plat_data->flags &CI_HDRC_PMQOS )cpu_latency_qos_remove_request (&data->pm_qos_req); -if (data->hsic_pad_regulator) -regulator_disable (data->hsic_pad_regulator); }if (data->usbmisc_data)put_device (data->usbmisc_data->dev);
Greg Kroah-Hartman
maintainerPATCH 313/373 usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fedor Pchelkin <[email protected]>
commit 8c531e0a8c2d82509ad97c6d3a1e6217c7ed136d upstream.
usb_phy_init() may return an error code if e.g. its implementation fails to prepare/enable some clocks. And properly rollback on probe error path by calling the counterpart usb_phy_shutdown().
Found by Linux Verification Center (linuxtesting.org).
--- drivers/usb/chipidea/ci_hdrc_imx.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/usb/chipidea/ci_hdrc_imx.c +10 -3
@@ -461,7 +461,11 @@ static int ci_hdrc_imx_probe(struct plat of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI) { pdata.flags |=CI_HDRC_OVERRIDE_PHY_CONTROL ; data->override_phy_control = true; -usb_phy_init (pdata.usb_phy); + ret =usb_phy_init (pdata.usb_phy); +if (ret) { +dev_err (dev,"Failed to init phy\n" ); + goto err_clk; + } }if (pdata.flags &CI_HDRC_SUPPORTS_RUNTIME_PM )
@@ -470,7 +474,7 @@ static int ci_hdrc_imx_probe(struct plat ret =imx_usbmisc_init (data->usbmisc_data);if (ret) {dev_err (dev,"usbmisc init failed, ret=%d\n" , ret); - goto err_clk; + goto phy_shutdown; } data->ci_pdev = ci_hdrc_add_device(dev,
@@ -479,7 +483,7 @@ static int ci_hdrc_imx_probe(struct platif (IS_ERR (data->ci_pdev)) { ret =PTR_ERR (data->ci_pdev);dev_err_probe (dev, ret,"ci_hdrc_add_device failed\n" ); - goto err_clk; + goto phy_shutdown; }if (data->usbmisc_data) {
@@ -513,6 +517,9 @@ static int ci_hdrc_imx_probe(struct plat disable_device:ci_hdrc_remove_device (data->ci_pdev); +phy_shutdown: +if (data->override_phy_control) +usb_phy_shutdown (data->phy); err_clk:imx_disable_unprepare_clks (dev); qos_remove_request:
Greg Kroah-Hartman
maintainerPATCH 314/373 USB: OHCI: Add quirk for LS7A OHCI controller (rev 0x02)
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Huacai Chen <[email protected]>
commit bcb60d438547355b8f9ad48645909139b64d3482 upstream.
The OHCI controller (rev 0x02) under LS7A PCI host has a hardware flaw. MMIO register with offset 0x60/0x64 is treated as legacy PS2-compatible keyboard/mouse interface, which confuse the OHCI controller. Since OHCI only use a 4KB BAR resource indeed, the LS7A OHCI controller's 32KB BAR is wrapped around (the second 4KB BAR space is the same as the first 4KB internally). So we can add an 4KB offset (0x1000) to the OHCI registers (from the PCI BAR resource) as a quirk.
--- drivers/usb/host/ohci-pci.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/usb/host/ohci-pci.c +23 -0
@@ -165,6 +165,25 @@ static int ohci_quirk_amd700(struct usb_return 0 ; } +static int ohci_quirk_loongson (struct usb_hcd *hcd) +{ +struct pci_dev *pdev =to_pci_dev (hcd->self.controller); + +/* +* Loongson's LS7A OHCI controller (rev 0x02) has a +* flaw. MMIO register with offset 0x60/64 is treated +* as legacy PS2-compatible keyboard/mouse interface. +* Since OHCI only use 4KB BAR resource, LS7A OHCI's +* 32KB BAR is wrapped around (the 2nd 4KB BAR space +* is the same as the 1st 4KB internally). So add 4KB +* offset (0x1000) to the OHCI registers as a quirk. +*/ +if (pdev->revision ==0x2 ) + hcd->regs +=SZ_4K ;/* SZ_4K = 0x1000 */ + +return 0 ; +} +static int ohci_quirk_qemu (struct usb_hcd *hcd) {struct ohci_hcd *ohci =hcd_to_ohci (hcd);
@@ -225,6 +244,10 @@ static const struct pci_device_id ohci_p .driver_data = (unsigned long)ohci_quirk_amd700, }, { + PCI_DEVICE(PCI_VENDOR_ID_LOONGSON, 0x7a24), + .driver_data = (unsigned long)ohci_quirk_loongson, + }, + { .vendor = PCI_VENDOR_ID_APPLE, .device = 0x003f, .subvendor = PCI_SUBVENDOR_ID_REDHAT_QUMRANET,
Greg Kroah-Hartman
maintainerPATCH 315/373 usb: dwc3: gadget: check that event count does not exceed event buffer length
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Frode Isaksen <[email protected]>
commit 63ccd26cd1f6600421795f6ca3e625076be06c9f upstream.
The event count is read from register DWC3_GEVNTCOUNT. There is a check for the count being zero, but not for exceeding the event buffer length.
Check that event count does not exceed event buffer length, avoiding an out-of-bounds access when memcpy'ing the event. Crash log:
Unable to handle kernel paging request at virtual address ffffffc0129be000 pc : __memcpy+0x114/0x180 lr : dwc3_check_event_buf+0xec/0x348 x3 : 0000000000000030 x2 : 000000000000dfc4 x1 : ffffffc0129be000 x0 : ffffff87aad60080 Call trace: __memcpy+0x114/0x180 dwc3_interrupt+0x24/0x34
--- drivers/usb/dwc3/gadget.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/usb/dwc3/gadget.c +6 -0
@@ -4361,6 +4361,12 @@ static irqreturn_t dwc3_check_event_buf(if (!count)return IRQ_NONE ; +if (count > evt->length) { +dev_err_ratelimited (dwc->dev,"invalid count(%u) > evt->length(%u)\n" , + count, evt->length); +return IRQ_NONE ; + } + evt->count = count; evt->flags |=DWC3_EVENT_PENDING ;
Greg Kroah-Hartman
maintainerPATCH 316/373 usb: quirks: add DELAY_INIT quirk for Silicon Motion Flash Drive
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miao Li <[email protected]>
commit 2932b6b547ec36ad2ed60fbf2117c0e46bb7d40a upstream.
Silicon Motion Flash Drive connects to Huawei hisi platforms and performs a system reboot test for two thousand circles, it will randomly work incorrectly on boot, set DELAY_INIT quirk can workaround this issue.
--- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/quirks.c +3 -0
@@ -380,6 +380,9 @@ static const struct usb_device_id usb_qu { USB_DEVICE(0x0904, 0x6103), .driver_info = USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL }, + /* Silicon Motion Flash Drive */ + { USB_DEVICE(0x090c, 0x1000), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Sound Devices USBPre2 */ { USB_DEVICE(0x0926, 0x0202), .driver_info = USB_QUIRK_ENDPOINT_IGNORE },
Greg Kroah-Hartman
maintainerPATCH 317/373 usb: quirks: Add delay init quirk for SanDisk 3.2Gen1 Flash Drive
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miao Li <[email protected]>
commit 37ffdbd695c02189dbf23d6e7d2385e0299587ca upstream.
The SanDisk 3.2Gen1 Flash Drive, which VID:PID is in 0781:55a3, just like Silicon Motion Flash Drive:
https://lore.kernel.org/r/[email protected]
also needs the DELAY_INIT quirk, or it will randomly work incorrectly (e.g.: lsusb and can't list this device info) when connecting Huawei hisi platforms and doing thousand of reboot test circles.
--- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/quirks.c +3 -0
@@ -366,6 +366,9 @@ static const struct usb_device_id usb_qu { USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM }, { USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM }, + /* SanDisk Corp. SanDisk 3.2Gen1 */ + { USB_DEVICE(0x0781, 0x55a3), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Realforce 87U Keyboard */ { USB_DEVICE(0x0853, 0x011b), .driver_info = USB_QUIRK_NO_LPM },
Greg Kroah-Hartman
maintainerPATCH 318/373 USB: VLI disk crashes if LPM is used
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit e00b39a4f3552c730f1e24c8d62c4a8c6aad4e5d upstream.
This device needs the NO_LPM quirk.
--- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/core/quirks.c +3 -0
@@ -539,6 +539,9 @@ static const struct usb_device_id usb_qu { USB_DEVICE(0x2040, 0x7200), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, + /* VLI disk */ + { USB_DEVICE(0x2109, 0x0711), .driver_info = USB_QUIRK_NO_LPM }, + /* Raydium Touchscreen */ { USB_DEVICE(0x2386, 0x3114), .driver_info = USB_QUIRK_NO_LPM },
Greg Kroah-Hartman
maintainerPATCH 319/373 USB: wdm: handle IO errors in wdm_wwan_port_start
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit 9697f5efcf5fdea65b8390b5eb81bebe746ceedc upstream.
In case submitting the URB fails we must undo
what we've done so far.
--- drivers/usb/class/cdc-wdm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/usb/class/cdc-wdm.c +10 -1
@@ -829,6 +829,7 @@ static struct usb_class_driver wdm_classstatic int wdm_wwan_port_start (struct wwan_port *port) {struct wdm_device *desc =wwan_port_get_drvdata (port); +int rv;/* The interface is both exposed via the WWAN framework and as a * legacy usbmisc chardev. If chardev is already open, just fail
@@ -848,7 +849,15 @@ static int wdm_wwan_port_start(struct wwwwan_port_txon (port);/* Start getting events */ -return usb_submit_urb (desc->validity,GFP_KERNEL ); + rv =usb_submit_urb (desc->validity,GFP_KERNEL ); +if (rv <0 ) { +wwan_port_txoff (port); + desc->manage_power (desc->intf,0 ); +/* this must be last lest we race with chardev open */ +clear_bit (WDM_WWAN_IN_USE , &desc->flags); + } + +return rv; }static void wdm_wwan_port_stop (struct wwan_port *port)
Greg Kroah-Hartman
maintainerPATCH 320/373 USB: wdm: close race between wdm_open and wdm_wwan_port_stop
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit c1846ed4eb527bdfe6b3b7dd2c78e2af4bf98f4f upstream.
Clearing WDM_WWAN_IN_USE must be the last action or we can open a chardev whose URBs are still poisoned
--- drivers/usb/class/cdc-wdm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/class/cdc-wdm.c +4 -2
@@ -726,7 +726,7 @@ static int wdm_open(struct inode *inode, rv = -EBUSY ; goto out; } - +smp_rmb ();/* ordered against wdm_wwan_port_stop() */ rv =usb_autopm_get_interface (desc->intf);if (rv <0 ) {dev_err (&desc->intf->dev,"Error autopm - %d\n" , rv);
@@ -868,8 +868,10 @@ static void wdm_wwan_port_stop(struct wwpoison_urbs (desc); desc->manage_power (desc->intf,0 );clear_bit (WDM_READ , &desc->flags); -clear_bit (WDM_WWAN_IN_USE , &desc->flags);unpoison_urbs (desc); +smp_wmb ();/* ordered against wdm_open() */ +/* this must be last lest we open a poisoned device */ +clear_bit (WDM_WWAN_IN_USE , &desc->flags); }static void wdm_wwan_port_tx_complete (struct urb *urb)
Greg Kroah-Hartman
maintainerPATCH 321/373 USB: wdm: wdm_wwan_port_tx_complete mutex in atomic context
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit 1fdc4dca350c0b8ada0b8ebf212504e1ad55e511 upstream.
wdm_wwan_port_tx_complete is called from a completion handler with irqs disabled and possible in IRQ context usb_autopm_put_interface can take a mutex. Hence usb_autopm_put_interface_async must be used.
--- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/class/cdc-wdm.c +1 -1
@@ -879,7 +879,7 @@ static void wdm_wwan_port_tx_complete(ststruct sk_buff *skb = urb->context;struct wdm_device *desc =skb_shinfo (skb)->destructor_arg; -usb_autopm_put_interface (desc->intf); +usb_autopm_put_interface_async (desc->intf);wwan_port_txon (desc->wwanp);kfree_skb (skb); }
Greg Kroah-Hartman
maintainerPATCH 322/373 USB: wdm: add annotation
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <[email protected]>
commit 73e9cc1ffd3650b12c4eb059dfdafd56e725ceda upstream.
This is not understandable without a comment on endianness
--- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/class/cdc-wdm.c +1 -1
@@ -909,7 +909,7 @@ static int wdm_wwan_port_tx(struct wwan_ req->bRequestType = (USB_DIR_OUT |USB_TYPE_CLASS |USB_RECIP_INTERFACE ); req->bRequest =USB_CDC_SEND_ENCAPSULATED_COMMAND ; req->wValue =0 ; - req->wIndex = desc->inum; + req->wIndex = desc->inum;/* already converted */ req->wLength =cpu_to_le16 (skb->len);skb_shinfo (skb)->destructor_arg = desc;
Greg Kroah-Hartman
maintainerPATCH 323/373 MIPS: cm: Detect CM quirks from device tree
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gregory CLEMENT <[email protected]>
[ Upstream commit e27fbe16af5cfc40639de4ced67d1a866a1953e9 ]
Some information that should be retrieved at runtime for the Coherence Manager can be either absent or wrong. This patch allows checking if some of this information is available from the device tree and updates the internal variable accordingly.
For now, only the compatible string associated with the broken HCI is being retrieved.
--- arch/mips/include/asm/mips-cm.h | 22 ++++++++++++++++++++++ arch/mips/kernel/mips-cm.c | 14 ++++++++++++++ 2 files changed, 36 insertions(+)
arch/mips/include/asm/mips-cm.h +22 -0
@@ -47,6 +47,16 @@ extern phys_addr_t __mips_cm_phys_base(void);*/ extern int mips_cm_is64; +/* +* mips_cm_is_l2_hci_broken - determine if HCI is broken +* +* Some CM reports show that Hardware Cache Initialization is +* complete, but in reality it's not the case. They also incorrectly +* indicate that Hardware Cache Initialization is supported. This +* flags allows warning about this broken feature. +*/ +extern bool mips_cm_is_l2_hci_broken; +/** * mips_cm_error_report - Report CM cache errors */
@@ -85,6 +95,18 @@ static inline bool mips_cm_present(void)#endif } +/** +* mips_cm_update_property - update property from the device tree +* +* Retrieve the properties from the device tree if a CM node exist and +* update the internal variable based on this. +*/ +#ifdef CONFIG_MIPS_CM +extern void mips_cm_update_property (void ); +#else +static void mips_cm_update_property (void ) {} +#endif +/** * mips_cm_has_l2sync - determine whether an L2-only sync region is present *
arch/mips/kernel/mips-cm.c +14 -0
@@ -5,6 +5,7 @@*/ #include <linux/errno.h> +#include <linux/of.h> #include <linux/percpu.h> #include <linux/spinlock.h>
@@ -14,6 +15,7 @@void __iomem *mips_gcr_base;void __iomem *mips_cm_l2sync_base;int mips_cm_is64; +bool mips_cm_is_l2_hci_broken;static char *cm2_tr[8 ] = {"mem" ,"gcr" ,"gic" ,"mmio" ,
@@ -238,6 +240,18 @@ static void mips_cm_probe_l2sync(void) mips_cm_l2sync_base =ioremap (addr,MIPS_CM_L2SYNC_SIZE ); } +void mips_cm_update_property (void ) +{ +struct device_node *cm_node; + + cm_node =of_find_compatible_node (of_root,NULL ,"mobileye,eyeq6-cm" ); +if (!cm_node) +return ; +pr_info ("HCI (Hardware Cache Init for the L2 cache) in GCR_L2_RAM_CONFIG from the CM3 is broken" ); + mips_cm_is_l2_hci_broken = true; +of_node_put (cm_node); +} +int mips_cm_probe (void ) {phys_addr_t addr;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 324/373 crypto: null - Use spin lock instead of mutex
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
[ Upstream commit dcc47a028c24e793ce6d6efebfef1a1e92f80297 ]
As the null algorithm may be freed in softirq context through af_alg, use spin locks instead of mutexes to protect the default null algorithm.
--- crypto/crypto_null.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-)
crypto/crypto_null.c +26 -13
@@ -17,10 +17,10 @@#include <crypto/internal/skcipher.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> +#include <linux/spinlock.h> #include <linux/string.h> -static DEFINE_MUTEX (crypto_default_null_skcipher_lock); +static DEFINE_SPINLOCK (crypto_default_null_skcipher_lock);static struct crypto_sync_skcipher *crypto_default_null_skcipher;static int crypto_default_null_skcipher_refcnt;
@@ -152,23 +152,32 @@ MODULE_ALIAS_CRYPTO("cipher_null");struct crypto_sync_skcipher *crypto_get_default_null_skcipher (void ) { +struct crypto_sync_skcipher *ntfm =NULL ;struct crypto_sync_skcipher *tfm; -mutex_lock (&crypto_default_null_skcipher_lock); +spin_lock_bh (&crypto_default_null_skcipher_lock); tfm = crypto_default_null_skcipher;if (!tfm) { - tfm =crypto_alloc_sync_skcipher ("ecb(cipher_null)" ,0 ,0 ); -if (IS_ERR (tfm)) - goto unlock; - - crypto_default_null_skcipher = tfm; +spin_unlock_bh (&crypto_default_null_skcipher_lock); + + ntfm =crypto_alloc_sync_skcipher ("ecb(cipher_null)" ,0 ,0 ); +if (IS_ERR (ntfm)) +return ntfm; + +spin_lock_bh (&crypto_default_null_skcipher_lock); + tfm = crypto_default_null_skcipher; +if (!tfm) { + tfm = ntfm; + ntfm =NULL ; + crypto_default_null_skcipher = tfm; + } } crypto_default_null_skcipher_refcnt++; +spin_unlock_bh (&crypto_default_null_skcipher_lock); -unlock: -mutex_unlock (&crypto_default_null_skcipher_lock); +crypto_free_sync_skcipher (ntfm);return tfm; }
@@ -176,12 +185,16 @@ EXPORT_SYMBOL_GPL(crypto_get_default_null_skcipher);void crypto_put_default_null_skcipher (void ) { -mutex_lock (&crypto_default_null_skcipher_lock); +struct crypto_sync_skcipher *tfm =NULL ; + +spin_lock_bh (&crypto_default_null_skcipher_lock);if (!--crypto_default_null_skcipher_refcnt) { -crypto_free_sync_skcipher (crypto_default_null_skcipher); + tfm = crypto_default_null_skcipher; crypto_default_null_skcipher =NULL ; } -mutex_unlock (&crypto_default_null_skcipher_lock); +spin_unlock_bh (&crypto_default_null_skcipher_lock); + +crypto_free_sync_skcipher (tfm); }EXPORT_SYMBOL_GPL (crypto_put_default_null_skcipher);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 325/373 clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
[ Upstream commit b20150d499b3ee5c2d632fbc5ac94f98dd33accf ]
of_clk_get_hw_from_clkspec() checks all available clock-providers by comparing their of nodes to the one from the clkspec. If no matching clock provider is found, the function returns -EPROBE_DEFER to cause a re-check at a later date. If a matching clock provider is found, an authoritative answer can be retrieved from it whether the clock exists or not.
This does not take into account that the clock-provider may never appear, because it's node is disabled. This can happen when a clock is optional, provided by a separate block which never gets enabled.
One example of this happening is the rk3588's VOP, which has optional additional display clocks coming from PLLs inside the hdmiphy blocks. These can be used for better rates, but the system will also work without them.
The problem around that is described in the followups to[1]. As we already know the of node of the presumed clock provider, add a check via of_device_is_available() whether this is a "valid" device node. This prevents eternal defer loops.
--- drivers/clk/clk.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/clk/clk.c +4 -0
@@ -4993,6 +4993,10 @@ of_clk_get_hw_from_clkspec(struct of_phandle_args *clkspec)if (!clkspec)return ERR_PTR (-EINVAL ); +/* Check if node in clkspec is in disabled/fail state */ +if (!of_device_is_available (clkspec->np)) +return ERR_PTR (-ENOENT ); +mutex_lock (&of_clk_mutex);list_for_each_entry (provider, &of_clk_providers, link) {if (provider->node == clkspec->np) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 326/373 parisc: PDT: Fix missing prototype warning
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yu-Chun Lin <[email protected]>
[ Upstream commit b899981750dcb958ceffa4462d903963ee494aa2 ]
As reported by the kernel test robot, the following error occurs:
arch/parisc/kernel/pdt.c:65:6: warning: no previous prototype for 'arch_report_meminfo' [-Wmissing-prototypes]
65 | void arch_report_meminfo(struct seq_file *m)
| ^~~~~~~~~~~~~~~~~~~
arch_report_meminfo() is declared in include/linux/proc_fs.h and only defined when CONFIG_PROC_FS is enabled. Wrap its definition in #ifdef CONFIG_PROC_FS to fix the -Wmissing-prototypes warning.
--- arch/parisc/kernel/pdt.c | 2 ++ 1 file changed, 2 insertions(+)
arch/parisc/kernel/pdt.c +2 -0
@@ -62,6 +62,7 @@ static unsigned long pdt_entry[MAX_PDT_ENTRIES] __page_aligned_bss;#define PDT_ADDR_PERM_ERR (pdt_type != PDT_PDC ? 2UL : 0UL)#define PDT_ADDR_SINGLE_ERR 1UL +#ifdef CONFIG_PROC_FS /* report PDT entries via /proc/meminfo */ void arch_report_meminfo (struct seq_file *m) {
@@ -73,6 +74,7 @@ void arch_report_meminfo(struct seq_file *m)seq_printf (m,"PDT_cur_entries: %7lu\n" , pdt_status.pdt_entries); } +#endif static int get_info_pat_new (void ) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 327/373 s390/sclp: Add check for get_zeroed_page()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <[email protected]>
[ Upstream commit 3db42c75a921854a99db0a2775814fef97415bac ]
Add check for the return value of get_zeroed_page() in sclp_console_init() to prevent null pointer dereference. Furthermore, to solve the memory leak caused by the loop allocation, add a free helper to do the free job.
--- drivers/s390/char/sclp_con.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/s390/char/sclp_con.c +17 -0
@@ -260,6 +260,19 @@ static struct console sclp_console = .index = 0 /* ttyS0 */ }; +/* +* Release allocated pages. +*/ +static void __init __sclp_console_free_pages (void ) +{ +struct list_head *page, *p; + +list_for_each_safe (page, p, &sclp_con_pages) { +list_del (page); +free_page ((unsigned long )page); + } +} +/* * called by console_init() in drivers/char/tty_io.c at boot-time. */
@@ -279,6 +292,10 @@ sclp_console_init(void)/* Allocate pages for output buffering */ for (i =0 ; i < sclp_console_pages; i++) { page = (void *)get_zeroed_page (GFP_KERNEL |GFP_DMA ); +if (!page) { +__sclp_console_free_pages (); +return -ENOMEM ; + }list_add_tail (page, &sclp_con_pages); } sclp_conbuf =NULL ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 328/373 s390/tty: Fix a potential memory leak bug
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Haoxiang Li <[email protected]>
[ Upstream commit ad9bb8f049717d64c5e62b2a44954be9f681c65b ]
The check for get_zeroed_page() leads to a direct return and overlooked the memory leak caused by loop allocation. Add a free helper to free spaces allocated by get_zeroed_page().
--- drivers/s390/char/sclp_tty.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/s390/char/sclp_tty.c +12 -0
@@ -490,6 +490,17 @@ static const struct tty_operations sclp_ops = { .flush_buffer = sclp_tty_flush_buffer, }; +/* Release allocated pages. */ +static void __init __sclp_tty_free_pages (void ) +{ +struct list_head *page, *p; + +list_for_each_safe (page, p, &sclp_tty_pages) { +list_del (page); +free_page ((unsigned long )page); + } +} +static int __init sclp_tty_init (void ) {
@@ -516,6 +527,7 @@ sclp_tty_init(void)for (i =0 ; i <MAX_KMEM_PAGES ; i++) { page = (void *)get_zeroed_page (GFP_KERNEL |GFP_DMA );if (page ==NULL ) { +__sclp_tty_free_pages ();tty_driver_kref_put (driver);return -ENOMEM ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 329/373 usb: host: max3421-hcd: Add missing spi_device_id table
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Stein <[email protected]>
[ Upstream commit 41d5e3806cf589f658f92c75195095df0b66f66a ]
"maxim,max3421" DT compatible is missing its SPI device ID entry, not allowing module autoloading and leading to the following message:
"SPI driver max3421-hcd has no spi_device_id for maxim,max3421"
Fix this by adding the spi_device_id table.
--- drivers/usb/host/max3421-hcd.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/usb/host/max3421-hcd.c +7 -0
@@ -1956,6 +1956,12 @@ max3421_remove(struct spi_device *spi)return 0 ; } +static const struct spi_device_id max3421_spi_ids[] = { + {"max3421" }, + { }, +}; +MODULE_DEVICE_TABLE (spi, max3421_spi_ids); +static const struct of_device_id max3421_of_match_table[] = { { .compatible ="maxim,max3421" , }, {},
@@ -1965,6 +1971,7 @@ MODULE_DEVICE_TABLE(of, max3421_of_match_table);static struct spi_driver max3421_driver = { .probe = max3421_probe, .remove = max3421_remove, + .id_table = max3421_spi_ids, .driver = { .name ="max3421-hcd" , .of_match_table =of_match_ptr (max3421_of_match_table),
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 330/373 fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Edward Adam Davis <[email protected]>
[ Upstream commit ff355926445897cc9fdea3b00611e514232c213c ]
Syzbot reported a WARNING in ntfs_extend_initialized_size. The data type of in->i_valid and to is u64 in ntfs_file_mmap(). If their values are greater than LLONG_MAX, overflow will occur because the data types of the parameters valid and new_valid corresponding to the function ntfs_extend_initialized_size() are loff_t.
Before calling ntfs_extend_initialized_size() in the ntfs_file_mmap(), the "ni->i_valid < to" has been determined, so the same WARN_ON determination is not required in ntfs_extend_initialized_size().
Just execute the ntfs_extend_initialized_size() in ntfs_extend() to make a WARN_ON check.
--- fs/ntfs3/file.c | 1 + 1 file changed, 1 insertion(+)
fs/ntfs3/file.c +1 -0
@@ -435,6 +435,7 @@ static int ntfs_extend(struct inode *inode, loff_t pos, size_t count, }if (extend_init && !is_compressed (ni)) { +WARN_ON (ni->i_valid >= pos); err =ntfs_extend_initialized_size (file, ni, ni->i_valid, pos);if (err) goto out;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 331/373 usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Shevchenko <[email protected]>
[ Upstream commit 461f24bff86808ee5fbfe74751a825f8a7ab24e0 ]
Intel Merrifield SoC uses these endpoints for tracing and they cannot be re-allocated if being used because the side band flow control signals are hard wired to certain endpoints:
• 1 High BW Bulk IN (IN#1) (RTIT)
• 1 1KB BW Bulk IN (IN#8) + 1 1KB BW Bulk OUT (Run Control) (OUT#8)
In device mode, since RTIT (EP#1) and EXI/RunControl (EP#8) uses External Buffer Control (EBC) mode, these endpoints are to be mapped to EBC mode (to be done by EXI target driver). Additionally TRB for RTIT and EXI are maintained in STM (System Trace Module) unit and the EXI target driver will as well configure the TRB location for EP #1 IN and EP#8 (IN and OUT). Since STM/PTI and EXI hardware blocks manage these endpoints and interface to OTG3 controller through EBC interface, there is no need to enable any events (such as XferComplete etc) for these end points.
--- drivers/usb/dwc3/dwc3-pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/usb/dwc3/dwc3-pci.c +10 -0
@@ -132,11 +132,21 @@ static const struct property_entry dwc3_pci_intel_byt_properties[] = { {} }; +/* +* Intel Merrifield SoC uses these endpoints for tracing and they cannot +* be re-allocated if being used because the side band flow control signals +* are hard wired to certain endpoints: +* - 1 High BW Bulk IN (IN#1) (RTIT) +* - 1 1KB BW Bulk IN (IN#8) + 1 1KB BW Bulk OUT (Run Control) (OUT#8) +*/ +static const u8 dwc3_pci_mrfld_reserved_endpoints[] = {3 ,16 ,17 }; +static const struct property_entry dwc3_pci_mrfld_properties[] = {PROPERTY_ENTRY_STRING ("dr_mode" ,"otg" ),PROPERTY_ENTRY_STRING ("linux,extcon-name" ,"mrfld_bcove_pwrsrc" ),PROPERTY_ENTRY_BOOL ("snps,dis_u3_susphy_quirk" ),PROPERTY_ENTRY_BOOL ("snps,dis_u2_susphy_quirk" ), +PROPERTY_ENTRY_U8_ARRAY ("snps,reserved-endpoints" , dwc3_pci_mrfld_reserved_endpoints),PROPERTY_ENTRY_BOOL ("snps,usb2-gadget-lpm-disable" ),PROPERTY_ENTRY_BOOL ("linux,sysdev_is_parent" ), {}
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 332/373 sound/virtio: Fix cancel_sync warnings on uninitialized work_structs
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Stultz <[email protected]>
[ Upstream commit 3c7df2e27346eb40a0e86230db1ccab195c97cfe ]
Betty reported hitting the following warning:
[ 8.709131][ T221] WARNING: CPU: 2 PID: 221 at kernel/workqueue.c:4182 ... [ 8.713282][ T221] Call trace: [ 8.713365][ T221] __flush_work+0x8d0/0x914 [ 8.713468][ T221] __cancel_work_sync+0xac/0xfc [ 8.713570][ T221] cancel_work_sync+0x24/0x34 [ 8.713667][ T221] virtsnd_remove+0xa8/0xf8 [virtio_snd ab15f34d0dd772f6d11327e08a81d46dc9c36276] [ 8.713868][ T221] virtsnd_probe+0x48c/0x664 [virtio_snd ab15f34d0dd772f6d11327e08a81d46dc9c36276] [ 8.714035][ T221] virtio_dev_probe+0x28c/0x390 [ 8.714139][ T221] really_probe+0x1bc/0x4c8
...
It seems we're hitting the error path in virtsnd_probe(), which triggers a virtsnd_remove() which iterates over the substreams calling cancel_work_sync() on the elapsed_period work_struct.
Looking at the code, from earlier in:
virtsnd_probe()->virtsnd_build_devs()->virtsnd_pcm_parse_cfg()
We set snd->nsubstreams, allocate the snd->substreams, and if we then hit an error on the info allocation or something in virtsnd_ctl_query_info() fails, we will exit without having initialized the elapsed_period work_struct.
When that error path unwinds we then call virtsnd_remove() which as long as the substreams array is allocated, will iterate through calling cancel_work_sync() on the uninitialized work struct hitting this warning.
Takashi Iwai suggested this fix, which initializes the substreams structure right after allocation, so that if we hit the error paths we avoid trying to cleanup uninitialized data.
Note: I have not yet managed to reproduce the issue myself, so this patch has had limited testing.
Feedback or thoughts would be appreciated!
Message-Id: <[email protected]>
--- sound/virtio/virtio_pcm.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
sound/virtio/virtio_pcm.c +15 -6
@@ -337,6 +337,21 @@ int virtsnd_pcm_parse_cfg(struct virtio_snd *snd)if (!snd->substreams)return -ENOMEM ; +/* +* Initialize critical substream fields early in case we hit an +* error path and end up trying to clean up uninitialized structures +* elsewhere. +*/ +for (i =0 ; i < snd->nsubstreams; ++i) { +struct virtio_pcm_substream *vss = &snd->substreams[i]; + + vss->snd = snd; + vss->sid = i; +INIT_WORK (&vss->elapsed_period, virtsnd_pcm_period_elapsed); +init_waitqueue_head (&vss->msg_empty); +spin_lock_init (&vss->lock); + } + info =kcalloc (snd->nsubstreams,sizeof (*info),GFP_KERNEL );if (!info)return -ENOMEM ;
@@ -350,12 +365,6 @@ int virtsnd_pcm_parse_cfg(struct virtio_snd *snd)struct virtio_pcm_substream *vss = &snd->substreams[i];struct virtio_pcm *vpcm; - vss->snd = snd; - vss->sid = i; -INIT_WORK (&vss->elapsed_period, virtsnd_pcm_period_elapsed); -init_waitqueue_head (&vss->msg_empty); -spin_lock_init (&vss->lock); - rc =virtsnd_pcm_build_hw (vss, &info[i]);if (rc) goto on_exit;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 333/373 dmaengine: dmatest: Fix dmatest waiting less when interrupted
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vinicius Costa Gomes <[email protected]>
[ Upstream commit e87ca16e99118ab4e130a41bdf12abbf6a87656c ]
Change the "wait for operation finish" logic to take interrupts into account.
When using dmatest with idxd DMA engine, it's possible that during longer tests, the interrupt notifying the finish of an operation happens during wait_event_freezable_timeout(), which causes dmatest to cleanup all the resources, some of which might still be in use.
This fix ensures that the wait logic correctly handles interrupts, preventing premature cleanup of resources.
--- drivers/dma/dmatest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/dma/dmatest.c +3 -3
@@ -828,9 +828,9 @@ static int dmatest_func(void *data) }else {dma_async_issue_pending (chan); -wait_event_freezable_timeout (thread->done_wait, - done->done, -msecs_to_jiffies (params->timeout)); +wait_event_timeout (thread->done_wait, + done->done, +msecs_to_jiffies (params->timeout)); status =dma_async_is_tx_complete (chan, cookie,NULL ,NULL );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 334/373 usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Pecio <[email protected]>
[ Upstream commit 28a76fcc4c85dd39633fb96edb643c91820133e3 ]
Nothing prevents a broken HC from claiming that an endpoint is Running and repeatedly rejecting Stop Endpoint with Context State Error.
Avoid infinite retries and give back cancelled TDs.
No such cases known so far, but HCs have bugs.
--- drivers/usb/host/xhci-ring.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/usb/host/xhci-ring.c +7 -4
@@ -1183,16 +1183,19 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,* Stopped state, but it will soon change to Running. * * Assume this bug on unexpected Stop Endpoint failures. -* Keep retrying until the EP starts and stops again, on -* chips where this is known to help. Wait for 100ms. +* Keep retrying until the EP starts and stops again. */ -if (time_is_before_jiffies (ep->stop_time +msecs_to_jiffies (100 ))) -break ; fallthrough;case EP_STATE_RUNNING :/* Race, HW handled stop ep cmd before ep was running */ xhci_dbg (xhci,"Stop ep completion ctx error, ctx_state %d\n" ,GET_EP_CTX_STATE (ep_ctx)); +/* +* Don't retry forever if we guessed wrong or a defective HC never starts +* the EP or says 'Running' but fails the command. We must give back TDs. +*/ +if (time_is_before_jiffies (ep->stop_time +msecs_to_jiffies (100 ))) +break ; command =xhci_alloc_command (xhci, false,GFP_ATOMIC );if (!command)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 335/373 usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chenyuan Yang <[email protected]>
[ Upstream commit 8c75f3e6a433d92084ad4e78b029ae680865420f ]
The variable d->name, returned by devm_kasprintf(), could be NULL. A pointer check is added to prevent potential NULL pointer dereference. This is similar to the fix in commit 3027e7b15b02
("ice: Fix some null pointer dereference issues in ice_ptp.c").
This issue is found by our static analysis tool
--- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/gadget/udc/aspeed-vhub/dev.c +3 -0
@@ -538,6 +538,9 @@ int ast_vhub_init_dev(struct ast_vhub *vhub, unsigned int idx) d->vhub = vhub; d->index = idx; d->name =devm_kasprintf (parent,GFP_KERNEL ,"port%d" , idx+1 ); +if (!d->name) +return -ENOMEM ; + d->regs = vhub->regs +0x100 +0x10 * idx;ast_vhub_init_ep0 (vhub, &d->ep0, d);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 336/373 objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 060aed9c0093b341480770457093449771cf1496 ]
If 'port_id' is negative, the shift counts in wcd934x_slim_irq_handler() also become negative, resulting in undefined behavior due to shift out of bounds.
If I'm reading the code correctly, that appears to be not possible, but with KCOV enabled, Clang's range analysis isn't always able to determine that and generates undefined behavior.
As a result the code generation isn't optimal, and undefined behavior should be avoided regardless. Improve code generation and remove the undefined behavior by converting the signed variables to unsigned.
Fixes the following warning with UBSAN:
sound/soc/codecs/snd-soc-wcd934x.o: warning: objtool: .text.wcd934x_slim_irq_handler: unexpected end of section
--- sound/soc/codecs/wcd934x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/wcd934x.c +1 -1
@@ -2281,7 +2281,7 @@ static irqreturn_t wcd934x_slim_irq_handler(int irq, void *data) {struct wcd934x_codec *wcd = data;unsigned long status =0 ; -int i, j, port_id; +unsigned int i, j, port_id;unsigned int val, int_val =0 ;irqreturn_t ret =IRQ_NONE ;bool tx;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 337/373 qibfs: fix _another_ leak
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <[email protected]>
[ Upstream commit bdb43af4fdb39f844ede401bdb1258f67a580a27 ]
failure to allocate inode => leaked dentry...
this one had been there since the initial merge; to be fair, if we are that far OOM, the odds of failing at that particular allocation are low...
--- drivers/infiniband/hw/qib/qib_fs.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/hw/qib/qib_fs.c +1 -0
@@ -56,6 +56,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,struct inode *inode =new_inode (dir->i_sb);if (!inode) { +dput (dentry); error = -EPERM ; goto bail; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 338/373 ntb: reduce stack usage in idt_scan_mws
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
[ Upstream commit aff12700b8dd7422bfe2277696e192af4df9de8f ]
idt_scan_mws() puts a large fixed-size array on the stack and copies it into a smaller dynamically allocated array at the end. On 32-bit targets, the fixed size can easily exceed the warning limit for possible stack overflow:
drivers/ntb/hw/idt/ntb_hw_idt.c:1041:27: error: stack frame size (1032) exceeds limit (1024) in 'idt_scan_mws' [-Werror,-Wframe-larger-than]
Change it to instead just always use dynamic allocation for the array from the start. It's too big for the stack, but not actually all that much for a permanent allocation.
--- drivers/ntb/hw/idt/ntb_hw_idt.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
drivers/ntb/hw/idt/ntb_hw_idt.c +7 -11
@@ -1041,7 +1041,7 @@ static inline char *idt_get_mw_name(enum idt_mw_type mw_type)static struct idt_mw_cfg *idt_scan_mws (struct idt_ntb_dev *ndev,int port,unsigned char *mw_cnt) { -struct idt_mw_cfg mws[IDT_MAX_NR_MWS ], *ret_mws; +struct idt_mw_cfg *mws;const struct idt_ntb_bar *bars;enum idt_mw_type mw_type;unsigned char widx, bidx, en_cnt;
@@ -1049,6 +1049,11 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port,int aprt_size;u32 data; + mws =devm_kcalloc (&ndev->ntb.pdev->dev,IDT_MAX_NR_MWS , +sizeof (*mws),GFP_KERNEL ); +if (!mws) +return ERR_PTR (-ENOMEM ); +/* Retrieve the array of the BARs registers */ bars = portdata_tbl[port].bars;
@@ -1103,16 +1108,7 @@ static struct idt_mw_cfg *idt_scan_mws(struct idt_ntb_dev *ndev, int port, } } -/* Allocate memory for memory window descriptors */ - ret_mws =devm_kcalloc (&ndev->ntb.pdev->dev, *mw_cnt,sizeof (*ret_mws), -GFP_KERNEL ); -if (!ret_mws) -return ERR_PTR (-ENOMEM ); - -/* Copy the info of detected memory windows */ -memcpy (ret_mws, mws, (*mw_cnt)*sizeof (*ret_mws)); - -return ret_mws; +return mws; }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 339/373 sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <[email protected]>
[ Upstream commit 975776841e689dd8ba36df9fa72ac3eca3c2957a ]
kernel/sched/isolation.c obviously makes no sense without CONFIG_SMP, but the Kconfig entry we have right now:
config CPU_ISOLATION bool "CPU isolation" depends on SMP || COMPILE_TEST
allows the creation of pointless .config's which cause build failures.
--- init/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
init/Kconfig +1 -1
@@ -674,7 +674,7 @@ endmenu # "CPU/Task time and stats accounting" config CPU_ISOLATION bool "CPU isolation" - depends on SMP || COMPILE_TEST + depends on SMP default y help Make sure that CPUs running critical tasks are not disturbed by
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 340/373 KVM: s390: Dont use %pK through tracepoints
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 6c9567e0850be2f0f94ab64fa6512413fd1a1eb1 ]
Restricted pointers ("%pK") are not meant to be used through TP_format(). It can unintentionally expose security sensitive, raw pointer values.
Use regular pointer formatting instead.
Message-ID: <20250217-restricted-pointers-s390-v1-1-0e4ace75d8aa@linutronix.de>
--- arch/s390/kvm/trace-s390.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kvm/trace-s390.h +2 -2
@@ -56,7 +56,7 @@ TRACE_EVENT(kvm_s390_create_vcpu, __entry->sie_block = sie_block; ), -TP_printk ("create cpu %d at 0x%pK, sie block at 0x%pK" , +TP_printk ("create cpu %d at 0x%p, sie block at 0x%p" , __entry->id, __entry->vcpu, __entry->sie_block) );
@@ -255,7 +255,7 @@ TRACE_EVENT(kvm_s390_enable_css, __entry->kvm = kvm; ), -TP_printk ("enabling channel I/O support (kvm @ %pK)\n" , +TP_printk ("enabling channel I/O support (kvm @ %p)\n" , __entry->kvm) );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 341/373 udmabuf: fix a buf size overflow issue during udmabuf creation
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiaogang Chen <[email protected]>
[ Upstream commit 021ba7f1babd029e714d13a6bf2571b08af96d0f ]
by casting size_limit_mb to u64 when calculate pglimit.
--- drivers/dma-buf/udmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/udmabuf.c +1 -1
@@ -186,7 +186,7 @@ static long udmabuf_create(struct miscdevice *device,if (!ubuf)return -ENOMEM ; - pglimit = (size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ; + pglimit = ((u64 )size_limit_mb *1024 *1024 ) >>PAGE_SHIFT ;for (i =0 ; i < head->count; i++) {if (!IS_ALIGNED (list[i].offset,PAGE_SIZE )) goto err;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 342/373 selftests: ublk: fix test_stripe_04
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Lei <[email protected]>
[ Upstream commit 72070e57b0a518ec8e562a2b68fdfc796ef5c040 ]
Commit 57ed58c13256 ("selftests: ublk: enable zero copy for stripe target") added test entry of test_stripe_04, but forgot to add the test script.
So fix the test by adding the script file.
--- .../testing/selftests/ublk/test_stripe_04.sh | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tools/testing/selftests/ublk/test_stripe_04.sh
tools/testing/selftests/ublk/test_stripe_04.sh new file +24 -0
@@ -0,0 +1,24 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +. "$(cd "$(dirname "$0")" && pwd)"/test_common.sh + +TID="stripe_04" +ERR_CODE=0 + +_prep_test "stripe" "mkfs & mount & umount on zero copy" + +backfile_0=$(_create_backfile 256M) +backfile_1=$(_create_backfile 256M) +dev_id=$(_add_ublk_dev -t stripe -z -q 2 "$backfile_0" "$backfile_1") +_check_add_dev $TID $? "$backfile_0" "$backfile_1" + +_mkfs_mount_test /dev/ublkb"${dev_id}" +ERR_CODE=$? + +_cleanup_test "stripe" + +_remove_backfile "$backfile_0" +_remove_backfile "$backfile_1" + +_show_result $TID $ERR_CODE
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 343/373 xen: Change xen-acpi-processor dom0 dependency
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Andryuk <[email protected]>
[ Upstream commit 0f2946bb172632e122d4033e0b03f85230a29510 ]
xen-acpi-processor functions under a PVH dom0 with only a xen_initial_domain() runtime check. Change the Kconfig dependency from PV dom0 to generic dom0 to reflect that.
Message-ID: <[email protected]>
--- drivers/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/Kconfig +1 -1
@@ -241,7 +241,7 @@ config XEN_PRIVCMD config XEN_ACPI_PROCESSOR tristate "Xen ACPI processor" - depends on XEN && XEN_PV_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ + depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ default m help This ACPI processor uploads Power Management information to the Xen
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 344/373 nvme: requeue namespace scan on missed AENs
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
[ Upstream commit 9546ad1a9bda7362492114f5866b95b0ac4a100e ]
Scanning for namespaces can take some time, so if the target is reconfigured while the scan is running we may miss a Attached Namespace Attribute Changed AEN.
Check if the NVME_AER_NOTICE_NS_CHANGED bit is set once the scan has finished, and requeue scanning to pick up any missed change.
--- drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/nvme/host/core.c +4 -0
@@ -4221,6 +4221,10 @@ static void nvme_scan_work(struct work_struct *work)if (nvme_scan_ns_list (ctrl) !=0 )nvme_scan_ns_sequential (ctrl);mutex_unlock (&ctrl->scan_lock); + +/* Requeue if we have missed AENs */ +if (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events)) +nvme_queue_scan (ctrl); }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 345/373 ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean-Marc Eurin <[email protected]>
[ Upstream commit 7ab4f0e37a0f4207e742a8de69be03984db6ebf0 ]
The end of table checks should be done with the structure size, but 2 of the 3 similar calls use the pointer size.
--- drivers/acpi/pptt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/pptt.c +2 -2
@@ -217,7 +217,7 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr, node_entry =ACPI_PTR_DIFF (node, table_hdr); entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,sizeof (struct acpi_table_pptt )); - proc_sz =sizeof (struct acpi_pptt_processor *); + proc_sz =sizeof (struct acpi_pptt_processor );while ((unsigned long )entry + proc_sz < table_end) { cpu_node = (struct acpi_pptt_processor *)entry;
@@ -258,7 +258,7 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he table_end = (unsigned long )table_hdr + table_hdr->length; entry = ACPI_ADD_PTR(struct acpi_subtable_header, table_hdr,sizeof (struct acpi_table_pptt )); - proc_sz =sizeof (struct acpi_pptt_processor *); + proc_sz =sizeof (struct acpi_pptt_processor );/* find the processor structure associated with this cpuid */ while ((unsigned long )entry + proc_sz < table_end) {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 346/373 nvme: re-read ANA log page after ns scan completes
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
[ Upstream commit 62baf70c327444338c34703c71aa8cc8e4189bd6 ]
When scanning for new namespaces we might have missed an ANA AEN.
The NVMe base spec (NVMe Base Specification v2.1, Figure 151 'Asynchonous Event Information - Notice': Asymmetric Namespace Access Change) states:
A controller shall not send this even if an Attached Namespace Attribute Changed asynchronous event [...] is sent for the same event.
so we need to re-read the ANA log page after we rescanned the namespace list to update the ANA states of the new namespaces.
--- drivers/nvme/host/core.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/nvme/host/core.c +5 -0
@@ -4225,6 +4225,11 @@ static void nvme_scan_work(struct work_struct *work)/* Requeue if we have missed AENs */ if (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events))nvme_queue_scan (ctrl); +#ifdef CONFIG_NVME_MULTIPATH + else +/* Re-read the ANA log page to not miss updates */ + queue_work(nvme_wq, &ctrl->ana_work); +#endif }/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 347/373 objtool: Stop UNRET validation on UD2
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 9f9cc012c2cbac4833746a0182e06a8eec940d19 ]
In preparation for simplifying INSN_SYSCALL, make validate_unret() terminate control flow on UD2 just like validate_branch() already does.
--- tools/objtool/check.c | 3 +++ 1 file changed, 3 insertions(+)
tools/objtool/check.c +3 -0
@@ -3416,6 +3416,9 @@ static int validate_entry(struct objtool_file *file, struct instruction *insn)break ; } +if (insn->dead_end) +return 0 ; +if (!next) {WARN_FUNC ("teh end!" , insn->sec, insn->offset);return -1 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 348/373 selftests/mincore: Allow read-ahead pages to reach the end of the file
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Qiuxu Zhuo <[email protected]>
[ Upstream commit 197c1eaa7ba633a482ed7588eea6fd4aa57e08d4 ]
When running the mincore_selftest on a system with an XFS file system, it failed the "check_file_mmap" test case due to the read-ahead pages reaching the end of the file. The failure log is as below:
RUN global.check_file_mmap ...
mincore_selftest.c:264:check_file_mmap:Expected i (1024) < vec_size (1024) mincore_selftest.c:265:check_file_mmap:Read-ahead pages reached the end of the file
check_file_mmap: Test failed
FAIL global.check_file_mmap
This is because the read-ahead window size of the XFS file system on this machine is 4 MB, which is larger than the size from the #PF address to the end of the file. As a result, all the pages for this file are populated.
blockdev --getra /dev/nvme0n1p5
8192
blockdev --getbsz /dev/nvme0n1p5
512This issue can be fixed by extending the current FILE_SIZE 4MB to a larger number, but it will still fail if the read-ahead window size of the file system is larger enough. Additionally, in the real world, read-ahead pages reaching the end of the file can happen and is an expected behavior. Therefore, allowing read-ahead pages to reach the end of the file is a better choice for the "check_file_mmap" test case.
--- tools/testing/selftests/mincore/mincore_selftest.c | 3 --- 1 file changed, 3 deletions(-)
tools/testing/selftests/mincore/mincore_selftest.c +0 -3
@@ -261,9 +261,6 @@ TEST(check_file_mmap)TH_LOG ("No read-ahead pages found in memory" ); } - EXPECT_LT(i, vec_size) { -TH_LOG ("Read-ahead pages reached the end of the file" ); - }/* * End of the readahead window. The rest of the pages shouldn't * be in memory.
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 349/373 x86/bugs: Use SBPB in write_ibpb() if applicable
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit fc9fd3f98423367c79e0bd85a9515df26dc1b3cc ]
write_ibpb() does IBPB, which (among other things) flushes branch type predictions on AMD. If the CPU has SRSO_NO, or if the SRSO mitigation has been disabled, branch type flushing isn't needed, in which case the lighter-weight SBPB can be used.
The 'x86_pred_cmd' variable already keeps track of whether IBPB or SBPB should be used. Use that instead of hardcoding IBPB.
--- arch/x86/entry/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/entry/entry.S +1 -1
@@ -16,7 +16,7 @@ SYM_FUNC_START(entry_ibpb) movl $MSR_IA32_PRED_CMD, %ecx - movl $PRED_CMD_IBPB, %eax + movl _ASM_RIP(x86_pred_cmd), %eax xorl %edx, %edx wrmsr
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 350/373 x86/bugs: Dont fill RSB on VMEXIT with eIBRS+retpoline
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 18bae0dfec15b24ec14ca17dc18603372f5f254f ]
eIBRS protects against guest->host RSB underflow/poisoning attacks. Adding retpoline to the mix doesn't change that. Retpoline has a balanced CALL/RET anyway.
So the current full RSB filling on VMEXIT with eIBRS+retpoline is overkill. Disable it or do the VMEXIT_LITE mitigation if needed.
--- arch/x86/kernel/cpu/bugs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/bugs.c +4 -4
@@ -1579,20 +1579,20 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_case SPECTRE_V2_NONE :return ; -case SPECTRE_V2_EIBRS_LFENCE :case SPECTRE_V2_EIBRS : +case SPECTRE_V2_EIBRS_LFENCE : +case SPECTRE_V2_EIBRS_RETPOLINE :if (boot_cpu_has_bug (X86_BUG_EIBRS_PBRSB )) { -setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE );pr_info ("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE ); }return ; -case SPECTRE_V2_EIBRS_RETPOLINE :case SPECTRE_V2_RETPOLINE :case SPECTRE_V2_LFENCE :case SPECTRE_V2_IBRS : -setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT );pr_info ("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT );return ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 351/373 x86/bugs: Dont fill RSB on context switch with eIBRS
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Josh Poimboeuf <[email protected]>
[ Upstream commit 27ce8299bc1ec6df8306073785ff82b30b3cc5ee ]
User->user Spectre v2 attacks (including RSB) across context switches are already mitigated by IBPB in cond_mitigation(), if enabled globally or if either the prev or the next task has opted in to protection. RSB filling without IBPB serves no purpose for protecting user space, as indirect branches are still vulnerable.
User->kernel RSB attacks are mitigated by eIBRS. In which case the RSB filling on context switch isn't needed, so remove it.
--- arch/x86/kernel/cpu/bugs.c | 24 ++++++++++++------------ arch/x86/mm/tlb.c | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-)
arch/x86/kernel/cpu/bugs.c +12 -12
@@ -1553,7 +1553,7 @@ static void __init spec_ctrl_disable_kernel_rrsba(void) rrsba_disabled = true; } -static void __init spectre_v2_determine_rsb_fill_type_at_vmexit (enum spectre_v2_mitigation mode) +static void __init spectre_v2_select_rsb_mitigation (enum spectre_v2_mitigation mode) {/* * Similar to context switches, there are two types of RSB attacks
@@ -1577,7 +1577,7 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_*/ switch (mode) {case SPECTRE_V2_NONE : -return ; +break ;case SPECTRE_V2_EIBRS :case SPECTRE_V2_EIBRS_LFENCE :
@@ -1586,18 +1586,21 @@ static void __init spectre_v2_determine_rsb_fill_type_at_vmexit(enum spectre_v2_pr_info ("Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT\n" );setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT_LITE ); } -return ; +break ;case SPECTRE_V2_RETPOLINE :case SPECTRE_V2_LFENCE :case SPECTRE_V2_IBRS : -pr_info ("Spectre v2 / SpectreRSB : Filling RSB on VMEXIT\n" ); +pr_info ("Spectre v2 / SpectreRSB: Filling RSB on context switch and VMEXIT\n" ); +setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW );setup_force_cpu_cap (X86_FEATURE_RSB_VMEXIT ); -return ; - } +break ; -pr_warn_once ("Unknown Spectre v2 mode, disabling RSB mitigation at VM exit" ); -dump_stack (); +default : +pr_warn_once ("Unknown Spectre v2 mode, disabling RSB mitigation\n" ); +dump_stack (); +break ; + } }/*
@@ -1822,10 +1825,7 @@ static void __init spectre_v2_select_mitigation(void)* * FIXME: Is this pointless for retbleed-affected AMD? */ -setup_force_cpu_cap (X86_FEATURE_RSB_CTXSW ); -pr_info ("Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch\n" ); - -spectre_v2_determine_rsb_fill_type_at_vmexit (mode); +spectre_v2_select_rsb_mitigation (mode);/* * Retpoline protects the kernel, but doesn't protect firmware. IBRS
arch/x86/mm/tlb.c +3 -3
@@ -384,9 +384,9 @@ static void cond_mitigation(struct task_struct *next) prev_mm =this_cpu_read (cpu_tlbstate.last_user_mm_spec);/* -* Avoid user/user BTB poisoning by flushing the branch predictor -* when switching between processes. This stops one process from -* doing Spectre-v2 attacks on another. +* Avoid user->user BTB/RSB poisoning by flushing them when switching +* between processes. This stops one process from doing Spectre-v2 +* attacks on another. * * Both, the conditional and the always IBPB mode use the mm * pointer to avoid the IBPB when switching between tasks of the
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 352/373 nvmet-fc: take tgtport reference only once
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <[email protected]>
[ Upstream commit b0b26ad0e1943de25ce82a7e5af3574f31b1cf99 ]
The reference counting code can be simplified. Instead taking a tgtport refrerence at the beginning of nvmet_fc_alloc_hostport and put it back if not a new hostport object is allocated, only take it when a new hostport object is allocated.
--- drivers/nvme/target/fc.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-)
drivers/nvme/target/fc.c +7 -15
@@ -1030,33 +1030,24 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)struct nvmet_fc_hostport *newhost, *match =NULL ;unsigned long flags; +/* +* Caller holds a reference on tgtport. +*/ +/* if LLDD not implemented, leave as NULL */ if (!hosthandle)return NULL ; -/* -* take reference for what will be the newly allocated hostport if -* we end up using a new allocation -*/ -if (!nvmet_fc_tgtport_get (tgtport)) -return ERR_PTR (-EINVAL ); -spin_lock_irqsave (&tgtport->lock, flags); match =nvmet_fc_match_hostport (tgtport, hosthandle);spin_unlock_irqrestore (&tgtport->lock, flags); -if (match) { -/* no new allocation - release reference */ -nvmet_fc_tgtport_put (tgtport); +if (match)return match; - } newhost =kzalloc (sizeof (*newhost),GFP_KERNEL ); -if (!newhost) { -/* no new allocation - release reference */ -nvmet_fc_tgtport_put (tgtport); +if (!newhost)return ERR_PTR (-ENOMEM ); - }spin_lock_irqsave (&tgtport->lock, flags); match =nvmet_fc_match_hostport (tgtport, hosthandle);
@@ -1065,6 +1056,7 @@ nvmet_fc_alloc_hostport(struct nvmet_fc_tgtport *tgtport, void *hosthandle)kfree (newhost); newhost = match; }else { +nvmet_fc_tgtport_get (tgtport); newhost->tgtport = tgtport; newhost->hosthandle = hosthandle;INIT_LIST_HEAD (&newhost->host_list);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 353/373 nvmet-fc: put ref when assoc->del_work is already scheduled
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Wagner <[email protected]>
[ Upstream commit 70289ae5cac4d3a39575405aaf63330486cea030 ]
Do not leak the tgtport reference when the work is already scheduled.
--- drivers/nvme/target/fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/nvme/target/fc.c +2 -1
@@ -1091,7 +1091,8 @@ static void nvmet_fc_schedule_delete_assoc(struct nvmet_fc_tgt_assoc *assoc) {nvmet_fc_tgtport_get (assoc->tgtport); -queue_work (nvmet_wq, &assoc->del_work); +if (!queue_work (nvmet_wq, &assoc->del_work)) +nvmet_fc_tgtport_put (assoc->tgtport); } static struct nvmet_fc_tgt_assoc *
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 354/373 ext4: make block validity check resistent to sb bh corruption
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ojaswin Mujoo <[email protected]>
[ Upstream commit ccad447a3d331a239477c281533bacb585b54a98 ]
Block validity checks need to be skipped in case they are called for journal blocks since they are part of system's protected zone.
Currently, this is done by checking inode->ino against sbi->s_es->s_journal_inum, which is a direct read from the ext4 sb buffer head. If someone modifies this underneath us then the s_journal_inum field might get corrupted. To prevent against this, change the check to directly compare the inode with journal->j_inode.
**Slight change in behavior**: During journal init path, check_block_validity etc might be called for journal inode when sbi->s_journal is not set yet. In this case we now proceed with ext4_inode_block_valid() instead of returning early. Since systems zones have not been set yet, it is okay to proceed so we can perform basic checks on the blocks.
--- fs/ext4/block_validity.c | 5 ++--- fs/ext4/inode.c | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-)
fs/ext4/block_validity.c +2 -3
@@ -351,10 +351,9 @@ int ext4_check_blockref(const char *function, unsigned int line, {__le32 *bref = p;unsigned int blk; +journal_t *journal =EXT4_SB (inode->i_sb)->s_journal; -if (ext4_has_feature_journal (inode->i_sb) && - (inode->i_ino == -le32_to_cpu (EXT4_SB (inode->i_sb)->s_es->s_journal_inum))) +if (journal && inode == journal->j_inode)return 0 ;while (bref < p+max) {
fs/ext4/inode.c +4 -3
@@ -409,10 +409,11 @@ static int __check_block_validity(struct inode *inode, const char *func,unsigned int line, struct ext4_map_blocks *map) { - if (ext4_has_feature_journal(inode->i_sb) && - (inode->i_ino == - le32_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_journal_inum))) + journal_t *journal = EXT4_SB(inode->i_sb)->s_journal; + +if (journal && inode == journal->j_inode)return 0 ; +if (!ext4_inode_block_valid (inode, map->m_pblk, map->m_len)) {ext4_error_inode (inode, func, line, map->m_pblk, "lblock %lu mapped to illegal pblock %llu "
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 355/373 scsi: hisi_sas: Fix I/O errors caused by hardware port ID changes
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xingui Yang <[email protected]>
[ Upstream commit daff37f00c7506ca322ccfce95d342022f06ec58 ]
The hw port ID of phy may change when inserting disks in batches, causing the port ID in hisi_sas_port and itct to be inconsistent with the hardware, resulting in I/O errors. The solution is to set the device state to gone to intercept I/O sent to the device, and then execute linkreset to discard and find the disk to re-update its information.
--- drivers/scsi/hisi_sas/hisi_sas_main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/scsi/hisi_sas/hisi_sas_main.c +20 -0
@@ -852,8 +852,28 @@ static void hisi_sas_phyup_work(struct work_struct *work)container_of (work,typeof (*phy), works[HISI_PHYE_PHY_UP ]);struct hisi_hba *hisi_hba = phy->hisi_hba;struct asd_sas_phy *sas_phy = &phy->sas_phy; +struct asd_sas_port *sas_port = sas_phy->port; +struct hisi_sas_port *port = phy->port; +struct device *dev = hisi_hba->dev; +struct domain_device *port_dev;int phy_no = sas_phy->id; +if (!test_bit (HISI_SAS_RESETTING_BIT , &hisi_hba->flags) && + sas_port && port && (port->id != phy->port_id)) { +dev_info (dev,"phy%d's hw port id changed from %d to %llu\n" , + phy_no, port->id, phy->port_id); + port_dev = sas_port->port_dev; +if (port_dev && !dev_is_expander (port_dev->dev_type)) { +/* +* Set the device state to gone to block +* sending IO to the device. +*/ +set_bit (SAS_DEV_GONE , &port_dev->state); +hisi_sas_notify_phy_event (phy,HISI_PHYE_LINK_RESET ); +return ; + } + } + phy->wait_phyup_cnt =0 ;if (phy->identify.target_port_protocols ==SAS_PROTOCOL_SSP ) hisi_hba->hw->sl_notify_ssp (hisi_hba, phy_no);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 356/373 scsi: pm80xx: Set phy_attached to zero when device is gone
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Igor Pylypiv <[email protected]>
[ Upstream commit f7b705c238d1483f0a766e2b20010f176e5c0fb7 ]
When a fatal error occurs, a phy down event may not be received to set phy->phy_attached to zero.
--- drivers/scsi/pm8001/pm8001_sas.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/pm8001/pm8001_sas.c +1 -0
@@ -892,6 +892,7 @@ static void pm8001_dev_gone_notify(struct domain_device *dev)spin_lock_irqsave (&pm8001_ha->lock, flags); }PM8001_CHIP_DISP ->dereg_dev_req (pm8001_ha, device_id); + pm8001_ha->phy[pm8001_dev->attached_phy].phy_attached =0 ;pm8001_free_dev (pm8001_dev); }else {pm8001_dbg (pm8001_ha,DISC ,"Found dev has gone.\n" );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 357/373 loop: aio inherit the ioprio of original request
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yunlong Xing <[email protected]>
[ Upstream commit 1fdb8188c3d505452b40cdb365b1bb32be533a8e ]
Set cmd->iocb.ki_ioprio to the ioprio of loop device's request. The purpose is to inherit the original request ioprio in the aio flow.
--- drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/loop.c +1 -1
@@ -605,7 +605,7 @@ static int lo_rw_aio(struct loop_device *lo, struct loop_cmd *cmd, cmd->iocb.ki_filp = file; cmd->iocb.ki_complete = lo_rw_aio_complete; cmd->iocb.ki_flags =IOCB_DIRECT ; - cmd->iocb.ki_ioprio =IOPRIO_PRIO_VALUE (IOPRIO_CLASS_NONE ,0 ); + cmd->iocb.ki_ioprio =req_get_ioprio (rq);if (rw ==WRITE ) ret =call_write_iter (file, &cmd->iocb, &iter);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 358/373 ubsan: Fix panic from test_ubsan_out_of_bounds
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mostafa Saleh <[email protected]>
[ Upstream commit 9b044614be12d78d3a93767708b8d02fb7dfa9b0 ]
Running lib_ubsan.ko on arm64 (without CONFIG_UBSAN_TRAP) panics the kernel:
[ 31.616546] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: test_ubsan_out_of_bounds+0x158/0x158 [test_ubsan] [ 31.646817] CPU: 3 UID: 0 PID: 179 Comm: insmod Not tainted 6.15.0-rc2 #1 PREEMPT [ 31.648153] Hardware name: linux,dummy-virt (DT) [ 31.648970] Call trace: [ 31.649345] show_stack+0x18/0x24 (C) [ 31.650960] dump_stack_lvl+0x40/0x84 [ 31.651559] dump_stack+0x18/0x24 [ 31.652264] panic+0x138/0x3b4 [ 31.652812] __ktime_get_real_seconds+0x0/0x10 [ 31.653540] test_ubsan_load_invalid_value+0x0/0xa8 [test_ubsan] [ 31.654388] init_module+0x24/0xff4 [test_ubsan] [ 31.655077] do_one_initcall+0xd4/0x280 [ 31.655680] do_init_module+0x58/0x2b4
That happens because the test corrupts other data in the stack:
400: d5384108 mrs x8, sp_el0 404: f9426d08 ldr x8, [x8, #1240] 408: f85f83a9 ldur x9, [x29, #-8] 40c: eb09011f cmp x8, x9 410: 54000301 b.ne 470 <test_ubsan_out_of_bounds+0x154> // b.any
As there is no guarantee the compiler will order the local variables as declared in the module:
volatile char above[4] = { }; /* Protect surrounding memory. */ volatile int arr[4];
volatile char below[4] = { }; /* Protect surrounding memory. */
There is another problem where the out-of-bound index is 5 which is larger than the extra surrounding memory for protection.
So, use a struct to enforce the ordering, and fix the index to be 4. Also, remove some of the volatiles and rely on OPTIMIZER_HIDE_VAR()
--- lib/test_ubsan.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
lib/test_ubsan.c +11 -7
@@ -35,18 +35,22 @@ static void test_ubsan_shift_out_of_bounds(void)static void test_ubsan_out_of_bounds (void ) { -volatile int i =4 , j =5 , k =-1 ; -volatile char above[4 ] = { };/* Protect surrounding memory. */ -volatile int arr[4 ]; -volatile char below[4 ] = { };/* Protect surrounding memory. */ +int i =4 , j =4 , k =-1 ; +volatile struct { +char above[4 ];/* Protect surrounding memory. */ +int arr[4 ]; +char below[4 ];/* Protect surrounding memory. */ + } data; - above[0 ] = below[0 ]; +OPTIMIZER_HIDE_VAR (i); +OPTIMIZER_HIDE_VAR (j); +OPTIMIZER_HIDE_VAR (k);UBSAN_TEST (CONFIG_UBSAN_BOUNDS ,"above" ); - arr[j] = i; + data.arr[j] = i;UBSAN_TEST (CONFIG_UBSAN_BOUNDS ,"below" ); - arr[k] = i; + data.arr[k] = i; }enum ubsan_test_enum {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 359/373 md/raid1: Add check for missing source disk in process_checks()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Meir Elisha <[email protected]>
[ Upstream commit b7c178d9e57c8fd4238ff77263b877f6f16182ba ]
During recovery/check operations, the process_checks function loops through available disks to find a 'primary' source with successfully read data.
If no suitable source disk is found after checking all possibilities, the 'primary' index will reach conf->raid_disks * 2. Add an explicit check for this condition after the loop. If no source disk was found, print an error message and return early to prevent further processing without a valid primary source.
--- drivers/md/raid1.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-)
drivers/md/raid1.c +16 -10
@@ -2063,14 +2063,9 @@ static int fix_sync_read_error(struct r1bio *r1_bio)if (!rdev_set_badblocks (rdev, sect, s,0 )) abort =1 ; } -if (abort) { - conf->recovery_disabled = - mddev->recovery_disabled; -set_bit (MD_RECOVERY_INTR , &mddev->recovery); -md_done_sync (mddev, r1_bio->sectors,0 ); -put_buf (r1_bio); +if (abort)return 0 ; - } +/* Try next page */ sectors -= s; sect += s;
@@ -2210,10 +2205,21 @@ static void sync_request_write(struct mddev *mddev, struct r1bio *r1_bio)int disks = conf->raid_disks *2 ;struct bio *wbio; -if (!test_bit (R1BIO_Uptodate, &r1_bio->state)) -/* ouch - failed to read all of that. */ -if (!fix_sync_read_error (r1_bio)) +if (!test_bit (R1BIO_Uptodate, &r1_bio->state)) { +/* +* ouch - failed to read all of that. +* No need to fix read error for check/repair +* because all member disks are read. +*/ +if (test_bit (MD_RECOVERY_REQUESTED , &mddev->recovery) || + !fix_sync_read_error (r1_bio)) { + conf->recovery_disabled = mddev->recovery_disabled; +set_bit (MD_RECOVERY_INTR , &mddev->recovery); +md_done_sync (mddev, r1_bio->sectors,0 ); +put_buf (r1_bio);return ; + } + }if (test_bit (MD_RECOVERY_REQUESTED , &mddev->recovery))process_checks (r1_bio);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 360/373 s390/virtio_ccw: Dont allocate/assign airqs for non-existing queues
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Hildenbrand <[email protected]>
commit 2ccd42b959aaf490333dbd3b9b102eaf295c036a upstream.
If we finds a vq without a name in our input array in virtio_ccw_find_vqs(), we treat it as "non-existing" and set the vq pointer to NULL; we will not call virtio_ccw_setup_vq() to allocate/setup a vq.
Consequently, we create only a queue if it actually exists (name != NULL) and assign an incremental queue index to each such existing queue.
However, in virtio_ccw_register_adapter_ind()->get_airq_indicator() we will not ignore these "non-existing queues", but instead assign an airq indicator to them.
Besides never releasing them in virtio_ccw_drop_indicators() (because there is no virtqueue), the bigger issue seems to be that there will be a disagreement between the device and the Linux guest about the airq indicator to be used for notifying a queue, because the indicator bit for adapter I/O interrupt is derived from the queue index.
The virtio spec states under "Setting Up Two-Stage Queue Indicators":
... indicator contains the guest address of an area wherein the indicators for the devices are contained, starting at bit_nr, one bit per virtqueue of the device.
And further in "Notification via Adapter I/O Interrupts":
For notifying the driver of virtqueue buffers, the device sets the bit in the guest-provided indicator area at the corresponding offset.
For example, QEMU uses in virtio_ccw_notify() the queue index (passed as "vector") to select the relevant indicator bit. If a queue does not exist, it does not have a corresponding indicator bit assigned, because it effectively doesn't have a queue index.
Using a virtio-balloon-ccw device under QEMU with free-page-hinting disabled ("free-page-hint=off") but free-page-reporting enabled ("free-page-reporting=on") will result in free page reporting not working as expected: in the virtio_balloon driver, we'll be stuck forever in virtballoon_free_page_report()->wait_event(), because the waitqueue will not be woken up as the notification from the device is
lost: it would use the wrong indicator bit.
Free page reporting stops working and we get splats (when configured to detect hung wqs) like:
INFO: task kworker/1:3:463 blocked for more than 61 seconds.
Not tainted 6.14.0 #4
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/1:3 [...]
Workqueue: events page_reporting_process
Call Trace:
[<000002f404e6dfb2>] __schedule+0x402/0x1640
[<000002f404e6f22e>] schedule+0x3e/0xe0
[<000002f3846a88fa>] virtballoon_free_page_report+0xaa/0x110 [virtio_balloon]
[<000002f40435c8a4>] page_reporting_process+0x2e4/0x740
[<000002f403fd3ee2>] process_one_work+0x1c2/0x400
[<000002f403fd4b96>] worker_thread+0x296/0x420
[<000002f403fe10b4>] kthread+0x124/0x290
[<000002f403f4e0dc>] __ret_from_fork+0x3c/0x60
[<000002f404e77272>] ret_from_fork+0xa/0x38There was recently a discussion [1] whether the "holes" should be treated differently again, effectively assigning also non-existing queues a queue index: that should also fix the issue, but requires other workarounds to not break existing setups.
Let's fix it without affecting existing setups for now by properly ignoring the non-existing queues, so the indicator bits will match the queue indexes.
[1] https://lore.kernel.org/all/[email protected]/
--- drivers/s390/virtio/virtio_ccw.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/s390/virtio/virtio_ccw.c +12 -4
@@ -261,11 +261,17 @@ static struct airq_info *new_airq_info(istatic unsigned long get_airq_indicator (struct virtqueue *vqs[],int nvqs,u64 *first,void **airq_info) { -int i, j; +int i, j, queue_idx, highest_queue_idx =-1 ;struct airq_info *info;unsigned long indicator_addr =0 ;unsigned long bit, flags; +/* Array entries without an actual queue pointer must be ignored. */ +for (i =0 ; i < nvqs; i++) { +if (vqs[i]) + highest_queue_idx++; + } +for (i =0 ; i <MAX_AIRQ_AREAS && !indicator_addr; i++) {mutex_lock (&airq_areas_lock);if (!airq_areas[i])
@@ -275,7 +281,7 @@ static unsigned long get_airq_indicator(if (!info)return 0 ;write_lock_irqsave (&info->lock, flags); - bit =airq_iv_alloc (info->aiv, nvqs); + bit =airq_iv_alloc (info->aiv, highest_queue_idx +1 );if (bit ==-1UL ) {/* Not enough vacancies. */ write_unlock_irqrestore (&info->lock, flags);
@@ -284,8 +290,10 @@ static unsigned long get_airq_indicator( *first = bit; *airq_info = info; indicator_addr = (unsigned long )info->aiv->vector; -for (j =0 ; j < nvqs; j++) { -airq_iv_set_ptr (info->aiv, bit + j, +for (j =0 , queue_idx =0 ; j < nvqs; j++) { +if (!vqs[j]) +continue ; +airq_iv_set_ptr (info->aiv, bit + queue_idx++, (unsigned long )vqs[j]); }write_unlock_irqrestore (&info->lock, flags);
Greg Kroah-Hartman
maintainerPATCH 361/373 jfs: define xtree root and page independently
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Kleikamp <[email protected]>
commit a779ed754e52d582b8c0e17959df063108bd0656 upstream.
In order to make array bounds checking sane, provide a separate definition of the in-inode xtree root and the external xtree page.
--- fs/jfs/jfs_dinode.h | 2 +- fs/jfs/jfs_imap.c | 6 +++--- fs/jfs/jfs_incore.h | 2 +- fs/jfs/jfs_txnmgr.c | 4 ++-- fs/jfs/jfs_xtree.c | 4 ++-- fs/jfs/jfs_xtree.h | 37 +++++++++++++++++++++++-------------- 6 files changed, 32 insertions(+), 23 deletions(-)
fs/jfs/jfs_dinode.h +1 -1
@@ -96,7 +96,7 @@ struct dinode {#define di_gengen u._file._u1._imap._gengenunion { -xtpage_t _xtroot; +xtroot_t _xtroot;struct {u8 unused[16 ];/* 16: */ dxd_t _dxd;/* 16: */
fs/jfs/jfs_imap.c +3 -3
@@ -673,7 +673,7 @@ int diWrite(tid_t tid, struct inode *ip)* This is the special xtree inside the directory for storing * the directory table */ -xtpage_t *p, *xp; +xtroot_t *p, *xp;xad_t *xad; jfs_ip->xtlid =0 ;
@@ -687,7 +687,7 @@ int diWrite(tid_t tid, struct inode *ip)* copy xtree root from inode to dinode: */ p = &jfs_ip->i_xtroot; - xp = (xtpage_t *) &dp->di_dirtable; + xp = (xtroot_t *) &dp->di_dirtable; lv = ilinelock->lv;for (n =0 ; n < ilinelock->index; n++, lv++) { memcpy(&xp->xad[lv->offset], &p->xad[lv->offset],
@@ -716,7 +716,7 @@ int diWrite(tid_t tid, struct inode *ip)* regular file: 16 byte (XAD slot) granularity */ if (type & tlckXTREE) { -xtpage_t *p, *xp; +xtroot_t *p, *xp;xad_t *xad;/*
fs/jfs/jfs_incore.h +1 -1
@@ -66,7 +66,7 @@ struct jfs_inode_info {lid_t xtlid;/* lid of xtree lock on directory */ union {struct { -xtpage_t _xtroot;/* 288: xtree root */ +xtroot_t _xtroot;/* 288: xtree root */ struct inomap *_imap;/* 4: inode map header */ } file;struct {
fs/jfs/jfs_txnmgr.c +2 -2
@@ -783,7 +783,7 @@ struct tlock *txLock(tid_t tid, struct iif (mp->xflag &COMMIT_PAGE ) p = (xtpage_t *) mp->data;else - p = &jfs_ip->i_xtroot; + p = (xtpage_t *) &jfs_ip->i_xtroot; xtlck->lwm.offset =le16_to_cpu (p->header.nextindex); }
@@ -1710,7 +1710,7 @@ static void xtLog(struct jfs_log * log,if (tlck->type & tlckBTROOT) { lrd->log.redopage.type |=cpu_to_le16 (LOG_BTROOT ); - p = &JFS_IP (ip)->i_xtroot; + p = (xtpage_t *) &JFS_IP (ip)->i_xtroot;if (S_ISDIR (ip->i_mode)) lrd->log.redopage.type |=cpu_to_le16 (LOG_DIR_XTREE );
fs/jfs/jfs_xtree.c +2 -2
@@ -1224,7 +1224,7 @@ xtSplitRoot(tid_t tid,struct xtlock *xtlck;int rc; - sp = &JFS_IP (ip)->i_xtroot; + sp = (xtpage_t *) &JFS_IP (ip)->i_xtroot;INCREMENT (xtStat.split);
@@ -3059,7 +3059,7 @@ static int xtRelink(tid_t tid, struct in*/ void xtInitRoot (tid_t tid,struct inode *ip) { -xtpage_t *p; +xtroot_t *p;/* * acquire a transaction lock on the root
fs/jfs/jfs_xtree.h +23 -14
@@ -65,24 +65,33 @@ struct xadlist {#define XTPAGEMAXSLOT 256#define XTENTRYSTART 2 +struct xtheader { +__le64 next;/* 8: */ +__le64 prev;/* 8: */ + +u8 flag;/* 1: */ +u8 rsrvd1;/* 1: */ +__le16 nextindex;/* 2: next index = number of entries */ +__le16 maxentry;/* 2: max number of entries */ +__le16 rsrvd2;/* 2: */ + +pxd_t self;/* 8: self */ +}; +/* -* xtree page: +* xtree root (in inode): */ typedef union { -struct xtheader { -__le64 next;/* 8: */ -__le64 prev;/* 8: */ - -u8 flag;/* 1: */ -u8 rsrvd1;/* 1: */ -__le16 nextindex;/* 2: next index = number of entries */ -__le16 maxentry;/* 2: max number of entries */ -__le16 rsrvd2;/* 2: */ - -pxd_t self;/* 8: self */ - } header;/* (32) */ - +struct xtheader header;xad_t xad[XTROOTMAXSLOT ];/* 16 * maxentry: xad array */ +}xtroot_t ; + +/* +* xtree page: +*/ +typedef union { +struct xtheader header; +xad_t xad[XTPAGEMAXSLOT ];/* 16 * maxentry: xad array */ }xtpage_t ;/*
Greg Kroah-Hartman
maintainerPATCH 362/373 comedi: jr3_pci: Fix synchronous deletion of timer
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ian Abbott <[email protected]>
commit 44d9b3f584c59a606b521e7274e658d5b866c699 upstream.
When jr3_pci_detach() is called during device removal, it calls timer_delete_sync() to stop the timer, but the timer expiry function always reschedules the timer, so the synchronization is ineffective.
Call timer_shutdown_sync() instead. It does not matter that the timer expiry function pointer is cleared, because the device is being removed.
--- drivers/comedi/drivers/jr3_pci.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/comedi/drivers/jr3_pci.c +12 -5
@@ -88,6 +88,7 @@ struct jr3_pci_poll_delay {struct jr3_pci_dev_private {struct timer_list timer;struct comedi_device *dev; +bool timer_enable; };union jr3_pci_single_range {
@@ -597,10 +598,11 @@ static void jr3_pci_poll_dev(struct time delay = sub_delay.max; } } +if (devpriv->timer_enable) { + devpriv->timer.expires = jiffies +msecs_to_jiffies (delay); +add_timer (&devpriv->timer); + }spin_unlock_irqrestore (&dev->spinlock, flags); - - devpriv->timer.expires = jiffies +msecs_to_jiffies (delay); -add_timer (&devpriv->timer); } static struct jr3_pci_subdev_private *
@@ -749,6 +751,7 @@ static int jr3_pci_auto_attach(struct co devpriv->dev = dev;timer_setup (&devpriv->timer, jr3_pci_poll_dev,0 ); devpriv->timer.expires = jiffies +msecs_to_jiffies (1000 ); + devpriv->timer_enable = true;add_timer (&devpriv->timer);return 0 ;
@@ -758,8 +761,12 @@ static void jr3_pci_detach(struct comedi {struct jr3_pci_dev_private *devpriv = dev->private; -if (devpriv) -del_timer_sync (&devpriv->timer); +if (devpriv) { +spin_lock_bh (&dev->spinlock); + devpriv->timer_enable = false; +spin_unlock_bh (&dev->spinlock); +timer_delete_sync (&devpriv->timer); + }comedi_pci_detach (dev); }
Greg Kroah-Hartman
maintainerPATCH 363/373 crypto: atmel-sha204a - Set hwrng quality to lowest possible
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Behún <[email protected]>
commit 8006aff15516a170640239c5a8e6696c0ba18d8e upstream.
According to the review by Bill Cox [1], the Atmel SHA204A random number generator produces random numbers with very low entropy.
Set the lowest possible entropy for this chip just to be safe.
[1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html
--- drivers/crypto/atmel-sha204a.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/crypto/atmel-sha204a.c +6 -1
@@ -107,7 +107,12 @@ static int atmel_sha204a_probe(struct i2 i2c_priv->hwrng.name =dev_name (&client->dev); i2c_priv->hwrng.read = atmel_sha204a_rng_read; - i2c_priv->hwrng.quality =1024 ; + +/* +* According to review by Bill Cox [1], this HWRNG has very low entropy. +* [1] https://www.metzdowd.com/pipermail/cryptography/2014-December/023858.html +*/ + i2c_priv->hwrng.quality =1 ; ret =devm_hwrng_register (&client->dev, &i2c_priv->hwrng);if (ret)
Greg Kroah-Hartman
maintainerPATCH 364/373 net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit 4ae01ec007716986e1a20f1285eb013cbf188830 upstream.
The atu_move_port_mask for 6341 family (Topaz) is 0xf, not 0x1f. The PortVec field is 8 bits wide, not 11 as in 6390 family. Fix this.
--- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/dsa/mv88e6xxx/chip.c +2 -2
@@ -5217,7 +5217,7 @@ static const struct mv88e6xxx_info mv88e .global1_addr = 0x1b, .global2_addr = 0x1c, .age_time_coeff = 3750, - .atu_move_port_mask = 0x1f, + .atu_move_port_mask = 0xf, .g1_irqs = 9, .g2_irqs = 10, .pvt = true,
@@ -5660,7 +5660,7 @@ static const struct mv88e6xxx_info mv88e .global1_addr = 0x1b, .global2_addr = 0x1c, .age_time_coeff = 3750, - .atu_move_port_mask = 0x1f, + .atu_move_port_mask = 0xf, .g1_irqs = 9, .g2_irqs = 10, .pvt = true,
Greg Kroah-Hartman
maintainerPATCH 365/373 net: dsa: mv88e6xxx: enable PVT for 6321 switch
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit f85c69369854a43af2c5d3b3896da0908d713133 upstream.
Commit f36456522168 ("net: dsa: mv88e6xxx: move PVT description in info") did not enable PVT for 6321 switch. Fix it.
--- drivers/net/dsa/mv88e6xxx/chip.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/dsa/mv88e6xxx/chip.c +1 -0
@@ -5639,6 +5639,7 @@ static const struct mv88e6xxx_info mv88e .g1_irqs = 8, .g2_irqs = 10, .atu_move_port_mask = 0xf, + .pvt = true, .multi_chip = true, .edsa_support = MV88E6XXX_EDSA_SUPPORTED, .ptp_support = true,
Greg Kroah-Hartman
maintainerPATCH 366/373 net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Marek Beh�n" <[email protected]>
commit a2ef58e2c4aea4de166fc9832eb2b621e88c98d5 upstream.
Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") did not add the .port_set_policy() method for the 6320 family. Fix it.
--- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/dsa/mv88e6xxx/chip.c +2 -0
@@ -4597,6 +4597,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_sync_link = mv88e6xxx_port_sync_link, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
@@ -4644,6 +4645,7 @@ static const struct mv88e6xxx_ops mv88e6 .port_sync_link = mv88e6xxx_port_sync_link, .port_set_speed_duplex = mv88e6185_port_set_speed_duplex, .port_tag_remap = mv88e6095_port_tag_remap, + .port_set_policy = mv88e6352_port_set_policy, .port_set_frame_mode = mv88e6351_port_set_frame_mode, .port_set_ucast_flood = mv88e6352_port_set_ucast_flood, .port_set_mcast_flood = mv88e6352_port_set_mcast_flood,
Greg Kroah-Hartman
maintainerPATCH 367/373 drm/amd/display: fix double free issue during amdgpu module unload
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tim Huang <[email protected]>
commit 20b5a8f9f4670a8503aa9fa95ca632e77c6bf55d upstream.
Flexible endpoints use DIGs from available inflexible endpoints, so only the encoders of inflexible links need to be freed. Otherwise, a double free issue may occur when unloading the amdgpu module.
[ 279.190523] RIP: 0010:__slab_free+0x152/0x2f0 [ 279.190577] Call Trace: [ 279.190580] <TASK> [ 279.190582] ? show_regs+0x69/0x80 [ 279.190590] ? die+0x3b/0x90 [ 279.190595] ? do_trap+0xc8/0xe0 [ 279.190601] ? do_error_trap+0x73/0xa0 [ 279.190605] ? __slab_free+0x152/0x2f0 [ 279.190609] ? exc_invalid_op+0x56/0x70 [ 279.190616] ? __slab_free+0x152/0x2f0 [ 279.190642] ? asm_exc_invalid_op+0x1f/0x30 [ 279.190648] ? dcn10_link_encoder_destroy+0x19/0x30 [amdgpu] [ 279.191096] ? __slab_free+0x152/0x2f0 [ 279.191102] ? dcn10_link_encoder_destroy+0x19/0x30 [amdgpu] [ 279.191469] kfree+0x260/0x2b0 [ 279.191474] dcn10_link_encoder_destroy+0x19/0x30 [amdgpu] [ 279.191821] link_destroy+0xd7/0x130 [amdgpu] [ 279.192248] dc_destruct+0x90/0x270 [amdgpu] [ 279.192666] dc_destroy+0x19/0x40 [amdgpu] [ 279.193020] amdgpu_dm_fini+0x16e/0x200 [amdgpu] [ 279.193432] dm_hw_fini+0x26/0x40 [amdgpu] [ 279.193795] amdgpu_device_fini_hw+0x24c/0x400 [amdgpu] [ 279.194108] amdgpu_driver_unload_kms+0x4f/0x70 [amdgpu] [ 279.194436] amdgpu_pci_remove+0x40/0x80 [amdgpu] [ 279.194632] pci_device_remove+0x3a/0xa0 [ 279.194638] device_remove+0x40/0x70 [ 279.194642] device_release_driver_internal+0x1ad/0x210 [ 279.194647] driver_detach+0x4e/0xa0 [ 279.194650] bus_remove_driver+0x6f/0xf0 [ 279.194653] driver_unregister+0x33/0x60 [ 279.194657] pci_unregister_driver+0x44/0x90 [ 279.194662] amdgpu_exit+0x19/0x1f0 [amdgpu] [ 279.194939] __do_sys_delete_module.isra.0+0x198/0x2f0 [ 279.194946] __x64_sys_delete_module+0x16/0x20 [ 279.194950] do_syscall_64+0x58/0x120 [ 279.194954] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 279.194980] </TASK>
[ dc_link_destruct() moved from core/dc_link.c to link/link_factory.c since
commit: 54618888d1ea ("drm/amd/display: break down dc_link.c"), so modified the path to apply on 5.15.y ]
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
@@ -79,7 +79,7 @@ static void dc_link_destruct(struct dc_lif (link->panel_cntl) link->panel_cntl->funcs->destroy (&link->panel_cntl); -if (link->link_enc) { +if (link->link_enc && !link->is_dig_mapping_flexible) {/* Update link encoder resource tracking variables. These are used for * the dynamic assignment of link encoders to streams. Virtual links * are not assigned encoder resources on creation.
Greg Kroah-Hartman
maintainerPATCH 368/373 xdp: Reset bpf_redirect_info before running a xdps BPF prog.
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <[email protected]>
Ricardo reported a KASAN discovered use after free in v6.6-stable.
The syzbot starts a BPF program via xdp_test_run_batch() which assigns ri->tgt_value via dev_hash_map_redirect() and the return code isn't XDP_REDIRECT it looks like nonsense. So the output in bpf_warn_invalid_xdp_action() appears once.
Then the TUN driver runs another BPF program (on the same CPU) which returns XDP_REDIRECT without setting ri->tgt_value first. It invokes bpf_trace_printk() to print four characters and obtain the required return value. This is enough to get xdp_do_redirect() invoked which then accesses the pointer in tgt_value which might have been already deallocated.
This problem does not affect upstream because since commit
401cb7dae8130 ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")
the per-CPU variable is referenced via task's task_struct and exists on the stack during NAPI callback. Therefore it is cleared once before the first invocation and remains valid within the RCU section of the NAPI callback.
Instead of performing the huge backport of the commit (plus its fix ups) here is an alternative version which only resets the variable in question prior invoking the BPF program.
--- include/linux/filter.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
include/linux/filter.h +8 -1
@@ -800,7 +800,14 @@ static __always_inline u32 bpf_prog_run_* under local_bh_disable(), which provides the needed RCU protection * for accessing map entries. */ -u32 act =__bpf_prog_run (prog, xdp,BPF_DISPATCHER_FUNC (xdp)); +struct bpf_redirect_info *ri =this_cpu_ptr (&bpf_redirect_info); +u32 act; + +if (ri->map_id || ri->map_type) { + ri->map_id =0 ; + ri->map_type =BPF_MAP_TYPE_UNSPEC ; + } + act =__bpf_prog_run (prog, xdp,BPF_DISPATCHER_FUNC (xdp));if (static_branch_unlikely (&bpf_master_redirect_enabled_key)) {if (act ==XDP_TX &&netif_is_bond_slave (xdp->rxq->dev))
Greg Kroah-Hartman
maintainerPATCH 369/373 MIPS: cm: Fix warning if MIPS_CM is disabled
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Bogendoerfer <[email protected]>
commit b73c3ccdca95c237750c981054997c71d33e09d7 upstream.
Commit e27fbe16af5c ("MIPS: cm: Detect CM quirks from device tree") introduced
arch/mips/include/asm/mips-cm.h:119:13: error: ‘mips_cm_update_property’
defined but not used [-Werror=unused-function]
Fix this by making empty function implementation inline
--- arch/mips/include/asm/mips-cm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/mips-cm.h +1 -1
@@ -104,7 +104,7 @@ static inline bool mips_cm_present(void)#ifdef CONFIG_MIPS_CM extern void mips_cm_update_property (void );#else -static void mips_cm_update_property (void ) {} +static inline void mips_cm_update_property (void ) {}#endif /**
Greg Kroah-Hartman
maintainerPATCH 370/373 nvme: fixup scan failure for non-ANA multipath controllers
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <[email protected]>
commit 26d7fb4fd4ca1180e2fa96587dea544563b4962a upstream.
Commit 62baf70c3274 caused the ANA log page to be re-read, even on controllers that do not support ANA. While this should generally harmless, some controllers hang on the unsupported log page and never finish probing.
--- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
@@ -4226,7 +4226,7 @@ static void nvme_scan_work(struct work_sif (test_bit (NVME_AER_NOTICE_NS_CHANGED , &ctrl->events))nvme_queue_scan (ctrl);#ifdef CONFIG_NVME_MULTIPATH - else + else if (ctrl->ana_log_buf) /* Re-read the ANA log page to not miss updates */ queue_work(nvme_wq, &ctrl->ana_work);#endif
Greg Kroah-Hartman
maintainerPATCH 371/373 PCI: Fix use-after-free in pci_bus_release_domain_nr()
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rob Herring <[email protected]>
commit 30ba2d09edb5ea857a1473ae3d820911347ada62 upstream.
Commit c14f7ccc9f5d ("PCI: Assign PCI domain IDs by ida_alloc()") introduced a use-after-free bug in the bus removal cleanup. The issue was found with kfence:
[ 19.293351] BUG: KFENCE: use-after-free read in pci_bus_release_domain_nr+0x10/0x70
[ 19.302817] Use-after-free read at 0x000000007f3b80eb (in kfence-#115): [ 19.309677] pci_bus_release_domain_nr+0x10/0x70 [ 19.309691] dw_pcie_host_deinit+0x28/0x78 [ 19.309702] tegra_pcie_deinit_controller+0x1c/0x38 [pcie_tegra194] [ 19.309734] tegra_pcie_dw_probe+0x648/0xb28 [pcie_tegra194] [ 19.309752] platform_probe+0x90/0xd8 ...
[ 19.311457] kfence-#115: 0x00000000063a155a-0x00000000ba698da8, size=1072, cache=kmalloc-2k
[ 19.311469] allocated by task 96 on cpu 10 at 19.279323s: [ 19.311562] __kmem_cache_alloc_node+0x260/0x278 [ 19.311571] kmalloc_trace+0x24/0x30 [ 19.311580] pci_alloc_bus+0x24/0xa0 [ 19.311590] pci_register_host_bridge+0x48/0x4b8 [ 19.311601] pci_scan_root_bus_bridge+0xc0/0xe8 [ 19.311613] pci_host_probe+0x18/0xc0 [ 19.311623] dw_pcie_host_init+0x2c0/0x568 [ 19.311630] tegra_pcie_dw_probe+0x610/0xb28 [pcie_tegra194] [ 19.311647] platform_probe+0x90/0xd8 ...
[ 19.311782] freed by task 96 on cpu 10 at 19.285833s: [ 19.311799] release_pcibus_dev+0x30/0x40 [ 19.311808] device_release+0x30/0x90 [ 19.311814] kobject_put+0xa8/0x120 [ 19.311832] device_unregister+0x20/0x30 [ 19.311839] pci_remove_bus+0x78/0x88 [ 19.311850] pci_remove_root_bus+0x5c/0x98 [ 19.311860] dw_pcie_host_deinit+0x28/0x78 [ 19.311866] tegra_pcie_deinit_controller+0x1c/0x38 [pcie_tegra194] [ 19.311883] tegra_pcie_dw_probe+0x648/0xb28 [pcie_tegra194] [ 19.311900] platform_probe+0x90/0xd8 ...
[ 19.313579] CPU: 10 PID: 96 Comm: kworker/u24:2 Not tainted 6.2.0 #4 [ 19.320171] Hardware name: /, BIOS 1.0-d7fb19b 08/10/2022 [ 19.325852] Workqueue: events_unbound deferred_probe_work_func
The stack trace is a bit misleading as dw_pcie_host_deinit() doesn't directly call pci_bus_release_domain_nr(). The issue turns out to be in pci_remove_root_bus() which first calls pci_remove_bus() which frees the struct pci_bus when its struct device is released. Then pci_bus_release_domain_nr() is called and accesses the freed struct pci_bus. Reordering these fixes the issue.
--- drivers/pci/remove.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/pci/remove.c +3 -2
@@ -157,8 +157,6 @@ void pci_remove_root_bus(struct pci_buslist_for_each_entry_safe (child, tmp, &bus->devices, bus_list)pci_remove_bus_device (child); -pci_remove_bus (bus); - host_bridge->bus =NULL ;#ifdef CONFIG_PCI_DOMAINS_GENERIC /* Release domain_nr if it was dynamically allocated */
@@ -166,6 +164,9 @@ void pci_remove_root_bus(struct pci_buspci_bus_release_domain_nr (bus, host_bridge->dev.parent);#endif +pci_remove_bus (bus); + host_bridge->bus =NULL ; +/* remove the host bridge */ device_del (&host_bridge->dev); }
Greg Kroah-Hartman
maintainerPATCH 372/373 PCI: Fix dropping valid root bus resources with .end = zero
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
commit 9d8ba74a181b1c81def21168795ed96cbe6f05ed upstream.
On r8a7791/koelsch:
kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak)
# cat /sys/kernel/debug/kmemleak
unreferenced object 0xc3a34e00 (size 64):
comm "swapper/0", pid 1, jiffies 4294937460 (age 199.080s)
hex dump (first 32 bytes):
b4 5d 81 f0 b4 5d 81 f0 c0 b0 a2 c3 00 00 00 00 .]...]..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<fe3aa979>] __kmalloc+0xf0/0x140
[<34bd6bc0>] resource_list_create_entry+0x18/0x38
[<767046bc>] pci_add_resource_offset+0x20/0x68
[<b3f3edf2>] devm_of_pci_get_host_bridge_resources.constprop.0+0xb0/0x390When coalescing two resources for a contiguous aperture, the second resource is enlarged to cover the full contiguous range, while the first resource is marked invalid. This invalidation is done by clearing the flags, start, and end members.
When adding the initial resources to the bus later, invalid resources are skipped. Unfortunately, the check for an invalid resource considers only the end member, causing false positives.
E.g. on r8a7791/koelsch, root bus resource 0 ("bus 00") is skipped, and no longer registered with pci_bus_insert_busn_res() (causing the memory leak), nor printed:
pci-rcar-gen2 ee090000.pci: host bridge /soc/pci@ee090000 ranges:
pci-rcar-gen2 ee090000.pci: MEM 0x00ee080000..0x00ee08ffff -> 0x00ee080000
pci-rcar-gen2 ee090000.pci: PCI: revision 11 pci-rcar-gen2 ee090000.pci: PCI host bridge to bus 0000:00
-pci_bus 0000:00: root bus resource [bus 00]
pci_bus 0000:00: root bus resource [mem 0xee080000-0xee08ffff]
Fix this by only skipping resources where all of the flags, start, and end members are zero.
--- drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/probe.c +1 -1
@@ -999,7 +999,7 @@ static int pci_register_host_bridge(struresource_list_for_each_entry_safe (window, n, &resources) { offset = window->offset; res = window->res; -if (!res->end) +if (!res->flags && !res->start && !res->end)continue ;list_move_tail (&window->node, &bridge->windows);
Greg Kroah-Hartman
maintainerPATCH 373/373 PCI: Release resource invalidated by coalescing
In reply to Greg Kroah-Hartman5.15-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ross Lagerwall <[email protected]>
commit e54223275ba1bc6f704a6bab015fcd2ae4f72572 upstream.
When contiguous windows are coalesced by pci_register_host_bridge(), the second resource is expanded to include the first, and the first is invalidated and consequently not added to the bus. However, it remains in the resource hierarchy. For example, these windows:
fec00000-fec7ffff : PCI Bus 0000:00
fec80000-fecbffff : PCI Bus 0000:00
are coalesced into this, where the first resource remains in the tree with start/end zeroed out:
00000000-00000000 : PCI Bus 0000:00
fec00000-fecbffff : PCI Bus 0000:00
In some cases (e.g. the Xen scratch region), this causes future calls to allocate_resource() to choose an inappropriate location which the caller cannot handle.
Fix by releasing the zeroed-out resource and removing it from the resource hierarchy.
--- drivers/pci/probe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pci/probe.c +3 -1
@@ -999,8 +999,10 @@ static int pci_register_host_bridge(struresource_list_for_each_entry_safe (window, n, &resources) { offset = window->offset; res = window->res; -if (!res->flags && !res->start && !res->end) +if (!res->flags && !res->start && !res->end) { +release_resource (res);continue ; + }list_move_tail (&window->node, &bridge->windows);
The kernel, bpf tool and perf tool builds fine for v5.15.181-rc1 on x86 and arm64 Azure VM.
Thanks,
Hardik
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.15.181 release. There are 373 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 Thu, 01 May 2025 16:10:15 +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.15.181-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.15.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.15:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
101 tests: 101 pass, 0 failLinux version: 5.15.181-rc1-gc77e7bf5aa74
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.15.181 release. There are 373 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 Thu, 01 May 2025 16:10:15 +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.15.181-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.15.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.15.181 release. There are 373 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 Thu, 01 May 2025 16:10:15 +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.15.181-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.15.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.15.181-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git commit: c77e7bf5aa741c165e37394b3adb82bcb3cd9918
* git describe: v5.15.180-374-gc77e7bf5aa74
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.15.y/build/v5.15.180-374-gc77e7bf5aa74
## Test Regressions (compared to v5.15.180)
## Metric Regressions (compared to v5.15.180)
## Test Fixes (compared to v5.15.180)
## Metric Fixes (compared to v5.15.180)
## Test result summary
total: 62723, pass: 47525, fail: 2904, skip: 11880, xfail: 414
## Build Summary
* arc: 5 total, 5 passed, 0 failed
* arm: 102 total, 102 passed, 0 failed
* arm64: 30 total, 30 passed, 0 failed
* i386: 22 total, 20 passed, 2 failed
* mips: 22 total, 22 passed, 0 failed
* parisc: 3 total, 3 passed, 0 failed
* powerpc: 22 total, 22 passed, 0 failed
* riscv: 8 total, 8 passed, 0 failed
* s390: 9 total, 9 passed, 0 failed
* sh: 10 total, 10 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 26 total, 26 passed, 0 failed
## Test suites summary
* boot
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-efivarfs
* kselftest-exec
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-kcmp
* kselftest-livepatch
* kselftest-membarrier
* kselftest-memfd
* kselftest-mincore
* kselftest-mqueue
* kselftest-net
* kselftest-net-mptcp
* kselftest-openat2
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-tc-testing
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user_events
* kselftest-vDSO
* kselftest-x86
* kunit
* kvm-unit-tests
* lava
* libgpiod
* libhugetlbfs
* log-parser-boot
* log-parser-build-clang
* log-parser-build-gcc
* log-parser-test
* ltp-capability
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-cpuhotplug
* ltp-crypto
* ltp-cve
* ltp-dio
* ltp-fcntl-locktests
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-hugetlb
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* perf
* rcutorture
--
Linaro LKFT
https://lkft.linaro.org
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.15.181 release. There are 373 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 Thu, 01 May 2025 16:10:15 +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.15.181-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.15.y
and the diffstat can be found below.thanks,
greg k-h
Built and booted successfully on RISC-V RV64 (HiFive Unmatched).