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

  • 51 participants
  • 18274 discussions
[openeuler:OLK-5.10 830/30000] arch/arm64/kernel/watchdog_sdei.c:28:5: warning: no previous prototype for 'watchdog_sdei_enable'
by kernel test robot 03 Mar '24

03 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6adee00913b51cd59245584085cdaca64f74465c commit: c7e03fb97fd2cfc439080387ea755846bc138a7f [830/30000] arm64: watchdog: add switch to select sdei_watchdog/pmu_watchdog config: arm64-randconfig-002-20240302 (https://download.01.org/0day-ci/archive/20240303/202403031229.ycxCdpan-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240303/202403031229.ycxCdpan-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/202403031229.ycxCdpan-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/arm64/kernel/watchdog_sdei.c:28:5: warning: no previous prototype for 'watchdog_sdei_enable' [-Wmissing-prototypes] 28 | int watchdog_sdei_enable(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kernel/watchdog_sdei.c:52:6: warning: no previous prototype for 'watchdog_sdei_disable' [-Wmissing-prototypes] 52 | void watchdog_sdei_disable(unsigned int cpu) | ^~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kernel/watchdog_sdei.c:114:12: warning: no previous prototype for 'watchdog_sdei_probe' [-Wmissing-prototypes] 114 | int __init watchdog_sdei_probe(void) | ^~~~~~~~~~~~~~~~~~~ vim +/watchdog_sdei_enable +28 arch/arm64/kernel/watchdog_sdei.c 27 > 28 int watchdog_sdei_enable(unsigned int cpu) 29 { 30 int ret; 31 32 if (!sdei_watchdog_registered) 33 return -EINVAL; 34 35 #ifdef CONFIG_HARDLOCKUP_CHECK_TIMESTAMP 36 refresh_hld_last_timestamp(); 37 #endif 38 39 __this_cpu_write(last_check_time, ktime_get_mono_fast_ns()); 40 sdei_api_set_secure_timer_period(watchdog_thresh); 41 42 ret = sdei_api_event_enable(sdei_watchdog_event_num); 43 if (ret) { 44 pr_err("Enable NMI Watchdog failed on cpu%d\n", 45 smp_processor_id()); 46 return ret; 47 } 48 49 return 0; 50 } 51 > 52 void watchdog_sdei_disable(unsigned int cpu) 53 { 54 int ret; 55 56 if (!sdei_watchdog_registered) 57 return; 58 59 ret = sdei_api_event_disable(sdei_watchdog_event_num); 60 if (ret) 61 pr_err("Disable NMI Watchdog failed on cpu%d\n", 62 smp_processor_id()); 63 } 64 65 static int sdei_watchdog_callback(u32 event, 66 struct pt_regs *regs, void *arg) 67 { 68 ktime_t delta, now = ktime_get_mono_fast_ns(); 69 70 delta = now - __this_cpu_read(last_check_time); 71 __this_cpu_write(last_check_time, now); 72 73 /* 74 * Set delta to 4/5 of the actual watchdog threshold period so the 75 * hrtimer is guaranteed to fire at least once within the real 76 * watchdog threshold. 77 */ 78 if (delta < watchdog_thresh * (u64)NSEC_PER_SEC * 4 / 5) { 79 pr_err(FW_BUG "SDEI Watchdog event triggered too soon, " 80 "time to last check:%lld ns\n", delta); 81 WARN_ON(1); 82 return 0; 83 } 84 85 watchdog_hardlockup_check(regs); 86 87 return 0; 88 } 89 NOKPROBE_SYMBOL(sdei_watchdog_callback); 90 91 static void sdei_nmi_watchdog_bind(void *data) 92 { 93 int ret; 94 95 ret = sdei_api_event_interrupt_bind(SDEI_NMI_WATCHDOG_HWIRQ); 96 if (ret < 0) 97 pr_err("SDEI bind failed on cpu%d, return %d\n", 98 smp_processor_id(), ret); 99 } 100 101 static int __init disable_sdei_nmi_watchdog_setup(char *str) 102 { 103 disable_sdei_nmi_watchdog = true; 104 return 1; 105 } 106 __setup("disable_sdei_nmi_watchdog", disable_sdei_nmi_watchdog_setup); 107 108 void sdei_watchdog_clear_eoi(void) 109 { 110 if (sdei_watchdog_registered) 111 sdei_api_clear_eoi(SDEI_NMI_WATCHDOG_HWIRQ); 112 } 113 > 114 int __init watchdog_sdei_probe(void) 115 { 116 int ret; 117 118 if (!is_hyp_mode_available()) { 119 pr_err("Disable SDEI NMI Watchdog in VM\n"); 120 return -EINVAL; 121 } 122 123 sdei_watchdog_event_num = sdei_api_event_interrupt_bind(SDEI_NMI_WATCHDOG_HWIRQ); 124 if (sdei_watchdog_event_num < 0) { 125 pr_err("Bind interrupt failed. Firmware may not support SDEI !\n"); 126 return sdei_watchdog_event_num; 127 } 128 129 /* 130 * After we introduced 'sdei_api_set_secure_timer_period', we disselect 131 * 'CONFIG_HARDLOCKUP_CHECK_TIMESTAMP'. So we need to make sure that 132 * firmware can set the period of the secure timer and the timer 133 * interrupt doesn't trigger too soon. 134 */ 135 if (sdei_api_set_secure_timer_period(watchdog_thresh)) { 136 pr_err("Firmware doesn't support setting the secure timer period, please update your BIOS !\n"); 137 return -EINVAL; 138 } 139 140 on_each_cpu(sdei_nmi_watchdog_bind, NULL, true); 141 142 ret = sdei_event_register(sdei_watchdog_event_num, 143 sdei_watchdog_callback, NULL); 144 if (ret) { 145 pr_err("SDEI Watchdog register callback failed\n"); 146 return ret; 147 } 148 149 sdei_watchdog_registered = true; 150 pr_info("SDEI Watchdog registered successfully\n"); 151 152 return 0; 153 } 154 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1693/3769] drivers/pci/controller/pci-loongson.c:183:22: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot 03 Mar '24

03 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: fbcd4a3032a53350f6d182c9daeaa4c46e65d964 commit: 668ae8b1a55a96a60303d36b81b112a709a324bb [1693/3769] PCI: LS7A2000: fix GPU card error config: loongarch-randconfig-r112-20240302 (https://download.01.org/0day-ci/archive/20240303/202403030850.TjIcnZbF-lkp@…) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240303/202403030850.TjIcnZbF-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/202403030850.TjIcnZbF-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/pci/controller/pci-loongson.c:183:22: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void volatile * @@ drivers/pci/controller/pci-loongson.c:183:22: sparse: expected void volatile [noderef] __iomem *addr drivers/pci/controller/pci-loongson.c:183:22: sparse: got void volatile * drivers/pci/controller/pci-loongson.c:184:29: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void volatile * @@ drivers/pci/controller/pci-loongson.c:184:29: sparse: expected void volatile [noderef] __iomem *addr drivers/pci/controller/pci-loongson.c:184:29: sparse: got void volatile * vim +183 drivers/pci/controller/pci-loongson.c 151 152 static void loongson_display_quirk(struct pci_dev *dev) 153 { 154 u32 val; 155 u64 mask, size; 156 u64 max_size = 0; 157 int i, num; 158 struct pci_bus *bus = dev->bus; 159 160 if (!dev->bus->number) { 161 if (!(dev->vendor == PCI_VENDOR_ID_LOONGSON && dev->device == 0x7a25)) 162 return; 163 } else { 164 while (!pci_is_root_bus(bus->parent)) 165 bus = bus->parent; 166 167 /* ensure slot is 7a2000 */ 168 if (bus->self->vendor != PCI_VENDOR_ID_LOONGSON || bus->self->device < 0x7a39) 169 return; 170 } 171 max_size = 0; 172 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { 173 if (dev->resource[i].flags & IORESOURCE_MEM) { 174 size = dev->resource[i].end - dev->resource[i].start; 175 if (size > max_size) { 176 max_size = size; 177 num = i; 178 } 179 } 180 } 181 mask = ~(dev->resource[num].end - dev->resource[num].start); 182 val = (dev->resource[num].start >> (24 - 16)) | ((mask >> 24) & 0xffff); > 183 writel(val, (volatile void *)0x80000efdfb000174UL); 184 writel(0x80000000, (volatile void *)0x80000efdfb000170UL); 185 } 186 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_LOONGSON, 0x7a25, loongson_display_quirk); 187 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, 188 PCI_BASE_CLASS_DISPLAY, 16, loongson_display_quirk); 189 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 23439/30000] mm/hugetlb.c:6315:14: warning: no previous prototype for 'hugetlb_alloc_hugepage_nodemask'
by kernel test robot 03 Mar '24

03 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6adee00913b51cd59245584085cdaca64f74465c commit: 8deff3a60ce1a9dffb552210f065fc9ed6a55f84 [23439/30000] mm/sharepool: Add mg_sp_alloc_nodemask config: arm64-randconfig-001-20240302 (https://download.01.org/0day-ci/archive/20240303/202403030519.VqzwjhSV-lkp@…) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240303/202403030519.VqzwjhSV-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/202403030519.VqzwjhSV-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/hugetlb.c:6315:14: warning: no previous prototype for 'hugetlb_alloc_hugepage_nodemask' [-Wmissing-prototypes] 6315 | struct page *hugetlb_alloc_hugepage_nodemask(int nid, int flag, nodemask_t *nodemask) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/hugetlb_alloc_hugepage_nodemask +6315 mm/hugetlb.c 6311 6312 /* 6313 * Allocate hugepage without reserve 6314 */ > 6315 struct page *hugetlb_alloc_hugepage_nodemask(int nid, int flag, nodemask_t *nodemask) 6316 { 6317 struct hstate *h = &default_hstate; 6318 gfp_t gfp_mask = htlb_alloc_mask(h); 6319 struct page *page = NULL; 6320 6321 if (nid == NUMA_NO_NODE) 6322 nid = numa_mem_id(); 6323 6324 if (nid < 0 || nid >= MAX_NUMNODES) 6325 return NULL; 6326 6327 if (flag & ~HUGETLB_ALLOC_MASK) 6328 return NULL; 6329 6330 if (enable_charge_mighp) 6331 gfp_mask |= __GFP_ACCOUNT; 6332 6333 if (flag & HUGETLB_ALLOC_NORECLAIM) 6334 gfp_mask &= ~__GFP_RECLAIM; 6335 6336 if (flag & HUGETLB_ALLOC_NORMAL) 6337 page = hugetlb_alloc_hugepage_normal(h, gfp_mask, nid); 6338 else if (flag & HUGETLB_ALLOC_BUDDY) 6339 page = alloc_migrate_huge_page(h, gfp_mask, nid, nodemask); 6340 else 6341 page = alloc_huge_page_nodemask(h, nid, nodemask, gfp_mask); 6342 6343 return page; 6344 } 6345 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION 415aa2f13fd4c4766b3b6deb471c6b909d39ac51
by kernel test robot 03 Mar '24

03 Mar '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: 415aa2f13fd4c4766b3b6deb471c6b909d39ac51 !4856 bus: qcom: Put child node before return Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- arm64-randconfig-001-20240302 | |-- drivers-iommu-arm-smmu-v3.c:error:CONFIG_CMA_ALIGNMENT-undeclared-(first-use-in-this-function) | `-- include-linux-kernel.h:error:first-argument-to-__builtin_choose_expr-not-a-constant |-- arm64-randconfig-002-20240302 | |-- drivers-gpio-gpio-phytium-platform.c:warning:phytium_gpio_acpi_match-defined-but-not-used | |-- drivers-mailbox-phytium_mailbox.c:warning:phytium_mbox_acpi_match-defined-but-not-used | |-- drivers-net-ethernet-3snic-sssnic-hw-sss_pci_sriov.c:warning:sss_deinit_vf_hw-defined-but-not-used | |-- drivers-net-ethernet-3snic-sssnic-hw-sss_pci_sriov.c:warning:sss_init_vf_hw-defined-but-not-used | |-- drivers-net-ethernet-netswift-ngbe-ngbe_main.c:warning:unused-variable-adapter | `-- mm-mem_reliable.c:warning:zero-defined-but-not-used |-- arm64-randconfig-003-20240302 | `-- arch-arm64-mm-init.c:error:pmu_nmi_enable-undeclared-(first-use-in-this-function) |-- arm64-randconfig-004-20240302 | |-- arch-arm64-mm-init.c:error:pmu_nmi_enable-undeclared-(first-use-in-this-function) | |-- include-linux-uaccess.h:warning:bind-may-be-used-uninitialized | |-- include-linux-uaccess.h:warning:ciov-may-be-used-uninitialized | `-- mm-mem_reliable.c:warning:zero-defined-but-not-used |-- x86_64-buildonly-randconfig-003-20240302 | |-- drivers-gpu-drm-nouveau-include-nvkm-core-os.h:warning:reg-may-be-used-uninitialized-in-this-function | `-- drivers-gpu-drm-nouveau-nvkm-engine-fifo-dmanv40.c:warning:ctx-may-be-used-uninitialized-in-this-function `-- x86_64-buildonly-randconfig-005-20240302 |-- drivers-gpu-drm-nouveau-include-nvkm-core-os.h:warning:reg-may-be-used-uninitialized-in-this-function `-- drivers-gpu-drm-nouveau-nvkm-engine-fifo-dmanv40.c:warning:ctx-may-be-used-uninitialized-in-this-function elapsed time: 721m configs tested: 20 configs skipped: 131 tested configs: arm64 allmodconfig gcc arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240302 gcc arm64 randconfig-002-20240302 gcc arm64 randconfig-003-20240302 gcc arm64 randconfig-004-20240302 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240302 clang x86_64 buildonly-randconfig-002-20240302 clang x86_64 buildonly-randconfig-003-20240302 gcc x86_64 buildonly-randconfig-004-20240302 gcc x86_64 buildonly-randconfig-005-20240302 gcc x86_64 buildonly-randconfig-006-20240302 gcc x86_64 defconfig gcc x86_64 randconfig-001-20240302 clang x86_64 randconfig-002-20240302 gcc x86_64 randconfig-003-20240302 gcc x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6] BUILD REGRESSION fbcd4a3032a53350f6d182c9daeaa4c46e65d964
by kernel test robot 03 Mar '24

03 Mar '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: fbcd4a3032a53350f6d182c9daeaa4c46e65d964 !4845 PCI: Avoid potential out-of-bounds read in pci_dev_for_each_resource() Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202403021652.crccT6al-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202403030238.Vu4FjlZ9-lkp@intel.com Error/Warning: (recently discovered and may have been fixed) arch/loongarch/kernel/dma.c:37:42: sparse: sparse: incorrect type in argument 1 (different address spaces) Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- arm64-randconfig-001-20240302 | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | `-- drivers-iommu-arm-arm-smmu-v3-arm-smmu-v3.c:error:pci_bus_type-undeclared-(first-use-in-this-function) |-- arm64-randconfig-002-20240302 | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-phytium_dp_encoder_destroy | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-phytium_gem_prime_vmap | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-phytium_gem_prime_vunmap | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:phytium_pci_pm_resume-defined-but-not-used | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:phytium_pci_pm_suspend-defined-but-not-used | |-- drivers-gpu-drm-phytium-phytium_platform.c:warning:phytium_platform_pm_resume-defined-but-not-used | |-- drivers-gpu-drm-phytium-phytium_platform.c:warning:phytium_platform_pm_suspend-defined-but-not-used | |-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead | |-- mm-mem_reliable.c:error:implicit-declaration-of-function-mem_reliable_ctrl_bit_disable | `-- mm-mem_reliable.c:warning:mem_reliable_ctrl_bit_disabled-defined-but-not-used |-- arm64-randconfig-004-20240302 | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-phytium_dp_encoder_destroy | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-phytium_gem_prime_vmap | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-phytium_gem_prime_vunmap | |-- drivers-gpu-drm-phytium-phytium_pci.c:error:implicit-declaration-of-function-pci_disable_msi | |-- drivers-gpu-drm-phytium-phytium_pci.c:error:implicit-declaration-of-function-pci_enable_msi | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:phytium_pci_pm_resume-defined-but-not-used | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:phytium_pci_pm_suspend-defined-but-not-used | |-- drivers-gpu-drm-phytium-phytium_platform.c:warning:phytium_platform_pm_resume-defined-but-not-used | |-- drivers-gpu-drm-phytium-phytium_platform.c:warning:phytium_platform_pm_suspend-defined-but-not-used | |-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead | |-- kernel-sched-core.c:warning:format-llu-expects-argument-of-type-long-long-unsigned-int-but-argument-has-type-int | |-- kernel-sched-fair.c:warning:hundred_thousand-defined-but-not-used | |-- kernel-sched-fair.c:warning:one_thousand-defined-but-not-used | |-- mm-mem_reliable.c:error:implicit-declaration-of-function-mem_reliable_ctrl_bit_disable | `-- mm-mem_reliable.c:warning:mem_reliable_ctrl_bit_disabled-defined-but-not-used |-- arm64-randconfig-r111-20240227 | |-- kernel-sched-fair.c:sparse:sparse:symbol-sysctl_offline_wait_interval-was-not-declared.-Should-it-be-static | `-- kernel-sched-fair.c:sparse:sparse:symbol-sysctl_overload_detect_period-was-not-declared.-Should-it-be-static |-- loongarch-allmodconfig | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | |-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead | |-- drivers-infiniband-hw-hns-hns_roce_hw_v2.c:warning:no-previous-prototype-for-hns_roce_hw_v2_get_dscp | `-- security-integrity-ima-ima_appraise.c:warning:no-previous-prototype-for-ima_get_hash_algo |-- loongarch-randconfig-001-20240302 | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | |-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead | |-- kernel-sched-fair.c:warning:hundred_thousand-defined-but-not-used | `-- kernel-sched-fair.c:warning:one_thousand-defined-but-not-used |-- loongarch-randconfig-002-20240302 | `-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead |-- loongarch-randconfig-r112-20240302 | `-- arch-loongarch-kernel-dma.c:sparse:sparse:incorrect-type-in-argument-(different-address-spaces)-expected-void-const-volatile-noderef-__iomem-addr-got-void-volatile |-- x86_64-buildonly-randconfig-003-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-buildonly-randconfig-005-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-buildonly-randconfig-006-20240302 | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | `-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead |-- x86_64-defconfig | |-- include-linux-ras.h:error:return-type-defaults-to-int | |-- include-linux-ras.h:warning:no-previous-prototype-for-log_arm_hw_error | `-- include-linux-ras.h:warning:return-with-no-value-in-function-returning-non-void |-- x86_64-randconfig-002-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-013-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-014-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-016-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device `-- x86_64-randconfig-074-20240302 `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device clang_recent_errors |-- arm64-allmodconfig | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_config_pix_clock | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_fb_format_check | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_plane_get_cursor_format | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_plane_get_primary_format | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_reset | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_update_cursor_hi_addr | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_update_primary_hi_addr | |-- drivers-gpu-drm-phytium-pe22_dc.c:warning:no-previous-prototype-for-function-pe22_dc_hw_vram_init | |-- drivers-gpu-drm-phytium-pe22_dp.c:warning:no-previous-prototype-for-function-pe22_dp_hw_get_source_lane_count | |-- drivers-gpu-drm-phytium-pe22_dp.c:warning:no-previous-prototype-for-function-pe22_dp_hw_reset | |-- drivers-gpu-drm-phytium-pe22_dp.c:warning:no-previous-prototype-for-function-pe22_dp_hw_spread_is_enable | |-- drivers-gpu-drm-phytium-phytium_crtc.c:warning:no-previous-prototype-for-function-phytium_crtc_atomic_destroy_state | |-- drivers-gpu-drm-phytium-phytium_crtc.c:warning:no-previous-prototype-for-function-phytium_crtc_atomic_duplicate_state | |-- drivers-gpu-drm-phytium-phytium_debugfs.c:warning:no-previous-prototype-for-function-phytium_debugfs_connector_add | |-- drivers-gpu-drm-phytium-phytium_debugfs.c:warning:no-previous-prototype-for-function-phytium_debugfs_display_register | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_adjust_link_train_parameter | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_coding_8b10b_need_enable | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_dpcd_sink_dpms | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_encoder_destroy | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_fast_link_train | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_get_link_train_fallback_values | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hpd_poll_handler | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_config_video | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_disable_input_source | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_disable_output | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_disable_video | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_enable_audio | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_enable_input_source | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_enable_output | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_enable_video | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_hpd_irq_setup | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_init | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_output_is_enable | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_hw_video_is_enable | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_scrambled_need_enable | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_dp_start_link_train | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_encoder_mode_valid | |-- drivers-gpu-drm-phytium-phytium_dp.c:warning:no-previous-prototype-for-function-phytium_get_encoder_crtc_mask | |-- drivers-gpu-drm-phytium-phytium_fbdev.c:warning:no-previous-prototype-for-function-phytium_drm_fbdev_fini | |-- drivers-gpu-drm-phytium-phytium_fbdev.c:warning:no-previous-prototype-for-function-phytium_drm_fbdev_init | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-function-phytium_dma_transfer | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-function-phytium_gem_prime_vmap | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-function-phytium_gem_prime_vunmap | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-function-phytium_memory_pool_alloc | |-- drivers-gpu-drm-phytium-phytium_gem.c:warning:no-previous-prototype-for-function-phytium_memory_pool_free | |-- drivers-gpu-drm-phytium-phytium_panel.c:warning:no-previous-prototype-for-function-phytium_dp_panel_release_backlight_funcs | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:no-previous-prototype-for-function-phytium_pci_dma_fini | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:no-previous-prototype-for-function-phytium_pci_dma_init | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:no-previous-prototype-for-function-phytium_pci_vram_fini | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:no-previous-prototype-for-function-phytium_pci_vram_hw_init | |-- drivers-gpu-drm-phytium-phytium_pci.c:warning:no-previous-prototype-for-function-phytium_pci_vram_init | |-- drivers-gpu-drm-phytium-phytium_plane.c:warning:no-previous-prototype-for-function-phytium_plane_atomic_destroy_state | |-- drivers-gpu-drm-phytium-phytium_plane.c:warning:no-previous-prototype-for-function-phytium_plane_atomic_duplicate_state | |-- drivers-gpu-drm-phytium-phytium_plane.c:warning:no-previous-prototype-for-function-phytium_plane_atomic_set_property | |-- drivers-gpu-drm-phytium-phytium_plane.c:warning:no-previous-prototype-for-function-phytium_plane_destroy | |-- drivers-gpu-drm-phytium-phytium_platform.c:warning:no-previous-prototype-for-function-phytium_platform_carveout_mem_fini | |-- drivers-gpu-drm-phytium-phytium_platform.c:warning:no-previous-prototype-for-function-phytium_platform_carveout_mem_init | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_clear_msi_irq | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_config_pix_clock | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_disable | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_fb_format_check | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_plane_get_cursor_format | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_plane_get_primary_format | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_update_dcreq | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_update_primary_hi_addr | |-- drivers-gpu-drm-phytium-px210_dc.c:warning:no-previous-prototype-for-function-px210_dc_hw_vram_init | |-- drivers-gpu-drm-phytium-px210_dp.c:warning:no-previous-prototype-for-function-px210_dp_hw_get_source_lane_count | |-- drivers-gpu-drm-phytium-px210_dp.c:warning:no-previous-prototype-for-function-px210_dp_hw_reset | |-- drivers-gpu-drm-phytium-px210_dp.c:warning:no-previous-prototype-for-function-px210_dp_hw_spread_is_enable | |-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead | |-- drivers-iommu-arm-arm-smmu-v3-arm-smmu-v3.c:warning:variable-pre_addr-is-uninitialized-when-used-here | |-- mm-mem_reliable.c:warning:arithmetic-between-different-enumeration-types-(-enum-node_stat_item-and-enum-lru_list-) | |-- security-integrity-ima-ima_appraise.c:warning:no-previous-prototype-for-function-ima_get_hash_algo | `-- security-integrity-ima-ima_fs.c:warning:variable-ret-is-used-uninitialized-whenever-if-condition-is-true |-- x86_64-allyesconfig | |-- arch-x86-crypto-sm3-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-sm3_generic_block_fn | |-- arch-x86-crypto-sm3-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-zx_sm3_finup | |-- arch-x86-crypto-sm3-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-zx_sm3_update | |-- arch-x86-crypto-sm4-zhaoxin-gmi.c:warning:no-previous-prototype-for-function-gmi_sm4_set_key | |-- drivers-crypto-montage-tsse-tsse_dev_mgr.c:warning:no-previous-prototype-for-function-tsse_stop_dev | |-- drivers-crypto-montage-tsse-tsse_dev_mgr.c:warning:variable-ptr-is-used-uninitialized-whenever-for-loop-exits-because-its-condition-is-false | |-- drivers-crypto-montage-tsse-tsse_fw_service.c:warning:no-previous-prototype-for-function-fw_free | |-- drivers-crypto-montage-tsse-tsse_fw_service.c:warning:no-previous-prototype-for-function-fw_send_msg | |-- drivers-crypto-montage-tsse-tsse_ipc.c:warning:no-previous-prototype-for-function-get_msginf | |-- drivers-crypto-montage-tsse-tsse_ipc.c:warning:no-previous-prototype-for-function-ipc_hw_init | |-- drivers-crypto-montage-tsse-tsse_ipc.c:warning:no-previous-prototype-for-function-ipc_init_msg | |-- drivers-crypto-montage-tsse-tsse_ipc.c:warning:no-previous-prototype-for-function-ipc_recieve_msg | |-- drivers-crypto-montage-tsse-tsse_ipc.c:warning:no-previous-prototype-for-function-ipc_send_msg | |-- drivers-crypto-montage-tsse-tsse_ipc.c:warning:no-previous-prototype-for-function-msg_rout | |-- drivers-crypto-montage-tsse-tsse_service.c:warning:no-previous-prototype-for-function-service_rout | |-- drivers-crypto-montage-tsse-tsse_service.c:warning:variable-ret-set-but-not-used | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | |-- drivers-i2c-busses-i2c-hisi.c:warning:expecting-prototype-for-i2c_dw_acpi_pin_mux_change().-Prototype-was-for-i2c_hisi_pin_mux_change()-instead | |-- drivers-pinctrl-zhaoxin-pinctrl-zhaoxin.c:warning:variable-base_offset-set-but-not-used | |-- drivers-pinctrl-zhaoxin-pinctrl-zhaoxin.c:warning:variable-pin-set-but-not-used | |-- drivers-pinctrl-zhaoxin-pinctrl-zhaoxin.c:warning:variable-value_back-set-but-not-used | |-- drivers-pinctrl-zhaoxin-pinctrl-zhaoxin.c:warning:variable-value_read-set-but-not-used | |-- security-integrity-ima-ima_appraise.c:warning:no-previous-prototype-for-function-ima_get_hash_algo | `-- security-integrity-ima-ima_fs.c:warning:variable-ret-is-used-uninitialized-whenever-if-condition-is-true |-- x86_64-buildonly-randconfig-001-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-buildonly-randconfig-002-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-004-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-006-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-011-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-012-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-015-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-071-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-072-20240302 | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | |-- include-linux-ras.h:error:type-specifier-missing-defaults-to-int-ISO-C99-and-later-do-not-support-implicit-int | |-- include-linux-ras.h:warning:no-previous-prototype-for-function-log_arm_hw_error | `-- include-linux-ras.h:warning:non-void-function-log_arm_hw_error-should-return-a-value |-- x86_64-randconfig-073-20240302 | |-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device | `-- ld.lld:error:undefined-symbol:lockdep_is_cpus_held |-- x86_64-randconfig-075-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device |-- x86_64-randconfig-076-20240302 | `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device `-- x86_64-rhel-8.3-rust `-- drivers-dax-super.c:warning:Function-parameter-or-member-KABI_RESERVE(-not-described-in-dax_device elapsed time: 721m configs tested: 40 configs skipped: 126 tested configs: arm64 allmodconfig clang arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240302 gcc arm64 randconfig-002-20240302 gcc arm64 randconfig-003-20240302 clang arm64 randconfig-004-20240302 gcc loongarch allmodconfig gcc loongarch allnoconfig gcc loongarch defconfig gcc loongarch randconfig-001-20240302 gcc loongarch randconfig-002-20240302 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240302 clang x86_64 buildonly-randconfig-002-20240302 clang x86_64 buildonly-randconfig-003-20240302 gcc x86_64 buildonly-randconfig-004-20240302 gcc x86_64 buildonly-randconfig-005-20240302 gcc x86_64 buildonly-randconfig-006-20240302 gcc x86_64 defconfig gcc x86_64 randconfig-001-20240302 clang x86_64 randconfig-002-20240302 gcc x86_64 randconfig-003-20240302 gcc x86_64 randconfig-004-20240302 clang x86_64 randconfig-005-20240302 gcc x86_64 randconfig-006-20240302 clang x86_64 randconfig-011-20240302 clang x86_64 randconfig-012-20240302 clang x86_64 randconfig-013-20240302 gcc x86_64 randconfig-014-20240302 gcc x86_64 randconfig-015-20240302 clang x86_64 randconfig-016-20240302 gcc x86_64 randconfig-071-20240302 clang x86_64 randconfig-072-20240302 clang x86_64 randconfig-073-20240302 clang x86_64 randconfig-074-20240302 gcc x86_64 randconfig-075-20240302 clang x86_64 randconfig-076-20240302 clang x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 780/3769] arch/loongarch/kernel/dma.c:37:42: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 03 Mar '24

03 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: fbcd4a3032a53350f6d182c9daeaa4c46e65d964 commit: 90d2bbc1ade2216bda17fb582a1aaabf7567478f [780/3769] LoongArch: use arch specific phys_to_dma config: loongarch-randconfig-r112-20240302 (https://download.01.org/0day-ci/archive/20240303/202403030238.Vu4FjlZ9-lkp@…) compiler: loongarch64-linux-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20240303/202403030238.Vu4FjlZ9-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/202403030238.Vu4FjlZ9-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> arch/loongarch/kernel/dma.c:37:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void volatile * @@ arch/loongarch/kernel/dma.c:37:42: sparse: expected void const volatile [noderef] __iomem *addr arch/loongarch/kernel/dma.c:37:42: sparse: got void volatile * vim +37 arch/loongarch/kernel/dma.c 29 30 void acpi_arch_dma_setup(struct device *dev) 31 { 32 int ret; 33 u64 mask, end = 0; 34 const struct bus_dma_region *map = NULL; 35 36 if (node_id_offset == 0) { > 37 node_id_offset = ((readl(LS7A_DMA_CFG) & LS7A_DMA_NODE_MASK) >> LS7A_DMA_NODE_SHF); 38 node_id_offset += 36; 39 } 40 41 ret = acpi_dma_get_range(dev, &map); 42 if (!ret && map) { 43 const struct bus_dma_region *r = map; 44 45 for (end = 0; r->size; r++) { 46 if (r->dma_start + r->size - 1 > end) 47 end = r->dma_start + r->size - 1; 48 } 49 50 mask = DMA_BIT_MASK(ilog2(end) + 1); 51 dev->bus_dma_limit = end; 52 dev->dma_range_map = map; 53 dev->coherent_dma_mask = min(dev->coherent_dma_mask, mask); 54 *dev->dma_mask = min(*dev->dma_mask, mask); 55 } 56 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openEuler-1.0-LTS] KVM: Stop looking for coalesced MMIO zones if the bus is destroyed
by Zheng Yejian 02 Mar '24

02 Mar '24
From: Sean Christopherson <seanjc(a)google.com> mainline inclusion from mainline-v5.13-rc1 commit 5d3c4c79384af06e3c8e25b7770b6247496b4417 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I94VOT CVE: CVE-2021-47060 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… --------------------------- Abort the walk of coalesced MMIO zones if kvm_io_bus_unregister_dev() fails to allocate memory for the new instance of the bus. If it can't instantiate a new bus, unregister_dev() destroys all devices _except_ the target device. But, it doesn't tell the caller that it obliterated the bus and invoked the destructor for all devices that were on the bus. In the coalesced MMIO case, this can result in a deleted list entry dereference due to attempting to continue iterating on coalesced_zones after future entries (in the walk) have been deleted. Opportunistically add curly braces to the for-loop, which encompasses many lines but sneaks by without braces due to the guts being a single if statement. Fixes: f65886606c2d ("KVM: fix memory leak in kvm_io_bus_unregister_dev()") Cc: stable(a)vger.kernel.org Reported-by: Hao Sun <sunhao.th(a)gmail.com> Signed-off-by: Sean Christopherson <seanjc(a)google.com> Message-Id: <20210412222050.876100-3-seanjc(a)google.com> Signed-off-by: Paolo Bonzini <pbonzini(a)redhat.com> Signed-off-by: Zheng Yejian <zhengyejian1(a)huawei.com> --- include/linux/kvm_host.h | 4 ++-- virt/kvm/coalesced_mmio.c | 19 +++++++++++++++++-- virt/kvm/kvm_main.c | 10 +++++----- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index cac0fad2695f..6346d0123077 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -195,8 +195,8 @@ int kvm_io_bus_read(struct kvm_vcpu *vcpu, enum kvm_bus bus_idx, gpa_t addr, int len, void *val); int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, struct kvm_io_device *dev); -void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, - struct kvm_io_device *dev); +int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, + struct kvm_io_device *dev); struct kvm_io_device *kvm_io_bus_get_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr); diff --git a/virt/kvm/coalesced_mmio.c b/virt/kvm/coalesced_mmio.c index b9336693c87e..70bd2dbdfffe 100644 --- a/virt/kvm/coalesced_mmio.c +++ b/virt/kvm/coalesced_mmio.c @@ -172,16 +172,31 @@ int kvm_vm_ioctl_unregister_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) { struct kvm_coalesced_mmio_dev *dev, *tmp; + int r; mutex_lock(&kvm->slots_lock); - list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zones, list) + list_for_each_entry_safe(dev, tmp, &kvm->coalesced_zones, list) { if (coalesced_mmio_in_range(dev, zone->addr, zone->size)) { - kvm_io_bus_unregister_dev(kvm, KVM_MMIO_BUS, &dev->dev); + r = kvm_io_bus_unregister_dev(kvm, KVM_MMIO_BUS, &dev->dev); kvm_iodevice_destructor(&dev->dev); + + /* + * On failure, unregister destroys all devices on the + * bus _except_ the target device, i.e. coalesced_zones + * has been modified. No need to restart the walk as + * there aren't any zones left. + */ + if (r) + break; } + } mutex_unlock(&kvm->slots_lock); + /* + * Ignore the result of kvm_io_bus_unregister_dev(), from userspace's + * perspective, the coalesced MMIO is most definitely unregistered. + */ return 0; } diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5f4f222c991f..62cd5624b715 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -3853,15 +3853,15 @@ int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, } /* Caller must hold slots_lock. */ -void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, - struct kvm_io_device *dev) +int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, + struct kvm_io_device *dev) { int i, j; struct kvm_io_bus *new_bus, *bus; bus = kvm_get_bus(kvm, bus_idx); if (!bus) - return; + return 0; for (i = 0; i < bus->dev_count; i++) if (bus->range[i].dev == dev) { @@ -3869,7 +3869,7 @@ void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, } if (i == bus->dev_count) - return; + return 0; new_bus = kmalloc(sizeof(*bus) + ((bus->dev_count - 1) * sizeof(struct kvm_io_range)), GFP_KERNEL); @@ -3890,7 +3890,7 @@ void kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, rcu_assign_pointer(kvm->buses[bus_idx], new_bus); synchronize_srcu_expedited(&kvm->srcu); kfree(bus); - return; + return new_bus ? 0 : -ENOMEM; } struct kvm_io_device *kvm_io_bus_get_dev(struct kvm *kvm, enum kvm_bus bus_idx, -- 2.25.1
1 0
0 0
[openeuler:OLK-5.10] BUILD SUCCESS 6adee00913b51cd59245584085cdaca64f74465c
by kernel test robot 02 Mar '24

02 Mar '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10 branch HEAD: 6adee00913b51cd59245584085cdaca64f74465c !4847 btrfs: mainline backport Warning ids grouped by kconfigs: clang_recent_errors `-- x86_64-allyesconfig |-- drivers-ub-urma-ubcore-ubcore_device.c:warning:no-previous-prototype-for-function-ubcore_find_tpf_device_legacy |-- drivers-ub-urma-ubcore-ubcore_tp.c:warning:no-previous-prototype-for-function-ubcore_modify_tp_state |-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_dev_accessible_by_ns |-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_set_dev_ns `-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_set_ns_mode elapsed time: 730m configs tested: 33 configs skipped: 133 The following configs have been built successfully. More configs may be tested in the coming days. tested configs: arm64 allmodconfig clang arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240302 gcc arm64 randconfig-002-20240302 gcc arm64 randconfig-003-20240302 clang arm64 randconfig-004-20240302 gcc x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240302 clang x86_64 buildonly-randconfig-002-20240302 clang x86_64 buildonly-randconfig-003-20240302 gcc x86_64 buildonly-randconfig-004-20240302 gcc x86_64 buildonly-randconfig-005-20240302 gcc x86_64 buildonly-randconfig-006-20240302 gcc x86_64 defconfig gcc x86_64 randconfig-001-20240302 clang x86_64 randconfig-002-20240302 gcc x86_64 randconfig-003-20240302 gcc x86_64 randconfig-004-20240302 clang x86_64 randconfig-005-20240302 gcc x86_64 randconfig-006-20240302 clang x86_64 randconfig-011-20240302 clang x86_64 randconfig-012-20240302 clang x86_64 randconfig-013-20240302 gcc x86_64 randconfig-014-20240302 gcc x86_64 randconfig-015-20240302 clang x86_64 randconfig-016-20240302 gcc x86_64 randconfig-071-20240302 clang x86_64 randconfig-072-20240302 clang x86_64 randconfig-073-20240302 clang x86_64 randconfig-075-20240302 clang x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS v2] net: openvswitch: limit the number of recursions from action sets
by Dong Chenchen 02 Mar '24

02 Mar '24
From: Aaron Conole <aconole(a)redhat.com> mainline inclusion from mainline-v6.8-rc3 commit 6e2f90d31fe09f2b852de25125ca875aabd81367 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I91L17 CVE: CVE-2024-1151 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- The ovs module allows for some actions to recursively contain an action list for complex scenarios, such as sampling, checking lengths, etc. When these actions are copied into the internal flow table, they are evaluated to validate that such actions make sense, and these calls happen recursively. The ovs-vswitchd userspace won't emit more than 16 recursion levels deep. However, the module has no such limit and will happily accept limits larger than 16 levels nested. Prevent this by tracking the number of recursions happening and manually limiting it to 16 levels nested. The initial implementation of the sample action would track this depth and prevent more than 3 levels of recursion, but this was removed to support the clone use case, rather than limited at the current userspace limit. Fixes: 798c166173ff ("openvswitch: Optimize sample action for the clone use cases") Signed-off-by: Aaron Conole <aconole(a)redhat.com> Reviewed-by: Simon Horman <horms(a)kernel.org> Link: https://lore.kernel.org/r/20240207132416.1488485-2-aconole@redhat.com Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Conflicts: net/openvswitch/flow_netlink.c Signed-off-by: Dong Chenchen <dongchenchen2(a)huawei.com> --- net/openvswitch/flow_netlink.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 5af7254bd749..45acc612c73b 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c @@ -60,6 +60,7 @@ struct ovs_len_tbl { #define OVS_ATTR_NESTED -1 #define OVS_ATTR_VARIABLE -2 +#define OVS_COPY_ACTIONS_MAX_DEPTH 16 static bool actions_may_change_flow(const struct nlattr *actions) { @@ -2393,13 +2394,14 @@ static inline void add_nested_action_end(struct sw_flow_actions *sfa, static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, - __be16 eth_type, __be16 vlan_tci, bool log); + __be16 eth_type, __be16 vlan_tci, bool log, + u32 depth); static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, __be16 eth_type, __be16 vlan_tci, - bool log, bool last) + bool log, bool last, u32 depth) { const struct nlattr *attrs[OVS_SAMPLE_ATTR_MAX + 1]; const struct nlattr *probability, *actions; @@ -2450,7 +2452,8 @@ static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, return err; err = __ovs_nla_copy_actions(net, actions, key, sfa, - eth_type, vlan_tci, log); + eth_type, vlan_tci, log, + depth + 1); if (err) return err; @@ -2465,7 +2468,7 @@ static int validate_and_copy_clone(struct net *net, const struct sw_flow_key *key, struct sw_flow_actions **sfa, __be16 eth_type, __be16 vlan_tci, - bool log, bool last) + bool log, bool last, u32 depth) { int start, err; u32 exec; @@ -2485,7 +2488,8 @@ static int validate_and_copy_clone(struct net *net, return err; err = __ovs_nla_copy_actions(net, attr, key, sfa, - eth_type, vlan_tci, log); + eth_type, vlan_tci, log, + depth + 1); if (err) return err; @@ -2855,12 +2859,16 @@ static int copy_action(const struct nlattr *from, static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, - __be16 eth_type, __be16 vlan_tci, bool log) + __be16 eth_type, __be16 vlan_tci, + bool log, u32 depth) { u8 mac_proto = ovs_key_mac_proto(key); const struct nlattr *a; int rem, err; + if (depth > OVS_COPY_ACTIONS_MAX_DEPTH) + return -EOVERFLOW; + nla_for_each_nested(a, attr, rem) { /* Expected argument lengths, (u32)-1 for variable length. */ static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = { @@ -3008,7 +3016,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, err = validate_and_copy_sample(net, a, key, sfa, eth_type, vlan_tci, - log, last); + log, last, depth); if (err) return err; skip_copy = true; @@ -3078,7 +3086,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, err = validate_and_copy_clone(net, a, key, sfa, eth_type, vlan_tci, - log, last); + log, last, depth); if (err) return err; skip_copy = true; @@ -3115,7 +3123,7 @@ int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, (*sfa)->orig_len = nla_len(attr); err = __ovs_nla_copy_actions(net, attr, key, sfa, key->eth.type, - key->eth.vlan.tci, log); + key->eth.vlan.tci, log, 0); if (err) ovs_nla_free_flow_actions(*sfa); -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] net: openvswitch: limit the number of recursions from action sets
by Dong Chenchen 02 Mar '24

02 Mar '24
From: Aaron Conole <aconole(a)redhat.com> mainline inclusion from mainline-v6.8-rc3 commit 6e2f90d31fe09f2b852de25125ca875aabd81367 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I91L17 CVE: CVE-2024-1151 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- The ovs module allows for some actions to recursively contain an action list for complex scenarios, such as sampling, checking lengths, etc. When these actions are copied into the internal flow table, they are evaluated to validate that such actions make sense, and these calls happen recursively. The ovs-vswitchd userspace won't emit more than 16 recursion levels deep. However, the module has no such limit and will happily accept limits larger than 16 levels nested. Prevent this by tracking the number of recursions happening and manually limiting it to 16 levels nested. The initial implementation of the sample action would track this depth and prevent more than 3 levels of recursion, but this was removed to support the clone use case, rather than limited at the current userspace limit. Fixes: 798c166173ff ("openvswitch: Optimize sample action for the clone use cases") Signed-off-by: Aaron Conole <aconole(a)redhat.com> Reviewed-by: Simon Horman <horms(a)kernel.org> Link: https://lore.kernel.org/r/20240207132416.1488485-2-aconole@redhat.com Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Conflicts: net/openvswitch/flow_netlink.c Signed-off-by: Dong Chenchen <dongchenchen2(a)huawei.com> --- net/openvswitch/flow_netlink.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index 5af7254bd749..0c2848facef3 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c @@ -60,6 +60,7 @@ struct ovs_len_tbl { #define OVS_ATTR_NESTED -1 #define OVS_ATTR_VARIABLE -2 +#define OVS_COPY_ACTIONS_MAX_DEPTH 16 static bool actions_may_change_flow(const struct nlattr *actions) { @@ -2393,13 +2394,14 @@ static inline void add_nested_action_end(struct sw_flow_actions *sfa, static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, - __be16 eth_type, __be16 vlan_tci, bool log); + __be16 eth_type, __be16 vlan_tci, bool log, + u32 depth); static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, __be16 eth_type, __be16 vlan_tci, - bool log, bool last) + bool log, bool last, u32 depth) { const struct nlattr *attrs[OVS_SAMPLE_ATTR_MAX + 1]; const struct nlattr *probability, *actions; @@ -2450,7 +2452,8 @@ static int validate_and_copy_sample(struct net *net, const struct nlattr *attr, return err; err = __ovs_nla_copy_actions(net, actions, key, sfa, - eth_type, vlan_tci, log); + eth_type, vlan_tci, log, + depth + 1); if (err) return err; @@ -2465,7 +2468,7 @@ static int validate_and_copy_clone(struct net *net, const struct sw_flow_key *key, struct sw_flow_actions **sfa, __be16 eth_type, __be16 vlan_tci, - bool log, bool last) + bool log, bool last, u32 depth) { int start, err; u32 exec; @@ -2485,7 +2488,8 @@ static int validate_and_copy_clone(struct net *net, return err; err = __ovs_nla_copy_actions(net, attr, key, sfa, - eth_type, vlan_tci, log); + eth_type, vlan_tci, log, + depth + 1); if (err) return err; @@ -2855,12 +2859,16 @@ static int copy_action(const struct nlattr *from, static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, struct sw_flow_actions **sfa, - __be16 eth_type, __be16 vlan_tci, bool log) + __be16 eth_type, __be16 vlan_tci, + bool log, u32 depth) { u8 mac_proto = ovs_key_mac_proto(key); const struct nlattr *a; int rem, err; + if (depth > OVS_COPY_ACTIONS_MAX_DEPTH) + return -EOVERFLOW; + nla_for_each_nested(a, attr, rem) { /* Expected argument lengths, (u32)-1 for variable length. */ static const u32 action_lens[OVS_ACTION_ATTR_MAX + 1] = { @@ -3008,7 +3016,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, err = validate_and_copy_sample(net, a, key, sfa, eth_type, vlan_tci, - log, last); + log, last, depth); if (err) return err; skip_copy = true; @@ -3078,7 +3086,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, err = validate_and_copy_clone(net, a, key, sfa, eth_type, vlan_tci, - log, last); + log, last, depth); if (err) return err; skip_copy = true; @@ -3105,7 +3113,8 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, /* 'key' must be the masked key. */ int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, const struct sw_flow_key *key, - struct sw_flow_actions **sfa, bool log) + struct sw_flow_actions **sfa, bool log + u32 depth) { int err; @@ -3115,7 +3124,7 @@ int ovs_nla_copy_actions(struct net *net, const struct nlattr *attr, (*sfa)->orig_len = nla_len(attr); err = __ovs_nla_copy_actions(net, attr, key, sfa, key->eth.type, - key->eth.vlan.tci, log); + key->eth.vlan.tci, log, 0); if (err) ovs_nla_free_flow_actions(*sfa); -- 2.25.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 1215
  • 1216
  • 1217
  • 1218
  • 1219
  • 1220
  • 1221
  • ...
  • 1828
  • Older →

HyperKitty Powered by HyperKitty