mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 47 participants
  • 18239 discussions
[PATCH OLK-6.6 0/7] iommu/arm-smmu-v3: Use KVM VMID for s2 stage
by lishusen 18 Apr '25

18 Apr '25
On an ARM64 system with a SMMUv3 implementation that fully supports Broadcast TLB Maintenance(BTM) feature as part of the Distributed Virtual Memory(DVM) protocol, the CPU TLB invalidate instructions are received by SMMUv3. This is very useful when the SMMUv3 shares the page tables with the CPU(eg: Guest SVA use case). For this to work, the SMMUv3 must use the same VMID that is allocated by KVM to configure the nested stage 2(S2) translations. Jean-Philippe Brucker (1): iommu/arm-smmu-v3: Enable broadcast TLB maintenance Kunkun Jiang (1): vfio: Fix kabi breakage due to closing VFIO_CONTAINER Shameer Kolothum (5): KVM: arm64: Introduce support to pin VMIDs KVM: arm64: Add interfaces for pinned VMID support iommufd: Associate kvm pointer to iommufd ctx iommu: Pass in kvm pointer to domain_alloc_user iommu/arm-smmu-v3: Use KVM VMID for s2 stage arch/arm64/include/asm/kvm_host.h | 3 + arch/arm64/kvm/Kconfig | 1 + arch/arm64/kvm/arm.c | 14 ++++ arch/arm64/kvm/vmid.c | 84 ++++++++++++++++++++- drivers/iommu/amd/iommu.c | 1 + drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 46 +++++++++-- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 1 + drivers/iommu/intel/iommu.c | 1 + drivers/iommu/iommufd/hw_pagetable.c | 5 +- drivers/iommu/iommufd/iommufd_private.h | 3 + drivers/iommu/iommufd/main.c | 14 ++++ drivers/iommu/iommufd/selftest.c | 1 + drivers/vfio/device_cdev.c | 3 + drivers/vfio/vfio.h | 2 + include/linux/iommu.h | 9 ++- include/linux/iommufd.h | 7 ++ 16 files changed, 181 insertions(+), 14 deletions(-) -- 2.33.0
2 8
0 0
[PATCH OLK-6.6 0/4] RDMA/hns :Add some mainline patches to OLK-6.6
by Junxian Huang 18 Apr '25

18 Apr '25
From: Xinghai Cen <cenxinghai(a)h-partners.com> RDMA/hns :Add some mainline patches to OLK-6.6 Chen Linxuan (1): RDMA/hns: initialize db in update_srq_db() Chengchang Tang (2): RDMA/hns: Remove unused parameters RDMA/hns: Fix wrong maximum DMA segment size Xinghai Cen (1): Revert "RDMA/hns: fix iommu_map_sg() failed when MR bigger than 4G" drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.33.0
2 5
0 0
[openeuler:openEuler-1.0-LTS 1510/1510] mm/mmu_gather.o: warning: objtool: missing symbol for section .text
by kernel test robot 18 Apr '25

18 Apr '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: c61927b921388695af91d0e58b8709040ed6cb17 commit: 1f7b24152a85bec4ea4f5a6219b4702853ffd3e6 [1510/1510] mm/memory: Move mmu_gather and TLB invalidation code into its own file config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20250418/202504180904.aJTbSHsO-lkp@…) compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250418/202504180904.aJTbSHsO-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504180904.aJTbSHsO-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/mmu_gather.o: warning: objtool: missing symbol for section .text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2135/2135] drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse: sparse: invalid assignment: |=
by kernel test robot 18 Apr '25

