mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 55 participants
  • 18767 discussions
[openeuler:openEuler-1.0-LTS 5940/23799] drivers/iommu/iommu.c:979:31: sparse: sparse: dubious: !x | !y
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: ac084b72b429b1bc0378add3abecfe107a732b7a [5940/23799] iommu: introduce device fault report API config: arm64-randconfig-r133-20240926 (https://download.01.org/0day-ci/archive/20240929/202409290930.qkB2O1Kz-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290930.qkB2O1Kz-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/202409290930.qkB2O1Kz-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/iommu/iommu.c:979:31: sparse: sparse: dubious: !x | !y drivers/iommu/iommu.c: In function 'iommu_unregister_device_fault_handler': drivers/iommu/iommu.c:937:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 937 | int ret = 0; | ^~~ vim +979 drivers/iommu/iommu.c 960 961 962 /** 963 * iommu_report_device_fault() - Report fault event to device 964 * @dev: the device 965 * @evt: fault event data 966 * 967 * Called by IOMMU model specific drivers when fault is detected, typically 968 * in a threaded IRQ handler. 969 * 970 * Return 0 on success, or an error. 971 */ 972 int iommu_report_device_fault(struct device *dev, struct iommu_fault_event *evt) 973 { 974 int ret = 0; 975 struct iommu_fault_event *evt_pending; 976 struct iommu_fault_param *fparam; 977 978 /* iommu_param is allocated when device is added to group */ > 979 if (!dev->iommu_param | !evt) 980 return -EINVAL; 981 /* we only report device fault if there is a handler registered */ 982 mutex_lock(&dev->iommu_param->lock); 983 if (!dev->iommu_param->fault_param || 984 !dev->iommu_param->fault_param->handler) { 985 ret = -EINVAL; 986 goto done_unlock; 987 } 988 fparam = dev->iommu_param->fault_param; 989 if (evt->type == IOMMU_FAULT_PAGE_REQ && evt->last_req) { 990 evt_pending = kzalloc(sizeof(*evt_pending), GFP_ATOMIC); 991 if (!evt_pending) { 992 ret = -ENOMEM; 993 goto done_unlock; 994 } 995 memcpy(evt_pending, evt, sizeof(struct iommu_fault_event)); 996 mutex_lock(&fparam->lock); 997 list_add_tail(&evt_pending->list, &fparam->faults); 998 mutex_unlock(&fparam->lock); 999 } 1000 ret = fparam->handler(evt, fparam->data); 1001 done_unlock: 1002 mutex_unlock(&dev->iommu_param->lock); 1003 return ret; 1004 } 1005 EXPORT_SYMBOL_GPL(iommu_report_device_fault); 1006 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 21562/30000] drivers/ub/urma/ubcore/ubcore_netdev.c:213:5: warning: no previous prototype for 'ubcore_unset_port_netdev'
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 37c6170f742ef3a18a3131a2a157dd7b7aa08103 [21562/30000] ub: Fix bugs in urma kernel and user lib config: arm64-randconfig-004-20240928 (https://download.01.org/0day-ci/archive/20240929/202409290901.wWQmpMUX-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290901.wWQmpMUX-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/202409290901.wWQmpMUX-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/ub/urma/ubcore/ubcore_netdev.c:51:5: warning: no previous prototype for 'ubcore_check_port_state' [-Wmissing-prototypes] 51 | int ubcore_check_port_state(struct ubcore_device *dev, uint8_t port_idx) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:75:6: warning: no previous prototype for 'ubcore_find_port_netdev' [-Wmissing-prototypes] 75 | void ubcore_find_port_netdev(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:133:5: warning: no previous prototype for 'ubcore_set_port_netdev' [-Wmissing-prototypes] 133 | int ubcore_set_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:213:5: warning: no previous prototype for 'ubcore_unset_port_netdev' [-Wmissing-prototypes] 213 | int ubcore_unset_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:242:6: warning: no previous prototype for 'ubcore_put_port_netdev' [-Wmissing-prototypes] 242 | void ubcore_put_port_netdev(struct ubcore_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:262:10: warning: no previous prototype for 'ubcore_sip_idx_alloc' [-Wmissing-prototypes] 262 | uint32_t ubcore_sip_idx_alloc(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:290:5: warning: no previous prototype for 'ubcore_sip_idx_free' [-Wmissing-prototypes] 290 | int ubcore_sip_idx_free(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:303:6: warning: no previous prototype for 'ubcore_sip_table_init' [-Wmissing-prototypes] 303 | void ubcore_sip_table_init(void) | ^~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:309:6: warning: no previous prototype for 'ubcore_sip_table_uninit' [-Wmissing-prototypes] 309 | void ubcore_sip_table_uninit(void) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:324:5: warning: no previous prototype for 'ubcore_add_sip_entry' [-Wmissing-prototypes] 324 | int ubcore_add_sip_entry(const struct ubcore_sip_info *sip, uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:344:5: warning: no previous prototype for 'ubcore_del_sip_entry' [-Wmissing-prototypes] 344 | int ubcore_del_sip_entry(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:358:5: warning: no previous prototype for 'ubcore_lookup_sip_idx' [-Wmissing-prototypes] 358 | int ubcore_lookup_sip_idx(struct ubcore_sip_info *sip, uint32_t *idx) | ^~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:379:10: warning: no previous prototype for 'ubcore_get_sip_max_cnt' [-Wmissing-prototypes] 379 | uint32_t ubcore_get_sip_max_cnt(void) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:384:25: warning: no previous prototype for 'ubcore_lookup_sip_info' [-Wmissing-prototypes] 384 | struct ubcore_sip_info *ubcore_lookup_sip_info(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:395:5: warning: no previous prototype for 'ubcore_notify_uvs_del_sip' [-Wmissing-prototypes] 395 | int ubcore_notify_uvs_del_sip(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:437:5: warning: no previous prototype for 'ubcore_notify_uvs_add_sip' [-Wmissing-prototypes] 437 | int ubcore_notify_uvs_add_sip(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ vim +/ubcore_unset_port_netdev +213 drivers/ub/urma/ubcore/ubcore_netdev.c 212 > 213 int ubcore_unset_port_netdev(struct ubcore_device *dev, struct net_device *ndev, 214 unsigned int port_id) 215 { 216 struct ubcore_ndev_port *port_info; 217 218 if (dev == NULL || ndev == NULL) { 219 ubcore_log_err("invalid input parameter.\n"); 220 return -1; 221 } 222 down_write(&g_port_list_lock); 223 list_for_each_entry(port_info, &dev->port_list, node) { 224 if (port_info->ndev == ndev) { 225 if (ubcore_del_port(port_info, (uint8_t)port_id, dev, ndev) != 0) { 226 up_write(&g_port_list_lock); 227 ubcore_log_err("Failed to do ubcore_del_port"); 228 return -1; 229 } 230 up_write(&g_port_list_lock); 231 return 0; 232 } 233 } 234 up_write(&g_port_list_lock); 235 236 ubcore_log_err("Failed to find and remove ndev:%s dev_name: %s bound port: %u\n", 237 netdev_name(ndev), dev->dev_name, port_id); 238 return -1; 239 } 240 EXPORT_SYMBOL(ubcore_unset_port_netdev); 241 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 21579/30000] net/smc/smc_core.c:770:6: sparse: sparse: symbol '__smcr_link_clear' was not declared. Should it be static?
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 7dad816cb1f8841fda526c0978c10a94793f1178 [21579/30000] anolis: net/smc: Resolve the race between SMC-R link access and clear config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240929/202409290926.Ll8zQyOY-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290926.Ll8zQyOY-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/202409290926.Ll8zQyOY-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> net/smc/smc_core.c:770:6: sparse: sparse: symbol '__smcr_link_clear' was not declared. Should it be static? vim +/__smcr_link_clear +770 net/smc/smc_core.c 769 > 770 void __smcr_link_clear(struct smc_link *lnk) 771 { 772 smc_wr_free_link_mem(lnk); 773 smc_lgr_put(lnk->lgr); /* lgr_hold in smcr_link_init() */ 774 memset(lnk, 0, sizeof(struct smc_link)); 775 lnk->state = SMC_LNK_UNUSED; 776 } 777 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 4008/23799] drivers/staging/erofs/utils.c:138:6: sparse: sparse: symbol 'erofs_try_to_release_workgroup' was not declared. Should it be static?
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: fb4c3a2751ebf142fecc61eea8c738573ec3bf10 [4008/23799] staging: erofs: fix race when the managed cache is enabled config: arm64-randconfig-r133-20240926 (https://download.01.org/0day-ci/archive/20240929/202409290639.uZftDFPU-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290639.uZftDFPU-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/202409290639.uZftDFPU-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/staging/erofs/utils.c:138:6: sparse: sparse: symbol 'erofs_try_to_release_workgroup' was not declared. Should it be static? drivers/staging/erofs/utils.c:138:6: warning: no previous prototype for 'erofs_try_to_release_workgroup' [-Wmissing-prototypes] 138 | bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/erofs_try_to_release_workgroup +138 drivers/staging/erofs/utils.c 137 > 138 bool erofs_try_to_release_workgroup(struct erofs_sb_info *sbi, 139 struct erofs_workgroup *grp, 140 bool cleanup) 141 { 142 void *entry; 143 144 /* 145 * for managed cache enabled, the refcount of workgroups 146 * themselves could be < 0 (freezed). So there is no guarantee 147 * that all refcount > 0 if managed cache is enabled. 148 */ 149 if (!erofs_workgroup_try_to_freeze(grp, 1)) 150 return false; 151 152 /* 153 * note that all cached pages should be unlinked 154 * before delete it from the radix tree. 155 * Otherwise some cached pages of an orphan old workgroup 156 * could be still linked after the new one is available. 157 */ 158 if (erofs_try_to_free_all_cached_pages(sbi, grp)) { 159 erofs_workgroup_unfreeze(grp, 1); 160 return false; 161 } 162 163 /* 164 * it is impossible to fail after the workgroup is freezed, 165 * however in order to avoid some race conditions, add a 166 * DBG_BUGON to observe this in advance. 167 */ 168 entry = radix_tree_delete(&sbi->workstn_tree, grp->index); 169 DBG_BUGON((void *)((unsigned long)entry & 170 ~RADIX_TREE_EXCEPTIONAL_ENTRY) != grp); 171 172 /* 173 * if managed cache is enable, the last refcount 174 * should indicate the related workstation. 175 */ 176 erofs_workgroup_unfreeze_final(grp); 177 return true; 178 } 179 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 21084/30000] drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:79:53: sparse: sparse: incorrect type in assignment (different base types)
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 0b68f4778af4fded021ba67f5eb3fb74ff8d7fc1 [21084/30000] net: hns3: support arp proxy config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240929/202409290547.aSbDInhQ-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290547.aSbDInhQ-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/202409290547.aSbDInhQ-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:79:53: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] vlan_tci @@ got unsigned short [usertype] vlan_tci @@ drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:79:53: sparse: expected restricted __be16 [usertype] vlan_tci drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:79:53: sparse: got unsigned short [usertype] vlan_tci >> drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:128:58: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected unsigned short [usertype] vlan_tci @@ got restricted __be16 [usertype] vlan_tci @@ drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:128:58: sparse: expected unsigned short [usertype] vlan_tci drivers/net/ethernet/hisilicon/hns3/hns3_roh.c:128:58: sparse: got restricted __be16 [usertype] vlan_tci vim +79 drivers/net/ethernet/hisilicon/hns3/hns3_roh.c 56 57 int hns3_handle_roh_arp_req(struct sk_buff *skb, struct hns3_nic_priv *priv) 58 { 59 struct hnae3_handle *h = priv->ae_handle; 60 struct hns3_enet_ring *ring; 61 struct arphdr *arphdr; 62 struct ethhdr *ethhdr; 63 int reply_idx, len; 64 __be32 *sip, *tip; 65 66 /* use same queue num in rx */ 67 ring = &priv->ring[skb->queue_mapping + h->kinfo.num_tqps]; 68 reply_idx = ring->arp_reply_tail; 69 hns3_roh_arp_reply_idx_move_fd(reply_idx); 70 /* This smp_load_acquire() pairs with smp_store_release() in 71 * hns3_handle_roh_arp_reply(). 72 */ 73 if (reply_idx == smp_load_acquire(&ring->arp_reply_head)) 74 return NETDEV_TX_BUSY; 75 len = skb->len; 76 77 if (skb_vlan_tagged(skb)) { 78 ring->arp_reply[reply_idx].has_vlan = true; > 79 ring->arp_reply[reply_idx].vlan_tci = skb_vlan_tag_get(skb); 80 skb_vlan_pop(skb); 81 len += VLAN_HLEN; 82 } else { 83 ring->arp_reply[reply_idx].has_vlan = false; 84 } 85 86 ethhdr = eth_hdr(skb); 87 arphdr = arp_hdr(skb); 88 89 hns3_extract_arp_ip_field(arphdr, &sip, &tip, skb->dev->addr_len); 90 ether_addr_copy(ring->arp_reply[reply_idx].dest_hw, ethhdr->h_source); 91 ether_addr_copy(ring->arp_reply[reply_idx].src_hw, ethhdr->h_dest); 92 ring->arp_reply[reply_idx].dest_ip = *sip; 93 ring->arp_reply[reply_idx].src_ip = *tip; 94 hns3_roh_update_mac_by_ip(be32_to_cpu(*tip), 95 ring->arp_reply[reply_idx].src_hw); 96 /* This smp_store_release() pairs with smp_load_acquire() in 97 * hns3_handle_roh_arp_reply(). Ensure that the arp_reply_tail is 98 * update validly. 99 */ 100 smp_store_release(&ring->arp_reply_tail, reply_idx); 101 102 ring = &priv->ring[skb->queue_mapping]; 103 u64_stats_update_begin(&ring->syncp); 104 ring->stats.tx_pkts++; 105 ring->stats.tx_bytes += len; 106 u64_stats_update_end(&ring->syncp); 107 108 dev_kfree_skb_any(skb); 109 napi_schedule(&ring->tqp_vector->napi); 110 return NETDEV_TX_OK; 111 } 112 113 static struct sk_buff *setup_arp_reply_skb(struct hns3_arp_reply *arp_reply, 114 struct hns3_nic_priv *priv) 115 { 116 struct sk_buff *skb = arp_create(ARPOP_REPLY, ETH_P_ARP, 117 arp_reply->dest_ip, priv->netdev, 118 arp_reply->src_ip, arp_reply->dest_hw, 119 arp_reply->src_hw, arp_reply->dest_hw); 120 if (!skb) 121 return NULL; 122 123 skb_reset_mac_header(skb); 124 skb_reset_mac_len(skb); 125 126 if (arp_reply->has_vlan) { 127 skb = vlan_insert_tag_set_proto(skb, htons(ETH_P_8021Q), > 128 arp_reply->vlan_tci); 129 if (!skb) 130 return NULL; 131 skb_reset_network_header(skb); 132 } 133 134 skb_reserve(skb, skb->mac_len); 135 return skb; 136 } 137 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 21485/30000] drivers/ub/urma/ubcore/ubcore_device.c:344:6: warning: no previous prototype for 'ubcore_destroy_upi_list'
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 84e122368ec3a37e074c9657bc09422b62f6ccd0 [21485/30000] ub: add new feature for urma config: arm64-randconfig-004-20240928 (https://download.01.org/0day-ci/archive/20240929/202409290428.ZYNCVbJr-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290428.ZYNCVbJr-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/202409290428.ZYNCVbJr-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/ubcore/ubcore_device.c:344:6: warning: no previous prototype for 'ubcore_destroy_upi_list' [-Wmissing-prototypes] 344 | void ubcore_destroy_upi_list(void) | ^~~~~~~~~~~~~~~~~~~~~~~ -- drivers/ub/urma/ubcore/ubcore_uvs_cmd.c: In function 'ubcore_uvs_cmd_channel_init': >> drivers/ub/urma/ubcore/ubcore_uvs_cmd.c:47:15: warning: 'strncpy' output truncated before terminating nul copying 10 bytes from a string of the same length [-Wstringop-truncation] 47 | (void)strncpy(arg.out.kernel_out, "Hello uvs!", strlen("Hello uvs!")); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- >> drivers/ub/urma/ubcore/ubcore_netdev.c:49:5: warning: no previous prototype for 'ubcore_check_port_state' [-Wmissing-prototypes] 49 | int ubcore_check_port_state(struct ubcore_device *dev, uint8_t port_idx) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:73:5: warning: no previous prototype for 'ubcore_find_port_netdev' [-Wmissing-prototypes] 73 | int ubcore_find_port_netdev(struct ubcore_device *dev, struct net_device *ndev) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:90:5: warning: no previous prototype for 'ubcore_find_port_with_dev_name' [-Wmissing-prototypes] 90 | int ubcore_find_port_with_dev_name(struct ubcore_device *dev, char *dev_name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:113:5: warning: no previous prototype for 'ubcore_set_port_netdev' [-Wmissing-prototypes] 113 | int ubcore_set_port_netdev(struct ubcore_device *dev, struct net_device *ndev, | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:149:6: warning: no previous prototype for 'ubcore_put_port_netdev' [-Wmissing-prototypes] 149 | void ubcore_put_port_netdev(struct ubcore_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:169:10: warning: no previous prototype for 'ubcore_sip_idx_alloc' [-Wmissing-prototypes] 169 | uint32_t ubcore_sip_idx_alloc(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:197:5: warning: no previous prototype for 'ubcore_sip_idx_free' [-Wmissing-prototypes] 197 | int ubcore_sip_idx_free(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:210:6: warning: no previous prototype for 'ubcore_sip_table_init' [-Wmissing-prototypes] 210 | void ubcore_sip_table_init(void) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:216:6: warning: no previous prototype for 'ubcore_sip_table_uninit' [-Wmissing-prototypes] 216 | void ubcore_sip_table_uninit(void) | ^~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:230:5: warning: no previous prototype for 'ubcore_add_sip_entry' [-Wmissing-prototypes] 230 | int ubcore_add_sip_entry(const struct ubcore_sip_info *sip, uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:250:5: warning: no previous prototype for 'ubcore_del_sip_entry' [-Wmissing-prototypes] 250 | int ubcore_del_sip_entry(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:264:5: warning: no previous prototype for 'ubcore_lookup_sip_idx' [-Wmissing-prototypes] 264 | int ubcore_lookup_sip_idx(struct ubcore_sip_info *sip, uint32_t *idx) | ^~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:285:10: warning: no previous prototype for 'ubcore_get_sip_max_cnt' [-Wmissing-prototypes] 285 | uint32_t ubcore_get_sip_max_cnt(void) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_netdev.c:290:25: warning: no previous prototype for 'ubcore_lookup_sip_info' [-Wmissing-prototypes] 290 | struct ubcore_sip_info *ubcore_lookup_sip_info(uint32_t idx) | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:301:5: warning: no previous prototype for 'ubcore_notify_uvs_del_sip' [-Wmissing-prototypes] 301 | int ubcore_notify_uvs_del_sip(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_netdev.c:343:5: warning: no previous prototype for 'ubcore_notify_uvs_add_sip' [-Wmissing-prototypes] 343 | int ubcore_notify_uvs_add_sip(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ vim +/ubcore_destroy_upi_list +344 drivers/ub/urma/ubcore/ubcore_device.c 343 > 344 void ubcore_destroy_upi_list(void) 345 { 346 struct ubcore_upi_entry *entry = NULL, *next; 347 348 mutex_lock(&g_upi_lock); 349 list_for_each_entry_safe(entry, next, &g_upi_list, node) { 350 if (entry != NULL) { 351 list_del(&entry->node); 352 kfree(entry); 353 } 354 } 355 mutex_unlock(&g_upi_lock); 356 } 357 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1487/23799] drivers/firmware/efi/libstub/arm-stub.c:72:6: sparse: sparse: symbol 'install_memreserve_table' was not declared. Should it be static?
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 805a16040f9b52834cff060839fe25ad655f042e [1487/23799] efi/arm: libstub: add a root memreserve config table config: arm64-randconfig-r133-20240926 (https://download.01.org/0day-ci/archive/20240929/202409290414.yOuyHbaP-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290414.yOuyHbaP-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/202409290414.yOuyHbaP-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/firmware/efi/libstub/arm-stub.c:72:6: sparse: sparse: symbol 'install_memreserve_table' was not declared. Should it be static? drivers/firmware/efi/libstub/arm-stub.c:72:6: warning: no previous prototype for 'install_memreserve_table' [-Wmissing-prototypes] 72 | void install_memreserve_table(efi_system_table_t *sys_table_arg) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/firmware/efi/libstub/arm-stub.c:116:15: warning: no previous prototype for 'efi_entry' [-Wmissing-prototypes] 116 | unsigned long efi_entry(void *handle, efi_system_table_t *sys_table, | ^~~~~~~~~ drivers/firmware/efi/libstub/arm-stub.c: In function 'efi_entry': drivers/firmware/efi/libstub/arm-stub.c:135:29: warning: variable 'si' set but not used [-Wunused-but-set-variable] 135 | struct screen_info *si; | ^~ vim +/install_memreserve_table +72 drivers/firmware/efi/libstub/arm-stub.c 71 > 72 void install_memreserve_table(efi_system_table_t *sys_table_arg) 73 { 74 struct linux_efi_memreserve *rsv; 75 efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; 76 efi_status_t status; 77 78 status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), 79 (void **)&rsv); 80 if (status != EFI_SUCCESS) { 81 pr_efi_err(sys_table_arg, "Failed to allocate memreserve entry!\n"); 82 return; 83 } 84 85 rsv->next = 0; 86 rsv->base = 0; 87 rsv->size = 0; 88 89 status = efi_call_early(install_configuration_table, 90 &memreserve_table_guid, 91 rsv); 92 if (status != EFI_SUCCESS) 93 pr_efi_err(sys_table_arg, "Failed to install memreserve config table!\n"); 94 } 95 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 21044/30000] drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: sparse: incorrect type in argument 1 (different base types)
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 7906c655c7b6e8bd68a7e7ee2455d9a8d8622fa9 [21044/30000] net: hns3: add command queue trace for hns3 config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240929/202409290215.32P52XtH-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290215.32P52XtH-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/202409290215.32P52XtH-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] opcode @@ got restricted __le16 [usertype] opcode @@ drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: expected unsigned short [usertype] opcode drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:478:68: sparse: got restricted __le16 [usertype] opcode drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:514:67: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned short [usertype] opcode @@ got restricted __le16 [usertype] opcode @@ drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:514:67: sparse: expected unsigned short [usertype] opcode drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c:514:67: sparse: got restricted __le16 [usertype] opcode -- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, ...): >> drivers/net/ethernet/hisilicon/hns3/hns3pf/./hclge_trace.h:132:1: sparse: sparse: cast to restricted __le32 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c: note: in included file (through include/trace/perf.h, include/trace/define_trace.h, drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_trace.h): >> drivers/net/ethernet/hisilicon/hns3/hns3pf/./hclge_trace.h:132:1: sparse: sparse: cast to restricted __le32 vim +478 drivers/net/ethernet/hisilicon/hns3/hns3_common/hclge_comm_cmd.c 461 462 /** 463 * hclge_comm_cmd_send - send command to command queue 464 * @hw: pointer to the hw struct 465 * @desc: prefilled descriptor for describing the command 466 * @num : the number of descriptors to be sent 467 * 468 * This is the main send command for command queue, it 469 * sends the queue, cleans the queue, etc 470 **/ 471 int hclge_comm_cmd_send(struct hclge_comm_hw *hw, struct hclge_desc *desc, 472 int num) 473 { 474 struct hclge_comm_cmq_ring *csq = &hw->cmq.csq; 475 int ret; 476 int ntc; 477 trace_hclge_comm_cmd_send(hw, desc, num, > 478 hclge_comm_is_special_opcode(desc->opcode)); 479 480 spin_lock_bh(&hw->cmq.csq.lock); 481 482 if (test_bit(HCLGE_COMM_STATE_CMD_DISABLE, &hw->comm_state)) { 483 spin_unlock_bh(&hw->cmq.csq.lock); 484 return -EBUSY; 485 } 486 487 if (num > hclge_comm_ring_space(&hw->cmq.csq)) { 488 /* If CMDQ ring is full, SW HEAD and HW HEAD may be different, 489 * need update the SW HEAD pointer csq->next_to_clean 490 */ 491 csq->next_to_clean = 492 hclge_comm_read_dev(hw, HCLGE_COMM_NIC_CSQ_HEAD_REG); 493 spin_unlock_bh(&hw->cmq.csq.lock); 494 return -EBUSY; 495 } 496 497 /** 498 * Record the location of desc in the ring for this time 499 * which will be use for hardware to write back 500 */ 501 ntc = hw->cmq.csq.next_to_use; 502 503 hclge_comm_cmd_copy_desc(hw, desc, num); 504 505 /* Write to hardware */ 506 hclge_comm_write_dev(hw, HCLGE_COMM_NIC_CSQ_TAIL_REG, 507 hw->cmq.csq.next_to_use); 508 509 ret = hclge_comm_cmd_check_result(hw, desc, num, ntc); 510 511 spin_unlock_bh(&hw->cmq.csq.lock); 512 513 trace_hclge_comm_cmd_get(hw, desc, num, 514 hclge_comm_is_special_opcode(desc->opcode)); 515 return ret; 516 } 517 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 21349/23799] drivers/mmc/host/phytium-mci-plat.c:169:23: error: lvalue required as unary '&' operand
by kernel test robot 29 Sep '24

29 Sep '24
Hi Malloy, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: d65622e6edee11f7fcbd295bdb5aef86e12dfef3 [21349/23799] mmc: add support for Phytium MMC config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240929/202409290132.fGKHm3da-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290132.fGKHm3da-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/202409290132.fGKHm3da-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/mmc/host/phytium-mci-plat.c:169:23: error: lvalue required as unary '&' operand 169 | .pm = &phytium_mci_dev_pm_ops, | ^ vim +169 drivers/mmc/host/phytium-mci-plat.c 161 162 static struct platform_driver phytium_mci_driver = { 163 .probe = phytium_mci_probe, 164 .remove = phytium_mci_remove, 165 .driver = { 166 .name = "phytium-mci-platform", 167 .of_match_table = phytium_mci_of_ids, 168 .acpi_match_table = phytium_mci_acpi_ids, > 169 .pm = &phytium_mci_dev_pm_ops, 170 }, 171 }; 172 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 19223/30000] drivers/ub/urma/ubcore/ubcore_dp.c:26:5: warning: no previous prototype for 'ubcore_post_jetty_send_wr'
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 33800c2820ab85fe02800e33f6b3287130278bdf [19223/30000] ub: ubcore add data plane ops api. config: arm64-randconfig-004-20240928 (https://download.01.org/0day-ci/archive/20240929/202409290129.erX7l03j-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290129.erX7l03j-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/202409290129.erX7l03j-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/ubcore/ubcore_dp.c:26:5: warning: no previous prototype for 'ubcore_post_jetty_send_wr' [-Wmissing-prototypes] 26 | int ubcore_post_jetty_send_wr(struct ubcore_jetty *jetty, const struct ubcore_jfs_wr *wr, | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_dp.c:42:5: warning: no previous prototype for 'ubcore_post_jetty_recv_wr' [-Wmissing-prototypes] 42 | int ubcore_post_jetty_recv_wr(struct ubcore_jetty *jetty, const struct ubcore_jfr_wr *wr, | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_dp.c:58:5: warning: no previous prototype for 'ubcore_post_jfs_wr' [-Wmissing-prototypes] 58 | int ubcore_post_jfs_wr(struct ubcore_jfs *jfs, const struct ubcore_jfs_wr *wr, | ^~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_dp.c:74:5: warning: no previous prototype for 'ubcore_post_jfr_wr' [-Wmissing-prototypes] 74 | int ubcore_post_jfr_wr(struct ubcore_jfr *jfr, const struct ubcore_jfr_wr *wr, | ^~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_dp.c:90:5: warning: no previous prototype for 'ubcore_poll_jfc' [-Wmissing-prototypes] 90 | int ubcore_poll_jfc(struct ubcore_jfc *jfc, int cr_cnt, struct ubcore_cr *cr) | ^~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_dp.c:105:5: warning: no previous prototype for 'ubcore_rearm_jfc' [-Wmissing-prototypes] 105 | int ubcore_rearm_jfc(struct ubcore_jfc *jfc, bool solicited_only) | ^~~~~~~~~~~~~~~~ vim +/ubcore_post_jetty_send_wr +26 drivers/ub/urma/ubcore/ubcore_dp.c 25 > 26 int ubcore_post_jetty_send_wr(struct ubcore_jetty *jetty, const struct ubcore_jfs_wr *wr, 27 struct ubcore_jfs_wr **bad_wr) 28 { 29 struct ubcore_ops *dev_ops; 30 31 if (jetty == NULL || jetty->ub_dev == NULL || jetty->ub_dev->ops == NULL || 32 jetty->ub_dev->ops->post_jetty_send_wr == NULL || wr == NULL || bad_wr == NULL) { 33 ubcore_log_err("Invalid parameter"); 34 return -EINVAL; 35 } 36 37 dev_ops = jetty->ub_dev->ops; 38 return dev_ops->post_jetty_send_wr(jetty, wr, bad_wr); 39 } 40 EXPORT_SYMBOL(ubcore_post_jetty_send_wr); 41 > 42 int ubcore_post_jetty_recv_wr(struct ubcore_jetty *jetty, const struct ubcore_jfr_wr *wr, 43 struct ubcore_jfr_wr **bad_wr) 44 { 45 struct ubcore_ops *dev_ops; 46 47 if (jetty == NULL || jetty->ub_dev == NULL || jetty->ub_dev->ops == NULL || 48 jetty->ub_dev->ops->post_jetty_recv_wr == NULL || wr == NULL || bad_wr == NULL) { 49 ubcore_log_err("Invalid parameter"); 50 return -EINVAL; 51 } 52 53 dev_ops = jetty->ub_dev->ops; 54 return dev_ops->post_jetty_recv_wr(jetty, wr, bad_wr); 55 } 56 EXPORT_SYMBOL(ubcore_post_jetty_recv_wr); 57 > 58 int ubcore_post_jfs_wr(struct ubcore_jfs *jfs, const struct ubcore_jfs_wr *wr, 59 struct ubcore_jfs_wr **bad_wr) 60 { 61 struct ubcore_ops *dev_ops; 62 63 if (jfs == NULL || jfs->ub_dev == NULL || jfs->ub_dev->ops == NULL || 64 jfs->ub_dev->ops->post_jfs_wr == NULL || wr == NULL || bad_wr == NULL) { 65 ubcore_log_err("Invalid parameter"); 66 return -EINVAL; 67 } 68 69 dev_ops = jfs->ub_dev->ops; 70 return dev_ops->post_jfs_wr(jfs, wr, bad_wr); 71 } 72 EXPORT_SYMBOL(ubcore_post_jfs_wr); 73 > 74 int ubcore_post_jfr_wr(struct ubcore_jfr *jfr, const struct ubcore_jfr_wr *wr, 75 struct ubcore_jfr_wr **bad_wr) 76 { 77 struct ubcore_ops *dev_ops; 78 79 if (jfr == NULL || jfr->ub_dev == NULL || jfr->ub_dev->ops == NULL || 80 jfr->ub_dev->ops->post_jfr_wr == NULL || wr == NULL || bad_wr == NULL) { 81 ubcore_log_err("Invalid parameter"); 82 return -EINVAL; 83 } 84 85 dev_ops = jfr->ub_dev->ops; 86 return dev_ops->post_jfr_wr(jfr, wr, bad_wr); 87 } 88 EXPORT_SYMBOL(ubcore_post_jfr_wr); 89 > 90 int ubcore_poll_jfc(struct ubcore_jfc *jfc, int cr_cnt, struct ubcore_cr *cr) 91 { 92 struct ubcore_ops *dev_ops; 93 94 if (jfc == NULL || jfc->ub_dev == NULL || jfc->ub_dev->ops == NULL || 95 jfc->ub_dev->ops->poll_jfc == NULL || cr == NULL) { 96 ubcore_log_err("Invalid parameter"); 97 return -EINVAL; 98 } 99 100 dev_ops = jfc->ub_dev->ops; 101 return dev_ops->poll_jfc(jfc, cr_cnt, cr); 102 } 103 EXPORT_SYMBOL(ubcore_poll_jfc); 104 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 27588/30000] include/linux/compiler_attributes.h:221:41: warning: attribute 'fallthrough' not preceding a case label or default label
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 0695e18bbaebbfbe22b049104bbb9a4300a9f30c [27588/30000] mm: Add PMU based memory sampling abstract layer config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240929/202409290030.UdfZl3fZ-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290030.UdfZl3fZ-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/202409290030.UdfZl3fZ-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from include/linux/compiler_types.h:65, from <command-line>: drivers/arm/spe/spe.c: In function '__arm_spe_dev_probe': >> include/linux/compiler_attributes.h:221:41: warning: attribute 'fallthrough' not preceding a case label or default label 221 | # define fallthrough __attribute__((__fallthrough__)) | ^~~~~~~~~~~~~ drivers/arm/spe/spe.c:492:17: note: in expansion of macro 'fallthrough' 492 | fallthrough; | ^~~~~~~~~~~ >> include/linux/compiler_attributes.h:221:41: warning: attribute 'fallthrough' not preceding a case label or default label 221 | # define fallthrough __attribute__((__fallthrough__)) | ^~~~~~~~~~~~~ drivers/arm/spe/spe.c:514:17: note: in expansion of macro 'fallthrough' 514 | fallthrough; | ^~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for ARM_SPE_MEM_SAMPLING Depends on [n]: ARM64 [=y] && !ARM_SPE_PMU [=y] Selected by [y]: - MEM_SAMPLING [=y] && ARM64 [=y] WARNING: unmet direct dependencies detected for BPF_NET_GLOBAL_PROG Depends on [n]: NET [=n] && BPF_SYSCALL [=n] Selected by [y]: - SCHED_TASK_RELATIONSHIP [=y] && CGROUPS [=y] && NUMA_BALANCING [=y] vim +/fallthrough +221 include/linux/compiler_attributes.h 294f69e662d157 Joe Perches 2019-10-05 209 294f69e662d157 Joe Perches 2019-10-05 210 /* 294f69e662d157 Joe Perches 2019-10-05 211 * Add the pseudo keyword 'fallthrough' so case statement blocks 294f69e662d157 Joe Perches 2019-10-05 212 * must end with any of these keywords: 294f69e662d157 Joe Perches 2019-10-05 213 * break; 294f69e662d157 Joe Perches 2019-10-05 214 * fallthrough; 294f69e662d157 Joe Perches 2019-10-05 215 * goto <label>; 294f69e662d157 Joe Perches 2019-10-05 216 * return [expression]; 294f69e662d157 Joe Perches 2019-10-05 217 * 294f69e662d157 Joe Perches 2019-10-05 218 * gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attr… 294f69e662d157 Joe Perches 2019-10-05 219 */ 294f69e662d157 Joe Perches 2019-10-05 220 #if __has_attribute(__fallthrough__) 294f69e662d157 Joe Perches 2019-10-05 @221 # define fallthrough __attribute__((__fallthrough__)) 294f69e662d157 Joe Perches 2019-10-05 222 #else 294f69e662d157 Joe Perches 2019-10-05 223 # define fallthrough do {} while (0) /* fallthrough */ a3f8a30f3f0079 Miguel Ojeda 2018-08-30 224 #endif a3f8a30f3f0079 Miguel Ojeda 2018-08-30 225 :::::: The code at line 221 was first introduced by commit :::::: 294f69e662d1570703e9b56e95be37a9fd3afba5 compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use :::::: TO: Joe Perches <joe(a)perches.com> :::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 21291/23799] drivers/spi/spi-phytium-plat.c:192:36: warning: 'phytium_spi_acpi_match' defined but not used
by kernel test robot 29 Sep '24

29 Sep '24
Hi Malloy, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: e8483fcd43fc1dbb8d21bb7eacce804cbab6a7c6 [21291/23799] spi: add phytium spi support config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240929/202409290023.FihgEvFc-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240929/202409290023.FihgEvFc-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/202409290023.FihgEvFc-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/spi/spi-phytium-plat.c:192:36: warning: 'phytium_spi_acpi_match' defined but not used [-Wunused-const-variable=] 192 | static const struct acpi_device_id phytium_spi_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~ vim +/phytium_spi_acpi_match +192 drivers/spi/spi-phytium-plat.c 191 > 192 static const struct acpi_device_id phytium_spi_acpi_match[] = { 193 {"PHYT000E", 0}, 194 {} 195 }; 196 MODULE_DEVICE_TABLE(acpi, phytium_spi_acpi_match); 197 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 19782/30000] drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:3270:29: sparse: sparse: symbol 'hns3_unic_netdev_ops' was not declared. Should it be static?
by kernel test robot 29 Sep '24

29 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 737ec46e963210dc3b856637e871fa5b0c91316e [19782/30000] UNIC: Adds the process of UNIC driver initializing config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240929/202409290026.ODSSLRxB-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240929/202409290026.ODSSLRxB-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/202409290026.ODSSLRxB-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:1200:29: sparse: sparse: restricted __be32 degrades to integer >> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:3270:29: sparse: sparse: symbol 'hns3_unic_netdev_ops' was not declared. Should it be static? vim +/hns3_unic_netdev_ops +3270 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c 3269 > 3270 const struct net_device_ops hns3_unic_netdev_ops = { 3271 .ndo_open = hns3_nic_net_open, 3272 .ndo_stop = hns3_nic_net_stop, 3273 .ndo_start_xmit = hns3_nic_net_xmit, 3274 .ndo_tx_timeout = hns3_nic_net_timeout, 3275 .ndo_do_ioctl = hns3_nic_do_ioctl, 3276 .ndo_change_mtu = hns3_nic_change_mtu, 3277 .ndo_set_features = hns3_nic_set_features, 3278 .ndo_features_check = hns3_features_check, 3279 .ndo_get_stats64 = hns3_nic_get_stats64, 3280 .ndo_setup_tc = hns3_nic_setup_tc, 3281 .ndo_set_rx_mode = hns3_nic_set_rx_mode, 3282 .ndo_set_vf_trust = hns3_set_vf_trust, 3283 #ifdef CONFIG_RFS_ACCEL 3284 .ndo_rx_flow_steer = hns3_rx_flow_steer, 3285 #endif 3286 .ndo_get_vf_config = hns3_nic_get_vf_config, 3287 .ndo_set_vf_link_state = hns3_nic_set_vf_link_state, 3288 .ndo_set_vf_rate = hns3_nic_set_vf_rate, 3289 .ndo_select_queue = hns3_nic_select_queue, 3290 }; 3291 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 19685/23799] drivers/md/.tmp_dm-verity-verify-sig.o: warning: objtool: missing symbol for section .text
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 193a981127632c7d4c26a0674881dea0c208640c [19685/23799] dm verity: add root hash pkcs#7 signature verification config: x86_64-buildonly-randconfig-002-20240926 (https://download.01.org/0day-ci/archive/20240928/202409282255.GuxtXkRJ-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409282255.GuxtXkRJ-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/202409282255.GuxtXkRJ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/md/.tmp_dm-verity-verify-sig.o: warning: objtool: missing symbol for section .text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 27522/30000] drivers/soc/hisilicon/hisi_lockdown.c:56:19: warning: no previous prototype for 'get_valid_sccl'
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: c40d971092ff58cd771bb9413ae132a3eb74fab3 [27522/30000] hisi: l3t: Add L3 cache driver for hisi config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409282220.v0Ys1Flg-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409282220.v0Ys1Flg-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/202409282220.v0Ys1Flg-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/soc/hisilicon/hisi_lockdown.c:56:19: warning: no previous prototype for 'get_valid_sccl' [-Wmissing-prototypes] 56 | struct hisi_sccl *get_valid_sccl(int nid) | ^~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for BPF_NET_GLOBAL_PROG Depends on [n]: NET [=n] && BPF_SYSCALL [=n] Selected by [y]: - SCHED_TASK_RELATIONSHIP [=y] && CGROUPS [=y] && NUMA_BALANCING [=y] vim +/get_valid_sccl +56 drivers/soc/hisilicon/hisi_lockdown.c 55 > 56 struct hisi_sccl *get_valid_sccl(int nid) 57 { 58 struct hisi_sccl *sccl; 59 60 sccl = hisi_l3t_get_sccl(nid); 61 if (!sccl || !sccl->ccl_cnt) 62 return NULL; 63 64 if (!sccl->l3t || !sccl->l3t[0]) 65 return NULL; 66 67 return sccl; 68 } 69 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 20162/23799] mm/share_pool.c:4577:64: error: 'HUGETLB_ALLOC_BUDDY' undeclared
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 0886320b818787f720824229f153f161c89faf70 [20162/23799] mm/sharepool: Charge Buddy hugepage to memcg config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409282248.mtMRfV3U-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409282248.mtMRfV3U-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/202409282248.mtMRfV3U-lkp@intel.com/ All errors (new ones prefixed by >>): mm/share_pool.c: In function 'mg_sp_group_id_by_pid': mm/share_pool.c:1086:29: warning: ordered comparison of pointer with integer zero [-Wextra] 1086 | if (!spg_ids || num <= 0) | ^~ mm/share_pool.c: In function 'sp_compact_nodes': mm/share_pool.c:2149:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'? [-Werror=implicit-function-declaration] 2149 | sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | sysctl_memcg_qos_handler mm/share_pool.c: In function 'sp_hugetlb_entry': mm/share_pool.c:3299:21: error: implicit declaration of function 'huge_ptep_get' [-Werror=implicit-function-declaration] 3299 | pte_t pte = huge_ptep_get(ptep); | ^~~~~~~~~~~~~ mm/share_pool.c:3299:21: error: invalid initializer mm/share_pool.c: In function 'sharepool_no_page': mm/share_pool.c:4577:32: error: implicit declaration of function 'hugetlb_alloc_hugepage'; did you mean 'vmalloc_hugepage'? [-Werror=implicit-function-declaration] 4577 | page = hugetlb_alloc_hugepage(node_id, HUGETLB_ALLOC_BUDDY); | ^~~~~~~~~~~~~~~~~~~~~~ | vmalloc_hugepage >> mm/share_pool.c:4577:64: error: 'HUGETLB_ALLOC_BUDDY' undeclared (first use in this function) 4577 | page = hugetlb_alloc_hugepage(node_id, HUGETLB_ALLOC_BUDDY); | ^~~~~~~~~~~~~~~~~~~ mm/share_pool.c:4577:64: note: each undeclared identifier is reported only once for each function it appears in mm/share_pool.c:4585:30: error: implicit declaration of function 'huge_pte_none'; did you mean 'huge_pte_lock'? [-Werror=implicit-function-declaration] 4585 | if (!huge_pte_none(huge_ptep_get(ptep))) { | ^~~~~~~~~~~~~ | huge_pte_lock mm/share_pool.c:4606:23: error: implicit declaration of function 'huge_add_to_page_cache'; did you mean 'add_to_page_cache'? [-Werror=implicit-function-declaration] 4606 | err = huge_add_to_page_cache(page, mapping, idx); | ^~~~~~~~~~~~~~~~~~~~~~ | add_to_page_cache mm/share_pool.c:4631:9: error: implicit declaration of function 'set_huge_pte_at'; did you mean 'set_huge_swap_pte_at'? [-Werror=implicit-function-declaration] 4631 | set_huge_pte_at(mm, haddr, ptep, new_pte); | ^~~~~~~~~~~~~~~ | set_huge_swap_pte_at mm/share_pool.c:4633:9: error: implicit declaration of function 'hugetlb_count_add'; did you mean 'hugetlb_count_sub'? [-Werror=implicit-function-declaration] 4633 | hugetlb_count_add(pages_per_huge_page(h), mm); | ^~~~~~~~~~~~~~~~~ | hugetlb_count_sub mm/share_pool.c: In function 'sp_alloc_pages': mm/share_pool.c:4797:61: error: 'HUGETLB_ALLOC_NONE' undeclared (first use in this function); did you mean 'HUGETLB_ANON_FILE'? 4797 | page = hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~ | HUGETLB_ANON_FILE mm/share_pool.c: At top level: mm/share_pool.c:4492:12: warning: 'proc_overview_show' defined but not used [-Wunused-function] 4492 | static int proc_overview_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~~~~~ mm/share_pool.c:4440:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 4440 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ mm/share_pool.c:4377:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 4377 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/HUGETLB_ALLOC_BUDDY +4577 mm/share_pool.c 4541 4542 vm_fault_t sharepool_no_page(struct mm_struct *mm, 4543 struct vm_area_struct *vma, 4544 struct address_space *mapping, pgoff_t idx, 4545 unsigned long address, pte_t *ptep, unsigned int flags) 4546 { 4547 struct hstate *h = hstate_vma(vma); 4548 vm_fault_t ret = VM_FAULT_SIGBUS; 4549 unsigned long size; 4550 struct page *page; 4551 pte_t new_pte; 4552 spinlock_t *ptl; 4553 unsigned long haddr = address & huge_page_mask(h); 4554 bool new_page = false; 4555 int err; 4556 int node_id; 4557 struct sp_area *spa; 4558 bool charge_hpage = false; 4559 struct mem_cgroup *memcg; 4560 4561 spa = vma->vm_private_data; 4562 if (!spa) { 4563 pr_err("share pool: vma is invalid, not from sp mmap\n"); 4564 return ret; 4565 } 4566 node_id = spa->node_id; 4567 4568 retry: 4569 page = find_lock_page(mapping, idx); 4570 if (!page) { 4571 size = i_size_read(mapping->host) >> huge_page_shift(h); 4572 if (idx >= size) 4573 goto out; 4574 4575 page = alloc_huge_page(vma, haddr, 0); 4576 if (IS_ERR(page)) { > 4577 page = hugetlb_alloc_hugepage(node_id, HUGETLB_ALLOC_BUDDY); 4578 if (!page) 4579 page = ERR_PTR(-ENOMEM); 4580 else if (!PageKmemcg(page)) 4581 charge_hpage = true; 4582 } 4583 if (IS_ERR(page)) { 4584 ptl = huge_pte_lock(h, mm, ptep); 4585 if (!huge_pte_none(huge_ptep_get(ptep))) { 4586 ret = 0; 4587 spin_unlock(ptl); 4588 goto out; 4589 } 4590 spin_unlock(ptl); 4591 ret = vmf_error(PTR_ERR(page)); 4592 goto out; 4593 } 4594 4595 if (charge_hpage && 4596 mem_cgroup_try_charge_delay(page, vma->vm_mm, GFP_KERNEL, &memcg, true)) { 4597 put_page(page); 4598 ret = vmf_error(-ENOMEM); 4599 goto out; 4600 } 4601 4602 __SetPageUptodate(page); 4603 new_page = true; 4604 4605 /* sharepool pages are all shared */ 4606 err = huge_add_to_page_cache(page, mapping, idx); 4607 if (err) { 4608 if (charge_hpage) { 4609 mem_cgroup_cancel_charge(page, memcg, true); 4610 charge_hpage = false; 4611 } 4612 put_page(page); 4613 if (err == -EEXIST) 4614 goto retry; 4615 goto out; 4616 } 4617 } 4618 4619 ptl = huge_pte_lock(h, mm, ptep); 4620 size = i_size_read(mapping->host) >> huge_page_shift(h); 4621 if (idx >= size) 4622 goto backout; 4623 4624 ret = 0; 4625 if (!huge_pte_none(huge_ptep_get(ptep))) 4626 goto backout; 4627 4628 page_dup_rmap(page, true); 4629 new_pte = make_huge_pte(vma, page, ((vma->vm_flags & VM_WRITE) 4630 && (vma->vm_flags & VM_SHARED))); 4631 set_huge_pte_at(mm, haddr, ptep, new_pte); 4632 4633 hugetlb_count_add(pages_per_huge_page(h), mm); 4634 4635 if (charge_hpage) 4636 mem_cgroup_commit_charge(page, memcg, false, true); 4637 4638 spin_unlock(ptl); 4639 4640 if (new_page) 4641 SetPagePrivate(&page[1]); 4642 4643 unlock_page(page); 4644 out: 4645 return ret; 4646 4647 backout: 4648 spin_unlock(ptl); 4649 unlock_page(page); 4650 if (charge_hpage) 4651 mem_cgroup_cancel_charge(page, memcg, true); 4652 put_page(page); 4653 goto out; 4654 } 4655 EXPORT_SYMBOL(sharepool_no_page); 4656 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 15413/30000] drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:1184:29: sparse: sparse: restricted __be32 degrades to integer
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 19f053b7ee378e6d556caddf05485fe55695149e [15413/30000] net: hns3: add support handling tx dhcp packets for ROH config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409282011.zsMjvrEl-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409282011.zsMjvrEl-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/202409282011.zsMjvrEl-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:1184:29: sparse: sparse: restricted __be32 degrades to integer vim +1184 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c 1167 1168 static struct hns3_dhcp_packet *hns3_get_dhcp_packet(struct sk_buff *skb, 1169 int *dhcp_len) 1170 { 1171 struct hns3_dhcp_packet *dhcp; 1172 union l4_hdr_info l4; 1173 int l4_payload_len; 1174 1175 l4.hdr = skb_transport_header(skb); 1176 if (l4.udp->dest != htons(HNS3_DHCP_CLIENT_PORT) || 1177 l4.udp->source != htons(HNS3_DHCP_SERVER_PORT)) 1178 return NULL; 1179 1180 dhcp = (struct hns3_dhcp_packet *)(l4.hdr + sizeof(struct udphdr)); 1181 l4_payload_len = ntohs(l4.udp->len) - sizeof(struct udphdr); 1182 if (l4_payload_len < offsetof(struct hns3_dhcp_packet, options) || 1183 dhcp->hlen != ETH_ALEN || > 1184 dhcp->cookie != htonl(HNS3_DHCP_MAGIC)) 1185 return NULL; 1186 1187 *dhcp_len = l4_payload_len; 1188 return dhcp; 1189 } 1190 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 19033/23799] mm/mem_reliable.c:41:22: warning: 'zero' defined but not used
by kernel test robot 28 Sep '24

28 Sep '24
Hi Chen, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 6943b93b464351cbc35aa002e86bac48e08b1c3f [19033/23799] mm: add support for limiting the usage of reliable memory in pagecache config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281933.6SgL6bDf-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281933.6SgL6bDf-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/202409281933.6SgL6bDf-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/mem_reliable.c:42:22: warning: 'reliable_pagecache_max_bytes' defined but not used [-Wunused-variable] 42 | static unsigned long reliable_pagecache_max_bytes = ULONG_MAX; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> mm/mem_reliable.c:41:22: warning: 'zero' defined but not used [-Wunused-variable] 41 | static unsigned long zero; | ^~~~ vim +/zero +41 mm/mem_reliable.c 40 > 41 static unsigned long zero; 42 static unsigned long reliable_pagecache_max_bytes = ULONG_MAX; 43 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 20090/30000] arch/arm64/kernel/cpufeature.c:1729:13: warning: no previous prototype for 'early_pbha_init'
by kernel test robot 28 Sep '24

28 Sep '24
Hi Ma, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: f43933b3f947a7f9314ec8d704c6ae01041dbbba [20090/30000] arm64: cpufeature: Enable PBHA for stage1 early via FDT config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281932.KZq0zK8A-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281932.KZq0zK8A-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/202409281932.KZq0zK8A-lkp@intel.com/ Note: functions only called from assembly code should be annotated with the asmlinkage attribute All warnings (new ones prefixed by >>): arch/arm64/kernel/cpufeature.c:1627:6: warning: no previous prototype for 'update_pbha_perf_only_bit' [-Wmissing-prototypes] 1627 | void update_pbha_perf_only_bit(const u8 *bits, int cnt) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kernel/cpufeature.c:1729:13: warning: no previous prototype for 'early_pbha_init' [-Wmissing-prototypes] 1729 | void __init early_pbha_init(void) | ^~~~~~~~~~~~~~~ vim +/early_pbha_init +1729 arch/arm64/kernel/cpufeature.c 1728 > 1729 void __init early_pbha_init(void) 1730 { 1731 void *fdt; 1732 int node; 1733 const u8 *prop; 1734 int size; 1735 1736 spin_lock(&pbha_dt_lock); 1737 1738 fdt = get_early_fdt_ptr(); 1739 if (!fdt) 1740 goto unlock; 1741 1742 node = fdt_path_offset(fdt, "/cpus"); 1743 if (node < 0) 1744 goto unlock; 1745 1746 prop = fdt_getprop(fdt, node, "arm,pbha-performance-only", &size); 1747 if (!prop) 1748 goto unlock; 1749 1750 if (!cpu_has_pbha()) 1751 goto unlock; 1752 1753 update_pbha_perf_only_bit(prop, size); 1754 enable_pbha_inner(); 1755 1756 pbha_enabled = true; 1757 1758 unlock: 1759 spin_unlock(&pbha_dt_lock); 1760 } 1761 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 0/3] Some misses patch for run scheduler bpf programs
by Hui Tang 28 Sep '24

28 Sep '24
The patchset as follow: Guan Jing (3): libbpf: add support for scheduler bpf programs bpftool: recognize scheduler programs sched: Add helper functions to get cpu statistics include/linux/sched.h | 9 ++++++++ include/uapi/linux/bpf.h | 7 +++++++ kernel/sched/bpf_sched.c | 38 ++++++++++++++++++++++++++++++++++ scripts/bpf_doc.py | 2 ++ tools/include/uapi/linux/bpf.h | 7 +++++++ tools/lib/bpf/libbpf.c | 23 +++++++++++++++++++- tools/lib/bpf/libbpf.h | 2 ++ tools/lib/bpf/libbpf.map | 1 + 8 files changed, 88 insertions(+), 1 deletion(-) -- 2.34.1
2 4
0 0
[openeuler:OLK-5.10 14637/30000] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: sparse: mixing different enum types:
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 62aede9feaf6f4729af43df72be267a32bda43d1 [14637/30000] net: hns3: add support customized exception handling interfaces. config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409281736.VfwcJjb4-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409281736.VfwcJjb4-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/202409281736.VfwcJjb4-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: sparse: mixing different enum types: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: unsigned int enum hnae3_reset_type drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:4413:46: sparse: unsigned int enum hnae3_event_type_custom drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5902:37: sparse: sparse: restricted __le32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5903:37: sparse: sparse: restricted __le32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6137:17: sparse: sparse: restricted __be32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6231:17: sparse: sparse: restricted __be32 degrades to integer >> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:13772:21: sparse: sparse: symbol 'hclge_ops' was not declared. Should it be static? drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5473:31: sparse: sparse: context imbalance in 'hclge_sync_fd_user_def_cfg' - unexpected unlock drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:12714:23: sparse: sparse: memset with byte count of 131072 vim +4413 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c 4374 4375 void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle) 4376 { 4377 struct hnae3_ae_dev *ae_dev = pci_get_drvdata(pdev); 4378 struct hclge_dev *hdev = ae_dev->priv; 4379 int ret; 4380 4381 /* We might end up getting called broadly because of 2 below cases: 4382 * 1. Recoverable error was conveyed through APEI and only way to bring 4383 * normalcy is to reset. 4384 * 2. A new reset request from the stack due to timeout 4385 * 4386 * check if this is a new reset request and we are not here just because 4387 * last reset attempt did not succeed and watchdog hit us again. We will 4388 * know this if last reset request did not occur very recently (watchdog 4389 * timer = 5*HZ, let us check after sufficiently large time, say 4*5*Hz) 4390 * In case of new request we reset the "reset level" to PF reset. 4391 * And if it is a repeat reset request of the most recent one then we 4392 * want to make sure we throttle the reset request. Therefore, we will 4393 * not allow it again before 3*HZ times. 4394 */ 4395 4396 if (time_before(jiffies, (hdev->last_reset_time + 4397 HCLGE_RESET_INTERVAL))) { 4398 mod_timer(&hdev->reset_timer, jiffies + HCLGE_RESET_INTERVAL); 4399 return; 4400 } 4401 4402 if (hdev->default_reset_request) { 4403 hdev->reset_level = 4404 hclge_get_reset_level(ae_dev, 4405 &hdev->default_reset_request); 4406 } else if (time_after(jiffies, (hdev->last_reset_time + 4 * 5 * HZ))) { 4407 hdev->reset_level = HNAE3_FUNC_RESET; 4408 } 4409 4410 dev_info(&hdev->pdev->dev, "received reset event, reset type is %d\n", 4411 hdev->reset_level); 4412 > 4413 ret = hclge_ext_call_event(hdev, hdev->reset_level); 4414 if (ret) { 4415 /* request reset & schedule reset task */ 4416 set_bit(hdev->reset_level, &hdev->reset_request); 4417 hclge_reset_task_schedule(hdev); 4418 } 4419 4420 if (hdev->reset_level < HNAE3_GLOBAL_RESET) 4421 hdev->reset_level++; 4422 } 4423 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 18309/23799] mm/share_pool.c:3736:12: warning: 'proc_overview_show' defined but not used
by kernel test robot 28 Sep '24

28 Sep '24
Hi Tang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 1cfc25ccec44c17c19c892bd31d00d8f6fb23f9b [18309/23799] share_pool: Add proc node to show process overview info config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281617.XJYO7emb-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281617.XJYO7emb-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/202409281617.XJYO7emb-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/share_pool.c: In function 'sp_group_id_by_pid': mm/share_pool.c:840:29: warning: ordered comparison of pointer with integer zero [-Wextra] 840 | if (!spg_ids || num <= 0) | ^~ mm/share_pool.c: In function 'sp_compact_nodes': mm/share_pool.c:1689:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'? [-Werror=implicit-function-declaration] 1689 | sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | sysctl_memcg_qos_handler mm/share_pool.c: In function 'sp_hugetlb_entry': mm/share_pool.c:2688:21: error: implicit declaration of function 'huge_ptep_get' [-Werror=implicit-function-declaration] 2688 | pte_t pte = huge_ptep_get(ptep); | ^~~~~~~~~~~~~ mm/share_pool.c:2688:21: error: invalid initializer mm/share_pool.c: In function 'sharepool_no_page': mm/share_pool.c:3824:30: error: implicit declaration of function 'huge_pte_none'; did you mean 'huge_pte_lock'? [-Werror=implicit-function-declaration] 3824 | if (!huge_pte_none(huge_ptep_get(ptep))) { | ^~~~~~~~~~~~~ | huge_pte_lock mm/share_pool.c:3837:23: error: implicit declaration of function 'huge_add_to_page_cache'; did you mean 'add_to_page_cache'? [-Werror=implicit-function-declaration] 3837 | err = huge_add_to_page_cache(page, mapping, idx); | ^~~~~~~~~~~~~~~~~~~~~~ | add_to_page_cache mm/share_pool.c:3859:9: error: implicit declaration of function 'set_huge_pte_at'; did you mean 'set_huge_swap_pte_at'? [-Werror=implicit-function-declaration] 3859 | set_huge_pte_at(mm, haddr, ptep, new_pte); | ^~~~~~~~~~~~~~~ | set_huge_swap_pte_at mm/share_pool.c:3861:9: error: implicit declaration of function 'hugetlb_count_add'; did you mean 'hugetlb_count_sub'? [-Werror=implicit-function-declaration] 3861 | hugetlb_count_add(pages_per_huge_page(h), mm); | ^~~~~~~~~~~~~~~~~ | hugetlb_count_sub mm/share_pool.c:3797:13: warning: variable 'node_id' set but not used [-Wunused-but-set-variable] 3797 | int node_id; | ^~~~~~~ mm/share_pool.c: In function 'sp_alloc_pages': mm/share_pool.c:4018:24: error: implicit declaration of function 'hugetlb_alloc_hugepage'; did you mean 'vmalloc_hugepage'? [-Werror=implicit-function-declaration] 4018 | page = hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~~~~~ | vmalloc_hugepage mm/share_pool.c:4018:61: error: 'HUGETLB_ALLOC_NONE' undeclared (first use in this function); did you mean 'HUGETLB_ANON_FILE'? 4018 | page = hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~ | HUGETLB_ANON_FILE mm/share_pool.c:4018:61: note: each undeclared identifier is reported only once for each function it appears in mm/share_pool.c: At top level: >> mm/share_pool.c:3736:12: warning: 'proc_overview_show' defined but not used [-Wunused-function] 3736 | static int proc_overview_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~~~~~ mm/share_pool.c:3693:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 3693 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ mm/share_pool.c:3635:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 3635 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/proc_overview_show +3736 mm/share_pool.c 3735 > 3736 static int proc_overview_show(struct seq_file *seq, void *offset) 3737 { 3738 seq_printf(seq, "%-8s %-16s %-9s %-9s %-9s %-10s %-10s %-8s\n", 3739 "PID", "COMM", "SP_ALLOC", "SP_K2U", "SP_RES", "Non-SP_RES", 3740 "Non-SP_Shm", "VIRT"); 3741 3742 down_read(&sp_proc_stat_sem); 3743 idr_for_each(&sp_proc_stat_idr, idr_proc_overview_cb, seq); 3744 up_read(&sp_proc_stat_sem); 3745 return 0; 3746 } 3747 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 18200/23799] mm/share_pool.c:1043:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'?
by kernel test robot 28 Sep '24

28 Sep '24
Hi Zhou, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: d45b33b72c530e64219ad997947a33f6e07d339c [18200/23799] share pool: Try to compact when memory is insufficient config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281442.EoXjS7UC-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281442.EoXjS7UC-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/202409281442.EoXjS7UC-lkp@intel.com/ All errors (new ones prefixed by >>): mm/share_pool.c: In function 'sp_compact_nodes': >> mm/share_pool.c:1043:9: error: implicit declaration of function 'sysctl_compaction_handler'; did you mean 'sysctl_memcg_qos_handler'? [-Werror=implicit-function-declaration] 1043 | sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~~ | sysctl_memcg_qos_handler mm/share_pool.c: In function 'sp_hugetlb_entry': mm/share_pool.c:1772:21: error: implicit declaration of function 'huge_ptep_get' [-Werror=implicit-function-declaration] 1772 | pte_t pte = huge_ptep_get(ptep); | ^~~~~~~~~~~~~ mm/share_pool.c:1772:21: error: invalid initializer mm/share_pool.c: In function 'sharepool_no_page': mm/share_pool.c:2524:30: error: implicit declaration of function 'huge_pte_none'; did you mean 'huge_pte_lock'? [-Werror=implicit-function-declaration] 2524 | if (!huge_pte_none(huge_ptep_get(ptep))) { | ^~~~~~~~~~~~~ | huge_pte_lock mm/share_pool.c:2537:23: error: implicit declaration of function 'huge_add_to_page_cache'; did you mean 'add_to_page_cache'? [-Werror=implicit-function-declaration] 2537 | err = huge_add_to_page_cache(page, mapping, idx); | ^~~~~~~~~~~~~~~~~~~~~~ | add_to_page_cache mm/share_pool.c:2559:9: error: implicit declaration of function 'set_huge_pte_at'; did you mean 'set_huge_swap_pte_at'? [-Werror=implicit-function-declaration] 2559 | set_huge_pte_at(mm, haddr, ptep, new_pte); | ^~~~~~~~~~~~~~~ | set_huge_swap_pte_at mm/share_pool.c:2561:9: error: implicit declaration of function 'hugetlb_count_add'; did you mean 'hugetlb_count_sub'? [-Werror=implicit-function-declaration] 2561 | hugetlb_count_add(pages_per_huge_page(h), mm); | ^~~~~~~~~~~~~~~~~ | hugetlb_count_sub mm/share_pool.c: In function 'sp_alloc_pages': mm/share_pool.c:2597:24: error: implicit declaration of function 'hugetlb_alloc_hugepage'; did you mean 'vmalloc_hugepage'? [-Werror=implicit-function-declaration] 2597 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~~~~~ | vmalloc_hugepage mm/share_pool.c:2597:61: error: 'HUGETLB_ALLOC_NONE' undeclared (first use in this function); did you mean 'HUGETLB_ANON_FILE'? 2597 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~ | HUGETLB_ANON_FILE mm/share_pool.c:2597:61: note: each undeclared identifier is reported only once for each function it appears in mm/share_pool.c:2600:1: warning: control reaches end of non-void function [-Wreturn-type] 2600 | } | ^ mm/share_pool.c: At top level: mm/share_pool.c:2482:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 2482 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ mm/share_pool.c:2363:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 2363 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +1043 mm/share_pool.c 1039 1040 static unsigned long last_jiffies; 1041 static void sp_compact_nodes(struct work_struct *work) 1042 { > 1043 sysctl_compaction_handler(NULL, 1, NULL, NULL, NULL); 1044 1045 kfree(work); 1046 } 1047 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 14521/30000] drivers/gpu/drm/loongson/lsdc_i2c.c:180:23: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 028c67cca3dd40a78c0f025f2b8562343dcb2741 [14521/30000] LoongArch: fix compile error when using make allmodconfig config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409281308.P52A5s6n-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409281308.P52A5s6n-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/202409281308.P52A5s6n-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/loongson/lsdc_i2c.c:180:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *dir_reg @@ got void * @@ drivers/gpu/drm/loongson/lsdc_i2c.c:180:23: sparse: expected void [noderef] __iomem *dir_reg drivers/gpu/drm/loongson/lsdc_i2c.c:180:23: sparse: got void * >> drivers/gpu/drm/loongson/lsdc_i2c.c:181:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *dat_reg @@ got void * @@ drivers/gpu/drm/loongson/lsdc_i2c.c:181:23: sparse: expected void [noderef] __iomem *dat_reg drivers/gpu/drm/loongson/lsdc_i2c.c:181:23: sparse: got void * drivers/gpu/drm/loongson/lsdc_i2c.c:253:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *dir_reg @@ got void * @@ drivers/gpu/drm/loongson/lsdc_i2c.c:253:23: sparse: expected void [noderef] __iomem *dir_reg drivers/gpu/drm/loongson/lsdc_i2c.c:253:23: sparse: got void * drivers/gpu/drm/loongson/lsdc_i2c.c:254:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *dat_reg @@ got void * @@ drivers/gpu/drm/loongson/lsdc_i2c.c:254:23: sparse: expected void [noderef] __iomem *dat_reg drivers/gpu/drm/loongson/lsdc_i2c.c:254:23: sparse: got void * vim +180 drivers/gpu/drm/loongson/lsdc_i2c.c 80764bc784413e Huacai Chen 2018-05-22 130 80764bc784413e Huacai Chen 2018-05-22 131 struct lsdc_i2c *lsdc_of_create_i2c_adapter(struct device *parent, 80764bc784413e Huacai Chen 2018-05-22 132 void *reg_base, 80764bc784413e Huacai Chen 2018-05-22 133 struct device_node *i2c_np) 80764bc784413e Huacai Chen 2018-05-22 134 { 80764bc784413e Huacai Chen 2018-05-22 135 unsigned int udelay = 5; 80764bc784413e Huacai Chen 2018-05-22 136 unsigned int timeout = 2200; 80764bc784413e Huacai Chen 2018-05-22 137 int nr = -1; 80764bc784413e Huacai Chen 2018-05-22 138 struct i2c_adapter *adapter; 80764bc784413e Huacai Chen 2018-05-22 139 struct lsdc_i2c *li2c; 80764bc784413e Huacai Chen 2018-05-22 140 u32 sda, scl; 80764bc784413e Huacai Chen 2018-05-22 141 int ret; 80764bc784413e Huacai Chen 2018-05-22 142 80764bc784413e Huacai Chen 2018-05-22 143 li2c = kzalloc(sizeof(*li2c), GFP_KERNEL); 80764bc784413e Huacai Chen 2018-05-22 144 if (!li2c) 80764bc784413e Huacai Chen 2018-05-22 145 return ERR_PTR(-ENOMEM); 80764bc784413e Huacai Chen 2018-05-22 146 80764bc784413e Huacai Chen 2018-05-22 147 spin_lock_init(&li2c->reglock); 80764bc784413e Huacai Chen 2018-05-22 148 80764bc784413e Huacai Chen 2018-05-22 149 ret = of_property_read_u32(i2c_np, "loongson,sda", &sda); 80764bc784413e Huacai Chen 2018-05-22 150 if (ret) { 80764bc784413e Huacai Chen 2018-05-22 151 dev_err(parent, "No sda pin number provided\n"); 80764bc784413e Huacai Chen 2018-05-22 152 return ERR_PTR(ret); 80764bc784413e Huacai Chen 2018-05-22 153 } 80764bc784413e Huacai Chen 2018-05-22 154 80764bc784413e Huacai Chen 2018-05-22 155 ret = of_property_read_u32(i2c_np, "loongson,scl", &scl); 80764bc784413e Huacai Chen 2018-05-22 156 if (ret) { 80764bc784413e Huacai Chen 2018-05-22 157 dev_err(parent, "No scl pin number provided\n"); 80764bc784413e Huacai Chen 2018-05-22 158 return ERR_PTR(ret); 80764bc784413e Huacai Chen 2018-05-22 159 } 80764bc784413e Huacai Chen 2018-05-22 160 80764bc784413e Huacai Chen 2018-05-22 161 ret = of_property_read_u32(i2c_np, "loongson,nr", &nr); 80764bc784413e Huacai Chen 2018-05-22 162 if (ret) { 80764bc784413e Huacai Chen 2018-05-22 163 int id; 80764bc784413e Huacai Chen 2018-05-22 164 80764bc784413e Huacai Chen 2018-05-22 165 if (ret == -EINVAL) 80764bc784413e Huacai Chen 2018-05-22 166 dev_dbg(parent, "no nr provided\n"); 80764bc784413e Huacai Chen 2018-05-22 167 80764bc784413e Huacai Chen 2018-05-22 168 id = of_alias_get_id(i2c_np, "i2c"); 80764bc784413e Huacai Chen 2018-05-22 169 if (id >= 0) 80764bc784413e Huacai Chen 2018-05-22 170 nr = id; 80764bc784413e Huacai Chen 2018-05-22 171 } 80764bc784413e Huacai Chen 2018-05-22 172 80764bc784413e Huacai Chen 2018-05-22 173 li2c->sda = 1 << sda; 80764bc784413e Huacai Chen 2018-05-22 174 li2c->scl = 1 << scl; 80764bc784413e Huacai Chen 2018-05-22 175 80764bc784413e Huacai Chen 2018-05-22 176 /* Optional properties which made the driver more flexible */ 80764bc784413e Huacai Chen 2018-05-22 177 of_property_read_u32(i2c_np, "loongson,udelay", &udelay); 80764bc784413e Huacai Chen 2018-05-22 178 of_property_read_u32(i2c_np, "loongson,timeout", &timeout); 80764bc784413e Huacai Chen 2018-05-22 179 80764bc784413e Huacai Chen 2018-05-22 @180 li2c->dir_reg = reg_base + LS7A_DC_GPIO_DIR_REG; 80764bc784413e Huacai Chen 2018-05-22 @181 li2c->dat_reg = reg_base + LS7A_DC_GPIO_DAT_REG; 80764bc784413e Huacai Chen 2018-05-22 182 80764bc784413e Huacai Chen 2018-05-22 183 li2c->bit.setsda = ls7a_i2c_set_sda; 80764bc784413e Huacai Chen 2018-05-22 184 li2c->bit.setscl = ls7a_i2c_set_scl; 80764bc784413e Huacai Chen 2018-05-22 185 li2c->bit.getsda = ls7a_i2c_get_sda; 80764bc784413e Huacai Chen 2018-05-22 186 li2c->bit.getscl = ls7a_i2c_get_scl; 80764bc784413e Huacai Chen 2018-05-22 187 li2c->bit.udelay = udelay; 80764bc784413e Huacai Chen 2018-05-22 188 li2c->bit.timeout = usecs_to_jiffies(timeout); 80764bc784413e Huacai Chen 2018-05-22 189 li2c->bit.data = li2c; 80764bc784413e Huacai Chen 2018-05-22 190 80764bc784413e Huacai Chen 2018-05-22 191 adapter = &li2c->adapter; 80764bc784413e Huacai Chen 2018-05-22 192 adapter->algo_data = &li2c->bit; 80764bc784413e Huacai Chen 2018-05-22 193 adapter->owner = THIS_MODULE; 80764bc784413e Huacai Chen 2018-05-22 194 adapter->class = I2C_CLASS_DDC; 80764bc784413e Huacai Chen 2018-05-22 195 adapter->dev.parent = parent; 80764bc784413e Huacai Chen 2018-05-22 196 adapter->nr = nr; 80764bc784413e Huacai Chen 2018-05-22 197 adapter->dev.of_node = i2c_np; 80764bc784413e Huacai Chen 2018-05-22 198 80764bc784413e Huacai Chen 2018-05-22 199 snprintf(adapter->name, sizeof(adapter->name), "gpio-i2c-%d", nr); 80764bc784413e Huacai Chen 2018-05-22 200 80764bc784413e Huacai Chen 2018-05-22 201 i2c_set_adapdata(adapter, li2c); 80764bc784413e Huacai Chen 2018-05-22 202 80764bc784413e Huacai Chen 2018-05-22 203 ret = i2c_bit_add_numbered_bus(adapter); 80764bc784413e Huacai Chen 2018-05-22 204 if (ret) { 80764bc784413e Huacai Chen 2018-05-22 205 if (i2c_np) 80764bc784413e Huacai Chen 2018-05-22 206 of_node_put(i2c_np); 80764bc784413e Huacai Chen 2018-05-22 207 80764bc784413e Huacai Chen 2018-05-22 208 kfree(li2c); 80764bc784413e Huacai Chen 2018-05-22 209 return ERR_PTR(ret); 80764bc784413e Huacai Chen 2018-05-22 210 } 80764bc784413e Huacai Chen 2018-05-22 211 80764bc784413e Huacai Chen 2018-05-22 212 dev_info(parent, "sda=%u, scl=%u, nr=%d, udelay=%u, timeout=%u\n", 80764bc784413e Huacai Chen 2018-05-22 213 li2c->sda, li2c->scl, nr, udelay, timeout); 80764bc784413e Huacai Chen 2018-05-22 214 80764bc784413e Huacai Chen 2018-05-22 215 ret = devm_add_action_or_reset(parent, lsdc_of_release_i2c_adapter, li2c); 80764bc784413e Huacai Chen 2018-05-22 216 if (ret) 80764bc784413e Huacai Chen 2018-05-22 217 return NULL; 80764bc784413e Huacai Chen 2018-05-22 218 80764bc784413e Huacai Chen 2018-05-22 219 return li2c; 80764bc784413e Huacai Chen 2018-05-22 220 } 80764bc784413e Huacai Chen 2018-05-22 221 :::::: The code at line 180 was first introduced by commit :::::: 80764bc784413eb604c7d472db55b1ca72d4bbc5 drm/loongson: add kernel modesetting driver support for ls7a1000/ls7a2000 :::::: TO: Huacai Chen <chenhc(a)lemote.com> :::::: CC: Hongchen Zhang <zhanghongchen(a)loongson.cn> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 10131/23799] kernel/sched/debug.o: warning: objtool: missing symbol for section .text.unlikely
by kernel test robot 28 Sep '24

28 Sep '24
Hi Qiang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: acfa0f545c7dd43f959c28e8ab4b139c927ba387 [10131/23799] svm: reduce log of run queue and atomic->atomic64 config: x86_64-buildonly-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281256.6EkX99ER-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281256.6EkX99ER-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/202409281256.6EkX99ER-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/sched/debug.c:797:6: warning: no previous prototype for 'sysrq_sched_debug_tidy' [-Wmissing-prototypes] 797 | void sysrq_sched_debug_tidy(void) | ^~~~~~~~~~~~~~~~~~~~~~ >> kernel/sched/debug.o: warning: objtool: missing symbol for section .text.unlikely -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 15026/23799] arch/arm64/mm/init.c:790:17: error: 'pmu_nmi_enable' undeclared; did you mean 'perf_pmu_enable'?
by kernel test robot 28 Sep '24

28 Sep '24
Hi Xu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 0c40cea7cfc2d1d9762e6fbbb531a43e6dac95ca [15026/23799] NMI: Enable arm-pmu interrupt as NMI in Acensed. config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281255.ytTMHoEG-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281255.ytTMHoEG-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/202409281255.ytTMHoEG-lkp@intel.com/ All errors (new ones prefixed by >>): arch/arm64/mm/init.c:469:13: warning: no previous prototype for 'arm64_memblock_init' [-Wmissing-prototypes] 469 | void __init arm64_memblock_init(void) | ^~~~~~~~~~~~~~~~~~~ arch/arm64/mm/init.c: In function 'ascend_enable_all_features': arch/arm64/mm/init.c:787:17: error: 'mem_sleep_current' undeclared (first use in this function) 787 | mem_sleep_current = PM_SUSPEND_ON; | ^~~~~~~~~~~~~~~~~ arch/arm64/mm/init.c:787:17: note: each undeclared identifier is reported only once for each function it appears in >> arch/arm64/mm/init.c:790:17: error: 'pmu_nmi_enable' undeclared (first use in this function); did you mean 'perf_pmu_enable'? 790 | pmu_nmi_enable = true; | ^~~~~~~~~~~~~~ | perf_pmu_enable vim +790 arch/arm64/mm/init.c 774 775 void ascend_enable_all_features(void) 776 { 777 if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP)) 778 enable_mmap_dvpp = 1; 779 780 if (IS_ENABLED(CONFIG_ASCEND_IOPF_HIPRI)) 781 enable_iopf_hipri = 1; 782 783 if (IS_ENABLED(CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES)) 784 enable_charge_mighp = 1; 785 786 if (IS_ENABLED(CONFIG_SUSPEND)) 787 mem_sleep_current = PM_SUSPEND_ON; 788 789 if (IS_ENABLED(CONFIG_PMU_WATCHDOG)) > 790 pmu_nmi_enable = true; 791 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 18191/23799] mm/share_pool.c:2435:30: error: implicit declaration of function 'huge_pte_none'; did you mean 'huge_pte_lock'?
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 4e851c2bb53e45d92e266c65cf0c203624e74710 [18191/23799] ascend: share_pool: Use sharepool_no_page to alloc hugepage config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281115.zfsojOdU-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281115.zfsojOdU-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/202409281115.zfsojOdU-lkp@intel.com/ All errors (new ones prefixed by >>): mm/share_pool.c: In function 'sp_hugetlb_entry': mm/share_pool.c:1685:21: error: implicit declaration of function 'huge_ptep_get' [-Werror=implicit-function-declaration] 1685 | pte_t pte = huge_ptep_get(ptep); | ^~~~~~~~~~~~~ mm/share_pool.c:1685:21: error: invalid initializer mm/share_pool.c: In function 'sharepool_no_page': >> mm/share_pool.c:2435:30: error: implicit declaration of function 'huge_pte_none'; did you mean 'huge_pte_lock'? [-Werror=implicit-function-declaration] 2435 | if (!huge_pte_none(huge_ptep_get(ptep))) { | ^~~~~~~~~~~~~ | huge_pte_lock >> mm/share_pool.c:2448:23: error: implicit declaration of function 'huge_add_to_page_cache'; did you mean 'add_to_page_cache'? [-Werror=implicit-function-declaration] 2448 | err = huge_add_to_page_cache(page, mapping, idx); | ^~~~~~~~~~~~~~~~~~~~~~ | add_to_page_cache >> mm/share_pool.c:2470:9: error: implicit declaration of function 'set_huge_pte_at'; did you mean 'set_huge_swap_pte_at'? [-Werror=implicit-function-declaration] 2470 | set_huge_pte_at(mm, haddr, ptep, new_pte); | ^~~~~~~~~~~~~~~ | set_huge_swap_pte_at >> mm/share_pool.c:2472:9: error: implicit declaration of function 'hugetlb_count_add'; did you mean 'hugetlb_count_sub'? [-Werror=implicit-function-declaration] 2472 | hugetlb_count_add(pages_per_huge_page(h), mm); | ^~~~~~~~~~~~~~~~~ | hugetlb_count_sub mm/share_pool.c: In function 'sp_alloc_pages': mm/share_pool.c:2508:24: error: implicit declaration of function 'hugetlb_alloc_hugepage'; did you mean 'vmalloc_hugepage'? [-Werror=implicit-function-declaration] 2508 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~~~~~ | vmalloc_hugepage mm/share_pool.c:2508:61: error: 'HUGETLB_ALLOC_NONE' undeclared (first use in this function); did you mean 'HUGETLB_ANON_FILE'? 2508 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~ | HUGETLB_ANON_FILE mm/share_pool.c:2508:61: note: each undeclared identifier is reported only once for each function it appears in mm/share_pool.c:2511:1: warning: control reaches end of non-void function [-Wreturn-type] 2511 | } | ^ mm/share_pool.c: At top level: mm/share_pool.c:2393:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 2393 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ mm/share_pool.c:2274:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 2274 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +2435 mm/share_pool.c 2403 2404 vm_fault_t sharepool_no_page(struct mm_struct *mm, 2405 struct vm_area_struct *vma, 2406 struct address_space *mapping, pgoff_t idx, 2407 unsigned long address, pte_t *ptep, unsigned int flags) 2408 { 2409 struct hstate *h = hstate_vma(vma); 2410 vm_fault_t ret = VM_FAULT_SIGBUS; 2411 unsigned long size; 2412 struct page *page; 2413 pte_t new_pte; 2414 spinlock_t *ptl; 2415 unsigned long haddr = address & huge_page_mask(h); 2416 bool new_page = false; 2417 int err; 2418 2419 retry: 2420 page = find_lock_page(mapping, idx); 2421 if (!page) { 2422 size = i_size_read(mapping->host) >> huge_page_shift(h); 2423 if (idx >= size) 2424 goto out; 2425 2426 page = alloc_huge_page(vma, haddr, 0); 2427 if (IS_ERR(page)) { 2428 page = alloc_huge_page_node(hstate_file(vma->vm_file), 2429 numa_mem_id()); 2430 if (!page) 2431 page = ERR_PTR(-ENOMEM); 2432 } 2433 if (IS_ERR(page)) { 2434 ptl = huge_pte_lock(h, mm, ptep); > 2435 if (!huge_pte_none(huge_ptep_get(ptep))) { 2436 ret = 0; 2437 spin_unlock(ptl); 2438 goto out; 2439 } 2440 spin_unlock(ptl); 2441 ret = vmf_error(PTR_ERR(page)); 2442 goto out; 2443 } 2444 __SetPageUptodate(page); 2445 new_page = true; 2446 2447 /* sharepool pages are all shared */ > 2448 err = huge_add_to_page_cache(page, mapping, idx); 2449 if (err) { 2450 put_page(page); 2451 if (err == -EEXIST) 2452 goto retry; 2453 goto out; 2454 } 2455 } 2456 2457 2458 ptl = huge_pte_lock(h, mm, ptep); 2459 size = i_size_read(mapping->host) >> huge_page_shift(h); 2460 if (idx >= size) 2461 goto backout; 2462 2463 ret = 0; 2464 if (!huge_pte_none(huge_ptep_get(ptep))) 2465 goto backout; 2466 2467 page_dup_rmap(page, true); 2468 new_pte = make_huge_pte(vma, page, ((vma->vm_flags & VM_WRITE) 2469 && (vma->vm_flags & VM_SHARED))); > 2470 set_huge_pte_at(mm, haddr, ptep, new_pte); 2471 > 2472 hugetlb_count_add(pages_per_huge_page(h), mm); 2473 2474 spin_unlock(ptl); 2475 2476 if (new_page) { 2477 SetPagePrivate(&page[1]); 2478 } 2479 2480 unlock_page(page); 2481 out: 2482 return ret; 2483 2484 backout: 2485 spin_unlock(ptl); 2486 unlock_page(page); 2487 put_page(page); 2488 goto out; 2489 } 2490 EXPORT_SYMBOL(sharepool_no_page); 2491 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 14416/30000] drivers/gpu/drm/loongson/lsdc_output.c:379:63: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 80764bc784413eb604c7d472db55b1ca72d4bbc5 [14416/30000] drm/loongson: add kernel modesetting driver support for ls7a1000/ls7a2000 config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409281002.dDRqb1Lc-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409281002.dDRqb1Lc-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/202409281002.dDRqb1Lc-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/loongson/lsdc_output.c:379:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *reg_base @@ got void [noderef] __iomem *reg_base @@ drivers/gpu/drm/loongson/lsdc_output.c:379:63: sparse: expected void *reg_base drivers/gpu/drm/loongson/lsdc_output.c:379:63: sparse: got void [noderef] __iomem *reg_base vim +379 drivers/gpu/drm/loongson/lsdc_output.c 338 339 /* No DT support, provide a minimal support */ 340 int lsdc_create_output(struct lsdc_device *ldev, 341 unsigned int index, 342 unsigned int num_crtc) 343 { 344 const struct lsdc_chip_desc * const descp = ldev->desc; 345 struct lsdc_display_pipe * const dispipe = &ldev->dispipe[index]; 346 struct drm_device *ddev = ldev->ddev; 347 int encoder_type = DRM_MODE_ENCODER_DPI; 348 int connector_type = DRM_MODE_CONNECTOR_DPI; 349 struct lsdc_output *output; 350 struct drm_encoder *encoder; 351 struct drm_connector *connector; 352 int ret; 353 354 output = devm_kzalloc(ddev->dev, sizeof(*output), GFP_KERNEL); 355 if (!output) 356 return -ENOMEM; 357 358 encoder = &output->encoder; 359 360 if (descp->chip == LSDC_CHIP_7A2000) { 361 encoder_type = DRM_MODE_ENCODER_TMDS; 362 connector_type = DRM_MODE_CONNECTOR_HDMIA; 363 } 364 365 ret = drm_encoder_init(ddev, encoder, &lsdc_encoder_funcs, 366 encoder_type, "encoder-%u", index); 367 368 if (ret) { 369 drm_err(ddev, "Failed to init encoder: %d\n", ret); 370 return ret; 371 } 372 373 if (descp->chip == LSDC_CHIP_7A2000) 374 drm_encoder_helper_add(encoder, &ls7a2000_hdmi_encoder_helper_funcs); 375 376 encoder->possible_crtcs = BIT(index); 377 378 if (descp->has_builtin_i2c) { > 379 output->li2c = lsdc_create_i2c_chan(ddev, ldev->reg_base, index); -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 15479/30000] kernel/sched/topology.c:1618:9: error: implicit declaration of function 'register_sysctl_init'; did you mean 'register_sysctl'?
by kernel test robot 28 Sep '24

28 Sep '24
Hi Tim, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 8ce3e706b31409147f035c037055caa68e450ce5 [15479/30000] scheduler: Add runtime knob sysctl_sched_cluster config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409281008.YCpsDSF7-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409281008.YCpsDSF7-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/202409281008.YCpsDSF7-lkp@intel.com/ All errors (new ones prefixed by >>): kernel/sched/topology.c: In function 'sched_cluster_sysctl_init': >> kernel/sched/topology.c:1618:9: error: implicit declaration of function 'register_sysctl_init'; did you mean 'register_sysctl'? [-Werror=implicit-function-declaration] 1618 | register_sysctl_init("kernel", sched_cluster_sysctls); | ^~~~~~~~~~~~~~~~~~~~ | register_sysctl cc1: some warnings being treated as errors vim +1618 kernel/sched/topology.c 1615 1616 static int __init sched_cluster_sysctl_init(void) 1617 { > 1618 register_sysctl_init("kernel", sched_cluster_sysctls); 1619 return 0; 1620 } 1621 late_initcall(sched_cluster_sysctl_init); 1622 #endif 1623 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 4701/30000] arch/arm64/mm/pmem_reserve.c:13:13: warning: no previous prototype for 'setup_reserve_pmem'
by kernel test robot 28 Sep '24

28 Sep '24
Hi Zhuling, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: db4cd75bc674e6f473c0a7303b1744155352882c [4701/30000] arm64: register persistent memory via protected memory config: arm64-randconfig-004-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280935.BxmRiHdQ-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280935.BxmRiHdQ-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/202409280935.BxmRiHdQ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/arm64/mm/pmem_reserve.c:13:13: warning: no previous prototype for 'setup_reserve_pmem' [-Wmissing-prototypes] 13 | void __init setup_reserve_pmem(u64 start, u64 size) | ^~~~~~~~~~~~~~~~~~ >> arch/arm64/mm/pmem_reserve.c:25:13: warning: no previous prototype for 'request_pmem_res_resource' [-Wmissing-prototypes] 25 | void __init request_pmem_res_resource(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/mm/pmem_reserve.c:40:13: warning: no previous prototype for 'reserve_pmem' [-Wmissing-prototypes] 40 | void __init reserve_pmem(void) | ^~~~~~~~~~~~ vim +/setup_reserve_pmem +13 arch/arm64/mm/pmem_reserve.c 12 > 13 void __init setup_reserve_pmem(u64 start, u64 size) 14 { 15 if (pmem_res_cnt >= MAX_REGIONS) { 16 pr_err("protected memory regions above upper limit %d\n", MAX_REGIONS); 17 return; 18 } 19 20 pmem_res[pmem_res_cnt].start = start; 21 pmem_res[pmem_res_cnt].end = start + size - 1; 22 pmem_res_cnt++; 23 } 24 > 25 void __init request_pmem_res_resource(void) 26 { 27 struct resource *res; 28 int i; 29 30 for (i = 0; i < pmem_res_cnt; i++) { 31 res = &pmem_res[i]; 32 res->name = "Persistent Memory (legacy)"; 33 res->flags = IORESOURCE_MEM; 34 res->desc = IORES_DESC_PERSISTENT_MEMORY_LEGACY; 35 if (res->start && res->end) 36 request_resource(&iomem_resource, res); 37 } 38 } 39 > 40 void __init reserve_pmem(void) -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 13850/23799] arch/arm64/mm/init.c:784:17: error: 'mem_sleep_current' undeclared
by kernel test robot 28 Sep '24

28 Sep '24
Hi Ding, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: fdda68feeca82610ccbcdcbda7250623a6d187d2 [13850/23799] arm64/ascend: Set mem_sleep_current to PM_SUSPEND_ON for ascend platform config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280825.5UMBIt9A-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280825.5UMBIt9A-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/202409280825.5UMBIt9A-lkp@intel.com/ All errors (new ones prefixed by >>): arch/arm64/mm/init.c:469:13: warning: no previous prototype for 'arm64_memblock_init' [-Wmissing-prototypes] 469 | void __init arm64_memblock_init(void) | ^~~~~~~~~~~~~~~~~~~ arch/arm64/mm/init.c: In function 'ascend_enable_setup': >> arch/arm64/mm/init.c:784:17: error: 'mem_sleep_current' undeclared (first use in this function) 784 | mem_sleep_current = PM_SUSPEND_ON; | ^~~~~~~~~~~~~~~~~ arch/arm64/mm/init.c:784:17: note: each undeclared identifier is reported only once for each function it appears in vim +/mem_sleep_current +784 arch/arm64/mm/init.c 770 771 #ifdef CONFIG_ASCEND_FEATURES 772 static int __init ascend_enable_setup(char *__unused) 773 { 774 if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP)) 775 enable_mmap_dvpp = 1; 776 777 if (IS_ENABLED(CONFIG_ASCEND_IOPF_HIPRI)) 778 enable_iopf_hipri = 1; 779 780 if (IS_ENABLED(CONFIG_ASCEND_CHARGE_MIGRATE_HUGEPAGES)) 781 enable_charge_mighp = 1; 782 783 if (IS_ENABLED(CONFIG_SUSPEND)) > 784 mem_sleep_current = PM_SUSPEND_ON; 785 786 return 1; 787 } 788 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 18183/23799] mm/share_pool.c:1542:21: error: implicit declaration of function 'huge_ptep_get'
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 4a280fac30d27ae2aff096f9f99aa12d50f83426 [18183/23799] ascend: share_pool: support share pool features for ascend platform config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280759.ueQXB2WQ-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280759.ueQXB2WQ-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/202409280759.ueQXB2WQ-lkp@intel.com/ All error/warnings (new ones prefixed by >>): mm/share_pool.c: In function 'sp_hugetlb_entry': >> mm/share_pool.c:1542:21: error: implicit declaration of function 'huge_ptep_get' [-Werror=implicit-function-declaration] 1542 | pte_t pte = huge_ptep_get(ptep); | ^~~~~~~~~~~~~ >> mm/share_pool.c:1542:21: error: invalid initializer mm/share_pool.c: In function 'sp_alloc_pages': >> mm/share_pool.c:2263:24: error: implicit declaration of function 'hugetlb_alloc_hugepage'; did you mean 'vmalloc_hugepage'? [-Werror=implicit-function-declaration] 2263 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~~~~~ | vmalloc_hugepage >> mm/share_pool.c:2263:61: error: 'HUGETLB_ALLOC_NONE' undeclared (first use in this function); did you mean 'HUGETLB_ANON_FILE'? 2263 | return hugetlb_alloc_hugepage(NUMA_NO_NODE, HUGETLB_ALLOC_NONE); | ^~~~~~~~~~~~~~~~~~ | HUGETLB_ANON_FILE mm/share_pool.c:2263:61: note: each undeclared identifier is reported only once for each function it appears in mm/share_pool.c:2266:1: warning: control reaches end of non-void function [-Wreturn-type] 2266 | } | ^ mm/share_pool.c: At top level: >> mm/share_pool.c:2235:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 2235 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ >> mm/share_pool.c:2121:12: warning: 'proc_stat_show' defined but not used [-Wunused-function] 2121 | static int proc_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/huge_ptep_get +1542 mm/share_pool.c 1537 1538 static int sp_hugetlb_entry(pte_t *ptep, unsigned long hmask, 1539 unsigned long addr, unsigned long next, 1540 struct mm_walk *walk) 1541 { > 1542 pte_t pte = huge_ptep_get(ptep); 1543 struct page *page = pte_page(pte); 1544 struct sp_walk_data *sp_walk_data; 1545 1546 if (unlikely(!pte_present(pte))) { 1547 if (printk_ratelimit()) 1548 pr_err("share pool: the page of addr %pK unexpectedly not in RAM\n", (void *)addr); 1549 return -EFAULT; 1550 } 1551 1552 sp_walk_data = walk->private; 1553 get_page(page); 1554 sp_walk_data->pages[sp_walk_data->page_count++] = page; 1555 return 0; 1556 } 1557 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 13190/30000] drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:385:58: sparse: sparse: incorrect type in argument 2 (different base types)
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 29ecb19fc3e567091641824b91a6019cc1eb8154 [13190/30000] net: hns3: add queue bonding mode support for VF config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409280619.HevoAR3n-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409280619.HevoAR3n-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/202409280619.HevoAR3n-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:385:58: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] qb_state @@ got restricted __le16 [usertype] @@ drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:385:58: sparse: expected unsigned short [usertype] qb_state drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c:385:58: sparse: got restricted __le16 [usertype] vim +385 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c 305 306 void hclgevf_mbx_async_handler(struct hclgevf_dev *hdev) 307 { 308 struct hclge_mbx_port_base_vlan *vlan_info; 309 struct hclge_mbx_link_status *link_info; 310 struct hclge_mbx_link_mode *link_mode; 311 enum hnae3_reset_type reset_type; 312 u16 link_status, state; 313 __le16 *msg_q; 314 u16 opcode; 315 u8 duplex; 316 u32 speed; 317 u32 tail; 318 u8 flag; 319 u16 idx; 320 321 tail = hdev->arq.tail; 322 323 /* process all the async queue messages */ 324 while (tail != hdev->arq.head) { 325 if (test_bit(HCLGE_COMM_STATE_CMD_DISABLE, 326 &hdev->hw.hw.comm_state)) { 327 dev_info(&hdev->pdev->dev, 328 "vf crq need init in async\n"); 329 return; 330 } 331 332 msg_q = hdev->arq.msg_q[hdev->arq.head]; 333 opcode = le16_to_cpu(msg_q[0]); 334 switch (opcode) { 335 case HCLGE_MBX_LINK_STAT_CHANGE: 336 link_info = (struct hclge_mbx_link_status *)(msg_q + 1); 337 link_status = le16_to_cpu(link_info->link_status); 338 speed = le32_to_cpu(link_info->speed); 339 duplex = (u8)le16_to_cpu(link_info->duplex); 340 flag = link_info->flag; 341 342 /* update upper layer with new link link status */ 343 hclgevf_update_speed_duplex(hdev, speed, duplex); 344 hclgevf_update_link_status(hdev, link_status); 345 346 if (flag & HCLGE_MBX_PUSH_LINK_STATUS_EN) 347 set_bit(HCLGEVF_STATE_PF_PUSH_LINK_STATUS, 348 &hdev->state); 349 350 break; 351 case HCLGE_MBX_LINK_STAT_MODE: 352 link_mode = (struct hclge_mbx_link_mode *)(msg_q + 1); 353 idx = le16_to_cpu(link_mode->idx); 354 if (idx) 355 hdev->hw.mac.supported = 356 le64_to_cpu(link_mode->link_mode); 357 else 358 hdev->hw.mac.advertising = 359 le64_to_cpu(link_mode->link_mode); 360 break; 361 case HCLGE_MBX_ASSERTING_RESET: 362 /* PF has asserted reset hence VF should go in pending 363 * state and poll for the hardware reset status till it 364 * has been completely reset. After this stack should 365 * eventually be re-initialized. 366 */ 367 reset_type = 368 (enum hnae3_reset_type)le16_to_cpu(msg_q[1]); 369 set_bit(reset_type, &hdev->reset_pending); 370 set_bit(HCLGEVF_RESET_PENDING, &hdev->reset_state); 371 hclgevf_reset_task_schedule(hdev); 372 373 break; 374 case HCLGE_MBX_PUSH_VLAN_INFO: 375 vlan_info = 376 (struct hclge_mbx_port_base_vlan *)(msg_q + 1); 377 state = le16_to_cpu(vlan_info->state); 378 hclgevf_update_port_base_vlan_info(hdev, state, 379 vlan_info); 380 break; 381 case HCLGE_MBX_PUSH_PROMISC_INFO: 382 hclgevf_parse_promisc_info(hdev, le16_to_cpu(msg_q[1])); 383 break; 384 case HCLGE_MBX_PUSH_QB_STATE: > 385 hclgevf_parse_qb_info(hdev, msg_q[1]); -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10] BUILD REGRESSION bef6f06e039b8929481350d15d6d8c3ba81c6fd2
by kernel test robot 28 Sep '24

28 Sep '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10 branch HEAD: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 !11896 [sync] PR-11831: drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202409271902.PwZin66T-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280106.13pCWH1k-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280444.fQT7iGoe-lkp@intel.com arch/x86/kernel/paravirt.c:65:36: error: 'CALL_INSN_OPCODE' undeclared (first use in this function) arch/x86/kernel/paravirt.c:65:9: error: implicit declaration of function '__text_gen_insn' [-Werror=implicit-function-declaration] arch/x86/kernel/paravirt.c:66:47: error: 'CALL_INSN_SIZE' undeclared (first use in this function) arch/x86/kernel/paravirt.c:68:1: warning: control reaches end of non-void function [-Wreturn-type] drivers/tty/tty_buffer.c:177:9: error: implicit declaration of function 'printk_safe_exit'; did you mean 'printk_nmi_exit'? [-Werror=implicit-function-declaration] mm/pin_mem.c:246:31: error: 'HUGETLB_PAGE_DTOR' undeclared (first use in this function); did you mean 'HUGETLB_PAGE_ORDER'? Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allnoconfig | |-- arch-arm64-kernel-ipi_nmi.c:error:implicit-declaration-of-function-printk_safe_exit | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter | `-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_exit |-- arm64-randconfig-002-20240928 | |-- arch-arm64-kernel-ipi_nmi.c:error:implicit-declaration-of-function-printk_safe_exit | |-- arch-arm64-mm-quick_kexec.c:warning:no-previous-prototype-for-request_quick_kexec_res | |-- arch-arm64-mm-quick_kexec.c:warning:no-previous-prototype-for-reserve_quick_kexec | |-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-hmat_restore_target | |-- drivers-misc-sdma-dae-sdma_dbg.c:warning:variable-exclusive_chn_num-set-but-not-used | |-- drivers-tty-tty_buffer.c:error:implicit-declaration-of-function-printk_safe_exit | |-- kernel-sched-topology.c:error:implicit-declaration-of-function-register_sysctl_init | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_exit | |-- mm-hugetlb.c:warning:no-previous-prototype-for-hugetlb_alloc_hugepage_nodemask | `-- mm-memcontrol.c:error:implicit-declaration-of-function-ksm_process_profit |-- arm64-randconfig-004-20240928 | |-- arch-arm64-kernel-ipi_nmi.c:error:implicit-declaration-of-function-printk_safe_exit | |-- arch-arm64-mm-pmem_reserve.c:warning:no-previous-prototype-for-request_pmem_res_resource | |-- arch-arm64-mm-pmem_reserve.c:warning:no-previous-prototype-for-reserve_pmem | |-- arch-arm64-mm-pmem_reserve.c:warning:no-previous-prototype-for-setup_reserve_pmem | |-- drivers-ub-urma-ubcore-ubcore_dp.c:warning:no-previous-prototype-for-ubcore_rearm_jfc | |-- drivers-ub-urma-ubcore-ubcore_main.c:warning:no-previous-prototype-for-ubcore_open | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:Function-parameter-or-member-ctx-not-described-in-ubcore_update_uvs_eid_ret | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:Function-parameter-or-member-dev-not-described-in-ubcore_asyn_send_fe2tpf_msg | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:Function-parameter-or-member-req-not-described-in-ubcore_asyn_send_fe2tpf_msg | |-- drivers-ub-urma-ubcore-ubcore_tp.c:warning:no-previous-prototype-for-ubcore_get_mtu | |-- drivers-ub-urma-ubcore-ubcore_umem.c:warning:no-previous-prototype-for-ubcore_umem_get | |-- drivers-ub-urma-ubcore-ubcore_umem.c:warning:no-previous-prototype-for-ubcore_umem_release | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_exit | `-- mm-pin_mem.c:error:HUGETLB_PAGE_DTOR-undeclared-(first-use-in-this-function) |-- arm64-randconfig-r131-20240925 | |-- drivers-hwtracing-coresight-coresight-core.c:sparse:sparse:symbol-__pcpu_scope_csdev_sink-was-not-declared.-Should-it-be-static | |-- drivers-net-ethernet-hisilicon-hns3-hns3pf-hclge_main.c:sparse:sparse:restricted-__be32-degrades-to-integer | `-- drivers-net-ethernet-hisilicon-hns3-hns3pf-hclge_main.c:sparse:sparse:restricted-__le32-degrades-to-integer |-- x86_64-allnoconfig | `-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter-Werror-Wimplicit-function-declaration |-- x86_64-allyesconfig | |-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-function-hmat_restore_target | |-- drivers-net-can-spi-mcp251xfd-mcp251xfd-core.c:warning:no-previous-prototype-for-function-mcp251xfd_tx_obj_write_sync | |-- drivers-net-ethernet-hisilicon-hns3-hns3pf-hclge_tm.c:warning:no-previous-prototype-for-function-hclge_mbx_set_vf_multi_tc | |-- drivers-net-ethernet-hisilicon-hns3-hns3pf-hclge_tm.c:warning:no-previous-prototype-for-function-hclge_tm_vf_tc_dwrr_cfg | |-- drivers-net-ethernet-mucse-rnpgbe-rnpgbe_main.c:warning:variable-err-is-used-uninitialized-whenever-if-condition-is-false | |-- drivers-net-ethernet-mucse-rnpgbevf-rnpgbevf_main.c:warning:Excess-function-parameter-direction-description-in-rnpgbevf_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpgbevf-rnpgbevf_main.c:warning:Excess-function-parameter-msix_vector-description-in-rnpgbevf_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpgbevf-rnpgbevf_main.c:warning:Excess-function-parameter-queue-description-in-rnpgbevf_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpvf-rnpvf_main.c:warning:Excess-function-parameter-direction-description-in-rnpvf_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpvf-rnpvf_main.c:warning:Excess-function-parameter-msix_vector-description-in-rnpvf_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpvf-rnpvf_main.c:warning:Excess-function-parameter-queue-description-in-rnpvf_set_ring_vector | |-- drivers-ub-urma-ubcore-ubcore_ctp.c:warning:comparison-of-address-of-dev-ht-UBCORE_HT_CTP-.head-equal-to-a-null-pointer-is-always-false | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:Function-parameter-or-member-ctx-not-described-in-ubcore_update_uvs_eid_ret | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:Function-parameter-or-member-dev-not-described-in-ubcore_asyn_send_fe2tpf_msg | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:Function-parameter-or-member-req-not-described-in-ubcore_asyn_send_fe2tpf_msg | |-- drivers-ub-urma-ubcore-ubcore_msg.c:warning:no-previous-prototype-for-function-ubcore_asyn_send_fe2tpf_msg | |-- drivers-ub-urma-ubcore-ubcore_netdev.c:warning:no-previous-prototype-for-function-ubcore_fill_port_netdev | |-- drivers-ub-urma-ubcore-ubcore_netdev.c:warning:no-previous-prototype-for-function-ubcore_lookup_sip_info_without_lock | |-- drivers-ub-urma-ubcore-ubcore_netdev.c:warning:no-previous-prototype-for-function-ubcore_new_sip_req_msg | |-- drivers-ub-urma-ubcore-ubcore_netdev.c:warning:no-previous-prototype-for-function-ubcore_update_sip_entry | |-- drivers-ub-urma-ubcore-ubcore_netlink.c:warning:no-previous-prototype-for-function-ubcore_genl_unicast | |-- drivers-ub-urma-ubcore-ubcore_tpg.c:warning:comparison-of-address-of-dev-ht-UBCORE_HT_TP-.head-equal-to-a-null-pointer-is-always-false | |-- drivers-ub-urma-ubcore-ubcore_tpg.c:warning:comparison-of-address-of-dev-ht-UBCORE_HT_TPG-.head-equal-to-a-null-pointer-is-always-false | |-- drivers-ub-urma-ubcore-ubcore_tpg.c:warning:no-previous-prototype-for-function-ubcore_tpg_kref_get | |-- drivers-ub-urma-ubcore-ubcore_umem.c:warning:no-previous-prototype-for-function-ubcore_umem_find_best_page_size | |-- drivers-ub-urma-ubcore-ubcore_utp.c:warning:comparison-of-address-of-dev-ht-UBCORE_HT_UTP-.head-equal-to-a-null-pointer-is-always-false | |-- drivers-ub-urma-ubcore-ubcore_vtp.c:warning:no-previous-prototype-for-function-ubcore_hash_table_rmv_vtpn | |-- drivers-ub-urma-uburma-uburma_mmap.c:warning:no-previous-prototype-for-function-uburma_get_umap_ops | |-- drivers-ub-urma-uburma-uburma_mmap.c:warning:no-previous-prototype-for-function-uburma_umap_priv_init | |-- drivers-ub-urma-uburma-uburma_mmap.c:warning:no-previous-prototype-for-function-uburma_unmap_vma_pages | |-- ld.lld:error:duplicate-symbol:g_uld_mutex | |-- ld.lld:error:duplicate-symbol:lld_dev_hold | `-- ld.lld:error:duplicate-symbol:lld_dev_put |-- x86_64-buildonly-randconfig-001-20240928 | `-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter-Werror-Wimplicit-function-declaration |-- x86_64-buildonly-randconfig-002-20240928 | |-- arch-x86-kernel-paravirt.c:error:CALL_INSN_OPCODE-undeclared-(first-use-in-this-function) | |-- arch-x86-kernel-paravirt.c:error:CALL_INSN_SIZE-undeclared-(first-use-in-this-function) | |-- arch-x86-kernel-paravirt.c:error:implicit-declaration-of-function-__text_gen_insn | `-- arch-x86-kernel-paravirt.c:warning:control-reaches-end-of-non-void-function |-- x86_64-buildonly-randconfig-003-20240928 | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter | `-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_exit |-- x86_64-buildonly-randconfig-004-20240928 | |-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_enter | `-- kernel-workqueue.c:error:implicit-declaration-of-function-printk_safe_exit |-- x86_64-buildonly-randconfig-006-20240928 | |-- arch-x86-kernel-paravirt.c:error:CALL_INSN_OPCODE-undeclared-(first-use-in-this-function) | |-- arch-x86-kernel-paravirt.c:error:CALL_INSN_SIZE-undeclared-(first-use-in-this-function) | `-- arch-x86-kernel-paravirt.c:error:implicit-declaration-of-function-__text_gen_insn |-- x86_64-kexec | |-- arch-x86-kvm-vmx-vmx.o:warning:objtool:fix_rmode_seg:unreachable-instruction | `-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-function-hmat_restore_target |-- x86_64-randconfig-161-20240927 | |-- arch-x86-lib-copy_highpages.c-(null)()-warn:(struct-ctl_table)-proc_handler-cannot-be-NULL.-Expression:copy_highpages_root_table-proc_handler | |-- arch-x86-lib-copy_highpages.c-(null)()-warn:(struct-ctl_table)-proc_handler-cannot-be-NULL.-Expression:copy_highpages_table-proc_handler | |-- arch-x86-lib-copy_highpages.c-(null)()-warn:(struct-ctl_table)-procname-cannot-be-NULL.-Expression:copy_highpages_root_table-procname | |-- arch-x86-lib-copy_highpages.c-(null)()-warn:(struct-ctl_table)-procname-cannot-be-NULL.-Expression:copy_highpages_table-procname | |-- fs-btrfs-extent-tree.c-btrfs_lookup_extent_info()-error:we-previously-assumed-trans-could-be-null-(see-line-) | |-- fs-cifs-file.c-cifs_write_from_iter()-error:uninitialized-symbol-pagevec-. | `-- fs-xfs-xfs_icache.c-xfs_icwalk_tag()-warn:unsigned-goal-is-never-less-than-zero. |-- x86_64-rhel-8.3 | `-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-hmat_restore_target |-- x86_64-rhel-8.3-func | `-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-hmat_restore_target |-- x86_64-rhel-8.3-kselftests | `-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-hmat_restore_target `-- x86_64-rhel-8.3-rust `-- drivers-acpi-numa-hmat.c:warning:no-previous-prototype-for-function-hmat_restore_target elapsed time: 742m configs tested: 23 configs skipped: 128 tested configs: arm64 allmodconfig clang-20 arm64 allnoconfig gcc-14.1.0 arm64 randconfig-001-20240928 gcc-14.1.0 arm64 randconfig-002-20240928 gcc-14.1.0 arm64 randconfig-003-20240928 clang-20 arm64 randconfig-004-20240928 gcc-14.1.0 x86_64 allnoconfig clang-18 x86_64 allyesconfig clang-18 x86_64 buildonly-randconfig-001-20240928 clang-18 x86_64 buildonly-randconfig-002-20240928 gcc-12 x86_64 buildonly-randconfig-003-20240928 gcc-12 x86_64 buildonly-randconfig-004-20240928 gcc-12 x86_64 buildonly-randconfig-005-20240928 clang-18 x86_64 buildonly-randconfig-006-20240928 gcc-12 x86_64 defconfig gcc-11 x86_64 kexec clang-18 x86_64 randconfig-001-20240928 clang-18 x86_64 randconfig-002-20240928 gcc-12 x86_64 randconfig-003-20240928 clang-18 x86_64 randconfig-004-20240928 gcc-12 x86_64 randconfig-005-20240928 clang-18 x86_64 rhel-8.3 gcc-12 x86_64 rhel-8.3-rust clang-18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION 3841d75a6dcd12d108aaf56560b99431d18169e4
by kernel test robot 28 Sep '24

28 Sep '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: 3841d75a6dcd12d108aaf56560b99431d18169e4 !11842 CVE-2024-46771 Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202409271931.90b1jljj-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280233.aF2FycBU-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280341.XkIGO1R8-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280354.ixZVRGmb-lkp@intel.com drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'ce' description in 'qm_hw_error_init' drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'fe' description in 'qm_hw_error_init' drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'msi' description in 'qm_hw_error_init' drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'nfe' description in 'qm_hw_error_init' drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:159:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion] Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-__bio_stage_hierarchy_start | `-- include-linux-thread_info.h:warning:b-may-be-used-uninitialized |-- arm64-allnoconfig | `-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity |-- arm64-randconfig-001-20240928 | |-- drivers-nvme-host-core.c:error:compat_uptr_t-undeclared-(first-use-in-this-function) | |-- drivers-nvme-host-core.c:error:expected-before-ptrval | `-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity |-- arm64-randconfig-002-20240928 | |-- arch-arm64-mm-init.c:error:mem_sleep_current-undeclared-(first-use-in-this-function) | |-- arch-arm64-mm-init.c:error:pmu_nmi_enable-undeclared-(first-use-in-this-function) | |-- drivers-clocksource-arm_arch_timer.c:error:hisi_161010101_read_cntvct_el0-undeclared-(first-use-in-this-function) | |-- drivers-crypto-hisilicon-qm.c:warning:Excess-function-parameter-ce-description-in-qm_hw_error_init | |-- drivers-crypto-hisilicon-qm.c:warning:Excess-function-parameter-fe-description-in-qm_hw_error_init | |-- drivers-crypto-hisilicon-qm.c:warning:Excess-function-parameter-msi-description-in-qm_hw_error_init | |-- drivers-crypto-hisilicon-qm.c:warning:Excess-function-parameter-nfe-description-in-qm_hw_error_init | `-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount |-- arm64-randconfig-003-20240928 | |-- arch-arm64-mm-init.c:error:mem_sleep_current-undeclared-(first-use-in-this-function) | |-- arch-arm64-mm-init.c:error:pmu_nmi_enable-undeclared-(first-use-in-this-function) | |-- drivers-clocksource-arm_arch_timer.c:error:hisi_161010101_read_cntvct_el0-undeclared-(first-use-in-this-function) | `-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount |-- arm64-randconfig-004-20240928 | |-- arch-arm64-mm-init.c:error:mem_sleep_current-undeclared-(first-use-in-this-function) | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | `-- kernel-sched-core.c:error:implicit-declaration-of-function-init_auto_affinity |-- x86_64-allnoconfig | `-- mm-memory.c:error:implicit-declaration-of-function-hugetlb_insert_hugepage_pte_by_pa-Werror-Wimplicit-function-declaration |-- x86_64-allyesconfig | |-- block-blk-io-hierarchy-iodump.c:warning:no-previous-prototype-for-function-__bio_stage_hierarchy_start | `-- drivers-net-ethernet-stmicro-stmmac-dwmac-phytium.c:error:incompatible-pointer-to-integer-conversion-returning-void-from-a-function-with-result-type-int |-- x86_64-buildonly-randconfig-001-20240926 | |-- drivers-hwtracing-intel_th-msu-sink.o:warning:objtool:missing-symbol-for-section-.init.text | `-- drivers-powercap-intel_rapl_common.o:warning:objtool:missing-symbol-for-section-.init.text |-- x86_64-buildonly-randconfig-001-20240928 | `-- mm-memory.c:error:implicit-declaration-of-function-hugetlb_insert_hugepage_pte_by_pa-Werror-Wimplicit-function-declaration |-- x86_64-buildonly-randconfig-002-20240928 | `-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount |-- x86_64-kexec | `-- mm-memory.c:error:implicit-declaration-of-function-hugetlb_insert_hugepage_pte_by_pa-Werror-Wimplicit-function-declaration `-- x86_64-randconfig-161-20240928 `-- mm-memory.c:error:implicit-declaration-of-function-hugetlb_insert_hugepage_pte_by_pa-Werror-Wimplicit-function-declaration elapsed time: 732m configs tested: 15 configs skipped: 126 tested configs: arm64 allmodconfig gcc-14.1.0 arm64 allnoconfig gcc-14.1.0 arm64 randconfig-001-20240928 gcc-14.1.0 arm64 randconfig-002-20240928 gcc-14.1.0 arm64 randconfig-003-20240928 gcc-14.1.0 arm64 randconfig-004-20240928 gcc-14.1.0 x86_64 allnoconfig clang-18 x86_64 allyesconfig clang-18 x86_64 buildonly-randconfig-001-20240928 clang-18 x86_64 buildonly-randconfig-002-20240928 gcc-12 x86_64 buildonly-randconfig-004-20240928 gcc-12 x86_64 defconfig gcc-11 x86_64 kexec clang-18 x86_64 rhel-8.3 gcc-12 x86_64 rhel-8.3-rust clang-18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2413/14216] mm/mem_reliable.c:345:2: error: call to undeclared function 'mem_reliable_ctrl_bit_disable'; ISO C99 and later do not support implicit function declarations
by kernel test robot 28 Sep '24

28 Sep '24
Hi Ma, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c9fe32fed709da98069e8215f6ecf39ea63f5355 commit: 425771499c0742a996ab28df143d7a5123102686 [2413/14216] mm: mem_reliable: Introduce proc interface to disable memory reliable features config: arm64-randconfig-003-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280502.YvJdfMQd-lkp@…) compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 7773243d9916f98ba0ffce0c3a960e4aa9f03e81) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280502.YvJdfMQd-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/202409280502.YvJdfMQd-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from mm/mem_reliable.c:5: In file included from include/linux/mm.h:2181: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ >> mm/mem_reliable.c:345:2: error: call to undeclared function 'mem_reliable_ctrl_bit_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 345 | mem_reliable_ctrl_bit_disable(idx); | ^ mm/mem_reliable.c:345:2: note: did you mean 'mem_reliable_ctrl_bit_disabled'? mm/mem_reliable.c:320:13: note: 'mem_reliable_ctrl_bit_disabled' declared here 320 | static void mem_reliable_ctrl_bit_disabled(int idx) {} | ^ mm/mem_reliable.c:376:45: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 376 | num += global_node_page_state(NR_LRU_BASE + LRU_ACTIVE_FILE); | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~ mm/mem_reliable.c:377:45: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 377 | num += global_node_page_state(NR_LRU_BASE + LRU_INACTIVE_FILE); | ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~ 7 warnings and 1 error generated. vim +/mem_reliable_ctrl_bit_disable +345 mm/mem_reliable.c 322 323 static void mem_reliable_feature_disable(int idx) 324 { 325 char *str = NULL; 326 327 switch (idx) { 328 case MEM_RELIABLE_FALLBACK: 329 reliable_allow_fallback = false; 330 str = "fallback"; 331 break; 332 case MEM_RELIABLE_SHMEM: 333 shmem_reliable = false; 334 str = "shmem"; 335 break; 336 case MEM_RELIABLE_PAGECACHE: 337 pagecache_reliable = false; 338 str = "pagecache"; 339 break; 340 default: 341 pr_err("unknown index: %d", idx); 342 return; 343 } 344 > 345 mem_reliable_ctrl_bit_disable(idx); 346 pr_info("%s is disabled\n", str); 347 } 348 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6] BUILD REGRESSION c9fe32fed709da98069e8215f6ecf39ea63f5355
by kernel test robot 28 Sep '24

28 Sep '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-6.6 branch HEAD: c9fe32fed709da98069e8215f6ecf39ea63f5355 !11844 fix CVE-2024-46771 Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202409280347.fIsKo3PM-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280502.YvJdfMQd-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280518.YiZdECth-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202409280536.wLGz5QQ3-lkp@intel.com arch/loongarch/kvm/exit.c:764:63: error: 'struct sched_info' has no member named 'run_delay' include/linux/psp-hygon.h:257:1: error: conflicting types for 'vpsp_try_do_cmd'; have 'int(int, phys_addr_t, struct vpsp_ret *)' {aka 'int(int, long long unsigned int, struct vpsp_ret *)'} mm/mem_reliable.c:345:2: error: call to undeclared function 'mem_reliable_ctrl_bit_disable'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] mm/memcontrol.c:3147:6: warning: no previous prototype for 'hisi_oom_recover' [-Wmissing-prototypes] mm/share_pool.c:2584:14: error: call to undeclared function 'huge_ptep_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] mm/share_pool.c:2584:8: error: initializing 'pte_t' with an expression of incompatible type 'int' mm/share_pool.c:3285:12: warning: 'proc_group_usage_show' defined but not used [-Wunused-function] mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used [-Wunused-function] Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | `-- drivers-iommu-arm-arm-smmu-v3-arm-s-smmu-v3.c:warning:no-previous-prototype-for-function-virtcca_smmu_gerror_handler |-- arm64-randconfig-002-20240928 | |-- mm-memcontrol.c:warning:no-previous-prototype-for-hisi_oom_recover | |-- mm-share_pool.c:warning:proc_group_usage_show-defined-but-not-used | `-- mm-share_pool.c:warning:proc_usage_show-defined-but-not-used |-- arm64-randconfig-003-20240928 | |-- mm-mem_reliable.c:error:call-to-undeclared-function-mem_reliable_ctrl_bit_disable-ISO-C99-and-later-do-not-support-implicit-function-declarations | |-- mm-page_alloc.c:error:call-to-undeclared-function-dynamic_pool_should_alloc-ISO-C99-and-later-do-not-support-implicit-function-declarations | |-- mm-share_pool.c:error:call-to-undeclared-function-huge_ptep_get-ISO-C99-and-later-do-not-support-implicit-function-declarations | `-- mm-share_pool.c:error:initializing-pte_t-with-an-expression-of-incompatible-type-int |-- loongarch-allmodconfig | `-- loongson3-acpi-cpufreq.c:(.text):undefined-reference-to-acpi_processor_register_performance |-- loongarch-randconfig-001-20240928 | |-- arch-loongarch-kvm-exit.c:error:struct-sched_info-has-no-member-named-run_delay | `-- arch-loongarch-kvm-vcpu.c:error:struct-sched_info-has-no-member-named-run_delay |-- x86_64-allyesconfig | |-- drivers-crypto-ccp-hygon-csv-dev.c:warning:no-previous-prototype-for-function-vpsp_do_cmd | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-Directly-convert-the-gpa-address-into-hpa-and-forward-it-to-PSP | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-copy-data-in-gpa-to-host-memory-and-send-it-to-psp-for-processing. | `-- drivers-crypto-ccp-hygon-vpsp.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- x86_64-buildonly-randconfig-004-20240928 | |-- drivers-crypto-ccp-hygon-hct.c:error:struct-device-has-no-member-named-numa_node | `-- include-linux-psp-hygon.h:error:conflicting-types-for-vpsp_try_do_cmd-have-int(int-phys_addr_t-struct-vpsp_ret-)-aka-int(int-long-long-unsigned-int-struct-vpsp_ret-) |-- x86_64-randconfig-006-20240928 | |-- drivers-crypto-ccp-hygon-csv-dev.c:warning:no-previous-prototype-for-vpsp_do_cmd | |-- drivers-crypto-ccp-hygon-hct.c:error:struct-device-has-no-member-named-numa_node | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-Directly-convert-the-gpa-address-into-hpa-and-forward-it-to-PSP | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-copy-data-in-gpa-to-host-memory-and-send-it-to-psp-for-processing. | `-- drivers-crypto-ccp-hygon-vpsp.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- x86_64-rhel-8.3 | |-- drivers-crypto-ccp-hygon-csv-dev.c:warning:no-previous-prototype-for-vpsp_do_cmd | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-Directly-convert-the-gpa-address-into-hpa-and-forward-it-to-PSP | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-copy-data-in-gpa-to-host-memory-and-send-it-to-psp-for-processing. | `-- drivers-crypto-ccp-hygon-vpsp.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- x86_64-rhel-8.3-func | |-- drivers-crypto-ccp-hygon-csv-dev.c:warning:no-previous-prototype-for-vpsp_do_cmd | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-Directly-convert-the-gpa-address-into-hpa-and-forward-it-to-PSP | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-copy-data-in-gpa-to-host-memory-and-send-it-to-psp-for-processing. | `-- drivers-crypto-ccp-hygon-vpsp.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst |-- x86_64-rhel-8.3-kselftests | |-- drivers-crypto-ccp-hygon-csv-dev.c:warning:no-previous-prototype-for-vpsp_do_cmd | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-Directly-convert-the-gpa-address-into-hpa-and-forward-it-to-PSP | |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-copy-data-in-gpa-to-host-memory-and-send-it-to-psp-for-processing. | `-- drivers-crypto-ccp-hygon-vpsp.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst `-- x86_64-rhel-8.3-rust |-- drivers-crypto-ccp-hygon-csv-dev.c:warning:no-previous-prototype-for-function-vpsp_do_cmd |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-Directly-convert-the-gpa-address-into-hpa-and-forward-it-to-PSP |-- drivers-crypto-ccp-hygon-vpsp.c:warning:Cannot-understand-brief-copy-data-in-gpa-to-host-memory-and-send-it-to-psp-for-processing. `-- drivers-crypto-ccp-hygon-vpsp.c:warning:This-comment-starts-with-but-isn-t-a-kernel-doc-comment.-Refer-Documentation-doc-guide-kernel-doc.rst elapsed time: 731m configs tested: 33 configs skipped: 121 tested configs: arm64 allmodconfig clang-20 arm64 allnoconfig gcc-14.1.0 arm64 randconfig-001-20240928 gcc-14.1.0 arm64 randconfig-002-20240928 gcc-14.1.0 arm64 randconfig-003-20240928 clang-20 arm64 randconfig-004-20240928 gcc-14.1.0 loongarch alldefconfig gcc-14.1.0 loongarch allmodconfig gcc-14.1.0 loongarch allnoconfig gcc-14.1.0 loongarch randconfig-001-20240928 gcc-14.1.0 loongarch randconfig-002-20240928 gcc-14.1.0 x86_64 allnoconfig clang-18 x86_64 allyesconfig clang-18 x86_64 buildonly-randconfig-001-20240928 clang-18 x86_64 buildonly-randconfig-002-20240928 gcc-12 x86_64 buildonly-randconfig-003-20240928 gcc-12 x86_64 buildonly-randconfig-004-20240928 gcc-12 x86_64 buildonly-randconfig-005-20240928 clang-18 x86_64 buildonly-randconfig-006-20240928 gcc-12 x86_64 defconfig gcc-11 x86_64 kexec clang-18 x86_64 randconfig-001-20240928 clang-18 x86_64 randconfig-002-20240928 gcc-12 x86_64 randconfig-003-20240928 clang-18 x86_64 randconfig-004-20240928 gcc-12 x86_64 randconfig-005-20240928 clang-18 x86_64 randconfig-006-20240928 gcc-11 x86_64 randconfig-011-20240928 gcc-12 x86_64 randconfig-012-20240928 gcc-12 x86_64 randconfig-013-20240928 gcc-12 x86_64 randconfig-014-20240928 clang-18 x86_64 rhel-8.3 gcc-12 x86_64 rhel-8.3-rust clang-18 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 13560/14216] include/linux/psp-hygon.h:257:1: error: conflicting types for 'vpsp_try_do_cmd'; have 'int(int, phys_addr_t, struct vpsp_ret *)' {aka 'int(int, long long unsigned int, struct vpsp_ret *)'}
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c9fe32fed709da98069e8215f6ecf39ea63f5355 commit: 3ce4cb81ef2b148f6c830c7debb4405e26cded1c [13560/14216] drivers/crypto/ccp: support TKM run on CSV config: x86_64-buildonly-randconfig-004-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280518.YiZdECth-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280518.YiZdECth-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/202409280518.YiZdECth-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from arch/x86/kvm/svm/svm.c:25: >> include/linux/psp-hygon.h:257:1: error: conflicting types for 'vpsp_try_do_cmd'; have 'int(int, phys_addr_t, struct vpsp_ret *)' {aka 'int(int, long long unsigned int, struct vpsp_ret *)'} 257 | vpsp_try_do_cmd(int cmd, phys_addr_t phy_addr, | ^~~~~~~~~~~~~~~ include/linux/psp-hygon.h:253:1: note: previous definition of 'vpsp_try_do_cmd' with type 'int(uint32_t, int, void *, struct vpsp_ret *)' {aka 'int(unsigned int, int, void *, struct vpsp_ret *)'} 253 | vpsp_try_do_cmd(uint32_t vid, int cmd, | ^~~~~~~~~~~~~~~ include/linux/psp-hygon.h:285:5: warning: no previous prototype for 'psp_register_cmd_notifier' [-Wmissing-prototypes] 285 | int psp_register_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; } | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/psp-hygon.h:286:5: warning: no previous prototype for 'psp_unregister_cmd_notifier' [-Wmissing-prototypes] 286 | int psp_unregister_cmd_notifier(uint32_t cmd_id, p2c_notifier_t notifier) { return -ENODEV; } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +257 include/linux/psp-hygon.h 247 248 static inline int 249 vpsp_try_get_result(uint8_t prio, 250 uint32_t index, phys_addr_t phy_addr, struct vpsp_ret *psp_ret) { return -ENODEV; } 251 252 static inline int 253 vpsp_try_do_cmd(uint32_t vid, int cmd, 254 void *data, struct vpsp_ret *psp_ret) { return -ENODEV; } 255 256 static inline int > 257 vpsp_try_do_cmd(int cmd, phys_addr_t phy_addr, 258 struct vpsp_ret *psp_ret) { return -ENODEV; } 259 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1683/14216] mm/memcontrol.c:3147:6: warning: no previous prototype for 'hisi_oom_recover'
by kernel test robot 28 Sep '24

28 Sep '24
Hi Weilong, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c9fe32fed709da98069e8215f6ecf39ea63f5355 commit: b498d9f1bacd40d583c0970cab02ad522127a7e7 [1683/14216] arm64/ascend: Add new enable_oom_killer interface for oom contrl config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280536.wLGz5QQ3-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280536.wLGz5QQ3-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/202409280536.wLGz5QQ3-lkp@intel.com/ All warnings (new ones prefixed by >>): >> mm/memcontrol.c:3147:6: warning: no previous prototype for 'hisi_oom_recover' [-Wmissing-prototypes] 3147 | void hisi_oom_recover(struct obj_cgroup *objcg) | ^~~~~~~~~~~~~~~~ vim +/hisi_oom_recover +3147 mm/memcontrol.c 3145 3146 #ifdef CONFIG_ASCEND_OOM > 3147 void hisi_oom_recover(struct obj_cgroup *objcg) 3148 { 3149 struct mem_cgroup *memcg; 3150 3151 memcg = get_mem_cgroup_from_objcg(objcg); 3152 if (!mem_cgroup_is_root(memcg)) 3153 memcg_oom_recover(memcg); 3154 css_put(&memcg->css); 3155 } 3156 #else 3157 static inline void hisi_oom_recover(struct obj_cgroup *objcg) { } 3158 #endif 3159 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2613/30000] drivers/tty/tty_buffer.c:177:9: error: implicit declaration of function 'printk_safe_exit'; did you mean 'printk_nmi_exit'?
by kernel test robot 28 Sep '24

28 Sep '24
Hi Hongbo, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 923efc4dc37c1a7cc91f0dd5dbdc87e0943ad1ae [2613/30000] tty: fix possible deadlock in console_unlock config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280444.fQT7iGoe-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280444.fQT7iGoe-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/202409280444.fQT7iGoe-lkp@intel.com/ All errors (new ones prefixed by >>): drivers/tty/tty_buffer.c: In function 'tty_buffer_alloc': drivers/tty/tty_buffer.c:175:9: error: implicit declaration of function 'printk_safe_enter'; did you mean 'printk_nmi_enter'? [-Werror=implicit-function-declaration] 175 | printk_safe_enter(); | ^~~~~~~~~~~~~~~~~ | printk_nmi_enter >> drivers/tty/tty_buffer.c:177:9: error: implicit declaration of function 'printk_safe_exit'; did you mean 'printk_nmi_exit'? [-Werror=implicit-function-declaration] 177 | printk_safe_exit(); | ^~~~~~~~~~~~~~~~ | printk_nmi_exit cc1: some warnings being treated as errors vim +177 drivers/tty/tty_buffer.c 142 143 /** 144 * tty_buffer_alloc - allocate a tty buffer 145 * @port: tty port 146 * @size: desired size (characters) 147 * 148 * Allocate a new tty buffer to hold the desired number of characters. 149 * We round our buffers off in 256 character chunks to get better 150 * allocation behaviour. 151 * Return NULL if out of memory or the allocation would exceed the 152 * per device queue 153 */ 154 155 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size) 156 { 157 struct llist_node *free; 158 struct tty_buffer *p; 159 160 /* Round the buffer size out */ 161 size = __ALIGN_MASK(size, TTYB_ALIGN_MASK); 162 163 if (size <= MIN_TTYB_SIZE) { 164 free = llist_del_first(&port->buf.free); 165 if (free) { 166 p = llist_entry(free, struct tty_buffer, free); 167 goto found; 168 } 169 } 170 171 /* Should possibly check if this fails for the largest buffer we 172 have queued and recycle that ? */ 173 if (atomic_read(&port->buf.mem_used) > port->buf.mem_limit) 174 return NULL; 175 printk_safe_enter(); 176 p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC); > 177 printk_safe_exit(); 178 if (p == NULL) 179 return NULL; 180 181 found: 182 tty_buffer_reset(p, size); 183 atomic_add(size, &port->buf.mem_used); 184 return p; 185 } 186 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 13192/23799] drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'ce' description in 'qm_hw_error_init'
by kernel test robot 28 Sep '24

28 Sep '24
Hi Yu'an, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 73d33f5c59dc3824444baca6a458427f4de3d8fa [13192/23799] qm: Move all the same logic functions of hisilicon crypto to qm config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280341.XkIGO1R8-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280341.XkIGO1R8-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/202409280341.XkIGO1R8-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'ce' description in 'qm_hw_error_init' >> drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'nfe' description in 'qm_hw_error_init' >> drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'fe' description in 'qm_hw_error_init' >> drivers/crypto/hisilicon/qm.c:2726: warning: Excess function parameter 'msi' description in 'qm_hw_error_init' vim +2726 drivers/crypto/hisilicon/qm.c ae67d23af736c7 xuzaibo 2019-04-21 2706 ae67d23af736c7 xuzaibo 2019-04-21 2707 /** 73d33f5c59dc38 Yu'an Wang 2020-04-16 2708 * qm_hw_error_init() - Configure qm hardware error report method. ae67d23af736c7 xuzaibo 2019-04-21 2709 * @qm: The qm which we want to configure. ae67d23af736c7 xuzaibo 2019-04-21 2710 * @ce: Correctable error configure. ae67d23af736c7 xuzaibo 2019-04-21 2711 * @nfe: Non-fatal error configure. ae67d23af736c7 xuzaibo 2019-04-21 2712 * @fe: Fatal error configure. ae67d23af736c7 xuzaibo 2019-04-21 2713 * @msi: Error reported by message signal interrupt. ae67d23af736c7 xuzaibo 2019-04-21 2714 * ae67d23af736c7 xuzaibo 2019-04-21 2715 * Hardware errors of qm can be reported either by RAS interrupts which will ae67d23af736c7 xuzaibo 2019-04-21 2716 * be handled by UEFI and then PCIe AER or by device MSI. User can configure ae67d23af736c7 xuzaibo 2019-04-21 2717 * each error to use either of above two methods. For RAS interrupts, we can ae67d23af736c7 xuzaibo 2019-04-21 2718 * configure an error as one of correctable error, non-fatal error or ae67d23af736c7 xuzaibo 2019-04-21 2719 * fatal error. ae67d23af736c7 xuzaibo 2019-04-21 2720 * ae67d23af736c7 xuzaibo 2019-04-21 2721 * Bits indicating errors can be configured to ce, nfe, fe and msi to enable ae67d23af736c7 xuzaibo 2019-04-21 2722 * related report methods. Error report will be masked if related error bit ae67d23af736c7 xuzaibo 2019-04-21 2723 * does not configure. ae67d23af736c7 xuzaibo 2019-04-21 2724 */ 73d33f5c59dc38 Yu'an Wang 2020-04-16 2725 static void qm_hw_error_init(struct hisi_qm *qm) ae67d23af736c7 xuzaibo 2019-04-21 @2726 { 73d33f5c59dc38 Yu'an Wang 2020-04-16 2727 u32 nfe = qm->err_ini.err_info.nfe; 73d33f5c59dc38 Yu'an Wang 2020-04-16 2728 u32 msi = qm->err_ini.err_info.msi; 73d33f5c59dc38 Yu'an Wang 2020-04-16 2729 u32 ce = qm->err_ini.err_info.ce; 73d33f5c59dc38 Yu'an Wang 2020-04-16 2730 u32 fe = qm->err_ini.err_info.fe; 73d33f5c59dc38 Yu'an Wang 2020-04-16 2731 ae67d23af736c7 xuzaibo 2019-04-21 2732 if (!qm->ops->hw_error_init) { ae67d23af736c7 xuzaibo 2019-04-21 2733 dev_err(&qm->pdev->dev, ae67d23af736c7 xuzaibo 2019-04-21 2734 "QM version %d doesn't support hw error handling!\n", ae67d23af736c7 xuzaibo 2019-04-21 2735 qm->ver); ae67d23af736c7 xuzaibo 2019-04-21 2736 return; ae67d23af736c7 xuzaibo 2019-04-21 2737 } ae67d23af736c7 xuzaibo 2019-04-21 2738 efe221f95003ac Zhou Wang 2019-07-11 2739 qm->ops->hw_error_init(qm, ce, nfe, fe, msi); ae67d23af736c7 xuzaibo 2019-04-21 2740 } ae67d23af736c7 xuzaibo 2019-04-21 2741 :::::: The code at line 2726 was first introduced by commit :::::: ae67d23af736c75f90795297fddb86dc97e7b3c7 arm64: Add hisilicon Crypto drivers qm/hpre/zip and code format :::::: TO: xuzaibo <xuzaibo(a)huawei.com> :::::: CC: Xie XiuQi <xiexiuqi(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1369/14216] mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used
by kernel test robot 28 Sep '24

28 Sep '24
Hi Wang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: c9fe32fed709da98069e8215f6ecf39ea63f5355 commit: df165ba49e6e4ce8b4f6076aded3b92e19918b03 [1369/14216] mm/sharepool: Add proc interfaces to show sp info config: arm64-randconfig-002-20240928 (https://download.01.org/0day-ci/archive/20240928/202409280347.fIsKo3PM-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280347.fIsKo3PM-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/202409280347.fIsKo3PM-lkp@intel.com/ All warnings (new ones prefixed by >>): mm/share_pool.c: In function 'sp_unshare_kva': mm/share_pool.c:2796:14: warning: variable 'is_hugepage' set but not used [-Wunused-but-set-variable] 2796 | bool is_hugepage = true; | ^~~~~~~~~~~ mm/share_pool.c: At top level: >> mm/share_pool.c:3305:12: warning: 'proc_usage_show' defined but not used [-Wunused-function] 3305 | static int proc_usage_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~~ >> mm/share_pool.c:3285:12: warning: 'proc_group_usage_show' defined but not used [-Wunused-function] 3285 | static int proc_group_usage_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~~~~~~~~~ mm/share_pool.c:3234:12: warning: 'spa_stat_show' defined but not used [-Wunused-function] 3234 | static int spa_stat_show(struct seq_file *seq, void *offset) | ^~~~~~~~~~~~~ vim +/proc_usage_show +3305 mm/share_pool.c 3284 > 3285 static int proc_group_usage_show(struct seq_file *seq, void *offset) 3286 { 3287 if (!should_show_statistics()) 3288 return -EPERM; 3289 3290 spg_overview_show(seq); 3291 spa_overview_show(seq); 3292 3293 /* print the file header */ 3294 seq_printf(seq, "%-8s %-8s %-9s %-9s %-9s %-8s %-7s %-7s %-4s\n", 3295 "PID", "Group_ID", "SP_ALLOC", "SP_K2U", "SP_RES", 3296 "VIRT", "RES", "Shm", "PROT"); 3297 3298 down_read(&sp_global_sem); 3299 idr_for_each(&sp_group_idr, proc_usage_by_group, seq); 3300 up_read(&sp_global_sem); 3301 3302 return 0; 3303 } 3304 > 3305 static int proc_usage_show(struct seq_file *seq, void *offset) 3306 { 3307 struct sp_group_master *master = NULL; 3308 unsigned long anon, file, shmem, total_rss; 3309 long sp_res, sp_res_nsize, non_sp_res, non_sp_shm; 3310 struct sp_meminfo *meminfo; 3311 3312 if (!should_show_statistics()) 3313 return -EPERM; 3314 3315 seq_printf(seq, "%-8s %-16s %-9s %-9s %-9s %-10s %-10s %-8s\n", 3316 "PID", "COMM", "SP_ALLOC", "SP_K2U", "SP_RES", "Non-SP_RES", 3317 "Non-SP_Shm", "VIRT"); 3318 3319 down_read(&sp_global_sem); 3320 mutex_lock(&master_list_lock); 3321 list_for_each_entry(master, &master_list, list_node) { 3322 meminfo = &master->meminfo; 3323 get_mm_rss_info(master->mm, &anon, &file, &shmem, &total_rss); 3324 get_process_sp_res(master, &sp_res, &sp_res_nsize); 3325 get_process_non_sp_res(total_rss, shmem, sp_res_nsize, 3326 &non_sp_res, &non_sp_shm); 3327 seq_printf(seq, "%-8d %-16s %-9ld %-9ld %-9ld %-10ld %-10ld %-8ld\n", 3328 master->tgid, master->comm, 3329 meminfo_alloc_sum_byKB(meminfo), 3330 meminfo_k2u_size(meminfo), 3331 sp_res, non_sp_res, non_sp_shm, 3332 page2kb(master->mm->total_vm)); 3333 } 3334 mutex_unlock(&master_list_lock); 3335 up_read(&sp_global_sem); 3336 3337 return 0; 3338 } 3339 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 21354/23799] drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:159:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int'
by kernel test robot 28 Sep '24

28 Sep '24
Hi wangzhimin, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: af48889301db8235deab66a8822e3e00195ca14b [21354/23799] dwmac:add phytium dwmac driver config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240928/202409280354.ixZVRGmb-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280354.ixZVRGmb-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/202409280354.ixZVRGmb-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:159:10: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion] 159 | return stmmac_res.addr; | ^~~~~~~~~~~~~~~ drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:172:5: warning: no previous prototype for function 'phytium_dwmac_remove' [-Wmissing-prototypes] 172 | int phytium_dwmac_remove(struct platform_device *pdev) | ^ drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c:172:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 172 | int phytium_dwmac_remove(struct platform_device *pdev) | ^ | static 1 warning and 1 error generated. vim +159 drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c 32 33 static int phytium_dwmac_probe(struct platform_device *pdev) 34 { 35 struct fwnode_handle *fwnode = dev_fwnode(&pdev->dev); 36 struct plat_stmmacenet_data *plat; 37 struct stmmac_resources stmmac_res; 38 struct device_node *np = pdev->dev.of_node; 39 struct resource *res; 40 u64 clk_freq; 41 char clk_name[20]; 42 int ret; 43 44 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL); 45 if (!plat) 46 return -ENOMEM; 47 48 plat->dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*plat->dma_cfg), 49 GFP_KERNEL); 50 if (!plat->dma_cfg) 51 return -ENOMEM; 52 53 plat->axi = devm_kzalloc(&pdev->dev, sizeof(*plat->axi), GFP_KERNEL); 54 if (!plat->axi) 55 return -ENOMEM; 56 57 plat->interface = device_get_phy_mode(&pdev->dev); 58 if (plat->interface < 0) 59 return plat->interface; 60 61 /* Configure PHY if using device-tree */ 62 if (pdev->dev.of_node) 63 plat->phy_node = of_parse_phandle(np, "phy-handle", 0); 64 65 if (pdev->dev.of_node) { 66 plat->bus_id = of_alias_get_id(np, "ethernet"); 67 if (plat->bus_id < 0) 68 plat->bus_id = 0; 69 } else if (fwnode_property_read_u32(fwnode, "bus_id", &plat->bus_id)) { 70 plat->bus_id = 2; 71 } 72 73 plat->phy_addr = -1; 74 plat->clk_csr = -1; 75 plat->has_gmac = 1; 76 plat->enh_desc = 1; 77 plat->bugged_jumbo = 1; 78 plat->pmt = 1; 79 plat->force_sf_dma_mode = 1; 80 81 if (fwnode_property_read_u32(fwnode, "max-speed", &plat->max_speed)) 82 plat->max_speed = -1; 83 84 if (fwnode_property_read_u32(fwnode, "max-frame-size", &plat->maxmtu)) 85 plat->maxmtu = JUMBO_LEN; 86 87 if (fwnode_property_read_u32(fwnode, "snps,multicast-filter-bins", 88 &plat->multicast_filter_bins)) 89 plat->multicast_filter_bins = HASH_TABLE_SIZE; 90 91 if (fwnode_property_read_u32(fwnode, "snps,perfect-filter-entries", 92 &plat->unicast_filter_entries)) 93 plat->unicast_filter_entries = 1; 94 95 if (fwnode_property_read_u32(fwnode, "tx-fifo-depth", 96 &plat->tx_fifo_size)) 97 plat->tx_fifo_size = 0x1000; 98 99 if (fwnode_property_read_u32(fwnode, "rx-fifo-depth", 100 &plat->rx_fifo_size)) 101 plat->rx_fifo_size = 0x1000; 102 103 if (phytium_dwmac_acpi_phy(plat, fwnode, &pdev->dev)) 104 return -ENODEV; 105 106 plat->rx_queues_to_use = 1; 107 plat->tx_queues_to_use = 1; 108 plat->rx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; 109 plat->tx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; 110 111 if (fwnode_property_read_u64(fwnode, "clock-frequency", &clk_freq)) 112 clk_freq = 125000000; 113 114 /* Set system clock */ 115 snprintf(clk_name, sizeof(clk_name), "%s-%d", "stmmaceth", 116 plat->bus_id); 117 118 plat->stmmac_clk = clk_register_fixed_rate(&pdev->dev, clk_name, 119 NULL, 0, clk_freq); 120 if (IS_ERR(plat->stmmac_clk)) { 121 dev_warn(&pdev->dev, "Fail to register stmmac-clk\n"); 122 plat->stmmac_clk = NULL; 123 } 124 125 ret = clk_prepare_enable(plat->stmmac_clk); 126 if (ret) { 127 clk_unregister_fixed_rate(plat->stmmac_clk); 128 return ret; 129 } 130 131 plat->clk_ptp_rate = clk_get_rate(plat->stmmac_clk); 132 plat->clk_ptp_ref = NULL; 133 134 if (fwnode_property_read_u32(fwnode, "snps,pbl", &plat->dma_cfg->pbl)) 135 plat->dma_cfg->pbl = 16; 136 137 fwnode_property_read_u32(fwnode, "snps,txpbl", &plat->dma_cfg->txpbl); 138 fwnode_property_read_u32(fwnode, "snps,rxpbl", &plat->dma_cfg->rxpbl); 139 140 plat->dma_cfg->pblx8 = !fwnode_property_read_bool(fwnode, 141 "snps,no-pbl-x8"); 142 plat->dma_cfg->aal = fwnode_property_read_bool(fwnode, "snps,aal"); 143 plat->dma_cfg->fixed_burst = fwnode_property_read_bool(fwnode, 144 "snps,fixed-burst"); 145 plat->dma_cfg->mixed_burst = fwnode_property_read_bool(fwnode, 146 "snps,mixed-burst"); 147 148 plat->axi->axi_lpi_en = false; 149 plat->axi->axi_xit_frm = false; 150 plat->axi->axi_wr_osr_lmt = 7; 151 plat->axi->axi_rd_osr_lmt = 7; 152 plat->axi->axi_blen[0] = 16; 153 154 memset(&stmmac_res, 0, sizeof(stmmac_res)); 155 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 156 stmmac_res.addr = devm_ioremap_resource(&pdev->dev, res); 157 if (stmmac_res.addr < 0) { 158 dev_err(&pdev->dev, "resource map failed.\n"); > 159 return stmmac_res.addr; 160 } 161 stmmac_res.irq = platform_get_irq(pdev, 0); 162 if (stmmac_res.irq < 0) { 163 dev_err(&pdev->dev, "IRQ not found.\n"); 164 return -ENXIO; 165 } 166 stmmac_res.wol_irq = stmmac_res.irq; 167 stmmac_res.lpi_irq = -1; 168 169 return stmmac_dvr_probe(&pdev->dev, plat, &stmmac_res); 170 } 171 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 17967/23799] drivers/hwtracing/intel_th/msu-sink.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 4d516770f81434cde260d33430626e3880b9902e [17967/23799] intel_th: msu-sink: An example msu buffer "sink" config: x86_64-buildonly-randconfig-001-20240926 (https://download.01.org/0day-ci/archive/20240928/202409280233.aF2FycBU-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240928/202409280233.aF2FycBU-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/202409280233.aF2FycBU-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/hwtracing/intel_th/msu-sink.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 13031/30000] drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5671:37: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot 28 Sep '24

28 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 7b05030bb7ada6099be6aee436250b07e96a3901 [13031/30000] net: hns3: support set/get VxLAN rule of rx flow director by ethtool config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240928/202409280106.13pCWH1k-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240928/202409280106.13pCWH1k-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/202409280106.13pCWH1k-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5671:37: sparse: sparse: restricted __le32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5672:37: sparse: sparse: restricted __le32 degrades to integer >> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5906:17: sparse: sparse: restricted __be32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:6000:17: sparse: sparse: restricted __be32 degrades to integer drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:5252:31: sparse: sparse: context imbalance in 'hclge_sync_fd_user_def_cfg' - unexpected unlock drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:12259:23: sparse: sparse: memset with byte count of 131072 vim +5671 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c 5613 5614 int offset, moffset, ip_offset; 5615 enum HCLGE_FD_KEY_OPT key_opt; 5616 u16 tmp_x_s, tmp_y_s; 5617 u32 tmp_x_l, tmp_y_l; 5618 u8 *p = (u8 *)rule; 5619 int i; 5620 5621 if (rule->unused_tuple & BIT(tuple_bit)) 5622 return true; 5623 5624 key_opt = tuple_key_info[tuple_bit].key_opt; 5625 offset = tuple_key_info[tuple_bit].offset; 5626 moffset = tuple_key_info[tuple_bit].moffset; 5627 5628 switch (key_opt) { 5629 case KEY_OPT_U8: 5630 calc_x(*key_x, p[offset], p[moffset]); 5631 calc_y(*key_y, p[offset], p[moffset]); 5632 5633 return true; 5634 case KEY_OPT_LE16: 5635 calc_x(tmp_x_s, *(u16 *)(&p[offset]), *(u16 *)(&p[moffset])); 5636 calc_y(tmp_y_s, *(u16 *)(&p[offset]), *(u16 *)(&p[moffset])); 5637 *(__le16 *)key_x = cpu_to_le16(tmp_x_s); 5638 *(__le16 *)key_y = cpu_to_le16(tmp_y_s); 5639 5640 return true; 5641 case KEY_OPT_LE32: 5642 calc_x(tmp_x_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset])); 5643 calc_y(tmp_y_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset])); 5644 *(__le32 *)key_x = cpu_to_le32(tmp_x_l); 5645 *(__le32 *)key_y = cpu_to_le32(tmp_y_l); 5646 5647 return true; 5648 case KEY_OPT_MAC: 5649 for (i = 0; i < ETH_ALEN; i++) { 5650 calc_x(key_x[ETH_ALEN - 1 - i], p[offset + i], 5651 p[moffset + i]); 5652 calc_y(key_y[ETH_ALEN - 1 - i], p[offset + i], 5653 p[moffset + i]); 5654 } 5655 5656 return true; 5657 case KEY_OPT_IP: 5658 ip_offset = IPV4_INDEX * sizeof(u32); 5659 calc_x(tmp_x_l, *(u32 *)(&p[offset + ip_offset]), 5660 *(u32 *)(&p[moffset + ip_offset])); 5661 calc_y(tmp_y_l, *(u32 *)(&p[offset + ip_offset]), 5662 *(u32 *)(&p[moffset + ip_offset])); 5663 *(__le32 *)key_x = cpu_to_le32(tmp_x_l); 5664 *(__le32 *)key_y = cpu_to_le32(tmp_y_l); 5665 5666 return true; 5667 case KEY_OPT_VNI: 5668 calc_x(tmp_x_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset])); 5669 calc_y(tmp_y_l, *(u32 *)(&p[offset]), *(u32 *)(&p[moffset])); 5670 for (i = 0; i < HCLGE_VNI_LENGTH; i++) { > 5671 key_x[i] = (cpu_to_le32(tmp_x_l) >> (i * BITS_PER_BYTE)) & 0xFF; 5672 key_y[i] = (cpu_to_le32(tmp_y_l) >> (i * BITS_PER_BYTE)) & 0xFF; 5673 } 5674 return true; 5675 default: 5676 return false; 5677 } 5678 } 5679 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 17809/23796] drivers/powercap/intel_rapl_common.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 27 Sep '24

27 Sep '24
Hi Zhang, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 3841d75a6dcd12d108aaf56560b99431d18169e4 commit: 74c448a8b8ad8801c117e98ccd0e399413c063bb [17809/23796] Intel: intel_rapl: Fix module autoloading issue config: x86_64-buildonly-randconfig-001-20240926 (https://download.01.org/0day-ci/archive/20240927/202409271931.90b1jljj-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409271931.90b1jljj-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/202409271931.90b1jljj-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/powercap/intel_rapl_common.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 12771/30000] drivers/hwtracing/coresight/coresight-core.c:26:1: sparse: sparse: symbol '__pcpu_scope_csdev_sink' was not declared. Should it be static?
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: bef6f06e039b8929481350d15d6d8c3ba81c6fd2 commit: 078577fd8d76863149a3e8c7588ed0b457a095e9 [12771/30000] coresight: core: Add support for dedicated percpu sinks config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240927/202409271902.PwZin66T-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240927/202409271902.PwZin66T-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/202409271902.PwZin66T-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/hwtracing/coresight/coresight-core.c:26:1: sparse: sparse: symbol '__pcpu_scope_csdev_sink' was not declared. Should it be static? vim +/__pcpu_scope_csdev_sink +26 drivers/hwtracing/coresight/coresight-core.c 24 25 static DEFINE_MUTEX(coresight_mutex); > 26 DEFINE_PER_CPU(struct coresight_device *, csdev_sink); 27 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 0/4] Merge some hns RoCE patches from the mainline to OLK-6.6
by Chengchang Tang 27 Sep '24

27 Sep '24
From: Xinghai Cen <cenxinghai(a)h-partners.com> Merge some hns RoCE patches from the mainline to OLK-6.6 Xinghai Cen (2): Revert "RDMA/hns: Fix the overflow risk of hem_list_calc_ba_range()" Revert "RDMA/hns: Fix Use-After-Free of rsv_qp" wenglianfa (2): RDMA/hns: Fix Use-After-Free of rsv_qp on HIP08 RDMA/hns: Fix the overflow risk of hem_list_calc_ba_range() -- 2.33.0
2 5
0 0
[PATCH OLK-5.10 0/5] Some bug fix patches for OLK-5.10 hns RoCE
by Chengchang Tang 27 Sep '24

27 Sep '24
From: Xinghai Cen <cenxinghai(a)h-partners.com> Some bug fix patches for OLK-5.10 hns RoCE Junxian Huang (1): RDMA/hns: Fix ah error counter in sw stat not increasing Xinghai Cen (1): Revert "RDMA/hns: Fix ah error counter in sw stat not increasing when sl is invalid" wenglianfa (3): RDMA/hns: Fix the inconsistency between input max_send_sge and output max_send_sge RDMA/hns: Use one CQ bank per context for HIP09 RDMA/hns: Fix RoCEE hang when multiple QP banks use EXT_SGE drivers/infiniband/hw/hns/hns_roce_ah.c | 6 ++- drivers/infiniband/hw/hns/hns_roce_cq.c | 21 ++++++--- drivers/infiniband/hw/hns/hns_roce_device.h | 7 +++ drivers/infiniband/hw/hns/hns_roce_main.c | 5 +++ drivers/infiniband/hw/hns/hns_roce_qp.c | 50 ++++++++++++++++----- 5 files changed, 69 insertions(+), 20 deletions(-) -- 2.33.0
2 6
0 0
[PATCH OLK-6.6] hwmon: (hp-wmi-sensors) Check if WMI event data exists
by Zhao Wenhui 27 Sep '24

27 Sep '24
From: Armin Wolf <W_Armin(a)gmx.de> stable inclusion from stable-v6.6.51 commit 217539e994e53206bbf3fb330261cc78c480d311 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWCY CVE: CVE-2024-46768 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit a54da9df75cd1b4b5028f6c60f9a211532680585 ] The BIOS can choose to return no event data in response to a WMI event, so the ACPI object passed to the WMI notify handler can be NULL. Check for such a situation and ignore the event in such a case. Fixes: 23902f98f8d4 ("hwmon: add HP WMI Sensors driver") Signed-off-by: Armin Wolf <W_Armin(a)gmx.de> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com> Message-ID: <20240901031055.3030-2-W_Armin(a)gmx.de> Signed-off-by: Guenter Roeck <linux(a)roeck-us.net> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zhao Wenhui <zhaowenhui8(a)huawei.com> --- drivers/hwmon/hp-wmi-sensors.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwmon/hp-wmi-sensors.c b/drivers/hwmon/hp-wmi-sensors.c index b5325d0e72b9..dfa1d6926dea 100644 --- a/drivers/hwmon/hp-wmi-sensors.c +++ b/drivers/hwmon/hp-wmi-sensors.c @@ -1637,6 +1637,8 @@ static void hp_wmi_notify(u32 value, void *context) goto out_unlock; wobj = out.pointer; + if (!wobj) + goto out_unlock; err = populate_event_from_wobj(dev, &event, wobj); if (err) { -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] nilfs2: protect references to superblock parameters exposed in sysfs
by Zhao Wenhui 27 Sep '24

27 Sep '24
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> stable inclusion from stable-v6.6.51 commit 8c6e43b3d5f109cf9c61bc188fcc8175404e924f category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARYCR CVE: CVE-2024-46780 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 683408258917541bdb294cd717c210a04381931e upstream. The superblock buffers of nilfs2 can not only be overwritten at runtime for modifications/repairs, but they are also regularly swapped, replaced during resizing, and even abandoned when degrading to one side due to backing device issues. So, accessing them requires mutual exclusion using the reader/writer semaphore "nilfs->ns_sem". Some sysfs attribute show methods read this superblock buffer without the necessary mutual exclusion, which can cause problems with pointer dereferencing and memory access, so fix it. Link: https://lkml.kernel.org/r/20240811100320.9913-1-konishi.ryusuke@gmail.com Fixes: da7141fb78db ("nilfs2: add /sys/fs/nilfs2/<device> group") Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Zhao Wenhui <zhaowenhui8(a)huawei.com> --- fs/nilfs2/sysfs.c | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c index 379d22e28ed6..905c7eadf967 100644 --- a/fs/nilfs2/sysfs.c +++ b/fs/nilfs2/sysfs.c @@ -836,9 +836,15 @@ ssize_t nilfs_dev_revision_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; - u32 major = le32_to_cpu(sbp[0]->s_rev_level); - u16 minor = le16_to_cpu(sbp[0]->s_minor_rev_level); + struct nilfs_super_block *raw_sb; + u32 major; + u16 minor; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + major = le32_to_cpu(raw_sb->s_rev_level); + minor = le16_to_cpu(raw_sb->s_minor_rev_level); + up_read(&nilfs->ns_sem); return sysfs_emit(buf, "%d.%d\n", major, minor); } @@ -856,8 +862,13 @@ ssize_t nilfs_dev_device_size_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; - u64 dev_size = le64_to_cpu(sbp[0]->s_dev_size); + struct nilfs_super_block *raw_sb; + u64 dev_size; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + dev_size = le64_to_cpu(raw_sb->s_dev_size); + up_read(&nilfs->ns_sem); return sysfs_emit(buf, "%llu\n", dev_size); } @@ -879,9 +890,15 @@ ssize_t nilfs_dev_uuid_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; + struct nilfs_super_block *raw_sb; + ssize_t len; - return sysfs_emit(buf, "%pUb\n", sbp[0]->s_uuid); + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + len = sysfs_emit(buf, "%pUb\n", raw_sb->s_uuid); + up_read(&nilfs->ns_sem); + + return len; } static @@ -889,10 +906,16 @@ ssize_t nilfs_dev_volume_name_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; + struct nilfs_super_block *raw_sb; + ssize_t len; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + len = scnprintf(buf, sizeof(raw_sb->s_volume_name), "%s\n", + raw_sb->s_volume_name); + up_read(&nilfs->ns_sem); - return scnprintf(buf, sizeof(sbp[0]->s_volume_name), "%s\n", - sbp[0]->s_volume_name); + return len; } static const char dev_readme_str[] = -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] nilfs2: protect references to superblock parameters exposed in sysfs
by Zhao Wenhui 27 Sep '24

27 Sep '24
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> stable inclusion from stable-v5.10.226 commit 157c0d94b4c40887329418c70ef4edd1a8d6b4ed category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARYCR CVE: CVE-2024-46780 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 683408258917541bdb294cd717c210a04381931e ] The superblock buffers of nilfs2 can not only be overwritten at runtime for modifications/repairs, but they are also regularly swapped, replaced during resizing, and even abandoned when degrading to one side due to backing device issues. So, accessing them requires mutual exclusion using the reader/writer semaphore "nilfs->ns_sem". Some sysfs attribute show methods read this superblock buffer without the necessary mutual exclusion, which can cause problems with pointer dereferencing and memory access, so fix it. Link: https://lkml.kernel.org/r/20240811100320.9913-1-konishi.ryusuke@gmail.com Fixes: da7141fb78db ("nilfs2: add /sys/fs/nilfs2/<device> group") Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Conflicts: fs/nilfs2/sysfs.c [3bcd6c5bd483287f4a09d3d59a012d47677b6edc not merged.] Signed-off-by: Zhao Wenhui <zhaowenhui8(a)huawei.com> --- fs/nilfs2/sysfs.c | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c index 57afd06db62d..fc1c10a4ee45 100644 --- a/fs/nilfs2/sysfs.c +++ b/fs/nilfs2/sysfs.c @@ -843,9 +843,15 @@ ssize_t nilfs_dev_revision_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; - u32 major = le32_to_cpu(sbp[0]->s_rev_level); - u16 minor = le16_to_cpu(sbp[0]->s_minor_rev_level); + struct nilfs_super_block *raw_sb; + u32 major; + u16 minor; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + major = le32_to_cpu(raw_sb->s_rev_level); + minor = le16_to_cpu(raw_sb->s_minor_rev_level); + up_read(&nilfs->ns_sem); return snprintf(buf, PAGE_SIZE, "%d.%d\n", major, minor); } @@ -863,8 +869,13 @@ ssize_t nilfs_dev_device_size_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; - u64 dev_size = le64_to_cpu(sbp[0]->s_dev_size); + struct nilfs_super_block *raw_sb; + u64 dev_size; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + dev_size = le64_to_cpu(raw_sb->s_dev_size); + up_read(&nilfs->ns_sem); return snprintf(buf, PAGE_SIZE, "%llu\n", dev_size); } @@ -886,9 +897,15 @@ ssize_t nilfs_dev_uuid_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; + struct nilfs_super_block *raw_sb; + ssize_t len; - return snprintf(buf, PAGE_SIZE, "%pUb\n", sbp[0]->s_uuid); + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + len = snprintf(buf, PAGE_SIZE, "%pUb\n", raw_sb->s_uuid); + up_read(&nilfs->ns_sem); + + return len; } static @@ -896,10 +913,16 @@ ssize_t nilfs_dev_volume_name_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; + struct nilfs_super_block *raw_sb; + ssize_t len; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + len = scnprintf(buf, sizeof(raw_sb->s_volume_name), "%s\n", + raw_sb->s_volume_name); + up_read(&nilfs->ns_sem); - return scnprintf(buf, sizeof(sbp[0]->s_volume_name), "%s\n", - sbp[0]->s_volume_name); + return len; } static const char dev_readme_str[] = -- 2.34.1
2 1
0 0
[PATCH openEuler-1.0-LTS] nilfs2: protect references to superblock parameters exposed in sysfs
by Zhao Wenhui 27 Sep '24

27 Sep '24
From: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> stable inclusion from stable-v4.19.322 commit b90beafac05931cbfcb6b1bd4f67c1923f47040e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARYCR CVE: CVE-2024-46780 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 683408258917541bdb294cd717c210a04381931e ] The superblock buffers of nilfs2 can not only be overwritten at runtime for modifications/repairs, but they are also regularly swapped, replaced during resizing, and even abandoned when degrading to one side due to backing device issues. So, accessing them requires mutual exclusion using the reader/writer semaphore "nilfs->ns_sem". Some sysfs attribute show methods read this superblock buffer without the necessary mutual exclusion, which can cause problems with pointer dereferencing and memory access, so fix it. Link: https://lkml.kernel.org/r/20240811100320.9913-1-konishi.ryusuke@gmail.com Fixes: da7141fb78db ("nilfs2: add /sys/fs/nilfs2/<device> group") Signed-off-by: Ryusuke Konishi <konishi.ryusuke(a)gmail.com> Cc: <stable(a)vger.kernel.org> Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Conflicts: fs/nilfs2/sysfs.c [3bcd6c5bd483287f4a09d3d59a012d47677b6edc not merged.] Signed-off-by: Zhao Wenhui <zhaowenhui8(a)huawei.com> --- fs/nilfs2/sysfs.c | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c index e60be7bb55b0..14349d3625fc 100644 --- a/fs/nilfs2/sysfs.c +++ b/fs/nilfs2/sysfs.c @@ -845,9 +845,15 @@ ssize_t nilfs_dev_revision_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; - u32 major = le32_to_cpu(sbp[0]->s_rev_level); - u16 minor = le16_to_cpu(sbp[0]->s_minor_rev_level); + struct nilfs_super_block *raw_sb; + u32 major; + u16 minor; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + major = le32_to_cpu(raw_sb->s_rev_level); + minor = le16_to_cpu(raw_sb->s_minor_rev_level); + up_read(&nilfs->ns_sem); return snprintf(buf, PAGE_SIZE, "%d.%d\n", major, minor); } @@ -865,8 +871,13 @@ ssize_t nilfs_dev_device_size_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; - u64 dev_size = le64_to_cpu(sbp[0]->s_dev_size); + struct nilfs_super_block *raw_sb; + u64 dev_size; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + dev_size = le64_to_cpu(raw_sb->s_dev_size); + up_read(&nilfs->ns_sem); return snprintf(buf, PAGE_SIZE, "%llu\n", dev_size); } @@ -888,9 +899,15 @@ ssize_t nilfs_dev_uuid_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; + struct nilfs_super_block *raw_sb; + ssize_t len; - return snprintf(buf, PAGE_SIZE, "%pUb\n", sbp[0]->s_uuid); + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + len = snprintf(buf, PAGE_SIZE, "%pUb\n", raw_sb->s_uuid); + up_read(&nilfs->ns_sem); + + return len; } static @@ -898,10 +915,16 @@ ssize_t nilfs_dev_volume_name_show(struct nilfs_dev_attr *attr, struct the_nilfs *nilfs, char *buf) { - struct nilfs_super_block **sbp = nilfs->ns_sbp; + struct nilfs_super_block *raw_sb; + ssize_t len; + + down_read(&nilfs->ns_sem); + raw_sb = nilfs->ns_sbp[0]; + len = scnprintf(buf, sizeof(raw_sb->s_volume_name), "%s\n", + raw_sb->s_volume_name); + up_read(&nilfs->ns_sem); - return scnprintf(buf, sizeof(sbp[0]->s_volume_name), "%s\n", - sbp[0]->s_volume_name); + return len; } static const char dev_readme_str[] = -- 2.34.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] hwmon: (lm95234) Fix underflows seen when writing limit attributes
by Xiongfeng Wang 27 Sep '24

27 Sep '24
From: Guenter Roeck <linux(a)roeck-us.net> mainline inclusion from mainline-v6.11-rc1 commit af64e3e1537896337405f880c1e9ac1f8c0c6198 category: bugfix bugzilla: hhttps://gitee.com/src-openeuler/kernel/issues/IAS0PZ CVE: CVE-2024-46758 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck <linux(a)roeck-us.net> Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- drivers/hwmon/lm95234.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/lm95234.c b/drivers/hwmon/lm95234.c index ac169a994ae00..db2aecdfbd17c 100644 --- a/drivers/hwmon/lm95234.c +++ b/drivers/hwmon/lm95234.c @@ -301,7 +301,8 @@ static ssize_t tcrit2_store(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, index ? 255 : 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, (index ? 255 : 127) * 1000), + 1000); mutex_lock(&data->update_lock); data->tcrit2[index] = val; @@ -350,7 +351,7 @@ static ssize_t tcrit1_store(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000); mutex_lock(&data->update_lock); data->tcrit1[index] = val; @@ -391,7 +392,7 @@ static ssize_t tcrit1_hyst_store(struct device *dev, if (ret < 0) return ret; - val = DIV_ROUND_CLOSEST(val, 1000); + val = DIV_ROUND_CLOSEST(clamp_val(val, -255000, 255000), 1000); val = clamp_val((int)data->tcrit1[index] - val, 0, 31); mutex_lock(&data->update_lock); @@ -431,7 +432,7 @@ static ssize_t offset_store(struct device *dev, struct device_attribute *attr, return ret; /* Accuracy is 1/2 degrees C */ - val = clamp_val(DIV_ROUND_CLOSEST(val, 500), -128, 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, -64000, 63500), 500); mutex_lock(&data->update_lock); data->toffset[index] = val; -- 2.20.1
2 1
0 0
[PATCH OLK-5.10] hwmon: (lm95234) Fix underflows seen when writing limit attributes
by Xiongfeng Wang 27 Sep '24

27 Sep '24
From: Guenter Roeck <linux(a)roeck-us.net> mainline inclusion from mainline-v6.11-rc1 commit af64e3e1537896337405f880c1e9ac1f8c0c6198 category: bugfix bugzilla: hhttps://gitee.com/src-openeuler/kernel/issues/IAS0PZ CVE: CVE-2024-46758 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck <linux(a)roeck-us.net> Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- drivers/hwmon/lm95234.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/lm95234.c b/drivers/hwmon/lm95234.c index ac169a994ae00..db2aecdfbd17c 100644 --- a/drivers/hwmon/lm95234.c +++ b/drivers/hwmon/lm95234.c @@ -301,7 +301,8 @@ static ssize_t tcrit2_store(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, index ? 255 : 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, (index ? 255 : 127) * 1000), + 1000); mutex_lock(&data->update_lock); data->tcrit2[index] = val; @@ -350,7 +351,7 @@ static ssize_t tcrit1_store(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000); mutex_lock(&data->update_lock); data->tcrit1[index] = val; @@ -391,7 +392,7 @@ static ssize_t tcrit1_hyst_store(struct device *dev, if (ret < 0) return ret; - val = DIV_ROUND_CLOSEST(val, 1000); + val = DIV_ROUND_CLOSEST(clamp_val(val, -255000, 255000), 1000); val = clamp_val((int)data->tcrit1[index] - val, 0, 31); mutex_lock(&data->update_lock); @@ -431,7 +432,7 @@ static ssize_t offset_store(struct device *dev, struct device_attribute *attr, return ret; /* Accuracy is 1/2 degrees C */ - val = clamp_val(DIV_ROUND_CLOSEST(val, 500), -128, 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, -64000, 63500), 500); mutex_lock(&data->update_lock); data->toffset[index] = val; -- 2.20.1
2 1
0 0
[PATCH openEuler-1.0-LTS] hwmon: (lm95234) Fix underflows seen when writing limit attributes
by Xiongfeng Wang 27 Sep '24

27 Sep '24
From: Guenter Roeck <linux(a)roeck-us.net> mainline inclusion from mainline-v6.11-rc1 commit af64e3e1537896337405f880c1e9ac1f8c0c6198 category: bugfix bugzilla: hhttps://gitee.com/src-openeuler/kernel/issues/IAS0PZ CVE: CVE-2024-46758 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck <linux(a)roeck-us.net> Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- drivers/hwmon/lm95234.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/lm95234.c b/drivers/hwmon/lm95234.c index c7fcc9e7f57a..13912ac7c69f 100644 --- a/drivers/hwmon/lm95234.c +++ b/drivers/hwmon/lm95234.c @@ -310,7 +310,8 @@ static ssize_t set_tcrit2(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, index ? 255 : 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, (index ? 255 : 127) * 1000), + 1000); mutex_lock(&data->update_lock); data->tcrit2[index] = val; @@ -359,7 +360,7 @@ static ssize_t set_tcrit1(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000); mutex_lock(&data->update_lock); data->tcrit1[index] = val; @@ -400,7 +401,7 @@ static ssize_t set_tcrit1_hyst(struct device *dev, if (ret < 0) return ret; - val = DIV_ROUND_CLOSEST(val, 1000); + val = DIV_ROUND_CLOSEST(clamp_val(val, -255000, 255000), 1000); val = clamp_val((int)data->tcrit1[index] - val, 0, 31); mutex_lock(&data->update_lock); @@ -440,7 +441,7 @@ static ssize_t set_offset(struct device *dev, struct device_attribute *attr, return ret; /* Accuracy is 1/2 degrees C */ - val = clamp_val(DIV_ROUND_CLOSEST(val, 500), -128, 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, -64000, 63500), 500); mutex_lock(&data->update_lock); data->toffset[index] = val; -- 2.20.1
2 1
0 0
[PATCH OLK-6.6] hwmon: (lm95234) Fix underflows seen when writing limit attributes
by Xiongfeng Wang 27 Sep '24

27 Sep '24
From: Guenter Roeck <linux(a)roeck-us.net> mainline inclusion from mainline-v6.11-rc1 commit af64e3e1537896337405f880c1e9ac1f8c0c6198 category: bugfix bugzilla: hhttps://gitee.com/src-openeuler/kernel/issues/IAS0PZ CVE: CVE-2024-46758 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck <linux(a)roeck-us.net> Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- drivers/hwmon/lm95234.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/lm95234.c b/drivers/hwmon/lm95234.c index 67b9d7636ee4..37e8e9679aeb 100644 --- a/drivers/hwmon/lm95234.c +++ b/drivers/hwmon/lm95234.c @@ -301,7 +301,8 @@ static ssize_t tcrit2_store(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, index ? 255 : 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, (index ? 255 : 127) * 1000), + 1000); mutex_lock(&data->update_lock); data->tcrit2[index] = val; @@ -350,7 +351,7 @@ static ssize_t tcrit1_store(struct device *dev, struct device_attribute *attr, if (ret < 0) return ret; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 255); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 255000), 1000); mutex_lock(&data->update_lock); data->tcrit1[index] = val; @@ -391,7 +392,7 @@ static ssize_t tcrit1_hyst_store(struct device *dev, if (ret < 0) return ret; - val = DIV_ROUND_CLOSEST(val, 1000); + val = DIV_ROUND_CLOSEST(clamp_val(val, -255000, 255000), 1000); val = clamp_val((int)data->tcrit1[index] - val, 0, 31); mutex_lock(&data->update_lock); @@ -431,7 +432,7 @@ static ssize_t offset_store(struct device *dev, struct device_attribute *attr, return ret; /* Accuracy is 1/2 degrees C */ - val = clamp_val(DIV_ROUND_CLOSEST(val, 500), -128, 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, -64000, 63500), 500); mutex_lock(&data->update_lock); data->toffset[index] = val; -- 2.20.1
2 1
0 0
[PATCH OLK-6.6] btrfs: fix race between direct IO write and fsync when using same fd
by Xiongfeng Wang 27 Sep '24

27 Sep '24
From: Filipe Manana <fdmanana(a)suse.com> stable inclusion from stable-v6.6.51 commit 7b5595f33c3c273613b590892a578d78186bb400 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARY1Z CVE: CVE-2024-46734 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- commit cd9253c23aedd61eb5ff11f37a36247cd46faf86 upstream. If we have 2 threads that are using the same file descriptor and one of them is doing direct IO writes while the other is doing fsync, we have a race where we can end up either: 1) Attempt a fsync without holding the inode's lock, triggering an assertion failures when assertions are enabled; 2) Do an invalid memory access from the fsync task because the file private points to memory allocated on stack by the direct IO task and it may be used by the fsync task after the stack was destroyed. The race happens like this: 1) A user space program opens a file descriptor with O_DIRECT; 2) The program spawns 2 threads using libpthread for example; 3) One of the threads uses the file descriptor to do direct IO writes, while the other calls fsync using the same file descriptor. 4) Call task A the thread doing direct IO writes and task B the thread doing fsyncs; 5) Task A does a direct IO write, and at btrfs_direct_write() sets the file's private to an on stack allocated private with the member 'fsync_skip_inode_lock' set to true; 6) Task B enters btrfs_sync_file() and sees that there's a private structure associated to the file which has 'fsync_skip_inode_lock' set to true, so it skips locking the inode's VFS lock; 7) Task A completes the direct IO write, and resets the file's private to NULL since it had no prior private and our private was stack allocated. Then it unlocks the inode's VFS lock; 8) Task B enters btrfs_get_ordered_extents_for_logging(), then the assertion that checks the inode's VFS lock is held fails, since task B never locked it and task A has already unlocked it. The stack trace produced is the following: assertion failed: inode_is_locked(&inode->vfs_inode), in fs/btrfs/ordered-data.c:983 ------------[ cut here ]------------ kernel BUG at fs/btrfs/ordered-data.c:983! Oops: invalid opcode: 0000 [#1] PREEMPT SMP PTI CPU: 9 PID: 5072 Comm: worker Tainted: G U OE 6.10.5-1-default #1 openSUSE Tumbleweed 69f48d427608e1c09e60ea24c6c55e2ca1b049e8 Hardware name: Acer Predator PH315-52/Covini_CFS, BIOS V1.12 07/28/2020 RIP: 0010:btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs] Code: 50 d6 86 c0 e8 (...) RSP: 0018:ffff9e4a03dcfc78 EFLAGS: 00010246 RAX: 0000000000000054 RBX: ffff9078a9868e98 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff907dce4a7800 RDI: ffff907dce4a7800 RBP: ffff907805518800 R08: 0000000000000000 R09: ffff9e4a03dcfb38 R10: ffff9e4a03dcfb30 R11: 0000000000000003 R12: ffff907684ae7800 R13: 0000000000000001 R14: ffff90774646b600 R15: 0000000000000000 FS: 00007f04b96006c0(0000) GS:ffff907dce480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f32acbfc000 CR3: 00000001fd4fa005 CR4: 00000000003726f0 Call Trace: <TASK> ? __die_body.cold+0x14/0x24 ? die+0x2e/0x50 ? do_trap+0xca/0x110 ? do_error_trap+0x6a/0x90 ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? exc_invalid_op+0x50/0x70 ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? asm_exc_invalid_op+0x1a/0x20 ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? btrfs_get_ordered_extents_for_logging.cold+0x1f/0x42 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] btrfs_sync_file+0x21a/0x4d0 [btrfs bb26272d49b4cdc847cf3f7faadd459b62caee9a] ? __seccomp_filter+0x31d/0x4f0 __x64_sys_fdatasync+0x4f/0x90 do_syscall_64+0x82/0x160 ? do_futex+0xcb/0x190 ? __x64_sys_futex+0x10e/0x1d0 ? switch_fpu_return+0x4f/0xd0 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 ? syscall_exit_to_user_mode+0x72/0x220 ? do_syscall_64+0x8e/0x160 entry_SYSCALL_64_after_hwframe+0x76/0x7e Another problem here is if task B grabs the private pointer and then uses it after task A has finished, since the private was allocated in the stack of task A, it results in some invalid memory access with a hard to predict result. This issue, triggering the assertion, was observed with QEMU workloads by two users in the Link tags below. Fix this by not relying on a file's private to pass information to fsync that it should skip locking the inode and instead pass this information through a special value stored in current->journal_info. This is safe because in the relevant section of the direct IO write path we are not holding a transaction handle, so current->journal_info is NULL. The following C program triggers the issue: $ cat repro.c /* Get the O_DIRECT definition. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdint.h> #include <fcntl.h> #include <errno.h> #include <string.h> #include <pthread.h> static int fd; static ssize_t do_write(int fd, const void *buf, size_t count, off_t offset) { while (count > 0) { ssize_t ret; ret = pwrite(fd, buf, count, offset); if (ret < 0) { if (errno == EINTR) continue; return ret; } count -= ret; buf += ret; } return 0; } static void *fsync_loop(void *arg) { while (1) { int ret; ret = fsync(fd); if (ret != 0) { perror("Fsync failed"); exit(6); } } } int main(int argc, char *argv[]) { long pagesize; void *write_buf; pthread_t fsyncer; int ret; if (argc != 2) { fprintf(stderr, "Use: %s <file path>\n", argv[0]); return 1; } fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC | O_DIRECT, 0666); if (fd == -1) { perror("Failed to open/create file"); return 1; } pagesize = sysconf(_SC_PAGE_SIZE); if (pagesize == -1) { perror("Failed to get page size"); return 2; } ret = posix_memalign(&write_buf, pagesize, pagesize); if (ret) { perror("Failed to allocate buffer"); return 3; } ret = pthread_create(&fsyncer, NULL, fsync_loop, NULL); if (ret != 0) { fprintf(stderr, "Failed to create writer thread: %d\n", ret); return 4; } while (1) { ret = do_write(fd, write_buf, pagesize, 0); if (ret != 0) { perror("Write failed"); exit(5); } } return 0; } $ mkfs.btrfs -f /dev/sdi $ mount /dev/sdi /mnt/sdi $ timeout 10 ./repro /mnt/sdi/foo Usually the race is triggered within less than 1 second. A test case for fstests will follow soon. Reported-by: Paulo Dias <paulo.miguel.dias(a)gmail.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=219187 Reported-by: Andreas Jahn <jahn-andi(a)web.de> Link: https://bugzilla.kernel.org/show_bug.cgi?id=219199 Reported-by: syzbot+4704b3cc972bd76024f1(a)syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-btrfs/00000000000044ff540620d7dee2@google.com/ Fixes: 939b656bc8ab ("btrfs: fix corruption after buffer fault in during direct IO append write") CC: stable(a)vger.kernel.org # 5.15+ Reviewed-by: Josef Bacik <josef(a)toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana(a)suse.com> Reviewed-by: David Sterba <dsterba(a)suse.com> Signed-off-by: David Sterba <dsterba(a)suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Xiongfeng Wang <wangxiongfeng2(a)huawei.com> --- fs/btrfs/ctree.h | 1 - fs/btrfs/file.c | 25 ++++++++++--------------- fs/btrfs/transaction.h | 6 ++++++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 86c7f8ce1715..06333a74d6c4 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -445,7 +445,6 @@ struct btrfs_file_private { void *filldir_buf; u64 last_index; struct extent_state *llseek_cached_state; - bool fsync_skip_inode_lock; }; static inline u32 BTRFS_LEAF_DATA_SIZE(const struct btrfs_fs_info *info) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 952cf145c629..15fd8c00f4c0 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1543,13 +1543,6 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) if (IS_ERR_OR_NULL(dio)) { err = PTR_ERR_OR_ZERO(dio); } else { - struct btrfs_file_private stack_private = { 0 }; - struct btrfs_file_private *private; - const bool have_private = (file->private_data != NULL); - - if (!have_private) - file->private_data = &stack_private; - /* * If we have a synchoronous write, we must make sure the fsync * triggered by the iomap_dio_complete() call below doesn't @@ -1558,13 +1551,10 @@ static ssize_t btrfs_direct_write(struct kiocb *iocb, struct iov_iter *from) * partial writes due to the input buffer (or parts of it) not * being already faulted in. */ - private = file->private_data; - private->fsync_skip_inode_lock = true; + ASSERT(current->journal_info == NULL); + current->journal_info = BTRFS_TRANS_DIO_WRITE_STUB; err = iomap_dio_complete(dio); - private->fsync_skip_inode_lock = false; - - if (!have_private) - file->private_data = NULL; + current->journal_info = NULL; } /* No increment (+=) because iomap returns a cumulative value. */ @@ -1796,7 +1786,6 @@ static inline bool skip_inode_logging(const struct btrfs_log_ctx *ctx) */ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) { - struct btrfs_file_private *private = file->private_data; struct dentry *dentry = file_dentry(file); struct inode *inode = d_inode(dentry); struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); @@ -1806,7 +1795,13 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) int ret = 0, err; u64 len; bool full_sync; - const bool skip_ilock = (private ? private->fsync_skip_inode_lock : false); + bool skip_ilock = false; + + if (current->journal_info == BTRFS_TRANS_DIO_WRITE_STUB) { + skip_ilock = true; + current->journal_info = NULL; + lockdep_assert_held(&inode->i_rwsem); + } trace_btrfs_sync_file(file, datasync); diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 238a0ab85df9..7623db359881 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -12,6 +12,12 @@ #include "ctree.h" #include "misc.h" +/* + * Signal that a direct IO write is in progress, to avoid deadlock for sync + * direct IO writes when fsync is called during the direct IO write path. + */ +#define BTRFS_TRANS_DIO_WRITE_STUB ((void *) 1) + /* Radix-tree tag for roots that are part of the trasaction. */ #define BTRFS_ROOT_TRANS_TAG 0 -- 2.20.1
2 1
0 0
[PATCH openEuler-1.0-LTS 0/3] dhugetlb: make spin_lock irq save
by Liu Shixin 27 Sep '24

27 Sep '24
Liu Shixin (3): dhugetlb: Use helper function to lock/unlock dhugetlb: avoid lockdep warning with spin_lock_nested dhugetlb: make free_huge_page_to_dhugetlb_pool irq safe include/linux/hugetlb.h | 2 + mm/hugetlb.c | 115 ++++++++++++++++++++++++++-------------- mm/memcontrol.c | 8 +-- 3 files changed, 78 insertions(+), 47 deletions(-) -- 2.34.1
2 4
0 0
[PATCH openEuler-22.03-LTS-SP1] ethtool: check device is present when getting link settings
by Wang Liang 27 Sep '24

27 Sep '24
From: Jamie Bainbridge <jamie.bainbridge(a)gmail.com> stable inclusion from stable-v5.10.225 commit 842a40c7273ba1c1cb30dda50405b328de1d860e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR4EU CVE: CVE-2024-46679 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit a699781c79ecf6cfe67fb00a0331b4088c7c8466 ] A sysfs reader can race with a device reset or removal, attempting to read device state when the device is not actually present. eg: [exception RIP: qed_get_current_link+17] #8 [ffffb9e4f2907c48] qede_get_link_ksettings at ffffffffc07a994a [qede] #9 [ffffb9e4f2907cd8] __rh_call_get_link_ksettings at ffffffff992b01a3 #10 [ffffb9e4f2907d38] __ethtool_get_link_ksettings at ffffffff992b04e4 #11 [ffffb9e4f2907d90] duplex_show at ffffffff99260300 #12 [ffffb9e4f2907e38] dev_attr_show at ffffffff9905a01c #13 [ffffb9e4f2907e50] sysfs_kf_seq_show at ffffffff98e0145b #14 [ffffb9e4f2907e68] seq_read at ffffffff98d902e3 #15 [ffffb9e4f2907ec8] vfs_read at ffffffff98d657d1 #16 [ffffb9e4f2907f00] ksys_read at ffffffff98d65c3f #17 [ffffb9e4f2907f38] do_syscall_64 at ffffffff98a052fb crash> struct net_device.state ffff9a9d21336000 state = 5, state 5 is __LINK_STATE_START (0b1) and __LINK_STATE_NOCARRIER (0b100). The device is not present, note lack of __LINK_STATE_PRESENT (0b10). This is the same sort of panic as observed in commit 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show"). There are many other callers of __ethtool_get_link_ksettings() which don't have a device presence check. Move this check into ethtool to protect all callers. Fixes: d519e17e2d01 ("net: export device speed and duplex via sysfs") Fixes: 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show") Signed-off-by: Jamie Bainbridge <jamie.bainbridge(a)gmail.com> Link: https://patch.msgid.link/8bae218864beaa44ed01628140475b9bf641c5b0.172439367… Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wang Liang <wangliang74(a)huawei.com> --- net/core/net-sysfs.c | 2 +- net/ethtool/ioctl.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 989b3f7ee85f..99303897b7bb 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -213,7 +213,7 @@ static ssize_t speed_show(struct device *dev, if (!rtnl_trylock()) return restart_syscall(); - if (netif_running(netdev) && netif_device_present(netdev)) { + if (netif_running(netdev)) { struct ethtool_link_ksettings cmd; if (!__ethtool_get_link_ksettings(netdev, &cmd)) diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 63a88b3e861d..f11b5e3a78b1 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -432,6 +432,9 @@ int __ethtool_get_link_ksettings(struct net_device *dev, if (!dev->ethtool_ops->get_link_ksettings) return -EOPNOTSUPP; + if (!netif_device_present(dev)) + return -ENODEV; + memset(link_ksettings, 0, sizeof(*link_ksettings)); return dev->ethtool_ops->get_link_ksettings(dev, link_ksettings); } -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] ethtool: check device is present when getting link settings
by Wang Liang 27 Sep '24

27 Sep '24
From: Jamie Bainbridge <jamie.bainbridge(a)gmail.com> stable inclusion from stable-v5.10.225 commit 842a40c7273ba1c1cb30dda50405b328de1d860e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR4EU CVE: CVE-2024-46679 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit a699781c79ecf6cfe67fb00a0331b4088c7c8466 ] A sysfs reader can race with a device reset or removal, attempting to read device state when the device is not actually present. eg: [exception RIP: qed_get_current_link+17] #8 [ffffb9e4f2907c48] qede_get_link_ksettings at ffffffffc07a994a [qede] #9 [ffffb9e4f2907cd8] __rh_call_get_link_ksettings at ffffffff992b01a3 #10 [ffffb9e4f2907d38] __ethtool_get_link_ksettings at ffffffff992b04e4 #11 [ffffb9e4f2907d90] duplex_show at ffffffff99260300 #12 [ffffb9e4f2907e38] dev_attr_show at ffffffff9905a01c #13 [ffffb9e4f2907e50] sysfs_kf_seq_show at ffffffff98e0145b #14 [ffffb9e4f2907e68] seq_read at ffffffff98d902e3 #15 [ffffb9e4f2907ec8] vfs_read at ffffffff98d657d1 #16 [ffffb9e4f2907f00] ksys_read at ffffffff98d65c3f #17 [ffffb9e4f2907f38] do_syscall_64 at ffffffff98a052fb crash> struct net_device.state ffff9a9d21336000 state = 5, state 5 is __LINK_STATE_START (0b1) and __LINK_STATE_NOCARRIER (0b100). The device is not present, note lack of __LINK_STATE_PRESENT (0b10). This is the same sort of panic as observed in commit 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show"). There are many other callers of __ethtool_get_link_ksettings() which don't have a device presence check. Move this check into ethtool to protect all callers. Fixes: d519e17e2d01 ("net: export device speed and duplex via sysfs") Fixes: 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show") Signed-off-by: Jamie Bainbridge <jamie.bainbridge(a)gmail.com> Link: https://patch.msgid.link/8bae218864beaa44ed01628140475b9bf641c5b0.172439367… Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wang Liang <wangliang74(a)huawei.com> --- net/core/net-sysfs.c | 2 +- net/ethtool/ioctl.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 989b3f7ee85f..99303897b7bb 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -213,7 +213,7 @@ static ssize_t speed_show(struct device *dev, if (!rtnl_trylock()) return restart_syscall(); - if (netif_running(netdev) && netif_device_present(netdev)) { + if (netif_running(netdev)) { struct ethtool_link_ksettings cmd; if (!__ethtool_get_link_ksettings(netdev, &cmd)) diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 61a002f5dec6..bc956c346037 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -432,6 +432,9 @@ int __ethtool_get_link_ksettings(struct net_device *dev, if (!dev->ethtool_ops->get_link_ksettings) return -EOPNOTSUPP; + if (!netif_device_present(dev)) + return -ENODEV; + memset(link_ksettings, 0, sizeof(*link_ksettings)); return dev->ethtool_ops->get_link_ksettings(dev, link_ksettings); } -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] ethtool: check device is present when getting link settings
by Wang Liang 27 Sep '24

27 Sep '24
From: Jamie Bainbridge <jamie.bainbridge(a)gmail.com> stable inclusion from stable-v6.6.49 commit 94ab317024ba373d37340893d1c0358638935fbb category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR4EU CVE: CVE-2024-46679 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit a699781c79ecf6cfe67fb00a0331b4088c7c8466 ] A sysfs reader can race with a device reset or removal, attempting to read device state when the device is not actually present. eg: [exception RIP: qed_get_current_link+17] #8 [ffffb9e4f2907c48] qede_get_link_ksettings at ffffffffc07a994a [qede] #9 [ffffb9e4f2907cd8] __rh_call_get_link_ksettings at ffffffff992b01a3 #10 [ffffb9e4f2907d38] __ethtool_get_link_ksettings at ffffffff992b04e4 #11 [ffffb9e4f2907d90] duplex_show at ffffffff99260300 #12 [ffffb9e4f2907e38] dev_attr_show at ffffffff9905a01c #13 [ffffb9e4f2907e50] sysfs_kf_seq_show at ffffffff98e0145b #14 [ffffb9e4f2907e68] seq_read at ffffffff98d902e3 #15 [ffffb9e4f2907ec8] vfs_read at ffffffff98d657d1 #16 [ffffb9e4f2907f00] ksys_read at ffffffff98d65c3f #17 [ffffb9e4f2907f38] do_syscall_64 at ffffffff98a052fb crash> struct net_device.state ffff9a9d21336000 state = 5, state 5 is __LINK_STATE_START (0b1) and __LINK_STATE_NOCARRIER (0b100). The device is not present, note lack of __LINK_STATE_PRESENT (0b10). This is the same sort of panic as observed in commit 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show"). There are many other callers of __ethtool_get_link_ksettings() which don't have a device presence check. Move this check into ethtool to protect all callers. Fixes: d519e17e2d01 ("net: export device speed and duplex via sysfs") Fixes: 4224cfd7fb65 ("net-sysfs: add check for netdevice being present to speed_show") Signed-off-by: Jamie Bainbridge <jamie.bainbridge(a)gmail.com> Link: https://patch.msgid.link/8bae218864beaa44ed01628140475b9bf641c5b0.172439367… Signed-off-by: Jakub Kicinski <kuba(a)kernel.org> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wang Liang <wangliang74(a)huawei.com> --- net/core/net-sysfs.c | 2 +- net/ethtool/ioctl.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 5a9487af44e0..f7404bc67974 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -216,7 +216,7 @@ static ssize_t speed_show(struct device *dev, if (!rtnl_trylock()) return restart_syscall(); - if (netif_running(netdev) && netif_device_present(netdev)) { + if (netif_running(netdev)) { struct ethtool_link_ksettings cmd; if (!__ethtool_get_link_ksettings(netdev, &cmd)) diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 7cb23bcf8ef7..4486cbe2faf0 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -438,6 +438,9 @@ int __ethtool_get_link_ksettings(struct net_device *dev, if (!dev->ethtool_ops->get_link_ksettings) return -EOPNOTSUPP; + if (!netif_device_present(dev)) + return -ENODEV; + memset(link_ksettings, 0, sizeof(*link_ksettings)); return dev->ethtool_ops->get_link_ksettings(dev, link_ksettings); } -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] sched: fix a deadlock in task_net_group()
by Hui Tang 27 Sep '24

27 Sep '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IATU6E CVE: NA -------------------------------- If req->tx_pid == req->tx_pid when sched_net_relationship_submit() called, which cause rship->net_lock AA deadlock in task_net_group(). Fixes: 2ac826b258e9 ("sched: Introduce task relationship by net and memory") Signed-off-by: Hui Tang <tanghui20(a)huawei.com> --- kernel/sched/relationship.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/relationship.c b/kernel/sched/relationship.c index 515c913aeb33..d17041585c39 100644 --- a/kernel/sched/relationship.c +++ b/kernel/sched/relationship.c @@ -141,6 +141,9 @@ int sched_net_relationship_submit(struct net_relationship_req *req) req->net_rship_type == NET_RS_TYPE_TX) return remote_rxtx_process(req); + if (req->rx_pid == req->tx_pid) + return -EINVAL; + rcu_read_lock(); rx_tsk = find_task_by_pid_ns(req->rx_pid, &init_pid_ns); -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] smb: client: fix double put of @cfile in smb2_set_path_size()
by Zheng Qixing 27 Sep '24

27 Sep '24
From: Paulo Alcantara <pc(a)manguebit.com> stable inclusion from stable-v6.6.51 commit 5a72d1edb0843e4c927a4096f81e631031c25c28 category: kasan bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWCG CVE: CVE-2024-46796 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit f9c169b51b6ce20394594ef674d6b10efba31220 upstream. If smb2_compound_op() is called with a valid @cfile and returned -EINVAL, we need to call cifs_get_writable_path() before retrying it as the reference of @cfile was already dropped by previous call. This fixes the following KASAN splat when running fstests generic/013 against Windows Server 2022: CIFS: Attempting to mount //w22-fs0/scratch run fstests generic/013 at 2024-09-02 19:48:59 ================================================================== BUG: KASAN: slab-use-after-free in detach_if_pending+0xab/0x200 Write of size 8 at addr ffff88811f1a3730 by task kworker/3:2/176 CPU: 3 UID: 0 PID: 176 Comm: kworker/3:2 Not tainted 6.11.0-rc6 #2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 Workqueue: cifsoplockd cifs_oplock_break [cifs] Call Trace: <TASK> dump_stack_lvl+0x5d/0x80 ? detach_if_pending+0xab/0x200 print_report+0x156/0x4d9 ? detach_if_pending+0xab/0x200 ? __virt_addr_valid+0x145/0x300 ? __phys_addr+0x46/0x90 ? detach_if_pending+0xab/0x200 kasan_report+0xda/0x110 ? detach_if_pending+0xab/0x200 detach_if_pending+0xab/0x200 timer_delete+0x96/0xe0 ? __pfx_timer_delete+0x10/0x10 ? rcu_is_watching+0x20/0x50 try_to_grab_pending+0x46/0x3b0 __cancel_work+0x89/0x1b0 ? __pfx___cancel_work+0x10/0x10 ? kasan_save_track+0x14/0x30 cifs_close_deferred_file+0x110/0x2c0 [cifs] ? __pfx_cifs_close_deferred_file+0x10/0x10 [cifs] ? __pfx_down_read+0x10/0x10 cifs_oplock_break+0x4c1/0xa50 [cifs] ? __pfx_cifs_oplock_break+0x10/0x10 [cifs] ? lock_is_held_type+0x85/0xf0 ? mark_held_locks+0x1a/0x90 process_one_work+0x4c6/0x9f0 ? find_held_lock+0x8a/0xa0 ? __pfx_process_one_work+0x10/0x10 ? lock_acquired+0x220/0x550 ? __list_add_valid_or_report+0x37/0x100 worker_thread+0x2e4/0x570 ? __kthread_parkme+0xd1/0xf0 ? __pfx_worker_thread+0x10/0x10 kthread+0x17f/0x1c0 ? kthread+0xda/0x1c0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x31/0x60 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 </TASK> Allocated by task 1118: kasan_save_stack+0x30/0x50 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 cifs_new_fileinfo+0xc8/0x9d0 [cifs] cifs_atomic_open+0x467/0x770 [cifs] lookup_open.isra.0+0x665/0x8b0 path_openat+0x4c3/0x1380 do_filp_open+0x167/0x270 do_sys_openat2+0x129/0x160 __x64_sys_creat+0xad/0xe0 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 83: kasan_save_stack+0x30/0x50 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x70 poison_slab_object+0xe9/0x160 __kasan_slab_free+0x32/0x50 kfree+0xf2/0x300 process_one_work+0x4c6/0x9f0 worker_thread+0x2e4/0x570 kthread+0x17f/0x1c0 ret_from_fork+0x31/0x60 ret_from_fork_asm+0x1a/0x30 Last potentially related work creation: kasan_save_stack+0x30/0x50 __kasan_record_aux_stack+0xad/0xc0 insert_work+0x29/0xe0 __queue_work+0x5ea/0x760 queue_work_on+0x6d/0x90 _cifsFileInfo_put+0x3f6/0x770 [cifs] smb2_compound_op+0x911/0x3940 [cifs] smb2_set_path_size+0x228/0x270 [cifs] cifs_set_file_size+0x197/0x460 [cifs] cifs_setattr+0xd9c/0x14b0 [cifs] notify_change+0x4e3/0x740 do_truncate+0xfa/0x180 vfs_truncate+0x195/0x200 __x64_sys_truncate+0x109/0x150 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 71f15c90e785 ("smb: client: retry compound request without reusing lease") Cc: stable(a)vger.kernel.org Signed-off-by: Paulo Alcantara (Red Hat) <pc(a)manguebit.com> Cc: David Howells <dhowells(a)redhat.com> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Zheng Qixing <zhengqixing(a)huawei.com> --- fs/smb/client/smb2inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/smb/client/smb2inode.c b/fs/smb/client/smb2inode.c index 28031c7ba6b1..c51ec2e1adb0 100644 --- a/fs/smb/client/smb2inode.c +++ b/fs/smb/client/smb2inode.c @@ -1148,6 +1148,7 @@ smb2_set_path_size(const unsigned int xid, struct cifs_tcon *tcon, cfile, NULL, NULL, dentry); if (rc == -EINVAL) { cifs_dbg(FYI, "invalid lease key, resending request without lease"); + cifs_get_writable_path(tcon, full_path, FIND_WR_ANY, &cfile); rc = smb2_compound_op(xid, tcon, cifs_sb, full_path, &oparms, &in_iov, &(int){SMB2_OP_SET_EOF}, 1, -- 2.39.2
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] ksmbd: unset the binding mark of a reused connection
by Long Li 27 Sep '24

27 Sep '24
From: Namjae Jeon <linkinjeon(a)kernel.org> stable inclusion from stable-v5.15.166 commit 9914f1bd61d5e838bb1ab15a71076d37a6db65d1 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWIK CVE: CVE-2024-46795 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=… -------------------------------- [ Upstream commit 78c5a6f1f630172b19af4912e755e1da93ef0ab5 ] Steve French reported null pointer dereference error from sha256 lib. cifs.ko can send session setup requests on reused connection. If reused connection is used for binding session, conn->binding can still remain true and generate_preauth_hash() will not set sess->Preauth_HashValue and it will be NULL. It is used as a material to create an encryption key in ksmbd_gen_smb311_encryptionkey. ->Preauth_HashValue cause null pointer dereference error from crypto_shash_update(). BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 8 PID: 429254 Comm: kworker/8:39 Hardware name: LENOVO 20MAS08500/20MAS08500, BIOS N2CET69W (1.52 ) Workqueue: ksmbd-io handle_ksmbd_work [ksmbd] RIP: 0010:lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] <TASK> ? show_regs+0x6d/0x80 ? __die+0x24/0x80 ? page_fault_oops+0x99/0x1b0 ? do_user_addr_fault+0x2ee/0x6b0 ? exc_page_fault+0x83/0x1b0 ? asm_exc_page_fault+0x27/0x30 ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] _sha256_update+0x77/0xa0 [sha256_ssse3] sha256_avx2_update+0x15/0x30 [sha256_ssse3] crypto_shash_update+0x1e/0x40 hmac_update+0x12/0x20 crypto_shash_update+0x1e/0x40 generate_key+0x234/0x380 [ksmbd] generate_smb3encryptionkey+0x40/0x1c0 [ksmbd] ksmbd_gen_smb311_encryptionkey+0x72/0xa0 [ksmbd] ntlm_authenticate.isra.0+0x423/0x5d0 [ksmbd] smb2_sess_setup+0x952/0xaa0 [ksmbd] __process_request+0xa3/0x1d0 [ksmbd] __handle_ksmbd_work+0x1c4/0x2f0 [ksmbd] handle_ksmbd_work+0x2d/0xa0 [ksmbd] process_one_work+0x16c/0x350 worker_thread+0x306/0x440 ? __pfx_worker_thread+0x10/0x10 kthread+0xef/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x44/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Fixes: f5a544e3bab7 ("ksmbd: add support for SMB3 multichannel") Cc: stable(a)vger.kernel.org # v5.15+ Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Long Li <leo.lilong(a)huawei.com> --- fs/ksmbd/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 50ef53115cab..f4aeca5e7e57 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -1704,6 +1704,8 @@ int smb2_sess_setup(struct ksmbd_work *work) rc = ksmbd_session_register(conn, sess); if (rc) goto out_err; + + conn->binding = false; } else if (conn->dialect >= SMB30_PROT_ID && (server_conf.flags & KSMBD_GLOBAL_FLAG_SMB3_MULTICHANNEL) && req->Flags & SMB2_SESSION_REQ_FLAG_BINDING) { @@ -1782,6 +1784,8 @@ int smb2_sess_setup(struct ksmbd_work *work) sess = NULL; goto out_err; } + + conn->binding = false; } work->sess = sess; -- 2.39.2
2 1
0 0
[PATCH OLK-5.10 0/2] ext4: dax: Fix inconsistent isize during writing
by Zhihao Cheng 27 Sep '24

27 Sep '24
From: Zhihao Cheng <chengzhihao1(a)huawei.com> Zhihao Cheng (1): ext4: dax: fix overflowing extents beyond inode size when partially writing yangerkun (1): ext4: dax: keep orphan list before truncate overflow allocated blocks fs/ext4/file.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) -- 2.39.2
2 3
0 0
[PATCH OLK-6.6] ksmbd: unset the binding mark of a reused connection
by Long Li 27 Sep '24

27 Sep '24
From: Namjae Jeon <linkinjeon(a)kernel.org> mainline inclusion from mainline-v6.10-rc2 commit 78c5a6f1f630172b19af4912e755e1da93ef0ab5 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWIK CVE: CVE-2024-46795 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- Steve French reported null pointer dereference error from sha256 lib. cifs.ko can send session setup requests on reused connection. If reused connection is used for binding session, conn->binding can still remain true and generate_preauth_hash() will not set sess->Preauth_HashValue and it will be NULL. It is used as a material to create an encryption key in ksmbd_gen_smb311_encryptionkey. ->Preauth_HashValue cause null pointer dereference error from crypto_shash_update(). BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 8 PID: 429254 Comm: kworker/8:39 Hardware name: LENOVO 20MAS08500/20MAS08500, BIOS N2CET69W (1.52 ) Workqueue: ksmbd-io handle_ksmbd_work [ksmbd] RIP: 0010:lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] <TASK> ? show_regs+0x6d/0x80 ? __die+0x24/0x80 ? page_fault_oops+0x99/0x1b0 ? do_user_addr_fault+0x2ee/0x6b0 ? exc_page_fault+0x83/0x1b0 ? asm_exc_page_fault+0x27/0x30 ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] _sha256_update+0x77/0xa0 [sha256_ssse3] sha256_avx2_update+0x15/0x30 [sha256_ssse3] crypto_shash_update+0x1e/0x40 hmac_update+0x12/0x20 crypto_shash_update+0x1e/0x40 generate_key+0x234/0x380 [ksmbd] generate_smb3encryptionkey+0x40/0x1c0 [ksmbd] ksmbd_gen_smb311_encryptionkey+0x72/0xa0 [ksmbd] ntlm_authenticate.isra.0+0x423/0x5d0 [ksmbd] smb2_sess_setup+0x952/0xaa0 [ksmbd] __process_request+0xa3/0x1d0 [ksmbd] __handle_ksmbd_work+0x1c4/0x2f0 [ksmbd] handle_ksmbd_work+0x2d/0xa0 [ksmbd] process_one_work+0x16c/0x350 worker_thread+0x306/0x440 ? __pfx_worker_thread+0x10/0x10 kthread+0xef/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x44/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Fixes: f5a544e3bab7 ("ksmbd: add support for SMB3 multichannel") Cc: stable(a)vger.kernel.org # v5.15+ Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: Long Li <leo.lilong(a)huawei.com> --- fs/smb/server/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 4d91210e6acf..28684316bccb 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -1681,6 +1681,8 @@ int smb2_sess_setup(struct ksmbd_work *work) rc = ksmbd_session_register(conn, sess); if (rc) goto out_err; + + conn->binding = false; } else if (conn->dialect >= SMB30_PROT_ID && (server_conf.flags & KSMBD_GLOBAL_FLAG_SMB3_MULTICHANNEL) && req->Flags & SMB2_SESSION_REQ_FLAG_BINDING) { @@ -1759,6 +1761,8 @@ int smb2_sess_setup(struct ksmbd_work *work) sess = NULL; goto out_err; } + + conn->binding = false; } work->sess = sess; -- 2.39.2
2 1
0 0
[PATCH OLK-6.6] HID: amd_sfh: free driver_data after destroying hid device
by He Yujie 27 Sep '24

27 Sep '24
From: Olivier Sobrie <olivier(a)sobrie.be> stable inclusion from stable-v6.6.51 commit 60dc4ee0428d70bcbb41436b6729d29f1cbdfb89 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARV9S CVE: CVE-2024-46746 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 97155021ae17b86985121b33cf8098bcde00d497 ] HID driver callbacks aren't called anymore once hid_destroy_device() has been called. Hence, hid driver_data should be freed only after the hid_destroy_device() function returned as driver_data is used in several callbacks. I observed a crash with kernel 6.10.0 on my T14s Gen 3, after enabling KASAN to debug memory allocation, I got this output: [ 13.050438] ================================================================== [ 13.054060] BUG: KASAN: slab-use-after-free in amd_sfh_get_report+0x3ec/0x530 [amd_sfh] [ 13.054809] psmouse serio1: trackpoint: Synaptics TrackPoint firmware: 0x02, buttons: 3/3 [ 13.056432] Read of size 8 at addr ffff88813152f408 by task (udev-worker)/479 [ 13.060970] CPU: 5 PID: 479 Comm: (udev-worker) Not tainted 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.063978] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.067860] Call Trace: [ 13.069383] input: TPPS/2 Synaptics TrackPoint as /devices/platform/i8042/serio1/input/input8 [ 13.071486] <TASK> [ 13.071492] dump_stack_lvl+0x5d/0x80 [ 13.074870] snd_hda_intel 0000:33:00.6: enabling device (0000 -> 0002) [ 13.078296] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.082199] print_report+0x174/0x505 [ 13.085776] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.089367] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.093255] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.097464] kasan_report+0xc8/0x150 [ 13.101461] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.105802] amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.110303] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.114879] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.119450] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.124097] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.127404] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.131925] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.136455] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.140197] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.143602] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.147234] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.150446] ? __devm_add_action+0x167/0x1d0 [ 13.155061] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.158581] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.161814] platform_probe+0xa2/0x150 [ 13.165029] really_probe+0x1e3/0x8a0 [ 13.168243] __driver_probe_device+0x18c/0x370 [ 13.171500] driver_probe_device+0x4a/0x120 [ 13.175000] __driver_attach+0x190/0x4a0 [ 13.178521] ? __pfx___driver_attach+0x10/0x10 [ 13.181771] bus_for_each_dev+0x106/0x180 [ 13.185033] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.188229] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.191446] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.194382] bus_add_driver+0x29e/0x4d0 [ 13.197328] driver_register+0x1a5/0x360 [ 13.200283] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.203362] do_one_initcall+0xa7/0x380 [ 13.206432] ? __pfx_do_one_initcall+0x10/0x10 [ 13.210175] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.213211] ? kasan_unpoison+0x44/0x70 [ 13.216688] do_init_module+0x238/0x750 [ 13.219696] load_module+0x5011/0x6af0 [ 13.223096] ? kasan_save_stack+0x30/0x50 [ 13.226743] ? kasan_save_track+0x14/0x30 [ 13.230080] ? kasan_save_free_info+0x3b/0x60 [ 13.233323] ? poison_slab_object+0x109/0x180 [ 13.236778] ? __pfx_load_module+0x10/0x10 [ 13.239703] ? poison_slab_object+0x109/0x180 [ 13.243070] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.245924] ? init_module_from_file+0x13d/0x150 [ 13.248745] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.251503] ? init_module_from_file+0xdf/0x150 [ 13.254198] init_module_from_file+0xdf/0x150 [ 13.256826] ? __pfx_init_module_from_file+0x10/0x10 [ 13.259428] ? kasan_save_track+0x14/0x30 [ 13.261959] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.264471] ? kasan_save_free_info+0x3b/0x60 [ 13.267026] ? poison_slab_object+0x109/0x180 [ 13.269494] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.271949] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.274324] ? _raw_spin_lock+0x85/0xe0 [ 13.276671] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.278963] ? __rseq_handle_notify_resume+0x1a6/0xad0 [ 13.281193] idempotent_init_module+0x23b/0x650 [ 13.283420] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.285619] ? __pfx___seccomp_filter+0x10/0x10 [ 13.287714] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.289828] ? __fget_light+0x57/0x420 [ 13.291870] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.293880] ? security_capable+0x74/0xb0 [ 13.295820] __x64_sys_finit_module+0xbe/0x130 [ 13.297874] do_syscall_64+0x82/0x190 [ 13.299898] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.301905] ? irqtime_account_irq+0x3d/0x1f0 [ 13.303877] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.305753] ? __irq_exit_rcu+0x4e/0x130 [ 13.307577] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.309489] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 13.311371] RIP: 0033:0x7a21f96ade9d [ 13.313234] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 63 de 0c 00 f7 d8 64 89 01 48 [ 13.317051] RSP: 002b:00007ffeae934e78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.319024] RAX: ffffffffffffffda RBX: 00005987276bfcf0 RCX: 00007a21f96ade9d [ 13.321100] RDX: 0000000000000004 RSI: 00007a21f8eda376 RDI: 000000000000001c [ 13.323314] RBP: 00007a21f8eda376 R08: 0000000000000001 R09: 00007ffeae934ec0 [ 13.325505] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000 [ 13.327637] R13: 00005987276c1250 R14: 0000000000000000 R15: 00005987276c4530 [ 13.329737] </TASK> [ 13.333945] Allocated by task 139: [ 13.336111] kasan_save_stack+0x30/0x50 [ 13.336121] kasan_save_track+0x14/0x30 [ 13.336125] __kasan_kmalloc+0xaa/0xb0 [ 13.336129] amdtp_hid_probe+0xb1/0x440 [amd_sfh] [ 13.336138] amd_sfh_hid_client_init+0xb8a/0x10f0 [amd_sfh] [ 13.336144] sfh_init_work+0x47/0x120 [amd_sfh] [ 13.336150] process_one_work+0x673/0xeb0 [ 13.336155] worker_thread+0x795/0x1250 [ 13.336160] kthread+0x290/0x350 [ 13.336164] ret_from_fork+0x34/0x70 [ 13.336169] ret_from_fork_asm+0x1a/0x30 [ 13.338175] Freed by task 139: [ 13.340064] kasan_save_stack+0x30/0x50 [ 13.340072] kasan_save_track+0x14/0x30 [ 13.340076] kasan_save_free_info+0x3b/0x60 [ 13.340081] poison_slab_object+0x109/0x180 [ 13.340085] __kasan_slab_free+0x32/0x50 [ 13.340089] kfree+0xe5/0x310 [ 13.340094] amdtp_hid_remove+0xb2/0x160 [amd_sfh] [ 13.340102] amd_sfh_hid_client_deinit+0x324/0x640 [amd_sfh] [ 13.340107] amd_sfh_hid_client_init+0x94a/0x10f0 [amd_sfh] [ 13.340113] sfh_init_work+0x47/0x120 [amd_sfh] [ 13.340118] process_one_work+0x673/0xeb0 [ 13.340123] worker_thread+0x795/0x1250 [ 13.340127] kthread+0x290/0x350 [ 13.340132] ret_from_fork+0x34/0x70 [ 13.340136] ret_from_fork_asm+0x1a/0x30 [ 13.342482] The buggy address belongs to the object at ffff88813152f400 which belongs to the cache kmalloc-64 of size 64 [ 13.347357] The buggy address is located 8 bytes inside of freed 64-byte region [ffff88813152f400, ffff88813152f440) [ 13.347367] The buggy address belongs to the physical page: [ 13.355409] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13152f [ 13.355416] anon flags: 0x2ffff8000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 13.355423] page_type: 0xffffefff(slab) [ 13.355429] raw: 02ffff8000000000 ffff8881000428c0 ffffea0004c43a00 0000000000000005 [ 13.355435] raw: 0000000000000000 0000000000200020 00000001ffffefff 0000000000000000 [ 13.355439] page dumped because: kasan: bad access detected [ 13.357295] Memory state around the buggy address: [ 13.357299] ffff88813152f300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357303] ffff88813152f380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357306] >ffff88813152f400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357309] ^ [ 13.357311] ffff88813152f480: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 13.357315] ffff88813152f500: 00 00 00 00 00 00 00 06 fc fc fc fc fc fc fc fc [ 13.357318] ================================================================== [ 13.357405] Disabling lock debugging due to kernel taint [ 13.383534] Oops: general protection fault, probably for non-canonical address 0xe0a1bc4140000013: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 13.383544] KASAN: maybe wild-memory-access in range [0x050e020a00000098-0x050e020a0000009f] [ 13.383551] CPU: 3 PID: 479 Comm: (udev-worker) Tainted: G B 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.383561] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.383565] RIP: 0010:amd_sfh_get_report+0x81/0x530 [amd_sfh] [ 13.383580] Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 78 03 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 08 49 8d 7c 24 10 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 45 8b 74 24 10 45 [ 13.383585] RSP: 0018:ffff8881261f7388 EFLAGS: 00010212 [ 13.383592] RAX: dffffc0000000000 RBX: ffff88813152f400 RCX: 0000000000000002 [ 13.383597] RDX: 00a1c04140000013 RSI: 0000000000000008 RDI: 050e020a0000009b [ 13.383600] RBP: ffff88814d010000 R08: 0000000000000002 R09: fffffbfff3ddb8c0 [ 13.383604] R10: ffffffff9eedc607 R11: ffff88810ce98000 R12: 050e020a0000008b [ 13.383607] R13: ffff88814d010000 R14: dffffc0000000000 R15: 0000000000000004 [ 13.383611] FS: 00007a21f94d0880(0000) GS:ffff8887e7d80000(0000) knlGS:0000000000000000 [ 13.383615] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 13.383618] CR2: 00007e0014c438f0 CR3: 000000012614c000 CR4: 0000000000f50ef0 [ 13.383622] PKRU: 55555554 [ 13.383625] Call Trace: [ 13.383629] <TASK> [ 13.383632] ? __die_body.cold+0x19/0x27 [ 13.383644] ? die_addr+0x46/0x70 [ 13.383652] ? exc_general_protection+0x150/0x240 [ 13.383664] ? asm_exc_general_protection+0x26/0x30 [ 13.383674] ? amd_sfh_get_report+0x81/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383686] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383697] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383706] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383713] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.383727] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.383739] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383745] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.383753] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.383762] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.383768] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.383790] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383795] ? __devm_add_action+0x167/0x1d0 [ 13.383806] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.383818] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383826] platform_probe+0xa2/0x150 [ 13.383832] really_probe+0x1e3/0x8a0 [ 13.383838] __driver_probe_device+0x18c/0x370 [ 13.383844] driver_probe_device+0x4a/0x120 [ 13.383851] __driver_attach+0x190/0x4a0 [ 13.383857] ? __pfx___driver_attach+0x10/0x10 [ 13.383863] bus_for_each_dev+0x106/0x180 [ 13.383868] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.383874] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.383880] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383887] bus_add_driver+0x29e/0x4d0 [ 13.383895] driver_register+0x1a5/0x360 [ 13.383902] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.383910] do_one_initcall+0xa7/0x380 [ 13.383919] ? __pfx_do_one_initcall+0x10/0x10 [ 13.383927] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383933] ? kasan_unpoison+0x44/0x70 [ 13.383943] do_init_module+0x238/0x750 [ 13.383955] load_module+0x5011/0x6af0 [ 13.383962] ? kasan_save_stack+0x30/0x50 [ 13.383968] ? kasan_save_track+0x14/0x30 [ 13.383973] ? kasan_save_free_info+0x3b/0x60 [ 13.383980] ? poison_slab_object+0x109/0x180 [ 13.383993] ? __pfx_load_module+0x10/0x10 [ 13.384007] ? poison_slab_object+0x109/0x180 [ 13.384012] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384018] ? init_module_from_file+0x13d/0x150 [ 13.384025] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384032] ? init_module_from_file+0xdf/0x150 [ 13.384037] init_module_from_file+0xdf/0x150 [ 13.384044] ? __pfx_init_module_from_file+0x10/0x10 [ 13.384050] ? kasan_save_track+0x14/0x30 [ 13.384055] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384060] ? kasan_save_free_info+0x3b/0x60 [ 13.384066] ? poison_slab_object+0x109/0x180 [ 13.384071] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384080] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384085] ? _raw_spin_lock+0x85/0xe0 [ 13.384091] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.384096] ? __rseq_handle_notify_resume+0x1a6/0xad0 [ 13.384106] idempotent_init_module+0x23b/0x650 [ 13.384114] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.384120] ? __pfx___seccomp_filter+0x10/0x10 [ 13.384129] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384135] ? __fget_light+0x57/0x420 [ 13.384142] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384147] ? security_capable+0x74/0xb0 [ 13.384157] __x64_sys_finit_module+0xbe/0x130 [ 13.384164] do_syscall_64+0x82/0x190 [ 13.384174] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384179] ? irqtime_account_irq+0x3d/0x1f0 [ 13.384188] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384193] ? __irq_exit_rcu+0x4e/0x130 [ 13.384201] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384206] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 13.384212] RIP: 0033:0x7a21f96ade9d [ 13.384263] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 63 de 0c 00 f7 d8 64 89 01 48 [ 13.384267] RSP: 002b:00007ffeae934e78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.384273] RAX: ffffffffffffffda RBX: 00005987276bfcf0 RCX: 00007a21f96ade9d [ 13.384277] RDX: 0000000000000004 RSI: 00007a21f8eda376 RDI: 000000000000001c [ 13.384280] RBP: 00007a21f8eda376 R08: 0000000000000001 R09: 00007ffeae934ec0 [ 13.384284] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000 [ 13.384288] R13: 00005987276c1250 R14: 0000000000000000 R15: 00005987276c4530 [ 13.384297] </TASK> [ 13.384299] Modules linked in: soundwire_amd(+) hid_sensor_gyro_3d(+) hid_sensor_magn_3d hid_sensor_accel_3d soundwire_generic_allocation amdxcp hid_sensor_trigger drm_exec industrialio_triggered_buffer soundwire_bus gpu_sched kvm_amd kfifo_buf qmi_helpers joydev drm_buddy hid_sensor_iio_common mousedev snd_soc_core industrialio i2c_algo_bit mac80211 snd_compress drm_suballoc_helper kvm snd_hda_intel drm_ttm_helper ac97_bus snd_pcm_dmaengine snd_intel_dspcfg ttm thinkpad_acpi(+) snd_intel_sdw_acpi hid_sensor_hub snd_rpl_pci_acp6x drm_display_helper snd_hda_codec hid_multitouch libarc4 snd_acp_pci platform_profile think_lmi(+) hid_generic firmware_attributes_class wmi_bmof cec snd_acp_legacy_common sparse_keymap rapl snd_hda_core psmouse cfg80211 pcspkr snd_pci_acp6x snd_hwdep video snd_pcm snd_pci_acp5x snd_timer snd_rn_pci_acp3x ucsi_acpi snd_acp_config snd sp5100_tco rfkill snd_soc_acpi typec_ucsi thunderbolt amd_sfh k10temp mhi soundcore i2c_piix4 snd_pci_acp3x typec i2c_hid_acpi roles i2c_hid wmi acpi_tad amd_pmc [ 13.384454] mac_hid i2c_dev crypto_user loop nfnetlink zram ip_tables x_tables dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel serio_raw sha512_ssse3 atkbd sha256_ssse3 libps2 sha1_ssse3 vivaldi_fmap nvme aesni_intel crypto_simd nvme_core cryptd ccp xhci_pci i8042 nvme_auth xhci_pci_renesas serio vfat fat btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq [ 13.384552] ---[ end trace 0000000000000000 ]--- KASAN reports a use-after-free of hid->driver_data in function amd_sfh_get_report(). The backtrace indicates that the function is called by amdtp_hid_request() which is one of the callbacks of hid device. The current make sure that driver_data is freed only once hid_destroy_device() returned. Note that I observed the crash both on v6.9.9 and v6.10.0. The code seems to be as it was from the early days of the driver. Signed-off-by: Olivier Sobrie <olivier(a)sobrie.be> Acked-by: Basavaraj Natikar <Basavaraj.Natikar(a)amd.com> Signed-off-by: Jiri Kosina <jkosina(a)suse.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c index 705b52337068..81f3024b7b1b 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c @@ -171,11 +171,13 @@ int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data) void amdtp_hid_remove(struct amdtp_cl_data *cli_data) { int i; + struct amdtp_hid_data *hid_data; for (i = 0; i < cli_data->num_hid_devices; ++i) { if (cli_data->hid_sensor_hubs[i]) { - kfree(cli_data->hid_sensor_hubs[i]->driver_data); + hid_data = cli_data->hid_sensor_hubs[i]->driver_data; hid_destroy_device(cli_data->hid_sensor_hubs[i]); + kfree(hid_data); cli_data->hid_sensor_hubs[i] = NULL; } } -- 2.34.1
2 1
0 0
[PATCH OLK-5.10] ksmbd: unset the binding mark of a reused connection
by Long Li 27 Sep '24

27 Sep '24
From: Namjae Jeon <linkinjeon(a)kernel.org> stable inclusion from stable-v5.15.166 commit 9914f1bd61d5e838bb1ab15a71076d37a6db65d1 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWIK CVE: CVE-2024-46795 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=… -------------------------------- [ Upstream commit 78c5a6f1f630172b19af4912e755e1da93ef0ab5 ] Steve French reported null pointer dereference error from sha256 lib. cifs.ko can send session setup requests on reused connection. If reused connection is used for binding session, conn->binding can still remain true and generate_preauth_hash() will not set sess->Preauth_HashValue and it will be NULL. It is used as a material to create an encryption key in ksmbd_gen_smb311_encryptionkey. ->Preauth_HashValue cause null pointer dereference error from crypto_shash_update(). BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 8 PID: 429254 Comm: kworker/8:39 Hardware name: LENOVO 20MAS08500/20MAS08500, BIOS N2CET69W (1.52 ) Workqueue: ksmbd-io handle_ksmbd_work [ksmbd] RIP: 0010:lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] <TASK> ? show_regs+0x6d/0x80 ? __die+0x24/0x80 ? page_fault_oops+0x99/0x1b0 ? do_user_addr_fault+0x2ee/0x6b0 ? exc_page_fault+0x83/0x1b0 ? asm_exc_page_fault+0x27/0x30 ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? lib_sha256_base_do_update.isra.0+0x11e/0x1d0 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] ? __pfx_sha256_transform_rorx+0x10/0x10 [sha256_ssse3] _sha256_update+0x77/0xa0 [sha256_ssse3] sha256_avx2_update+0x15/0x30 [sha256_ssse3] crypto_shash_update+0x1e/0x40 hmac_update+0x12/0x20 crypto_shash_update+0x1e/0x40 generate_key+0x234/0x380 [ksmbd] generate_smb3encryptionkey+0x40/0x1c0 [ksmbd] ksmbd_gen_smb311_encryptionkey+0x72/0xa0 [ksmbd] ntlm_authenticate.isra.0+0x423/0x5d0 [ksmbd] smb2_sess_setup+0x952/0xaa0 [ksmbd] __process_request+0xa3/0x1d0 [ksmbd] __handle_ksmbd_work+0x1c4/0x2f0 [ksmbd] handle_ksmbd_work+0x2d/0xa0 [ksmbd] process_one_work+0x16c/0x350 worker_thread+0x306/0x440 ? __pfx_worker_thread+0x10/0x10 kthread+0xef/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x44/0x70 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> Fixes: f5a544e3bab7 ("ksmbd: add support for SMB3 multichannel") Cc: stable(a)vger.kernel.org # v5.15+ Signed-off-by: Namjae Jeon <linkinjeon(a)kernel.org> Signed-off-by: Steve French <stfrench(a)microsoft.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Long Li <leo.lilong(a)huawei.com> --- fs/ksmbd/smb2pdu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 50ef53115cab..f4aeca5e7e57 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -1704,6 +1704,8 @@ int smb2_sess_setup(struct ksmbd_work *work) rc = ksmbd_session_register(conn, sess); if (rc) goto out_err; + + conn->binding = false; } else if (conn->dialect >= SMB30_PROT_ID && (server_conf.flags & KSMBD_GLOBAL_FLAG_SMB3_MULTICHANNEL) && req->Flags & SMB2_SESSION_REQ_FLAG_BINDING) { @@ -1782,6 +1784,8 @@ int smb2_sess_setup(struct ksmbd_work *work) sess = NULL; goto out_err; } + + conn->binding = false; } work->sess = sess; -- 2.39.2
2 1
0 0
[PATCH OLK-6.6] HID: amd_sfh: free driver_data after destroying hid device
by He Yujie 27 Sep '24

27 Sep '24
From: Olivier Sobrie <olivier(a)sobrie.be> stable inclusion from stable-v6.6.51 commit 60dc4ee0428d70bcbb41436b6729d29f1cbdfb89 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARV9S?from=project-issue CVE: CVE-2024-46746 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 97155021ae17b86985121b33cf8098bcde00d497 ] HID driver callbacks aren't called anymore once hid_destroy_device() has been called. Hence, hid driver_data should be freed only after the hid_destroy_device() function returned as driver_data is used in several callbacks. I observed a crash with kernel 6.10.0 on my T14s Gen 3, after enabling KASAN to debug memory allocation, I got this output: [ 13.050438] ================================================================== [ 13.054060] BUG: KASAN: slab-use-after-free in amd_sfh_get_report+0x3ec/0x530 [amd_sfh] [ 13.054809] psmouse serio1: trackpoint: Synaptics TrackPoint firmware: 0x02, buttons: 3/3 [ 13.056432] Read of size 8 at addr ffff88813152f408 by task (udev-worker)/479 [ 13.060970] CPU: 5 PID: 479 Comm: (udev-worker) Not tainted 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.063978] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.067860] Call Trace: [ 13.069383] input: TPPS/2 Synaptics TrackPoint as /devices/platform/i8042/serio1/input/input8 [ 13.071486] <TASK> [ 13.071492] dump_stack_lvl+0x5d/0x80 [ 13.074870] snd_hda_intel 0000:33:00.6: enabling device (0000 -> 0002) [ 13.078296] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.082199] print_report+0x174/0x505 [ 13.085776] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.089367] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.093255] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.097464] kasan_report+0xc8/0x150 [ 13.101461] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.105802] amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.110303] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.114879] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.119450] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.124097] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.127404] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.131925] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.136455] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.140197] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.143602] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.147234] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.150446] ? __devm_add_action+0x167/0x1d0 [ 13.155061] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.158581] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.161814] platform_probe+0xa2/0x150 [ 13.165029] really_probe+0x1e3/0x8a0 [ 13.168243] __driver_probe_device+0x18c/0x370 [ 13.171500] driver_probe_device+0x4a/0x120 [ 13.175000] __driver_attach+0x190/0x4a0 [ 13.178521] ? __pfx___driver_attach+0x10/0x10 [ 13.181771] bus_for_each_dev+0x106/0x180 [ 13.185033] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.188229] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.191446] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.194382] bus_add_driver+0x29e/0x4d0 [ 13.197328] driver_register+0x1a5/0x360 [ 13.200283] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.203362] do_one_initcall+0xa7/0x380 [ 13.206432] ? __pfx_do_one_initcall+0x10/0x10 [ 13.210175] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.213211] ? kasan_unpoison+0x44/0x70 [ 13.216688] do_init_module+0x238/0x750 [ 13.219696] load_module+0x5011/0x6af0 [ 13.223096] ? kasan_save_stack+0x30/0x50 [ 13.226743] ? kasan_save_track+0x14/0x30 [ 13.230080] ? kasan_save_free_info+0x3b/0x60 [ 13.233323] ? poison_slab_object+0x109/0x180 [ 13.236778] ? __pfx_load_module+0x10/0x10 [ 13.239703] ? poison_slab_object+0x109/0x180 [ 13.243070] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.245924] ? init_module_from_file+0x13d/0x150 [ 13.248745] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.251503] ? init_module_from_file+0xdf/0x150 [ 13.254198] init_module_from_file+0xdf/0x150 [ 13.256826] ? __pfx_init_module_from_file+0x10/0x10 [ 13.259428] ? kasan_save_track+0x14/0x30 [ 13.261959] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.264471] ? kasan_save_free_info+0x3b/0x60 [ 13.267026] ? poison_slab_object+0x109/0x180 [ 13.269494] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.271949] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.274324] ? _raw_spin_lock+0x85/0xe0 [ 13.276671] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.278963] ? __rseq_handle_notify_resume+0x1a6/0xad0 [ 13.281193] idempotent_init_module+0x23b/0x650 [ 13.283420] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.285619] ? __pfx___seccomp_filter+0x10/0x10 [ 13.287714] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.289828] ? __fget_light+0x57/0x420 [ 13.291870] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.293880] ? security_capable+0x74/0xb0 [ 13.295820] __x64_sys_finit_module+0xbe/0x130 [ 13.297874] do_syscall_64+0x82/0x190 [ 13.299898] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.301905] ? irqtime_account_irq+0x3d/0x1f0 [ 13.303877] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.305753] ? __irq_exit_rcu+0x4e/0x130 [ 13.307577] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.309489] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 13.311371] RIP: 0033:0x7a21f96ade9d [ 13.313234] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 63 de 0c 00 f7 d8 64 89 01 48 [ 13.317051] RSP: 002b:00007ffeae934e78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.319024] RAX: ffffffffffffffda RBX: 00005987276bfcf0 RCX: 00007a21f96ade9d [ 13.321100] RDX: 0000000000000004 RSI: 00007a21f8eda376 RDI: 000000000000001c [ 13.323314] RBP: 00007a21f8eda376 R08: 0000000000000001 R09: 00007ffeae934ec0 [ 13.325505] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000 [ 13.327637] R13: 00005987276c1250 R14: 0000000000000000 R15: 00005987276c4530 [ 13.329737] </TASK> [ 13.333945] Allocated by task 139: [ 13.336111] kasan_save_stack+0x30/0x50 [ 13.336121] kasan_save_track+0x14/0x30 [ 13.336125] __kasan_kmalloc+0xaa/0xb0 [ 13.336129] amdtp_hid_probe+0xb1/0x440 [amd_sfh] [ 13.336138] amd_sfh_hid_client_init+0xb8a/0x10f0 [amd_sfh] [ 13.336144] sfh_init_work+0x47/0x120 [amd_sfh] [ 13.336150] process_one_work+0x673/0xeb0 [ 13.336155] worker_thread+0x795/0x1250 [ 13.336160] kthread+0x290/0x350 [ 13.336164] ret_from_fork+0x34/0x70 [ 13.336169] ret_from_fork_asm+0x1a/0x30 [ 13.338175] Freed by task 139: [ 13.340064] kasan_save_stack+0x30/0x50 [ 13.340072] kasan_save_track+0x14/0x30 [ 13.340076] kasan_save_free_info+0x3b/0x60 [ 13.340081] poison_slab_object+0x109/0x180 [ 13.340085] __kasan_slab_free+0x32/0x50 [ 13.340089] kfree+0xe5/0x310 [ 13.340094] amdtp_hid_remove+0xb2/0x160 [amd_sfh] [ 13.340102] amd_sfh_hid_client_deinit+0x324/0x640 [amd_sfh] [ 13.340107] amd_sfh_hid_client_init+0x94a/0x10f0 [amd_sfh] [ 13.340113] sfh_init_work+0x47/0x120 [amd_sfh] [ 13.340118] process_one_work+0x673/0xeb0 [ 13.340123] worker_thread+0x795/0x1250 [ 13.340127] kthread+0x290/0x350 [ 13.340132] ret_from_fork+0x34/0x70 [ 13.340136] ret_from_fork_asm+0x1a/0x30 [ 13.342482] The buggy address belongs to the object at ffff88813152f400 which belongs to the cache kmalloc-64 of size 64 [ 13.347357] The buggy address is located 8 bytes inside of freed 64-byte region [ffff88813152f400, ffff88813152f440) [ 13.347367] The buggy address belongs to the physical page: [ 13.355409] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13152f [ 13.355416] anon flags: 0x2ffff8000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 13.355423] page_type: 0xffffefff(slab) [ 13.355429] raw: 02ffff8000000000 ffff8881000428c0 ffffea0004c43a00 0000000000000005 [ 13.355435] raw: 0000000000000000 0000000000200020 00000001ffffefff 0000000000000000 [ 13.355439] page dumped because: kasan: bad access detected [ 13.357295] Memory state around the buggy address: [ 13.357299] ffff88813152f300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357303] ffff88813152f380: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357306] >ffff88813152f400: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 13.357309] ^ [ 13.357311] ffff88813152f480: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 13.357315] ffff88813152f500: 00 00 00 00 00 00 00 06 fc fc fc fc fc fc fc fc [ 13.357318] ================================================================== [ 13.357405] Disabling lock debugging due to kernel taint [ 13.383534] Oops: general protection fault, probably for non-canonical address 0xe0a1bc4140000013: 0000 [#1] PREEMPT SMP KASAN NOPTI [ 13.383544] KASAN: maybe wild-memory-access in range [0x050e020a00000098-0x050e020a0000009f] [ 13.383551] CPU: 3 PID: 479 Comm: (udev-worker) Tainted: G B 6.10.0-arch1-2 #1 893bb55d7f0073f25c46adbb49eb3785fefd74b0 [ 13.383561] Hardware name: LENOVO 21CQCTO1WW/21CQCTO1WW, BIOS R22ET70W (1.40 ) 03/21/2024 [ 13.383565] RIP: 0010:amd_sfh_get_report+0x81/0x530 [amd_sfh] [ 13.383580] Code: 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 78 03 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b 63 08 49 8d 7c 24 10 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 45 8b 74 24 10 45 [ 13.383585] RSP: 0018:ffff8881261f7388 EFLAGS: 00010212 [ 13.383592] RAX: dffffc0000000000 RBX: ffff88813152f400 RCX: 0000000000000002 [ 13.383597] RDX: 00a1c04140000013 RSI: 0000000000000008 RDI: 050e020a0000009b [ 13.383600] RBP: ffff88814d010000 R08: 0000000000000002 R09: fffffbfff3ddb8c0 [ 13.383604] R10: ffffffff9eedc607 R11: ffff88810ce98000 R12: 050e020a0000008b [ 13.383607] R13: ffff88814d010000 R14: dffffc0000000000 R15: 0000000000000004 [ 13.383611] FS: 00007a21f94d0880(0000) GS:ffff8887e7d80000(0000) knlGS:0000000000000000 [ 13.383615] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 13.383618] CR2: 00007e0014c438f0 CR3: 000000012614c000 CR4: 0000000000f50ef0 [ 13.383622] PKRU: 55555554 [ 13.383625] Call Trace: [ 13.383629] <TASK> [ 13.383632] ? __die_body.cold+0x19/0x27 [ 13.383644] ? die_addr+0x46/0x70 [ 13.383652] ? exc_general_protection+0x150/0x240 [ 13.383664] ? asm_exc_general_protection+0x26/0x30 [ 13.383674] ? amd_sfh_get_report+0x81/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383686] ? amd_sfh_get_report+0x3ec/0x530 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383697] amdtp_hid_request+0xb8/0x110 [amd_sfh 05f43221435b5205f734cd9da29399130f398a38] [ 13.383706] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383713] sensor_hub_get_feature+0x1d3/0x540 [hid_sensor_hub 3f13be3016ff415bea03008d45d99da837ee3082] [ 13.383727] hid_sensor_parse_common_attributes+0x4d0/0xad0 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.383739] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383745] ? __pfx_hid_sensor_parse_common_attributes+0x10/0x10 [hid_sensor_iio_common c3a5cbe93969c28b122609768bbe23efe52eb8f5] [ 13.383753] ? _raw_spin_lock_irqsave+0x96/0xf0 [ 13.383762] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 13.383768] ? devm_iio_device_alloc+0x34/0x50 [industrialio 3d261d5e5765625d2b052be40e526d62b1d2123b] [ 13.383790] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383795] ? __devm_add_action+0x167/0x1d0 [ 13.383806] hid_gyro_3d_probe+0x120/0x7f0 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.383818] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383826] platform_probe+0xa2/0x150 [ 13.383832] really_probe+0x1e3/0x8a0 [ 13.383838] __driver_probe_device+0x18c/0x370 [ 13.383844] driver_probe_device+0x4a/0x120 [ 13.383851] __driver_attach+0x190/0x4a0 [ 13.383857] ? __pfx___driver_attach+0x10/0x10 [ 13.383863] bus_for_each_dev+0x106/0x180 [ 13.383868] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.383874] ? __pfx_bus_for_each_dev+0x10/0x10 [ 13.383880] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383887] bus_add_driver+0x29e/0x4d0 [ 13.383895] driver_register+0x1a5/0x360 [ 13.383902] ? __pfx_hid_gyro_3d_platform_driver_init+0x10/0x10 [hid_sensor_gyro_3d 63da36a143b775846ab2dbb86c343b401b5e3172] [ 13.383910] do_one_initcall+0xa7/0x380 [ 13.383919] ? __pfx_do_one_initcall+0x10/0x10 [ 13.383927] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.383933] ? kasan_unpoison+0x44/0x70 [ 13.383943] do_init_module+0x238/0x750 [ 13.383955] load_module+0x5011/0x6af0 [ 13.383962] ? kasan_save_stack+0x30/0x50 [ 13.383968] ? kasan_save_track+0x14/0x30 [ 13.383973] ? kasan_save_free_info+0x3b/0x60 [ 13.383980] ? poison_slab_object+0x109/0x180 [ 13.383993] ? __pfx_load_module+0x10/0x10 [ 13.384007] ? poison_slab_object+0x109/0x180 [ 13.384012] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384018] ? init_module_from_file+0x13d/0x150 [ 13.384025] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384032] ? init_module_from_file+0xdf/0x150 [ 13.384037] init_module_from_file+0xdf/0x150 [ 13.384044] ? __pfx_init_module_from_file+0x10/0x10 [ 13.384050] ? kasan_save_track+0x14/0x30 [ 13.384055] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384060] ? kasan_save_free_info+0x3b/0x60 [ 13.384066] ? poison_slab_object+0x109/0x180 [ 13.384071] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384080] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384085] ? _raw_spin_lock+0x85/0xe0 [ 13.384091] ? __pfx__raw_spin_lock+0x10/0x10 [ 13.384096] ? __rseq_handle_notify_resume+0x1a6/0xad0 [ 13.384106] idempotent_init_module+0x23b/0x650 [ 13.384114] ? __pfx_idempotent_init_module+0x10/0x10 [ 13.384120] ? __pfx___seccomp_filter+0x10/0x10 [ 13.384129] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384135] ? __fget_light+0x57/0x420 [ 13.384142] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384147] ? security_capable+0x74/0xb0 [ 13.384157] __x64_sys_finit_module+0xbe/0x130 [ 13.384164] do_syscall_64+0x82/0x190 [ 13.384174] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384179] ? irqtime_account_irq+0x3d/0x1f0 [ 13.384188] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384193] ? __irq_exit_rcu+0x4e/0x130 [ 13.384201] ? srso_alias_return_thunk+0x5/0xfbef5 [ 13.384206] entry_SYSCALL_64_after_hwframe+0x76/0x7e [ 13.384212] RIP: 0033:0x7a21f96ade9d [ 13.384263] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 63 de 0c 00 f7 d8 64 89 01 48 [ 13.384267] RSP: 002b:00007ffeae934e78 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 13.384273] RAX: ffffffffffffffda RBX: 00005987276bfcf0 RCX: 00007a21f96ade9d [ 13.384277] RDX: 0000000000000004 RSI: 00007a21f8eda376 RDI: 000000000000001c [ 13.384280] RBP: 00007a21f8eda376 R08: 0000000000000001 R09: 00007ffeae934ec0 [ 13.384284] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000020000 [ 13.384288] R13: 00005987276c1250 R14: 0000000000000000 R15: 00005987276c4530 [ 13.384297] </TASK> [ 13.384299] Modules linked in: soundwire_amd(+) hid_sensor_gyro_3d(+) hid_sensor_magn_3d hid_sensor_accel_3d soundwire_generic_allocation amdxcp hid_sensor_trigger drm_exec industrialio_triggered_buffer soundwire_bus gpu_sched kvm_amd kfifo_buf qmi_helpers joydev drm_buddy hid_sensor_iio_common mousedev snd_soc_core industrialio i2c_algo_bit mac80211 snd_compress drm_suballoc_helper kvm snd_hda_intel drm_ttm_helper ac97_bus snd_pcm_dmaengine snd_intel_dspcfg ttm thinkpad_acpi(+) snd_intel_sdw_acpi hid_sensor_hub snd_rpl_pci_acp6x drm_display_helper snd_hda_codec hid_multitouch libarc4 snd_acp_pci platform_profile think_lmi(+) hid_generic firmware_attributes_class wmi_bmof cec snd_acp_legacy_common sparse_keymap rapl snd_hda_core psmouse cfg80211 pcspkr snd_pci_acp6x snd_hwdep video snd_pcm snd_pci_acp5x snd_timer snd_rn_pci_acp3x ucsi_acpi snd_acp_config snd sp5100_tco rfkill snd_soc_acpi typec_ucsi thunderbolt amd_sfh k10temp mhi soundcore i2c_piix4 snd_pci_acp3x typec i2c_hid_acpi roles i2c_hid wmi acpi_tad amd_pmc [ 13.384454] mac_hid i2c_dev crypto_user loop nfnetlink zram ip_tables x_tables dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel serio_raw sha512_ssse3 atkbd sha256_ssse3 libps2 sha1_ssse3 vivaldi_fmap nvme aesni_intel crypto_simd nvme_core cryptd ccp xhci_pci i8042 nvme_auth xhci_pci_renesas serio vfat fat btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq [ 13.384552] ---[ end trace 0000000000000000 ]--- KASAN reports a use-after-free of hid->driver_data in function amd_sfh_get_report(). The backtrace indicates that the function is called by amdtp_hid_request() which is one of the callbacks of hid device. The current make sure that driver_data is freed only once hid_destroy_device() returned. Note that I observed the crash both on v6.9.9 and v6.10.0. The code seems to be as it was from the early days of the driver. Signed-off-by: Olivier Sobrie <olivier(a)sobrie.be> Acked-by: Basavaraj Natikar <Basavaraj.Natikar(a)amd.com> Signed-off-by: Jiri Kosina <jkosina(a)suse.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c index 705b52337068..81f3024b7b1b 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c @@ -171,11 +171,13 @@ int amdtp_hid_probe(u32 cur_hid_dev, struct amdtp_cl_data *cli_data) void amdtp_hid_remove(struct amdtp_cl_data *cli_data) { int i; + struct amdtp_hid_data *hid_data; for (i = 0; i < cli_data->num_hid_devices; ++i) { if (cli_data->hid_sensor_hubs[i]) { - kfree(cli_data->hid_sensor_hubs[i]->driver_data); + hid_data = cli_data->hid_sensor_hubs[i]->driver_data; hid_destroy_device(cli_data->hid_sensor_hubs[i]); + kfree(hid_data); cli_data->hid_sensor_hubs[i] = NULL; } } -- 2.34.1
2 1
0 0
[openeuler:OLK-6.6 11427/14193] loongarch64-linux-ld: rpm-traces.c:undefined reference to `__trace_trigger_soft_disabled'
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 515984f18a6f359887b37e95ef5a785b04ae2da7 commit: d14435b8c5cdcdadede980b086f439a7d6747d0c [11427/14193] LoongArch: Fix callchain parse error with kernel tracepoint events again config: loongarch-randconfig-002-20240925 (https://download.01.org/0day-ci/archive/20240927/202409271347.SHAKNDVo-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409271347.SHAKNDVo-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/202409271347.SHAKNDVo-lkp@intel.com/ All errors (new ones prefixed by >>): loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L572': power-traces.c:(.text+0x359c): undefined reference to `trace_event_printf' loongarch64-linux-ld: power-traces.c:(.text+0x35c0): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L580': power-traces.c:(.text+0x3678): undefined reference to `trace_print_symbols_seq' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L581': power-traces.c:(.text+0x36ac): undefined reference to `trace_output_call' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L587': power-traces.c:(.text+0x3788): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_raw_output_pm_qos_update': power-traces.c:(.text+0x37dc): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L100011': power-traces.c:(.text+0x39d8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L606': power-traces.c:(.text+0x3a3c): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_wakeup_source': power-traces.c:(.text+0x3ae8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L615': power-traces.c:(.text+0x3b84): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L613': power-traces.c:(.text+0x3c0c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L638': power-traces.c:(.text+0x3f10): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L654': power-traces.c:(.text+0x3fcc): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L659': power-traces.c:(.text+0x40a8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L667': power-traces.c:(.text+0x414c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L678': power-traces.c:(.text+0x4230): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L697': power-traces.c:(.text+0x43f4): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L690': power-traces.c:(.text+0x4420): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: power-traces.c:(.text+0x4474): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L708': power-traces.c:(.text+0x44c8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0xa8): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0xd0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0xf0): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x118): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x138): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x160): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x180): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x1a8): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x1c8): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x1f0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x210): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x238): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x258): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x280): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x2a0): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x2c8): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x2e8): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x310): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x330): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x358): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x378): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x3a0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x3c0): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x3e8): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x408): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/power-traces.o:(.ref.data+0x430): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `trace_raw_output_rpm_internal': rpm-traces.c:(.text+0x2a4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L49': rpm-traces.c:(.text+0x338): undefined reference to `trace_event_printf' loongarch64-linux-ld: rpm-traces.c:(.text+0x358): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `trace_raw_output_rpm_return_int': rpm-traces.c:(.text+0x384): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: rpm-traces.c:(.text+0x3dc): undefined reference to `trace_event_printf' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L55': rpm-traces.c:(.text+0x3fc): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L59': rpm-traces.c:(.text+0x4bc): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L62': rpm-traces.c:(.text+0x514): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `perf_trace_rpm_internal': rpm-traces.c:(.text+0x694): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L83': rpm-traces.c:(.text+0x734): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L96': rpm-traces.c:(.text+0x8a4): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `trace_event_raw_event_rpm_return_int': rpm-traces.c:(.text+0x8d4): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L118': rpm-traces.c:(.text+0x95c): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L101': rpm-traces.c:(.text+0x9c8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L117': rpm-traces.c:(.text+0xa5c): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `trace_event_raw_event_rpm_internal': rpm-traces.c:(.text+0xad4): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/rpm-traces.o: in function `.L130': rpm-traces.c:(.text+0xb5c): undefined reference to `trace_event_buffer_reserve' >> loongarch64-linux-ld: rpm-traces.c:(.text+0xba8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/rpm-traces.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/rpm-traces.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/rpm-traces.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/rpm-traces.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/rseq.o: in function `perf_trace_rseq_update': rseq.c:(.text+0x3d4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/rseq.o: in function `.L34': rseq.c:(.text+0x430): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/rseq.o: in function `perf_trace_rseq_ip_fixup': rseq.c:(.text+0x52c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/rseq.o: in function `.L46': rseq.c:(.text+0x568): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/rseq.o: in function `trace_event_raw_event_rseq_update': rseq.c:(.text+0x650): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/rseq.o: in function `.L61': rseq.c:(.text+0x690): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/rseq.o: in function `.L57': rseq.c:(.text+0x6e8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/rseq.o: in function `trace_event_raw_event_rseq_ip_fixup': rseq.c:(.text+0x770): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: rseq.c:(.text+0x78c): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/rseq.o: in function `.L68': rseq.c:(.text+0x7e8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: rseq.c:(.text+0x81c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/rseq.o: in function `trace_raw_output_rseq_update': rseq.c:(.text+0x878): undefined reference to `trace_event_printf' loongarch64-linux-ld: rseq.c:(.text+0x898): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/rseq.o: in function `.L84': rseq.c:(.text+0x8c4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/rseq.o: in function `trace_raw_output_rseq_ip_fixup': rseq.c:(.text+0x91c): undefined reference to `trace_event_printf' loongarch64-linux-ld: rseq.c:(.text+0x93c): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/rseq.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/rseq.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/rseq.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/rseq.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/filemap.o: in function `perf_trace_mm_filemap_op_page_cache': filemap.c:(.text+0x2ac): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/filemap.o: in function `.L54': filemap.c:(.text+0x390): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/filemap.o: in function `perf_trace_filemap_set_wb_err': filemap.c:(.text+0x494): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/filemap.o: in function `.L68': filemap.c:(.text+0x4e4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/filemap.o: in function `perf_trace_file_check_and_advance_wb_err': filemap.c:(.text+0x5d4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/filemap.o: in function `.L82': filemap.c:(.text+0x638): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/filemap.o: in function `.L94': filemap.c:(.text+0x720): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/filemap.o: in function `.L99': filemap.c:(.text+0x7e4): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/filemap.o: in function `.L95': filemap.c:(.text+0x86c): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/filemap.o: in function `.L96': filemap.c:(.text+0x8e8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/filemap.o: in function `trace_event_raw_event_filemap_set_wb_err': filemap.c:(.text+0x918): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/filemap.o: in function `.L115': filemap.c:(.text+0x988): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/filemap.o: in function `.L116': filemap.c:(.text+0x9f8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/filemap.o: in function `trace_event_raw_event_file_check_and_advance_wb_err': filemap.c:(.text+0xa40): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/filemap.o: in function `.L128': filemap.c:(.text+0xaac): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/filemap.o: in function `.L124': filemap.c:(.text+0xae4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/filemap.o: in function `trace_raw_output_mm_filemap_op_page_cache': filemap.c:(.text+0xb6c): undefined reference to `trace_event_printf' loongarch64-linux-ld: filemap.c:(.text+0xb8c): undefined reference to `trace_handle_return' loongarch64-linux-ld: filemap.c:(.text+0xbb4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/filemap.o: in function `.L142': filemap.c:(.text+0xc20): undefined reference to `trace_event_printf' loongarch64-linux-ld: mm/filemap.o: in function `trace_raw_output_filemap_set_wb_err': filemap.c:(.text+0xc40): undefined reference to `trace_handle_return' loongarch64-linux-ld: filemap.c:(.text+0xc6c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/filemap.o: in function `.L148': filemap.c:(.text+0xce8): undefined reference to `trace_event_printf' loongarch64-linux-ld: mm/filemap.o: in function `trace_raw_output_file_check_and_advance_wb_err': filemap.c:(.text+0xd08): undefined reference to `trace_handle_return' loongarch64-linux-ld: mm/filemap.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/filemap.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/filemap.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/filemap.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/filemap.o:(.ref.data+0xa8): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/filemap.o:(.ref.data+0xd0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_oom_score_adj_update': oom_kill.c:(.text+0x4a0): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/oom_kill.o: in function `.L83': oom_kill.c:(.text+0x4fc): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `.L82': oom_kill.c:(.text+0x578): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_reclaim_retry_zone': oom_kill.c:(.text+0x66c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/oom_kill.o: in function `.L85': oom_kill.c:(.text+0x6c4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_mark_victim': oom_kill.c:(.text+0x7b4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/oom_kill.o: in function `.L97': oom_kill.c:(.text+0x7e4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_wake_reaper': oom_kill.c:(.text+0x8b4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/oom_kill.o: in function `.L109': oom_kill.c:(.text+0x8e4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_start_task_reaping': oom_kill.c:(.text+0x9b4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/oom_kill.o: in function `.L121': oom_kill.c:(.text+0x9e4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_finish_task_reaping': oom_kill.c:(.text+0xab4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: oom_kill.c:(.text+0xae4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_skip_task_reaping': oom_kill.c:(.text+0xbb4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: oom_kill.c:(.text+0xbe4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `perf_trace_compact_retry': oom_kill.c:(.text+0xcdc): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: oom_kill.c:(.text+0xd38): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/oom_kill.o: in function `.L156': oom_kill.c:(.text+0xe0c): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_event_raw_event_oom_score_adj_update': oom_kill.c:(.text+0xe40): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `.L175': oom_kill.c:(.text+0xe8c): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_event_raw_event_reclaim_retry_zone': oom_kill.c:(.text+0xf30): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: oom_kill.c:(.text+0xf6c): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `.L187': oom_kill.c:(.text+0xfe8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `.L183': oom_kill.c:(.text+0x1058): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: oom_kill.c:(.text+0x1068): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_event_raw_event_mark_victim': oom_kill.c:(.text+0x10a8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `.L194': oom_kill.c:(.text+0x1118): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: oom_kill.c:(.text+0x1128): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_event_raw_event_wake_reaper': oom_kill.c:(.text+0x1168): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `.L205': oom_kill.c:(.text+0x11d8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: oom_kill.c:(.text+0x11e8): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `.L206': oom_kill.c:(.text+0x1228): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `.L220': oom_kill.c:(.text+0x1298): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/oom_kill.o: in function `.L216': oom_kill.c:(.text+0x12a8): undefined reference to `trace_event_buffer_commit' >> loongarch64-linux-ld: oom_kill.c:(.text+0x12e8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_event_raw_event_finish_task_reaping': oom_kill.c:(.text+0x1358): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/oom_kill.o: in function `.L231': oom_kill.c:(.text+0x1368): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `.L227': oom_kill.c:(.text+0x13a8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/oom_kill.o: in function `.L242': oom_kill.c:(.text+0x1438): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/oom_kill.o: in function `.L238': oom_kill.c:(.text+0x1474): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_event_raw_event_compact_retry': oom_kill.c:(.text+0x14ec): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: oom_kill.c:(.text+0x1524): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `.L249': oom_kill.c:(.text+0x1578): undefined reference to `trace_event_printf' loongarch64-linux-ld: oom_kill.c:(.text+0x1598): undefined reference to `trace_handle_return' loongarch64-linux-ld: oom_kill.c:(.text+0x15c4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_oom_score_adj_update': oom_kill.c:(.text+0x1610): undefined reference to `trace_event_printf' loongarch64-linux-ld: oom_kill.c:(.text+0x1630): undefined reference to `trace_handle_return' loongarch64-linux-ld: oom_kill.c:(.text+0x165c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_mark_victim': oom_kill.c:(.text+0x16b0): undefined reference to `trace_event_printf' loongarch64-linux-ld: oom_kill.c:(.text+0x16d0): undefined reference to `trace_handle_return' loongarch64-linux-ld: oom_kill.c:(.text+0x16fc): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_wake_reaper': oom_kill.c:(.text+0x1750): undefined reference to `trace_event_printf' loongarch64-linux-ld: oom_kill.c:(.text+0x1770): undefined reference to `trace_handle_return' loongarch64-linux-ld: oom_kill.c:(.text+0x179c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `.L280': oom_kill.c:(.text+0x17f0): undefined reference to `trace_event_printf' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_start_task_reaping': oom_kill.c:(.text+0x1810): undefined reference to `trace_handle_return' loongarch64-linux-ld: oom_kill.c:(.text+0x183c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `.L286': oom_kill.c:(.text+0x1890): undefined reference to `trace_event_printf' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_finish_task_reaping': oom_kill.c:(.text+0x18b0): undefined reference to `trace_handle_return' loongarch64-linux-ld: oom_kill.c:(.text+0x18dc): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `.L292': oom_kill.c:(.text+0x1938): undefined reference to `trace_print_symbols_seq' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_skip_task_reaping': oom_kill.c:(.text+0x1970): undefined reference to `trace_event_printf' loongarch64-linux-ld: oom_kill.c:(.text+0x1994): undefined reference to `trace_handle_return' loongarch64-linux-ld: mm/oom_kill.o: in function `.L298': oom_kill.c:(.text+0x19bc): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/oom_kill.o: in function `trace_raw_output_reclaim_retry_zone': oom_kill.c:(.text+0x1a28): undefined reference to `trace_print_symbols_seq' loongarch64-linux-ld: oom_kill.c:(.text+0x1a40): undefined reference to `trace_print_symbols_seq' loongarch64-linux-ld: mm/oom_kill.o: in function `.L304': oom_kill.c:(.text+0x1a68): undefined reference to `trace_event_printf' loongarch64-linux-ld: oom_kill.c:(.text+0x1a94): undefined reference to `trace_handle_return' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0xa8): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0xd0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0xf0): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x118): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x138): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x160): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x180): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x1a8): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x1c8): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x1f0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x210): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/oom_kill.o:(.ref.data+0x238): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: mm/swap.o: in function `.L20': swap.c:(.text+0x13c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: swap.c:(.text+0x1dc): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/swap.o: in function `.L32': swap.c:(.text+0x2d4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: mm/swap.o: in function `.L38': swap.c:(.text+0x42c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: mm/swap.o: in function `trace_event_raw_event_mm_lru_insertion': swap.c:(.text+0x560): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/swap.o: in function `.L63': swap.c:(.text+0x69c): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/swap.o: in function `.L75': swap.c:(.text+0x72c): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: mm/swap.o: in function `trace_event_raw_event_mm_lru_activate': swap.c:(.text+0x7c0): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: mm/swap.o: in function `.L80': swap.c:(.text+0x844): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: mm/swap.o: in function `.L76': swap.c:(.text+0x8ac): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: swap.c:(.text+0x8e4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/swap.o: in function `.L105': swap.c:(.text+0x978): undefined reference to `trace_event_printf' loongarch64-linux-ld: mm/swap.o: in function `.L107': swap.c:(.text+0x998): undefined reference to `trace_handle_return' loongarch64-linux-ld: mm/swap.o: in function `.L102': swap.c:(.text+0xa64): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: mm/swap.o: in function `.L100': swap.c:(.text+0xab4): undefined reference to `trace_event_printf' loongarch64-linux-ld: mm/swap.o: in function `trace_raw_output_mm_lru_activate': swap.c:(.text+0xad4): undefined reference to `trace_handle_return' loongarch64-linux-ld: mm/swap.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: mm/swap.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 17806/23779] drivers/powercap/intel_rapl_msr.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: f9510969035e796a27375a80d9d6489440e17a1a commit: 0ea5d304521b68fb459c57e55f3f1bd853127bc7 [17806/23779] intel_rapl: abstract RAPL common code config: x86_64-buildonly-randconfig-001-20240926 (https://download.01.org/0day-ci/archive/20240927/202409271226.X7vYNpq3-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409271226.X7vYNpq3-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/202409271226.X7vYNpq3-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/powercap/intel_rapl_msr.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 11316/30000] arch/arm64/mm/init.c:730:6: sparse: sparse: symbol 'ascend_enable_all_features' was not declared. Should it be static?
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6be8d57e8dd89fb93f6a1801c246e70ae85fbfaf commit: 66ae8ddda388386daea0623a65ea2ac85c24ca00 [11316/30000] ascend/arm64: Add ascend_enable_all kernel parameter config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240927/202409271256.FaGlmrJY-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240927/202409271256.FaGlmrJY-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/202409271256.FaGlmrJY-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) arch/arm64/mm/init.c:746:9: sparse: sparse: mixing declarations and code >> arch/arm64/mm/init.c:730:6: sparse: sparse: symbol 'ascend_enable_all_features' was not declared. Should it be static? vim +/ascend_enable_all_features +730 arch/arm64/mm/init.c 729 > 730 void ascend_enable_all_features(void) 731 { 732 if (IS_ENABLED(CONFIG_ASCEND_DVPP_MMAP)) 733 enable_mmap_dvpp = 1; 734 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 13350/23779] ld.lld: error: undefined symbol: kfree_skb
by kernel test robot 27 Sep '24

27 Sep '24
Hi Zhao, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: f9510969035e796a27375a80d9d6489440e17a1a commit: 6636f4434a9c5c9c645694db206188ee5a6626dd [13350/23779] ext4: report error to userspace by netlink config: x86_64-buildonly-randconfig-002-20240927 (https://download.01.org/0day-ci/archive/20240927/202409271130.zkdDo9UH-lkp@…) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409271130.zkdDo9UH-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/202409271130.zkdDo9UH-lkp@intel.com/ All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: __alloc_skb >>> referenced by super.c >>> fs/ext4/super.o:(ext4_netlink_send_info) in archive built-in.a -- >> ld.lld: error: undefined symbol: kfree_skb >>> referenced by super.c >>> fs/ext4/super.o:(ext4_netlink_send_info) in archive built-in.a -- >> ld.lld: error: undefined symbol: __nlmsg_put >>> referenced by super.c >>> fs/ext4/super.o:(ext4_netlink_send_info) in archive built-in.a -- >> ld.lld: error: undefined symbol: netlink_broadcast >>> referenced by super.c >>> fs/ext4/super.o:(ext4_netlink_send_info) in archive built-in.a -- >> ld.lld: error: undefined symbol: init_net >>> referenced by super.c >>> fs/ext4/super.o:(ext4_init_fs) in archive built-in.a -- >> ld.lld: error: undefined symbol: __netlink_kernel_create >>> referenced by super.c >>> fs/ext4/super.o:(ext4_init_fs) in archive built-in.a -- >> ld.lld: error: undefined symbol: netlink_kernel_release >>> referenced by super.c >>> fs/ext4/super.o:(ext4_exit_fs) in archive built-in.a -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] scsi: aacraid: Fix double-free on probe failure
by Zheng Qixing 27 Sep '24

27 Sep '24
From: Ben Hutchings <benh(a)debian.org> stable inclusion from stable-v4.19.321 commit d237c7d06ffddcdb5d36948c527dc01284388218 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR60F CVE: CVE-2024-46673 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 919ddf8336f0b84c0453bac583808c9f165a85c2 ] aac_probe_one() calls hardware-specific init functions through the aac_driver_ident::init pointer, all of which eventually call down to aac_init_adapter(). If aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear that member. After the hardware-specific init function returns an error, aac_probe_one() goes down an error path that frees the memory pointed to by aac_dev::queues, resulting.in a double-free. Reported-by: Michael Gordon <m.gordon.zelenoborsky(a)gmail.com> Link: https://bugs.debian.org/1075855 Fixes: 8e0c5ebde82b ("[SCSI] aacraid: Newer adapter communication iterface support") Signed-off-by: Ben Hutchings <benh(a)debian.org> Link: https://lore.kernel.org/r/ZsZvfqlQMveoL5KQ@decadent.org.uk Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zheng Qixing <zhengqixing(a)huawei.com> --- drivers/scsi/aacraid/comminit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 0dc7b5a4fea2..0378fd3eb039 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -652,6 +652,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) if (aac_comm_init(dev)<0){ kfree(dev->queues); + dev->queues = NULL; return NULL; } /* @@ -659,6 +660,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) */ if (aac_fib_setup(dev) < 0) { kfree(dev->queues); + dev->queues = NULL; return NULL; } -- 2.39.2
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] scsi: aacraid: Fix double-free on probe failure
by Zheng Qixing 27 Sep '24

27 Sep '24
From: Ben Hutchings <benh(a)debian.org> stable inclusion from stable-v5.10.225 commit 9e96dea7eff6f2bbcd0b42a098012fc66af9eb69 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR60F CVE: CVE-2024-46673 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 919ddf8336f0b84c0453bac583808c9f165a85c2 ] aac_probe_one() calls hardware-specific init functions through the aac_driver_ident::init pointer, all of which eventually call down to aac_init_adapter(). If aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear that member. After the hardware-specific init function returns an error, aac_probe_one() goes down an error path that frees the memory pointed to by aac_dev::queues, resulting.in a double-free. Reported-by: Michael Gordon <m.gordon.zelenoborsky(a)gmail.com> Link: https://bugs.debian.org/1075855 Fixes: 8e0c5ebde82b ("[SCSI] aacraid: Newer adapter communication iterface support") Signed-off-by: Ben Hutchings <benh(a)debian.org> Link: https://lore.kernel.org/r/ZsZvfqlQMveoL5KQ@decadent.org.uk Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zheng Qixing <zhengqixing(a)huawei.com> --- drivers/scsi/aacraid/comminit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 355b16f0b145..34e45c87cae0 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -642,6 +642,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) if (aac_comm_init(dev)<0){ kfree(dev->queues); + dev->queues = NULL; return NULL; } /* @@ -649,6 +650,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) */ if (aac_fib_setup(dev) < 0) { kfree(dev->queues); + dev->queues = NULL; return NULL; } -- 2.39.2
2 1
0 0
[PATCH OLK-5.10] scsi: aacraid: Fix double-free on probe failure
by Zheng Qixing 27 Sep '24

27 Sep '24
From: Ben Hutchings <benh(a)debian.org> stable inclusion from stable-v5.10.225 commit 9e96dea7eff6f2bbcd0b42a098012fc66af9eb69 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR60F CVE: CVE-2024-46673 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 919ddf8336f0b84c0453bac583808c9f165a85c2 ] aac_probe_one() calls hardware-specific init functions through the aac_driver_ident::init pointer, all of which eventually call down to aac_init_adapter(). If aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear that member. After the hardware-specific init function returns an error, aac_probe_one() goes down an error path that frees the memory pointed to by aac_dev::queues, resulting.in a double-free. Reported-by: Michael Gordon <m.gordon.zelenoborsky(a)gmail.com> Link: https://bugs.debian.org/1075855 Fixes: 8e0c5ebde82b ("[SCSI] aacraid: Newer adapter communication iterface support") Signed-off-by: Ben Hutchings <benh(a)debian.org> Link: https://lore.kernel.org/r/ZsZvfqlQMveoL5KQ@decadent.org.uk Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zheng Qixing <zhengqixing(a)huawei.com> --- drivers/scsi/aacraid/comminit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 355b16f0b145..34e45c87cae0 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -642,6 +642,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) if (aac_comm_init(dev)<0){ kfree(dev->queues); + dev->queues = NULL; return NULL; } /* @@ -649,6 +650,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) */ if (aac_fib_setup(dev) < 0) { kfree(dev->queues); + dev->queues = NULL; return NULL; } -- 2.39.2
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1 0/3] CVE-2022-48878
by Yuan Can 27 Sep '24

27 Sep '24
Fix patch of CVE-2022-48878 and its pre requests. Krzysztof Kozlowski (1): Bluetooth: hci_qca: Fix driver shutdown on closed serdev Venkata Lakshmi Narayana Gubba (1): Bluetooth: hci_qca: Wait for timeout during suspend Yang Yingliang (1): Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave() drivers/bluetooth/hci_qca.c | 57 ++++++++++++++++++++++++++++++------- 1 file changed, 47 insertions(+), 10 deletions(-) -- 2.17.1
2 4
0 0
[PATCH OLK-6.6] scsi: aacraid: Fix double-free on probe failure
by Zheng Qixing 27 Sep '24

27 Sep '24
From: Ben Hutchings <benh(a)debian.org> stable inclusion from stable-v6.6.49 commit 8a3995a3ffeca280a961b59f5c99843d81b15929 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR60F CVE: CVE-2024-46673 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- aac_probe_one() calls hardware-specific init functions through the aac_driver_ident::init pointer, all of which eventually call down to aac_init_adapter(). If aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear that member. After the hardware-specific init function returns an error, aac_probe_one() goes down an error path that frees the memory pointed to by aac_dev::queues, resulting.in a double-free. Reported-by: Michael Gordon <m.gordon.zelenoborsky(a)gmail.com> Link: https://bugs.debian.org/1075855 Fixes: 8e0c5ebde82b ("[SCSI] aacraid: Newer adapter communication iterface support") Signed-off-by: Ben Hutchings <benh(a)debian.org> Link: https://lore.kernel.org/r/ZsZvfqlQMveoL5KQ@decadent.org.uk Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com> Signed-off-by: Zheng Qixing <zhengqixing(a)huawei.com> --- drivers/scsi/aacraid/comminit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index bd99c5492b7d..0f64b0244303 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -642,6 +642,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) if (aac_comm_init(dev)<0){ kfree(dev->queues); + dev->queues = NULL; return NULL; } /* @@ -649,6 +650,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) */ if (aac_fib_setup(dev) < 0) { kfree(dev->queues); + dev->queues = NULL; return NULL; } -- 2.39.2
2 1
0 0
[PATCH OLK-6.6] tracing/osnoise: Use a cpumask to know what threads are kthreads
by Zheng Yejian 27 Sep '24

27 Sep '24
From: Steven Rostedt <rostedt(a)goodmis.org> stable inclusion from stable-v6.6.51 commit 7a5f01828edf152c144d27cf63de446fdf2dc222 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARYEK CVE: CVE-2024-46788 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- commit 177e1cc2f41235c145041eed03ef5bab18f32328 upstream. The start_kthread() and stop_thread() code was not always called with the interface_lock held. This means that the kthread variable could be unexpectedly changed causing the kthread_stop() to be called on it when it should not have been, leading to: while true; do rtla timerlat top -u -q & PID=$!; sleep 5; kill -INT $PID; sleep 0.001; kill -TERM $PID; wait $PID; done Causing the following OOPS: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 5 UID: 0 PID: 885 Comm: timerlatu/5 Not tainted 6.11.0-rc4-test-00002-gbc754cc76d1b-dirty #125 a533010b71dab205ad2f507188ce8c82203b0254 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:hrtimer_active+0x58/0x300 Code: 48 c1 ee 03 41 54 48 01 d1 48 01 d6 55 53 48 83 ec 20 80 39 00 0f 85 30 02 00 00 49 8b 6f 30 4c 8d 75 10 4c 89 f0 48 c1 e8 03 <0f> b6 3c 10 4c 89 f0 83 e0 07 83 c0 03 40 38 f8 7c 09 40 84 ff 0f RSP: 0018:ffff88811d97f940 EFLAGS: 00010202 RAX: 0000000000000002 RBX: ffff88823c6b5b28 RCX: ffffed10478d6b6b RDX: dffffc0000000000 RSI: ffffed10478d6b6c RDI: ffff88823c6b5b28 RBP: 0000000000000000 R08: ffff88823c6b5b58 R09: ffff88823c6b5b60 R10: ffff88811d97f957 R11: 0000000000000010 R12: 00000000000a801d R13: ffff88810d8b35d8 R14: 0000000000000010 R15: ffff88823c6b5b28 FS: 0000000000000000(0000) GS:ffff88823c680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000561858ad7258 CR3: 000000007729e001 CR4: 0000000000170ef0 Call Trace: <TASK> ? die_addr+0x40/0xa0 ? exc_general_protection+0x154/0x230 ? asm_exc_general_protection+0x26/0x30 ? hrtimer_active+0x58/0x300 ? __pfx_mutex_lock+0x10/0x10 ? __pfx_locks_remove_file+0x10/0x10 hrtimer_cancel+0x15/0x40 timerlat_fd_release+0x8e/0x1f0 ? security_file_release+0x43/0x80 __fput+0x372/0xb10 task_work_run+0x11e/0x1f0 ? _raw_spin_lock+0x85/0xe0 ? __pfx_task_work_run+0x10/0x10 ? poison_slab_object+0x109/0x170 ? do_exit+0x7a0/0x24b0 do_exit+0x7bd/0x24b0 ? __pfx_migrate_enable+0x10/0x10 ? __pfx_do_exit+0x10/0x10 ? __pfx_read_tsc+0x10/0x10 ? ktime_get+0x64/0x140 ? _raw_spin_lock_irq+0x86/0xe0 do_group_exit+0xb0/0x220 get_signal+0x17ba/0x1b50 ? vfs_read+0x179/0xa40 ? timerlat_fd_read+0x30b/0x9d0 ? __pfx_get_signal+0x10/0x10 ? __pfx_timerlat_fd_read+0x10/0x10 arch_do_signal_or_restart+0x8c/0x570 ? __pfx_arch_do_signal_or_restart+0x10/0x10 ? vfs_read+0x179/0xa40 ? ksys_read+0xfe/0x1d0 ? __pfx_ksys_read+0x10/0x10 syscall_exit_to_user_mode+0xbc/0x130 do_syscall_64+0x74/0x110 ? __pfx___rseq_handle_notify_resume+0x10/0x10 ? __pfx_ksys_read+0x10/0x10 ? fpregs_restore_userregs+0xdb/0x1e0 ? fpregs_restore_userregs+0xdb/0x1e0 ? syscall_exit_to_user_mode+0x116/0x130 ? do_syscall_64+0x74/0x110 ? do_syscall_64+0x74/0x110 ? do_syscall_64+0x74/0x110 entry_SYSCALL_64_after_hwframe+0x71/0x79 RIP: 0033:0x7ff0070eca9c Code: Unable to access opcode bytes at 0x7ff0070eca72. RSP: 002b:00007ff006dff8c0 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007ff0070eca9c RDX: 0000000000000400 RSI: 00007ff006dff9a0 RDI: 0000000000000003 RBP: 00007ff006dffde0 R08: 0000000000000000 R09: 00007ff000000ba0 R10: 00007ff007004b08 R11: 0000000000000246 R12: 0000000000000003 R13: 00007ff006dff9a0 R14: 0000000000000007 R15: 0000000000000008 </TASK> Modules linked in: snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hwdep snd_hda_core ---[ end trace 0000000000000000 ]--- This is because it would mistakenly call kthread_stop() on a user space thread making it "exit" before it actually exits. Since kthreads are created based on global behavior, use a cpumask to know when kthreads are running and that they need to be shutdown before proceeding to do new work. Link: https://lore.kernel.org/all/20240820130001.124768-1-tglozar@redhat.com/ This was debugged by using the persistent ring buffer: Link: https://lore.kernel.org/all/20240823013902.135036960@goodmis.org/ Note, locking was originally used to fix this, but that proved to cause too many deadlocks to work around: https://lore.kernel.org/linux-trace-kernel/20240823102816.5e55753b@gandalf.… Cc: stable(a)vger.kernel.org Cc: Masami Hiramatsu <mhiramat(a)kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers(a)efficios.com> Cc: "Luis Claudio R. Goncalves" <lgoncalv(a)redhat.com> Link: https://lore.kernel.org/20240904103428.08efdf4c@gandalf.local.home Fixes: e88ed227f639e ("tracing/timerlat: Add user-space interface") Reported-by: Tomas Glozar <tglozar(a)redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt(a)goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: Zheng Yejian <zhengyejian1(a)huawei.com> --- kernel/trace/trace_osnoise.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c index a8e28f9b9271..49f10c7f7fd0 100644 --- a/kernel/trace/trace_osnoise.c +++ b/kernel/trace/trace_osnoise.c @@ -1612,6 +1612,7 @@ static int run_osnoise(void) static struct cpumask osnoise_cpumask; static struct cpumask save_cpumask; +static struct cpumask kthread_cpumask; /* * osnoise_sleep - sleep until the next period @@ -1675,6 +1676,7 @@ static inline int osnoise_migration_pending(void) */ mutex_lock(&interface_lock); this_cpu_osn_var()->kthread = NULL; + cpumask_clear_cpu(smp_processor_id(), &kthread_cpumask); mutex_unlock(&interface_lock); return 1; @@ -1947,9 +1949,10 @@ static void stop_kthread(unsigned int cpu) kthread = per_cpu(per_cpu_osnoise_var, cpu).kthread; if (kthread) { - if (test_bit(OSN_WORKLOAD, &osnoise_options)) { + if (cpumask_test_and_clear_cpu(cpu, &kthread_cpumask) && + !WARN_ON(!test_bit(OSN_WORKLOAD, &osnoise_options))) { kthread_stop(kthread); - } else { + } else if (!WARN_ON(test_bit(OSN_WORKLOAD, &osnoise_options))) { /* * This is a user thread waiting on the timerlat_fd. We need * to close all users, and the best way to guarantee this is @@ -2021,6 +2024,7 @@ static int start_kthread(unsigned int cpu) } per_cpu(per_cpu_osnoise_var, cpu).kthread = kthread; + cpumask_set_cpu(cpu, &kthread_cpumask); return 0; } @@ -2048,8 +2052,16 @@ static int start_per_cpu_kthreads(void) */ cpumask_and(current_mask, cpu_online_mask, &osnoise_cpumask); - for_each_possible_cpu(cpu) + for_each_possible_cpu(cpu) { + if (cpumask_test_and_clear_cpu(cpu, &kthread_cpumask)) { + struct task_struct *kthread; + + kthread = per_cpu(per_cpu_osnoise_var, cpu).kthread; + if (!WARN_ON(!kthread)) + kthread_stop(kthread); + } per_cpu(per_cpu_osnoise_var, cpu).kthread = NULL; + } for_each_cpu(cpu, current_mask) { retval = start_kthread(cpu); -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] wifi: rtw88: usb: schedule rx work after everything is set up
by Chen Zhongjin 27 Sep '24

27 Sep '24
From: Marcin Ślusarz <mslusarz(a)renau.com> mainline inclusion from mainline-v6.11-rc1 commit adc539784c98a7cc602cbf557debfc2e7b9be8b3 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARYFO CVE: CVE-2024-46760 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- Right now it's possible to hit NULL pointer dereference in rtw_rx_fill_rx_status on hw object and/or its fields because initialization routine can start getting USB replies before rtw_dev is fully setup. The stack trace looks like this: rtw_rx_fill_rx_status rtw8821c_query_rx_desc rtw_usb_rx_handler ... queue_work rtw_usb_read_port_complete ... usb_submit_urb rtw_usb_rx_resubmit rtw_usb_init_rx rtw_usb_probe So while we do the async stuff rtw_usb_probe continues and calls rtw_register_hw, which does all kinds of initialization (e.g. via ieee80211_register_hw) that rtw_rx_fill_rx_status relies on. Fix this by moving the first usb_submit_urb after everything is set up. For me, this bug manifested as: [ 8.893177] rtw_8821cu 1-1:1.2: band wrong, packet dropped [ 8.910904] rtw_8821cu 1-1:1.2: hw->conf.chandef.chan NULL in rtw_rx_fill_rx_status because I'm using Larry's backport of rtw88 driver with the NULL checks in rtw_rx_fill_rx_status. Link: https://lore.kernel.org/linux-wireless/CA+shoWQ7P49jhQasofDcTdQhiuarPTjYEDa… Signed-off-by: Marcin Ślusarz <mslusarz(a)renau.com> Cc: Tim K <tpkuester(a)gmail.com> Cc: Ping-Ke Shih <pkshih(a)realtek.com> Cc: Larry Finger <Larry.Finger(a)lwfinger.net> Cc: Kalle Valo <kvalo(a)kernel.org> Cc: linux-wireless(a)vger.kernel.org Cc: linux-kernel(a)vger.kernel.org Signed-off-by: Ping-Ke Shih <pkshih(a)realtek.com> Link: https://patch.msgid.link/20240528110246.477321-1-marcin.slusarz@gmail.com Signed-off-by: Chen Zhongjin <chenzhongjin(a)huawei.com> --- drivers/net/wireless/realtek/rtw88/usb.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/usb.c b/drivers/net/wireless/realtek/rtw88/usb.c index efd0c2915a05..04a64afcbf8a 100644 --- a/drivers/net/wireless/realtek/rtw88/usb.c +++ b/drivers/net/wireless/realtek/rtw88/usb.c @@ -742,7 +742,6 @@ static struct rtw_hci_ops rtw_usb_ops = { static int rtw_usb_init_rx(struct rtw_dev *rtwdev) { struct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev); - int i; rtwusb->rxwq = create_singlethread_workqueue("rtw88_usb: rx wq"); if (!rtwusb->rxwq) { @@ -754,13 +753,19 @@ static int rtw_usb_init_rx(struct rtw_dev *rtwdev) INIT_WORK(&rtwusb->rx_work, rtw_usb_rx_handler); + return 0; +} + +static void rtw_usb_setup_rx(struct rtw_dev *rtwdev) +{ + struct rtw_usb *rtwusb = rtw_get_usb_priv(rtwdev); + int i; + for (i = 0; i < RTW_USB_RXCB_NUM; i++) { struct rx_usb_ctrl_block *rxcb = &rtwusb->rx_cb[i]; rtw_usb_rx_resubmit(rtwusb, rxcb); } - - return 0; } static void rtw_usb_deinit_rx(struct rtw_dev *rtwdev) @@ -897,6 +902,8 @@ int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) goto err_destroy_rxwq; } + rtw_usb_setup_rx(rtwdev); + return 0; err_destroy_rxwq: -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
by Tong Tiangen 27 Sep '24

27 Sep '24
From: Guenter Roeck <linux(a)roeck-us.net> stable inclusion from stable-v5.10.226 commit 56cfdeb2c77291f0b5e4592731adfb6ca8fc7c24 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARX5F CVE: CVE-2024-46756 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 5c1de37969b7bc0abcb20b86e91e70caebbd4f89 ] DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large negative number such as -9223372036854775808 is provided by the user. Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations. Signed-off-by: Guenter Roeck <linux(a)roeck-us.net> Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Tong Tiangen <tongtiangen(a)huawei.com> --- drivers/hwmon/w83627ehf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 3964ceab2817..acf36862851a 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c @@ -897,7 +897,7 @@ store_target_temp(struct device *dev, struct device_attribute *attr, if (err < 0) return err; - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 127); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 127000), 1000); mutex_lock(&data->update_lock); data->target_temp[nr] = val; @@ -922,7 +922,7 @@ store_tolerance(struct device *dev, struct device_attribute *attr, return err; /* Limit the temp to 0C - 15C */ - val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 15); + val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 15000), 1000); mutex_lock(&data->update_lock); reg = w83627ehf_read_value(data, W83627EHF_REG_TOLERANCE[nr]); -- 2.25.1
2 1
0 0
[openeuler:OLK-5.10 5206/30000] drivers/gpu/drm/radeon/radeon_vce.c:247:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 6be8d57e8dd89fb93f6a1801c246e70ae85fbfaf commit: ec4ae62c07d56281aacec51770e0453414a76ded [5206/30000] sw64: gpu/drm: solve driver load cause kernel crash config: arm64-randconfig-r131-20240925 (https://download.01.org/0day-ci/archive/20240927/202409270508.u8KdTEFv-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20240927/202409270508.u8KdTEFv-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/202409270508.u8KdTEFv-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/radeon/radeon_vce.c:247:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem * @@ got void *[addressable] cpu_addr @@ drivers/gpu/drm/radeon/radeon_vce.c:247:25: sparse: expected void volatile [noderef] __iomem * drivers/gpu/drm/radeon/radeon_vce.c:247:25: sparse: got void *[addressable] cpu_addr drivers/gpu/drm/radeon/radeon_vce.c:368:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:368:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:368:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:369:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:369:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:369:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:370:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:370:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:370:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:372:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:372:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:372:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:373:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:373:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:373:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:374:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:374:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:374:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:375:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:375:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:375:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:376:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:376:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:376:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:377:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:377:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:377:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:378:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:378:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:378:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:379:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:379:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:379:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:380:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:380:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:380:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:381:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:381:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:381:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:382:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:382:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:382:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:383:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:383:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:383:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:385:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:385:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:385:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:386:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:386:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:386:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:387:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:387:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:387:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:388:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:388:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:388:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:389:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:389:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:389:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:392:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:392:27: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:392:27: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:435:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:435:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:435:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:436:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:436:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:436:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:437:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:437:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:437:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:439:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:439:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:439:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:440:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:440:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:440:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:441:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:441:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:441:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:442:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:442:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:442:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:443:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:443:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:443:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:445:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:445:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:445:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:446:32: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:446:32: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:446:32: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:449:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:449:27: sparse: expected unsigned int [usertype] drivers/gpu/drm/radeon/radeon_vce.c:449:27: sparse: got restricted __le32 [usertype] drivers/gpu/drm/radeon/radeon_vce.c:706:33: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] v @@ got restricted __le32 [usertype] @@ drivers/gpu/drm/radeon/radeon_vce.c:706:33: sparse: expected unsigned int [usertype] v vim +247 drivers/gpu/drm/radeon/radeon_vce.c 214 215 /** 216 * radeon_vce_resume - pin VCE fw memory 217 * 218 * @rdev: radeon_device pointer 219 * 220 */ 221 int radeon_vce_resume(struct radeon_device *rdev) 222 { 223 void *cpu_addr; 224 int r; 225 226 if (rdev->vce.vcpu_bo == NULL) 227 return -EINVAL; 228 229 r = radeon_bo_reserve(rdev->vce.vcpu_bo, false); 230 if (r) { 231 dev_err(rdev->dev, "(%d) failed to reserve VCE bo\n", r); 232 return r; 233 } 234 235 r = radeon_bo_kmap(rdev->vce.vcpu_bo, &cpu_addr); 236 if (r) { 237 radeon_bo_unreserve(rdev->vce.vcpu_bo); 238 dev_err(rdev->dev, "(%d) VCE map failed\n", r); 239 return r; 240 } 241 242 memset(cpu_addr, 0, radeon_bo_size(rdev->vce.vcpu_bo)); 243 if (rdev->family < CHIP_BONAIRE) 244 r = vce_v1_0_load_fw(rdev, cpu_addr); 245 else { 246 if (IS_ENABLED(CONFIG_SW64)) > 247 memcpy_toio(cpu_addr, rdev->vce_fw->data, rdev->vce_fw->size); 248 else 249 memcpy(cpu_addr, rdev->vce_fw->data, rdev->vce_fw->size); 250 } 251 252 radeon_bo_kunmap(rdev->vce.vcpu_bo); 253 254 radeon_bo_unreserve(rdev->vce.vcpu_bo); 255 256 return r; 257 } 258 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 9419/14172] main.c:undefined reference to `perf_trace_run_bpf_submit'
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 2e95e7bae9486cc775ed2aa319bf323f6ba2677b commit: c03a541494af4fb1504917412d762247b90380da [9419/14172] LoongArch: Fix callchain parse error with kernel tracepoint events config: loongarch-randconfig-002-20240925 (https://download.01.org/0day-ci/archive/20240927/202409270442.VcOKC2UZ-lkp@…) compiler: loongarch64-linux-gcc (GCC) 14.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409270442.VcOKC2UZ-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/202409270442.VcOKC2UZ-lkp@intel.com/ All errors (new ones prefixed by >>): loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/oom_kill.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/oom_kill.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/swap.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/vmscan.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/vmscan.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/percpu.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/percpu.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/slab_common.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/slab_common.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/compaction.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/compaction.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/mmap_lock.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/mmap.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/rmap.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/rmap.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/vmalloc.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/huge_memory.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `mm/khugepaged.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/khugepaged.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/page_isolation.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/cma.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `mm/damon/core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `fs/fs-writeback.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/fs-writeback.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/locks.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/iomap/trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `fs/ext4/super.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/ext4/super.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/ext2/trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/jbd2/journal.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `fs/xfs/xfs_trace.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/xfs/xfs_trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `fs/xfs/scrub/trace.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/xfs/scrub/trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `fs/btrfs/super.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/btrfs/super.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/gfs2/glock.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `fs/f2fs/super.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/f2fs/super.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `fs/zonefs/super.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `block/blk-core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `block/blk-iocost.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `block/blk-wbt.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `io_uring/io_uring.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpio/gpiolib.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/clk/clk.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/dma/tegra20-apb-dma.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/soc/qcom/rpmh-rsc.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/regulator/core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/iommu/iommu-traces.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/host1x/dev.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/drm_trace_points.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/scheduler/sched_main.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/radeon/radeon_trace_points.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/v3d/v3d_trace_points.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/msm/disp/dpu1/dpu_kms.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/msm/msm_atomic_tracepoints.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/msm/msm_gpu_tracepoints.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/tegra/trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/gpu/drm/lima/lima_trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/base/regmap/regmap.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/dma-buf/dma-fence.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/dma-buf/sw_sync.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/scsi/scsi.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/scsi/sd_zbc.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/nvme/host/core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/target/target_core_transport.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/spi/spi.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/spmi/spmi.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/usb/host/xhci-trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/usb/musb/musb_trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/input/keyboard/applespi.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/i2c/i2c-core-base.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/i2c/i2c-core-smbus.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `drivers/i2c/i2c-core-slave.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/i2c/i2c-core-slave.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/hwmon/hwmon.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `drivers/thermal/thermal_core.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/thermal/thermal_core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/mmc/core/core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_eval_map' from `drivers/ufs/core/ufshcd.o' being placed in section `_ftrace_eval_map' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/ufs/core/ufshcd.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/platform/chrome/cros_ec_trace.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/devfreq/devfreq.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/android/binder.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/fsi/fsi-core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/fsi/fsi-master-aspeed.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/fsi/fsi-master-gpio.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/fsi/fsi-master-ast-cf.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `drivers/interconnect/core.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `sound/core/pcm_native.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `sound/core/pcm_lib.o' being placed in section `_ftrace_events' loongarch64-linux-ld: warning: orphan section `_ftrace_events' from `lib/maple_tree.o' being placed in section `_ftrace_events' loongarch64-linux-ld: init/main.o: in function `.L199': main.c:(.text+0x200): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: main.c:(.text+0x250): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: init/main.o: in function `perf_trace_initcall_start': main.c:(.text+0x36c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: init/main.o: in function `.L213': >> main.c:(.text+0x3a0): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: init/main.o: in function `perf_trace_initcall_finish': main.c:(.text+0x47c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: init/main.o: in function `.L225': main.c:(.text+0x4b4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: init/main.o: in function `trace_event_raw_event_initcall_start': main.c:(.text+0x590): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: main.c:(.text+0x5a0): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: init/main.o: in function `.L236': main.c:(.text+0x5e8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: init/main.o: in function `trace_event_raw_event_initcall_finish': main.c:(.text+0x660): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: main.c:(.text+0x674): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: init/main.o: in function `.L247': main.c:(.text+0x6c8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: main.c:(.text+0x6fc): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: init/main.o: in function `trace_raw_output_initcall_level': main.c:(.text+0x754): undefined reference to `trace_event_printf' loongarch64-linux-ld: main.c:(.text+0x774): undefined reference to `trace_handle_return' loongarch64-linux-ld: init/main.o: in function `.L263': main.c:(.text+0x79c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: init/main.o: in function `trace_raw_output_initcall_start': main.c:(.text+0x7f0): undefined reference to `trace_event_printf' loongarch64-linux-ld: main.c:(.text+0x810): undefined reference to `trace_handle_return' loongarch64-linux-ld: main.c:(.text+0x83c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: init/main.o: in function `trace_raw_output_initcall_finish': main.c:(.text+0x894): undefined reference to `trace_event_printf' loongarch64-linux-ld: main.c:(.text+0x8b4): undefined reference to `trace_handle_return' loongarch64-linux-ld: init/main.o: in function `trace_event_raw_event_initcall_level': main.c:(.text+0x938): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: main.c:(.text+0x954): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: init/main.o: in function `.L312': main.c:(.text+0x9bc): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: init/main.o: in function `.L299': main.c:(.text+0xa08): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: init/main.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: init/main.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: init/main.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: init/main.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: init/main.o:(.ref.data+0xa8): undefined reference to `trace_event_reg' loongarch64-linux-ld: init/main.o:(.ref.data+0xd0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/fork.o: in function `perf_trace_task_newtask': fork.c:(.text+0x178): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/fork.o: in function `.L34': fork.c:(.text+0x1dc): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/fork.o: in function `.L21': fork.c:(.text+0x258): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/fork.o: in function `trace_event_raw_event_task_newtask': fork.c:(.text+0x2d4): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/fork.o: in function `.L39': fork.c:(.text+0x30c): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/fork.o: in function `.L35': fork.c:(.text+0x34c): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/fork.o: in function `.L36': fork.c:(.text+0x384): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/fork.o: in function `trace_raw_output_task_newtask': fork.c:(.text+0x3dc): undefined reference to `trace_event_printf' loongarch64-linux-ld: fork.c:(.text+0x3fc): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/fork.o: in function `.L52': fork.c:(.text+0x424): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/fork.o: in function `trace_raw_output_task_rename': fork.c:(.text+0x47c): undefined reference to `trace_event_printf' loongarch64-linux-ld: fork.c:(.text+0x49c): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/fork.o: in function `.L58': fork.c:(.text+0x510): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/fork.o: in function `perf_trace_task_rename': fork.c:(.text+0x580): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/fork.o: in function `.L72': fork.c:(.text+0x5f8): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/fork.o: in function `.L71': fork.c:(.text+0x678): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/fork.o: in function `trace_event_raw_event_task_rename': fork.c:(.text+0x6bc): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/fork.o: in function `.L77': fork.c:(.text+0x708): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/fork.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/fork.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/fork.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/fork.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/cpu.o: in function `perf_trace_cpuhp_enter': cpu.c:(.text+0x2dc): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cpu.o: in function `.L35': cpu.c:(.text+0x31c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cpu.o: in function `perf_trace_cpuhp_multi_enter': cpu.c:(.text+0x40c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cpu.o: in function `.L47': cpu.c:(.text+0x44c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cpu.o: in function `perf_trace_cpuhp_exit': cpu.c:(.text+0x54c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cpu.o: in function `.L59': cpu.c:(.text+0x58c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cpu.o: in function `trace_event_raw_event_cpuhp_enter': cpu.c:(.text+0x688): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: cpu.c:(.text+0x6a4): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/cpu.o: in function `.L70': cpu.c:(.text+0x708): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/cpu.o: in function `trace_event_raw_event_cpuhp_multi_enter': cpu.c:(.text+0x790): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: cpu.c:(.text+0x7ac): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/cpu.o: in function `.L81': cpu.c:(.text+0x808): undefined reference to `__trace_trigger_soft_disabled' -- loongarch64-linux-ld: kernel/time/alarmtimer.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/time/alarmtimer.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/time/alarmtimer.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/smp.o: in function `perf_trace_csd_queue_cpu': smp.c:(.text+0x224): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/smp.o: in function `.L30': smp.c:(.text+0x264): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/smp.o: in function `perf_trace_csd_function': smp.c:(.text+0x33c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/smp.o: in function `.L42': smp.c:(.text+0x374): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/smp.o: in function `trace_event_raw_event_csd_queue_cpu': smp.c:(.text+0x468): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: smp.c:(.text+0x484): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/smp.o: in function `.L53': smp.c:(.text+0x4e8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/smp.o: in function `trace_event_raw_event_csd_function': smp.c:(.text+0x560): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: smp.c:(.text+0x574): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/smp.o: in function `.L64': smp.c:(.text+0x5c8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/smp.o: in function `.L65': smp.c:(.text+0x5fc): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/smp.o: in function `trace_raw_output_csd_queue_cpu': smp.c:(.text+0x65c): undefined reference to `trace_event_printf' loongarch64-linux-ld: smp.c:(.text+0x67c): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/smp.o: in function `.L80': smp.c:(.text+0x6a4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/smp.o: in function `trace_raw_output_csd_function': smp.c:(.text+0x6f4): undefined reference to `trace_event_printf' loongarch64-linux-ld: smp.c:(.text+0x714): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/smp.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/smp.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/smp.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/smp.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/kexec_core.o: in function `.L255': kexec_core.c:(.text+0x1b10): undefined reference to `machine_kexec_cleanup' loongarch64-linux-ld: kernel/kexec_core.o: in function `.L296': kexec_core.c:(.text+0x1d70): undefined reference to `machine_crash_shutdown' loongarch64-linux-ld: kexec_core.c:(.text+0x1d78): undefined reference to `machine_kexec' loongarch64-linux-ld: kernel/kexec_core.o: in function `.L383': kexec_core.c:(.text+0x2350): undefined reference to `machine_shutdown' loongarch64-linux-ld: kernel/kexec_core.o: in function `.L380': kexec_core.c:(.text+0x2360): undefined reference to `machine_kexec' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L128': cgroup.c:(.text+0x868): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L129': cgroup.c:(.text+0x8d4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `perf_trace_cgroup_event': cgroup.c:(.text+0xa40): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L147': cgroup.c:(.text+0xab4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L169': cgroup.c:(.text+0xd70): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L21': cgroup.c:(.text+0xdb4): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L193': cgroup.c:(.text+0xe68): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L192': cgroup.c:(.text+0xe9c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L189': cgroup.c:(.text+0xefc): undefined reference to `trace_event_printf' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L200': cgroup.c:(.text+0xf1c): undefined reference to `trace_handle_return' loongarch64-linux-ld: cgroup.c:(.text+0xf44): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L201': cgroup.c:(.text+0xfa0): undefined reference to `trace_event_printf' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `trace_raw_output_cgroup_root': cgroup.c:(.text+0xfc0): undefined reference to `trace_handle_return' loongarch64-linux-ld: cgroup.c:(.text+0xfec): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L207': cgroup.c:(.text+0x106c): undefined reference to `trace_event_printf' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `trace_raw_output_cgroup': cgroup.c:(.text+0x108c): undefined reference to `trace_handle_return' loongarch64-linux-ld: cgroup.c:(.text+0x10b4): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L213': cgroup.c:(.text+0x1124): undefined reference to `trace_event_printf' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `trace_raw_output_cgroup_migrate': cgroup.c:(.text+0x1144): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L730': cgroup.c:(.text+0x3e5c): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L15': cgroup.c:(.text+0x3ef4): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L756': cgroup.c:(.text+0x4050): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `css_create': cgroup.c:(.text+0x40c0): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L769': cgroup.c:(.text+0x4234): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: cgroup.c:(.text+0x4278): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L772': cgroup.c:(.text+0x42d4): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L775': cgroup.c:(.text+0x4328): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `perf_trace_cgroup_migrate': cgroup.c:(.text+0x43c4): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L782': cgroup.c:(.text+0x43f4): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L784': cgroup.c:(.text+0x444c): undefined reference to `trace_event_buffer_reserve' >> loongarch64-linux-ld: cgroup.c:(.text+0x44a8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L788': cgroup.c:(.text+0x4580): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `perf_trace_cgroup': cgroup.c:(.text+0x45e8): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/cgroup/cgroup.o: in function `.L802': cgroup.c:(.text+0x46c8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0x60): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0x88): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0xa8): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0xd0): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0xf0): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/cgroup/cgroup.o:(.ref.data+0x118): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `.L12': error_report-traces.c:(.text+0xec): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: error_report-traces.c:(.text+0x124): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `trace_event_raw_event_error_report_template': error_report-traces.c:(.text+0x1f8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `.L27': error_report-traces.c:(.text+0x20c): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `.L23': error_report-traces.c:(.text+0x248): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `.L24': error_report-traces.c:(.text+0x27c): undefined reference to `trace_raw_output_prep' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `trace_raw_output_error_report_template': error_report-traces.c:(.text+0x2d0): undefined reference to `trace_print_symbols_seq' loongarch64-linux-ld: error_report-traces.c:(.text+0x2e8): undefined reference to `trace_event_printf' loongarch64-linux-ld: kernel/trace/error_report-traces.o: in function `.L39': error_report-traces.c:(.text+0x308): undefined reference to `trace_handle_return' loongarch64-linux-ld: kernel/trace/error_report-traces.o:(.ref.data+0x18): undefined reference to `trace_event_reg' loongarch64-linux-ld: kernel/trace/error_report-traces.o:(.ref.data+0x40): undefined reference to `trace_event_raw_init' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_cpu': power-traces.c:(.text+0xdb4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L209': power-traces.c:(.text+0xdec): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_cpu_idle_miss': power-traces.c:(.text+0xec4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L221': power-traces.c:(.text+0xf00): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_pstate_sample': power-traces.c:(.text+0x1010): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L233': power-traces.c:(.text+0x106c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_cpu_frequency_limits': power-traces.c:(.text+0x1154): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: power-traces.c:(.text+0x119c): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_suspend_resume': power-traces.c:(.text+0x1284): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: power-traces.c:(.text+0x12c0): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L267': power-traces.c:(.text+0x1394): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_cpu_latency_qos_request': power-traces.c:(.text+0x13c8): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L268': power-traces.c:(.text+0x14a4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_pm_qos_update': power-traces.c:(.text+0x14e0): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L280': power-traces.c:(.text+0x15c4): undefined reference to `perf_trace_buf_alloc' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `perf_trace_guest_halt_poll_ns': power-traces.c:(.text+0x1600): undefined reference to `perf_trace_run_bpf_submit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L292': power-traces.c:(.text+0x16d8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x16ec): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_event_raw_event_cpu': power-traces.c:(.text+0x1728): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L304': power-traces.c:(.text+0x17a8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x17c0): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_event_raw_event_cpu_idle_miss': power-traces.c:(.text+0x1808): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L315': power-traces.c:(.text+0x18b0): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x18e0): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_event_raw_event_pstate_sample': power-traces.c:(.text+0x194c): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L330': power-traces.c:(.text+0x19b8): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L326': power-traces.c:(.text+0x19e0): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: power-traces.c:(.text+0x1a2c): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L341': power-traces.c:(.text+0x1ab0): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x1ac8): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L338': power-traces.c:(.text+0x1b28): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_event_raw_event_suspend_resume': power-traces.c:(.text+0x1b98): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x1ba8): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L348': power-traces.c:(.text+0x1be8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_event_raw_event_cpu_latency_qos_request': power-traces.c:(.text+0x1c68): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x1c80): undefined reference to `trace_event_buffer_commit' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `.L359': power-traces.c:(.text+0x1cc8): undefined reference to `__trace_trigger_soft_disabled' loongarch64-linux-ld: kernel/trace/power-traces.o: in function `trace_event_raw_event_pm_qos_update': power-traces.c:(.text+0x1d48): undefined reference to `trace_event_buffer_reserve' loongarch64-linux-ld: power-traces.c:(.text+0x1d60): undefined reference to `trace_event_buffer_commit' Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 20217/23779] mm/hugetlb.c:1370:6: sparse: sparse: symbol 'free_huge_page_to_dhugetlb_pool' was not declared. Should it be static?
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b1d54e6f06c518a52f83edade0da2b959e1c9a4e commit: 0bc0d0d57edacd59ebe38d05ad9c4b2bc185aa51 [20217/23779] dhugetlb: backport dynamic hugetlb feature config: x86_64-randconfig-123-20240926 (https://download.01.org/0day-ci/archive/20240927/202409270316.mecxJZQM-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409270316.mecxJZQM-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/202409270316.mecxJZQM-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> mm/hugetlb.c:1370:6: sparse: sparse: symbol 'free_huge_page_to_dhugetlb_pool' was not declared. Should it be static? mm/hugetlb.c:4438:58: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void [noderef] <asn:1> * @@ got void *buffer @@ mm/hugetlb.c:4438:58: sparse: expected void [noderef] <asn:1> * mm/hugetlb.c:4438:58: sparse: got void *buffer mm/hugetlb.c:4452:60: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void *buffer @@ got void [noderef] <asn:1> *buffer @@ mm/hugetlb.c:4452:60: sparse: expected void *buffer mm/hugetlb.c:4452:60: sparse: got void [noderef] <asn:1> *buffer mm/hugetlb.c:4510:60: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void *buffer @@ got void [noderef] <asn:1> *buffer @@ mm/hugetlb.c:4510:60: sparse: expected void *buffer mm/hugetlb.c:4510:60: sparse: got void [noderef] <asn:1> *buffer mm/hugetlb.c:2018:20: sparse: sparse: context imbalance in 'gather_surplus_pages' - unexpected unlock mm/hugetlb.c:5168:17: sparse: sparse: context imbalance in 'hugetlb_cow' - unexpected unlock mm/hugetlb.c:5881:25: sparse: sparse: context imbalance in 'follow_hugetlb_page' - different lock contexts for basic block mm/hugetlb.c:1370:6: warning: no previous prototype for 'free_huge_page_to_dhugetlb_pool' [-Wmissing-prototypes] 1370 | void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/hugetlb.c:14: include/linux/mempolicy.h:329:13: warning: '__do_mbind' defined but not used [-Wunused-function] 329 | static long __do_mbind(unsigned long start, unsigned long len, | ^~~~~~~~~~ vim +/free_huge_page_to_dhugetlb_pool +1370 mm/hugetlb.c 1324 1325 #ifdef CONFIG_DYNAMIC_HUGETLB 1326 static void free_huge_page_to_dhugetlb_pool(struct page *page, 1327 bool restore_reserve) 1328 { 1329 struct hstate *h = page_hstate(page); 1330 struct dhugetlb_pool *hpool; 1331 1332 hpool = get_dhugetlb_pool_from_dhugetlb_pagelist(page); 1333 if (unlikely(!hpool)) { 1334 pr_err("dhugetlb: free error: get hpool failed\n"); 1335 return; 1336 } 1337 1338 spin_lock(&hpool->lock); 1339 ClearPagePool(page); 1340 set_compound_page_dtor(page, NULL_COMPOUND_DTOR); 1341 if (!hstate_is_gigantic(h)) { 1342 list_add(&page->lru, &hpool->dhugetlb_2M_freelists); 1343 hpool->free_reserved_2M++; 1344 hpool->used_2M--; 1345 if (restore_reserve) { 1346 hpool->mmap_reserved_2M++; 1347 trace_dhugetlb_acct_memory(hpool, 1348 hpool->mmap_reserved_2M, 1349 DHUGETLB_RESV_2M); 1350 } 1351 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_2M, 1352 DHUGETLB_FREE_2M); 1353 } else { 1354 list_add(&page->lru, &hpool->dhugetlb_1G_freelists); 1355 hpool->free_reserved_1G++; 1356 hpool->used_1G--; 1357 if (restore_reserve) { 1358 hpool->mmap_reserved_1G++; 1359 trace_dhugetlb_acct_memory(hpool, 1360 hpool->mmap_reserved_1G, 1361 DHUGETLB_RESV_1G); 1362 } 1363 trace_dhugetlb_alloc_free(hpool, page, hpool->free_reserved_1G, 1364 DHUGETLB_FREE_1G); 1365 } 1366 spin_unlock(&hpool->lock); 1367 dhugetlb_pool_put(hpool); 1368 } 1369 #else > 1370 void free_huge_page_to_dhugetlb_pool(struct page *page, bool restore_reserve) 1371 { 1372 } 1373 #endif 1374 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 5053/23779] drivers/platform/x86/intel_atomisp2_pm.o: warning: objtool: missing symbol for section .init.text
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: b1d54e6f06c518a52f83edade0da2b959e1c9a4e commit: 1073f9d006321689fb82bdac7b7af58e8617f128 [5053/23779] platform/x86: Add Intel AtomISP2 dummy / power-management driver config: x86_64-buildonly-randconfig-001-20240926 (https://download.01.org/0day-ci/archive/20240927/202409270224.SJPfAkVu-lkp@…) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409270224.SJPfAkVu-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/202409270224.SJPfAkVu-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/platform/x86/intel_atomisp2_pm.c:15: include/linux/module.h:140:14: warning: 'cleanup_module' specifies less restrictive attribute than its target 'isp_pci_driver_exit': 'cold' [-Wmissing-attributes] 140 | void cleanup_module(void) __attribute__((alias(#exitfn))); | ^~~~~~~~~~~~~~ include/linux/device.h:1637:1: note: in expansion of macro 'module_exit' 1637 | module_exit(__driver##_exit); | ^~~~~~~~~~~ include/linux/pci.h:1335:9: note: in expansion of macro 'module_driver' 1335 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver) | ^~~~~~~~~~~~~ drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver' 115 | module_pci_driver(isp_pci_driver); | ^~~~~~~~~~~~~~~~~ In file included from include/linux/pci.h:32, from drivers/platform/x86/intel_atomisp2_pm.c:17: drivers/platform/x86/intel_atomisp2_pm.c:115:19: note: 'cleanup_module' target declared here 115 | module_pci_driver(isp_pci_driver); | ^~~~~~~~~~~~~~ include/linux/device.h:1633:20: note: in definition of macro 'module_driver' 1633 | static void __exit __driver##_exit(void) \ | ^~~~~~~~ drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver' 115 | module_pci_driver(isp_pci_driver); | ^~~~~~~~~~~~~~~~~ include/linux/module.h:134:13: warning: 'init_module' specifies less restrictive attribute than its target 'isp_pci_driver_init': 'cold' [-Wmissing-attributes] 134 | int init_module(void) __attribute__((alias(#initfn))); | ^~~~~~~~~~~ include/linux/device.h:1632:1: note: in expansion of macro 'module_init' 1632 | module_init(__driver##_init); \ | ^~~~~~~~~~~ include/linux/pci.h:1335:9: note: in expansion of macro 'module_driver' 1335 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver) | ^~~~~~~~~~~~~ drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver' 115 | module_pci_driver(isp_pci_driver); | ^~~~~~~~~~~~~~~~~ drivers/platform/x86/intel_atomisp2_pm.c:115:19: note: 'init_module' target declared here 115 | module_pci_driver(isp_pci_driver); | ^~~~~~~~~~~~~~ include/linux/device.h:1628:19: note: in definition of macro 'module_driver' 1628 | static int __init __driver##_init(void) \ | ^~~~~~~~ drivers/platform/x86/intel_atomisp2_pm.c:115:1: note: in expansion of macro 'module_pci_driver' 115 | module_pci_driver(isp_pci_driver); | ^~~~~~~~~~~~~~~~~ >> drivers/platform/x86/intel_atomisp2_pm.o: warning: objtool: missing symbol for section .init.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 14067/14172] drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:403:15: error: no member named 'start' in 'struct iommu_iotlb_gather'
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 2e95e7bae9486cc775ed2aa319bf323f6ba2677b commit: e4a624e3e991f56f3783c5fafe8fd075a2be861b [14067/14172] net: hns3: add sync command to sync io-pgtable config: arm64-randconfig-r123-20240926 (https://download.01.org/0day-ci/archive/20240927/202409270232.uDTz2n2f-lkp@…) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce: (https://download.01.org/0day-ci/archive/20240927/202409270232.uDTz2n2f-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/202409270232.uDTz2n2f-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:403:15: error: no member named 'start' in 'struct iommu_iotlb_gather' iotlb_gather.start = iova; ~~~~~~~~~~~~ ^ >> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:404:15: error: no member named 'end' in 'struct iommu_iotlb_gather' iotlb_gather.end = iova + granule - 1; ~~~~~~~~~~~~ ^ >> drivers/net/ethernet/hisilicon/hns3/hns3_enet.c:405:15: error: no member named 'pgsize' in 'struct iommu_iotlb_gather' iotlb_gather.pgsize = granule; ~~~~~~~~~~~~ ^ 3 errors generated. vim +403 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c 388 389 #define HNS3_INVALID_PTYPE \ 390 ARRAY_SIZE(hns3_rx_ptype_tbl) 391 392 static void hns3_dma_map_sync(struct device *dev, unsigned long iova) 393 { 394 struct iommu_domain *domain = iommu_get_domain_for_dev(dev); 395 struct iommu_iotlb_gather iotlb_gather; 396 size_t granule; 397 398 if (!domain || domain->type != IOMMU_DOMAIN_DMA) 399 return; 400 401 granule = 1 << __ffs(domain->pgsize_bitmap); 402 iova = ALIGN_DOWN(iova, granule); > 403 iotlb_gather.start = iova; > 404 iotlb_gather.end = iova + granule - 1; > 405 iotlb_gather.pgsize = granule; 406 407 iommu_iotlb_sync(domain, &iotlb_gather); 408 } 409 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1336/14122] include/linux/uaccess.h:213:16: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 27 Sep '24

27 Sep '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 81a41d2ac1de43215c014bc71d907a026042e55b commit: 975e216e36aa3f7aba9d8e1e1d6cbba7cf692ad7 [1336/14122] arm64: add support for machine check error safe config: arm64-randconfig-r123-20240926 (https://download.01.org/0day-ci/archive/20240927/202409270023.ToC1weNo-lkp@…) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce: (https://download.01.org/0day-ci/archive/20240927/202409270023.ToC1weNo-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/202409270023.ToC1weNo-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) lib/iov_iter.c: note: in included file (through include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/rcuwait.h, ...): >> include/linux/uaccess.h:213:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got void *dst @@ include/linux/uaccess.h:213:16: sparse: expected void const [noderef] __user *ptr include/linux/uaccess.h:213:16: sparse: got void *dst lib/iov_iter.c: note: in included file: include/net/checksum.h:33:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:33:39: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:33:39: sparse: got unsigned int include/net/checksum.h:33:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:33:39: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:33:39: sparse: got unsigned int include/net/checksum.h:41:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:41:45: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:41:45: sparse: got unsigned int include/net/checksum.h:41:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:41:45: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:41:45: sparse: got unsigned int vim +213 include/linux/uaccess.h ec6347bb43395c Dan Williams 2020-10-05 207 59feaaa04e929c Tong Tiangen 2023-12-07 208 #ifndef copy_mc_to_user 59feaaa04e929c Tong Tiangen 2023-12-07 209 static inline unsigned long __must_check 59feaaa04e929c Tong Tiangen 2023-12-07 210 copy_mc_to_user(void *dst, const void *src, size_t cnt) 59feaaa04e929c Tong Tiangen 2023-12-07 211 { 59feaaa04e929c Tong Tiangen 2023-12-07 212 check_object_size(src, cnt, true); 59feaaa04e929c Tong Tiangen 2023-12-07 @213 return raw_copy_to_user(dst, src, cnt); 59feaaa04e929c Tong Tiangen 2023-12-07 214 } 59feaaa04e929c Tong Tiangen 2023-12-07 215 #endif 59feaaa04e929c Tong Tiangen 2023-12-07 216 :::::: The code at line 213 was first introduced by commit :::::: 59feaaa04e929cf051c9b29e28fb9e1299785280 uaccess: add generic fallback version of copy_mc_to_user() :::::: TO: Tong Tiangen <tongtiangen(a)huawei.com> :::::: CC: Tong Tiangen <tongtiangen(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH openEuler-1.0-LTS] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
by Zeng Heng 26 Sep '24

26 Sep '24
From: Krishna Kumar <krishnak(a)linux.ibm.com> stable inclusion from stable-v4.19.322 commit 4eb4085c1346d19d4a05c55246eb93e74e671048 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWMF CVE: CVE-2024-46761 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 335e35b748527f0c06ded9eebb65387f60647fda ] The hotplug driver for powerpc (pci/hotplug/pnv_php.c) causes a kernel crash when we try to hot-unplug/disable the PCIe switch/bridge from the PHB. The crash occurs because although the MSI data structure has been released during disable/hot-unplug path and it has been assigned with NULL, still during unregistration the code was again trying to explicitly disable the MSI which causes the NULL pointer dereference and kernel crash. The patch fixes the check during unregistration path to prevent invoking pci_disable_msi/msix() since its data structure is already freed. Reported-by: Timothy Pearson <tpearson(a)raptorengineering.com> Closes: https://lore.kernel.org/all/1981605666.2142272.1703742465927.JavaMail.zimbr… Acked-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Shawn Anastasio <sanastasio(a)raptorengineering.com> Signed-off-by: Krishna Kumar <krishnak(a)linux.ibm.com> Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au> Link: https://msgid.link/20240701074513.94873-2-krishnak@linux.ibm.com Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- drivers/pci/hotplug/pnv_php.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 3276a5e4c430..486fad430958 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -35,7 +35,6 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, bool disable_device) { struct pci_dev *pdev = php_slot->pdev; - int irq = php_slot->irq; u16 ctrl; if (php_slot->irq > 0) { @@ -54,7 +53,7 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, php_slot->wq = NULL; } - if (disable_device || irq > 0) { + if (disable_device) { if (pdev->msix_enabled) pci_disable_msix(pdev); else if (pdev->msi_enabled) -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
by Zeng Heng 26 Sep '24

26 Sep '24
From: Krishna Kumar <krishnak(a)linux.ibm.com> stable inclusion from stable-v5.10.226 commit bc1faed19db95abf0933b104910a3fb01b138f59 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWMF CVE: CVE-2024-46761 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 335e35b748527f0c06ded9eebb65387f60647fda ] The hotplug driver for powerpc (pci/hotplug/pnv_php.c) causes a kernel crash when we try to hot-unplug/disable the PCIe switch/bridge from the PHB. The crash occurs because although the MSI data structure has been released during disable/hot-unplug path and it has been assigned with NULL, still during unregistration the code was again trying to explicitly disable the MSI which causes the NULL pointer dereference and kernel crash. The patch fixes the check during unregistration path to prevent invoking pci_disable_msi/msix() since its data structure is already freed. Reported-by: Timothy Pearson <tpearson(a)raptorengineering.com> Closes: https://lore.kernel.org/all/1981605666.2142272.1703742465927.JavaMail.zimbr… Acked-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Shawn Anastasio <sanastasio(a)raptorengineering.com> Signed-off-by: Krishna Kumar <krishnak(a)linux.ibm.com> Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au> Link: https://msgid.link/20240701074513.94873-2-krishnak@linux.ibm.com Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- drivers/pci/hotplug/pnv_php.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 04565162a449..cf9c0e75f0be 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -38,7 +38,6 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, bool disable_device) { struct pci_dev *pdev = php_slot->pdev; - int irq = php_slot->irq; u16 ctrl; if (php_slot->irq > 0) { @@ -57,7 +56,7 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, php_slot->wq = NULL; } - if (disable_device || irq > 0) { + if (disable_device) { if (pdev->msix_enabled) pci_disable_msix(pdev); else if (pdev->msi_enabled) -- 2.25.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
by Zeng Heng 26 Sep '24

26 Sep '24
From: Krishna Kumar <krishnak(a)linux.ibm.com> stable inclusion from stable-v5.10.226 commit bc1faed19db95abf0933b104910a3fb01b138f59 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWMF CVE: CVE-2024-46761 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 335e35b748527f0c06ded9eebb65387f60647fda ] The hotplug driver for powerpc (pci/hotplug/pnv_php.c) causes a kernel crash when we try to hot-unplug/disable the PCIe switch/bridge from the PHB. The crash occurs because although the MSI data structure has been released during disable/hot-unplug path and it has been assigned with NULL, still during unregistration the code was again trying to explicitly disable the MSI which causes the NULL pointer dereference and kernel crash. The patch fixes the check during unregistration path to prevent invoking pci_disable_msi/msix() since its data structure is already freed. Reported-by: Timothy Pearson <tpearson(a)raptorengineering.com> Closes: https://lore.kernel.org/all/1981605666.2142272.1703742465927.JavaMail.zimbr… Acked-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Shawn Anastasio <sanastasio(a)raptorengineering.com> Signed-off-by: Krishna Kumar <krishnak(a)linux.ibm.com> Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au> Link: https://msgid.link/20240701074513.94873-2-krishnak@linux.ibm.com Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- drivers/pci/hotplug/pnv_php.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 04565162a449..cf9c0e75f0be 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -38,7 +38,6 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, bool disable_device) { struct pci_dev *pdev = php_slot->pdev; - int irq = php_slot->irq; u16 ctrl; if (php_slot->irq > 0) { @@ -57,7 +56,7 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, php_slot->wq = NULL; } - if (disable_device || irq > 0) { + if (disable_device) { if (pdev->msix_enabled) pci_disable_msix(pdev); else if (pdev->msi_enabled) -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
by Zeng Heng 26 Sep '24

26 Sep '24
From: Krishna Kumar <krishnak(a)linux.ibm.com> stable inclusion from stable-v6.6.51 commit b82d4d5c736f4fd2ed224c35f554f50d1953d21e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWMF CVE: CVE-2024-46761 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit 335e35b748527f0c06ded9eebb65387f60647fda ] The hotplug driver for powerpc (pci/hotplug/pnv_php.c) causes a kernel crash when we try to hot-unplug/disable the PCIe switch/bridge from the PHB. The crash occurs because although the MSI data structure has been released during disable/hot-unplug path and it has been assigned with NULL, still during unregistration the code was again trying to explicitly disable the MSI which causes the NULL pointer dereference and kernel crash. The patch fixes the check during unregistration path to prevent invoking pci_disable_msi/msix() since its data structure is already freed. Reported-by: Timothy Pearson <tpearson(a)raptorengineering.com> Closes: https://lore.kernel.org/all/1981605666.2142272.1703742465927.JavaMail.zimbr… Acked-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Shawn Anastasio <sanastasio(a)raptorengineering.com> Signed-off-by: Krishna Kumar <krishnak(a)linux.ibm.com> Signed-off-by: Michael Ellerman <mpe(a)ellerman.id.au> Link: https://msgid.link/20240701074513.94873-2-krishnak@linux.ibm.com Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Zeng Heng <zengheng4(a)huawei.com> --- drivers/pci/hotplug/pnv_php.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 881d420637bf..092c9ac0d26d 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -39,7 +39,6 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, bool disable_device) { struct pci_dev *pdev = php_slot->pdev; - int irq = php_slot->irq; u16 ctrl; if (php_slot->irq > 0) { @@ -58,7 +57,7 @@ static void pnv_php_disable_irq(struct pnv_php_slot *php_slot, php_slot->wq = NULL; } - if (disable_device || irq > 0) { + if (disable_device) { if (pdev->msix_enabled) pci_disable_msix(pdev); else if (pdev->msi_enabled) -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] PCI: Add missing bridge lock to pci_bus_lock()
by liwei 26 Sep '24

26 Sep '24
From: Dan Williams <dan.j.williams(a)intel.com> mainline inclusion from mainline-v6.11-rc1 commit a4e772898f8bf2e7e1cf661a12c60a5612c4afab category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWL9 CVE: CVE-2024-46750 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- One of the true positives that the cfg_access_lock lockdep effort identified is this sequence: WARNING: CPU: 14 PID: 1 at drivers/pci/pci.c:4886 pci_bridge_secondary_bus_reset+0x5d/0x70 RIP: 0010:pci_bridge_secondary_bus_reset+0x5d/0x70 Call Trace: <TASK> ? __warn+0x8c/0x190 ? pci_bridge_secondary_bus_reset+0x5d/0x70 ? report_bug+0x1f8/0x200 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? pci_bridge_secondary_bus_reset+0x5d/0x70 pci_reset_bus+0x1d8/0x270 vmd_probe+0x778/0xa10 pci_device_probe+0x95/0x120 Where pci_reset_bus() users are triggering unlocked secondary bus resets. Ironically pci_bus_reset(), several calls down from pci_reset_bus(), uses pci_bus_lock() before issuing the reset which locks everything *but* the bridge itself. For the same motivation as adding: bridge = pci_upstream_bridge(dev); if (bridge) pci_dev_lock(bridge); to pci_reset_function() for the "bus" and "cxl_bus" reset cases, add pci_dev_lock() for @bus->self to pci_bus_lock(). Link: https://lore.kernel.org/r/171711747501.1628941.15217746952476635316.stgit@d… Reported-by: Imre Deak <imre.deak(a)intel.com> Closes: http://lore.kernel.org/r/6657833b3b5ae_14984b29437@dwillia2-xfh.jf.intel.co… Signed-off-by: Dan Williams <dan.j.williams(a)intel.com> Signed-off-by: Keith Busch <kbusch(a)kernel.org> [bhelgaas: squash in recursive locking deadlock fix from Keith Busch: https://lore.kernel.org/r/20240711193650.701834-1-kbusch@meta.com] Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Hans de Goede <hdegoede(a)redhat.com> Tested-by: Kalle Valo <kvalo(a)kernel.org> Reviewed-by: Dave Jiang <dave.jiang(a)intel.com> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/pci/pci.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 21ae34013c35..1e60458e72ff 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5737,10 +5737,12 @@ static void pci_bus_lock(struct pci_bus *bus) { struct pci_dev *dev; + pci_dev_lock(bus->self); list_for_each_entry(dev, &bus->devices, bus_list) { - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5752,8 +5754,10 @@ static void pci_bus_unlock(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); } /* Return 1 on successful lock, 0 on contention */ @@ -5761,15 +5765,15 @@ static int pci_bus_trylock(struct pci_bus *bus) { struct pci_dev *dev; + if (!pci_dev_trylock(bus->self)) + return 0; + list_for_each_entry(dev, &bus->devices, bus_list) { - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { - if (!pci_bus_trylock(dev->subordinate)) { - pci_dev_unlock(dev); + if (!pci_bus_trylock(dev->subordinate)) goto unlock; - } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5777,8 +5781,10 @@ static int pci_bus_trylock(struct pci_bus *bus) list_for_each_entry_continue_reverse(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); return 0; } @@ -5810,9 +5816,10 @@ static void pci_slot_lock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5838,14 +5845,13 @@ static int pci_slot_trylock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { if (!pci_bus_trylock(dev->subordinate)) { pci_dev_unlock(dev); goto unlock; } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5856,7 +5862,8 @@ static int pci_slot_trylock(struct pci_slot *slot) continue; if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } return 0; } -- 2.25.1
2 1
0 0
[PATCH OLK-6.6] usb: dwc3: st: fix probed platform device ref count on probe error path
by liwei 26 Sep '24

26 Sep '24
From: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> mainline inclusion from mainline-v6.11-rc6 commit ddfcfeba891064b88bb844208b43bef2ef970f0c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR624 CVE: CVE-2024-46674 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- The probe function never performs any paltform device allocation, thus error path "undo_platform_dev_alloc" is entirely bogus. It drops the reference count from the platform device being probed. If error path is triggered, this will lead to unbalanced device reference counts and premature release of device resources, thus possible use-after-free when releasing remaining devm-managed resources. Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC") Cc: stable(a)vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen(a)synopsys.com> Reviewed-by: Patrice Chotard <patrice.chotard(a)foss.st.com> Link: https://lore.kernel.org/r/20240814093957.37940-1-krzysztof.kozlowski@linaro… Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/usb/dwc3/dwc3-st.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index 211360eee95a..a9cb04043f08 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c @@ -219,10 +219,8 @@ static int st_dwc3_probe(struct platform_device *pdev) dwc3_data->regmap = regmap; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "syscfg-reg"); - if (!res) { - ret = -ENXIO; - goto undo_platform_dev_alloc; - } + if (!res) + return -ENXIO; dwc3_data->syscfg_reg_off = res->start; @@ -233,8 +231,7 @@ static int st_dwc3_probe(struct platform_device *pdev) devm_reset_control_get_exclusive(dev, "powerdown"); if (IS_ERR(dwc3_data->rstc_pwrdn)) { dev_err(&pdev->dev, "could not get power controller\n"); - ret = PTR_ERR(dwc3_data->rstc_pwrdn); - goto undo_platform_dev_alloc; + return PTR_ERR(dwc3_data->rstc_pwrdn); } /* Manage PowerDown */ @@ -300,8 +297,6 @@ static int st_dwc3_probe(struct platform_device *pdev) reset_control_assert(dwc3_data->rstc_rst); undo_powerdown: reset_control_assert(dwc3_data->rstc_pwrdn); -undo_platform_dev_alloc: - platform_device_put(pdev); return ret; } -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] usb: dwc3: st: fix probed platform device ref count on probe error path
by liwei 26 Sep '24

26 Sep '24
From: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> mainline inclusion from mainline-v6.11-rc6 commit ddfcfeba891064b88bb844208b43bef2ef970f0c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR624 CVE: CVE-2024-46674 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- The probe function never performs any paltform device allocation, thus error path "undo_platform_dev_alloc" is entirely bogus. It drops the reference count from the platform device being probed. If error path is triggered, this will lead to unbalanced device reference counts and premature release of device resources, thus possible use-after-free when releasing remaining devm-managed resources. Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC") Cc: stable(a)vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen(a)synopsys.com> Reviewed-by: Patrice Chotard <patrice.chotard(a)foss.st.com> Link: https://lore.kernel.org/r/20240814093957.37940-1-krzysztof.kozlowski@linaro… Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/usb/dwc3/dwc3-st.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index e733be840545..a150855b4b05 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c @@ -219,10 +219,8 @@ static int st_dwc3_probe(struct platform_device *pdev) dwc3_data->regmap = regmap; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "syscfg-reg"); - if (!res) { - ret = -ENXIO; - goto undo_platform_dev_alloc; - } + if (!res) + return -ENXIO; dwc3_data->syscfg_reg_off = res->start; @@ -233,8 +231,7 @@ static int st_dwc3_probe(struct platform_device *pdev) devm_reset_control_get_exclusive(dev, "powerdown"); if (IS_ERR(dwc3_data->rstc_pwrdn)) { dev_err(&pdev->dev, "could not get power controller\n"); - ret = PTR_ERR(dwc3_data->rstc_pwrdn); - goto undo_platform_dev_alloc; + return PTR_ERR(dwc3_data->rstc_pwrdn); } /* Manage PowerDown */ @@ -300,8 +297,6 @@ static int st_dwc3_probe(struct platform_device *pdev) reset_control_assert(dwc3_data->rstc_rst); undo_powerdown: reset_control_assert(dwc3_data->rstc_pwrdn); -undo_platform_dev_alloc: - platform_device_put(pdev); return ret; } -- 2.25.1
2 1
0 0
[PATCH OLK-5.10] PCI: Add missing bridge lock to pci_bus_lock()
by liwei 26 Sep '24

26 Sep '24
From: Dan Williams <dan.j.williams(a)intel.com> mainline inclusion from mainline-v6.11-rc1 commit a4e772898f8bf2e7e1cf661a12c60a5612c4afab category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWL9 CVE: CVE-2024-46750 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- One of the true positives that the cfg_access_lock lockdep effort identified is this sequence: WARNING: CPU: 14 PID: 1 at drivers/pci/pci.c:4886 pci_bridge_secondary_bus_reset+0x5d/0x70 RIP: 0010:pci_bridge_secondary_bus_reset+0x5d/0x70 Call Trace: <TASK> ? __warn+0x8c/0x190 ? pci_bridge_secondary_bus_reset+0x5d/0x70 ? report_bug+0x1f8/0x200 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? pci_bridge_secondary_bus_reset+0x5d/0x70 pci_reset_bus+0x1d8/0x270 vmd_probe+0x778/0xa10 pci_device_probe+0x95/0x120 Where pci_reset_bus() users are triggering unlocked secondary bus resets. Ironically pci_bus_reset(), several calls down from pci_reset_bus(), uses pci_bus_lock() before issuing the reset which locks everything *but* the bridge itself. For the same motivation as adding: bridge = pci_upstream_bridge(dev); if (bridge) pci_dev_lock(bridge); to pci_reset_function() for the "bus" and "cxl_bus" reset cases, add pci_dev_lock() for @bus->self to pci_bus_lock(). Link: https://lore.kernel.org/r/171711747501.1628941.15217746952476635316.stgit@d… Reported-by: Imre Deak <imre.deak(a)intel.com> Closes: http://lore.kernel.org/r/6657833b3b5ae_14984b29437@dwillia2-xfh.jf.intel.co… Signed-off-by: Dan Williams <dan.j.williams(a)intel.com> Signed-off-by: Keith Busch <kbusch(a)kernel.org> [bhelgaas: squash in recursive locking deadlock fix from Keith Busch: https://lore.kernel.org/r/20240711193650.701834-1-kbusch@meta.com] Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Hans de Goede <hdegoede(a)redhat.com> Tested-by: Kalle Valo <kvalo(a)kernel.org> Reviewed-by: Dave Jiang <dave.jiang(a)intel.com> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/pci/pci.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 336daa667fb1..269fb2419325 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5268,10 +5268,12 @@ static void pci_bus_lock(struct pci_bus *bus) { struct pci_dev *dev; + pci_dev_lock(bus->self); list_for_each_entry(dev, &bus->devices, bus_list) { - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5283,8 +5285,10 @@ static void pci_bus_unlock(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); } /* Return 1 on successful lock, 0 on contention */ @@ -5292,15 +5296,15 @@ static int pci_bus_trylock(struct pci_bus *bus) { struct pci_dev *dev; + if (!pci_dev_trylock(bus->self)) + return 0; + list_for_each_entry(dev, &bus->devices, bus_list) { - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { - if (!pci_bus_trylock(dev->subordinate)) { - pci_dev_unlock(dev); + if (!pci_bus_trylock(dev->subordinate)) goto unlock; - } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5308,8 +5312,10 @@ static int pci_bus_trylock(struct pci_bus *bus) list_for_each_entry_continue_reverse(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); return 0; } @@ -5341,9 +5347,10 @@ static void pci_slot_lock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5369,14 +5376,13 @@ static int pci_slot_trylock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { if (!pci_bus_trylock(dev->subordinate)) { pci_dev_unlock(dev); goto unlock; } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5387,7 +5393,8 @@ static int pci_slot_trylock(struct pci_slot *slot) continue; if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } return 0; } -- 2.25.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] PCI: Add missing bridge lock to pci_bus_lock()
by liwei 26 Sep '24

26 Sep '24
From: Dan Williams <dan.j.williams(a)intel.com> mainline inclusion from mainline-v6.11-rc1 commit a4e772898f8bf2e7e1cf661a12c60a5612c4afab category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWL9 CVE: CVE-2024-46750 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- One of the true positives that the cfg_access_lock lockdep effort identified is this sequence: WARNING: CPU: 14 PID: 1 at drivers/pci/pci.c:4886 pci_bridge_secondary_bus_reset+0x5d/0x70 RIP: 0010:pci_bridge_secondary_bus_reset+0x5d/0x70 Call Trace: <TASK> ? __warn+0x8c/0x190 ? pci_bridge_secondary_bus_reset+0x5d/0x70 ? report_bug+0x1f8/0x200 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? pci_bridge_secondary_bus_reset+0x5d/0x70 pci_reset_bus+0x1d8/0x270 vmd_probe+0x778/0xa10 pci_device_probe+0x95/0x120 Where pci_reset_bus() users are triggering unlocked secondary bus resets. Ironically pci_bus_reset(), several calls down from pci_reset_bus(), uses pci_bus_lock() before issuing the reset which locks everything *but* the bridge itself. For the same motivation as adding: bridge = pci_upstream_bridge(dev); if (bridge) pci_dev_lock(bridge); to pci_reset_function() for the "bus" and "cxl_bus" reset cases, add pci_dev_lock() for @bus->self to pci_bus_lock(). Link: https://lore.kernel.org/r/171711747501.1628941.15217746952476635316.stgit@d… Reported-by: Imre Deak <imre.deak(a)intel.com> Closes: http://lore.kernel.org/r/6657833b3b5ae_14984b29437@dwillia2-xfh.jf.intel.co… Signed-off-by: Dan Williams <dan.j.williams(a)intel.com> Signed-off-by: Keith Busch <kbusch(a)kernel.org> [bhelgaas: squash in recursive locking deadlock fix from Keith Busch: https://lore.kernel.org/r/20240711193650.701834-1-kbusch@meta.com] Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Hans de Goede <hdegoede(a)redhat.com> Tested-by: Kalle Valo <kvalo(a)kernel.org> Reviewed-by: Dave Jiang <dave.jiang(a)intel.com> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/pci/pci.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 8ace56c8141b..5ca3201d4f3e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5265,10 +5265,12 @@ static void pci_bus_lock(struct pci_bus *bus) { struct pci_dev *dev; + pci_dev_lock(bus->self); list_for_each_entry(dev, &bus->devices, bus_list) { - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5280,8 +5282,10 @@ static void pci_bus_unlock(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); } /* Return 1 on successful lock, 0 on contention */ @@ -5289,15 +5293,15 @@ static int pci_bus_trylock(struct pci_bus *bus) { struct pci_dev *dev; + if (!pci_dev_trylock(bus->self)) + return 0; + list_for_each_entry(dev, &bus->devices, bus_list) { - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { - if (!pci_bus_trylock(dev->subordinate)) { - pci_dev_unlock(dev); + if (!pci_bus_trylock(dev->subordinate)) goto unlock; - } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5305,8 +5309,10 @@ static int pci_bus_trylock(struct pci_bus *bus) list_for_each_entry_continue_reverse(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); return 0; } @@ -5338,9 +5344,10 @@ static void pci_slot_lock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5366,14 +5373,13 @@ static int pci_slot_trylock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { if (!pci_bus_trylock(dev->subordinate)) { pci_dev_unlock(dev); goto unlock; } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5384,7 +5390,8 @@ static int pci_slot_trylock(struct pci_slot *slot) continue; if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } return 0; } -- 2.25.1
2 1
0 0
[PATCH openEuler-22.03-LTS-SP1] usb: dwc3: st: fix probed platform device ref count on probe error path
by liwei 26 Sep '24

26 Sep '24
From: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> mainline inclusion from mainline-v6.11-rc6 commit ddfcfeba891064b88bb844208b43bef2ef970f0c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR624 CVE: CVE-2024-46674 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- The probe function never performs any paltform device allocation, thus error path "undo_platform_dev_alloc" is entirely bogus. It drops the reference count from the platform device being probed. If error path is triggered, this will lead to unbalanced device reference counts and premature release of device resources, thus possible use-after-free when releasing remaining devm-managed resources. Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC") Cc: stable(a)vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen(a)synopsys.com> Reviewed-by: Patrice Chotard <patrice.chotard(a)foss.st.com> Link: https://lore.kernel.org/r/20240814093957.37940-1-krzysztof.kozlowski@linaro… Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/usb/dwc3/dwc3-st.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index e733be840545..a150855b4b05 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c @@ -219,10 +219,8 @@ static int st_dwc3_probe(struct platform_device *pdev) dwc3_data->regmap = regmap; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "syscfg-reg"); - if (!res) { - ret = -ENXIO; - goto undo_platform_dev_alloc; - } + if (!res) + return -ENXIO; dwc3_data->syscfg_reg_off = res->start; @@ -233,8 +231,7 @@ static int st_dwc3_probe(struct platform_device *pdev) devm_reset_control_get_exclusive(dev, "powerdown"); if (IS_ERR(dwc3_data->rstc_pwrdn)) { dev_err(&pdev->dev, "could not get power controller\n"); - ret = PTR_ERR(dwc3_data->rstc_pwrdn); - goto undo_platform_dev_alloc; + return PTR_ERR(dwc3_data->rstc_pwrdn); } /* Manage PowerDown */ @@ -300,8 +297,6 @@ static int st_dwc3_probe(struct platform_device *pdev) reset_control_assert(dwc3_data->rstc_rst); undo_powerdown: reset_control_assert(dwc3_data->rstc_pwrdn); -undo_platform_dev_alloc: - platform_device_put(pdev); return ret; } -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] PCI: Add missing bridge lock to pci_bus_lock()
by liwei 26 Sep '24

26 Sep '24
From: Dan Williams <dan.j.williams(a)intel.com> mainline inclusion from mainline-v6.11-rc1 commit a4e772898f8bf2e7e1cf661a12c60a5612c4afab category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IARWL9 CVE: CVE-2024-46750 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- One of the true positives that the cfg_access_lock lockdep effort identified is this sequence: WARNING: CPU: 14 PID: 1 at drivers/pci/pci.c:4886 pci_bridge_secondary_bus_reset+0x5d/0x70 RIP: 0010:pci_bridge_secondary_bus_reset+0x5d/0x70 Call Trace: <TASK> ? __warn+0x8c/0x190 ? pci_bridge_secondary_bus_reset+0x5d/0x70 ? report_bug+0x1f8/0x200 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? pci_bridge_secondary_bus_reset+0x5d/0x70 pci_reset_bus+0x1d8/0x270 vmd_probe+0x778/0xa10 pci_device_probe+0x95/0x120 Where pci_reset_bus() users are triggering unlocked secondary bus resets. Ironically pci_bus_reset(), several calls down from pci_reset_bus(), uses pci_bus_lock() before issuing the reset which locks everything *but* the bridge itself. For the same motivation as adding: bridge = pci_upstream_bridge(dev); if (bridge) pci_dev_lock(bridge); to pci_reset_function() for the "bus" and "cxl_bus" reset cases, add pci_dev_lock() for @bus->self to pci_bus_lock(). Link: https://lore.kernel.org/r/171711747501.1628941.15217746952476635316.stgit@d… Reported-by: Imre Deak <imre.deak(a)intel.com> Closes: http://lore.kernel.org/r/6657833b3b5ae_14984b29437@dwillia2-xfh.jf.intel.co… Signed-off-by: Dan Williams <dan.j.williams(a)intel.com> Signed-off-by: Keith Busch <kbusch(a)kernel.org> [bhelgaas: squash in recursive locking deadlock fix from Keith Busch: https://lore.kernel.org/r/20240711193650.701834-1-kbusch@meta.com] Signed-off-by: Bjorn Helgaas <bhelgaas(a)google.com> Tested-by: Hans de Goede <hdegoede(a)redhat.com> Tested-by: Kalle Valo <kvalo(a)kernel.org> Reviewed-by: Dave Jiang <dave.jiang(a)intel.com> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/pci/pci.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e58fe13c99e1..b93605616d4e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5035,10 +5035,12 @@ static void pci_bus_lock(struct pci_bus *bus) { struct pci_dev *dev; + pci_dev_lock(bus->self); list_for_each_entry(dev, &bus->devices, bus_list) { - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5050,8 +5052,10 @@ static void pci_bus_unlock(struct pci_bus *bus) list_for_each_entry(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); } /* Return 1 on successful lock, 0 on contention */ @@ -5059,15 +5063,15 @@ static int pci_bus_trylock(struct pci_bus *bus) { struct pci_dev *dev; + if (!pci_dev_trylock(bus->self)) + return 0; + list_for_each_entry(dev, &bus->devices, bus_list) { - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { - if (!pci_bus_trylock(dev->subordinate)) { - pci_dev_unlock(dev); + if (!pci_bus_trylock(dev->subordinate)) goto unlock; - } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5075,8 +5079,10 @@ static int pci_bus_trylock(struct pci_bus *bus) list_for_each_entry_continue_reverse(dev, &bus->devices, bus_list) { if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } + pci_dev_unlock(bus->self); return 0; } @@ -5108,9 +5114,10 @@ static void pci_slot_lock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - pci_dev_lock(dev); if (dev->subordinate) pci_bus_lock(dev->subordinate); + else + pci_dev_lock(dev); } } @@ -5136,14 +5143,13 @@ static int pci_slot_trylock(struct pci_slot *slot) list_for_each_entry(dev, &slot->bus->devices, bus_list) { if (!dev->slot || dev->slot != slot) continue; - if (!pci_dev_trylock(dev)) - goto unlock; if (dev->subordinate) { if (!pci_bus_trylock(dev->subordinate)) { pci_dev_unlock(dev); goto unlock; } - } + } else if (!pci_dev_trylock(dev)) + goto unlock; } return 1; @@ -5154,7 +5160,8 @@ static int pci_slot_trylock(struct pci_slot *slot) continue; if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev); + else + pci_dev_unlock(dev); } return 0; } -- 2.25.1
2 1
0 0
[PATCH openEuler-1.0-LTS] usb: dwc3: st: fix probed platform device ref count on probe error path
by liwei 26 Sep '24

26 Sep '24
From: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> mainline inclusion from mainline-v6.11-rc6 commit ddfcfeba891064b88bb844208b43bef2ef970f0c category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAR624 CVE: CVE-2024-46674 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- The probe function never performs any paltform device allocation, thus error path "undo_platform_dev_alloc" is entirely bogus. It drops the reference count from the platform device being probed. If error path is triggered, this will lead to unbalanced device reference counts and premature release of device resources, thus possible use-after-free when releasing remaining devm-managed resources. Fixes: f83fca0707c6 ("usb: dwc3: add ST dwc3 glue layer to manage dwc3 HC") Cc: stable(a)vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org> Acked-by: Thinh Nguyen <Thinh.Nguyen(a)synopsys.com> Reviewed-by: Patrice Chotard <patrice.chotard(a)foss.st.com> Link: https://lore.kernel.org/r/20240814093957.37940-1-krzysztof.kozlowski@linaro… Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org> Signed-off-by: liwei <liwei728(a)huawei.com> --- drivers/usb/dwc3/dwc3-st.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c index 16081383c401..6127505770ce 100644 --- a/drivers/usb/dwc3/dwc3-st.c +++ b/drivers/usb/dwc3/dwc3-st.c @@ -219,10 +219,8 @@ static int st_dwc3_probe(struct platform_device *pdev) dwc3_data->regmap = regmap; res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "syscfg-reg"); - if (!res) { - ret = -ENXIO; - goto undo_platform_dev_alloc; - } + if (!res) + return -ENXIO; dwc3_data->syscfg_reg_off = res->start; @@ -233,8 +231,7 @@ static int st_dwc3_probe(struct platform_device *pdev) devm_reset_control_get_exclusive(dev, "powerdown"); if (IS_ERR(dwc3_data->rstc_pwrdn)) { dev_err(&pdev->dev, "could not get power controller\n"); - ret = PTR_ERR(dwc3_data->rstc_pwrdn); - goto undo_platform_dev_alloc; + return PTR_ERR(dwc3_data->rstc_pwrdn); } /* Manage PowerDown */ @@ -296,8 +293,6 @@ static int st_dwc3_probe(struct platform_device *pdev) reset_control_assert(dwc3_data->rstc_rst); undo_powerdown: reset_control_assert(dwc3_data->rstc_pwrdn); -undo_platform_dev_alloc: - platform_device_put(pdev); return ret; } -- 2.25.1
2 1
0 0
  • ← Newer
  • 1
  • ...
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • ...
  • 188
  • Older →

HyperKitty Powered by HyperKitty