Kernel
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- 17 participants
- 18899 discussions

[openeuler:OLK-5.10 2983/2983] drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c:546:5: error: no previous prototype for function 'ps3_pci_init'
by kernel test robot 25 Jun '25
by kernel test robot 25 Jun '25
25 Jun '25
Hi liujie_answer,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 3778f0b898118491b80dc9bcde38c1713662232c
commit: 13f748eddc9dfdec8a18922ed601e1906dcb183a [2983/2983] [PATCH] SCSI: Linkdata: Supports Linkdata HBA/RAID Controllers
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250625/202506251007.uWNSnCWy-lkp@…)
compiler: clang version 20.1.7 (https://github.com/llvm/llvm-project 6146a88f60492b520a36f8f8f3231e15f3cc6082)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250625/202506251007.uWNSnCWy-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/202506251007.uWNSnCWy-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/scsi/linkdata/ps3stor/ps3_ioc_manager.c:308:5: error: no previous prototype for function 'ps3_hard_reset_to_ready' [-Werror,-Wmissing-prototypes]
308 | int ps3_hard_reset_to_ready(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_ioc_manager.c:308:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
308 | int ps3_hard_reset_to_ready(struct ps3_instance *instance)
| ^
| static
1 error generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:877:6: error: no previous prototype for function 'ps3_set_task_manager_busy' [-Werror,-Wmissing-prototypes]
877 | void ps3_set_task_manager_busy(struct ps3_instance *instance,
| ^
drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:877:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
877 | void ps3_set_task_manager_busy(struct ps3_instance *instance,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:1111:5: error: no previous prototype for function 'ps3_wait_for_outstanding_complete' [-Werror,-Wmissing-prototypes]
1111 | int ps3_wait_for_outstanding_complete(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_scsi_cmd_err.c:1111:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1111 | int ps3_wait_for_outstanding_complete(struct ps3_instance *instance)
| ^
| static
2 errors generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:132:6: error: no previous prototype for function 'ps3_trigger_irq_poll' [-Werror,-Wmissing-prototypes]
132 | void ps3_trigger_irq_poll(struct ps3_irq *irq)
| ^
drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:132:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
132 | void ps3_trigger_irq_poll(struct ps3_irq *irq)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:244:5: error: no previous prototype for function 'ps3_resp_status_convert' [-Werror,-Wmissing-prototypes]
244 | int ps3_resp_status_convert(unsigned int resp_status)
| ^
drivers/scsi/linkdata/ps3stor/ps3_cmd_complete.c:244:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
244 | int ps3_resp_status_convert(unsigned int resp_status)
| ^
| static
2 errors generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:212:1: error: no previous prototype for function 'ps3_qos_cmd_waitq_get' [-Werror,-Wmissing-prototypes]
212 | ps3_qos_cmd_waitq_get(struct ps3_qos_tg_context *qos_tg_ctx,
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
211 | struct qos_wait_queue *
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:336:15: error: no previous prototype for function 'ps3_qos_vd_cmdword_get' [-Werror,-Wmissing-prototypes]
336 | unsigned char ps3_qos_vd_cmdword_get(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:336:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
336 | unsigned char ps3_qos_vd_cmdword_get(struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:352:15: error: no previous prototype for function 'ps3_qos_exclusive_cmdword_get' [-Werror,-Wmissing-prototypes]
352 | unsigned char ps3_qos_exclusive_cmdword_get(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:352:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
352 | unsigned char ps3_qos_exclusive_cmdword_get(struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:364:15: error: no previous prototype for function 'ps3_qos_tg_decision' [-Werror,-Wmissing-prototypes]
364 | unsigned char ps3_qos_tg_decision(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:364:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
364 | unsigned char ps3_qos_tg_decision(struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:750:15: error: no previous prototype for function 'ps3_qos_all_pd_rc_get' [-Werror,-Wmissing-prototypes]
750 | unsigned char ps3_qos_all_pd_rc_get(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:750:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
750 | unsigned char ps3_qos_all_pd_rc_get(struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:877:6: error: no previous prototype for function 'ps3_pd_quota_waitq_clear_all' [-Werror,-Wmissing-prototypes]
877 | void ps3_pd_quota_waitq_clear_all(struct ps3_qos_pd_mgr *qos_pd_mgr,
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:877:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
877 | void ps3_pd_quota_waitq_clear_all(struct ps3_qos_pd_mgr *qos_pd_mgr,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:893:6: error: no previous prototype for function 'ps3_pd_quota_waitq_clean' [-Werror,-Wmissing-prototypes]
893 | void ps3_pd_quota_waitq_clean(struct ps3_qos_pd_mgr *qos_pd_mgr,
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:893:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
893 | void ps3_pd_quota_waitq_clean(struct ps3_qos_pd_mgr *qos_pd_mgr,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:1059:6: error: no previous prototype for function 'ps3_qos_pd_waitq_ratio_update' [-Werror,-Wmissing-prototypes]
1059 | void ps3_qos_pd_waitq_ratio_update(struct ps3_qos_pd_mgr *qos_pd_mgr)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:1059:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1059 | void ps3_qos_pd_waitq_ratio_update(struct ps3_qos_pd_mgr *qos_pd_mgr)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2020:15: error: no previous prototype for function 'ps3_hba_qos_decision' [-Werror,-Wmissing-prototypes]
2020 | unsigned char ps3_hba_qos_decision(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2020:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2020 | unsigned char ps3_hba_qos_decision(struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2041:6: error: no previous prototype for function 'ps3_hba_qos_waitq_notify' [-Werror,-Wmissing-prototypes]
2041 | void ps3_hba_qos_waitq_notify(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2041:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2041 | void ps3_hba_qos_waitq_notify(struct ps3_instance *instance)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2101:6: error: no previous prototype for function 'ps3_cmd_waitq_abort' [-Werror,-Wmissing-prototypes]
2101 | bool ps3_cmd_waitq_abort(struct ps3_cmd *aborted_cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2101 | bool ps3_cmd_waitq_abort(struct ps3_cmd *aborted_cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2464:6: error: no previous prototype for function 'ps3_hba_qos_waitq_clear_all' [-Werror,-Wmissing-prototypes]
2464 | void ps3_hba_qos_waitq_clear_all(struct ps3_instance *instance, int resp_status)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2464:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2464 | void ps3_hba_qos_waitq_clear_all(struct ps3_instance *instance, int resp_status)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2828:6: error: no previous prototype for function 'ps3_hba_qos_vd_init' [-Werror,-Wmissing-prototypes]
2828 | void ps3_hba_qos_vd_init(struct ps3_instance *instance,
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2828:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2828 | void ps3_hba_qos_vd_init(struct ps3_instance *instance,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:2937:6: error: no previous prototype for function 'ps3_hba_qos_vd_reset' [-Werror,-Wmissing-prototypes]
2937 | void ps3_hba_qos_vd_reset(struct ps3_instance *instance, unsigned short disk_id)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:2937:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2937 | void ps3_hba_qos_vd_reset(struct ps3_instance *instance, unsigned short disk_id)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3024:6: error: no previous prototype for function 'ps3_hba_qos_waitq_poll' [-Werror,-Wmissing-prototypes]
3024 | void ps3_hba_qos_waitq_poll(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3024:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3024 | void ps3_hba_qos_waitq_poll(struct ps3_instance *instance)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3280:15: error: no previous prototype for function 'ps3_raid_qos_decision' [-Werror,-Wmissing-prototypes]
3280 | unsigned char ps3_raid_qos_decision(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3280:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3280 | unsigned char ps3_raid_qos_decision(struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3335:6: error: no previous prototype for function 'ps3_qos_mgrq_resend' [-Werror,-Wmissing-prototypes]
3335 | void ps3_qos_mgrq_resend(struct ps3_qos_softq_mgr *softq_mgr)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3335:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3335 | void ps3_qos_mgrq_resend(struct ps3_qos_softq_mgr *softq_mgr)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3479:6: error: no previous prototype for function 'ps3_raid_qos_waitq_notify' [-Werror,-Wmissing-prototypes]
3479 | void ps3_raid_qos_waitq_notify(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3479:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3479 | void ps3_raid_qos_waitq_notify(struct ps3_instance *instance)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_qos.c:3822:15: error: no previous prototype for function 'ps3_raid_qos_waitq_abort' [-Werror,-Wmissing-prototypes]
3822 | unsigned char ps3_raid_qos_waitq_abort(struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_qos.c:3822:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3822 | unsigned char ps3_raid_qos_waitq_abort(struct ps3_cmd *cmd)
| ^
| static
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_scsih.c:1959:1: error: unused function 'ps3_scsih_dev_id_get' [-Werror,-Wunused-function]
1959 | ps3_scsih_dev_id_get(const struct scsi_cmnd *s_cmd)
| ^~~~~~~~~~~~~~~~~~~~
1 error generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:86:6: error: no previous prototype for function 'ps3_cmd_stat_content_clear' [-Werror,-Wmissing-prototypes]
86 | void ps3_cmd_stat_content_clear(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:86:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
86 | void ps3_cmd_stat_content_clear(struct ps3_instance *instance)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:404:6: error: no previous prototype for function 'ps3_io_recv_ok_stat_inc' [-Werror,-Wmissing-prototypes]
404 | void ps3_io_recv_ok_stat_inc(struct ps3_instance *ins,
| ^
drivers/scsi/linkdata/ps3stor/ps3_cmd_statistics.c:404:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
404 | void ps3_io_recv_ok_stat_inc(struct ps3_instance *ins,
| ^
| static
2 errors generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_ioctl.c:786:6: error: no previous prototype for function 'ps3_clean_mgr_cmd' [-Werror,-Wmissing-prototypes]
786 | void ps3_clean_mgr_cmd(struct ps3_instance *instance)
| ^
drivers/scsi/linkdata/ps3stor/ps3_ioctl.c:786:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
786 | void ps3_clean_mgr_cmd(struct ps3_instance *instance)
| ^
| static
1 error generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:579:5: error: no previous prototype for function 'ps3_r1x_hash_bit_check' [-Werror,-Wmissing-prototypes]
579 | int ps3_r1x_hash_bit_check(struct ps3_r1x_hash_bit_mgr *hash_mgr,
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:579:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
579 | int ps3_r1x_hash_bit_check(struct ps3_r1x_hash_bit_mgr *hash_mgr,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:679:6: error: no previous prototype for function 'ps3_r1x_conflict_queue_hash_bit_lock' [-Werror,-Wmissing-prototypes]
679 | void ps3_r1x_conflict_queue_hash_bit_lock(struct ps3_r1x_lock_mgr *mgr,
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:679:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
679 | void ps3_r1x_conflict_queue_hash_bit_lock(struct ps3_r1x_lock_mgr *mgr,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:731:5: error: no previous prototype for function 'ps3_r1x_hash_bit_lock' [-Werror,-Wmissing-prototypes]
731 | int ps3_r1x_hash_bit_lock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:731:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
731 | int ps3_r1x_hash_bit_lock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:989:6: error: no previous prototype for function 'ps3_r1x_hash_bit_unlock' [-Werror,-Wmissing-prototypes]
989 | void ps3_r1x_hash_bit_unlock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:989:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
989 | void ps3_r1x_hash_bit_unlock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1174:5: error: no previous prototype for function 'ps3_range_check_and_insert' [-Werror,-Wmissing-prototypes]
1174 | int ps3_range_check_and_insert(struct ps3_range_tree_root *range_root,
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1174:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1174 | int ps3_range_check_and_insert(struct ps3_range_tree_root *range_root,
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1232:5: error: no previous prototype for function 'ps3_r1x_hash_range_lock' [-Werror,-Wmissing-prototypes]
1232 | int ps3_r1x_hash_range_lock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd)
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1232:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1232 | int ps3_r1x_hash_range_lock(struct ps3_r1x_lock_mgr *mgr, struct ps3_cmd *cmd)
| ^
| static
>> drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1313:6: error: no previous prototype for function 'ps3_r1x_hash_range_unlock' [-Werror,-Wmissing-prototypes]
1313 | void ps3_r1x_hash_range_unlock(struct ps3_r1x_lock_mgr *mgr,
| ^
drivers/scsi/linkdata/ps3stor/ps3_r1x_write_lock.c:1313:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1313 | void ps3_r1x_hash_range_unlock(struct ps3_r1x_lock_mgr *mgr,
| ^
| static
7 errors generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_debug.c:884:5: error: no previous prototype for function 'ps3_dump_dir_length' [-Werror,-Wmissing-prototypes]
884 | int ps3_dump_dir_length(const char *buf, size_t count)
| ^
drivers/scsi/linkdata/ps3stor/ps3_debug.c:884:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
884 | int ps3_dump_dir_length(const char *buf, size_t count)
| ^
| static
1 error generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_module_para.c:610:14: error: no previous prototype for function 'ps3_cli_ver_query' [-Werror,-Wmissing-prototypes]
610 | unsigned int ps3_cli_ver_query(void)
| ^
drivers/scsi/linkdata/ps3stor/ps3_module_para.c:610:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
610 | unsigned int ps3_cli_ver_query(void)
| ^
| static
1 error generated.
--
>> drivers/scsi/linkdata/ps3stor/ps3_rb_tree.c:155:6: error: no previous prototype for function 'rbtDelNodeDo' [-Werror,-Wmissing-prototypes]
155 | void rbtDelNodeDo(struct Ps3RbRoot *pRoot, struct Ps3RbNode *pNode)
| ^
drivers/scsi/linkdata/ps3stor/ps3_rb_tree.c:155:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
155 | void rbtDelNodeDo(struct Ps3RbRoot *pRoot, struct Ps3RbNode *pNode)
| ^
| static
1 error generated.
..
vim +/ps3_pci_init +546 drivers/scsi/linkdata/ps3stor/./linux/ps3_base.c
545
> 546 int ps3_pci_init(struct pci_dev *pdev, struct ps3_instance *instance)
547 {
548 resource_size_t base_addr = 0;
549 int ret = PS3_SUCCESS;
550
551 ret = pci_enable_device_mem(pdev);
552 if (ret != PS3_SUCCESS) {
553 LOG_ERROR("hno:%u pci id[%u] pci enable failed\n",
554 PS3_HOST(instance), pdev->dev.id);
555 goto l_pci_enable_device_mem_failed;
556 }
557
558 pci_set_master(pdev);
559
560 instance->reg_bar = PS3_REGISTER_BAR_INDEX;
561 ret = (pci_resource_flags(pdev, instance->reg_bar) & IORESOURCE_MEM);
562 if (!ret) {
563 LOG_ERROR("hno:%u Bar %lu isnot IORESOURCE_MEM\n",
564 PS3_HOST(instance), instance->reg_bar);
565 goto l_bar_check_failed;
566 }
567 ret = pci_request_selected_regions(pdev, 1 << instance->reg_bar,
568 "PS3 pci regions");
569 if (ret != PS3_SUCCESS) {
570 LOG_ERROR("hno:%u IO memory region busy\n", PS3_HOST(instance));
571 goto l_pci_request_selected_regions_failed;
572 }
573 #if defined(PS3_SUPPORT_PCIE_REPORT)
574 pci_enable_pcie_error_reporting(pdev);
575 #endif
576 if (instance->ioc_adpter->reg_set) {
577 instance->reg_set =
578 (struct Ps3Fifo __iomem *)instance->ioc_adpter->reg_set(
579 pdev, instance->reg_bar);
580 } else {
581 instance->reg_set = (struct Ps3Fifo __iomem *)ioremap(
582 pci_resource_start(pdev, instance->reg_bar),
583 PS3_REGISTER_SET_SIZE);
584 }
585 if (instance->reg_set == NULL) {
586 LOG_ERROR("hno:%u ioremap failed\n", PS3_HOST(instance));
587 goto l_ioremap_failed;
588 } else {
589 pci_set_drvdata(pdev, instance);
590 }
591
592 ps3_atomic_set(&instance->watchdog_reg_read_fail_count, 0);
593 LOG_INFO(
594 "reg_bar_idx = %lu, bar_base_paddr = 0x%llx, reg_set_vaddr = 0x%p\n",
595 instance->reg_bar, (unsigned long long)base_addr, instance->reg_set);
596
597 return PS3_SUCCESS;
598 l_ioremap_failed:
599 pci_release_selected_regions(instance->pdev, 1 << instance->reg_bar);
600 #if defined(PS3_SUPPORT_PCIE_REPORT)
601 pci_disable_pcie_error_reporting(pdev);
602 #endif
603 l_pci_request_selected_regions_failed:
604 pci_disable_device(instance->pdev);
605 l_bar_check_failed:
606 l_pci_enable_device_mem_failed:
607 return -PS3_FAILED;
608 }
609
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

25 Jun '25
From: Karthik Alapati <mail(a)karthek.com>
stable inclusion
from stable-v4.19.257
commit f5b7e9611cffec345d62d5bdd8b6e30e89956818
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICG97M
CVE: CVE-2022-49981
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit a5623a203cffe2d2b84d2f6c989d9017db1856af upstream.
Free the buffered reports before deleting the list entry.
BUG: memory leak
unreferenced object 0xffff88810e72f180 (size 32):
comm "softirq", pid 0, jiffies 4294945143 (age 16.080s)
hex dump (first 32 bytes):
64 f3 c6 6a d1 88 07 04 00 00 00 00 00 00 00 00 d..j............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff814ac6c3>] kmemdup+0x23/0x50 mm/util.c:128
[<ffffffff8357c1d2>] kmemdup include/linux/fortify-string.h:440 [inline]
[<ffffffff8357c1d2>] hidraw_report_event+0xa2/0x150 drivers/hid/hidraw.c:521
[<ffffffff8356ddad>] hid_report_raw_event+0x27d/0x740 drivers/hid/hid-core.c:1992
[<ffffffff8356e41e>] hid_input_report+0x1ae/0x270 drivers/hid/hid-core.c:2065
[<ffffffff835f0d3f>] hid_irq_in+0x1ff/0x250 drivers/hid/usbhid/hid-core.c:284
[<ffffffff82d3c7f9>] __usb_hcd_giveback_urb+0xf9/0x230 drivers/usb/core/hcd.c:1670
[<ffffffff82d3cc26>] usb_hcd_giveback_urb+0x1b6/0x1d0 drivers/usb/core/hcd.c:1747
[<ffffffff82ef1e14>] dummy_timer+0x8e4/0x14c0 drivers/usb/gadget/udc/dummy_hcd.c:1988
[<ffffffff812f50a8>] call_timer_fn+0x38/0x200 kernel/time/timer.c:1474
[<ffffffff812f5586>] expire_timers kernel/time/timer.c:1519 [inline]
[<ffffffff812f5586>] __run_timers.part.0+0x316/0x430 kernel/time/timer.c:1790
[<ffffffff812f56e4>] __run_timers kernel/time/timer.c:1768 [inline]
[<ffffffff812f56e4>] run_timer_softirq+0x44/0x90 kernel/time/timer.c:1803
[<ffffffff848000e6>] __do_softirq+0xe6/0x2ea kernel/softirq.c:571
[<ffffffff81246db0>] invoke_softirq kernel/softirq.c:445 [inline]
[<ffffffff81246db0>] __irq_exit_rcu kernel/softirq.c:650 [inline]
[<ffffffff81246db0>] irq_exit_rcu+0xc0/0x110 kernel/softirq.c:662
[<ffffffff84574f02>] sysvec_apic_timer_interrupt+0xa2/0xd0 arch/x86/kernel/apic/apic.c:1106
[<ffffffff84600c8b>] asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
[<ffffffff8458a070>] native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
[<ffffffff8458a070>] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
[<ffffffff8458a070>] acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
[<ffffffff8458a070>] acpi_idle_do_entry+0xc0/0xd0 drivers/acpi/processor_idle.c:554
Link: https://syzkaller.appspot.com/bug?id=19a04b43c75ed1092021010419b5e560a8172c…
Reported-by: syzbot+f59100a0428e6ded9443(a)syzkaller.appspotmail.com
Signed-off-by: Karthik Alapati <mail(a)karthek.com>
Signed-off-by: Jiri Kosina <jkosina(a)suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Bowen You <youbowen2(a)huawei.com>
---
drivers/hid/hidraw.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
index c7cff929b419..788f1fecd626 100644
--- a/drivers/hid/hidraw.c
+++ b/drivers/hid/hidraw.c
@@ -353,10 +353,13 @@ static int hidraw_release(struct inode * inode, struct file * file)
unsigned int minor = iminor(inode);
struct hidraw_list *list = file->private_data;
unsigned long flags;
+ int i;
mutex_lock(&minors_lock);
spin_lock_irqsave(&hidraw_table[minor]->list_lock, flags);
+ for (i = list->tail; i < list->head; i++)
+ kfree(list->buffer[i].value);
list_del(&list->node);
spin_unlock_irqrestore(&hidraw_table[minor]->list_lock, flags);
kfree(list);
--
2.34.1
2
1

[openeuler:OLK-5.10 2983/2983] drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:432:6: error: no previous prototype for function 'sxe_debugfs_entries_init'
by kernel test robot 25 Jun '25
by kernel test robot 25 Jun '25
25 Jun '25
Hi liujie_answer,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 3778f0b898118491b80dc9bcde38c1713662232c
commit: 8cee206b5558245197158bd20895f95cc28d8468 [2983/2983] Ethernet: Linkdata: Supports Linkdata ethernet Controllers
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20250625/202506250600.ecsKU6CC-lkp@…)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
rustc: rustc 1.58.0 (02072b482 2022-01-11)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250625/202506250600.ecsKU6CC-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/202506250600.ecsKU6CC-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_xdp.c:403:6: error: no previous prototype for function 'sxe_txrx_ring_enable' [-Werror,-Wmissing-prototypes]
403 | void sxe_txrx_ring_enable(struct sxe_adapter *adapter, u32 ring_idx)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_xdp.c:403:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
403 | void sxe_txrx_ring_enable(struct sxe_adapter *adapter, u32 ring_idx)
| ^
| static
1 error generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:432:6: error: no previous prototype for function 'sxe_debugfs_entries_init' [-Werror,-Wmissing-prototypes]
432 | void sxe_debugfs_entries_init(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:432:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
432 | void sxe_debugfs_entries_init(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:459:6: error: no previous prototype for function 'sxe_debugfs_entries_exit' [-Werror,-Wmissing-prototypes]
459 | void sxe_debugfs_entries_exit(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:459:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
459 | void sxe_debugfs_entries_exit(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:465:6: error: no previous prototype for function 'sxe_debugfs_init' [-Werror,-Wmissing-prototypes]
465 | void sxe_debugfs_init(void)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:465:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
465 | void sxe_debugfs_init(void)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:470:6: error: no previous prototype for function 'sxe_debugfs_exit' [-Werror,-Wmissing-prototypes]
470 | void sxe_debugfs_exit(void)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c:470:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
470 | void sxe_debugfs_exit(void)
| ^
| static
4 errors generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2022:5: error: no previous prototype for function 'sxe_reg_test' [-Werror,-Wmissing-prototypes]
2022 | int sxe_reg_test(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2022:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2022 | int sxe_reg_test(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2644:5: error: no previous prototype for function 'sxe_phys_id_set' [-Werror,-Wmissing-prototypes]
2644 | int sxe_phys_id_set(struct net_device *netdev, enum ethtool_phys_id_state state)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_ethtool.c:2644:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
2644 | int sxe_phys_id_set(struct net_device *netdev, enum ethtool_phys_id_state state)
| ^
| static
2 errors generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:230:6: error: no previous prototype for function 'sxe_hw_no_snoop_disable' [-Werror,-Wmissing-prototypes]
230 | void sxe_hw_no_snoop_disable(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:230:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
230 | void sxe_hw_no_snoop_disable(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:262:6: error: no previous prototype for function 'sxe_hw_uc_addr_pool_del' [-Werror,-Wmissing-prototypes]
262 | void sxe_hw_uc_addr_pool_del(struct sxe_hw *hw, u32 rar_idx, u32 pool_idx)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:262:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
262 | void sxe_hw_uc_addr_pool_del(struct sxe_hw *hw, u32 rar_idx, u32 pool_idx)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:283:5: error: no previous prototype for function 'sxe_hw_uc_addr_pool_enable' [-Werror,-Wmissing-prototypes]
283 | s32 sxe_hw_uc_addr_pool_enable(struct sxe_hw *hw, u8 rar_idx, u8 pool_idx)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:283:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
283 | s32 sxe_hw_uc_addr_pool_enable(struct sxe_hw *hw, u8 rar_idx, u8 pool_idx)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:337:5: error: no previous prototype for function 'sxe_hw_nic_reset' [-Werror,-Wmissing-prototypes]
337 | s32 sxe_hw_nic_reset(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:337:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
337 | s32 sxe_hw_nic_reset(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:367:6: error: no previous prototype for function 'sxe_hw_pf_rst_done_set' [-Werror,-Wmissing-prototypes]
367 | void sxe_hw_pf_rst_done_set(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:367:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
367 | void sxe_hw_pf_rst_done_set(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:735:5: error: no previous prototype for function 'sxe_hw_pending_irq_read_clear' [-Werror,-Wmissing-prototypes]
735 | u32 sxe_hw_pending_irq_read_clear(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:735:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
735 | u32 sxe_hw_pending_irq_read_clear(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:740:6: error: no previous prototype for function 'sxe_hw_pending_irq_write_clear' [-Werror,-Wmissing-prototypes]
740 | void sxe_hw_pending_irq_write_clear(struct sxe_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:740:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
740 | void sxe_hw_pending_irq_write_clear(struct sxe_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:745:5: error: no previous prototype for function 'sxe_hw_irq_cause_get' [-Werror,-Wmissing-prototypes]
745 | u32 sxe_hw_irq_cause_get(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:745:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
745 | u32 sxe_hw_irq_cause_get(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:765:6: error: no previous prototype for function 'sxe_hw_ring_irq_auto_disable' [-Werror,-Wmissing-prototypes]
765 | void sxe_hw_ring_irq_auto_disable(struct sxe_hw *hw, bool is_msix)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:765:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
765 | void sxe_hw_ring_irq_auto_disable(struct sxe_hw *hw, bool is_msix)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:775:6: error: no previous prototype for function 'sxe_hw_irq_general_reg_set' [-Werror,-Wmissing-prototypes]
775 | void sxe_hw_irq_general_reg_set(struct sxe_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:775:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
775 | void sxe_hw_irq_general_reg_set(struct sxe_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:780:5: error: no previous prototype for function 'sxe_hw_irq_general_reg_get' [-Werror,-Wmissing-prototypes]
780 | u32 sxe_hw_irq_general_reg_get(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:780:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
780 | u32 sxe_hw_irq_general_reg_get(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:790:6: error: no previous prototype for function 'sxe_hw_event_irq_map' [-Werror,-Wmissing-prototypes]
790 | void sxe_hw_event_irq_map(struct sxe_hw *hw, u8 offset, u16 irq_idx)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:790:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
790 | void sxe_hw_event_irq_map(struct sxe_hw *hw, u8 offset, u16 irq_idx)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:806:6: error: no previous prototype for function 'sxe_hw_ring_irq_map' [-Werror,-Wmissing-prototypes]
806 | void sxe_hw_ring_irq_map(struct sxe_hw *hw, bool is_tx, u16 reg_idx,
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:806:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
806 | void sxe_hw_ring_irq_map(struct sxe_hw *hw, bool is_tx, u16 reg_idx,
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:823:6: error: no previous prototype for function 'sxe_hw_ring_irq_interval_set' [-Werror,-Wmissing-prototypes]
823 | void sxe_hw_ring_irq_interval_set(struct sxe_hw *hw, u16 irq_idx, u32 interval)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:823:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
823 | void sxe_hw_ring_irq_interval_set(struct sxe_hw *hw, u16 irq_idx, u32 interval)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:838:6: error: no previous prototype for function 'sxe_hw_event_irq_auto_clear_set' [-Werror,-Wmissing-prototypes]
838 | void sxe_hw_event_irq_auto_clear_set(struct sxe_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:838:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
838 | void sxe_hw_event_irq_auto_clear_set(struct sxe_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:843:6: error: no previous prototype for function 'sxe_hw_specific_irq_disable' [-Werror,-Wmissing-prototypes]
843 | void sxe_hw_specific_irq_disable(struct sxe_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:843:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
843 | void sxe_hw_specific_irq_disable(struct sxe_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:848:6: error: no previous prototype for function 'sxe_hw_specific_irq_enable' [-Werror,-Wmissing-prototypes]
848 | void sxe_hw_specific_irq_enable(struct sxe_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:848:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
848 | void sxe_hw_specific_irq_enable(struct sxe_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:876:6: error: no previous prototype for function 'sxe_hw_all_irq_disable' [-Werror,-Wmissing-prototypes]
876 | void sxe_hw_all_irq_disable(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:876:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
876 | void sxe_hw_all_irq_disable(struct sxe_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:994:5: error: no previous prototype for function 'sxe_hw_link_speed_get' [-Werror,-Wmissing-prototypes]
994 | u32 sxe_hw_link_speed_get(struct sxe_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_hw.c:994:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
994 | u32 sxe_hw_link_speed_get(struct sxe_hw *hw)
| ^
| static
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:136:5: error: no previous prototype for function 'sxe_msi_irq_init' [-Werror,-Wmissing-prototypes]
136 | int sxe_msi_irq_init(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:136:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
136 | int sxe_msi_irq_init(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:182:6: error: no previous prototype for function 'sxe_disable_dcb' [-Werror,-Wmissing-prototypes]
182 | void sxe_disable_dcb(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:182:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
182 | void sxe_disable_dcb(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:212:6: error: no previous prototype for function 'sxe_disable_rss' [-Werror,-Wmissing-prototypes]
212 | void sxe_disable_rss(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:212:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
212 | void sxe_disable_rss(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:729:6: error: no previous prototype for function 'sxe_lsc_irq_handler' [-Werror,-Wmissing-prototypes]
729 | void sxe_lsc_irq_handler(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:729:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
729 | void sxe_lsc_irq_handler(struct sxe_adapter *adapter)
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:745:6: error: no previous prototype for function 'sxe_mailbox_irq_handler' [-Werror,-Wmissing-prototypes]
745 | void sxe_mailbox_irq_handler(struct sxe_adapter *adapter)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_irq.c:745:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
745 | void sxe_mailbox_irq_handler(struct sxe_adapter *adapter)
| ^
| static
5 errors generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:70:6: error: no previous prototype for function 'sxe_allow_inval_mac' [-Werror,-Wmissing-prototypes]
70 | bool sxe_allow_inval_mac(void)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:70:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
70 | bool sxe_allow_inval_mac(void)
| ^
| static
1 error generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_phy.c:733:5: error: no previous prototype for function 'sxe_multispeed_sfp_link_configure' [-Werror,-Wmissing-prototypes]
733 | s32 sxe_multispeed_sfp_link_configure(struct sxe_adapter *adapter, u32 speed)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_phy.c:733:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
733 | s32 sxe_multispeed_sfp_link_configure(struct sxe_adapter *adapter, u32 speed)
| ^
| static
1 error generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_rx_proc.c:1431:6: error: no previous prototype for function 'sxe_headers_cleanup' [-Werror,-Wmissing-prototypes]
1431 | bool sxe_headers_cleanup(struct sxe_ring *rx_ring,
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_rx_proc.c:1431:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1431 | bool sxe_headers_cleanup(struct sxe_ring *rx_ring,
| ^
| static
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_rx_proc.c:1569:6: error: no previous prototype for function 'sxe_rx_buffer_page_offset_update' [-Werror,-Wmissing-prototypes]
1569 | void sxe_rx_buffer_page_offset_update(struct sxe_ring *rx_ring,
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_rx_proc.c:1569:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1569 | void sxe_rx_buffer_page_offset_update(struct sxe_ring *rx_ring,
| ^
| static
2 errors generated.
--
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c:766:6: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
766 | s32 ret;
| ^
>> drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c:1552:6: error: no previous prototype for function 'sxe_set_vf_link_enable' [-Werror,-Wmissing-prototypes]
1552 | void sxe_set_vf_link_enable(struct sxe_adapter *adapter, s32 vf_idx, s32 state)
| ^
drivers/net/ethernet/linkdata/sxe/sxepf/sxe_sriov.c:1552:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1552 | void sxe_set_vf_link_enable(struct sxe_adapter *adapter, s32 vf_idx, s32 state)
| ^
| static
2 errors generated.
--
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:160:6: error: no previous prototype for function 'sxevf_hw_stop' [-Werror,-Wmissing-prototypes]
160 | void sxevf_hw_stop(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:160:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
160 | void sxevf_hw_stop(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:187:6: error: no previous prototype for function 'sxevf_msg_write' [-Werror,-Wmissing-prototypes]
187 | void sxevf_msg_write(struct sxevf_hw *hw, u8 index, u32 msg)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:187:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
187 | void sxevf_msg_write(struct sxevf_hw *hw, u8 index, u32 msg)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:196:5: error: no previous prototype for function 'sxevf_msg_read' [-Werror,-Wmissing-prototypes]
196 | u32 sxevf_msg_read(struct sxevf_hw *hw, u8 index)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:196:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
196 | u32 sxevf_msg_read(struct sxevf_hw *hw, u8 index)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:206:5: error: no previous prototype for function 'sxevf_mailbox_read' [-Werror,-Wmissing-prototypes]
206 | u32 sxevf_mailbox_read(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:206:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
206 | u32 sxevf_mailbox_read(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:211:6: error: no previous prototype for function 'sxevf_mailbox_write' [-Werror,-Wmissing-prototypes]
211 | void sxevf_mailbox_write(struct sxevf_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
211 | void sxevf_mailbox_write(struct sxevf_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:216:6: error: no previous prototype for function 'sxevf_pf_req_irq_trigger' [-Werror,-Wmissing-prototypes]
216 | void sxevf_pf_req_irq_trigger(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:216:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
216 | void sxevf_pf_req_irq_trigger(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:221:6: error: no previous prototype for function 'sxevf_pf_ack_irq_trigger' [-Werror,-Wmissing-prototypes]
221 | void sxevf_pf_ack_irq_trigger(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:221:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
221 | void sxevf_pf_ack_irq_trigger(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:226:6: error: no previous prototype for function 'sxevf_event_irq_map' [-Werror,-Wmissing-prototypes]
226 | void sxevf_event_irq_map(struct sxevf_hw *hw, u16 vector)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:226:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
226 | void sxevf_event_irq_map(struct sxevf_hw *hw, u16 vector)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:240:6: error: no previous prototype for function 'sxevf_specific_irq_enable' [-Werror,-Wmissing-prototypes]
240 | void sxevf_specific_irq_enable(struct sxevf_hw *hw, u32 value)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:240:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
240 | void sxevf_specific_irq_enable(struct sxevf_hw *hw, u32 value)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:245:6: error: no previous prototype for function 'sxevf_irq_enable' [-Werror,-Wmissing-prototypes]
245 | void sxevf_irq_enable(struct sxevf_hw *hw, u32 mask)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:245:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
245 | void sxevf_irq_enable(struct sxevf_hw *hw, u32 mask)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:251:6: error: no previous prototype for function 'sxevf_irq_disable' [-Werror,-Wmissing-prototypes]
251 | void sxevf_irq_disable(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:251:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
251 | void sxevf_irq_disable(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:259:6: error: no previous prototype for function 'sxevf_hw_ring_irq_map' [-Werror,-Wmissing-prototypes]
259 | void sxevf_hw_ring_irq_map(struct sxevf_hw *hw, bool is_tx, u16 hw_ring_idx,
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:259:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
259 | void sxevf_hw_ring_irq_map(struct sxevf_hw *hw, bool is_tx, u16 hw_ring_idx,
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:276:6: error: no previous prototype for function 'sxevf_ring_irq_interval_set' [-Werror,-Wmissing-prototypes]
276 | void sxevf_ring_irq_interval_set(struct sxevf_hw *hw, u16 irq_idx, u32 interval)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:276:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
276 | void sxevf_ring_irq_interval_set(struct sxevf_hw *hw, u16 irq_idx, u32 interval)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:313:6: error: no previous prototype for function 'sxevf_hw_reset' [-Werror,-Wmissing-prototypes]
313 | void sxevf_hw_reset(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:313:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
313 | void sxevf_hw_reset(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:324:5: error: no previous prototype for function 'sxevf_link_state_get' [-Werror,-Wmissing-prototypes]
324 | u32 sxevf_link_state_get(struct sxevf_hw *hw)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:324:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
324 | u32 sxevf_link_state_get(struct sxevf_hw *hw)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:539:6: error: no previous prototype for function 'sxevf_tx_ring_switch' [-Werror,-Wmissing-prototypes]
539 | void sxevf_tx_ring_switch(struct sxevf_hw *hw, u8 reg_idx, bool is_on)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:539:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
539 | void sxevf_tx_ring_switch(struct sxevf_hw *hw, u8 reg_idx, bool is_on)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:594:6: error: no previous prototype for function 'sxevf_rx_ring_switch' [-Werror,-Wmissing-prototypes]
594 | void sxevf_rx_ring_switch(struct sxevf_hw *hw, u8 reg_idx, bool is_on)
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:594:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
594 | void sxevf_rx_ring_switch(struct sxevf_hw *hw, u8 reg_idx, bool is_on)
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:626:6: error: no previous prototype for function 'sxevf_rx_ring_desc_configure' [-Werror,-Wmissing-prototypes]
626 | void sxevf_rx_ring_desc_configure(struct sxevf_hw *hw, u32 desc_mem_len,
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:626:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
626 | void sxevf_rx_ring_desc_configure(struct sxevf_hw *hw, u32 desc_mem_len,
| ^
| static
>> drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:640:6: error: no previous prototype for function 'sxevf_rx_rcv_ctl_configure' [-Werror,-Wmissing-prototypes]
640 | void sxevf_rx_rcv_ctl_configure(struct sxevf_hw *hw, u8 reg_idx,
| ^
drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_hw.c:640:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
640 | void sxevf_rx_rcv_ctl_configure(struct sxevf_hw *hw, u8 reg_idx,
| ^
| static
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
..
vim +/sxe_debugfs_entries_init +432 drivers/net/ethernet/linkdata/sxe/sxepf/sxe_debugfs.c
431
> 432 void sxe_debugfs_entries_init(struct sxe_adapter *adapter)
433 {
434 struct dentry *dir;
435 const char *name = pci_name(adapter->pdev);
436
437 adapter->debugfs_entries = debugfs_create_dir(name, sxe_debugfs_root);
438 dir = debugfs_create_file("reg_ops", 0600, adapter->debugfs_entries,
439 adapter, &sxe_debugfs_reg_ops_fops);
440 if (!dir || dir == ERR_PTR(-ENODEV))
441 LOG_INFO_BDF("debugfs:reg_ops file create failed\n");
442
443 dir = debugfs_create_file("netdev_ops", 0600, adapter->debugfs_entries,
444 adapter, &sxe_debugfs_netdev_ops_fops);
445 if (!dir || dir == ERR_PTR(-ENODEV))
446 LOG_INFO_BDF("debugfs:netdev_ops file create failed\n");
447
448 dir = debugfs_create_file("hw_stats", 0400, adapter->debugfs_entries,
449 adapter, &sxe_debugfs_hw_stats_fops);
450 if (!dir || dir == ERR_PTR(-ENODEV))
451 LOG_INFO_BDF("debugfs:hw_stats file create failed\n");
452
453 dir = debugfs_create_file("sfp_info", 0400, adapter->debugfs_entries,
454 adapter, &sxe_debugfs_sfp_info_fops);
455 if (!dir || dir == ERR_PTR(-ENODEV))
456 LOG_INFO_BDF("debugfs:sfp_info file create failed\n");
457 }
458
> 459 void sxe_debugfs_entries_exit(struct sxe_adapter *adapter)
460 {
461 debugfs_remove_recursive(adapter->debugfs_entries);
462 adapter->debugfs_entries = NULL;
463 }
464
> 465 void sxe_debugfs_init(void)
466 {
467 sxe_debugfs_root = debugfs_create_dir(SXE_DRV_NAME, NULL);
468 }
469
> 470 void sxe_debugfs_exit(void)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:OLK-5.10] BUILD REGRESSION 3778f0b898118491b80dc9bcde38c1713662232c
by kernel test robot 25 Jun '25
by kernel test robot 25 Jun '25
25 Jun '25
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10
branch HEAD: 3778f0b898118491b80dc9bcde38c1713662232c !16578 ext4: ignore xattrs past end
Error/Warning (recently discovered and may have been fixed):
https://lore.kernel.org/oe-kbuild-all/202505280024.8UbNlKSa-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202505280046.3lWnWdOg-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202505301434.xq8uzhGR-lkp@intel.com
https://lore.kernel.org/oe-kbuild-all/202506042153.UZ29KeGA-lkp@intel.com
drivers/irqchip/irq-gic-v3-its.c:524:6: warning: no previous prototype for 'build_devid_pools' [-Wmissing-prototypes]
ld.lld: error: version script assignment of 'LINUX_2.6' to symbol '__vdso_sgx_enter_enclave' failed: symbol not defined
llvm-objcopy: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory
llvm-objdump: error: 'arch/x86/entry/vdso/vdso64.so.dbg': No such file or directory
mm/damon/core-test.h:284:2: warning: comparison of distinct pointer types ('typeof (__left) *' (aka 'unsigned int *') and 'typeof (__right) *' (aka 'int *')) [-Wcompare-distinct-pointer-types]
mm/hugetlb.c:2223:9: warning: variable 'gfp' set but not used [-Wunused-but-set-variable]
mm/khugepaged.c:1703: warning: Function parameter or member 'reliable' not described in 'collapse_file'
mm/page_alloc.c:3040:6: warning: no previous prototype for '__drain_all_pages' [-Wmissing-prototypes]
mm/page_alloc.c:3040:6: warning: no previous prototype for function '__drain_all_pages' [-Wmissing-prototypes]
mm/page_alloc.c:6794:23: warning: no previous prototype for function 'arch_memmap_init' [-Wmissing-prototypes]
mm/page_alloc.c:6912:6: warning: no previous prototype for '__zone_set_pageset_high_and_batch' [-Wmissing-prototypes]
mm/page_alloc.c:6912:6: warning: no previous prototype for function '__zone_set_pageset_high_and_batch' [-Wmissing-prototypes]
mm/slub.o: warning: objtool: kmem_cache_free()+0x43a: unreachable instruction
mm/slub.o: warning: objtool: kmem_cache_free()+0x519: unreachable instruction
Error/Warning ids grouped by kconfigs:
recent_errors
|-- arm64-allmodconfig
| |-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x0-in-asm
| |-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x1-in-asm
| `-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x2-in-asm
|-- arm64-allnoconfig
| |-- drivers-irqchip-irq-gic-v3-its.c:warning:no-previous-prototype-for-build_devid_pools
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-__drain_all_pages
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-__zone_set_pageset_high_and_batch
|-- arm64-randconfig-001-20250624
| |-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x0-in-asm
| |-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x1-in-asm
| `-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x2-in-asm
|-- arm64-randconfig-002-20250624
| |-- drivers-irqchip-irq-gic-v3-its.c:warning:no-previous-prototype-for-build_devid_pools
| |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-__drain_all_pages
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-__zone_set_pageset_high_and_batch
|-- arm64-randconfig-003-20250624
| |-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x0-in-asm
| |-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x1-in-asm
| `-- arch-arm64-include-asm-atomic_lse.h:error:unknown-register-name-x2-in-asm
|-- x86_64-allnoconfig
| |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined
| |-- llvm-objcopy:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory
| |-- llvm-objdump:error:arch-x86-entry-vdso-vdso64.so.dbg:No-such-file-or-directory
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
|-- x86_64-allyesconfig
| |-- mm-damon-core-test.h:warning:comparison-of-distinct-pointer-types-(-typeof-(__left)-(aka-unsigned-int-)-and-typeof-(__right)-(aka-int-))
| |-- mm-hugetlb.c:warning:variable-gfp-set-but-not-used
| |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
|-- x86_64-buildonly-randconfig-001-20250624
| |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined
| |-- mm-damon-core-test.h:warning:comparison-of-distinct-pointer-types-(-typeof-(__left)-(aka-unsigned-int-)-and-typeof-(__right)-(aka-int-))
| |-- mm-hugetlb.c:warning:variable-gfp-set-but-not-used
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
|-- x86_64-buildonly-randconfig-002-20250624
| |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-__drain_all_pages
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-__zone_set_pageset_high_and_batch
|-- x86_64-buildonly-randconfig-003-20250624
| |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
|-- x86_64-buildonly-randconfig-004-20250624
| |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined
| |-- mm-damon-core-test.h:warning:comparison-of-distinct-pointer-types-(-typeof-(__left)-(aka-unsigned-int-)-and-typeof-(__right)-(aka-int-))
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
| `-- mm-slub.o:warning:objtool:kmem_cache_free:unreachable-instruction
|-- x86_64-buildonly-randconfig-005-20250624
| |-- ld.lld:error:version-script-assignment-of-LINUX_2.-to-symbol-__vdso_sgx_enter_enclave-failed:symbol-not-defined
| |-- mm-hugetlb.c:warning:variable-gfp-set-but-not-used
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
|-- x86_64-buildonly-randconfig-006-20250624
| |-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-__drain_all_pages
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-__zone_set_pageset_high_and_batch
|-- x86_64-defconfig
| |-- block-bio.c:warning:Excess-function-parameter-nr_iovecs-description-in-bio_alloc_bioset
| |-- block-bio.c:warning:Function-parameter-or-member-nr_iovecs_int-not-described-in-bio_alloc_bioset
| |-- mm-page_alloc.c:warning:no-previous-prototype-for-__drain_all_pages
| `-- mm-page_alloc.c:warning:no-previous-prototype-for-__zone_set_pageset_high_and_batch
`-- x86_64-rhel-9.4-rust
|-- mm-hugetlb.c:warning:variable-gfp-set-but-not-used
|-- mm-khugepaged.c:warning:Function-parameter-or-member-reliable-not-described-in-collapse_file
|-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__drain_all_pages
|-- mm-page_alloc.c:warning:no-previous-prototype-for-function-__zone_set_pageset_high_and_batch
|-- mm-page_alloc.c:warning:no-previous-prototype-for-function-arch_memmap_init
`-- mm-slub.o:warning:objtool:kmem_cache_free:unreachable-instruction
elapsed time: 821m
configs tested: 16
configs skipped: 62
tested configs:
arm64 allmodconfig clang-19
arm64 allnoconfig gcc-15.1.0
arm64 randconfig-001-20250624 clang-21
arm64 randconfig-002-20250624 gcc-10.5.0
arm64 randconfig-003-20250624 clang-21
arm64 randconfig-004-20250624 clang-21
x86_64 allnoconfig clang-20
x86_64 allyesconfig clang-20
x86_64 buildonly-randconfig-001-20250624 clang-20
x86_64 buildonly-randconfig-002-20250624 gcc-12
x86_64 buildonly-randconfig-003-20250624 clang-20
x86_64 buildonly-randconfig-004-20250624 clang-20
x86_64 buildonly-randconfig-005-20250624 clang-20
x86_64 buildonly-randconfig-006-20250624 gcc-12
x86_64 defconfig gcc-11
x86_64 rhel-9.4-rust clang-18
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[openeuler:OLK-5.10 2983/2983] block/bio.c:412: warning: Function parameter or member 'nr_iovecs_int' not described in 'bio_alloc_bioset'
by kernel test robot 25 Jun '25
by kernel test robot 25 Jun '25
25 Jun '25
Hi Li,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 3778f0b898118491b80dc9bcde38c1713662232c
commit: 6381672514c4d94637cd4db830b8644440abe99a [2983/2983] block: fix kabi broken
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20250625/202506250532.Z1zFLzpP-lkp@…)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250625/202506250532.Z1zFLzpP-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/202506250532.Z1zFLzpP-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> block/bio.c:412: warning: Function parameter or member 'nr_iovecs_int' not described in 'bio_alloc_bioset'
>> block/bio.c:412: warning: Excess function parameter 'nr_iovecs' description in 'bio_alloc_bioset'
vim +412 block/bio.c
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 374
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 375 /**
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 376 * bio_alloc_bioset - allocate a bio for I/O
519c8e9ffd8614 block/bio.c Randy Dunlap 2017-10-16 377 * @gfp_mask: the GFP_* mask given to the slab allocator
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 378 * @nr_iovecs: number of iovecs to pre-allocate
db18efac0bd644 fs/bio.c Jaak Ristioja 2010-01-15 379 * @bs: the bio_set to allocate from.
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 380 *
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 381 * Description:
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 382 * If @bs is NULL, uses kmalloc() to allocate the bio; else the allocation is
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 383 * backed by the @bs's mempool.
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 384 *
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 385 * When @bs is not NULL, if %__GFP_DIRECT_RECLAIM is set then bio_alloc will
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 386 * always be able to allocate a bio. This is due to the mempool guarantees.
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 387 * To make this work, callers must never allocate more than 1 bio at a time
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 388 * from this pool. Callers that need to allocate more than 1 bio must always
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 389 * submit the previously allocated bio for IO before attempting to allocate
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 390 * a new one. Failure to do so can cause deadlocks under memory pressure.
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 391 *
ed00aabd5eb9fb block/bio.c Christoph Hellwig 2020-07-01 392 * Note that when running under submit_bio_noacct() (i.e. any block
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 393 * driver), bios are not submitted until after you return - see the code in
ed00aabd5eb9fb block/bio.c Christoph Hellwig 2020-07-01 394 * submit_bio_noacct() that converts recursion into iteration, to prevent
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 395 * stack overflows.
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 396 *
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 397 * This would normally mean allocating multiple bios under
ed00aabd5eb9fb block/bio.c Christoph Hellwig 2020-07-01 398 * submit_bio_noacct() would be susceptible to deadlocks, but we have
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 399 * deadlock avoidance code that resubmits any blocked bios from a rescuer
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 400 * thread.
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 401 *
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 402 * However, we do not guarantee forward progress for allocations from other
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 403 * mempools. Doing multiple allocations from the same mempool under
ed00aabd5eb9fb block/bio.c Christoph Hellwig 2020-07-01 404 * submit_bio_noacct() should be avoided - instead, use bio_set's front_pad
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 405 * for per bio allocations.
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 406 *
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 407 * RETURNS:
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 408 * Pointer to new bio on success, NULL on failure.
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 409 */
6381672514c4d9 block/bio.c Li Lingfeng 2025-02-10 410 struct bio *bio_alloc_bioset(gfp_t gfp_mask, unsigned int nr_iovecs_int,
7a88fa19194458 block/bio.c Dan Carpenter 2017-03-23 411 struct bio_set *bs)
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 @412 {
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 413 gfp_t saved_gfp = gfp_mask;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 414 unsigned front_pad;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 415 unsigned inline_vecs;
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 416 struct bio_vec *bvl = NULL;
451a9ebf653d28 fs/bio.c Tejun Heo 2009-04-15 417 struct bio *bio;
451a9ebf653d28 fs/bio.c Tejun Heo 2009-04-15 418 void *p;
6381672514c4d9 block/bio.c Li Lingfeng 2025-02-10 419 unsigned short nr_iovecs = (unsigned short)nr_iovecs_int;
0a0d96b03a1f3b fs/bio.c Jens Axboe 2008-09-11 420
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 421 if (!bs) {
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 422 if (nr_iovecs > UIO_MAXIOV)
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 423 return NULL;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 424
1f4fe21cf45c79 block/bio.c Gustavo A. R. Silva 2020-06-19 425 p = kmalloc(struct_size(bio, bi_inline_vecs, nr_iovecs), gfp_mask);
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 426 front_pad = 0;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 427 inline_vecs = nr_iovecs;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 428 } else {
d8f429e1669b97 block/bio.c Junichi Nomura 2014-10-03 429 /* should not use nobvec bioset for nr_iovecs > 0 */
8aa6ba2f6e3dea block/bio.c Kent Overstreet 2018-05-08 430 if (WARN_ON_ONCE(!mempool_initialized(&bs->bvec_pool) &&
8aa6ba2f6e3dea block/bio.c Kent Overstreet 2018-05-08 431 nr_iovecs > 0))
d8f429e1669b97 block/bio.c Junichi Nomura 2014-10-03 432 return NULL;
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 433 /*
ed00aabd5eb9fb block/bio.c Christoph Hellwig 2020-07-01 434 * submit_bio_noacct() converts recursion to iteration; this
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 435 * means if we're running beneath it, any bios we allocate and
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 436 * submit will not be submitted (and thus freed) until after we
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 437 * return.
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 438 *
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 439 * This exposes us to a potential deadlock if we allocate
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 440 * multiple bios from the same bio_set() while running
ed00aabd5eb9fb block/bio.c Christoph Hellwig 2020-07-01 441 * underneath submit_bio_noacct(). If we were to allocate
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 442 * multiple bios (say a stacking block driver that was splitting
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 443 * bios), we would deadlock if we exhausted the mempool's
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 444 * reserve.
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 445 *
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 446 * We solve this, and guarantee forward progress, with a rescuer
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 447 * workqueue per bio_set. If we go to allocate and there are
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 448 * bios on current->bio_list, we first try the allocation
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 449 * without __GFP_DIRECT_RECLAIM; if that fails, we punt those
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 450 * bios we would be blocking to the rescuer workqueue before
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 451 * we retry with the original gfp_flags.
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 452 */
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 453
f5fe1b51905df7 block/bio.c NeilBrown 2017-03-10 454 if (current->bio_list &&
f5fe1b51905df7 block/bio.c NeilBrown 2017-03-10 455 (!bio_list_empty(¤t->bio_list[0]) ||
47e0fb461fca1a block/bio.c NeilBrown 2017-06-18 456 !bio_list_empty(¤t->bio_list[1])) &&
47e0fb461fca1a block/bio.c NeilBrown 2017-06-18 457 bs->rescue_workqueue)
d0164adc89f6bb block/bio.c Mel Gorman 2015-11-06 458 gfp_mask &= ~__GFP_DIRECT_RECLAIM;
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 459
8aa6ba2f6e3dea block/bio.c Kent Overstreet 2018-05-08 460 p = mempool_alloc(&bs->bio_pool, gfp_mask);
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 461 if (!p && gfp_mask != saved_gfp) {
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 462 punt_bios_to_rescuer(bs);
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 463 gfp_mask = saved_gfp;
8aa6ba2f6e3dea block/bio.c Kent Overstreet 2018-05-08 464 p = mempool_alloc(&bs->bio_pool, gfp_mask);
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 465 }
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 466
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 467 front_pad = bs->front_pad;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 468 inline_vecs = BIO_INLINE_VECS;
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 469 }
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 470
451a9ebf653d28 fs/bio.c Tejun Heo 2009-04-15 471 if (unlikely(!p))
451a9ebf653d28 fs/bio.c Tejun Heo 2009-04-15 472 return NULL;
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 473
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 474 bio = p + front_pad;
3a83f4677539bc block/bio.c Ming Lei 2016-11-22 475 bio_init(bio, NULL, 0);
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 476
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 477 if (nr_iovecs > inline_vecs) {
ed996a52c868b6 block/bio.c Christoph Hellwig 2016-07-19 478
958384da6a734e block/bio.c Christoph Hellwig 2025-02-10 479 bvl = bvec_alloc(&bs->bvec_pool, &nr_iovecs, gfp_mask);
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 480 if (!bvl && gfp_mask != saved_gfp) {
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 481 punt_bios_to_rescuer(bs);
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 482 gfp_mask = saved_gfp;
958384da6a734e block/bio.c Christoph Hellwig 2025-02-10 483 bvl = bvec_alloc(&bs->bvec_pool, &nr_iovecs, gfp_mask);
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 484 }
df2cb6daa4cbc3 fs/bio.c Kent Overstreet 2012-09-10 485
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 486 if (unlikely(!bvl))
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 487 goto err_free;
a38352e0ac02db fs/bio.c Kent Overstreet 2012-05-25 488
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 489 } else if (nr_iovecs) {
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 490 bvl = bio->bi_inline_vecs;
392ddc32982a5c fs/bio.c Jens Axboe 2008-12-23 491 }
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 492
3f86a82aeb03e6 fs/bio.c Kent Overstreet 2012-09-06 493 bio->bi_pool = bs;
392ddc32982a5c fs/bio.c Jens Axboe 2008-12-23 494 bio->bi_max_vecs = nr_iovecs;
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 495 bio->bi_io_vec = bvl;
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 496 return bio;
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 497
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 498 err_free:
8aa6ba2f6e3dea block/bio.c Kent Overstreet 2018-05-08 499 mempool_free(p, &bs->bio_pool);
34053979fb1d92 fs/bio.c Ingo Molnar 2009-02-21 500 return NULL;
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 501 }
a112a71d45b5e4 fs/bio.c H Hartley Sweeten 2009-09-26 502 EXPORT_SYMBOL(bio_alloc_bioset);
^1da177e4c3f41 fs/bio.c Linus Torvalds 2005-04-16 503
:::::: The code at line 412 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
1
0

[PATCH openEuler-1.0-LTS] spmi: trace: fix stack-out-of-bound access in SPMI tracing functions
by Tengda Wu 24 Jun '25
by Tengda Wu 24 Jun '25
24 Jun '25
From: David Collins <quic_collinsd(a)quicinc.com>
stable inclusion
from stable-v4.19.256
commit ac730c72bddc889f5610d51d8a7abf425e08da1a
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICG8JW
CVE: CVE-2022-50094
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit 2af28b241eea816e6f7668d1954f15894b45d7e3 upstream.
trace_spmi_write_begin() and trace_spmi_read_end() both call
memcpy() with a length of "len + 1". This leads to one extra
byte being read beyond the end of the specified buffer. Fix
this out-of-bound memory access by using a length of "len"
instead.
Here is a KASAN log showing the issue:
BUG: KASAN: stack-out-of-bounds in trace_event_raw_event_spmi_read_end+0x1d0/0x234
Read of size 2 at addr ffffffc0265b7540 by task thermal(a)2.0-ser/1314
...
Call trace:
dump_backtrace+0x0/0x3e8
show_stack+0x2c/0x3c
dump_stack_lvl+0xdc/0x11c
print_address_description+0x74/0x384
kasan_report+0x188/0x268
kasan_check_range+0x270/0x2b0
memcpy+0x90/0xe8
trace_event_raw_event_spmi_read_end+0x1d0/0x234
spmi_read_cmd+0x294/0x3ac
spmi_ext_register_readl+0x84/0x9c
regmap_spmi_ext_read+0x144/0x1b0 [regmap_spmi]
_regmap_raw_read+0x40c/0x754
regmap_raw_read+0x3a0/0x514
regmap_bulk_read+0x418/0x494
adc5_gen3_poll_wait_hs+0xe8/0x1e0 [qcom_spmi_adc5_gen3]
...
__arm64_sys_read+0x4c/0x60
invoke_syscall+0x80/0x218
el0_svc_common+0xec/0x1c8
...
addr ffffffc0265b7540 is located in stack of task thermal(a)2.0-ser/1314 at offset 32 in frame:
adc5_gen3_poll_wait_hs+0x0/0x1e0 [qcom_spmi_adc5_gen3]
this frame has 1 object:
[32, 33) 'status'
Memory state around the buggy address:
ffffffc0265b7400: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
ffffffc0265b7480: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffc0265b7500: 00 00 00 00 f1 f1 f1 f1 01 f3 f3 f3 00 00 00 00
^
ffffffc0265b7580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffffc0265b7600: f1 f1 f1 f1 01 f2 07 f2 f2 f2 01 f3 00 00 00 00
==================================================================
Fixes: a9fce374815d ("spmi: add command tracepoints for SPMI")
Cc: stable(a)vger.kernel.org
Reviewed-by: Stephen Boyd <sboyd(a)kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt(a)goodmis.org>
Signed-off-by: David Collins <quic_collinsd(a)quicinc.com>
Link: https://lore.kernel.org/r/20220627235512.2272783-1-quic_collinsd@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Tengda Wu <wutengda2(a)huawei.com>
---
include/trace/events/spmi.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/trace/events/spmi.h b/include/trace/events/spmi.h
index 8b60efe18ba6..a6819fd85cdf 100644
--- a/include/trace/events/spmi.h
+++ b/include/trace/events/spmi.h
@@ -21,15 +21,15 @@ TRACE_EVENT(spmi_write_begin,
__field ( u8, sid )
__field ( u16, addr )
__field ( u8, len )
- __dynamic_array ( u8, buf, len + 1 )
+ __dynamic_array ( u8, buf, len )
),
TP_fast_assign(
__entry->opcode = opcode;
__entry->sid = sid;
__entry->addr = addr;
- __entry->len = len + 1;
- memcpy(__get_dynamic_array(buf), buf, len + 1);
+ __entry->len = len;
+ memcpy(__get_dynamic_array(buf), buf, len);
),
TP_printk("opc=%d sid=%02d addr=0x%04x len=%d buf=0x[%*phD]",
@@ -92,7 +92,7 @@ TRACE_EVENT(spmi_read_end,
__field ( u16, addr )
__field ( int, ret )
__field ( u8, len )
- __dynamic_array ( u8, buf, len + 1 )
+ __dynamic_array ( u8, buf, len )
),
TP_fast_assign(
@@ -100,8 +100,8 @@ TRACE_EVENT(spmi_read_end,
__entry->sid = sid;
__entry->addr = addr;
__entry->ret = ret;
- __entry->len = len + 1;
- memcpy(__get_dynamic_array(buf), buf, len + 1);
+ __entry->len = len;
+ memcpy(__get_dynamic_array(buf), buf, len);
),
TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d len=%02d buf=0x[%*phD]",
--
2.34.1
2
1
hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/release-management/issues/IC9Q31
--------------------------------
When the prefetch state is not XCALL_CACHE_NONE or XCALL_CACHE_READY for
a long time, such as XCALL_CACHE_CANCEL or XCALL_CACHE_PREFETCH,
the following soft lockup occurs. Fix it by voluntarily yield the CPU
when a timeout occurs in the xcall read while loop.
watchdog: BUG: soft lockup - CPU#2 stuck for 111s! [syz-fuzzer:467]
Modules linked in:
CPU: 2 PID: 467 Comm: syz-fuzzer Not tainted 5.10.0-00019-ga473cf168de7 #10
Hardware name: linux,dummy-virt (DT)
pstate: 80000005 (Nzcv daif -PAN -UAO -TCO BTYPE=--)
pc : check_kcov_mode kernel/kcov.c:165 [inline]
pc : __sanitizer_cov_trace_pc+0x64/0x114 kernel/kcov.c:197
lr : __ll_sc__cmpxchg_case_mb_32 arch/arm64/include/asm/atomic_ll_sc.h:292 [inline]
lr : __cmpxchg_case_mb_32 arch/arm64/include/asm/cmpxchg.h:129 [inline]
lr : __cmpxchg_mb arch/arm64/include/asm/cmpxchg.h:175 [inline]
lr : atomic_cmpxchg include/asm-generic/atomic-instrumented.h:655 [inline]
lr : transition_state fs/eventpoll.c:907 [inline]
lr : xcall_read+0x360/0x960 fs/eventpoll.c:1051
sp : ffffa00017a17c00
x29: ffffa00017a17c00 x28: ffff0000cbbd9600
x27: 0000000000000000 x26: 0000000000000000
x25: 000000400097e000 x24: 0000000000001000
x23: ffff0000cbd11000 x22: 0000000000000000
x21: 0000000000000003 x20: 0000000000000030
x19: ffffa000108e1f24 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: 0000000000000000 x12: ffff8000197a224e
x11: 1fffe000197a224d x10: ffff8000197a224d
x9 : dfffa00000000000 x8 : ffff0000cbd1126b
x7 : 0000000000000001 x6 : 00007fffe685ddb3
x5 : ffff0000cbd11268 x4 : ffff8000197a224e
x3 : ffffa000108e1c18 x2 : 0000000000000001
x1 : ffff0000cbbd9600 x0 : 0000000000000000
Call trace:
check_kcov_mode kernel/kcov.c:163 [inline]
__sanitizer_cov_trace_pc+0x64/0x114 kernel/kcov.c:197
__ll_sc__cmpxchg_case_mb_32 arch/arm64/include/asm/atomic_ll_sc.h:292 [inline]
__cmpxchg_case_mb_32 arch/arm64/include/asm/cmpxchg.h:129 [inline]
__cmpxchg_mb arch/arm64/include/asm/cmpxchg.h:175 [inline]
atomic_cmpxchg include/asm-generic/atomic-instrumented.h:655 [inline]
transition_state fs/eventpoll.c:907 [inline]
xcall_read+0x360/0x960 fs/eventpoll.c:1051
xcall_read_begin+0x68/0xa4 fs/eventpoll.c:1100
ksys_read+0xc0/0x240 fs/read_write.c:628
__do_sys_read fs/read_write.c:649 [inline]
__se_sys_read fs/read_write.c:647 [inline]
__arm64_sys_read+0x54/0x7c fs/read_write.c:647
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x84/0x230 arch/arm64/kernel/syscall.c:51
el0_svc_common.constprop.0+0x1f4/0x210 arch/arm64/kernel/syscall.c:211
do_el0_svc+0xa0/0x190 arch/arm64/kernel/syscall.c:309
el0_svc+0x24/0x34 arch/arm64/kernel/entry-common.c:381
el0_sync_handler+0x194/0x1a0 arch/arm64/kernel/entry-common.c:419
fast_work_pending464+0x178/0x19
Fixes: 7e1291339cb5 ("eventpoll: Support xcall async prefetch")
Signed-off-by: Jinjie Ruan <ruanjinjie(a)huawei.com>
---
fs/eventpoll.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index dc6bd16490bc..dd11e92994c9 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1030,8 +1030,10 @@ void free_prefetch_item(struct file *file)
kfree(pfi);
}
+#define MAX_READY_WAIT_TIME msecs_to_jiffies(2)
static int xcall_read(struct prefetch_item *pfi, char __user *buf, size_t count)
{
+ unsigned long end = jiffies + MAX_READY_WAIT_TIME;
ssize_t copy_len = 0;
/*
@@ -1050,6 +1052,13 @@ static int xcall_read(struct prefetch_item *pfi, char __user *buf, size_t count)
*/
if (transition_state(pfi, XCALL_CACHE_NONE, XCALL_CACHE_CANCEL))
goto slow_read;
+
+ if (time_after(jiffies, end)) {
+ pr_warn("xcall read wait prefetch state %d more than 2ms\n",
+ atomic_read(&pfi->state));
+ cond_resched();
+ end = jiffies + MAX_READY_WAIT_TIME;
+ }
}
copy_len = pfi->len;
@@ -1128,7 +1137,7 @@ static int get_async_prefetch_cpu(struct prefetch_item *pfi)
return pfi->cpu;
}
-static void ep_prefetch_item_enqueue(struct eventpoll *ep, struct epitem *epi)
+static void ep_prefetch_item_enqueue(struct epitem *epi)
{
struct prefetch_item *pfi;
int cpu, err;
@@ -2156,7 +2165,7 @@ static __poll_t ep_send_events_proc(struct eventpoll *ep, struct list_head *head
continue;
#ifdef CONFIG_XCALL_PREFETCH
- ep_prefetch_item_enqueue(ep, epi);
+ ep_prefetch_item_enqueue(epi);
#endif
if (__put_user(revents, &uevent->events) ||
--
2.34.1
2
1

24 Jun '25
From: Zheng Zucheng <zhengzucheng(a)huawei.com>
hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/ICE7WC
--------------------------------
This feature allows users to use CPU quota more flexibly when CPU is
idle and it will cause the CPU quota to be exceeded. So, it cannot be
used in scenarios where there are strict restrictions on the use of the
CPU quota, such as some commercial scenarios that charge based on the
use of CPU quota.
Signed-off-by: Zheng Zucheng <zhengzucheng(a)huawei.com>
Signed-off-by: Liao Chang <liaochang1(a)huawei.com>
Signed-off-by: Cheng Yu <serein.chengyu(a)huawei.com>
---
arch/arm64/Kconfig | 1 +
arch/arm64/configs/openeuler_defconfig | 1 +
arch/arm64/kernel/topology.c | 30 +++++
include/linux/sched/sysctl.h | 4 +
init/Kconfig | 18 +++
kernel/sched/core.c | 32 ++++++
kernel/sched/fair.c | 152 ++++++++++++++++++++++++-
kernel/sched/features.h | 4 +
kernel/sched/idle.c | 7 ++
kernel/sched/sched.h | 12 ++
kernel/sysctl.c | 11 ++
11 files changed, 268 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index eb30ef59aca2..4ba485650d0a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -80,6 +80,7 @@ config ARM64
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_SUPPORTS_SCHED_KEEP_ON_CORE
select ARCH_SUPPORTS_SCHED_PARAL
+ select ARCH_SUPPORTS_SCHED_SOFT_QUOTA
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT
select ARCH_WANT_DEFAULT_BPF_JIT
diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig
index be1faf2da008..1e1e70a6736d 100644
--- a/arch/arm64/configs/openeuler_defconfig
+++ b/arch/arm64/configs/openeuler_defconfig
@@ -191,6 +191,7 @@ CONFIG_NET_NS=y
CONFIG_SCHED_STEAL=y
CONFIG_SCHED_KEEP_ON_CORE=y
CONFIG_SCHED_PARAL=y
+CONFIG_SCHED_SOFT_QUOTA=y
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_SCHED_AUTOGROUP=y
# CONFIG_SYSFS_DEPRECATED is not set
diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c
index 785de5b9696d..4c7f3687356d 100644
--- a/arch/arm64/kernel/topology.c
+++ b/arch/arm64/kernel/topology.c
@@ -363,6 +363,36 @@ void topology_scale_freq_tick(void)
this_cpu_write(arch_const_cycles_prev, const_cnt);
}
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+static DEFINE_PER_CPU(int, sibling_idle) = 1;
+
+int is_sibling_idle(void)
+{
+ return this_cpu_read(sibling_idle);
+}
+
+static void smt_measurement_begin(void)
+{
+}
+
+static void smt_measurement_done(void)
+{
+}
+#else
+static inline void smt_measurement_begin(void) { }
+static inline void smt_measurement_done(void) { }
+#endif
+
+void arch_cpu_idle_enter(void)
+{
+ smt_measurement_begin();
+}
+
+void arch_cpu_idle_exit(void)
+{
+ smt_measurement_done();
+}
+
#ifdef CONFIG_ACPI_CPPC_LIB
#include <acpi/cppc_acpi.h>
diff --git a/include/linux/sched/sysctl.h b/include/linux/sched/sysctl.h
index 9f998be56bdd..90021477ea4c 100644
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@ -48,6 +48,10 @@ extern unsigned int sysctl_smart_grid_strategy_ctrl;
extern int sysctl_affinity_adjust_delay_ms;
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+extern unsigned int sysctl_soft_runtime_ratio;
+#endif
+
enum sched_tunable_scaling {
SCHED_TUNABLESCALING_NONE,
SCHED_TUNABLESCALING_LOG,
diff --git a/init/Kconfig b/init/Kconfig
index 5f88cce193e8..2ee50c638ca3 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1411,6 +1411,24 @@ config SCHED_PARAL
3. The existing "qos dynamic affinity" and "qos smart grid"
features must not be used simultaneously.
+#
+# For architectures that want to enable the support for SCHED_SOFT_QUOTA
+#
+config ARCH_SUPPORTS_SCHED_SOFT_QUOTA
+ bool
+
+config SCHED_SOFT_QUOTA
+ bool "More flexible use of CPU quota"
+ depends on ARCH_SUPPORTS_SCHED_SOFT_QUOTA
+ depends on CFS_BANDWIDTH
+ default n
+ help
+ This option allows users to use CPU quota more flexibly when CPU
+ is idle. It is better for users to have some understanding of
+ CFS_BANDWIDTH. It cannot be used in scenarios where there are strict
+ restrictions on the use of the CPU quota, such as some commercial
+ scenarios that charge based on the use of CPU quota.
+
config CHECKPOINT_RESTORE
bool "Checkpoint/restore support"
select PROC_CHILDREN
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 457eeebc7b62..72cb2c1adb7b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -9902,6 +9902,30 @@ static int cpu_steal_task_write(struct cgroup_subsys_state *css,
}
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+static int cpu_soft_quota_write(struct cgroup_subsys_state *css,
+ struct cftype *cftype, s64 soft_quota)
+{
+ struct task_group *tg = css_tg(css);
+
+ if (soft_quota != 1 && soft_quota != 0)
+ return -EINVAL;
+
+ if (tg->soft_quota == soft_quota)
+ return 0;
+
+ tg->soft_quota = soft_quota;
+
+ return 0;
+}
+
+static inline s64 cpu_soft_quota_read(struct cgroup_subsys_state *css,
+ struct cftype *cft)
+{
+ return css_tg(css)->soft_quota;
+}
+#endif
+
#ifdef CONFIG_BPF_SCHED
void sched_settag(struct task_struct *tsk, s64 tag)
{
@@ -10064,6 +10088,14 @@ static struct cftype cpu_legacy_files[] = {
.write_s64 = cpu_qos_write,
},
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ {
+ .name = "soft_quota",
+ .flags = CFTYPE_NOT_ON_ROOT,
+ .read_s64 = cpu_soft_quota_read,
+ .write_s64 = cpu_soft_quota_write,
+ },
+#endif
#ifdef CONFIG_QOS_SCHED_SMT_EXPELLER
{
.name = "smt_expell",
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b7544a14225c..4731711fbec4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -140,6 +140,10 @@ static int unthrottle_qos_cfs_rqs(int cpu);
static bool qos_smt_expelled(int this_cpu);
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+static DEFINE_PER_CPU_SHARED_ALIGNED(struct list_head, soft_quota_throttled_cfs_rq);
+#endif
+
#ifdef CONFIG_QOS_SCHED_MULTILEVEL
#define QOS_LEVEL_WEIGHT_OFFLINE_EX 1
#define QOS_LEVEL_WEIGHT_OFFLINE 10
@@ -439,10 +443,11 @@ static inline struct sched_entity *parent_entity(struct sched_entity *se)
return se->parent;
}
-static void
+static bool
find_matching_se(struct sched_entity **se, struct sched_entity **pse)
{
int se_depth, pse_depth;
+ bool ret = false;
/*
* preemption test can be made between sibling entities who are in the
@@ -456,6 +461,10 @@ find_matching_se(struct sched_entity **se, struct sched_entity **pse)
pse_depth = (*pse)->depth;
while (se_depth > pse_depth) {
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (!ret && cfs_rq_of(*se)->soft_quota_enable == 1)
+ ret = true;
+#endif
se_depth--;
*se = parent_entity(*se);
}
@@ -466,9 +475,15 @@ find_matching_se(struct sched_entity **se, struct sched_entity **pse)
}
while (!is_same_group(*se, *pse)) {
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (!ret && cfs_rq_of(*se)->soft_quota_enable == 1)
+ ret = true;
+#endif
*se = parent_entity(*se);
*pse = parent_entity(*pse);
}
+
+ return ret;
}
#else /* !CONFIG_FAIR_GROUP_SCHED */
@@ -503,9 +518,10 @@ static inline struct sched_entity *parent_entity(struct sched_entity *se)
return NULL;
}
-static inline void
+static inline bool
find_matching_se(struct sched_entity **se, struct sched_entity **pse)
{
+ return false;
}
#endif /* CONFIG_FAIR_GROUP_SCHED */
@@ -5396,6 +5412,14 @@ static bool throttle_cfs_rq(struct cfs_rq *cfs_rq)
*/
cfs_rq->throttled = 1;
cfs_rq->throttled_clock = rq_clock(rq);
+
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (cfs_rq->tg->soft_quota == 1) {
+ list_add(&cfs_rq->soft_quota_throttled_list,
+ &per_cpu(soft_quota_throttled_cfs_rq, cpu_of(rq)));
+ }
+#endif
+
return true;
}
@@ -5414,6 +5438,10 @@ void unthrottle_cfs_rq(struct cfs_rq *cfs_rq)
se = cfs_rq->tg->se[cpu_of(rq)];
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ list_del_init(&cfs_rq->soft_quota_throttled_list);
+#endif
+
#ifdef CONFIG_QOS_SCHED
/*
* if this cfs_rq throttled by qos, not need unthrottle it.
@@ -5531,6 +5559,16 @@ static void distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
struct rq_flags rf;
rq_lock_irqsave(rq, &rf);
+
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (cfs_rq->soft_quota_enable == 1) {
+ if (cfs_rq->runtime_remaining > 0)
+ cfs_rq->runtime_remaining = 0;
+
+ cfs_rq->soft_quota_enable = 0;
+ }
+#endif
+
if (!cfs_rq_throttled(cfs_rq))
goto next;
@@ -5573,6 +5611,17 @@ static void distribute_cfs_runtime(struct cfs_bandwidth *cfs_b)
rcu_read_unlock();
}
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+static inline void init_tg_sum_soft_runtime(struct cfs_bandwidth *cfs_b)
+{
+ unsigned int cpu;
+ struct task_group *tg = container_of(cfs_b, struct task_group, cfs_bandwidth);
+
+ for_each_possible_cpu(cpu)
+ tg->cfs_rq[cpu]->sum_soft_runtime = 0;
+}
+#endif
+
/*
* Responsible for refilling a task_group's bandwidth and unthrottling its
* cfs_rqs as appropriate. If there has been no activity within the last
@@ -5590,6 +5639,10 @@ static int do_sched_cfs_period_timer(struct cfs_bandwidth *cfs_b, int overrun, u
throttled = !list_empty(&cfs_b->throttled_cfs_rq);
cfs_b->nr_periods += overrun;
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ init_tg_sum_soft_runtime(cfs_b);
+#endif
+
/* Refill extra burst quota even if cfs_b->idle */
__refill_cfs_bandwidth_runtime(cfs_b);
@@ -5898,6 +5951,9 @@ static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq)
#ifdef CONFIG_QOS_SCHED
INIT_LIST_HEAD(&cfs_rq->qos_throttled_list);
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ INIT_LIST_HEAD(&cfs_rq->soft_quota_throttled_list);
+#endif
}
void start_cfs_bandwidth(struct cfs_bandwidth *cfs_b)
@@ -8536,6 +8592,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
struct cfs_rq *cfs_rq = task_cfs_rq(curr);
int scale = cfs_rq->nr_running >= sched_nr_latency;
int next_buddy_marked = 0;
+ bool ret = 0;
if (unlikely(se == pse))
return;
@@ -8590,7 +8647,13 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_
if (unlikely(p->policy != SCHED_NORMAL) || !sched_feat(WAKEUP_PREEMPTION))
return;
- find_matching_se(&se, &pse);
+ ret = find_matching_se(&se, &pse);
+
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (ret)
+ goto preempt;
+#endif
+
update_curr(cfs_rq_of(se));
BUG_ON(!pse);
if (wakeup_preempt_entity(se, pse) == 1) {
@@ -13823,6 +13886,9 @@ static void task_change_group_fair(struct task_struct *p, int type)
void free_fair_sched_group(struct task_group *tg)
{
int i;
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ struct cfs_rq *cfs_rq;
+#endif
destroy_cfs_bandwidth(tg_cfs_bandwidth(tg));
destroy_auto_affinity(tg);
@@ -13831,6 +13897,12 @@ void free_fair_sched_group(struct task_group *tg)
#ifdef CONFIG_QOS_SCHED
if (tg->cfs_rq && tg->cfs_rq[i])
unthrottle_qos_sched_group(tg->cfs_rq[i]);
+#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (tg->cfs_rq && tg->cfs_rq[i]) {
+ cfs_rq = tg->cfs_rq[i];
+ list_del_init(&cfs_rq->soft_quota_throttled_list);
+ }
#endif
if (tg->cfs_rq)
kfree(tg->cfs_rq[i]);
@@ -14209,13 +14281,20 @@ void task_tick_relationship(struct rq *rq, struct task_struct *curr)
__init void init_sched_fair_class(void)
{
-#ifdef CONFIG_QOS_SCHED
+#if defined(CONFIG_QOS_SCHED) || defined(CONFIG_SCHED_SOFT_QUOTA)
int i;
+#endif
+#ifdef CONFIG_QOS_SCHED
for_each_possible_cpu(i)
INIT_LIST_HEAD(&per_cpu(qos_throttled_cfs_rq, i));
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ for_each_possible_cpu(i)
+ INIT_LIST_HEAD(&per_cpu(soft_quota_throttled_cfs_rq, i));
+#endif
+
init_sched_numa_icon();
#ifdef CONFIG_SMP
@@ -14327,3 +14406,68 @@ int sched_trace_rq_nr_running(struct rq *rq)
return rq ? rq->nr_running : -1;
}
EXPORT_SYMBOL_GPL(sched_trace_rq_nr_running);
+
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+unsigned int sysctl_soft_runtime_ratio = 20;
+
+static bool check_soft_runtime(struct task_group *tg, int slice)
+{
+ int cpu;
+ u64 sum_soft_runtime = slice;
+ struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth;
+
+ if (cfs_b->quota == RUNTIME_INF)
+ return true;
+
+ for_each_possible_cpu(cpu)
+ sum_soft_runtime += tg->cfs_rq[cpu]->sum_soft_runtime;
+
+ return sum_soft_runtime < sysctl_soft_runtime_ratio * cfs_b->quota / 100;
+}
+
+int __weak is_sibling_idle(void)
+{
+ return 0;
+}
+
+bool unthrottle_cfs_rq_soft_quota(struct rq *rq)
+{
+ int max_cnt = 0;
+ bool ret = false;
+ struct cfs_rq *cfs_rq, *tmp_rq;
+ struct cfs_bandwidth *cfs_b;
+ int slice = sched_cfs_bandwidth_slice();
+
+ if (!is_sibling_idle())
+ return ret;
+
+ list_for_each_entry_safe(cfs_rq, tmp_rq, &per_cpu(soft_quota_throttled_cfs_rq, cpu_of(rq)),
+ soft_quota_throttled_list) {
+ if (max_cnt++ > 20)
+ break;
+
+ if (cfs_rq->throttled) {
+ cfs_b = tg_cfs_bandwidth(cfs_rq->tg);
+ raw_spin_lock(&cfs_b->lock);
+
+ if (!check_soft_runtime(cfs_rq->tg, slice)) {
+ raw_spin_unlock(&cfs_b->lock);
+ continue;
+ }
+
+ raw_spin_unlock(&cfs_b->lock);
+
+ if (cfs_rq->runtime_remaining + slice > 0) {
+ cfs_rq->runtime_remaining += slice;
+ cfs_rq->sum_soft_runtime += slice;
+ cfs_rq->soft_quota_enable = 1;
+ unthrottle_cfs_rq(cfs_rq);
+ ret = true;
+ break;
+ }
+ }
+ }
+
+ return ret;
+}
+#endif
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 1fd89af55681..c887b0d384ae 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -78,6 +78,10 @@ SCHED_FEAT(KEEP_ON_CORE, false)
SCHED_FEAT(PARAL, false)
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+SCHED_FEAT(SOFT_QUOTA, false)
+#endif
+
/*
* Issue a WARN when we do multiple update_rq_clock() calls
* in a single rq->lock section. Default disabled because the
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 3c6396d61a04..b6537524c035 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -443,6 +443,13 @@ struct task_struct *pick_next_task_idle(struct rq *rq)
{
struct task_struct *next = rq->idle;
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ if (sched_feat(SOFT_QUOTA)) {
+ if (unthrottle_cfs_rq_soft_quota(rq) && rq->cfs.nr_running)
+ return pick_next_task_fair(rq, NULL, NULL);
+ }
+#endif
+
set_next_task_idle(rq, next, true);
return next;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fe6342305b0f..9b2779e8fc91 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -508,6 +508,9 @@ struct task_group {
#else
KABI_RESERVE(4)
#endif
+#if defined(CONFIG_SCHED_SOFT_QUOTA)
+ KABI_EXTEND(u64 soft_quota)
+#endif
};
#ifdef CONFIG_SCHED_STEAL
@@ -606,6 +609,10 @@ static inline int init_auto_affinity(struct task_group *tg)
static inline void tg_update_affinity_domains(int cpu, int online) {}
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+extern bool unthrottle_cfs_rq_soft_quota(struct rq *rq);
+#endif
+
#ifdef CONFIG_FAIR_GROUP_SCHED
extern int sched_group_set_shares(struct task_group *tg, unsigned long shares);
@@ -734,6 +741,11 @@ struct cfs_rq {
KABI_RESERVE(3)
KABI_RESERVE(4)
#endif
+#if defined(CONFIG_SCHED_SOFT_QUOTA)
+ KABI_EXTEND(u64 soft_quota_enable)
+ KABI_EXTEND(u64 sum_soft_runtime)
+ KABI_EXTEND(struct list_head soft_quota_throttled_list)
+#endif
};
static inline int rt_bandwidth_enabled(void)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 0b1c13a05332..738d9a4455c1 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2831,6 +2831,17 @@ static struct ctl_table kern_table[] = {
.extra2 = &one_hundred,
},
#endif
+#ifdef CONFIG_SCHED_SOFT_QUOTA
+ {
+ .procname = "sched_soft_runtime_ratio",
+ .data = &sysctl_soft_runtime_ratio,
+ .maxlen = sizeof(sysctl_soft_runtime_ratio),
+ .mode = 0644,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ONE,
+ .extra2 = &one_hundred,
+ },
+#endif
#ifdef CONFIG_SCHED_STEAL
{
.procname = "sched_max_steal_count",
--
2.25.1
2
1
This series adds support for running Linux in a protected VM under the
Arm Confidential Compute Architecture (CCA).
To support CCA guest, we do things as follow:
1. Revert virtcca patches
Revert "virtcca feature : disable swiotlb for passthrough device"
Revert "gicv3: add lpi support for cvm guest"
2. Support CCA encrypt part
arm64: mm: Add top-level dispatcher for internal mem_encrypt API
arm64: mm: Add confidential computing hook to ioremap_prot()
arm64: rsi: Add RSI definitions
arm64: Detect if in a realm and set RIPAS RAM
arm64: realm: Query IPA size from the RMM
arm64: rsi: Add support for checking whether an MMIO is protected
arm64: rsi: Map unprotected MMIO as decrypted
efi: arm64: Map Device with Prot Shared
arm64: Enforce bounce buffers for realm DMA
arm64: mm: Avoid TLBI when marking pages as valid
arm64: Enable memory encrypt for Realms
irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor
irqchip/gic-v3-its: Fix over allocation in itt_alloc_pool()
irqchip/gic-v3-its: Rely on genpool alignment
jump_label,module: Don't alloc static_key_mod for __ro_after_init keys
parisc: Delay write-protection until mark_rodata_ro() call
arm64: realm: ioremap: Allow mapping memory as encrypted
rme: make sure realm guest map memory in page granularity
dma: Fix encryption bit clearing for dma_to_phys
dma: Introduce generic dma_addr_*crypted helpers
arm64: realm: Use aliased addresses for device DMA to shared buffers
3. Support tsm report for arm-cca-guest
virt: coco: Add a coco/Makefile and coco/Kconfig
configfs-tsm: Introduce a shared ABI for attestation reports
mm/slab: Add __free() support for kvfree
virt: arm-cca-guest: TSM_REPORT support for realms
arm64: Document Arm Confidential Compute
configfs-tsm-report: Fix NULL dereference of tsm_ops
MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
4. Recover virtcca
gicv3: add lpi support for virtcca cvm guest
V3:
Fix arm64: Document Arm Confidential Compute commit
V2:
Add 5 bugfix patch
commit fba4ceaa242d ("configfs-tsm-report: Fix NULL dereference of tsm_ops")
commit 92230596252a ("MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry")
commit 7d953a062416 ("arm64: realm: Use aliased addresses for device DMA to shared buffers")
commit b66e2ee7b6c8 ("dma: Introduce generic dma_addr_*crypted helpers")
commit c380931712d1 ("dma: Fix encryption bit clearing for dma_to_phys")
Cai Xinchen (2):
Revert "virtcca feature : disable swiotlb for passthrough device"
Revert "gicv3: add lpi support for cvm guest"
Dan Williams (4):
virt: coco: Add a coco/Makefile and coco/Kconfig
configfs-tsm: Introduce a shared ABI for attestation reports
mm/slab: Add __free() support for kvfree
configfs-tsm-report: Fix NULL dereference of tsm_ops
Helge Deller (1):
parisc: Delay write-protection until mark_rodata_ro() call
Peter Zijlstra (1):
jump_label,module: Don't alloc static_key_mod for __ro_after_init keys
Sami Mujawar (1):
virt: arm-cca-guest: TSM_REPORT support for realms
Steven Price (7):
arm64: realm: Query IPA size from the RMM
arm64: Enforce bounce buffers for realm DMA
arm64: mm: Avoid TLBI when marking pages as valid
irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor
irqchip/gic-v3-its: Fix over allocation in itt_alloc_pool()
irqchip/gic-v3-its: Rely on genpool alignment
arm64: Document Arm Confidential Compute
Suzuki K Poulose (10):
arm64: rsi: Add RSI definitions
arm64: Detect if in a realm and set RIPAS RAM
arm64: rsi: Add support for checking whether an MMIO is protected
arm64: rsi: Map unprotected MMIO as decrypted
efi: arm64: Map Device with Prot Shared
arm64: Enable memory encrypt for Realms
arm64: realm: ioremap: Allow mapping memory as encrypted
dma: Fix encryption bit clearing for dma_to_phys
dma: Introduce generic dma_addr_*crypted helpers
arm64: realm: Use aliased addresses for device DMA to shared buffers
Will Deacon (3):
arm64: mm: Add top-level dispatcher for internal mem_encrypt API
arm64: mm: Add confidential computing hook to ioremap_prot()
MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
Yiwei Zhuang (1):
rme: make sure realm guest map memory in page granularity
yxk (1):
gicv3: add lpi support for virtcca cvm guest
Documentation/ABI/testing/configfs-tsm | 82 ++++
Documentation/arch/arm64/arm-cca.rst | 69 +++
Documentation/arch/arm64/booting.rst | 3 +
Documentation/arch/arm64/index.rst | 1 +
MAINTAINERS | 10 +
arch/arm64/Kconfig | 4 +
arch/arm64/include/asm/io.h | 12 +
arch/arm64/include/asm/mem_encrypt.h | 35 ++
arch/arm64/include/asm/pgtable-prot.h | 4 +
arch/arm64/include/asm/pgtable.h | 5 +
arch/arm64/include/asm/rsi.h | 68 +++
arch/arm64/include/asm/rsi_cmds.h | 160 +++++++
arch/arm64/include/asm/rsi_smc.h | 193 ++++++++
arch/arm64/include/asm/set_memory.h | 4 +
arch/arm64/include/asm/virtcca_cvm_guest.h | 8 +
arch/arm64/kernel/Makefile | 2 +-
arch/arm64/kernel/efi.c | 12 +-
arch/arm64/kernel/rsi.c | 165 +++++++
arch/arm64/kernel/setup.c | 3 +
arch/arm64/kernel/virtcca_cvm_guest.c | 24 +
arch/arm64/mm/Makefile | 2 +-
arch/arm64/mm/init.c | 10 +-
arch/arm64/mm/ioremap.c | 23 +-
arch/arm64/mm/mem_encrypt.c | 50 ++
arch/arm64/mm/pageattr.c | 98 +++-
arch/parisc/mm/init.c | 16 +-
drivers/irqchip/irq-gic-v3-its.c | 329 +++++--------
drivers/virt/Kconfig | 8 +-
drivers/virt/Makefile | 5 +-
drivers/virt/coco/Kconfig | 18 +
drivers/virt/coco/Makefile | 10 +
drivers/virt/coco/arm-cca-guest/Kconfig | 11 +
drivers/virt/coco/arm-cca-guest/Makefile | 2 +
.../virt/coco/arm-cca-guest/arm-cca-guest.c | 224 +++++++++
drivers/virt/coco/tsm.c | 452 ++++++++++++++++++
include/asm-generic/sections.h | 5 +
include/linux/dma-direct.h | 13 +-
include/linux/jump_label.h | 3 +
include/linux/mem_encrypt.h | 23 +
include/linux/slab.h | 2 +
include/linux/tsm.h | 69 +++
include/linux/virtcca_cvm_domain.h | 10 +
init/main.c | 1 +
kernel/jump_label.c | 53 ++
44 files changed, 2062 insertions(+), 239 deletions(-)
create mode 100644 Documentation/ABI/testing/configfs-tsm
create mode 100644 Documentation/arch/arm64/arm-cca.rst
create mode 100644 arch/arm64/include/asm/mem_encrypt.h
create mode 100644 arch/arm64/include/asm/rsi.h
create mode 100644 arch/arm64/include/asm/rsi_cmds.h
create mode 100644 arch/arm64/include/asm/rsi_smc.h
create mode 100644 arch/arm64/kernel/rsi.c
create mode 100644 arch/arm64/mm/mem_encrypt.c
create mode 100644 drivers/virt/coco/Kconfig
create mode 100644 drivers/virt/coco/Makefile
create mode 100644 drivers/virt/coco/arm-cca-guest/Kconfig
create mode 100644 drivers/virt/coco/arm-cca-guest/Makefile
create mode 100644 drivers/virt/coco/arm-cca-guest/arm-cca-guest.c
create mode 100644 drivers/virt/coco/tsm.c
create mode 100644 include/linux/tsm.h
--
2.18.0.huawei.25
2
32

24 Jun '25
From: Takashi Iwai <tiwai(a)suse.de>
stable inclusion
from stable-v6.6.93
commit 74d90875f3d43f3eff0e9861c4701418795d3455
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICGACK
CVE: CVE-2025-38078
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id…
--------------------------------
commit 93a81ca0657758b607c3f4ba889ae806be9beb73 upstream.
The PCM OSS layer tries to clear the buffer with the silence data at
initialization (or reconfiguration) of a stream with the explicit call
of snd_pcm_format_set_silence() with runtime->dma_area. But this may
lead to a UAF because the accessed runtime->dma_area might be freed
concurrently, as it's performed outside the PCM ops.
For avoiding it, move the code into the PCM core and perform it inside
the buffer access lock, so that it won't be changed during the
operation.
Reported-by: syzbot+32d4647f551007595173(a)syzkaller.appspotmail.com
Closes: https://lore.kernel.org/68164d8e.050a0220.11da1b.0019.GAE@google.com
Cc: <stable(a)vger.kernel.org>
Link: https://patch.msgid.link/20250516080817.20068-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai(a)suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Luo Gengkun <luogengkun2(a)huawei.com>
---
include/sound/pcm.h | 2 ++
sound/core/oss/pcm_oss.c | 3 +--
sound/core/pcm_native.c | 11 +++++++++++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 2a815373dac1..ed4449cbdf80 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1427,6 +1427,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
+
/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 728c211142d1..471de2d1b37a 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1085,8 +1085,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
- if (runtime->dma_area)
- snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_runtime_buffer_set_silence(runtime);
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index e40de64ec85c..31fc20350fd9 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -703,6 +703,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
atomic_inc(&runtime->buffer_accessing);
}
+/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
+{
+ snd_pcm_buffer_access_lock(runtime);
+ if (runtime->dma_area)
+ snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
+ bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_buffer_access_unlock(runtime);
+}
+EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#define is_oss_stream(substream) ((substream)->oss.oss)
#else
--
2.34.1
2
1