18 Apr '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 020d455b1d7b83ce376f0c652850dd49f02f9e4c commit: cd982c1a99959671f5ea416edf968fccfd300108 [2135/2135] scsi: hisi_sas: Enable force phy when SATA disk directly connected config: loongarch-randconfig-r121-20250418 (https://download.01.org/0day-ci/archive/20250418/202504180825.AdhYDR7q-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce: (https://download.01.org/0day-ci/archive/20250418/202504180825.AdhYDR7q-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504180825.AdhYDR7q-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse: sparse: invalid assignment: |= drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse: left side has type restricted __le32 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1448:26: sparse: right side has type unsigned int vim +1448 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c 1425 1426 static void prep_ata_v3_hw(struct hisi_hba *hisi_hba, 1427 struct hisi_sas_slot *slot) 1428 { 1429 struct sas_task *task = slot->task; 1430 struct domain_device *device = task->dev; 1431 struct domain_device *parent_dev = device->parent; 1432 struct hisi_sas_device *sas_dev = device->lldd_dev; 1433 struct hisi_sas_cmd_hdr *hdr = slot->cmd_hdr; 1434 struct asd_sas_port *sas_port = device->port; 1435 struct hisi_sas_port *port = to_hisi_sas_port(sas_port); 1436 u8 *buf_cmd; 1437 int has_data = 0, hdr_tag = 0; 1438 u32 dw1 = 0, dw2 = 0; 1439 1440 hdr->dw0 = cpu_to_le32(port->id << CMD_HDR_PORT_OFF); 1441 if (parent_dev && dev_is_expander(parent_dev->dev_type)) { 1442 hdr->dw0 |= cpu_to_le32(3 << CMD_HDR_CMD_OFF); 1443 } else { 1444 int phy_id = device->phy->identify.phy_identifier; 1445 1446 hdr->dw0 |= cpu_to_le32((1U << phy_id) 1447 << CMD_HDR_PHY_ID_OFF); > 1448 hdr->dw0 |= CMD_HDR_FORCE_PHY_MSK; 1449 hdr->dw0 |= cpu_to_le32(4U << CMD_HDR_CMD_OFF); 1450 } 1451 1452 switch (task->data_dir) { 1453 case DMA_TO_DEVICE: 1454 has_data = 1; 1455 dw1 |= DIR_TO_DEVICE << CMD_HDR_DIR_OFF; 1456 break; 1457 case DMA_FROM_DEVICE: 1458 has_data = 1; 1459 dw1 |= DIR_TO_INI << CMD_HDR_DIR_OFF; 1460 break; 1461 default: 1462 dw1 &= ~CMD_HDR_DIR_MSK; 1463 } 1464 1465 if ((task->ata_task.fis.command == ATA_CMD_DEV_RESET) && 1466 (task->ata_task.fis.control & ATA_SRST)) 1467 dw1 |= 1 << CMD_HDR_RESET_OFF; 1468 1469 dw1 |= (hisi_sas_get_ata_protocol( 1470 &task->ata_task.fis, task->data_dir)) 1471 << CMD_HDR_FRAME_TYPE_OFF; 1472 dw1 |= sas_dev->device_id << CMD_HDR_DEV_ID_OFF; 1473 1474 if (FIS_CMD_IS_UNCONSTRAINED(task->ata_task.fis)) 1475 dw1 |= 1 << CMD_HDR_UNCON_CMD_OFF; 1476 1477 hdr->dw1 = cpu_to_le32(dw1); 1478 1479 /* dw2 */ 1480 if (task->ata_task.use_ncq) { 1481 struct ata_queued_cmd *qc = task->uldd_task; 1482 1483 hdr_tag = qc->tag; 1484 task->ata_task.fis.sector_count |= (u8) (hdr_tag << 3); 1485 dw2 |= hdr_tag << CMD_HDR_NCQ_TAG_OFF; 1486 } 1487 1488 dw2 |= (HISI_SAS_MAX_STP_RESP_SZ / 4) << CMD_HDR_CFL_OFF | 1489 2 << CMD_HDR_SG_MOD_OFF; 1490 hdr->dw2 = cpu_to_le32(dw2); 1491 1492 /* dw3 */ 1493 hdr->transfer_tags = cpu_to_le32(slot->idx); 1494 1495 if (has_data) 1496 prep_prd_sge_v3_hw(hisi_hba, slot, hdr, task->scatter, 1497 slot->n_elem); 1498 1499 hdr->data_transfer_len = cpu_to_le32(task->total_xfer_len); 1500 hdr->cmd_table_addr = cpu_to_le64(hisi_sas_cmd_hdr_addr_dma(slot)); 1501 hdr->sts_buffer_addr = cpu_to_le64(hisi_sas_status_buf_addr_dma(slot)); 1502 1503 buf_cmd = hisi_sas_cmd_hdr_addr_mem(slot); 1504 1505 if (likely(!task->ata_task.device_control_reg_update)) 1506 task->ata_task.fis.flags |= 0x80; /* C=1: update ATA cmd reg */ 1507 /* fill in command FIS */ 1508 memcpy(buf_cmd, &task->ata_task.fis, sizeof(struct host_to_dev_fis)); 1509 } 1510 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1365/1365] drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed.
by kernel test robot 18 Apr '25

