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 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • 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

  • 45 participants
  • 21957 discussions
[PATCH OLK-6.6] mm: migrate: add dma copy offloading for hugetlb
by Zeng Heng 15 Dec '25

15 Dec '25
From: Tong Tiangen <tongtiangen(a)huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IDBGTZ CVE: NA ------------------------------- Large memory migration imposes significant overhead on the CPU. This patch introduces enhancements to the page migration by offloading the copy to UDMA hardware which based on the DMA engine framework, and a new migration mode has been introduced, If DMA migration fails, it will fall back to CPU migration. DMA migration supports both asynchronous and synchronous modes for subsequent debugging purposes. Signed-off-by: Tong Tiangen <tongtiangen(a)huawei.com> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- arch/arm64/configs/openeuler_defconfig | 1 + include/linux/migrate_mode.h | 2 + include/linux/mm.h | 8 ++ mm/Kconfig | 7 ++ mm/Makefile | 1 + mm/migrate.c | 5 + mm/migrate_dma.c | 143 +++++++++++++++++++++++++ 7 files changed, 167 insertions(+) create mode 100644 mm/migrate_dma.c diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index b9a451bd7d65..44e1c0debb1a 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -1186,6 +1186,7 @@ CONFIG_COMPACTION=y CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 CONFIG_PAGE_REPORTING=y CONFIG_MIGRATION=y +CONFIG_MIGRATE_PAGES_DMA_OFFLOADING=y CONFIG_DEVICE_MIGRATION=y CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y CONFIG_ARCH_ENABLE_THP_MIGRATION=y diff --git a/include/linux/migrate_mode.h b/include/linux/migrate_mode.h index 0f577f932bb4..4c992bc66575 100644 --- a/include/linux/migrate_mode.h +++ b/include/linux/migrate_mode.h @@ -19,6 +19,8 @@ enum migrate_mode { MIGRATE_SYNC_NO_COPY, }; +#define MIGRATE_ASYNC_DMA_OFFLOADING (10) + enum migrate_reason { MR_COMPACTION, MR_MEMORY_FAILURE, diff --git a/include/linux/mm.h b/include/linux/mm.h index c0040a2014c4..036822cb1b9d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1330,6 +1330,14 @@ void put_pages_list(struct list_head *pages); void split_page(struct page *page, unsigned int order); void folio_copy(struct folio *dst, struct folio *src); int folio_mc_copy(struct folio *dst, struct folio *src); +#ifdef CONFIG_MIGRATE_PAGES_DMA_OFFLOADING +int folio_dma_copy(struct folio *dst, struct folio *src); +#else +static inline int folio_dma_copy(struct folio *dst, struct folio *src) +{ + return -ENODEV; +} +#endif unsigned long nr_free_buffer_pages(void); diff --git a/mm/Kconfig b/mm/Kconfig index 4eb0642b71e5..9408a3ca7f4c 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -696,6 +696,13 @@ config MIGRATION pages as migration can relocate pages to satisfy a huge page allocation instead of reclaiming. +config MIGRATE_PAGES_DMA_OFFLOADING + bool "Support to use DMA channels for page migration" + depends on DMA_ENGINE + default y + help + Allows kernel to use dma offloading for page migraton. + config DEVICE_MIGRATION def_bool MIGRATION && ZONE_DEVICE diff --git a/mm/Makefile b/mm/Makefile index e45cdeda47b7..dd81f8c33e03 100644 --- a/mm/Makefile +++ b/mm/Makefile @@ -92,6 +92,7 @@ obj-$(CONFIG_FAILSLAB) += failslab.o obj-$(CONFIG_FAIL_PAGE_ALLOC) += fail_page_alloc.o obj-$(CONFIG_MEMTEST) += memtest.o obj-$(CONFIG_MIGRATION) += migrate.o +obj-$(CONFIG_MIGRATE_PAGES_DMA_OFFLOADING) += migrate_dma.o obj-$(CONFIG_NUMA) += memory-tiers.o obj-$(CONFIG_DEVICE_MIGRATION) += migrate_device.o obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += huge_memory.o khugepaged.o diff --git a/mm/migrate.c b/mm/migrate.c index 4edd29d9a041..8b1058b28175 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -583,6 +583,11 @@ static int folio_migrate_mc_copy(struct folio *dst, struct folio *src, if (mode == MIGRATE_SYNC_NO_COPY) return 0; + if (mode == MIGRATE_ASYNC_DMA_OFFLOADING && folio_test_hugetlb(src)) + /* if dma offloading fail, fallback */ + if (!folio_dma_copy(dst, src)) + return 0; + return folio_mc_copy(dst, src); } diff --git a/mm/migrate_dma.c b/mm/migrate_dma.c new file mode 100644 index 000000000000..c6ff6f1258aa --- /dev/null +++ b/mm/migrate_dma.c @@ -0,0 +1,143 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Support to use DMA channels for page migration. + * + * Copyright (C) 2025 Huawei Limited + */ + +#include <linux/dmaengine.h> +#include <linux/dma-mapping.h> + +/* DMA channel track its transfers done */ +struct dma_channel_work { + struct dma_chan *chan; + enum dma_status status; + struct completion done; +}; + +static void folios_dma_copy_completion_callback(void *param, + const struct dmaengine_result *result) +{ + struct dma_channel_work *chan_work = param; + + if (result) { + enum dmaengine_tx_result dma_res = result->result; + + if (dma_res == DMA_TRANS_NOERROR) + chan_work->status = DMA_COMPLETE; + else + chan_work->status = DMA_ERROR; + } + + complete(&chan_work->done); +} + +static int process_folio_dma_transfer(struct dma_channel_work *chan_work, + struct folio *src, struct folio *dst) +{ + struct dma_chan *chan = chan_work->chan; + struct device *dev = dmaengine_get_dma_device(chan); + enum dma_ctrl_flags flags = DMA_CTRL_ACK; + struct dma_async_tx_descriptor *tx; + dma_addr_t src_handle, dst_handle; + size_t size = folio_size(src); + int ret; + + flags |= DMA_PREP_INTERRUPT; + + src_handle = dma_map_page(dev, &src->page, 0, size, DMA_TO_DEVICE); + if (dma_mapping_error(dev, src_handle)) { + pr_err("map dma src page error.\n"); + return -ENOMEM; + } + + dst_handle = dma_map_page(dev, &dst->page, 0, size, DMA_FROM_DEVICE); + if (dma_mapping_error(dev, dst_handle)) { + pr_err("map dma dst page error.\n"); + ret = -ENOMEM; + goto out_unmap; + } + + tx = dmaengine_prep_dma_memcpy(chan, dst_handle, src_handle, + size, flags); + if (unlikely(!tx)) { + pr_err("prep dma memcpy error.\n"); + ret = -EBUSY; + goto out_unmap_all; + } + + tx->callback_result = folios_dma_copy_completion_callback; + tx->callback_param = chan_work; + init_completion(&chan_work->done); + chan_work->status = DMA_ERROR; + + if (dma_submit_error(dmaengine_submit(tx))) { + pr_err("dma submit error.\n"); + ret = -EINVAL; + goto out_unmap_all; + } + + dma_async_issue_pending(chan); + if (!wait_for_completion_timeout(&chan_work->done, + msecs_to_jiffies(1000))) { + ret = -ETIMEDOUT; + goto out_unmap_all; + } + + ret = (chan_work->status == DMA_COMPLETE) ? 0 : -EPROTO; + +out_unmap_all: + dma_unmap_page(dev, dst_handle, size, DMA_FROM_DEVICE); +out_unmap: + dma_unmap_page(dev, src_handle, size, DMA_TO_DEVICE); + + return ret; +} + +static bool folio_dma_chan_filter(struct dma_chan *chan, void *param) +{ + return !strcmp(dev_name(chan->device->dev), "ub_dma_device"); +} + +int folio_dma_copy(struct folio *dst, struct folio *src) +{ + struct dma_channel_work *chan_work; + struct dma_slave_config dma_cfg; + struct dma_chan *chan; + dma_cap_mask_t mask; + int ret = -ENODEV; + + dma_cap_zero(mask); + dma_cap_set(DMA_MEMCPY, mask); + chan = dma_request_channel(mask, folio_dma_chan_filter, NULL); + if (!chan) { + pr_err("failed to allocate dma channel.\n"); + return ret; + } + + memset(&dma_cfg, 0, sizeof(dma_cfg)); + dma_cfg.direction = DMA_MEM_TO_MEM; + ret = dmaengine_slave_config(chan, &dma_cfg); + if (ret) { + pr_err("failed to config dma channel.\n"); + goto out_release; + } + + chan_work = kmalloc(sizeof(*chan_work), GFP_KERNEL); + if (unlikely(!chan_work)) { + pr_err("failed to allocate memory for chan work.\n"); + goto out_release; + } + + chan_work->chan = chan; + ret = process_folio_dma_transfer(chan_work, src, dst); + if (unlikely(ret)) + pr_err("failed to process folio dma transfer.\n"); + + kfree(chan_work); +out_release: + dma_release_channel(chan); + + return ret; +} +EXPORT_SYMBOL(folio_dma_copy); -- 2.25.1
2 1
0 0
[openeuler:OLK-6.6 3541/3541] kernel/livepatch/core.c:216:13: warning: no previous prototype for function 'arch_klp_skip_resolve'
by kernel test robot 15 Dec '25

