tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: ff5378fff024fcb2552e6da22811cf933fe4a4c0
commit: 00d37128abe2687fac974c5d21aa67fac6518c7c [2579/2579] sched: Introduce smart grid scheduling strategy for cfs
config: arm64-randconfig-002-20241213 (https://download.01.org/0day-ci/archive/20241213/202412130534.AeGefPCj-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241213/202412130534.AeGefPCj-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/202412130534.AeGefPCj-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/sched/core.c:2746:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
2746 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:9530:5: warning: no previous prototype for 'tg_set_dynamic_affinity_mode' [-Wmissing-prototypes]
9530 | int tg_set_dynamic_affinity_mode(struct task_group *tg, u64 mode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:9567:5: warning: no previous prototype for 'tg_set_affinity_period' [-Wmissing-prototypes]
9567 | int tg_set_affinity_period(struct task_group *tg, u64 period_ms)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:9578:5: warning: no previous prototype for 'tg_get_affinity_period' [-Wmissing-prototypes]
9578 | u64 tg_get_affinity_period(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'cpu_affinity_stat_show':
>> kernel/sched/core.c:9632:74: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type 'int' [-Wformat=]
9632 | seq_printf(sf, "sd_level %d, cpu list %*pbl, stay_cnt %llu\n",
| ~~~^
| |
| long long unsigned int
| %u
vim +9632 kernel/sched/core.c
9619
9620 static int cpu_affinity_stat_show(struct seq_file *sf, void *v)
9621 {
9622 struct task_group *tg = css_tg(seq_css(sf));
9623 struct auto_affinity *auto_affi = tg->auto_affinity;
9624 struct affinity_domain *ad = &auto_affi->ad;
9625 int i;
9626
9627 seq_printf(sf, "period_active %d\n", auto_affi->period_active);
9628 seq_printf(sf, "dcount %d\n", ad->dcount);
9629 seq_printf(sf, "domain_mask 0x%x\n", ad->domain_mask);
9630 seq_printf(sf, "curr_level %d\n", ad->curr_level);
9631 for (i = 0; i < ad->dcount; i++)
> 9632 seq_printf(sf, "sd_level %d, cpu list %*pbl, stay_cnt %llu\n",
9633 i, cpumask_pr_args(ad->domains[i]),
9634 schedstat_val(ad->stay_cnt[i]));
9635
9636 return 0;
9637 }
9638 #endif /* CONFIG_QOS_SCHED_SMART_GRID */
9639
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Kefeng,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: ff5378fff024fcb2552e6da22811cf933fe4a4c0
commit: ba25d7467b3040d98290a140256303ba190ef376 [2579/2579] arm64: cpu_park: Move into stand-alone file
config: arm64-randconfig-002-20241213 (https://download.01.org/0day-ci/archive/20241213/202412130351.ogsraRJ5-lkp@…)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241213/202412130351.ogsraRJ5-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/202412130351.ogsraRJ5-lkp@intel.com/
All errors (new ones prefixed by >>):
arch/arm64/kernel/arm64_cpu_park.c: In function 'cpu_park_stop':
>> arch/arm64/kernel/arm64_cpu_park.c:249:31: error: 'const struct cpu_operations' has no member named 'cpu_die'
249 | if (ops && ops->cpu_die)
| ^~
arch/arm64/kernel/arm64_cpu_park.c:250:28: error: 'const struct cpu_operations' has no member named 'cpu_die'
250 | ops->cpu_die(cpu);
| ^~
vim +249 arch/arm64/kernel/arm64_cpu_park.c
235
236 void cpu_park_stop(void)
237 {
238 int cpu = smp_processor_id();
239 const struct cpu_operations *ops = NULL;
240 /*
241 * Go to cpu park state.
242 * Otherwise go to cpu die.
243 */
244 if (kexec_in_progress && park_info.start_v) {
245 machine_kexec_mask_interrupts();
246 cpu_park(cpu);
247
248 ops = get_cpu_ops(cpu);
> 249 if (ops && ops->cpu_die)
250 ops->cpu_die(cpu);
251 }
252 }
253
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Steven,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: c17394e022a5504b2d967d70de4c226de003e990
commit: 0c4c3ee2e4947ad6ec346dc37fa133f4fecafd76 [2566/2566] Net: ethernet: Support management channel of the host tool in 3snic 3s9xx network driver
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20241212/202412121710.BepF5y8C-lkp@…)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241212/202412121710.BepF5y8C-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/202412121710.BepF5y8C-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:11:
In file included from include/linux/pci.h:1499:
In file included from include/linux/dmapool.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:1573:
include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
418 | item];
| ~~~~
include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
425 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
437 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
446 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:17:
In file included from drivers/net/ethernet/3snic/sssnic/include/sss_kernel.h:7:
In file included from drivers/net/ethernet/3snic/sssnic/include/kernel/sss_linux_kernel.h:140:
include/net/devlink.h:28:19: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
28 | u32 reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:29:26: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
29 | u32 remote_reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:545:5: warning: no previous prototype for function 'sss_adm_msg_write' [-Wmissing-prototypes]
545 | int sss_adm_msg_write(struct sss_adm_msg *adm_msg, u8 node_id,
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:545:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
545 | int sss_adm_msg_write(struct sss_adm_msg *adm_msg, u8 node_id,
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:551:5: warning: no previous prototype for function 'sss_adm_msg_read' [-Wmissing-prototypes]
551 | int sss_adm_msg_read(struct sss_adm_msg *adm_msg, u8 node_id,
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:551:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
551 | int sss_adm_msg_read(struct sss_adm_msg *adm_msg, u8 node_id,
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:597:5: warning: no previous prototype for function 'sss_adm_msg_read_ack' [-Wmissing-prototypes]
597 | int sss_adm_msg_read_ack(void *hwdev, u8 dest, const void *cmd,
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:597:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
597 | int sss_adm_msg_read_ack(void *hwdev, u8 dest, const void *cmd,
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:618:5: warning: no previous prototype for function 'sss_adm_msg_write_nack' [-Wmissing-prototypes]
618 | int sss_adm_msg_write_nack(void *hwdev, u8 dest, const void *cmd, u16 size)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:618:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
618 | int sss_adm_msg_write_nack(void *hwdev, u8 dest, const void *cmd, u16 size)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:682:5: warning: no previous prototype for function 'sss_sync_send_adm_msg' [-Wmissing-prototypes]
682 | int sss_sync_send_adm_msg(void *hwdev, u8 mod, u16 cmd, void *buf_in,
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c:682:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
682 | int sss_sync_send_adm_msg(void *hwdev, u8 mod, u16 cmd, void *buf_in,
| ^
| static
12 warnings generated.
--
In file included from drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:11:
In file included from include/linux/pci.h:1499:
In file included from include/linux/dmapool.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:1573:
include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
418 | item];
| ~~~~
include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
425 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
437 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
446 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:17:
In file included from drivers/net/ethernet/3snic/sssnic/include/sss_kernel.h:7:
In file included from drivers/net/ethernet/3snic/sssnic/include/kernel/sss_linux_kernel.h:140:
include/net/devlink.h:28:19: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
28 | u32 reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:29:26: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
29 | u32 remote_reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:580:6: warning: no previous prototype for function 'sss_destroy_adm_msg' [-Wmissing-prototypes]
580 | void sss_destroy_adm_msg(struct sss_adm_msg *adm_msg)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:580:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
580 | void sss_destroy_adm_msg(struct sss_adm_msg *adm_msg)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:689:5: warning: no previous prototype for function 'sss_hwif_init_adm' [-Wmissing-prototypes]
689 | int sss_hwif_init_adm(struct sss_hwdev *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:689:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
689 | int sss_hwif_init_adm(struct sss_hwdev *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:738:6: warning: no previous prototype for function 'sss_hwif_deinit_adm' [-Wmissing-prototypes]
738 | void sss_hwif_deinit_adm(struct sss_hwdev *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:738:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
738 | void sss_hwif_deinit_adm(struct sss_hwdev *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:752:6: warning: no previous prototype for function 'sss_complete_adm_event' [-Wmissing-prototypes]
752 | void sss_complete_adm_event(struct sss_hwdev *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm_init.c:752:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
752 | void sss_complete_adm_event(struct sss_hwdev *hwdev)
| ^
| static
11 warnings generated.
--
In file included from include/net/ipv6.h:12:
In file included from include/linux/ipv6.h:93:
In file included from include/linux/tcp.h:17:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:14:
In file included from include/linux/mm.h:1573:
include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
418 | item];
| ~~~~
include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
425 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
437 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
446 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:9:
In file included from drivers/net/ethernet/3snic/sssnic/include/sss_kernel.h:7:
In file included from drivers/net/ethernet/3snic/sssnic/include/kernel/sss_linux_kernel.h:140:
include/net/devlink.h:28:19: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
28 | u32 reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:29:26: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
29 | u32 remote_reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:15:5: warning: no previous prototype for function 'sss_alloc_db_addr' [-Wmissing-prototypes]
15 | int sss_alloc_db_addr(void *hwdev, void __iomem **db_base)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
15 | int sss_alloc_db_addr(void *hwdev, void __iomem **db_base)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:37:6: warning: no previous prototype for function 'sss_free_db_addr' [-Wmissing-prototypes]
37 | void sss_free_db_addr(void *hwdev, const void __iomem *db_base)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
37 | void sss_free_db_addr(void *hwdev, const void __iomem *db_base)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:52:6: warning: no previous prototype for function 'sss_chip_set_msix_auto_mask' [-Wmissing-prototypes]
52 | void sss_chip_set_msix_auto_mask(void *hwdev, u16 msix_id,
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:52:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
52 | void sss_chip_set_msix_auto_mask(void *hwdev, u16 msix_id,
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:70:6: warning: no previous prototype for function 'sss_chip_set_msix_state' [-Wmissing-prototypes]
70 | void sss_chip_set_msix_state(void *hwdev, u16 msix_id,
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
70 | void sss_chip_set_msix_state(void *hwdev, u16 msix_id,
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:86:5: warning: no previous prototype for function 'sss_get_global_func_id' [-Wmissing-prototypes]
86 | u16 sss_get_global_func_id(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:86:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
86 | u16 sss_get_global_func_id(void *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:95:4: warning: no previous prototype for function 'sss_get_pf_id_of_vf' [-Wmissing-prototypes]
95 | u8 sss_get_pf_id_of_vf(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:95:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
95 | u8 sss_get_pf_id_of_vf(void *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:104:4: warning: no previous prototype for function 'sss_get_pcie_itf_id' [-Wmissing-prototypes]
104 | u8 sss_get_pcie_itf_id(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
104 | u8 sss_get_pcie_itf_id(void *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:113:20: warning: no previous prototype for function 'sss_get_func_type' [-Wmissing-prototypes]
113 | enum sss_func_type sss_get_func_type(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:113:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
113 | enum sss_func_type sss_get_func_type(void *hwdev)
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:122:20: warning: no previous prototype for function 'sss_get_func_id' [-Wmissing-prototypes]
122 | enum sss_func_type sss_get_func_id(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
122 | enum sss_func_type sss_get_func_id(void *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:131:5: warning: no previous prototype for function 'sss_get_glb_pf_vf_offset' [-Wmissing-prototypes]
131 | u16 sss_get_glb_pf_vf_offset(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:131:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
131 | u16 sss_get_glb_pf_vf_offset(void *hwdev)
| ^
| static
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:140:4: warning: no previous prototype for function 'sss_get_ppf_id' [-Wmissing-prototypes]
140 | u8 sss_get_ppf_id(void *hwdev)
| ^
drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_export.c:140:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
140 | u8 sss_get_ppf_id(void *hwdev)
| ^
| static
18 warnings generated.
--
In file included from drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:6:
In file included from include/net/sock.h:46:
In file included from include/linux/netdevice.h:37:
In file included from include/linux/ethtool.h:18:
In file included from include/linux/netlink.h:7:
In file included from include/linux/skbuff.h:17:
In file included from include/linux/bvec.h:14:
In file included from include/linux/mm.h:1573:
include/linux/vmstat.h:417:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
417 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
418 | item];
| ~~~~
include/linux/vmstat.h:424:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
424 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
425 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:431:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
431 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
include/linux/vmstat.h:436:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
436 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
437 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
include/linux/vmstat.h:445:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
445 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~ ^
446 | NR_VM_NUMA_STAT_ITEMS +
| ~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:14:
In file included from drivers/net/ethernet/3snic/sssnic/include/kernel/sss_linux_kernel.h:140:
include/net/devlink.h:28:19: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
28 | u32 reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:29:26: warning: arithmetic between different enumeration types ('enum devlink_reload_limit' and 'enum devlink_reload_action') [-Wenum-enum-conversion]
29 | u32 remote_reload_stats[DEVLINK_RELOAD_STATS_ARRAY_SIZE];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/net/devlink.h:25:30: note: expanded from macro 'DEVLINK_RELOAD_STATS_ARRAY_SIZE'
25 | (__DEVLINK_RELOAD_LIMIT_MAX * __DEVLINK_RELOAD_ACTION_MAX)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:80:6: warning: no previous prototype for function 'sss_tool_free_in_buf' [-Wmissing-prototypes]
80 | void sss_tool_free_in_buf(void *hwdev, const struct sss_tool_msg *tool_msg, void *in_buf)
| ^
drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:80:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
80 | void sss_tool_free_in_buf(void *hwdev, const struct sss_tool_msg *tool_msg, void *in_buf)
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:91:6: warning: no previous prototype for function 'sss_tool_free_out_buf' [-Wmissing-prototypes]
91 | void sss_tool_free_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
| ^
drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:91:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
91 | void sss_tool_free_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:104:5: warning: no previous prototype for function 'sss_tool_alloc_in_buf' [-Wmissing-prototypes]
104 | int sss_tool_alloc_in_buf(void *hwdev, struct sss_tool_msg *tool_msg,
| ^
drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:104:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
104 | int sss_tool_alloc_in_buf(void *hwdev, struct sss_tool_msg *tool_msg,
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:146:5: warning: no previous prototype for function 'sss_tool_alloc_out_buf' [-Wmissing-prototypes]
146 | int sss_tool_alloc_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
| ^
drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
146 | int sss_tool_alloc_out_buf(void *hwdev, struct sss_tool_msg *tool_msg,
| ^
| static
>> drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:182:5: warning: no previous prototype for function 'sss_tool_copy_to_user' [-Wmissing-prototypes]
182 | int sss_tool_copy_to_user(struct sss_tool_msg *tool_msg,
| ^
drivers/net/ethernet/3snic/sssnic/hw/./tool/sss_tool_main.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
182 | int sss_tool_copy_to_user(struct sss_tool_msg *tool_msg,
| ^
| static
12 warnings generated.
..
vim +/sss_adm_msg_write +545 drivers/net/ethernet/3snic/sssnic/hw/sss_hwif_adm.c
544
> 545 int sss_adm_msg_write(struct sss_adm_msg *adm_msg, u8 node_id,
546 const void *cmd, u16 cmd_size)
547 {
548 return sss_adm_msg_io(adm_msg, node_id, cmd, cmd_size, NULL, 0);
549 }
550
> 551 int sss_adm_msg_read(struct sss_adm_msg *adm_msg, u8 node_id,
552 const void *cmd, u16 size, void *ack, u16 ack_size)
553 {
554 return sss_adm_msg_io(adm_msg, node_id, cmd, size, ack, ack_size);
555 }
556
557 static void sss_set_adm_event_flag(struct sss_msg_pf_to_mgmt *pf_to_mgmt,
558 int event_flag)
559 {
560 spin_lock(&pf_to_mgmt->sync_event_lock);
561 pf_to_mgmt->event_state = event_flag;
562 spin_unlock(&pf_to_mgmt->sync_event_lock);
563 }
564
565 static u16 sss_align_adm_msg_len(u16 msg_data_len)
566 {
567 /* u64 - the size of the header */
568 u16 msg_size;
569
570 msg_size = (u16)(SSS_MGMT_MSG_RSVD_FOR_DEV + sizeof(u64) + msg_data_len);
571
572 if (msg_size > SSS_MGMT_MSG_SIZE_MIN)
573 msg_size = SSS_MGMT_MSG_SIZE_MIN +
574 ALIGN((msg_size - SSS_MGMT_MSG_SIZE_MIN), SSS_MGMT_MSG_SIZE_STEP);
575 else
576 msg_size = SSS_MGMT_MSG_SIZE_MIN;
577
578 return msg_size;
579 }
580
581 static void sss_encapsulate_adm_msg(u8 *adm_msg, u64 *header,
582 const void *body, int body_len)
583 {
584 u8 *adm_msg_new = adm_msg;
585
586 memset(adm_msg_new, 0, SSS_MGMT_MSG_RSVD_FOR_DEV);
587
588 adm_msg_new += SSS_MGMT_MSG_RSVD_FOR_DEV;
589 memcpy(adm_msg_new, header, sizeof(*header));
590
591 adm_msg_new += sizeof(*header);
592 memcpy(adm_msg_new, body, (size_t)(u32)body_len);
593 }
594
595 #define SSS_MAX_PF_MGMT_BUF_MAX 2048L
596
> 597 int sss_adm_msg_read_ack(void *hwdev, u8 dest, const void *cmd,
598 u16 size, void *ack, u16 ack_size)
599 {
600 struct sss_msg_pf_to_mgmt *pf_to_mgmt = NULL;
601 struct sss_adm_msg *adm_mag = NULL;
602
603 if (!hwdev || !cmd || (ack_size && !ack) || size > SSS_MAX_PF_MGMT_BUF_MAX)
604 return -EINVAL;
605
606 if (!SSS_SUPPORT_ADM_MSG((struct sss_hwdev *)hwdev))
607 return -EPERM;
608
609 pf_to_mgmt = ((struct sss_hwdev *)hwdev)->pf_to_mgmt;
610 adm_mag = pf_to_mgmt->adm_msg[SSS_ADM_MSG_POLL_READ];
611
612 if (!(((struct sss_hwdev *)hwdev)->chip_present_flag))
613 return -EPERM;
614
615 return sss_adm_msg_read(adm_mag, dest, cmd, size, ack, ack_size);
616 }
617
> 618 int sss_adm_msg_write_nack(void *hwdev, u8 dest, const void *cmd, u16 size)
619 {
620 struct sss_msg_pf_to_mgmt *pf_to_mgmt = NULL;
621 struct sss_adm_msg *adm_mag = NULL;
622
623 if (!hwdev || !size || !cmd || size > SSS_MAX_PF_MGMT_BUF_MAX)
624 return -EINVAL;
625
626 if (!SSS_SUPPORT_ADM_MSG((struct sss_hwdev *)hwdev))
627 return -EPERM;
628
629 pf_to_mgmt = ((struct sss_hwdev *)hwdev)->pf_to_mgmt;
630 adm_mag = pf_to_mgmt->adm_msg[SSS_ADM_MSG_POLL_WRITE];
631
632 if (!(((struct sss_hwdev *)hwdev)->chip_present_flag))
633 return -EPERM;
634
635 return sss_adm_msg_write(adm_mag, dest, cmd, size);
636 }
637
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
From: Pedro Tammela <pctammela(a)mojatatu.com>
stable inclusion
from stable-v4.19.323
commit e7f9a6f97eb067599a74f3bcb6761976b0ed303e
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB5KR7
CVE: CVE-2024-53057
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
[ Upstream commit 2e95c4384438adeaa772caa560244b1a2efef816 ]
In qdisc_tree_reduce_backlog, Qdiscs with major handle ffff: are assumed
to be either root or ingress. This assumption is bogus since it's valid
to create egress qdiscs with major handle ffff:
Budimir Markovic found that for qdiscs like DRR that maintain an active
class list, it will cause a UAF with a dangling class pointer.
In 066a3b5b2346, the concern was to avoid iterating over the ingress
qdisc since its parent is itself. The proper fix is to stop when parent
TC_H_ROOT is reached because the only way to retrieve ingress is when a
hierarchy which does not contain a ffff: major handle call into
qdisc_lookup with TC_H_MAJ(TC_H_ROOT).
In the scenario where major ffff: is an egress qdisc in any of the tree
levels, the updates will also propagate to TC_H_ROOT, which then the
iteration must stop.
Fixes: 066a3b5b2346 ("[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop")
Reported-by: Budimir Markovic <markovicbudimir(a)gmail.com>
Suggested-by: Jamal Hadi Salim <jhs(a)mojatatu.com>
Tested-by: Victor Nogueira <victor(a)mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela(a)mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs(a)mojatatu.com>
net/sched/sch_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Horman <horms(a)kernel.org>
Link: https://patch.msgid.link/20241024165547.418570-1-jhs@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba(a)kernel.org>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
Signed-off-by: Dong Chenchen <dongchenchen2(a)huawei.com>
Reviewed-by: Zhang Changzhong <zhangchangzhong(a)huaiwei.com>
---
net/sched/sch_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 458f9e733cf0..36a5d3ceead2 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -783,7 +783,7 @@ void qdisc_tree_reduce_backlog(struct Qdisc *sch, unsigned int n,
drops = max_t(int, n, 0);
rcu_read_lock();
while ((parentid = sch->parent)) {
- if (TC_H_MAJ(parentid) == TC_H_MAJ(TC_H_INGRESS))
+ if (parentid == TC_H_ROOT)
break;
if (sch->flags & TCQ_F_NOPARENT)
--
2.25.1