mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

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

Kernel

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

  • 52 participants
  • 18285 discussions
[PATCH OLK-6.6] bpftool: Fix undefined behavior in qsort(NULL, 0, ...)
by Xiaomeng Zhang 22 Nov '24

22 Nov '24
From: Kuan-Wei Chiu <visitorckw(a)gmail.com> stable inclusion from stable-v6.6.55 commit c2d9f9a7837ab29ccae0c42252f17d436bf0a501 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB0MX4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id… -------------------------------- [ Upstream commit f04e2ad394e2755d0bb2d858ecb5598718bf00d5 ] When netfilter has no entry to display, qsort is called with qsort(NULL, 0, ...). This results in undefined behavior, as UBSan reports: net.c:827:2: runtime error: null pointer passed as argument 1, which is declared to never be null Although the C standard does not explicitly state whether calling qsort with a NULL pointer when the size is 0 constitutes undefined behavior, Section 7.1.4 of the C standard (Use of library functions) mentions: "Each of the following statements applies unless explicitly stated otherwise in the detailed descriptions that follow: If an argument to a function has an invalid value (such as a value outside the domain of the function, or a pointer outside the address space of the program, or a null pointer, or a pointer to non-modifiable storage when the corresponding parameter is not const-qualified) or a type (after promotion) not expected by a function with variable number of arguments, the behavior is undefined." To avoid this, add an early return when nf_link_info is NULL to prevent calling qsort with a NULL pointer. Signed-off-by: Kuan-Wei Chiu <visitorckw(a)gmail.com> Signed-off-by: Andrii Nakryiko <andrii(a)kernel.org> Reviewed-by: Quentin Monnet <qmo(a)kernel.org> Link: https://lore.kernel.org/bpf/20240910150207.3179306-1-visitorckw@gmail.com Signed-off-by: Sasha Levin <sashal(a)kernel.org> Signed-off-by: Wen Zhiwei <wenzhiwei(a)kylinos.cn> --- tools/bpf/bpftool/net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c index fd54ff436493..28e9417a5c2e 100644 --- a/tools/bpf/bpftool/net.c +++ b/tools/bpf/bpftool/net.c @@ -819,6 +819,9 @@ static void show_link_netfilter(void) nf_link_count++; } + if (!nf_link_info) + return; + qsort(nf_link_info, nf_link_count, sizeof(*nf_link_info), netfilter_link_compar); for (id = 0; id < nf_link_count; id++) { -- 2.34.1
2 1
0 0
[openeuler:OLK-6.6 1513/1513] drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:210:33: error: field 'hinic_ieee_ets_default' has incomplete type
by kernel test robot 22 Nov '24