15 Dec '25
Hi laokz, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: b8f3220637be1736c165c289c634f27841ac4e01 [3541/3541] livepatch: add arch hook before doing klp_resolve_symbols config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150919.EC4St0LR-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150919.EC4St0LR-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/202512150919.EC4St0LR-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/livepatch/core.c:97:12: warning: no previous prototype for function 'arch_klp_init_func' [-Wmissing-prototypes] 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ kernel/livepatch/core.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ | static >> kernel/livepatch/core.c:216:13: warning: no previous prototype for function 'arch_klp_skip_resolve' [-Wmissing-prototypes] 216 | bool __weak arch_klp_skip_resolve(unsigned int type) | ^ kernel/livepatch/core.c:216:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 216 | bool __weak arch_klp_skip_resolve(unsigned int type) | ^ | static kernel/livepatch/core.c:1767:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1767 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1767:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1767 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static kernel/livepatch/core.c:2022:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 2022 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:2022:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2022 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static kernel/livepatch/core.c:2027:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 2027 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:2027:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2027 | void __weak arch_klp_mem_free(void *mem) | ^ | static kernel/livepatch/core.c:2032:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 2032 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:2032:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2032 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:2036:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 2036 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:2036:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2036 | void __weak arch_klp_code_modify_post_process(void) | ^ | static kernel/livepatch/core.c:2049:12: warning: no previous prototype for function 'arch_klp_check_breakpoint' [-Wmissing-prototypes] 2049 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2049:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2049 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static kernel/livepatch/core.c:2063:13: warning: no previous prototype for function 'arch_klp_set_brk_func' [-Wmissing-prototypes] 2063 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ kernel/livepatch/core.c:2063:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2063 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ | static 9 warnings generated. vim +/arch_klp_skip_resolve +216 kernel/livepatch/core.c 214 215 #ifdef CONFIG_LIVEPATCH_WO_FTRACE > 216 bool __weak arch_klp_skip_resolve(unsigned int type) 217 { 218 return false; 219 } 220 #endif 221 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/sched/fair.c:143:14: sparse: sparse: symbol 'sysctl_overload_detect_period' was not declared. Should it be static?
by kernel test robot 15 Dec '25

