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

  • 48 participants
  • 18255 discussions
[openeuler:OLK-6.6 2130/2130] arch/arm64/kvm/mmu.c:1665:21: warning: unused variable 'iss2'
by kernel test robot 17 Apr '25

17 Apr '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 58353f394bfe86212d5089bc9c1c235ffc761e2c commit: 8d2e1e3b26a99872309a1c2afa3f0f35f1102137 [2130/2130] arm64/config: add config to control whether enable HDBSS feature config: arm64-randconfig-001-20250417 (https://download.01.org/0day-ci/archive/20250417/202504170921.RaPjZtnT-lkp@…) compiler: aarch64-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504170921.RaPjZtnT-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/202504170921.RaPjZtnT-lkp@intel.com/ All warnings (new ones prefixed by >>): arch/arm64/kvm/mmu.c: In function 'kvm_handle_guest_abort': >> arch/arm64/kvm/mmu.c:1665:21: warning: unused variable 'iss2' [-Wunused-variable] unsigned long hva, iss2; ^~~~ -- arch/arm64/kvm/reset.c: In function 'kvm_arm_vcpu_destroy': >> arch/arm64/kvm/reset.c:165:15: warning: unused variable 'hdbss_pg' [-Wunused-variable] struct page *hdbss_pg; ^~~~~~~~ vim +/iss2 +1665 arch/arm64/kvm/mmu.c aeda9130c38e2e arch/arm/kvm/mmu.c Marc Zyngier 2015-03-12 1648 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1649 /** 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1650 * kvm_handle_guest_abort - handles all 2nd stage aborts 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1651 * @vcpu: the VCPU pointer 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1652 * 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1653 * Any abort that gets to the host is almost guaranteed to be caused by a 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1654 * missing second stage translation table entry, which can mean that either the 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1655 * guest simply needs more memory and we must allocate an appropriate page or it 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1656 * can mean that the guest tried to access I/O memory, which is emulated by user 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1657 * space. The distinction is based on the IPA causing the fault and whether this 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1658 * memory region has been registered as standard RAM by user space. 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1659 */ 74cc7e0c35c1e4 arch/arm64/kvm/mmu.c Tianjia Zhang 2020-06-23 1660 int kvm_handle_guest_abort(struct kvm_vcpu *vcpu) 342cd0ab0e6ca3 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1661 { 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1662 unsigned long fault_status; 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1663 phys_addr_t fault_ipa; 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1664 struct kvm_memory_slot *memslot; 6d60015590c3f5 arch/arm64/kvm/mmu.c eillon 2025-04-02 @1665 unsigned long hva, iss2; 98047888bb9fd5 arch/arm/kvm/mmu.c Christoffer Dall 2014-08-19 1666 bool is_iabt, write_fault, writable; 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1667 gfn_t gfn; 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1668 int ret, idx; 94f8e6418d3915 arch/arm/kvm/mmu.c Christoffer Dall 2013-01-20 1669 621f48e40ee9b0 virt/kvm/arm/mmu.c Tyler Baicar 2017-06-21 1670 fault_status = kvm_vcpu_trap_get_fault_type(vcpu); 621f48e40ee9b0 virt/kvm/arm/mmu.c Tyler Baicar 2017-06-21 1671 621f48e40ee9b0 virt/kvm/arm/mmu.c Tyler Baicar 2017-06-21 1672 fault_ipa = kvm_vcpu_get_fault_ipa(vcpu); bb428921b777a5 virt/kvm/arm/mmu.c James Morse 2017-07-18 1673 is_iabt = kvm_vcpu_trap_is_iabt(vcpu); 621f48e40ee9b0 virt/kvm/arm/mmu.c Tyler Baicar 2017-06-21 1674 :::::: The code at line 1665 was first introduced by commit :::::: 6d60015590c3f56b0188b2409cfb3ad9e05ded00 arm64/kvm: support to handle the HDBSSF event :::::: TO: eillon <yezhenyu2(a)huawei.com> :::::: CC: Zhenyu Ye <yezhenyu2(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2862/2862] fs/erofs/fscache.o: warning: objtool: erofs_fscache_release_page()+0x55: unreachable instruction
by kernel test robot 17 Apr '25

17 Apr '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 2affea8965688b8231cf977864ba7539320d5db8 commit: f18ca5e7c9d96c676424c3a36c121697e477ac20 [2862/2862] erofs: implement fscache-based metadata read config: x86_64-buildonly-randconfig-005-20250415 (https://download.01.org/0day-ci/archive/20250417/202504170830.iw6x6XXN-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504170830.iw6x6XXN-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/202504170830.iw6x6XXN-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/erofs/fscache.o: warning: objtool: erofs_fscache_release_page()+0x55: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2130/2130] kernel/sched/psi.c:1262:6: warning: 'psi_account_irqtime' defined but not used
by kernel test robot 17 Apr '25