22 Nov '24
Hi Zhou, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: ab293c3a32ba6594fd24cd7ecd4a4a00ede0cd65 commit: 9c1c9598010fbb9daa1e2a67d23830092fb6246a [1513/1513] net/hinic: Update Huawei Intelligent Network Card Driver: hinic config: arm64-randconfig-004-20241122 (https://download.01.org/0day-ci/archive/20241122/202411221143.jAhVHv3i-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241122/202411221143.jAhVHv3i-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/202411221143.jAhVHv3i-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/net/ethernet/huawei/hinic/hinic_tx.c:39: >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:210:33: error: field 'hinic_ieee_ets_default' has incomplete type 210 | struct ieee_ets hinic_ieee_ets_default; | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:211:33: error: field 'hinic_ieee_ets' has incomplete type 211 | struct ieee_ets hinic_ieee_ets; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:212:33: error: field 'hinic_ieee_pfc' has incomplete type 212 | struct ieee_pfc hinic_ieee_pfc; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_tx.c:913:5: warning: no previous prototype for 'hinic_setup_tx_wqe' [-Wmissing-prototypes] 913 | int hinic_setup_tx_wqe(struct hinic_txq *txq) | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_tx.c:1100:5: warning: no previous prototype for 'hinic_stop_sq' [-Wmissing-prototypes] 1100 | int hinic_stop_sq(struct hinic_txq *txq) | ^~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/huawei/hinic/hinic_sriov.c:25: >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:210:33: error: field 'hinic_ieee_ets_default' has incomplete type 210 | struct ieee_ets hinic_ieee_ets_default; | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:211:33: error: field 'hinic_ieee_ets' has incomplete type 211 | struct ieee_ets hinic_ieee_ets; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:212:33: error: field 'hinic_ieee_pfc' has incomplete type 212 | struct ieee_pfc hinic_ieee_pfc; | ^~~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/huawei/hinic/hinic_nictool.c:28: >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:210:33: error: field 'hinic_ieee_ets_default' has incomplete type 210 | struct ieee_ets hinic_ieee_ets_default; | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:211:33: error: field 'hinic_ieee_ets' has incomplete type 211 | struct ieee_ets hinic_ieee_ets; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:212:33: error: field 'hinic_ieee_pfc' has incomplete type 212 | struct ieee_pfc hinic_ieee_pfc; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:698:5: warning: no previous prototype for 'get_pfc_info' [-Wmissing-prototypes] 698 | int get_pfc_info(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:720:5: warning: no previous prototype for 'set_pfc_control' [-Wmissing-prototypes] 720 | int set_pfc_control(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:752:5: warning: no previous prototype for 'set_ets' [-Wmissing-prototypes] 752 | int set_ets(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:827:5: warning: no previous prototype for 'get_support_up' [-Wmissing-prototypes] 827 | int get_support_up(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:855:5: warning: no previous prototype for 'get_support_tc' [-Wmissing-prototypes] 855 | int get_support_tc(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:875:5: warning: no previous prototype for 'get_ets_info' [-Wmissing-prototypes] 875 | int get_ets_info(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nictool.c:893:5: warning: no previous prototype for 'set_pfc_priority' [-Wmissing-prototypes] 893 | int set_pfc_priority(struct hinic_nic_dev *nic_dev, void *buf_in, | ^~~~~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:34: >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:210:33: error: field 'hinic_ieee_ets_default' has incomplete type 210 | struct ieee_ets hinic_ieee_ets_default; | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:211:33: error: field 'hinic_ieee_ets' has incomplete type 211 | struct ieee_ets hinic_ieee_ets; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:212:33: error: field 'hinic_ieee_pfc' has incomplete type 212 | struct ieee_pfc hinic_ieee_pfc; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:271:5: warning: no previous prototype for 'hinic_get_io_stats_size' [-Wmissing-prototypes] 271 | u32 hinic_get_io_stats_size(struct hinic_nic_dev *nic_dev) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:318:6: warning: no previous prototype for 'hinic_get_io_stats' [-Wmissing-prototypes] 318 | void hinic_get_io_stats(struct hinic_nic_dev *nic_dev, | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:1858:6: warning: no previous prototype for 'hinic_lp_test' [-Wmissing-prototypes] 1858 | void hinic_lp_test(struct net_device *netdev, struct ethtool_test *eth_test, | ^~~~~~~~~~~~~ -- In file included from drivers/net/ethernet/huawei/hinic/hinic_dcb.c:32: >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:210:33: error: field 'hinic_ieee_ets_default' has incomplete type 210 | struct ieee_ets hinic_ieee_ets_default; | ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:211:33: error: field 'hinic_ieee_ets' has incomplete type 211 | struct ieee_ets hinic_ieee_ets; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h:212:33: error: field 'hinic_ieee_pfc' has incomplete type 212 | struct ieee_pfc hinic_ieee_pfc; | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:62:6: warning: no previous prototype for 'hinic_dcb_config_init' [-Wmissing-prototypes] 62 | void hinic_dcb_config_init(struct hinic_nic_dev *nic_dev, | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:95:6: warning: no previous prototype for 'hinic_init_ieee_settings' [-Wmissing-prototypes] 95 | void hinic_init_ieee_settings(struct hinic_nic_dev *nic_dev) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_init_ieee_settings': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:103:33: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 103 | memset(ets, 0x0, sizeof(struct ieee_ets)); | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:104:54: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 104 | memset(&nic_dev->hinic_ieee_ets, 0x0, sizeof(struct ieee_ets)); | ^~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:105:12: error: invalid use of undefined type 'struct ieee_ets' 105 | ets->ets_cap = dcb_cfg->pg_tcs; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:108:20: error: invalid use of undefined type 'struct ieee_ets' 108 | ets->tc_tsa[i] = tc_attr->prio_type ? | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:110:20: error: invalid use of undefined type 'struct ieee_ets' 110 | ets->tc_tx_bw[i] = nic_dev->dcb_cfg.bw_pct[HINIC_DCB_CFG_TX][i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:111:20: error: invalid use of undefined type 'struct ieee_ets' 111 | ets->tc_rx_bw[i] = nic_dev->dcb_cfg.bw_pct[HINIC_DCB_CFG_RX][i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:112:20: error: invalid use of undefined type 'struct ieee_ets' 112 | ets->prio_tc[i] = hinic_dcb_get_tc(dcb_cfg, | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:115:54: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 115 | memcpy(&nic_dev->hinic_ieee_ets, ets, sizeof(struct ieee_ets)); | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:117:33: error: invalid application of 'sizeof' to incomplete type 'struct ieee_pfc' 117 | memset(pfc, 0x0, sizeof(struct ieee_pfc)); | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:118:12: error: invalid use of undefined type 'struct ieee_pfc' 118 | pfc->pfc_cap = dcb_cfg->pfc_tcs; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:121:28: error: invalid use of undefined type 'struct ieee_pfc' 121 | pfc->pfc_en |= (u8)BIT(i); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcb_init': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:244:29: error: 'DCB_CAP_DCBX_HOST' undeclared (first use in this function) 244 | nic_dev->dcbx_cap = DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE; | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:244:29: note: each undeclared identifier is reported only once for each function it appears in drivers/net/ethernet/huawei/hinic/hinic_dcb.c:244:49: error: 'DCB_CAP_DCBX_VER_CEE' undeclared (first use in this function) 244 | nic_dev->dcbx_cap = DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE; | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: At top level: drivers/net/ethernet/huawei/hinic/hinic_dcb.c:258:6: warning: no previous prototype for 'hinic_set_prio_tc_map' [-Wmissing-prototypes] 258 | void hinic_set_prio_tc_map(struct hinic_nic_dev *nic_dev) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_set_state': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:380:35: error: 'DCB_CAP_DCBX_VER_CEE' undeclared (first use in this function) 380 | if (!(nic_dev->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_set_pg_tc_cfg_tx': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:475:21: error: 'DCB_ATTR_VALUE_UNDEFINED' undeclared (first use in this function) 475 | if (prio != DCB_ATTR_VALUE_UNDEFINED) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_set_pg_tc_cfg_rx': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:507:21: error: 'DCB_ATTR_VALUE_UNDEFINED' undeclared (first use in this function) 507 | if (prio != DCB_ATTR_VALUE_UNDEFINED) | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_getcap': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:689:14: error: 'DCB_CAP_ATTR_PG' undeclared (first use in this function) 689 | case DCB_CAP_ATTR_PG: | ^~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:692:14: error: 'DCB_CAP_ATTR_PFC' undeclared (first use in this function) 692 | case DCB_CAP_ATTR_PFC: | ^~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:695:14: error: 'DCB_CAP_ATTR_UP2TC' undeclared (first use in this function) 695 | case DCB_CAP_ATTR_UP2TC: | ^~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:698:14: error: 'DCB_CAP_ATTR_PG_TCS' undeclared (first use in this function) 698 | case DCB_CAP_ATTR_PG_TCS: | ^~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:701:14: error: 'DCB_CAP_ATTR_PFC_TCS' undeclared (first use in this function) 701 | case DCB_CAP_ATTR_PFC_TCS: | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:704:14: error: 'DCB_CAP_ATTR_GSP' undeclared (first use in this function) 704 | case DCB_CAP_ATTR_GSP: | ^~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:707:14: error: 'DCB_CAP_ATTR_BCN' undeclared (first use in this function) 707 | case DCB_CAP_ATTR_BCN: | ^~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:710:14: error: 'DCB_CAP_ATTR_DCBX' undeclared (first use in this function) 710 | case DCB_CAP_ATTR_DCBX: | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function '__set_hw_ets': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1026:42: error: 'DCB_CAP_DCBX_VER_IEEE' undeclared (first use in this function) 1026 | if ((nic_dev->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) { | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1027:44: error: invalid use of undefined type 'struct ieee_ets' 1027 | up_tc[cos] = my_ets->prio_tc[i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1028:46: error: invalid use of undefined type 'struct ieee_ets' 1028 | up_pgid[cos] = my_ets->prio_tc[i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1031:40: error: invalid use of undefined type 'struct ieee_ets' 1031 | (my_ets->tc_tsa[cos] == IEEE8021Q_TSA_STRICT) ? | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1049:42: error: invalid use of undefined type 'struct ieee_ets' 1049 | pg_bw[i] = my_ets->tc_tx_bw[i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_set_df_ieee_cfg': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1126:16: error: variable 'pfc' has initializer but incomplete type 1126 | struct ieee_pfc pfc = {0}; | ^~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1126:32: warning: excess elements in struct initializer 1126 | struct ieee_pfc pfc = {0}; | ^ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1126:32: note: (near initialization for 'pfc') >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1126:25: error: storage size of 'pfc' isn't known 1126 | struct ieee_pfc pfc = {0}; | ^~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1131:35: error: 'DCB_CAP_DCBX_VER_IEEE' undeclared (first use in this function) 1131 | if (!(nic_dev->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1134:48: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 1134 | if (memcmp(my_ets, ets_default, sizeof(struct ieee_ets))) | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1137:19: error: invalid use of undefined type 'struct ieee_pfc' 1137 | if (my_pfc->pfc_en) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1149:52: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 1149 | memcpy(my_ets, ets_default, sizeof(struct ieee_ets)); | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1153:23: error: invalid use of undefined type 'struct ieee_pfc' 1153 | my_pfc->pfc_en = 0; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1126:25: warning: unused variable 'pfc' [-Wunused-variable] 1126 | struct ieee_pfc pfc = {0}; | ^~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: At top level: drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1201:4: warning: no previous prototype for 'hinic_dcbnl_set_all' [-Wmissing-prototypes] 1201 | u8 hinic_dcbnl_set_all(struct net_device *netdev) | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_set_all': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1208:35: error: 'DCB_CAP_DCBX_VER_CEE' undeclared (first use in this function) 1208 | if (!(nic_dev->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) | ^~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_ieee_get_ets': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1279:12: error: invalid use of undefined type 'struct ieee_ets' 1279 | ets->ets_cap = my_ets->ets_cap; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1279:30: error: invalid use of undefined type 'struct ieee_ets' 1279 | ets->ets_cap = my_ets->ets_cap; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1280:19: error: invalid use of undefined type 'struct ieee_ets' 1280 | memcpy(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1280:37: error: invalid use of undefined type 'struct ieee_ets' 1280 | memcpy(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1280:59: error: invalid use of undefined type 'struct ieee_ets' 1280 | memcpy(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1281:19: error: invalid use of undefined type 'struct ieee_ets' 1281 | memcpy(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1281:37: error: invalid use of undefined type 'struct ieee_ets' 1281 | memcpy(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1281:59: error: invalid use of undefined type 'struct ieee_ets' 1281 | memcpy(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1282:19: error: invalid use of undefined type 'struct ieee_ets' 1282 | memcpy(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1282:36: error: invalid use of undefined type 'struct ieee_ets' 1282 | memcpy(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1282:57: error: invalid use of undefined type 'struct ieee_ets' 1282 | memcpy(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1283:19: error: invalid use of undefined type 'struct ieee_ets' 1283 | memcpy(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1283:35: error: invalid use of undefined type 'struct ieee_ets' 1283 | memcpy(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1283:55: error: invalid use of undefined type 'struct ieee_ets' 1283 | memcpy(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_ieee_set_ets': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1294:25: error: storage size of 'back_ets' isn't known 1294 | struct ieee_ets back_ets; | ^~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1299:35: error: 'DCB_CAP_DCBX_VER_IEEE' undeclared (first use in this function) 1299 | if (!(nic_dev->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1302:24: error: invalid use of undefined type 'struct ieee_ets' 1302 | if (!memcmp(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1302:42: error: invalid use of undefined type 'struct ieee_ets' 1302 | if (!memcmp(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1302:64: error: invalid use of undefined type 'struct ieee_ets' 1302 | if (!memcmp(ets->tc_tx_bw, my_ets->tc_tx_bw, sizeof(ets->tc_tx_bw)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1303:24: error: invalid use of undefined type 'struct ieee_ets' 1303 | !memcmp(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1303:42: error: invalid use of undefined type 'struct ieee_ets' 1303 | !memcmp(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1303:64: error: invalid use of undefined type 'struct ieee_ets' 1303 | !memcmp(ets->tc_rx_bw, my_ets->tc_rx_bw, sizeof(ets->tc_rx_bw)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1304:24: error: invalid use of undefined type 'struct ieee_ets' 1304 | !memcmp(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1304:41: error: invalid use of undefined type 'struct ieee_ets' 1304 | !memcmp(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1304:62: error: invalid use of undefined type 'struct ieee_ets' 1304 | !memcmp(ets->prio_tc, my_ets->prio_tc, sizeof(ets->prio_tc)) && | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1305:24: error: invalid use of undefined type 'struct ieee_ets' 1305 | !memcmp(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa))) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1305:40: error: invalid use of undefined type 'struct ieee_ets' 1305 | !memcmp(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa))) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1305:60: error: invalid use of undefined type 'struct ieee_ets' 1305 | !memcmp(ets->tc_tsa, my_ets->tc_tsa, sizeof(ets->tc_tsa))) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1309:32: error: invalid use of undefined type 'struct ieee_ets' 1309 | total_bw += ets->tc_tx_bw[i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1314:24: error: invalid use of undefined type 'struct ieee_ets' 1314 | if (ets->prio_tc[i] > max_tc) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1315:37: error: invalid use of undefined type 'struct ieee_ets' 1315 | max_tc = ets->prio_tc[i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1324:42: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 1324 | memcpy(&back_ets, my_ets, sizeof(struct ieee_ets)); | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1325:22: error: invalid use of undefined type 'struct ieee_ets' 1325 | memcpy(my_ets->tc_tx_bw, ets->tc_tx_bw, sizeof(ets->tc_tx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1325:37: error: invalid use of undefined type 'struct ieee_ets' 1325 | memcpy(my_ets->tc_tx_bw, ets->tc_tx_bw, sizeof(ets->tc_tx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1325:59: error: invalid use of undefined type 'struct ieee_ets' 1325 | memcpy(my_ets->tc_tx_bw, ets->tc_tx_bw, sizeof(ets->tc_tx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1326:22: error: invalid use of undefined type 'struct ieee_ets' 1326 | memcpy(my_ets->tc_rx_bw, ets->tc_rx_bw, sizeof(ets->tc_rx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1326:37: error: invalid use of undefined type 'struct ieee_ets' 1326 | memcpy(my_ets->tc_rx_bw, ets->tc_rx_bw, sizeof(ets->tc_rx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1326:59: error: invalid use of undefined type 'struct ieee_ets' 1326 | memcpy(my_ets->tc_rx_bw, ets->tc_rx_bw, sizeof(ets->tc_rx_bw)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1327:22: error: invalid use of undefined type 'struct ieee_ets' 1327 | memcpy(my_ets->prio_tc, ets->prio_tc, sizeof(ets->prio_tc)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1327:36: error: invalid use of undefined type 'struct ieee_ets' 1327 | memcpy(my_ets->prio_tc, ets->prio_tc, sizeof(ets->prio_tc)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1327:57: error: invalid use of undefined type 'struct ieee_ets' 1327 | memcpy(my_ets->prio_tc, ets->prio_tc, sizeof(ets->prio_tc)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1328:22: error: invalid use of undefined type 'struct ieee_ets' 1328 | memcpy(my_ets->tc_tsa, ets->tc_tsa, sizeof(ets->tc_tsa)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1328:35: error: invalid use of undefined type 'struct ieee_ets' 1328 | memcpy(my_ets->tc_tsa, ets->tc_tsa, sizeof(ets->tc_tsa)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1328:55: error: invalid use of undefined type 'struct ieee_ets' 1328 | memcpy(my_ets->tc_tsa, ets->tc_tsa, sizeof(ets->tc_tsa)); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1336:58: error: invalid application of 'sizeof' to incomplete type 'struct ieee_ets' 1336 | memcpy(my_ets, &back_ets, sizeof(struct ieee_ets)); | ^~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1294:25: warning: unused variable 'back_ets' [-Wunused-variable] 1294 | struct ieee_ets back_ets; | ^~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_ieee_get_pfc': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1360:12: error: invalid use of undefined type 'struct ieee_pfc' 1360 | pfc->pfc_en = my_pfc->pfc_en; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1360:29: error: invalid use of undefined type 'struct ieee_pfc' 1360 | pfc->pfc_en = my_pfc->pfc_en; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1361:12: error: invalid use of undefined type 'struct ieee_pfc' 1361 | pfc->pfc_cap = my_pfc->pfc_cap; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1361:30: error: invalid use of undefined type 'struct ieee_pfc' 1361 | pfc->pfc_cap = my_pfc->pfc_cap; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_ieee_set_pfc': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1378:35: error: 'DCB_CAP_DCBX_VER_IEEE' undeclared (first use in this function) 1378 | if (!(nic_dev->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1381:19: error: invalid use of undefined type 'struct ieee_pfc' 1381 | if (my_pfc->pfc_en == pfc->pfc_en) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1381:34: error: invalid use of undefined type 'struct ieee_pfc' 1381 | if (my_pfc->pfc_en == pfc->pfc_en) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1384:22: error: invalid use of undefined type 'struct ieee_pfc' 1384 | pfc_map = pfc->pfc_en & nic_dev->up_valid_bitmap; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1385:30: error: invalid use of undefined type 'struct ieee_pfc' 1385 | outof_range_pfc = pfc->pfc_en & (~nic_dev->up_valid_bitmap); | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1400:27: error: invalid use of undefined type 'struct ieee_ets' 1400 | if (my_ets->prio_tc[i] > max_tc) | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1401:40: error: invalid use of undefined type 'struct ieee_ets' 1401 | max_tc = my_ets->prio_tc[i]; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1415:15: error: invalid use of undefined type 'struct ieee_pfc' 1415 | my_pfc->pfc_en = pfc->pfc_en; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1415:29: error: invalid use of undefined type 'struct ieee_pfc' 1415 | my_pfc->pfc_en = pfc->pfc_en; | ^~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_getnumtcs': >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1432:14: error: 'DCB_NUMTCS_ATTR_PG' undeclared (first use in this function) 1432 | case DCB_NUMTCS_ATTR_PG: | ^~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1435:14: error: 'DCB_NUMTCS_ATTR_PFC' undeclared (first use in this function) 1435 | case DCB_NUMTCS_ATTR_PFC: | ^~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: In function 'hinic_dcbnl_setdcbx': drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1476:22: error: 'DCB_CAP_DCBX_VER_IEEE' undeclared (first use in this function) 1476 | if (((mode & DCB_CAP_DCBX_VER_IEEE) && (mode & DCB_CAP_DCBX_VER_CEE)) || | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1476:56: error: 'DCB_CAP_DCBX_VER_CEE' undeclared (first use in this function) 1476 | if (((mode & DCB_CAP_DCBX_VER_IEEE) && (mode & DCB_CAP_DCBX_VER_CEE)) || | ^~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1477:22: error: 'DCB_CAP_DCBX_LLD_MANAGED' undeclared (first use in this function) 1477 | ((mode & DCB_CAP_DCBX_LLD_MANAGED) && | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1478:23: error: 'DCB_CAP_DCBX_HOST' undeclared (first use in this function) 1478 | (!(mode & DCB_CAP_DCBX_HOST)))) { | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c: At top level: drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1519:14: error: variable 'hinic_dcbnl_ops' has initializer but incomplete type 1519 | const struct dcbnl_rtnl_ops hinic_dcbnl_ops = { | ^~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1521:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'ieee_getets' 1521 | .ieee_getets = hinic_dcbnl_ieee_get_ets, | ^~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1521:27: warning: excess elements in struct initializer 1521 | .ieee_getets = hinic_dcbnl_ieee_get_ets, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1521:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1522:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'ieee_setets' 1522 | .ieee_setets = hinic_dcbnl_ieee_set_ets, | ^~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1522:27: warning: excess elements in struct initializer 1522 | .ieee_setets = hinic_dcbnl_ieee_set_ets, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1522:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1523:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'ieee_getpfc' 1523 | .ieee_getpfc = hinic_dcbnl_ieee_get_pfc, | ^~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1523:27: warning: excess elements in struct initializer 1523 | .ieee_getpfc = hinic_dcbnl_ieee_get_pfc, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1523:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1524:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'ieee_setpfc' 1524 | .ieee_setpfc = hinic_dcbnl_ieee_set_pfc, | ^~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1524:27: warning: excess elements in struct initializer 1524 | .ieee_setpfc = hinic_dcbnl_ieee_set_pfc, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1524:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1527:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'getstate' 1527 | .getstate = hinic_dcbnl_get_state, | ^~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1527:27: warning: excess elements in struct initializer 1527 | .getstate = hinic_dcbnl_get_state, | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1527:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1528:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'setstate' 1528 | .setstate = hinic_dcbnl_set_state, | ^~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1528:27: warning: excess elements in struct initializer 1528 | .setstate = hinic_dcbnl_set_state, | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1528:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1529:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'getpermhwaddr' 1529 | .getpermhwaddr = hinic_dcbnl_get_perm_hw_addr, | ^~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1529:27: warning: excess elements in struct initializer 1529 | .getpermhwaddr = hinic_dcbnl_get_perm_hw_addr, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1529:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1530:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'setpgtccfgtx' 1530 | .setpgtccfgtx = hinic_dcbnl_set_pg_tc_cfg_tx, | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1530:27: warning: excess elements in struct initializer 1530 | .setpgtccfgtx = hinic_dcbnl_set_pg_tc_cfg_tx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1530:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1531:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'setpgbwgcfgtx' 1531 | .setpgbwgcfgtx = hinic_dcbnl_set_pg_bwg_cfg_tx, | ^~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1531:27: warning: excess elements in struct initializer 1531 | .setpgbwgcfgtx = hinic_dcbnl_set_pg_bwg_cfg_tx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1531:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1532:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'setpgtccfgrx' 1532 | .setpgtccfgrx = hinic_dcbnl_set_pg_tc_cfg_rx, | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1532:27: warning: excess elements in struct initializer 1532 | .setpgtccfgrx = hinic_dcbnl_set_pg_tc_cfg_rx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1532:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1533:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'setpgbwgcfgrx' 1533 | .setpgbwgcfgrx = hinic_dcbnl_set_pg_bwg_cfg_rx, | ^~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1533:27: warning: excess elements in struct initializer 1533 | .setpgbwgcfgrx = hinic_dcbnl_set_pg_bwg_cfg_rx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1533:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1534:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'getpgtccfgtx' 1534 | .getpgtccfgtx = hinic_dcbnl_get_pg_tc_cfg_tx, | ^~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1534:27: warning: excess elements in struct initializer 1534 | .getpgtccfgtx = hinic_dcbnl_get_pg_tc_cfg_tx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1534:27: note: (near initialization for 'hinic_dcbnl_ops') drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1535:10: error: 'const struct dcbnl_rtnl_ops' has no member named 'getpgbwgcfgtx' 1535 | .getpgbwgcfgtx = hinic_dcbnl_get_pg_bwg_cfg_tx, | ^~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1535:27: warning: excess elements in struct initializer 1535 | .getpgbwgcfgtx = hinic_dcbnl_get_pg_bwg_cfg_tx, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_dcb.c:1535:27: note: (near initialization for 'hinic_dcbnl_ops') .. vim +/hinic_ieee_ets_default +210 drivers/net/ethernet/huawei/hinic/hinic_nic_dev.h 153 154 struct hinic_nic_dev { 155 struct pci_dev *pdev; 156 struct net_device *netdev; 157 void *hwdev; 158 159 int poll_weight; 160 161 unsigned long *vlan_bitmap; 162 163 u16 num_qps; 164 u16 max_qps; 165 166 u32 msg_enable; 167 unsigned long flags; 168 169 u16 sq_depth; 170 u16 rq_depth; 171 172 /* mapping from priority */ 173 u8 sq_cos_mapping[HINIC_DCB_UP_MAX]; 174 u8 default_cos_id; 175 struct hinic_txq *txqs; 176 struct hinic_rxq *rxqs; 177 178 struct nic_service_cap nic_cap; 179 180 struct irq_info *qps_irq_info; 181 struct hinic_irq *irq_cfg; 182 struct work_struct rx_mode_work; 183 struct delayed_work moderation_task; 184 struct workqueue_struct *workq; 185 186 struct list_head uc_filter_list; 187 struct list_head mc_filter_list; 188 unsigned long rx_mod_state; 189 int netdev_uc_cnt; 190 int netdev_mc_cnt; 191 int lb_test_rx_idx; 192 int lb_pkt_len; 193 u8 *lb_test_rx_buf; 194 195 u8 rss_tmpl_idx; 196 u16 num_rss; 197 u16 rss_limit; 198 u8 rss_hash_engine; 199 struct nic_rss_type rss_type; 200 u8 *rss_hkey_user; 201 /* hkey in big endian */ 202 u32 *rss_hkey_user_be; 203 u32 *rss_indir_user; 204 205 u8 dcbx_cap; 206 u32 dcb_changes; 207 u8 max_cos; 208 u8 up_valid_bitmap; 209 u8 up_cos[HINIC_DCB_UP_MAX]; > 210 struct ieee_ets hinic_ieee_ets_default; > 211 struct ieee_ets hinic_ieee_ets; 212 struct ieee_pfc hinic_ieee_pfc; 213 struct hinic_dcb_config dcb_cfg; 214 struct hinic_dcb_config tmp_dcb_cfg; 215 struct hinic_dcb_config save_dcb_cfg; 216 unsigned long dcb_flags; 217 int disable_port_cnt; 218 /* lock for disable or enable traffic flow */ 219 struct semaphore dcb_sem; 220 221 bool heart_status; 222 223 struct hinic_intr_coal_info *intr_coalesce; 224 unsigned long last_moder_jiffies; 225 u32 adaptive_rx_coal; 226 u8 intr_coal_set_flag; 227 u32 his_link_speed; 228 /* interrupt coalesce must be different in virtual machine */ 229 bool in_vm; 230 bool is_vm_slave; 231 int is_bm_slave; 232 struct hinic_nic_stats stats; 233 /* lock for nic resource */ 234 struct mutex nic_mutex; 235 bool force_port_disable; 236 struct semaphore port_state_sem; 237 u8 link_status; 238 239 struct hinic_environment_info env_info; 240 struct hinic_adaptive_cfg adaptive_cfg; 241 242 /* pangea cpu affinity setting */ 243 bool force_affinity; 244 cpumask_t affinity_mask; 245 246 u32 lro_replenish_thld; 247 u16 rx_buff_len; 248 u32 page_order; 249 }; 250 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6] rseq/mm_cid: change KABI consistency interface
by He Yujie 22 Nov '24

22 Nov '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB1OJX -------------------------------- The KABI consistency interface of the mmcid data structure is changed from KABI_REPLACE to KABI_DEPRECATE. Fixes: 7a35fa06727d ("rseq/mm_cid: change the mm_cid macro default status and keep KABI consistent") Signed-off-by: He Yujie <coka.heyujie(a)huawei.com> --- include/linux/mm_types.h | 5 ++--- include/linux/sched.h | 11 +++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index fdc047bdbc49..4b9a8723d3eb 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -788,9 +788,8 @@ struct mm_struct { */ unsigned long mm_cid_next_scan; #else - KABI_REPLACE(struct mm_cid __percpu *pcpu_cid, - struct mm_cid __percpu *pcpu_cid) - KABI_REPLACE(unsigned long mm_cid_next_scan, unsigned long mm_cid_next_scan) + KABI_DEPRECATE(struct mm_cid __percpu *, pcpu_cid) + KABI_DEPRECATE(unsigned long, mm_cid_next_scan) #endif #ifdef CONFIG_MMU atomic_long_t pgtables_bytes; /* size of all page tables */ diff --git a/include/linux/sched.h b/include/linux/sched.h index b8be76b0c120..b8abb84382db 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1358,12 +1358,11 @@ struct task_struct { int mm_cid_active; /* Whether cid bitmap is active */ struct callback_head cid_work; #else - KABI_REPLACE(int mm_cid, int mm_cid) - KABI_REPLACE(int last_mm_cid, int last_mm_cid) - KABI_REPLACE(int migrate_from_cpu, int migrate_from_cpu) - KABI_REPLACE(int mm_cid_active, int mm_cid_active) - KABI_REPLACE(struct callback_head cid_work, - struct callback_head cid_work) + KABI_DEPRECATE(int, mm_cid) + KABI_DEPRECATE(int, last_mm_cid) + KABI_DEPRECATE(int, migrate_from_cpu) + KABI_DEPRECATE(int, mm_cid_active) + KABI_DEPRECATE(struct callback_head, cid_work) #endif struct tlbflush_unmap_batch tlb_ubc; -- 2.34.1
2 1
0 0
[PATCH OLK-6.6] ima: rot: remove misguiding message printing
by GONG Ruiqi 22 Nov '24

22 Nov '24
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IB5YWN CVE: NA -------------------------------- Remove the ".. failed to self-initialize" printing following the failure of an RoT candidate's initialization, as it may raise unnessary concerns from users, who may be misguided and think this message indicates some sort of serious problems. Fixes: 036012386e44 ("ima: rot: Introduce basic framework") Signed-off-by: GONG Ruiqi <gongruiqi1(a)huawei.com> --- security/integrity/ima/ima_rot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/security/integrity/ima/ima_rot.c b/security/integrity/ima/ima_rot.c index 45d2ea314790..9c73389e2220 100644 --- a/security/integrity/ima/ima_rot.c +++ b/security/integrity/ima/ima_rot.c @@ -79,7 +79,6 @@ struct ima_rot * __init ima_rot_init(void) pr_info("%s initialized and taken as IMA RoT\n", ima_rots[i].name); return &ima_rots[i]; } - pr_info("%s failed to self-initialize\n", ima_rots[i].name); } return NULL; -- 2.25.1
2 1
0 0
[openeuler:openEuler-1.0-LTS 1304/1304] drivers/mailbox/qcom-apcs-ipc-mailbox.c:65:35: warning: 'apcs_clk_match_table' defined but not used
by kernel test robot 22 Nov '24

22 Nov '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 81e029d5dd0cae934243168eee37ef303ebcce38 commit: c41cf355c959721c7269cc5ee7c6901cb47424a7 [1304/1304] mbox: qcom: add APCS child device for QCS404 config: x86_64-buildonly-randconfig-001-20241122 (https://download.01.org/0day-ci/archive/20241122/202411220931.AgGtoYjF-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/20241122/202411220931.AgGtoYjF-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/202411220931.AgGtoYjF-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/mailbox/qcom-apcs-ipc-mailbox.c: In function 'qcom_apcs_ipc_probe': drivers/mailbox/qcom-apcs-ipc-mailbox.c:65:35: warning: unused variable 'apcs_clk_match_table' [-Wunused-variable] 65 | const struct of_device_id apcs_clk_match_table[] = { | ^~~~~~~~~~~~~~~~~~~~ drivers/mailbox/qcom-apcs-ipc-mailbox.c: At top level: >> drivers/mailbox/qcom-apcs-ipc-mailbox.c:65:35: warning: 'apcs_clk_match_table' defined but not used [-Wunused-const-variable=] vim +/apcs_clk_match_table +65 drivers/mailbox/qcom-apcs-ipc-mailbox.c 55 56 static int qcom_apcs_ipc_probe(struct platform_device *pdev) 57 { 58 struct qcom_apcs_ipc *apcs; 59 struct regmap *regmap; 60 struct resource *res; 61 unsigned long offset; 62 void __iomem *base; 63 unsigned long i; 64 int ret; > 65 const struct of_device_id apcs_clk_match_table[] = { 66 { .compatible = "qcom,msm8916-apcs-kpss-global", }, 67 { .compatible = "qcom,qcs404-apcs-apps-global", }, 68 {} 69 }; 70 71 apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); 72 if (!apcs) 73 return -ENOMEM; 74 75 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 76 base = devm_ioremap_resource(&pdev->dev, res); 77 if (IS_ERR(base)) 78 return PTR_ERR(base); 79 80 regmap = devm_regmap_init_mmio(&pdev->dev, base, &apcs_regmap_config); 81 if (IS_ERR(regmap)) 82 return PTR_ERR(regmap); 83 84 offset = (unsigned long)of_device_get_match_data(&pdev->dev); 85 86 apcs->regmap = regmap; 87 apcs->offset = offset; 88 89 /* Initialize channel identifiers */ 90 for (i = 0; i < ARRAY_SIZE(apcs->mbox_chans); i++) 91 apcs->mbox_chans[i].con_priv = (void *)i; 92 93 apcs->mbox.dev = &pdev->dev; 94 apcs->mbox.ops = &qcom_apcs_ipc_ops; 95 apcs->mbox.chans = apcs->mbox_chans; 96 apcs->mbox.num_chans = ARRAY_SIZE(apcs->mbox_chans); 97 98 ret = mbox_controller_register(&apcs->mbox); 99 if (ret) { 100 dev_err(&pdev->dev, "failed to register APCS IPC controller\n"); 101 return ret; 102 } 103 104 if (of_match_device(apcs_clk_match_table, &pdev->dev)) { 105 apcs->clk = platform_device_register_data(&pdev->dev, 106 "qcom-apcs-msm8916-clk", 107 -1, NULL, 0); 108 if (IS_ERR(apcs->clk)) 109 dev_err(&pdev->dev, "failed to register APCS clk\n"); 110 } 111 112 platform_set_drvdata(pdev, apcs); 113 114 return 0; 115 } 116 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS] BUILD REGRESSION 81e029d5dd0cae934243168eee37ef303ebcce38
by kernel test robot 22 Nov '24

22 Nov '24
tree/branch: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS branch HEAD: 81e029d5dd0cae934243168eee37ef303ebcce38 !13346 nilfs2: propagate directory read errors from nilfs_find_entry() Error/Warning (recently discovered and may have been fixed): https://lore.kernel.org/oe-kbuild-all/202411212153.Ajpai55I-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202411220134.YWoog3yH-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202411220413.5RZED7zc-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202411220702.De8xAify-lkp@intel.com drivers/regulator/qcom-rpmh-regulator.c:742:34: warning: unused variable 'rpmh_regulator_match_table' [-Wunused-const-variable] Error/Warning ids grouped by kconfigs: recent_errors |-- arm64-allmodconfig | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- arm64-randconfig-001-20241121 | |-- drivers-clocksource-arm_arch_timer.c:error:hisi_161010101_read_cntvct_el0-undeclared-(first-use-in-this-function) | |-- drivers-iommu-arm-smmu-v3.c:error:CONFIG_CMA_ALIGNMENT-undeclared-(first-use-in-this-function) | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | `-- include-linux-kernel.h:error:first-argument-to-__builtin_choose_expr-not-a-constant |-- arm64-randconfig-002-20241121 | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | |-- fs-ext4-inode.c:warning:unused-variable-sbi | `-- include-linux-uaccess.h:warning:sve-may-be-used-uninitialized |-- arm64-randconfig-003-20241121 | |-- arch-arm64-kernel-acpi.c:warning:no-previous-prototype-for-acpi_map_cpu | |-- arch-arm64-kernel-acpi.c:warning:no-previous-prototype-for-acpi_unmap_cpu | |-- drivers-iommu-arm-smmu-v3.c:error:CONFIG_CMA_ALIGNMENT-undeclared-(first-use-in-this-function) | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | |-- drivers-nvme-host-core.c:error:compat_uptr_t-undeclared-(first-use-in-this-function) | |-- drivers-nvme-host-core.c:error:expected-before-ptrval | |-- fs-ext4-inode.c:warning:unused-variable-sbi | `-- include-linux-kernel.h:error:first-argument-to-__builtin_choose_expr-not-a-constant |-- arm64-randconfig-004-20241121 | |-- drivers-iommu-arm-smmu-v3.c:error:CONFIG_CMA_ALIGNMENT-undeclared-(first-use-in-this-function) | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | `-- include-linux-kernel.h:error:first-argument-to-__builtin_choose_expr-not-a-constant |-- x86_64-allyesconfig | |-- drivers-net-ethernet-stmicro-stmmac-dwmac-phytium.c:error:incompatible-pointer-to-integer-conversion-returning-void-from-a-function-with-result-type-int | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-buildonly-randconfig-001-20241122 | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | |-- fs-ext4-inode.c:warning:unused-variable-sbi | `-- include-asm-generic-bug.h:warning:mcu_ctrl-may-be-used-uninitialized |-- x86_64-buildonly-randconfig-002-20241117 | `-- drivers-gpu-drm-amd-amdgpu-..-display-amdgpu_dm-.tmp_amdgpu_dm_crc.o:warning:objtool:missing-symbol-for-section-.text |-- x86_64-buildonly-randconfig-002-20241122 | |-- sound-isa-gus-gus_io.o:warning:objtool:missing-symbol-for-section-.text | `-- sound-isa-gus-gus_volume.o:warning:objtool:missing-symbol-for-section-.text |-- x86_64-buildonly-randconfig-003-20241122 | |-- crypto-cts.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- crypto-lzo.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-cpufreq-cpufreq_conservative.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-fpga-socfpga-a10.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-hwtracing-intel_th-core.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-hwtracing-intel_th-gth.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-hwtracing-intel_th-msu-sink.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-hwtracing-intel_th-pti.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-i2c-busses-i2c-dln2.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-i2c-busses-i2c-jz4780.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-adc-axp288_adc.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-adc-qcom-pm8xxx-xoadc.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-dac-stm32-dac-core.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-dac-stm32-dac.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-humidity-hts221_i2c.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-light-adjd_s311.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-light-tcs3472.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-pressure-ms5611_i2c.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-proximity-sx9500.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-iio-temperature-tmp006.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-joydev.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-axp2-pek.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-cm109.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-e3x0-button.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-gpio-beeper.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-mc13783-pwrbutton.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-pm8xxx-vibrator.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-pmic8xxx-pwrkey.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-tps65218-pwrbutton.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-twl4030-pwrbutton.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-input-misc-wm831x-on.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-leds-leds-as3645a.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-leds-leds-lp5521.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-leds-uleds.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-mailbox-mailbox-test.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-mfd-bcm59x.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-mtd-redboot.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-mtd-tests-mtd_nandecctest.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-mtd-tests-pagetest.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-mtd-tests-stresstest.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-phy-samsung-phy-exynos-dp-video.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-pinctrl-pinctrl-axp209.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-power-supply-bq27xxx_battery_i2c.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-power-supply-ltc2941-battery-gauge.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-regulator-max8952.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-regulator-mc13892-regulator.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-regulator-pv88080-regulator.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-regulator-tps65217-regulator.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-slimbus-qcom-ctrl.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-ssb-main.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-thermal-rockchip_thermal.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-host-ehci-platform.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-host-r8a66597-hcd.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-host-ssb-hcd.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-misc-ehset.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-misc-sisusbvga-sisusb.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-misc-yurex.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-phy-phy-generic.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-usb-typec-tps6598x.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-w1-slaves-w1_ds2405.o:warning:objtool:missing-symbol-for-section-.exit.text | `-- samples-rpmsg-rpmsg_client_sample.o:warning:objtool:missing-symbol-for-section-.exit.text |-- x86_64-buildonly-randconfig-004-20241117 | |-- drivers-mfd-rohm-bd718x7.o:warning:objtool:missing-symbol-for-section-.init.text | `-- drivers-watchdog-menz69_wdt.o:warning:objtool:missing-symbol-for-section-.init.text |-- x86_64-buildonly-randconfig-004-20241122 | |-- drivers-dax-bus.o:warning:objtool:missing-symbol-for-section-.exit.text | |-- drivers-misc-uacce-uacce.c:error:implicit-declaration-of-function-module_refcount | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-buildonly-randconfig-005-20241117 | |-- drivers-char-hw_random-zhaoxin-rng.o:warning:objtool:missing-symbol-for-section-.exit.text | `-- drivers-hwtracing-intel_th-msu-sink.o:warning:objtool:missing-symbol-for-section-.exit.text |-- x86_64-buildonly-randconfig-005-20241122 | `-- drivers-regulator-qcom-rpmh-regulator.c:warning:unused-variable-rpmh_regulator_match_table |-- x86_64-buildonly-randconfig-006-20241118 | `-- drivers-spi-spi-uniphier.o:warning:objtool:missing-symbol-for-section-.init.text |-- x86_64-buildonly-randconfig-006-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-defconfig | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-kexec | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-randconfig-001-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-randconfig-002-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-randconfig-003-20241122 | `-- arch-x86-events-zhaoxin-core.c:error:redefinition-of-zhaoxin_pmu_init |-- x86_64-randconfig-004-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-randconfig-006-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-randconfig-011-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-randconfig-161-20241122 | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-rhel-9.4 | |-- drivers-net-can-usb-kvaser_usb-kvaser_usb_hydra.c:warning:new_state-may-be-used-uninitialized | `-- fs-ext4-inode.c:warning:unused-variable-sbi |-- x86_64-rhel-9.4-func | `-- fs-ext4-inode.c:warning:unused-variable-sbi `-- x86_64-rhel-9.4-kselftests `-- fs-ext4-inode.c:warning:unused-variable-sbi elapsed time: 772m configs tested: 26 configs skipped: 138 tested configs: arm64 allmodconfig gcc-14.2.0 arm64 allnoconfig gcc-14.2.0 arm64 randconfig-001-20241121 gcc-14.2.0 arm64 randconfig-002-20241121 gcc-14.2.0 arm64 randconfig-003-20241121 gcc-14.2.0 arm64 randconfig-004-20241121 gcc-14.2.0 x86_64 allnoconfig clang-19 x86_64 allyesconfig clang-19 x86_64 buildonly-randconfig-001-20241122 gcc-12 x86_64 buildonly-randconfig-002-20241122 clang-19 x86_64 buildonly-randconfig-003-20241122 gcc-12 x86_64 buildonly-randconfig-004-20241122 gcc-12 x86_64 buildonly-randconfig-005-20241122 clang-19 x86_64 buildonly-randconfig-006-20241122 gcc-12 x86_64 defconfig gcc-11 x86_64 kexec clang-19 x86_64 randconfig-001-20241122 gcc-12 x86_64 randconfig-002-20241122 clang-19 x86_64 randconfig-003-20241122 gcc-12 x86_64 randconfig-004-20241122 clang-19 x86_64 randconfig-005-20241122 gcc-12 x86_64 randconfig-006-20241122 clang-19 x86_64 randconfig-011-20241122 clang-19 x86_64 rhel-9.4 gcc-12 x86_64 rhel-9.4-func gcc-12 x86_64 rhel-9.4-kselftests gcc-12 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1304/1304] drivers/regulator/qcom-rpmh-regulator.c:742:34: warning: unused variable 'rpmh_regulator_match_table'
by kernel test robot 22 Nov '24

22 Nov '24
Hi David, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 81e029d5dd0cae934243168eee37ef303ebcce38 commit: 46fc033eba42f5a4fb583b2ab53f0a9918468452 [1304/1304] regulator: add QCOM RPMh regulator driver config: x86_64-buildonly-randconfig-005-20241122 (https://download.01.org/0day-ci/archive/20241122/202411220702.De8xAify-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241122/202411220702.De8xAify-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/202411220702.De8xAify-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/regulator/qcom-rpmh-regulator.c:742:34: warning: unused variable 'rpmh_regulator_match_table' [-Wunused-const-variable] 742 | static const struct of_device_id rpmh_regulator_match_table[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'VRM' not described in enum 'rpmh_regulator_type' drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'XOB' not described in enum 'rpmh_regulator_type' drivers/regulator/qcom-rpmh-regulator.c:402: warning: Function parameter or member 'vreg' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:402: warning: Function parameter or member 'dev' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:402: warning: Function parameter or member 'node' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:402: warning: Function parameter or member 'pmic_id' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:402: warning: Function parameter or member 'pmic_rpmh_data' not described in 'rpmh_regulator_init_vreg' vim +/rpmh_regulator_match_table +742 drivers/regulator/qcom-rpmh-regulator.c 741 > 742 static const struct of_device_id rpmh_regulator_match_table[] = { 743 { 744 .compatible = "qcom,pm8998-rpmh-regulators", 745 .data = pm8998_vreg_data, 746 }, 747 { 748 .compatible = "qcom,pmi8998-rpmh-regulators", 749 .data = pmi8998_vreg_data, 750 }, 751 { 752 .compatible = "qcom,pm8005-rpmh-regulators", 753 .data = pm8005_vreg_data, 754 }, 755 {} 756 }; 757 MODULE_DEVICE_TABLE(of, rpmh_regulator_match_table); 758 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1297/1297] drivers/char/hw_random/zhaoxin-rng.o: warning: objtool: missing symbol for section .exit.text
by kernel test robot 22 Nov '24

22 Nov '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 81e029d5dd0cae934243168eee37ef303ebcce38 commit: 050ff2f361bf733d1dde505dea8b0f5ecb23507c [1297/1297] hwrng: Add Zhaoxin rng driver config: x86_64-buildonly-randconfig-005-20241117 (https://download.01.org/0day-ci/archive/20241122/202411220413.5RZED7zc-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/20241122/202411220413.5RZED7zc-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/202411220413.5RZED7zc-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/char/hw_random/zhaoxin-rng.o: warning: objtool: missing symbol for section .exit.text -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2462/2462] drivers/firmware/efi/libstub/../../../../lib/decompress_unlzo.c:46:12: warning: variable 'level' set but not used
by kernel test robot 22 Nov '24

22 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: e4ad5a7cc835421f3f2799db98ef2f9d5143f076 commit: e467807275555a062593aa1e89f3201644ef0ea5 [2462/2462] efi/libstub: implement generic EFI zboot config: arm64-randconfig-003-20241121 (https://download.01.org/0day-ci/archive/20241122/202411220334.X00IT0yA-lkp@…) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241122/202411220334.X00IT0yA-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/202411220334.X00IT0yA-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/firmware/efi/libstub/zboot.c:21: drivers/firmware/efi/libstub/../../../../lib/decompress_unlzo.c: In function 'parse_header': >> drivers/firmware/efi/libstub/../../../../lib/decompress_unlzo.c:46:12: warning: variable 'level' set but not used [-Wunused-but-set-variable] 46 | u8 level = 0; | ^~~~~ drivers/firmware/efi/libstub/zboot.c: At top level: drivers/firmware/efi/libstub/zboot.c:162:1: warning: no previous prototype for 'efi_zboot_entry' [-Wmissing-prototypes] 162 | efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab) | ^~~~~~~~~~~~~~~ vim +/level +46 drivers/firmware/efi/libstub/../../../../lib/decompress_unlzo.c 7dd65feb6c603e Albin Tonnerre 2010-01-08 40 d97b07c54f34e8 Yinghai Lu 2014-08-08 41 STATIC inline long INIT parse_header(u8 *input, long *skip, long in_len) 7dd65feb6c603e Albin Tonnerre 2010-01-08 42 { 7dd65feb6c603e Albin Tonnerre 2010-01-08 43 int l; 7dd65feb6c603e Albin Tonnerre 2010-01-08 44 u8 *parse = input; 5a3f81a7029daf Lasse Collin 2011-01-12 45 u8 *end = input + in_len; 7dd65feb6c603e Albin Tonnerre 2010-01-08 @46 u8 level = 0; 7dd65feb6c603e Albin Tonnerre 2010-01-08 47 u16 version; 7dd65feb6c603e Albin Tonnerre 2010-01-08 48 5a3f81a7029daf Lasse Collin 2011-01-12 49 /* 5a3f81a7029daf Lasse Collin 2011-01-12 50 * Check that there's enough input to possibly have a valid header. 5a3f81a7029daf Lasse Collin 2011-01-12 51 * Then it is possible to parse several fields until the minimum 5a3f81a7029daf Lasse Collin 2011-01-12 52 * size may have been used. 5a3f81a7029daf Lasse Collin 2011-01-12 53 */ 5a3f81a7029daf Lasse Collin 2011-01-12 54 if (in_len < HEADER_SIZE_MIN) 5a3f81a7029daf Lasse Collin 2011-01-12 55 return 0; 5a3f81a7029daf Lasse Collin 2011-01-12 56 7dd65feb6c603e Albin Tonnerre 2010-01-08 57 /* read magic: 9 first bits */ 7dd65feb6c603e Albin Tonnerre 2010-01-08 58 for (l = 0; l < 9; l++) { 7dd65feb6c603e Albin Tonnerre 2010-01-08 59 if (*parse++ != lzop_magic[l]) 7dd65feb6c603e Albin Tonnerre 2010-01-08 60 return 0; 7dd65feb6c603e Albin Tonnerre 2010-01-08 61 } 7dd65feb6c603e Albin Tonnerre 2010-01-08 62 /* get version (2bytes), skip library version (2), 7dd65feb6c603e Albin Tonnerre 2010-01-08 63 * 'need to be extracted' version (2) and 7dd65feb6c603e Albin Tonnerre 2010-01-08 64 * method (1) */ 7dd65feb6c603e Albin Tonnerre 2010-01-08 65 version = get_unaligned_be16(parse); 7dd65feb6c603e Albin Tonnerre 2010-01-08 66 parse += 7; 7dd65feb6c603e Albin Tonnerre 2010-01-08 67 if (version >= 0x0940) 7dd65feb6c603e Albin Tonnerre 2010-01-08 68 level = *parse++; 7dd65feb6c603e Albin Tonnerre 2010-01-08 69 if (get_unaligned_be32(parse) & HEADER_HAS_FILTER) 7dd65feb6c603e Albin Tonnerre 2010-01-08 70 parse += 8; /* flags + filter info */ 7dd65feb6c603e Albin Tonnerre 2010-01-08 71 else 7dd65feb6c603e Albin Tonnerre 2010-01-08 72 parse += 4; /* flags */ 7dd65feb6c603e Albin Tonnerre 2010-01-08 73 5a3f81a7029daf Lasse Collin 2011-01-12 74 /* 5a3f81a7029daf Lasse Collin 2011-01-12 75 * At least mode, mtime_low, filename length, and checksum must 5a3f81a7029daf Lasse Collin 2011-01-12 76 * be left to be parsed. If also mtime_high is present, it's OK 5a3f81a7029daf Lasse Collin 2011-01-12 77 * because the next input buffer check is after reading the 5a3f81a7029daf Lasse Collin 2011-01-12 78 * filename length. 5a3f81a7029daf Lasse Collin 2011-01-12 79 */ 5a3f81a7029daf Lasse Collin 2011-01-12 80 if (end - parse < 8 + 1 + 4) 5a3f81a7029daf Lasse Collin 2011-01-12 81 return 0; 5a3f81a7029daf Lasse Collin 2011-01-12 82 7dd65feb6c603e Albin Tonnerre 2010-01-08 83 /* skip mode and mtime_low */ 7dd65feb6c603e Albin Tonnerre 2010-01-08 84 parse += 8; 7dd65feb6c603e Albin Tonnerre 2010-01-08 85 if (version >= 0x0940) 7dd65feb6c603e Albin Tonnerre 2010-01-08 86 parse += 4; /* skip mtime_high */ 7dd65feb6c603e Albin Tonnerre 2010-01-08 87 7dd65feb6c603e Albin Tonnerre 2010-01-08 88 l = *parse++; 7dd65feb6c603e Albin Tonnerre 2010-01-08 89 /* don't care about the file name, and skip checksum */ 5a3f81a7029daf Lasse Collin 2011-01-12 90 if (end - parse < l + 4) 5a3f81a7029daf Lasse Collin 2011-01-12 91 return 0; 7dd65feb6c603e Albin Tonnerre 2010-01-08 92 parse += l + 4; 7dd65feb6c603e Albin Tonnerre 2010-01-08 93 7dd65feb6c603e Albin Tonnerre 2010-01-08 94 *skip = parse - input; 7dd65feb6c603e Albin Tonnerre 2010-01-08 95 return 1; 7dd65feb6c603e Albin Tonnerre 2010-01-08 96 } 7dd65feb6c603e Albin Tonnerre 2010-01-08 97 :::::: The code at line 46 was first introduced by commit :::::: 7dd65feb6c603e13eba501c34c662259ab38e70e lib: add support for LZO-compressed kernels :::::: TO: Albin Tonnerre <albin.tonnerre(a)free-electrons.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:OLK-6.6 1513/1513] mm/memory.c:5277:17: warning: variable 'nr_pages' set but not used
by kernel test robot 22 Nov '24

22 Nov '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: ab293c3a32ba6594fd24cd7ecd4a4a00ede0cd65 commit: 3bfa35ccde9e52ca74fed047eb4d89be32dd9e5e [1513/1513] mm/numa: no task_numa_fault() call if PTE is changed config: x86_64-kexec (https://download.01.org/0day-ci/archive/20241122/202411220229.ELIipVRO-lkp@…) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241122/202411220229.ELIipVRO-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/202411220229.ELIipVRO-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from mm/memory.c:43: In file included from include/linux/mm.h:2247: 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 + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from mm/memory.c:44: include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 49 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/memory.c:5277:17: warning: variable 'nr_pages' set but not used [-Wunused-but-set-variable] 5277 | int flags = 0, nr_pages; | ^ 8 warnings generated. vim +/nr_pages +5277 mm/memory.c f569661eacc258 Baolin Wang 2024-05-11 5266 2b7403035459c7 Souptick Joarder 2018-08-23 5267 static vm_fault_t do_numa_page(struct vm_fault *vmf) d10e63f29488b0 Mel Gorman 2012-10-25 5268 { 82b0f8c39a3869 Jan Kara 2016-12-14 5269 struct vm_area_struct *vma = vmf->vma; d5e6c8d5790088 Kefeng Wang 2023-11-27 5270 struct folio *folio = NULL; d5e6c8d5790088 Kefeng Wang 2023-11-27 5271 int nid = NUMA_NO_NODE; 2cb37064a2b82c Baolin Wang 2024-06-22 5272 bool writable = false, ignore_writable = false; 2cb37064a2b82c Baolin Wang 2024-06-22 5273 bool pte_write_upgrade = vma_wants_manual_pte_write_upgrade(vma); 90572890d20252 Peter Zijlstra 2013-10-07 5274 int last_cpupid; cbee9f88ec1b8d Peter Zijlstra 2012-10-25 5275 int target_nid; 04a8645304500b Aneesh Kumar K.V 2019-03-05 5276 pte_t pte, old_pte; 2cb37064a2b82c Baolin Wang 2024-06-22 @5277 int flags = 0, nr_pages; d10e63f29488b0 Mel Gorman 2012-10-25 5278 d10e63f29488b0 Mel Gorman 2012-10-25 5279 /* e2491c31fb10ae John Hubbard 2024-05-25 5280 * The pte cannot be used safely until we verify, while holding the page e2491c31fb10ae John Hubbard 2024-05-25 5281 * table lock, that its contents have not changed during fault handling. d10e63f29488b0 Mel Gorman 2012-10-25 5282 */ 82b0f8c39a3869 Jan Kara 2016-12-14 5283 spin_lock(vmf->ptl); e2491c31fb10ae John Hubbard 2024-05-25 5284 /* Read the live PTE from the page tables: */ e2491c31fb10ae John Hubbard 2024-05-25 5285 old_pte = ptep_get(vmf->pte); e2491c31fb10ae John Hubbard 2024-05-25 5286 e2491c31fb10ae John Hubbard 2024-05-25 5287 if (unlikely(!pte_same(old_pte, vmf->orig_pte))) { 82b0f8c39a3869 Jan Kara 2016-12-14 5288 pte_unmap_unlock(vmf->pte, vmf->ptl); 3bfa35ccde9e52 Zi Yan 2024-08-09 5289 return 0; 4daae3b4b9e49b Mel Gorman 2012-11-02 5290 } 4daae3b4b9e49b Mel Gorman 2012-11-02 5291 04a8645304500b Aneesh Kumar K.V 2019-03-05 5292 pte = pte_modify(old_pte, vma->vm_page_prot); d10e63f29488b0 Mel Gorman 2012-10-25 5293 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5294 /* 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5295 * Detect now whether the PTE could be writable; this information 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5296 * is only valid while holding the PT lock. 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5297 */ 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5298 writable = pte_write(pte); 2cb37064a2b82c Baolin Wang 2024-06-22 5299 if (!writable && pte_write_upgrade && 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5300 can_change_pte_writable(vma, vmf->address, pte)) 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5301 writable = true; 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5302 d5e6c8d5790088 Kefeng Wang 2023-11-27 5303 folio = vm_normal_folio(vma, vmf->address, pte); d5e6c8d5790088 Kefeng Wang 2023-11-27 5304 if (!folio || folio_is_zone_device(folio)) b99a342d4f11a5 Huang Ying 2021-04-29 5305 goto out_map; d10e63f29488b0 Mel Gorman 2012-10-25 5306 6688cc05473b36 Peter Zijlstra 2013-10-07 5307 /* bea66fbd11af1c Mel Gorman 2015-03-25 5308 * Avoid grouping on RO pages in general. RO pages shouldn't hurt as bea66fbd11af1c Mel Gorman 2015-03-25 5309 * much anyway since they can be in shared cache state. This misses bea66fbd11af1c Mel Gorman 2015-03-25 5310 * the case where a mapping is writable but the process never writes bea66fbd11af1c Mel Gorman 2015-03-25 5311 * to it but pte_write gets cleared during protection updates and bea66fbd11af1c Mel Gorman 2015-03-25 5312 * pte_dirty has unpredictable behaviour between PTE scan updates, bea66fbd11af1c Mel Gorman 2015-03-25 5313 * background writeback, dirty balancing and application behaviour. bea66fbd11af1c Mel Gorman 2015-03-25 5314 */ 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5315 if (!writable) 6688cc05473b36 Peter Zijlstra 2013-10-07 5316 flags |= TNF_NO_GROUP; 6688cc05473b36 Peter Zijlstra 2013-10-07 5317 dabe1d992414a6 Rik van Riel 2013-10-07 5318 /* d5e6c8d5790088 Kefeng Wang 2023-11-27 5319 * Flag if the folio is shared between multiple address spaces. This dabe1d992414a6 Rik van Riel 2013-10-07 5320 * is later used when determining whether to group tasks together dabe1d992414a6 Rik van Riel 2013-10-07 5321 */ b8eba2d7e4a309 David Hildenbrand 2024-05-11 5322 if (folio_likely_mapped_shared(folio) && (vma->vm_flags & VM_SHARED)) dabe1d992414a6 Rik van Riel 2013-10-07 5323 flags |= TNF_SHARED; dabe1d992414a6 Rik van Riel 2013-10-07 5324 d5e6c8d5790088 Kefeng Wang 2023-11-27 5325 nid = folio_nid(folio); 2cb37064a2b82c Baolin Wang 2024-06-22 5326 nr_pages = folio_nr_pages(folio); 33024536bafd91 Huang Ying 2022-07-13 5327 /* 33024536bafd91 Huang Ying 2022-07-13 5328 * For memory tiering mode, cpupid of slow memory page is used 33024536bafd91 Huang Ying 2022-07-13 5329 * to record page access time. So use default value. 33024536bafd91 Huang Ying 2022-07-13 5330 */ 33024536bafd91 Huang Ying 2022-07-13 5331 if ((sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING) && d5e6c8d5790088 Kefeng Wang 2023-11-27 5332 !node_is_toptier(nid)) 33024536bafd91 Huang Ying 2022-07-13 5333 last_cpupid = (-1 & LAST_CPUPID_MASK); 33024536bafd91 Huang Ying 2022-07-13 5334 else 28e1ec746768bb Kefeng Wang 2023-11-27 5335 last_cpupid = folio_last_cpupid(folio); bf7c2ab764599b Kefeng Wang 2023-11-27 5336 target_nid = numa_migrate_prep(folio, vma, vmf->address, nid, &flags); 98fa15f34cb379 Anshuman Khandual 2019-03-05 5337 if (target_nid == NUMA_NO_NODE) { d5e6c8d5790088 Kefeng Wang 2023-11-27 5338 folio_put(folio); b99a342d4f11a5 Huang Ying 2021-04-29 5339 goto out_map; 4daae3b4b9e49b Mel Gorman 2012-11-02 5340 } b99a342d4f11a5 Huang Ying 2021-04-29 5341 pte_unmap_unlock(vmf->pte, vmf->ptl); 6a56ccbcf6c695 David Hildenbrand 2022-11-08 5342 writable = false; 2cb37064a2b82c Baolin Wang 2024-06-22 5343 ignore_writable = true; 4daae3b4b9e49b Mel Gorman 2012-11-02 5344 4daae3b4b9e49b Mel Gorman 2012-11-02 5345 /* Migrate to the requested node */ d5e6c8d5790088 Kefeng Wang 2023-11-27 5346 if (migrate_misplaced_folio(folio, vma, target_nid)) { d5e6c8d5790088 Kefeng Wang 2023-11-27 5347 nid = target_nid; 6688cc05473b36 Peter Zijlstra 2013-10-07 5348 flags |= TNF_MIGRATED; 3bfa35ccde9e52 Zi Yan 2024-08-09 5349 task_numa_fault(last_cpupid, nid, 1, flags); 3bfa35ccde9e52 Zi Yan 2024-08-09 5350 return 0; 3bfa35ccde9e52 Zi Yan 2024-08-09 5351 } 3bfa35ccde9e52 Zi Yan 2024-08-09 5352 074c238177a75f Mel Gorman 2015-03-25 5353 flags |= TNF_MIGRATE_FAIL; c7ad08804fae5b Hugh Dickins 2023-06-08 5354 vmf->pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, c7ad08804fae5b Hugh Dickins 2023-06-08 5355 vmf->address, &vmf->ptl); c7ad08804fae5b Hugh Dickins 2023-06-08 5356 if (unlikely(!vmf->pte)) 3bfa35ccde9e52 Zi Yan 2024-08-09 5357 return 0; c33c794828f212 Ryan Roberts 2023-06-12 5358 if (unlikely(!pte_same(ptep_get(vmf->pte), vmf->orig_pte))) { b99a342d4f11a5 Huang Ying 2021-04-29 5359 pte_unmap_unlock(vmf->pte, vmf->ptl); d10e63f29488b0 Mel Gorman 2012-10-25 5360 return 0; 3bfa35ccde9e52 Zi Yan 2024-08-09 5361 } b99a342d4f11a5 Huang Ying 2021-04-29 5362 out_map: b99a342d4f11a5 Huang Ying 2021-04-29 5363 /* b99a342d4f11a5 Huang Ying 2021-04-29 5364 * Make it present again, depending on how arch implements b99a342d4f11a5 Huang Ying 2021-04-29 5365 * non-accessible ptes, some can allow access by kernel mode. b99a342d4f11a5 Huang Ying 2021-04-29 5366 */ 2cb37064a2b82c Baolin Wang 2024-06-22 5367 if (folio && folio_test_large(folio)) 2cb37064a2b82c Baolin Wang 2024-06-22 5368 numa_rebuild_large_mapping(vmf, vma, folio, pte, ignore_writable, 2cb37064a2b82c Baolin Wang 2024-06-22 5369 pte_write_upgrade); 2cb37064a2b82c Baolin Wang 2024-06-22 5370 else 2cb37064a2b82c Baolin Wang 2024-06-22 5371 numa_rebuild_single_mapping(vmf, vma, vmf->address, vmf->pte, 2cb37064a2b82c Baolin Wang 2024-06-22 5372 writable); b99a342d4f11a5 Huang Ying 2021-04-29 5373 pte_unmap_unlock(vmf->pte, vmf->ptl); 3bfa35ccde9e52 Zi Yan 2024-08-09 5374 3bfa35ccde9e52 Zi Yan 2024-08-09 5375 if (nid != NUMA_NO_NODE) 3bfa35ccde9e52 Zi Yan 2024-08-09 5376 task_numa_fault(last_cpupid, nid, 1, flags); 3bfa35ccde9e52 Zi Yan 2024-08-09 5377 return 0; d10e63f29488b0 Mel Gorman 2012-10-25 5378 } d10e63f29488b0 Mel Gorman 2012-10-25 5379 :::::: The code at line 5277 was first introduced by commit :::::: 2cb37064a2b82cd8ebeeaaed21259b5912dff51d mm: support multi-size THP numa balancing :::::: TO: Baolin Wang <baolin.wang(a)linux.alibaba.com> :::::: CC: Liu Shixin <liushixin2(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 345
  • 346
  • 347
  • 348
  • 349
  • 350
  • 351
  • ...
  • 1829
  • Older →

HyperKitty Powered by HyperKitty