15 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: a3c9f2da0a35df4e41751556be4308f57bdaf3d6 [3541/3541] sched: Introduce handle priority reversion mechanism config: arm64-randconfig-r113-20251213 (https://download.01.org/0day-ci/archive/20251215/202512150649.o2WPQrCa-lkp@…) compiler: aarch64-linux-gcc (GCC) 12.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150649.o2WPQrCa-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/202512150649.o2WPQrCa-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> kernel/sched/fair.c:143:14: sparse: sparse: symbol 'sysctl_overload_detect_period' was not declared. Should it be static? >> kernel/sched/fair.c:144:14: sparse: sparse: symbol 'sysctl_offline_wait_interval' was not declared. Should it be static? kernel/sched/fair.c:1236:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_entity const *se @@ got struct sched_entity [noderef] __rcu * @@ kernel/sched/fair.c:1236:34: sparse: expected struct sched_entity const *se kernel/sched/fair.c:1236:34: sparse: got struct sched_entity [noderef] __rcu * kernel/sched/fair.c:3019:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu * @@ kernel/sched/fair.c:3019:13: sparse: expected struct task_struct *tsk kernel/sched/fair.c:3019:13: sparse: got struct task_struct [noderef] __rcu * kernel/sched/fair.c:12477:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:12477:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:12477:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:5766:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:5766:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:5766:22: sparse: struct task_struct * kernel/sched/fair.c:7809:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:7809:20: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:7809:20: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8014:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:8014:9: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/fair.c:8014:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:8113:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8113:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8113:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:8333:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:8333:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:8333:22: sparse: struct task_struct * kernel/sched/fair.c:8687:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/fair.c:8687:38: sparse: expected struct task_struct *curr kernel/sched/fair.c:8687:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/fair.c:9680:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:9680:40: sparse: expected struct sched_domain *child kernel/sched/fair.c:9680:40: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:10317:22: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/fair.c:10317:22: sparse: struct task_struct [noderef] __rcu * kernel/sched/fair.c:10317:22: sparse: struct task_struct * kernel/sched/fair.c:11749:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11749:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:11749:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:11406:44: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *sd_parent @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11406:44: sparse: expected struct sched_domain *sd_parent kernel/sched/fair.c:11406:44: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:11845:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:11845:9: sparse: expected struct sched_domain *[assigned] sd kernel/sched/fair.c:11845:9: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c:2965:9: sparse: sparse: context imbalance in 'task_numa_placement' - different lock contexts for basic block kernel/sched/fair.c:7047:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:7047:28: sparse: expected struct sched_domain *sd kernel/sched/fair.c:7047:28: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:7053:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:7053:28: sparse: expected struct sched_domain *sd kernel/sched/fair.c:7053:28: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:7060:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/fair.c:7060:28: sparse: expected struct sched_domain *sd kernel/sched/fair.c:7060:28: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/fair.c:7068:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/fair.c:7068:17: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/fair.c:7068:17: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/fair.c: note: in included file: kernel/sched/sched.h:2309:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2309:9: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2309:9: sparse: struct task_struct * kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * kernel/sched/sched.h:2145:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/sched.h:2145:25: sparse: struct task_struct [noderef] __rcu * kernel/sched/sched.h:2145:25: sparse: struct task_struct * vim +/sysctl_overload_detect_period +143 kernel/sched/fair.c 139 140 static DEFINE_PER_CPU_SHARED_ALIGNED(struct list_head, qos_throttled_cfs_rq); 141 static DEFINE_PER_CPU_SHARED_ALIGNED(struct hrtimer, qos_overload_timer); 142 static DEFINE_PER_CPU(int, qos_cpu_overload); > 143 unsigned int sysctl_overload_detect_period = 5000; /* in ms */ > 144 unsigned int sysctl_offline_wait_interval = 100; /* in ms */ 145 static int one_thousand = 1000; 146 static int hundred_thousand = 100000; 147 static int unthrottle_qos_cfs_rqs(int cpu); 148 #endif 149 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/livepatch/core.c:97:12: warning: no previous prototype for function 'arch_klp_init_func'
by kernel test robot 15 Dec '25

15 Dec '25
Hi Zheng, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: eabc33c6f2c91168537f10e9275b0921c9f78c45 [3541/3541] livepatch/ppc64: Implement livepatch without ftrace for ppc64be config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150621.RknROZUX-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150621.RknROZUX-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/202512150621.RknROZUX-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/livepatch/core.c:97:12: warning: no previous prototype for function 'arch_klp_init_func' [-Wmissing-prototypes] 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ kernel/livepatch/core.c:97:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 97 | int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ | static kernel/livepatch/core.c:1756:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1756 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1756:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1756 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static kernel/livepatch/core.c:2011:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 2011 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:2011:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2011 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static kernel/livepatch/core.c:2016:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 2016 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:2016:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2016 | void __weak arch_klp_mem_free(void *mem) | ^ | static kernel/livepatch/core.c:2021:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 2021 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:2021:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2021 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:2025:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 2025 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:2025:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2025 | void __weak arch_klp_code_modify_post_process(void) | ^ | static kernel/livepatch/core.c:2038:12: warning: no previous prototype for function 'arch_klp_check_breakpoint' [-Wmissing-prototypes] 2038 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2038:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2038 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static kernel/livepatch/core.c:2052:13: warning: no previous prototype for function 'arch_klp_set_brk_func' [-Wmissing-prototypes] 2052 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ kernel/livepatch/core.c:2052:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2052 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ | static 8 warnings generated. vim +/arch_klp_init_func +97 kernel/livepatch/core.c 96 > 97 int __weak arch_klp_init_func(struct klp_object *obj, struct klp_func *func) 98 { 99 return 0; 100 } 101 #endif /* CONFIG_LIVEPATCH_FTRACE */ 102 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/livepatch/core.c:2006:12: warning: no previous prototype for function 'arch_klp_check_breakpoint'
by kernel test robot 15 Dec '25

15 Dec '25
Hi Zheng, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: 470628a716984e1325b92bef4fa2140ff5a062a5 [3541/3541] livepatch: Use breakpoint exception to optimize enabling livepatch config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150445.9iffkH6B-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150445.9iffkH6B-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/202512150445.9iffkH6B-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/livepatch/core.c:1728:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1728 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1728:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1728 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static kernel/livepatch/core.c:1983:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 1983 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:1983:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1983 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static kernel/livepatch/core.c:1988:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 1988 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:1988:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1988 | void __weak arch_klp_mem_free(void *mem) | ^ | static kernel/livepatch/core.c:1993:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 1993 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:1993:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1993 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:1997:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 1997 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:1997:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1997 | void __weak arch_klp_code_modify_post_process(void) | ^ | static >> kernel/livepatch/core.c:2006:12: warning: no previous prototype for function 'arch_klp_check_breakpoint' [-Wmissing-prototypes] 2006 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2006:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2006 | int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static kernel/livepatch/core.c:2011:12: warning: no previous prototype for function 'arch_klp_add_breakpoint' [-Wmissing-prototypes] 2011 | int __weak arch_klp_add_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2011:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2011 | int __weak arch_klp_add_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static kernel/livepatch/core.c:2016:13: warning: no previous prototype for function 'arch_klp_remove_breakpoint' [-Wmissing-prototypes] 2016 | void __weak arch_klp_remove_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ kernel/livepatch/core.c:2016:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2016 | void __weak arch_klp_remove_breakpoint(struct arch_klp_data *arch_data, void *old_func) | ^ | static >> kernel/livepatch/core.c:2020:13: warning: no previous prototype for function 'arch_klp_set_brk_func' [-Wmissing-prototypes] 2020 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ kernel/livepatch/core.c:2020:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2020 | void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) | ^ | static 9 warnings generated. vim +/arch_klp_check_breakpoint +2006 kernel/livepatch/core.c 2005 > 2006 int __weak arch_klp_check_breakpoint(struct arch_klp_data *arch_data, void *old_func) 2007 { 2008 return 0; 2009 } 2010 2011 int __weak arch_klp_add_breakpoint(struct arch_klp_data *arch_data, void *old_func) 2012 { 2013 return -EOPNOTSUPP; 2014 } 2015 2016 void __weak arch_klp_remove_breakpoint(struct arch_klp_data *arch_data, void *old_func) 2017 { 2018 } 2019 > 2020 void __weak arch_klp_set_brk_func(struct klp_func_node *func_node, void *new_func) 2021 { 2022 func_node->brk_func = new_func; 2023 } 2024 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/module/strict_rwx.c:36:6: warning: no previous prototype for function 'module_disable_ro'
by kernel test robot 15 Dec '25