17 Apr '25
Hi Lu, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 58353f394bfe86212d5089bc9c1c235ffc761e2c commit: 654944510822988390470cbc5b6f914c19dd9b88 [2130/2130] sched/psi: add cpu fine grained stall tracking in pressure.stat config: arm64-randconfig-001-20250417 (https://download.01.org/0day-ci/archive/20250417/202504170110.nEONpqWt-lkp@…) compiler: aarch64-linux-gcc (GCC) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504170110.nEONpqWt-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/202504170110.nEONpqWt-lkp@intel.com/ All warnings (new ones prefixed by >>): ^ include/linux/init.h:343:32: note: in definition of macro '__setup_param' = { __setup_str_##unique_id, fn, early } ^~ kernel/sched/autogroup.c:227:1: note: in expansion of macro '__setup' __setup("noautogroup", setup_autogroup); ^~~~~~~ kernel/sched/build_utility.c:110:0: error: expected declaration or statement at end of input #endif In file included from kernel/sched/build_utility.c:97:0: kernel/sched/build_utility.c: At top level: kernel/sched/psi.c:178:13: warning: 'psi_avgs_work' used but never defined static void psi_avgs_work(struct work_struct *work); ^~~~~~~~~~~~~ kernel/sched/psi.c:180:13: warning: 'poll_timer_fn' used but never defined static void poll_timer_fn(struct timer_list *t); ^~~~~~~~~~~~~ In file included from kernel/sched/build_utility.c:109:0: kernel/sched/autogroup.c:285:5: warning: 'autogroup_path' defined but not used [-Wunused-function] int autogroup_path(struct task_group *tg, char *buf, int buflen) ^~~~~~~~~~~~~~ kernel/sched/autogroup.c:269:6: warning: 'proc_sched_autogroup_show_task' defined but not used [-Wunused-function] void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/autogroup.c:231:5: warning: 'proc_sched_autogroup_set_nice' defined but not used [-Wunused-function] int proc_sched_autogroup_set_nice(struct task_struct *p, int nice) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/autogroup.c:216:6: warning: 'sched_autogroup_exit' defined but not used [-Wunused-function] void sched_autogroup_exit(struct signal_struct *sig) ^~~~~~~~~~~~~~~~~~~~ kernel/sched/autogroup.c:211:6: warning: 'sched_autogroup_fork' defined but not used [-Wunused-function] void sched_autogroup_fork(struct signal_struct *sig) ^~~~~~~~~~~~~~~~~~~~ kernel/sched/autogroup.c:147:6: warning: 'sched_autogroup_exit_task' defined but not used [-Wunused-function] void sched_autogroup_exit_task(struct task_struct *p) ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/autogroup.c:129:6: warning: 'task_wants_autogroup' defined but not used [-Wunused-function] bool task_wants_autogroup(struct task_struct *p, struct task_group *tg) ^~~~~~~~~~~~~~~~~~~~ kernel/sched/autogroup.c:42:6: warning: 'autogroup_free' defined but not used [-Wunused-function] void autogroup_free(struct task_group *tg) ^~~~~~~~~~~~~~ kernel/sched/autogroup.c:33:13: warning: 'autogroup_init' defined but not used [-Wunused-function] void __init autogroup_init(struct task_struct *init_task) ^~~~~~~~~~~~~~ In file included from include/linux/compat.h:34:0, from arch/arm64/include/asm/elf.h:9, from include/linux/elf.h:6, from include/linux/module.h:19, from include/linux/device/driver.h:21, from include/linux/device.h:32, from include/linux/node.h:18, from include/linux/cpu.h:17, from include/linux/cpufreq.h:12, from kernel/sched/build_utility.c:22: arch/arm64/include/asm/syscall_wrapper.h:62:14: warning: '__se_sys_membarrier' defined but not used [-Wunused-function] static long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ ^ include/linux/syscalls.h:230:2: note: in expansion of macro '__SYSCALL_DEFINEx' __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^~~~~~~~~~~~~~~~~ include/linux/syscalls.h:221:36: note: in expansion of macro 'SYSCALL_DEFINEx' #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) ^~~~~~~~~~~~~~~ kernel/sched/membarrier.c:614:1: note: in expansion of macro 'SYSCALL_DEFINE3' SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id) ^~~~~~~~~~~~~~~ arch/arm64/include/asm/syscall_wrapper.h:58:18: warning: '__arm64_sys_membarrier' defined but not used [-Wunused-function] asmlinkage long __arm64_sys##name(const struct pt_regs *regs) \ ^ include/linux/syscalls.h:230:2: note: in expansion of macro '__SYSCALL_DEFINEx' __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^~~~~~~~~~~~~~~~~ include/linux/syscalls.h:221:36: note: in expansion of macro 'SYSCALL_DEFINEx' #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) ^~~~~~~~~~~~~~~ kernel/sched/membarrier.c:614:1: note: in expansion of macro 'SYSCALL_DEFINE3' SYSCALL_DEFINE3(membarrier, int, cmd, unsigned int, flags, int, cpu_id) ^~~~~~~~~~~~~~~ In file included from kernel/sched/build_utility.c:101:0: kernel/sched/membarrier.c:233:6: warning: 'membarrier_update_current_mm' defined but not used [-Wunused-function] void membarrier_update_current_mm(struct mm_struct *next_mm) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/sched/membarrier.c:217:6: warning: 'membarrier_exec_mmap' defined but not used [-Wunused-function] void membarrier_exec_mmap(struct mm_struct *mm) ^~~~~~~~~~~~~~~~~~~~ In file included from kernel/sched/build_utility.c:97:0: kernel/sched/psi.c:1471:6: warning: 'psi_cgroup_restart' defined but not used [-Wunused-function] void psi_cgroup_restart(struct psi_group *group) ^~~~~~~~~~~~~~~~~~ kernel/sched/psi.c:1416:6: warning: 'cgroup_move_task' defined but not used [-Wunused-function] void cgroup_move_task(struct task_struct *task, struct css_set *to) ^~~~~~~~~~~~~~~~ kernel/sched/psi.c:1392:6: warning: 'psi_cgroup_free' defined but not used [-Wunused-function] void psi_cgroup_free(struct cgroup *cgroup) ^~~~~~~~~~~~~~~ kernel/sched/psi.c:1373:5: warning: 'psi_cgroup_alloc' defined but not used [-Wunused-function] int psi_cgroup_alloc(struct cgroup *cgroup) ^~~~~~~~~~~~~~~~ >> kernel/sched/psi.c:1262:6: warning: 'psi_account_irqtime' defined but not used [-Wunused-function] void psi_account_irqtime(struct task_struct *task, u32 delta) ^~~~~~~~~~~~~~~~~~~ kernel/sched/psi.c:1168:6: warning: 'psi_task_switch' defined but not used [-Wunused-function] void psi_task_switch(struct task_struct *prev, struct task_struct *next, ^~~~~~~~~~~~~~~ kernel/sched/psi.c:949:13: warning: 'poll_timer_fn' defined but not used [-Wunused-function] static void poll_timer_fn(struct timer_list *t) ^~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/psi_account_irqtime +1262 kernel/sched/psi.c eb414681d5a07d Johannes Weiner 2018-10-26 1260 52b1364ba0b105 Chengming Zhou 2022-08-26 1261 #ifdef CONFIG_IRQ_TIME_ACCOUNTING 52b1364ba0b105 Chengming Zhou 2022-08-26 @1262 void psi_account_irqtime(struct task_struct *task, u32 delta) 52b1364ba0b105 Chengming Zhou 2022-08-26 1263 { 52b1364ba0b105 Chengming Zhou 2022-08-26 1264 int cpu = task_cpu(task); 52b1364ba0b105 Chengming Zhou 2022-08-26 1265 struct psi_group *group; 52b1364ba0b105 Chengming Zhou 2022-08-26 1266 struct psi_group_cpu *groupc; 52b1364ba0b105 Chengming Zhou 2022-08-26 1267 u64 now; 52b1364ba0b105 Chengming Zhou 2022-08-26 1268 c4069ab39e78c5 Haifeng Xu 2024-01-04 1269 if (static_branch_likely(&psi_disabled)) c4069ab39e78c5 Haifeng Xu 2024-01-04 1270 return; c4069ab39e78c5 Haifeng Xu 2024-01-04 1271 52b1364ba0b105 Chengming Zhou 2022-08-26 1272 if (!task->pid) 52b1364ba0b105 Chengming Zhou 2022-08-26 1273 return; 52b1364ba0b105 Chengming Zhou 2022-08-26 1274 52b1364ba0b105 Chengming Zhou 2022-08-26 1275 now = cpu_clock(cpu); 52b1364ba0b105 Chengming Zhou 2022-08-26 1276 dc86aba751e286 Chengming Zhou 2022-08-26 1277 group = task_psi_group(task); dc86aba751e286 Chengming Zhou 2022-08-26 1278 do { 34f26a15611afb Chengming Zhou 2022-09-07 1279 if (!group->enabled) 34f26a15611afb Chengming Zhou 2022-09-07 1280 continue; 34f26a15611afb Chengming Zhou 2022-09-07 1281 52b1364ba0b105 Chengming Zhou 2022-08-26 1282 groupc = per_cpu_ptr(group->pcpu, cpu); 52b1364ba0b105 Chengming Zhou 2022-08-26 1283 52b1364ba0b105 Chengming Zhou 2022-08-26 1284 write_seqcount_begin(&groupc->seq); 52b1364ba0b105 Chengming Zhou 2022-08-26 1285 52b1364ba0b105 Chengming Zhou 2022-08-26 1286 record_times(groupc, now); 52b1364ba0b105 Chengming Zhou 2022-08-26 1287 groupc->times[PSI_IRQ_FULL] += delta; 52b1364ba0b105 Chengming Zhou 2022-08-26 1288 52b1364ba0b105 Chengming Zhou 2022-08-26 1289 write_seqcount_end(&groupc->seq); 52b1364ba0b105 Chengming Zhou 2022-08-26 1290 65457b74aa9437 Domenico Cerasuolo 2023-03-30 1291 if (group->rtpoll_states & (1 << PSI_IRQ_FULL)) 65457b74aa9437 Domenico Cerasuolo 2023-03-30 1292 psi_schedule_rtpoll_work(group, 1, false); dc86aba751e286 Chengming Zhou 2022-08-26 1293 } while ((group = group->parent)); 52b1364ba0b105 Chengming Zhou 2022-08-26 1294 } 52b1364ba0b105 Chengming Zhou 2022-08-26 1295 #endif 52b1364ba0b105 Chengming Zhou 2022-08-26 1296 eb414681d5a07d Johannes Weiner 2018-10-26 1297 /** eb414681d5a07d Johannes Weiner 2018-10-26 1298 * psi_memstall_enter - mark the beginning of a memory stall section a65983d90bfb5e Lu Jialin 2024-01-04 1299 * @flags: flags to handle nested sections. When the memory pressure a65983d90bfb5e Lu Jialin 2024-01-04 1300 * is stalled in pressure_stat, the flags will be the pressure source, a65983d90bfb5e Lu Jialin 2024-01-04 1301 * Otherwise, the init flags should be zero. eb414681d5a07d Johannes Weiner 2018-10-26 1302 * eb414681d5a07d Johannes Weiner 2018-10-26 1303 * Marks the calling task as being stalled due to a lack of memory, eb414681d5a07d Johannes Weiner 2018-10-26 1304 * such as waiting for a refault or performing reclaim. eb414681d5a07d Johannes Weiner 2018-10-26 1305 */ eb414681d5a07d Johannes Weiner 2018-10-26 1306 void psi_memstall_enter(unsigned long *flags) eb414681d5a07d Johannes Weiner 2018-10-26 1307 { eb414681d5a07d Johannes Weiner 2018-10-26 1308 struct rq_flags rf; eb414681d5a07d Johannes Weiner 2018-10-26 1309 struct rq *rq; a65983d90bfb5e Lu Jialin 2024-01-04 1310 #ifdef CONFIG_PSI_FINE_GRAINED a65983d90bfb5e Lu Jialin 2024-01-04 1311 unsigned long stat_flags = *flags; a65983d90bfb5e Lu Jialin 2024-01-04 1312 #endif eb414681d5a07d Johannes Weiner 2018-10-26 1313 e0c274472d5d27 Johannes Weiner 2018-11-30 1314 if (static_branch_likely(&psi_disabled)) eb414681d5a07d Johannes Weiner 2018-10-26 1315 return; eb414681d5a07d Johannes Weiner 2018-10-26 1316 1066d1b6974e09 Yafang Shao 2020-03-16 1317 *flags = current->in_memstall; eb414681d5a07d Johannes Weiner 2018-10-26 1318 if (*flags) eb414681d5a07d Johannes Weiner 2018-10-26 1319 return; 3dfdd2f9d0dbe7 Lu Jialin 2024-01-02 1320 3dfdd2f9d0dbe7 Lu Jialin 2024-01-02 1321 trace_psi_memstall_enter(_RET_IP_); eb414681d5a07d Johannes Weiner 2018-10-26 1322 /* 1066d1b6974e09 Yafang Shao 2020-03-16 1323 * in_memstall setting & accounting needs to be atomic wrt eb414681d5a07d Johannes Weiner 2018-10-26 1324 * changes to the task's scheduling state, otherwise we can eb414681d5a07d Johannes Weiner 2018-10-26 1325 * race with CPU migration. eb414681d5a07d Johannes Weiner 2018-10-26 1326 */ eb414681d5a07d Johannes Weiner 2018-10-26 1327 rq = this_rq_lock_irq(&rf); eb414681d5a07d Johannes Weiner 2018-10-26 1328 1066d1b6974e09 Yafang Shao 2020-03-16 1329 current->in_memstall = 1; a65983d90bfb5e Lu Jialin 2024-01-04 1330 #ifdef CONFIG_PSI_FINE_GRAINED a65983d90bfb5e Lu Jialin 2024-01-04 1331 if (stat_flags) a65983d90bfb5e Lu Jialin 2024-01-04 1332 current->memstall_type = stat_flags; a65983d90bfb5e Lu Jialin 2024-01-04 1333 #endif cb0e52b7748737 Brian Chen 2021-11-10 1334 psi_task_change(current, 0, TSK_MEMSTALL | TSK_MEMSTALL_RUNNING); eb414681d5a07d Johannes Weiner 2018-10-26 1335 eb414681d5a07d Johannes Weiner 2018-10-26 1336 rq_unlock_irq(rq, &rf); eb414681d5a07d Johannes Weiner 2018-10-26 1337 } 527eb453bbfe65 Christoph Hellwig 2022-09-15 1338 EXPORT_SYMBOL_GPL(psi_memstall_enter); eb414681d5a07d Johannes Weiner 2018-10-26 1339 eb414681d5a07d Johannes Weiner 2018-10-26 1340 /** eb414681d5a07d Johannes Weiner 2018-10-26 1341 * psi_memstall_leave - mark the end of an memory stall section eb414681d5a07d Johannes Weiner 2018-10-26 1342 * @flags: flags to handle nested memdelay sections eb414681d5a07d Johannes Weiner 2018-10-26 1343 * eb414681d5a07d Johannes Weiner 2018-10-26 1344 * Marks the calling task as no longer stalled due to lack of memory. eb414681d5a07d Johannes Weiner 2018-10-26 1345 */ eb414681d5a07d Johannes Weiner 2018-10-26 1346 void psi_memstall_leave(unsigned long *flags) eb414681d5a07d Johannes Weiner 2018-10-26 1347 { eb414681d5a07d Johannes Weiner 2018-10-26 1348 struct rq_flags rf; eb414681d5a07d Johannes Weiner 2018-10-26 1349 struct rq *rq; eb414681d5a07d Johannes Weiner 2018-10-26 1350 e0c274472d5d27 Johannes Weiner 2018-11-30 1351 if (static_branch_likely(&psi_disabled)) eb414681d5a07d Johannes Weiner 2018-10-26 1352 return; eb414681d5a07d Johannes Weiner 2018-10-26 1353 eb414681d5a07d Johannes Weiner 2018-10-26 1354 if (*flags) eb414681d5a07d Johannes Weiner 2018-10-26 1355 return; 3dfdd2f9d0dbe7 Lu Jialin 2024-01-02 1356 3dfdd2f9d0dbe7 Lu Jialin 2024-01-02 1357 trace_psi_memstall_leave(_RET_IP_); eb414681d5a07d Johannes Weiner 2018-10-26 1358 /* 1066d1b6974e09 Yafang Shao 2020-03-16 1359 * in_memstall clearing & accounting needs to be atomic wrt eb414681d5a07d Johannes Weiner 2018-10-26 1360 * changes to the task's scheduling state, otherwise we could eb414681d5a07d Johannes Weiner 2018-10-26 1361 * race with CPU migration. eb414681d5a07d Johannes Weiner 2018-10-26 1362 */ eb414681d5a07d Johannes Weiner 2018-10-26 1363 rq = this_rq_lock_irq(&rf); eb414681d5a07d Johannes Weiner 2018-10-26 1364 1066d1b6974e09 Yafang Shao 2020-03-16 1365 current->in_memstall = 0; cb0e52b7748737 Brian Chen 2021-11-10 1366 psi_task_change(current, TSK_MEMSTALL | TSK_MEMSTALL_RUNNING, 0); eb414681d5a07d Johannes Weiner 2018-10-26 1367 eb414681d5a07d Johannes Weiner 2018-10-26 1368 rq_unlock_irq(rq, &rf); eb414681d5a07d Johannes Weiner 2018-10-26 1369 } 527eb453bbfe65 Christoph Hellwig 2022-09-15 1370 EXPORT_SYMBOL_GPL(psi_memstall_leave); eb414681d5a07d Johannes Weiner 2018-10-26 1371 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1372 #ifdef CONFIG_CGROUPS 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1373 int psi_cgroup_alloc(struct cgroup *cgroup) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1374 { e2ad8ab04c5cdf Chengming Zhou 2022-08-26 1375 if (!static_branch_likely(&psi_cgroups_enabled)) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1376 return 0; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1377 2b97cf76289a4f Hao Jia 2022-08-06 1378 cgroup->psi = kzalloc(sizeof(struct psi_group), GFP_KERNEL); 5f69a6577bc33d Chen Wandun 2022-05-26 1379 if (!cgroup->psi) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1380 return -ENOMEM; 5f69a6577bc33d Chen Wandun 2022-05-26 1381 5f69a6577bc33d Chen Wandun 2022-05-26 1382 cgroup->psi->pcpu = alloc_percpu(struct psi_group_cpu); 5f69a6577bc33d Chen Wandun 2022-05-26 1383 if (!cgroup->psi->pcpu) { 5f69a6577bc33d Chen Wandun 2022-05-26 1384 kfree(cgroup->psi); 5f69a6577bc33d Chen Wandun 2022-05-26 1385 return -ENOMEM; 5f69a6577bc33d Chen Wandun 2022-05-26 1386 } 5f69a6577bc33d Chen Wandun 2022-05-26 1387 group_init(cgroup->psi); dc86aba751e286 Chengming Zhou 2022-08-26 1388 cgroup->psi->parent = cgroup_psi(cgroup_parent(cgroup)); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1389 return 0; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1390 } 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1391 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1392 void psi_cgroup_free(struct cgroup *cgroup) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1393 { e2ad8ab04c5cdf Chengming Zhou 2022-08-26 1394 if (!static_branch_likely(&psi_cgroups_enabled)) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1395 return; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1396 5f69a6577bc33d Chen Wandun 2022-05-26 1397 cancel_delayed_work_sync(&cgroup->psi->avgs_work); 5f69a6577bc33d Chen Wandun 2022-05-26 1398 free_percpu(cgroup->psi->pcpu); 0e94682b73bfa6 Suren Baghdasaryan 2019-05-14 1399 /* All triggers must be removed by now */ 65457b74aa9437 Domenico Cerasuolo 2023-03-30 1400 WARN_ONCE(cgroup->psi->rtpoll_states, "psi: trigger leak\n"); 5f69a6577bc33d Chen Wandun 2022-05-26 1401 kfree(cgroup->psi); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1402 } 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1403 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1404 /** 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1405 * cgroup_move_task - move task to a different cgroup 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1406 * @task: the task 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1407 * @to: the target css_set 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1408 * 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1409 * Move task to a new cgroup and safely migrate its associated stall 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1410 * state between the different groups. 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1411 * 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1412 * This function acquires the task's rq lock to lock out concurrent 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1413 * changes to the task's scheduling state and - in case the task is 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1414 * running - concurrent changes to its stall state. 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1415 */ 2ce7135adc9ad0 Johannes Weiner 2018-10-26 @1416 void cgroup_move_task(struct task_struct *task, struct css_set *to) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1417 { d583d360a620e6 Johannes Weiner 2021-05-03 1418 unsigned int task_flags; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1419 struct rq_flags rf; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1420 struct rq *rq; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1421 e2ad8ab04c5cdf Chengming Zhou 2022-08-26 1422 if (!static_branch_likely(&psi_cgroups_enabled)) { 8fcb2312d1e330 Olof Johansson 2018-11-16 1423 /* 8fcb2312d1e330 Olof Johansson 2018-11-16 1424 * Lame to do this here, but the scheduler cannot be locked 8fcb2312d1e330 Olof Johansson 2018-11-16 1425 * from the outside, so we move cgroups from inside sched/. 8fcb2312d1e330 Olof Johansson 2018-11-16 1426 */ 8fcb2312d1e330 Olof Johansson 2018-11-16 1427 rcu_assign_pointer(task->cgroups, to); 8fcb2312d1e330 Olof Johansson 2018-11-16 1428 return; 8fcb2312d1e330 Olof Johansson 2018-11-16 1429 } 8fcb2312d1e330 Olof Johansson 2018-11-16 1430 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1431 rq = task_rq_lock(task, &rf); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1432 d583d360a620e6 Johannes Weiner 2021-05-03 1433 /* d583d360a620e6 Johannes Weiner 2021-05-03 1434 * We may race with schedule() dropping the rq lock between d583d360a620e6 Johannes Weiner 2021-05-03 1435 * deactivating prev and switching to next. Because the psi d583d360a620e6 Johannes Weiner 2021-05-03 1436 * updates from the deactivation are deferred to the switch d583d360a620e6 Johannes Weiner 2021-05-03 1437 * callback to save cgroup tree updates, the task's scheduling d583d360a620e6 Johannes Weiner 2021-05-03 1438 * state here is not coherent with its psi state: d583d360a620e6 Johannes Weiner 2021-05-03 1439 * d583d360a620e6 Johannes Weiner 2021-05-03 1440 * schedule() cgroup_move_task() d583d360a620e6 Johannes Weiner 2021-05-03 1441 * rq_lock() d583d360a620e6 Johannes Weiner 2021-05-03 1442 * deactivate_task() d583d360a620e6 Johannes Weiner 2021-05-03 1443 * p->on_rq = 0 d583d360a620e6 Johannes Weiner 2021-05-03 1444 * psi_dequeue() // defers TSK_RUNNING & TSK_IOWAIT updates d583d360a620e6 Johannes Weiner 2021-05-03 1445 * pick_next_task() d583d360a620e6 Johannes Weiner 2021-05-03 1446 * rq_unlock() d583d360a620e6 Johannes Weiner 2021-05-03 1447 * rq_lock() d583d360a620e6 Johannes Weiner 2021-05-03 1448 * psi_task_change() // old cgroup d583d360a620e6 Johannes Weiner 2021-05-03 1449 * task->cgroups = to d583d360a620e6 Johannes Weiner 2021-05-03 1450 * psi_task_change() // new cgroup d583d360a620e6 Johannes Weiner 2021-05-03 1451 * rq_unlock() d583d360a620e6 Johannes Weiner 2021-05-03 1452 * rq_lock() d583d360a620e6 Johannes Weiner 2021-05-03 1453 * psi_sched_switch() // does deferred updates in new cgroup d583d360a620e6 Johannes Weiner 2021-05-03 1454 * d583d360a620e6 Johannes Weiner 2021-05-03 1455 * Don't rely on the scheduling state. Use psi_flags instead. d583d360a620e6 Johannes Weiner 2021-05-03 1456 */ d583d360a620e6 Johannes Weiner 2021-05-03 1457 task_flags = task->psi_flags; 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1458 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1459 if (task_flags) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1460 psi_task_change(task, task_flags, 0); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1461 8fcb2312d1e330 Olof Johansson 2018-11-16 1462 /* See comment above */ 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1463 rcu_assign_pointer(task->cgroups, to); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1464 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1465 if (task_flags) 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1466 psi_task_change(task, 0, task_flags); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1467 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1468 task_rq_unlock(rq, task, &rf); 2ce7135adc9ad0 Johannes Weiner 2018-10-26 1469 } 34f26a15611afb Chengming Zhou 2022-09-07 1470 :::::: The code at line 1262 was first introduced by commit :::::: 52b1364ba0b105122d6de0e719b36db705011ac1 sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure :::::: TO: Chengming Zhou <zhouchengming(a)bytedance.com> :::::: CC: Peter Zijlstra <peterz(a)infradead.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2862/2862] fs/cachefiles/ondemand.o: warning: objtool: cachefiles_ondemand_daemon_read()+0x2ea: unreachable instruction
by kernel test robot 17 Apr '25

17 Apr '25
Hi Jeffle, First bad commit (maybe != root cause): tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 2affea8965688b8231cf977864ba7539320d5db8 commit: 2937cd5f8c58bd8e7895f6b2698057721442248e [2862/2862] cachefiles: notify the user daemon when looking up cookie config: x86_64-buildonly-randconfig-005-20250415 (https://download.01.org/0day-ci/archive/20250417/202504170158.DUuilMVg-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504170158.DUuilMVg-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/202504170158.DUuilMVg-lkp@intel.com/ All warnings (new ones prefixed by >>): >> fs/cachefiles/ondemand.o: warning: objtool: cachefiles_ondemand_daemon_read()+0x2ea: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1582/1582] kernel/futex.o: warning: objtool: futex_wait()+0x2ab: unreachable instruction
by kernel test robot 17 Apr '25

17 Apr '25
Hi Thomas, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d47443532b562cff105f8cfbc32343f83a2ecd01 commit: 1d78ee3e3677377ad1596c4348677899fe8337ee [1582/1582] futex: Move futex exit handling into futex code config: x86_64-buildonly-randconfig-005-20250415 (https://download.01.org/0day-ci/archive/20250417/202504170042.n4ixMCSo-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250417/202504170042.n4ixMCSo-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/202504170042.n4ixMCSo-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/futex.o: warning: objtool: futex_wait()+0x2ab: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION d47443532b562cff105f8cfbc32343f83a2ecd01
by kernel test robot 16 Apr '25

16 Apr '25
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: d47443532b562cff105f8cfbc32343f83a2ecd01 !15862 tty: goldfish: Use tty_port_destroy() to destroy port Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202503171950.PEaY4TuS-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202503181741.vcHyKenV-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202503201721.gZeymcpc-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202503271341.WPxyfHvo-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202503271858.j6vJ9Bhc-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504100333.uIAnI5Io-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504160234.O5AhsCPF-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504160550.0sQHot70-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504160744.SWErJnVd-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504160834.JePJgVdj-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504160854.8OhZdFkA-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504161537.Uan8Cvv1-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504162035.XTrGjsOi-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202504162155.YWQMdqiA-lkp@intel.com https://lore.kernel.org/oe-kbuild/202504160621.3VfLzprK-lkp@intel.com arch/x86/entry/entry_64.o: warning: objtool: .entry.text+0x162: unsupported intra-function call arch/x86/entry/entry_64.o: warning: objtool: .entry.text+0x1c2: unsupported intra-function call arch/x86/entry/entry_64.o: warning: objtool: .entry.text+0x1d1: unsupported intra-function call arch/x86/entry/entry_64.o: warning: objtool: .entry.text+0x1d2: unsupported intra-function call arch/x86/entry/entry_64.o: warning: objtool: .entry.text+0x1e1: unsupported intra-function call arch/x86/entry/entry_64.o: warning: objtool: If this is a retpoline, please patch it in with alternatives and annotate it with ANNOTATE_NOSPEC_ALTERNATIVE. arch/x86/kernel/apic/io_apic.o: warning: objtool: acpi_get_override_irq()+0x108: can't find switch jump table arch/x86/mm/init.o: warning: objtool: init_mem_mapping()+0x147: unreachable instruction block/blk-lib.o: warning: objtool: __blkdev_issue_discard()+0x22a: unreachable instruction block/blk-mq-debugfs.o: warning: objtool: debugfs_rq_show()+0xdf: unreachable instruction drivers/dma/pl330.c:2598:15: warning: 'dst' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/dma/pl330.c:2599:15: warning: 'src' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gpu/drm/amd/amdgpu/amdgpu_ids.o: warning: objtool: amdgpu_vmid_grab()+0xd3e: unreachable instruction drivers/gpu/drm/ttm/ttm_object.c:60: error: Cannot parse struct or union! drivers/media/i2c/adv7511-v4l2.o: warning: objtool: adv7511_set_fmt()+0x805: unreachable instruction drivers/nvdimm/label.o: warning: objtool: nd_blk_namespace_label_update()+0x1326: unreachable instruction drivers/pinctrl/core.c:1338: error: Cannot parse struct or union! drivers/platform/x86/intel_speed_select_if/.tmp_isst_if_mbox_msr.o: warning: objtool: missing symbol for section .exit.text drivers/platform/x86/intel_speed_select_if/.tmp_isst_if_mbox_pci.o: warning: objtool: missing symbol for section .init.text drivers/platform/x86/intel_speed_select_if/.tmp_isst_if_mmio.o: warning: objtool: missing symbol for section .init.text drivers/spi/spi-phytium-plat.c:122:8: error: implicit declaration of function 'gpiod_count' [-Werror,-Wimplicit-function-declaration] drivers/spi/spi-phytium-plat.c:128:12: error: implicit declaration of function 'devm_gpiod_get_index_optional' [-Werror,-Wimplicit-function-declaration] drivers/spi/spi-phytium-plat.c:129:17: error: use of undeclared identifier 'GPIOD_OUT_LOW' drivers/spi/spi-phytium-plat.c:136:14: error: implicit declaration of function 'desc_to_gpio' [-Werror,-Wimplicit-function-declaration] drivers/staging/comedi/drivers/ni_labpc_common.o: warning: objtool: labpc_ai_check_chanlist()+0x59: can't find switch jump table drivers/usb/typec/tps6598x.o: warning: objtool: tps6598x_probe()+0x1ed: can't find switch jump table fs/debugfs/file.o: warning: objtool: full_proxy_open()+0x55a: unreachable instruction fs/ext4/mballoc.o: warning: objtool: ext4_mb_complex_scan_group()+0x11a4: unreachable instruction fs/gfs2/rgrp.o: warning: objtool: __rs_deltree()+0x188: unreachable instruction fs/xfs/xfs_message.o: warning: objtool: assfail()+0x4f: unreachable instruction include/asm-generic/atomic-instrumented.h:33:9: warning: 'wait_req' may be used uninitialized [-Wmaybe-uninitialized] include/linux/filter.h:332:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] include/linux/filter.h:332:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] include/linux/filter.h:332:4: warning: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type] include/linux/thread_info.h:119:17: warning: 'usercmd' may be used uninitialized [-Wmaybe-uninitialized] init/Kconfig:34: syntax error kernel/hung_task.c:148:7: error: use of undeclared identifier 'sysctl_hung_task_all_cpu_backtrace' kernel/livepatch/core.c:1013:12: warning: no previous prototype for function 'arch_klp_func_can_patch' [-Wmissing-prototypes] kernel/sched/.tmp_debug.o: warning: objtool: missing symbol for section .text.unlikely kernel/trace/trace_mmiotrace.o: warning: objtool: mmio_print_line()+0x272: unreachable instruction lib/ubsan.c:195:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_add_overflow'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:203:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_sub_overflow'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:210:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_mul_overflow'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:217:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_negate_overflow'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:238:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_divrem_overflow'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:337:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_type_mismatch_v1'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:352:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_vla_bound_not_positive'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:370:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_out_of_bounds'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:387:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_shift_out_of_bounds'; expected 'void *' [-Wbuiltin-declaration-mismatch] lib/ubsan.c:438:6: warning: mismatch in argument 1 type of built-in function '__ubsan_handle_load_invalid_value'; expected 'void *' [-Wbuiltin-declaration-mismatch] mm/.tmp_memcontrol.o: warning: objtool: missing symbol for section .text.unlikely mm/.tmp_util.o: warning: objtool: missing symbol for section .text mm/debug.c:143:21: warning: more '%' conversions than data arguments [-Wformat-insufficient-args] mm/debug.c:174:3: warning: format specifies type 'void *' but the argument has type 'int' [-Wformat] mm/debug.c:175:18: warning: format specifies type 'unsigned long' but the argument has type 'const unsigned long *' [-Wformat] mm/debug.c:175:3: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] mm/hugetlb.c:1370:6: warning: no previous prototype for function 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] mm/vmscan.c:3257:21: error: implicit declaration of function 'kernel_swap_enabled' [-Werror,-Wimplicit-function-declaration] mm/vmscan.o: warning: objtool: shrink_node()+0x981: can't find switch jump table Unverified Error/Warning (likely false positive, kindly check if interested): ./samples/mic/mpssd/mpssd.c: 40 linux/version.h not needed. block/blk-throttle.c:2306:1-7: preceding lock on line 2212 drivers/usb/dwc2/gadget.o: warning: objtool: dwc2_gadget_config_nonisoc_xfer_ddma() falls through to next function dwc2_hsotg_read_frameno() mm/kasan/kasan_init.c:220: warning: Function parameter or member 'shadow_end' not described in 'kasan_populate_zero_shadow' mm/kasan/kasan_init.c:220: warning: Function parameter or member 'shadow_start' not described in 'kasan_populate_zero_shadow' sound/isa/msnd/msnd_pinnacle.o: warning: objtool: snd_msnd_probe()+0xf7: can't find switch jump table Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | `-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow |-- arm64-randconfig-001-20250415 | `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union |-- arm64-randconfig-002-20250415 | |-- drivers-dma-pl330.c:warning:dst-may-be-used-uninitialized-in-this-function | |-- drivers-dma-pl330.c:warning:src-may-be-used-uninitialized-in-this-function | `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union |-- arm64-randconfig-003-20250415 | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-int-(-const)(struct-bpf_map-void-)-to-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-lo | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-int-(-const)(struct-bpf_map-void-void-u64)-aka-int-(-const)(struct-bpf_map-void-void-long-long-unsigned-int)-to-u64-(-)(u64 | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-void-(-const)(struct-bpf_map-void-)-to-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-l | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_add_overflow-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_divrem_overflow-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_load_invalid_value-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_mul_overflow-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_negate_overflow-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_out_of_bounds-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_shift_out_of_bounds-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_sub_overflow-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_type_mismatch_v1-expected-void | |-- lib-ubsan.c:warning:mismatch-in-argument-type-of-built-in-function-__ubsan_handle_vla_bound_not_positive-expected-void | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | `-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow |-- arm64-randconfig-004-20250415 | |-- drivers-dma-pl330.c:warning:dst-may-be-used-uninitialized-in-this-function | |-- drivers-dma-pl330.c:warning:src-may-be-used-uninitialized-in-this-function | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-int-(-const)(struct-bpf_map-void-)-to-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-lo | |-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-int-(-const)(struct-bpf_map-void-void-u64)-aka-int-(-const)(struct-bpf_map-void-void-long-long-unsigned-int)-to-u64-(-)(u64 | `-- include-linux-filter.h:warning:cast-between-incompatible-function-types-from-void-(-const)(struct-bpf_map-void-)-to-u64-(-)(u64-u64-u64-u64-u64)-aka-long-long-unsigned-int-(-)(long-long-unsigned-int-l |-- arm64-randconfig-052-20250416 | `-- init-Kconfig:syntax-error |-- arm64-randconfig-055-20250416 | `-- init-Kconfig:syntax-error |-- arm64-randconfig-r062-20250416 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | `-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow |-- x86_64-allnoconfig | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration | `-- samples-mic-mpssd-mpssd.c:linux-version.h-not-needed. |-- x86_64-allyesconfig | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow | `-- mm-page_alloc.c:warning:cast-from-int-(-)(unsigned-long-unsigned-long-struct-deferred_args-)-to-ktask_thread_func-(aka-int-(-)(void-void-void-)-)-converts-to-incompatible-function-type |-- x86_64-buildonly-randconfig-001-20250401 | `-- drivers-nvdimm-label.o:warning:objtool:nd_blk_namespace_label_update:unreachable-instruction |-- x86_64-buildonly-randconfig-001-20250415 | `-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union |-- x86_64-buildonly-randconfig-002-20250408 | |-- drivers-staging-comedi-drivers-ni_labpc_common.o:warning:objtool:labpc_ai_check_chanlist:can-t-find-switch-jump-table | `-- drivers-usb-typec-tps6598x.o:warning:objtool:tps6598x_probe:can-t-find-switch-jump-table |-- x86_64-buildonly-randconfig-002-20250415 | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | `-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow |-- x86_64-buildonly-randconfig-003-20250207 | `-- mm-hugetlb.c:warning:no-previous-prototype-for-function-free_huge_page_to_dhugetlb_pool |-- x86_64-buildonly-randconfig-003-20250315 | |-- arch-x86-kernel-apic-io_apic.o:warning:objtool:acpi_get_override_irq:can-t-find-switch-jump-table | `-- sound-isa-msnd-msnd_pinnacle.o:warning:objtool:snd_msnd_probe:can-t-find-switch-jump-table |-- x86_64-buildonly-randconfig-003-20250415 | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- include-asm-generic-atomic-instrumented.h:warning:wait_req-may-be-used-uninitialized | |-- include-linux-thread_info.h:warning:usercmd-may-be-used-uninitialized | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | `-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow |-- x86_64-buildonly-randconfig-004-20250102 | `-- drivers-media-i2c-adv7511-v4l2.o:warning:objtool:adv7511_set_fmt:unreachable-instruction |-- x86_64-buildonly-randconfig-004-20250415 | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- mm-page_alloc.c:warning:cast-from-int-(-)(unsigned-long-unsigned-long-struct-deferred_args-)-to-ktask_thread_func-(aka-int-(-)(void-void-void-)-)-converts-to-incompatible-function-type | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration |-- x86_64-buildonly-randconfig-005-20241216 | `-- mm-vmscan.c:error:implicit-declaration-of-function-kernel_swap_enabled-Werror-Wimplicit-function-declaration |-- x86_64-buildonly-randconfig-005-20250415 | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | |-- arch-x86-mm-init.o:warning:objtool:init_mem_mapping:unreachable-instruction | |-- block-blk-lib.o:warning:objtool:__blkdev_issue_discard:unreachable-instruction | |-- drivers-gpu-drm-amd-amdgpu-amdgpu_ids.o:warning:objtool:amdgpu_vmid_grab:unreachable-instruction | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- fs-gfs2-rgrp.o:warning:objtool:__rs_deltree:unreachable-instruction | |-- fs-xfs-xfs_message.o:warning:objtool:assfail:unreachable-instruction | |-- kernel-trace-trace_mmiotrace.o:warning:objtool:mmio_print_line:unreachable-instruction | `-- mm-swapfile.o:warning:objtool:free_swap_and_cache:unreachable-instruction |-- x86_64-buildonly-randconfig-006-20250408 | `-- block-blk-mq-debugfs.o:warning:objtool:debugfs_rq_show:unreachable-instruction |-- x86_64-buildonly-randconfig-006-20250415 | |-- drivers-gpu-drm-ttm-ttm_object.c:error:Cannot-parse-struct-or-union | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- drivers-platform-x86-intel_speed_select_if-.tmp_isst_if_mbox_msr.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-platform-x86-intel_speed_select_if-.tmp_isst_if_mbox_pci.o:warning:objtool:missing-symbol-for-section-.init.text | |-- drivers-platform-x86-intel_speed_select_if-.tmp_isst_if_mmio.o:warning:objtool:missing-symbol-for-section-.init.text | |-- kernel-sched-.tmp_debug.o:warning:objtool:missing-symbol-for-section-.text.unlikely | |-- mm-.tmp_memcontrol.o:warning:objtool:missing-symbol-for-section-.text.unlikely | `-- mm-.tmp_util.o:warning:objtool:missing-symbol-for-section-.text |-- x86_64-defconfig | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | `-- include-asm-generic-bug.h:warning:mcu_ctrl-may-be-used-uninitialized-in-this-function |-- x86_64-randconfig-101-20241223 | `-- fs-ext4-mballoc.o:warning:objtool:ext4_mb_complex_scan_group:unreachable-instruction |-- x86_64-randconfig-102-20250103 | `-- drivers-acpi-cppc_acpi.c:WARNING:NULL-check-before-some-freeing-functions-is-not-needed. |-- x86_64-randconfig-102-20250408 | `-- block-blk-throttle.c:preceding-lock-on-line |-- x86_64-randconfig-103-20241218 | `-- kernel-hung_task.c:error:use-of-undeclared-identifier-sysctl_hung_task_all_cpu_backtrace |-- x86_64-randconfig-103-20250305 | `-- drivers-gpu-drm-amd-amdgpu-amdgpu_ids.o:warning:objtool:amdgpu_vmid_grab:unreachable-instruction |-- x86_64-randconfig-104-20250321 | `-- drivers-usb-dwc2-gadget.o:warning:objtool:dwc2_gadget_config_nonisoc_xfer_ddma-falls-through-to-next-function-dwc2_hsotg_read_frameno() |-- x86_64-randconfig-104-20250408 | |-- drivers-spi-spi-phytium-plat.c:error:implicit-declaration-of-function-desc_to_gpio-Werror-Wimplicit-function-declaration | |-- drivers-spi-spi-phytium-plat.c:error:implicit-declaration-of-function-devm_gpiod_get_index_optional-Werror-Wimplicit-function-declaration | |-- drivers-spi-spi-phytium-plat.c:error:implicit-declaration-of-function-gpiod_count-Werror-Wimplicit-function-declaration | `-- drivers-spi-spi-phytium-plat.c:error:use-of-undeclared-identifier-GPIOD_OUT_LOW |-- x86_64-randconfig-122-20241226 | `-- fs-debugfs-file.o:warning:objtool:full_proxy_open:unreachable-instruction |-- x86_64-randconfig-122-20250309 | `-- drivers-net-tun.c:sparse:sparse:incompatible-types-in-comparison-expression-(different-address-spaces): |-- x86_64-randconfig-122-20250404 | `-- mm-vmscan.o:warning:objtool:shrink_node:can-t-find-switch-jump-table |-- x86_64-randconfig-161-20250322 | `-- kernel-livepatch-core.c:warning:no-previous-prototype-for-function-arch_klp_func_can_patch |-- x86_64-randconfig-161-20250416 | |-- arch-x86-entry-entry_64.o:warning:objtool:.entry.text:unsupported-intra-function-call | |-- arch-x86-entry-entry_64.o:warning:objtool:If-this-is-a-retpoline-please-patch-it-in-with-alternatives-and-annotate-it-with-ANNOTATE_NOSPEC_ALTERNATIVE. | |-- drivers-pinctrl-core.c:error:Cannot-parse-struct-or-union | |-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_end-not-described-in-kasan_populate_zero_shadow | `-- mm-kasan-kasan_init.c:warning:Function-parameter-or-member-shadow_start-not-described-in-kasan_populate_zero_shadow `-- x86_64-randconfig-r112-20250311 |-- mm-debug.c:warning:format-specifies-type-int-but-the-argument-has-type-unsigned-long |-- mm-debug.c:warning:format-specifies-type-unsigned-long-but-the-argument-has-type-const-unsigned-long |-- mm-debug.c:warning:format-specifies-type-void-but-the-argument-has-type-int `-- mm-debug.c:warning:more-conversions-than-data-arguments elapsed time: 1447m configs tested: 16 configs skipped: 128 tested configs: arm64 allmodconfig gcc-14.2.0 arm64 allnoconfig gcc-14.2.0 arm64 defconfig gcc-14.2.0 arm64 randconfig-001-20250415 gcc-11.5.0 arm64 randconfig-002-20250415 gcc-7.5.0 arm64 randconfig-003-20250415 gcc-9.5.0 arm64 randconfig-004-20250415 gcc-9.5.0 x86_64 allnoconfig clang-20 x86_64 allyesconfig clang-20 x86_64 buildonly-randconfig-001-20250415 clang-20 x86_64 buildonly-randconfig-002-20250415 gcc-11 x86_64 buildonly-randconfig-003-20250415 gcc-12 x86_64 buildonly-randconfig-004-20250415 clang-20 x86_64 buildonly-randconfig-005-20250415 clang-20 x86_64 buildonly-randconfig-006-20250415 gcc-12 x86_64 defconfig gcc-11 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1571/1571] block/blk-mq-debugfs.o: warning: objtool: debugfs_rq_show()+0xdf: unreachable instruction
by kernel test robot 16 Apr '25

16 Apr '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d47443532b562cff105f8cfbc32343f83a2ecd01 commit: ad4d7c466e2520aed18679d442b1a16f33b372b8 [1571/1571] blk-mq-debugfs: factor out a new helper to show allocated request config: x86_64-buildonly-randconfig-006-20250408 (https://download.01.org/0day-ci/archive/20250416/202504162155.YWQMdqiA-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250416/202504162155.YWQMdqiA-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/202504162155.YWQMdqiA-lkp@intel.com/ All warnings (new ones prefixed by >>): >> block/blk-mq-debugfs.o: warning: objtool: debugfs_rq_show()+0xdf: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1582/1582] fs/gfs2/rgrp.o: warning: objtool: __rs_deltree()+0x188: unreachable instruction
by kernel test robot 16 Apr '25

16 Apr '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d47443532b562cff105f8cfbc32343f83a2ecd01 commit: 27f3c5bc01e9836a87061de4ea01fa3754a40274 [1582/1582] gfs2: Fix marking bitmaps non-full config: x86_64-buildonly-randconfig-005-20250415 (https://download.01.org/0day-ci/archive/20250416/202504162035.XTrGjsOi-lkp@…) compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250416/202504162035.XTrGjsOi-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/202504162035.XTrGjsOi-lkp@intel.com/ All warnings (new ones prefixed by >>): fs/gfs2/rgrp.c:1288:25: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] 1288 | int demote_requested = test_bit(GLF_DEMOTE, &gh->gh_gl->gl_flags) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | || 1289 | test_bit(GLF_PENDING_DEMOTE, &gh->gh_gl->gl_flags); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/bitops.h:342:2: note: expanded from macro 'test_bit' 342 | (__builtin_constant_p((nr)) \ | ^ fs/gfs2/rgrp.c:1288:25: note: cast one or both operands to int to silence this warning arch/x86/include/asm/bitops.h:342:2: note: expanded from macro 'test_bit' 342 | (__builtin_constant_p((nr)) \ | ^ 1 warning generated. fs/gfs2/rgrp.c:1517: warning: Function parameter or member 'rs' not described in 'rgd_free' fs/gfs2/rgrp.c:1992: warning: Function parameter or member 'rgd' not described in 'fast_to_acquire' >> fs/gfs2/rgrp.o: warning: objtool: __rs_deltree()+0x188: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-5.10] bnxt: Do not read past the end of test names
by Liu Chuang 16 Apr '25

16 Apr '25
From: Kees Cook <keescook(a)chromium.org> mainline inclusion from mainline-v6.2-rc5 commit d3e599c090fc6977331150c5f0a69ab8ce87da21 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBWVYG CVE: CVE-2023-53010 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… ---------------------- Test names were being concatenated based on a offset beyond the end of the first name, which tripped the buffer overflow detection logic: detected buffer overflow in strnlen [...] Call Trace: bnxt_ethtool_init.cold+0x18/0x18 Refactor struct hwrm_selftest_qlist_output to use an actual array, and adjust the concatenation to use snprintf() rather than a series of strncat() calls. Reported-by: Niklas Cassel <Niklas.Cassel(a)wdc.com> Link: https://lore.kernel.org/lkml/Y8F%2F1w1AZTvLglFX@x1-carbon/ Tested-by: Niklas Cassel <Niklas.Cassel(a)wdc.com> Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.") Cc: Michael Chan <michael.chan(a)broadcom.com> Cc: "David S. Miller" <davem(a)davemloft.net> Cc: Eric Dumazet <edumazet(a)google.com> Cc: Jakub Kicinski <kuba(a)kernel.org> Cc: Paolo Abeni <pabeni(a)redhat.com> Cc: netdev(a)vger.kernel.org Signed-off-by: Kees Cook <keescook(a)chromium.org> Reviewed-by: Michael Chan <michael.chan(a)broadcom.com> Reviewed-by: Niklas Cassel <niklas.cassel(a)wdc.com> Signed-off-by: David S. Miller <davem(a)davemloft.net> Conflicts: drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c [Conflicts due to context difference.] Signed-off-by: Liu Chuang <liuchuang40(a)huawei.com> --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 13 ++++--------- drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 9 +-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index eacc39140d9f..2836f0ee1491 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -3885,7 +3885,7 @@ void bnxt_ethtool_init(struct bnxt *bp) test_info->timeout = HWRM_CMD_TIMEOUT; for (i = 0; i < bp->num_tests; i++) { char *str = test_info->string[i]; - char *fw_str = resp->test0_name + i * 32; + char *fw_str = resp->test_name[i]; if (i == BNXT_MACLPBK_TEST_IDX) { strcpy(str, "Mac loopback test (offline)"); @@ -3896,14 +3896,9 @@ void bnxt_ethtool_init(struct bnxt *bp) } else if (i == BNXT_IRQ_TEST_IDX) { strcpy(str, "Interrupt_test (offline)"); } else { - strlcpy(str, fw_str, ETH_GSTRING_LEN); - strncat(str, " test", ETH_GSTRING_LEN - strlen(str)); - if (test_info->offline_mask & (1 << i)) - strncat(str, " (offline)", - ETH_GSTRING_LEN - strlen(str)); - else - strncat(str, " (online)", - ETH_GSTRING_LEN - strlen(str)); + snprintf(str, ETH_GSTRING_LEN, "%s test (%s)", + fw_str, test_info->offline_mask & (1 << i) ? + "offline" : "online"); } } diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h index 2d3e962bdac3..fb8952f92df7 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h @@ -8543,14 +8543,7 @@ struct hwrm_selftest_qlist_output { u8 unused_0; __le16 test_timeout; u8 unused_1[2]; - char test0_name[32]; - char test1_name[32]; - char test2_name[32]; - char test3_name[32]; - char test4_name[32]; - char test5_name[32]; - char test6_name[32]; - char test7_name[32]; + char test_name[8][32]; u8 eyescope_target_BER_support; #define SELFTEST_QLIST_RESP_EYESCOPE_TARGET_BER_SUPPORT_BER_1E8_SUPPORTED 0x0UL #define SELFTEST_QLIST_RESP_EYESCOPE_TARGET_BER_SUPPORT_BER_1E9_SUPPORTED 0x1UL -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] ftrace: Avoid potential division by zero in function_stat_show()
by Liu Chuang 16 Apr '25

16 Apr '25
From: Nikolay Kuratov <kniv(a)yandex-team.ru> stable inclusion from stable-v5.10.235 commit ca381f60a3bb7cfaa618d73ca411610bd7fc3149 category: bugfix bugzilla: 189268 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit a1a7eb89ca0b89dc1c326eeee2596f263291aca3 upstream. Check whether denominator expression x * (x - 1) * 1000 mod {2^32, 2^64} produce zero and skip stddev computation in that case. For now don't care about rec->counter * rec->counter overflow because rec->time * rec->time overflow will likely happen earlier. Cc: stable(a)vger.kernel.org Cc: Wen Yang <wenyang(a)linux.alibaba.com> Cc: Mark Rutland <mark.rutland(a)arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> Link: https://lore.kernel.org/20250206090156.1561783-1-kniv@yandex-team.ru Fixes: e31f7939c1c27 ("ftrace: Avoid potential division by zero in function profiler") Signed-off-by: Nikolay Kuratov <kniv(a)yandex-team.ru> Signed-off-by: Steven Rostedt (Google) <rostedt(a)goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Wang Hai <wanghai38(a)huawei.com> --- kernel/trace/ftrace.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 923d78cc130c..095ba8ab36cf 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -510,6 +510,7 @@ static int function_stat_show(struct seq_file *m, void *v) static struct trace_seq s; unsigned long long avg; unsigned long long stddev; + unsigned long long stddev_denom; #endif mutex_lock(&ftrace_profile_lock); @@ -531,23 +532,19 @@ static int function_stat_show(struct seq_file *m, void *v) #ifdef CONFIG_FUNCTION_GRAPH_TRACER seq_puts(m, " "); - /* Sample standard deviation (s^2) */ - if (rec->counter <= 1) - stddev = 0; - else { - /* - * Apply Welford's method: - * s^2 = 1 / (n * (n-1)) * (n * \Sum (x_i)^2 - (\Sum x_i)^2) - */ + /* + * Variance formula: + * s^2 = 1 / (n * (n-1)) * (n * \Sum (x_i)^2 - (\Sum x_i)^2) + * Maybe Welford's method is better here? + * Divide only by 1000 for ns^2 -> us^2 conversion. + * trace_print_graph_duration will divide by 1000 again. + */ + stddev = 0; + stddev_denom = rec->counter * (rec->counter - 1) * 1000; + if (stddev_denom) { stddev = rec->counter * rec->time_squared - rec->time * rec->time; - - /* - * Divide only 1000 for ns^2 -> us^2 conversion. - * trace_print_graph_duration will divide 1000 again. - */ - stddev = div64_ul(stddev, - rec->counter * (rec->counter - 1) * 1000); + stddev = div64_ul(stddev, stddev_denom); } trace_seq_init(&s); -- 2.34.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • ...
  • 1826
  • Older →

HyperKitty Powered by HyperKitty