18 Apr '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: c61927b921388695af91d0e58b8709040ed6cb17 commit: b8815fbbe89b0d15fa3296c3e57d2197a92f5bc0 [1365/1365] ACPI: CPPC: Fix cppc_cpufreq_init failed in CPU Hotplug situation config: x86_64-randconfig-102-20250103 (https://download.01.org/0day-ci/archive/20250418/202504180610.JUm54wLX-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504180610.JUm54wLX-lkp@intel.com/ cocci warnings: (new ones prefixed by >>) >> drivers/acpi/cppc_acpi.c:614:3-8: WARNING: NULL check before some freeing functions is not needed. vim +614 drivers/acpi/cppc_acpi.c 576 577 int acpi_get_psd_map(struct cppc_cpudata **all_cpu_data) 578 { 579 struct cpc_desc **cpc_pptr, *cpc_ptr; 580 int parsed_core_num = 0; 581 int i, ret; 582 583 cpc_pptr = kcalloc(num_possible_cpus(), sizeof(void *), GFP_KERNEL); 584 if (!cpc_pptr) 585 return -ENOMEM; 586 for_each_possible_cpu(i) { 587 cpc_pptr[i] = kzalloc(sizeof(struct cpc_desc), GFP_KERNEL); 588 if (!cpc_pptr[i]) { 589 ret = -ENOMEM; 590 goto out; 591 } 592 } 593 594 /* 595 * We can not use acpi_get_devices() to walk the processor devices 596 * because some processor device is not present. 597 */ 598 ret = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 599 ACPI_UINT32_MAX, acpi_parse_cpc, NULL, 600 cpc_pptr, (void **)&parsed_core_num); 601 if (ret) 602 goto out; 603 if (parsed_core_num != num_possible_cpus()) { 604 ret = -EINVAL; 605 goto out; 606 } 607 608 ret = __acpi_get_psd_map(all_cpu_data, cpc_pptr); 609 610 out: 611 for_each_possible_cpu(i) { 612 cpc_ptr = cpc_pptr[i]; 613 if (cpc_ptr) > 614 kfree(cpc_ptr); 615 } 616 kfree(cpc_pptr); 617 618 return ret; 619 } 620 EXPORT_SYMBOL_GPL(acpi_get_psd_map); 621 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH v2 OLK-6.6 0/3] soc cache: Add support for HiSilicon L3 cache
by Yushan Wang 17 Apr '25

17 Apr '25
driver inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IC15TR ---------------------------------------------------------------------- This series adds support for HiSilicon SoC cache lockdown and cache maintenance operations. Cache lockdown feature prevents cache entries from being evicted from L3 cache. It can be enabled by calling mmap function to the file (`/dev/hisi_soc_cache_mgmt`). This feature is implemented in the driver hisi_soc_l3c. Cache maintenance feature, following Arm64's CHI spec[1], enables users to raise certain transactions to the memory residing in the cache. This can be achieved by calling ioctl function to the same file as above. This feature is implemented in the driver hisi_soc_hha. L3 cache and L3 cache PMU share the same memory resource, which makes one fails to probe while another is on board. Since both devices rely on distinct information exported by ACPI, their probing functions should be unrelated. Workaround the resource conflict check by replacing devm_ioremap_resource() to devm_ioremap() instead. [1] https://developer.arm.com/documentation/ihi0050/latest/ Yushan Wang (3): soc cache: Add framework driver for HiSilicon SoC cache soc cache: Support cache maintenance for HiSilicon SoC Hydra Home Agent soc cache: Modify default config to compile HiSilicon SoC cache driver arch/arm64/configs/openeuler_defconfig | 2 + drivers/soc/hisilicon/Kconfig | 22 + drivers/soc/hisilicon/Makefile | 3 + .../soc/hisilicon/hisi_soc_cache_framework.c | 378 ++++++++++++++++++ .../soc/hisilicon/hisi_soc_cache_framework.h | 77 ++++ drivers/soc/hisilicon/hisi_soc_hha.c | 189 +++++++++ .../uapi/misc/hisi_soc_cache/hisi_soc_cache.h | 35 ++ 7 files changed, 706 insertions(+) create mode 100644 drivers/soc/hisilicon/hisi_soc_cache_framework.c create mode 100644 drivers/soc/hisilicon/hisi_soc_cache_framework.h create mode 100644 drivers/soc/hisilicon/hisi_soc_hha.c create mode 100644 include/uapi/misc/hisi_soc_cache/hisi_soc_cache.h -- 2.33.0
2 4
0 0
[PATCH OLK-6.6] coresight: tmc: Don't change the buffer size if it's in use
by Junhao He 17 Apr '25