15 Dec '25
Hi Zheng, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: c8783f92771c891518257c9deb22cd91d4e1a212 [3541/3541] livepatch/core: Revert module_enable_ro and module_disable_ro config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150222.mwnNlqrD-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150222.mwnNlqrD-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/202512150222.mwnNlqrD-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/module/strict_rwx.c:36:6: warning: no previous prototype for function 'module_disable_ro' [-Wmissing-prototypes] 36 | void module_disable_ro(const struct module *mod) | ^ kernel/module/strict_rwx.c:36:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 36 | void module_disable_ro(const struct module *mod) | ^ | static 1 warning generated. vim +/module_disable_ro +36 kernel/module/strict_rwx.c 34 35 #ifdef CONFIG_LIVEPATCH_WO_FTRACE > 36 void module_disable_ro(const struct module *mod) 37 { 38 if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX)) 39 return; 40 #ifdef CONFIG_STRICT_MODULE_RWX 41 if (!rodata_enabled) 42 return; 43 #endif 44 45 module_set_memory(mod, MOD_TEXT, set_memory_rw); 46 module_set_memory(mod, MOD_INIT_TEXT, set_memory_rw); 47 module_set_memory(mod, MOD_RODATA, set_memory_rw); 48 module_set_memory(mod, MOD_INIT_RODATA, set_memory_rw); 49 } 50 #endif /* CONFIG_LIVEPATCH_WO_FTRACE */ 51 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] error: unknown target ABI 'ilp32'
by kernel test robot 15 Dec '25

15 Dec '25
Hi Andrew, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: f9b54a6714445cde83aeff0318cf767b3b81229d [3541/3541] arm64:ilp32: add ARM64_ILP32 to Kconfig config: arm64-randconfig-r131-20251213 (https://download.01.org/0day-ci/archive/20251215/202512150148.bF5oIxkA-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150148.bF5oIxkA-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/202512150148.bF5oIxkA-lkp@intel.com/ All errors (new ones prefixed by >>): arch/arm64/kernel/vdso-ilp32/Makefile:84: FORCE prerequisite is missing arch/arm64/kernel/vdso-ilp32/Makefile:87: FORCE prerequisite is missing arch/arm64/kernel/vdso-ilp32/Makefile:90: FORCE prerequisite is missing >> error: unknown target ABI 'ilp32' make[3]: *** [scripts/Makefile.build:373: arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds] Error 1 clang: error: -Wl,-soname=linux-ilp32-vdso.so.1: 'linker' input unused [-Werror,-Wunused-command-line-argument] make[3]: *** [arch/arm64/kernel/vdso-ilp32/Makefile:84: arch/arm64/kernel/vdso-ilp32/vgettimeofday-ilp32.o] Error 1 >> error: unknown target ABI 'ilp32' >> error: unknown target ABI 'ilp32' make[3]: *** [arch/arm64/kernel/vdso-ilp32/Makefile:87: arch/arm64/kernel/vdso-ilp32/note-ilp32.o] Error 1 make[3]: *** [arch/arm64/kernel/vdso-ilp32/Makefile:90: arch/arm64/kernel/vdso-ilp32/sigreturn-ilp32.o] Error 1 make[3]: Target 'include/generated/vdso-ilp32-offsets.h' not remade because of errors. make[2]: *** [arch/arm64/Makefile:201: vdso_prepare] Error 2 make[2]: Target 'prepare' not remade because of errors. make[1]: *** [Makefile:234: __sub-make] Error 2 make[1]: Target 'prepare' not remade because of errors. make: *** [Makefile:234: __sub-make] Error 2 make: Target 'prepare' not remade because of errors. -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/livepatch/core.c:1689:12: warning: no previous prototype for function 'arch_klp_check_activeness_func'
by kernel test robot 15 Dec '25

15 Dec '25
Hi Zheng, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: 8c7d888bedbc3642dcfa0ae682bb9fb2337de170 [3541/3541] livepatch/arm64: Support livepatch without ftrace config: arm64-randconfig-001-20251212 (https://download.01.org/0day-ci/archive/20251215/202512150123.LJIfaupb-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251215/202512150123.LJIfaupb-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/202512150123.LJIfaupb-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/livepatch/core.c:1689:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1689 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1689:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1689 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static >> kernel/livepatch/core.c:1913:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 1913 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:1913:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1913 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static >> kernel/livepatch/core.c:1918:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 1918 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:1918:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1918 | void __weak arch_klp_mem_free(void *mem) | ^ | static >> kernel/livepatch/core.c:1923:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 1923 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:1923:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1923 | void __weak arch_klp_code_modify_prepare(void) | ^ | static >> kernel/livepatch/core.c:1927:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 1927 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:1927:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1927 | void __weak arch_klp_code_modify_post_process(void) | ^ | static 5 warnings generated. vim +/arch_klp_check_activeness_func +1689 kernel/livepatch/core.c 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1688 583e6e55fb6aa19 Zheng Yejian 2023-12-23 @1689 int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1690 klp_add_func_t add_func, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1691 struct list_head *func_list) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1692 { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1693 int ret; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1694 unsigned long func_addr = 0; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1695 unsigned long func_size; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1696 struct klp_func_node *func_node = NULL; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1697 unsigned long old_func = (unsigned long)func->old_func; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1698 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1699 func_node = func->func_node; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1700 /* Check func address in stack */ 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1701 if (enable) { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1702 if (func->patched || func->force == KLP_ENFORCEMENT) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1703 return 0; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1704 /* 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1705 * When enable, checking the currently active functions. 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1706 */ 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1707 if (list_empty(&func_node->func_stack)) { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1708 /* 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1709 * Not patched on this function [the origin one] 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1710 */ 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1711 func_addr = old_func; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1712 func_size = func->old_size; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1713 } else { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1714 /* 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1715 * Previously patched function [the active one] 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1716 */ 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1717 struct klp_func *prev; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1718 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1719 prev = list_first_or_null_rcu(&func_node->func_stack, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1720 struct klp_func, stack_node); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1721 func_addr = (unsigned long)prev->new_func; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1722 func_size = prev->new_size; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1723 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1724 /* 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1725 * When preemption is disabled and the replacement area 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1726 * does not contain a jump instruction, the migration 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1727 * thread is scheduled to run stop machine only after the 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1728 * execution of instructions to be replaced is complete. 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1729 */ 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1730 if (IS_ENABLED(CONFIG_PREEMPTION) || 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1731 (func->force == KLP_NORMAL_FORCE) || 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1732 arch_check_jump_insn(func_addr)) { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1733 ret = add_func(func_list, func_addr, func_size, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1734 func->old_name, func->force); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1735 if (ret) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1736 return ret; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1737 if (func_addr != old_func) { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1738 ret = add_func(func_list, old_func, KLP_MAX_REPLACE_SIZE, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1739 func->old_name, func->force); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1740 if (ret) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1741 return ret; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1742 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1743 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1744 } else { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1745 #ifdef CONFIG_PREEMPTION 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1746 /* 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1747 * No scheduling point in the replacement instructions. Therefore, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1748 * when preemption is not enabled, atomic execution is performed 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1749 * and these instructions will not appear on the stack. 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1750 */ 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1751 if (list_is_singular(&func_node->func_stack)) { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1752 func_addr = old_func; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1753 func_size = func->old_size; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1754 } else { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1755 struct klp_func *prev; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1756 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1757 prev = list_first_or_null_rcu( 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1758 &func_node->func_stack, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1759 struct klp_func, stack_node); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1760 func_addr = (unsigned long)prev->new_func; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1761 func_size = prev->new_size; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1762 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1763 ret = add_func(func_list, func_addr, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1764 func_size, func->old_name, 0); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1765 if (ret) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1766 return ret; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1767 if (func_addr != old_func) { 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1768 ret = add_func(func_list, old_func, KLP_MAX_REPLACE_SIZE, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1769 func->old_name, 0); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1770 if (ret) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1771 return ret; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1772 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1773 #endif 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1774 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1775 func_addr = (unsigned long)func->new_func; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1776 func_size = func->new_size; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1777 ret = add_func(func_list, func_addr, 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1778 func_size, func->old_name, 0); 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1779 if (ret) 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1780 return ret; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1781 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1782 return 0; 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1783 } 583e6e55fb6aa19 Zheng Yejian 2023-12-23 1784 :::::: The code at line 1689 was first introduced by commit :::::: 583e6e55fb6aa193b1a82909069e8028c5d5653d livepatch/x86: Support livepatch without ftrace :::::: TO: Zheng Yejian <zhengyejian1(a)huawei.com> :::::: CC: Zheng Yejian <zhengyejian1(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3541/3541] kernel/sched/topology.c:2310:32: sparse: sparse: incorrect type in initializer (different base types)
by kernel test robot 14 Dec '25

14 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: 0ccb3f810722de634beed0dc6fe5c59d963b4c50 [3541/3541] sched/topology: Provide cfs_overload_cpus bitmap config: arm64-randconfig-r113-20251213 (https://download.01.org/0day-ci/archive/20251214/202512141633.L3GKJfV1-lkp@…) compiler: aarch64-linux-gcc (GCC) 12.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251214/202512141633.L3GKJfV1-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/202512141633.L3GKJfV1-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) kernel/sched/build_utility.c: note: in included file: kernel/sched/stop_task.c:73:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@ kernel/sched/stop_task.c:73:38: sparse: expected struct task_struct *curr kernel/sched/stop_task.c:73:38: sparse: got struct task_struct [noderef] __rcu *curr kernel/sched/build_utility.c: note: in included file: >> kernel/sched/topology.c:2310:32: sparse: sparse: incorrect type in initializer (different base types) @@ expected int flags @@ got restricted gfp_t @@ kernel/sched/topology.c:2310:32: sparse: expected int flags kernel/sched/topology.c:2310:32: sparse: got restricted gfp_t >> kernel/sched/topology.c:2318:61: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted gfp_t [usertype] flags @@ got int flags @@ kernel/sched/topology.c:2318:61: sparse: expected restricted gfp_t [usertype] flags kernel/sched/topology.c:2318:61: sparse: got int flags kernel/sched/topology.c:2346:58: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:2346:58: sparse: expected struct sched_domain *[assigned] sd kernel/sched/topology.c:2346:58: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:491:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct perf_domain *pd @@ got struct perf_domain [noderef] __rcu *pd @@ kernel/sched/topology.c:491:19: sparse: expected struct perf_domain *pd kernel/sched/topology.c:491:19: sparse: got struct perf_domain [noderef] __rcu *pd kernel/sched/topology.c:655:49: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *parent @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:655:49: sparse: expected struct sched_domain *parent kernel/sched/topology.c:655:49: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:702:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:702:9: sparse: struct sparsemask [noderef] __rcu * kernel/sched/topology.c:702:9: sparse: struct sparsemask * kernel/sched/topology.c:730:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *parent @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:730:50: sparse: expected struct sched_domain *parent kernel/sched/topology.c:730:50: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:738:55: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain [noderef] __rcu *[noderef] __rcu child @@ got struct sched_domain *[assigned] tmp @@ kernel/sched/topology.c:738:55: sparse: expected struct sched_domain [noderef] __rcu *[noderef] __rcu child kernel/sched/topology.c:738:55: sparse: got struct sched_domain *[assigned] tmp kernel/sched/topology.c:751:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:751:29: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/topology.c:751:29: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:756:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:756:20: sparse: expected struct sched_domain *sd kernel/sched/topology.c:756:20: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:777:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *sd @@ kernel/sched/topology.c:777:13: sparse: expected struct sched_domain *[assigned] tmp kernel/sched/topology.c:777:13: sparse: got struct sched_domain [noderef] __rcu *sd kernel/sched/topology.c:939:70: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:939:70: sparse: expected struct sched_domain *sd kernel/sched/topology.c:939:70: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:968:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:968:59: sparse: expected struct sched_domain *sd kernel/sched/topology.c:968:59: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1014:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:1014:57: sparse: expected struct sched_domain *sd kernel/sched/topology.c:1014:57: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1016:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sibling @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:1016:25: sparse: expected struct sched_domain *sibling kernel/sched/topology.c:1016:25: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1024:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:1024:55: sparse: expected struct sched_domain *sd kernel/sched/topology.c:1024:55: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1026:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sibling @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:1026:25: sparse: expected struct sched_domain *sibling kernel/sched/topology.c:1026:25: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1096:62: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:1096:62: sparse: expected struct sched_domain *sd kernel/sched/topology.c:1096:62: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1200:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:1200:40: sparse: expected struct sched_domain *child kernel/sched/topology.c:1200:40: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1620:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain [noderef] __rcu *child @@ got struct sched_domain *child @@ kernel/sched/topology.c:1620:43: sparse: expected struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:1620:43: sparse: got struct sched_domain *child kernel/sched/topology.c:1758:21: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:1758:21: sparse: int [noderef] __rcu * kernel/sched/topology.c:1758:21: sparse: int * kernel/sched/topology.c:1884:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:1884:9: sparse: int [noderef] __rcu * kernel/sched/topology.c:1884:9: sparse: int * kernel/sched/topology.c:1939:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:1939:9: sparse: struct cpumask **[noderef] __rcu * kernel/sched/topology.c:1939:9: sparse: struct cpumask *** kernel/sched/topology.c:1997:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:1997:9: sparse: int [noderef] __rcu * kernel/sched/topology.c:1997:9: sparse: int * kernel/sched/topology.c:1999:9: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:1999:9: sparse: struct cpumask **[noderef] __rcu * kernel/sched/topology.c:1999:9: sparse: struct cpumask *** kernel/sched/topology.c:2083:17: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:2083:17: sparse: struct cpumask **[noderef] __rcu * kernel/sched/topology.c:2083:17: sparse: struct cpumask *** kernel/sched/topology.c:2150:19: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:2150:19: sparse: struct cpumask **[noderef] __rcu * kernel/sched/topology.c:2150:19: sparse: struct cpumask *** kernel/sched/topology.c:2190:17: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel/sched/topology.c:2190:17: sparse: struct cpumask **[noderef] __rcu * kernel/sched/topology.c:2190:17: sparse: struct cpumask *** kernel/sched/topology.c:2386:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain [noderef] __rcu *parent @@ got struct sched_domain *sd @@ kernel/sched/topology.c:2386:31: sparse: expected struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:2386:31: sparse: got struct sched_domain *sd kernel/sched/topology.c:2489:57: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:2489:57: sparse: expected struct sched_domain *[assigned] sd kernel/sched/topology.c:2489:57: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:2510:56: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@ kernel/sched/topology.c:2510:56: sparse: expected struct sched_domain *child kernel/sched/topology.c:2510:56: sparse: got struct sched_domain [noderef] __rcu *child kernel/sched/topology.c:2509:57: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:2509:57: sparse: expected struct sched_domain *[assigned] sd kernel/sched/topology.c:2509:57: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/topology.c:2564:57: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/topology.c:2564:57: sparse: expected struct sched_domain *[assigned] sd kernel/sched/topology.c:2564:57: sparse: got struct sched_domain [noderef] __rcu *parent kernel/sched/build_utility.c: note: in included file: kernel/sched/build_utility.c: note: in included file: kernel/sched/sched.h:1853:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@ kernel/sched/sched.h:1853:9: sparse: expected struct sched_domain *[assigned] sd vim +2310 kernel/sched/topology.c 2304 2305 static int sd_llc_alloc(struct sched_domain *sd) 2306 { 2307 struct sched_domain_shared *sds = sd->shared; 2308 struct cpumask *span = sched_domain_span(sd); 2309 int nid = cpu_to_node(cpumask_first(span)); > 2310 int flags = __GFP_ZERO | GFP_KERNEL; 2311 struct sparsemask *mask; 2312 2313 /* 2314 * Allocate the bitmap if not already allocated. This is called for 2315 * every CPU in the LLC but only allocates once per sd_llc_shared. 2316 */ 2317 if (!sds->cfs_overload_cpus) { > 2318 mask = sparsemask_alloc_node(nr_cpu_ids, 3, flags, nid); 2319 if (!mask) 2320 return 1; 2321 sds->cfs_overload_cpus = mask; 2322 } 2323 2324 return 0; 2325 } 2326 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD SUCCESS 5a399b91821faeec2466751db2d714b24f8eb17c
by kernel test robot 14 Dec '25

14 Dec '25
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: 5a399b91821faeec2466751db2d714b24f8eb17c !19535 fs/proc: fix uaf in proc_readdir_de() elapsed time: 1451m configs tested: 36 configs skipped: 10 The following configs have been built successfully. More configs may be tested in the coming days. tested configs: arm64 allmodconfig gcc-15.1.0 arm64 allnoconfig gcc-15.1.0 arm64 defconfig gcc-15.1.0 arm64 randconfig-001-20251213 gcc-14.3.0 arm64 randconfig-002-20251213 gcc-11.5.0 arm64 randconfig-003-20251213 gcc-11.5.0 arm64 randconfig-004-20251213 gcc-6.5.0 x86_64 allmodconfig clang-22 x86_64 allnoconfig clang-22 x86_64 allyesconfig clang-22 x86_64 buildonly-randconfig-001-20251213 clang-22 x86_64 buildonly-randconfig-002-20251213 clang-22 x86_64 buildonly-randconfig-003-20251213 clang-22 x86_64 buildonly-randconfig-004-20251213 clang-22 x86_64 buildonly-randconfig-005-20251213 gcc-14 x86_64 buildonly-randconfig-006-20251213 clang-22 x86_64 defconfig gcc-14 x86_64 randconfig-001-20251213 gcc-14 x86_64 randconfig-002-20251213 gcc-14 x86_64 randconfig-003-20251213 gcc-14 x86_64 randconfig-004-20251213 clang-22 x86_64 randconfig-005-20251213 gcc-14 x86_64 randconfig-006-20251213 clang-22 x86_64 randconfig-011-20251213 gcc-14 x86_64 randconfig-012-20251213 gcc-14 x86_64 randconfig-013-20251213 clang-22 x86_64 randconfig-014-20251213 clang-22 x86_64 randconfig-015-20251213 gcc-14 x86_64 randconfig-016-20251213 clang-22 x86_64 randconfig-071-20251213 clang-22 x86_64 randconfig-072-20251213 clang-22 x86_64 randconfig-073-20251213 clang-22 x86_64 randconfig-074-20251213 gcc-13 x86_64 randconfig-075-20251213 clang-22 x86_64 randconfig-076-20251213 gcc-14 x86_64 rhel-9.4-rust clang-22 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 2196
  • Older →

HyperKitty Powered by HyperKitty