17 Apr '25
From: Yicong Yang <yangyicong(a)hisilicon.com> driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC2158 ---------------------------------------------------------------------- Enable the trace in below steps will crash the kernel by NULL pointer dereferencing: echo 1 > /sys/bus/coresight/devices/tmc_etr0/enable_sink echo 1 > /sys/bus/coresight/devices/etm0/enable_source echo 0x400000 > /sys/bus/coresight/devices/tmc_etr0/buffer_size echo 1 > /sys/bus/coresight/devices/etm2/enable_source dd if=/dev/tmc_etr0 of=test_etm_sysfs_etr_030.data The call trace will be like: [...] Call trace: __tmc_etr_disable_hw+0x108/0x140 [coresight_tmc] tmc_read_prepare_etr+0xc0/0xd0 [coresight_tmc] tmc_open+0x60/0xa0 [coresight_tmc] misc_open+0x11c/0x170 chrdev_open+0xcc/0x2b0 do_dentry_open+0x140/0x4e0 vfs_open+0x34/0xf8 path_openat+0x2b0/0xf58 do_filp_open+0x8c/0x148 do_sys_openat2+0xb8/0xe8 __arm64_sys_openat+0x70/0xc0 el0_svc_common.constprop.0+0x64/0x148 do_el0_svc+0x24/0x38 el0_svc+0x40/0x140 el0t_64_sync_handler+0xc0/0xc8 el0t_64_sync+0x1a4/0x1a8 ---[ end trace 0000000000000000 ]--- Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028 [...] Call trace: tmc_etr_get_sysfs_trace+0x10/0x80 [coresight_tmc] vfs_read+0xcc/0x310 ksys_read+0x74/0x108 __arm64_sys_read+0x24/0x38 el0_svc_common.constprop.0+0x64/0x148 do_el0_svc+0x24/0x38 el0_svc+0x40/0x140 Due to the buffer size changed, the buffer will be reallocated in tmc_etr_get_sysfs_buffer() when the second source enabled. At trace end tmc_etr_sync_sysfs_buf() will reset the drvdata->sysfs_buf and trigger the later NULL pointer dereference when reading out the data. But it doesn't make sense to change the buffer size when it's already in use. So block such behavior. Fixes: 75f4e3619fe2 ("coresight: tmc-etr: Add transparent buffer management") Signed-off-by: Yicong Yang <yangyicong(a)hisilicon.com> Signed-off-by: Junhao He <hejunhao3(a)huawei.com> --- drivers/hwtracing/coresight/coresight-tmc-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c index c106d142e632..3503f42104eb 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-core.c +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c @@ -317,6 +317,11 @@ static ssize_t buffer_size_store(struct device *dev, if (drvdata->config_type != TMC_CONFIG_TYPE_ETR) return -EPERM; + /* Don't change the buffer size if it's in use */ + guard(spinlock)(&drvdata->spinlock); + if (drvdata->mode != CS_MODE_DISABLED) + return -EBUSY; + ret = kstrtoul(buf, 0, &val); if (ret) return ret; -- 2.33.0
2 1
0 0
[PATCH OLK-6.6] soc: qcom: pdr: Fix the potential deadlock
by Qi Xi 17 Apr '25

17 Apr '25
From: Saranya R <quic_sarar(a)quicinc.com> mainline inclusion from mainline-v6.14 commit 2eeb03ad9f42dfece63051be2400af487ddb96d2 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBZH8C CVE: CVE-2025-22014 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- When some client process A call pdr_add_lookup() to add the look up for the service and does schedule locator work, later a process B got a new server packet indicating locator is up and call pdr_locator_new_server() which eventually sets pdr->locator_init_complete to true which process A sees and takes list lock and queries domain list but it will timeout due to deadlock as the response will queued to the same qmi->wq and it is ordered workqueue and process B is not able to complete new server request work due to deadlock on list lock. Fix it by removing the unnecessary list iteration as the list iteration is already being done inside locator work, so avoid it here and just call schedule_work() here. Process A Process B process_scheduled_works() pdr_add_lookup() qmi_data_ready_work() process_scheduled_works() pdr_locator_new_server() pdr->locator_init_complete=true; pdr_locator_work() mutex_lock(&pdr->list_lock); pdr_locate_service() mutex_lock(&pdr->list_lock); pdr_get_domain_list() pr_err("PDR: %s get domain list txn wait failed: %d\n", req->service_name, ret); Timeout error log due to deadlock: " PDR: tms/servreg get domain list txn wait failed: -110 PDR: service lookup for msm/adsp/sensor_pd:tms/servreg failed: -110 " Thanks to Bjorn and Johan for letting me know that this commit also fixes an audio regression when using the in-kernel pd-mapper as that makes it easier to hit this race. [1] Link: https://lore.kernel.org/lkml/Zqet8iInnDhnxkT9@hovoldconsulting.com/ # [1] Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") CC: stable(a)vger.kernel.org Reviewed-by: Bjorn Andersson <bjorn.andersson(a)oss.qualcomm.com> Tested-by: Bjorn Andersson <bjorn.andersson(a)oss.qualcomm.com> Tested-by: Johan Hovold <johan+linaro(a)kernel.org> Signed-off-by: Saranya R <quic_sarar(a)quicinc.com> Co-developed-by: Mukesh Ojha <mukesh.ojha(a)oss.qualcomm.com> Signed-off-by: Mukesh Ojha <mukesh.ojha(a)oss.qualcomm.com> Link: https://lore.kernel.org/r/20250212163720.1577876-1-mukesh.ojha@oss.qualcomm… Signed-off-by: Bjorn Andersson <andersson(a)kernel.org> Signed-off-by: Qi Xi <xiqi2(a)huawei.com> --- drivers/soc/qcom/pdr_interface.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c index c7cd4daa10b0..f83491a7510e 100644 --- a/drivers/soc/qcom/pdr_interface.c +++ b/drivers/soc/qcom/pdr_interface.c @@ -74,7 +74,6 @@ static int pdr_locator_new_server(struct qmi_handle *qmi, { struct pdr_handle *pdr = container_of(qmi, struct pdr_handle, locator_hdl); - struct pdr_service *pds; mutex_lock(&pdr->lock); /* Create a local client port for QMI communication */ @@ -86,12 +85,7 @@ static int pdr_locator_new_server(struct qmi_handle *qmi, mutex_unlock(&pdr->lock); /* Service pending lookup requests */ - mutex_lock(&pdr->list_lock); - list_for_each_entry(pds, &pdr->lookups, node) { - if (pds->need_locator_lookup) - schedule_work(&pdr->locator_work); - } - mutex_unlock(&pdr->list_lock); + schedule_work(&pdr->locator_work); return 0; } -- 2.33.0
2 1
0 0
[PATCH OLK-5.10] soc: qcom: pdr: Fix the potential deadlock
by Qi Xi 17 Apr '25

17 Apr '25
From: Saranya R <quic_sarar(a)quicinc.com> mainline inclusion from mainline-v6.14 commit 2eeb03ad9f42dfece63051be2400af487ddb96d2 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBZH8C CVE: CVE-2025-22014 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- When some client process A call pdr_add_lookup() to add the look up for the service and does schedule locator work, later a process B got a new server packet indicating locator is up and call pdr_locator_new_server() which eventually sets pdr->locator_init_complete to true which process A sees and takes list lock and queries domain list but it will timeout due to deadlock as the response will queued to the same qmi->wq and it is ordered workqueue and process B is not able to complete new server request work due to deadlock on list lock. Fix it by removing the unnecessary list iteration as the list iteration is already being done inside locator work, so avoid it here and just call schedule_work() here. Process A Process B process_scheduled_works() pdr_add_lookup() qmi_data_ready_work() process_scheduled_works() pdr_locator_new_server() pdr->locator_init_complete=true; pdr_locator_work() mutex_lock(&pdr->list_lock); pdr_locate_service() mutex_lock(&pdr->list_lock); pdr_get_domain_list() pr_err("PDR: %s get domain list txn wait failed: %d\n", req->service_name, ret); Timeout error log due to deadlock: " PDR: tms/servreg get domain list txn wait failed: -110 PDR: service lookup for msm/adsp/sensor_pd:tms/servreg failed: -110 " Thanks to Bjorn and Johan for letting me know that this commit also fixes an audio regression when using the in-kernel pd-mapper as that makes it easier to hit this race. [1] Link: https://lore.kernel.org/lkml/Zqet8iInnDhnxkT9@hovoldconsulting.com/ # [1] Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") CC: stable(a)vger.kernel.org Reviewed-by: Bjorn Andersson <bjorn.andersson(a)oss.qualcomm.com> Tested-by: Bjorn Andersson <bjorn.andersson(a)oss.qualcomm.com> Tested-by: Johan Hovold <johan+linaro(a)kernel.org> Signed-off-by: Saranya R <quic_sarar(a)quicinc.com> Co-developed-by: Mukesh Ojha <mukesh.ojha(a)oss.qualcomm.com> Signed-off-by: Mukesh Ojha <mukesh.ojha(a)oss.qualcomm.com> Link: https://lore.kernel.org/r/20250212163720.1577876-1-mukesh.ojha@oss.qualcomm… Signed-off-by: Bjorn Andersson <andersson(a)kernel.org> Signed-off-by: Qi Xi <xiqi2(a)huawei.com> --- drivers/soc/qcom/pdr_interface.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c index 373725b6d544..d2e10d13bc7a 100644 --- a/drivers/soc/qcom/pdr_interface.c +++ b/drivers/soc/qcom/pdr_interface.c @@ -74,7 +74,6 @@ static int pdr_locator_new_server(struct qmi_handle *qmi, { struct pdr_handle *pdr = container_of(qmi, struct pdr_handle, locator_hdl); - struct pdr_service *pds; mutex_lock(&pdr->lock); /* Create a local client port for QMI communication */ @@ -86,12 +85,7 @@ static int pdr_locator_new_server(struct qmi_handle *qmi, mutex_unlock(&pdr->lock); /* Service pending lookup requests */ - mutex_lock(&pdr->list_lock); - list_for_each_entry(pds, &pdr->lookups, node) { - if (pds->need_locator_lookup) - schedule_work(&pdr->locator_work); - } - mutex_unlock(&pdr->list_lock); + schedule_work(&pdr->locator_work); return 0; } -- 2.33.0
2 1
0 0
[openeuler:OLK-5.10 2864/2864] kernel/sched/fair.c:4499:43: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'?
by kernel test robot 17 Apr '25

17 Apr '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 90bc43e348ee5b80304a53353ee95bfae19e7bf9 commit: 433c0b72564239cf3086f563d5ca32a10e4ffd3f [2864/2864] sched/fair: Count the number of tasks marked as steal_task on cfs_rq config: arm64-randconfig-004-20250417 (https://download.01.org/0day-ci/archive/20250417/202504171909.aMEHPXYz-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504171909.aMEHPXYz-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504171909.aMEHPXYz-lkp@intel.com/ All errors (new ones prefixed by >>): kernel/sched/fair.c: In function 'group_steal_enabled': kernel/sched/fair.c:4483:31: error: implicit declaration of function 'is_tg_steal' [-Werror=implicit-function-declaration] 4483 | return group_steal_used() && is_tg_steal(steal_task); | ^~~~~~~~~~~ kernel/sched/fair.c: In function 'overload_clear': >> kernel/sched/fair.c:4499:43: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 4499 | (rq->cfs.h_nr_running < 2 || rq->cfs.steal_h_nr_running == 0)) | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c:4489:16: warning: variable 'time' set but not used [-Wunused-but-set-variable] 4489 | unsigned long time; | ^~~~ kernel/sched/fair.c: In function 'overload_set': kernel/sched/fair.c:4525:36: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 4525 | if (group_steal_used() && rq->cfs.steal_h_nr_running < 1) | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c:4517:16: warning: variable 'time' set but not used [-Wunused-but-set-variable] 4517 | unsigned long time; | ^~~~ kernel/sched/fair.c: At top level: kernel/sched/fair.c:6013:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes] 6013 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} | ^~~~~~~~~~~~~~~~~~ kernel/sched/fair.c: In function 'enqueue_task_fair': kernel/sched/fair.c:6670:12: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 6670 | cfs_rq->steal_h_nr_running++; | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c:6694:12: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 6694 | cfs_rq->steal_h_nr_running++; | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c: In function 'dequeue_task_fair': kernel/sched/fair.c:6795:12: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 6795 | cfs_rq->steal_h_nr_running--; | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c:6831:12: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 6831 | cfs_rq->steal_h_nr_running--; | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c: In function 'select_task_rq_fair': kernel/sched/fair.c:8191:16: warning: variable 'time' set but not used [-Wunused-but-set-variable] 8191 | unsigned long time; | ^~~~ kernel/sched/fair.c: In function 'pick_next_task_fair': kernel/sched/fair.c:9185:16: warning: variable 'time' set but not used [-Wunused-but-set-variable] 9185 | unsigned long time; | ^~~~ kernel/sched/fair.c: In function 'can_migrate_task_llc': >> kernel/sched/fair.c:9944:43: error: dereferencing pointer to incomplete type 'struct task_group' 9944 | if (group_steal_used() && !is_tg_steal(tg->steal_task)) | ^~ kernel/sched/fair.c: In function 'steal_from': kernel/sched/fair.c:13229:29: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 13229 | if (tg_used && src_rq->cfs.steal_h_nr_running < 1) | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c:13241:30: error: 'struct cfs_rq' has no member named 'steal_h_nr_running'; did you mean 'idle_h_nr_running'? 13241 | (tg_used && src_rq->cfs.steal_h_nr_running < 1)) | ^~~~~~~~~~~~~~~~~~ | idle_h_nr_running kernel/sched/fair.c: At top level: kernel/sched/fair.c:13411:6: warning: no previous prototype for 'task_vruntime_update' [-Wmissing-prototypes] 13411 | void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi) | ^~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:13961:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes] 13961 | void free_fair_sched_group(struct task_group *tg) { } | ^~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:13963:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes] 13963 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:13968:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes] 13968 | void online_fair_sched_group(struct task_group *tg) { } | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/fair.c:13970:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes] 13970 | void unregister_fair_sched_group(struct task_group *tg) { } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +4499 kernel/sched/fair.c 4480 4481 static inline bool group_steal_enabled(int steal_task) 4482 { > 4483 return group_steal_used() && is_tg_steal(steal_task); 4484 } 4485 4486 static void overload_clear(struct rq *rq) 4487 { 4488 struct sparsemask *overload_cpus; 4489 unsigned long time; 4490 bool need_clear = false; 4491 4492 if (!steal_enabled()) 4493 return; 4494 4495 if (!group_steal_used() && rq->cfs.h_nr_running >= 2) 4496 return; 4497 4498 if (group_steal_used() && > 4499 (rq->cfs.h_nr_running < 2 || rq->cfs.steal_h_nr_running == 0)) 4500 need_clear = true; 4501 4502 if (!need_clear) 4503 return; 4504 4505 time = schedstat_start_time(); 4506 rcu_read_lock(); 4507 overload_cpus = rcu_dereference(rq->cfs_overload_cpus); 4508 if (overload_cpus) 4509 sparsemask_clear_elem(overload_cpus, rq->cpu); 4510 rcu_read_unlock(); 4511 schedstat_end_time(rq, time); 4512 } 4513 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • ...
  • 1824
  • Older →

HyperKitty Powered by HyperKitty