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

  • 56 participants
  • 18794 discussions
[openeuler:OLK-5.10 27196/30000] drivers/net/ethernet/mucse/rnp/rnp_sysfs.c:1958:9: warning: 'strncpy' specified bound 100 equals destination size
by kernel test robot 24 Mar '24

24 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b670dd901cbbf97745380d373b1d2607b3235590 commit: e53494b741272933726616122ea77143d9742631 [27196/30000] drivers: initial support for rnp drivers from Mucse Technology config: x86_64-buildonly-randconfig-005-20240324 (https://download.01.org/0day-ci/archive/20240324/202403240810.wSTu29eU-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/20240324/202403240810.wSTu29eU-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/202403240810.wSTu29eU-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21, from drivers/net/ethernet/mucse/rnp/rnp_sysfs.c:13: drivers/net/ethernet/mucse/rnp/rnp_common.h: In function '_rnp_skb_dump': drivers/net/ethernet/mucse/rnp/rnp_common.h:336:36: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 336 | &dev->features); | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:23: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:13: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:23: warning: variable 'has_trans' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:14: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_sysfs.c: At top level: drivers/net/ethernet/mucse/rnp/rnp_sysfs.c:1214:5: warning: no previous prototype for 'rnp_mbx_get_pn_sn' [-Wmissing-prototypes] 1214 | int rnp_mbx_get_pn_sn(struct rnp_hw *hw, char pn[33], char sn[33]) | ^~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnp/rnp_sysfs.c: In function '_switch_loopback': >> drivers/net/ethernet/mucse/rnp/rnp_sysfs.c:1958:9: warning: 'strncpy' specified bound 100 equals destination size [-Wstringop-truncation] 1958 | strncpy(name, peer_eth, sizeof(name)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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] vim +/strncpy +1958 drivers/net/ethernet/mucse/rnp/rnp_sysfs.c 1950 1951 static ssize_t _switch_loopback(struct rnp_adapter *adapter, 1952 const char *peer_eth, int en) 1953 { 1954 struct net_device *peer_netdev = NULL; 1955 struct rnp_adapter *peer_adapter = NULL; 1956 char name[100]; 1957 > 1958 strncpy(name, peer_eth, sizeof(name)); 1959 strim(name); 1960 1961 pr_info("%s: nr_lane:%d peer_lane:%s en:%d\n", __func__, 0, 1962 peer_eth, en); 1963 1964 peer_netdev = dev_get_by_name(&init_net, name); 1965 if (!peer_netdev) { 1966 e_err(drv, "canot' find %s\n", name); 1967 return -EINVAL; 1968 } 1969 peer_adapter = netdev_priv(peer_netdev); 1970 1971 if (PCI_SLOT(peer_adapter->pdev->devfn) != 1972 PCI_SLOT(adapter->pdev->devfn)) { 1973 e_err(drv, "%s %s not in same slot\n", 1974 netdev_name(adapter->netdev), 1975 netdev_name(peer_adapter->netdev)); 1976 dev_put(peer_netdev); 1977 return -EINVAL; 1978 } 1979 1980 1981 do_switch_loopback_set(adapter, en, 0, 1982 rnp_is_pf1(&peer_adapter->hw) ? 4 : 0); 1983 do_switch_loopback_set(peer_adapter, en, 0, 1984 rnp_is_pf1(&adapter->hw) ? 4 : 0); 1985 1986 if (peer_netdev) 1987 dev_put(peer_netdev); 1988 1989 return 0; 1990 } 1991 static ssize_t switch_loopback_on_store(struct device *dev, 1992 struct device_attribute *attr, 1993 const char *buf, size_t count) 1994 { 1995 struct rnp_adapter *adapter = netdev_priv(to_net_device(dev)); 1996 1997 return _switch_loopback(adapter, buf, 1) == 0 ? count : -EINVAL; 1998 } 1999 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10] BUILD REGRESSION b670dd901cbbf97745380d373b1d2607b3235590
by kernel test robot 24 Mar '24

24 Mar '24
tree/branch: https://gitee.com/openeuler/kernel.git OLK-5.10 branch HEAD: b670dd901cbbf97745380d373b1d2607b3235590 !5269 printk: avoid deadlock in panic Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202403232345.qUtlhdt3-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202403240020.k6ATfsBm-lkp@intel.com https://lore.kernel.org/oe-kbuild-all/202403240050.7nMqX49L-lkp@intel.com Error/Warning: (recently discovered and may have been fixed) drivers/net/dsa/mv88e6xxx/chip.c:2320:4: error: implicit declaration of function 'mv88e6xxx_g2_eeprom_wait' [-Werror,-Wimplicit-function-declaration] kernel/livepatch/core.c:1102:5: warning: no previous prototype for function 'klp_try_disable_patch' [-Wmissing-prototypes] kernel/livepatch/core.c:1253:5: warning: no previous prototype for function 'klp_try_enable_patch' [-Wmissing-prototypes] kernel/sched/bpf_sched.c:108:5: warning: "CONFIG_CGROUP_SCHED" is not defined, evaluates to 0 [-Wundef] mm/share_pool.c:2573:7: warning: no previous prototype for '__mg_sp_alloc_nodemask' [-Wmissing-prototypes] Error/Warning ids grouped by kconfigs: gcc_recent_errors |-- arm64-randconfig-003-20240312 | `-- mm-share_pool.c:warning:no-previous-prototype-for-__mg_sp_alloc_nodemask |-- x86_64-buildonly-randconfig-002-20240324 | |-- 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_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 | |-- drivers-ub-urma-uburma-uburma_cmd.c:warning:no-previous-prototype-for-uburma_jfc_event_cb | |-- drivers-ub-urma-uburma-uburma_cmd.c:warning:no-previous-prototype-for-uburma_jfr_event_cb | |-- drivers-ub-urma-uburma-uburma_cmd.c:warning:no-previous-prototype-for-uburma_jfs_event_cb | |-- drivers-ub-urma-uburma-uburma_dev_ops.c:warning:no-previous-prototype-for-uburma_close | |-- drivers-ub-urma-uburma-uburma_dev_ops.c:warning:no-previous-prototype-for-uburma_mmap | |-- drivers-ub-urma-uburma-uburma_dev_ops.c:warning:no-previous-prototype-for-uburma_open | |-- drivers-ub-urma-uburma-uburma_dev_ops.c:warning:no-previous-prototype-for-uburma_release_file | `-- drivers-ub-urma-uburma-uburma_dev_ops.c:warning:the-comparison-will-always-evaluate-as-false-for-the-address-of-dev_name-will-never-be-NULL |-- x86_64-buildonly-randconfig-005-20240324 | |-- drivers-gpu-drm-inspur-inspur_drm_drv.c:warning:no-previous-prototype-for-inspur_drm_interrupt | |-- 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_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 `-- x86_64-randconfig-012-20240323 `-- kernel-sched-bpf_sched.c:warning:CONFIG_CGROUP_SCHED-is-not-defined-evaluates-to clang_recent_errors |-- x86_64-allyesconfig | |-- drivers-infiniband-hw-xsc-mem.c:warning:no-previous-prototype-for-function-xsc_find_chunk_cont_0 | |-- drivers-infiniband-hw-xsc-mr.c:warning:variable-using_peer_mem-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Excess-function-parameter-eecd-description-in-rnpm_lower_eeprom_clk | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Excess-function-parameter-hash_value-description-in-rnpm_set_mta | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Excess-function-parameter-hw-description-in-rnpm_mta_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Excess-function-parameter-pf-description-in-rnpm_set_vlan_anti_spoofing | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Function-parameter-or-member-count-not-described-in-rnpm_shift_in_eeprom_bits | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Function-parameter-or-member-eec-not-described-in-rnpm_lower_eeprom_clk | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Function-parameter-or-member-mc_addr-not-described-in-rnpm_set_mta | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Function-parameter-or-member-mode-not-described-in-rnpm_mta_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_common.c:warning:Function-parameter-or-member-vf-not-described-in-rnpm_set_vlan_anti_spoofing | |-- drivers-net-ethernet-mucse-rnpm-rnpm_debugfs.c:warning:Excess-function-parameter-pf-description-in-rnpm_dbg_adapter_exit | |-- drivers-net-ethernet-mucse-rnpm-rnpm_debugfs.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_dbg_adapter_exit | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-dev-description-in-rnpm_get_priv_flags | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-dev-description-in-rnpm_set_priv_flags | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-ec-description-in-rnpm_get_coalesce | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-ee-description-in-rnpm_get_module_eeprom | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-flags-description-in-rnpm_set_priv_flags | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-kec-description-in-rnpm_get_coalesce | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-kec-description-in-rnpm_set_coalesce | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-netdev-description-in-rnpm_get_module_eeprom | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-netdev-description-in-rnpm_get_module_info | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-netdev-description-in-rnpm_get_rxnfc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Excess-function-parameter-pf-description-in-rnpm_get_rss_hash_opts | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_get_rss_hash_opts | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-coal-not-described-in-rnpm_get_coalesce | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-dev-not-described-in-rnpm_get_module_eeprom | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-dev-not-described-in-rnpm_get_module_info | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-dev-not-described-in-rnpm_get_rxnfc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-eeprom-not-described-in-rnpm_get_module_eeprom | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-kernel_coal-not-described-in-rnpm_get_coalesce | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-kernel_coal-not-described-in-rnpm_set_coalesce | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-netdev-not-described-in-rnpm_get_priv_flags | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-netdev-not-described-in-rnpm_set_priv_flags | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:Function-parameter-or-member-priv_flags-not-described-in-rnpm_set_priv_flags | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:variable-autoneg_changed-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:variable-dma_ch-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ethtool.c:warning:variable-duplex_changed-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-inner_vlan_tag-description-in-rnpm_tx_ctxtdesc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-l4_hdr_len-description-in-rnpm_tx_ctxtdesc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-mss_seg_len-description-in-rnpm_tx_ctxtdesc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-rxr_count-description-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-rxr_idx-description-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-tunnel_hdr_len-description-in-rnpm_tx_ctxtdesc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-txr_count-description-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-txr_idx-description-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Excess-function-parameter-v_count-description-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Function-parameter-or-member-eth_queue_idx-not-described-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Function-parameter-or-member-inner_vlan_tunnel_len-not-described-in-rnpm_tx_ctxtdesc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Function-parameter-or-member-mss_len_vf_num-not-described-in-rnpm_tx_ctxtdesc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Function-parameter-or-member-r_count-not-described-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Function-parameter-or-member-r_idx-not-described-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:Function-parameter-or-member-step-not-described-in-rnpm_alloc_q_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:no-previous-prototype-for-function-rnpm_setup_layer2_remapping | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:no-previous-prototype-for-function-rnpm_setup_tuple5_remapping | |-- drivers-net-ethernet-mucse-rnpm-rnpm_lib.c:warning:no-previous-prototype-for-function-rnpm_setup_tuple5_remapping_tcam | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-data-description-in-rnpm_pf_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-data-description-in-rnpm_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-ent-description-in-rnpm_probe | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-hw-description-in-rnpm_wol_supported | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-link_speed-description-in-rnpm_watchdog_update_link | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-maxrate-description-in-rnpm_tx_maxrate_own | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-msix_vector-description-in-rnpm_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-netdev-description-in-rnpm_setup_tc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-netdev-description-in-rnpm_tx_maxrate_own | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-pb-description-in-rnpm_lpbthresh | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-queue-description-in-rnpm_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-skb-description-in-rnpm_is_non_eop | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Excess-function-parameter-subdev_id-description-in-rnpm_wol_supported | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_rx_ring_reinit | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_setup_rx_resources | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_setup_tx_resources | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_tx_maxrate_own | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-adapter-not-described-in-rnpm_wol_supported | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-dev-not-described-in-rnpm_setup_tc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-id-not-described-in-rnpm_probe | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-is_rxframe-not-described-in-rnpm_write_eitr | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-napi_budget-not-described-in-rnpm_clean_tx_irq | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-rnpm_msix_vector-not-described-in-rnpm_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-rnpm_queue-not-described-in-rnpm_set_ring_vector | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-subdevice_id-not-described-in-rnpm_wol_supported | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-t-not-described-in-rnpm_pf_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-t-not-described-in-rnpm_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:Function-parameter-or-member-txqueue-not-described-in-rnpm_tx_timeout | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-clean_all_port_resetting | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-control_mac_rx | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_assign_netdev_ops | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_can_rpu_start | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_check_mc_addr | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_clear_udp_tunnel_port | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_fix_queue_number | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_pf_service_event_schedule | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_pf_service_task | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_pf_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_rx_ring_reinit | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_service_timer | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_vlan_stags_flag | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_write_eitr | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_xmit_nop_frame_ring | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-rnpm_xmit_nop_frame_ring_temp | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-update_pf_vlan | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:no-previous-prototype-for-function-wait_all_port_resetting | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:variable-hw-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:variable-packets-is-used-uninitialized-whenever-if-condition-is-false | |-- drivers-net-ethernet-mucse-rnpm-rnpm_main.c:warning:variable-xdp_xmit-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx.c:warning:Excess-function-parameter-vf_number-description-in-rnpm_check_for_ack_pf | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx.c:warning:Excess-function-parameter-vf_number-description-in-rnpm_check_for_msg_pf | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx.c:warning:Excess-function-parameter-vf_number-description-in-rnpm_read_mbx_pf | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx.c:warning:Function-parameter-or-member-mbx_id-not-described-in-rnpm_check_for_ack_pf | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx.c:warning:Function-parameter-or-member-mbx_id-not-described-in-rnpm_check_for_msg_pf | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx.c:warning:Function-parameter-or-member-mbx_id-not-described-in-rnpm_read_mbx_pf | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-mbx_cookie_zalloc | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_fw_get_capablity | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_fw_reg_read | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_fw_send_cmd_wait | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_get_port_stats2 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_link_stat_mark_disable | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_mbx_fw_post_req | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_mbx_lldp_all_ports_enable | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_mbx_pluginout_evt_en | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:no-previous-prototype-for-function-rnpm_mbx_write_posted_locked | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:variable-err-is-uninitialized-when-used-here | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:variable-err-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:variable-hw-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_mbx_fw.c:warning:variable-value-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:Excess-function-parameter-atr_input-description-in-rnpm_atr_compute_perfect_hash_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:Excess-function-parameter-stream-description-in-rnpm_atr_compute_sig_hash_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:Function-parameter-or-member-common-not-described-in-rnpm_atr_compute_sig_hash_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:Function-parameter-or-member-input-not-described-in-rnpm_atr_compute_perfect_hash_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:Function-parameter-or-member-input-not-described-in-rnpm_atr_compute_sig_hash_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:no-previous-prototype-for-function-rnpm_reset_pipeline_n10 | |-- drivers-net-ethernet-mucse-rnpm-rnpm_n10.c:warning:variable-status-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Excess-function-parameter-eeprom_data-description-in-rnpm_read_i2c_sff8472_generic | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Excess-function-parameter-hw-description-in-rnpm_get_i2c_data | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Excess-function-parameter-hw-description-in-rnpm_get_phy_type_from_id | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-autoneg_wait_to_complete-not-described-in-rnpm_setup_phy_link_speed_generic | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-dev_addr-not-described-in-rnpm_read_i2c_byte_generic | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-dev_addr-not-described-in-rnpm_write_i2c_byte_generic | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-device_type-not-described-in-rnpm_read_phy_reg_generic | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-link_up-not-described-in-rnpm_check_phy_link_tnx | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-phy_id-not-described-in-rnpm_get_phy_type_from_id | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-sff8472_data-not-described-in-rnpm_read_i2c_sff8472_generic | |-- drivers-net-ethernet-mucse-rnpm-rnpm_phy.c:warning:Function-parameter-or-member-speed-not-described-in-rnpm_check_phy_link_tnx | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ptp.c:warning:no-previous-prototype-for-function-rnpm_ptp_setup_ptp | |-- drivers-net-ethernet-mucse-rnpm-rnpm_ptp.c:warning:variable-target-set-but-not-used | |-- drivers-net-ethernet-mucse-rnpm-rnpm_sysfs.c:warning:no-previous-prototype-for-function-rnpm_mbx_get_pn_sn | |-- drivers-net-ethernet-yunsilicon-xsc-common-xsc_core.h:warning:bitwise-or-with-non-zero-value-always-evaluates-to-true | |-- drivers-net-ethernet-yunsilicon-xsc-net-main.c:warning:no-previous-prototype-for-function-xsc_eth_change_link_status | |-- drivers-net-ethernet-yunsilicon-xsc-net-main.c:warning:no-previous-prototype-for-function-xsc_get_vf_config | |-- drivers-net-ethernet-yunsilicon-xsc-net-main.c:warning:no-previous-prototype-for-function-xsc_rx_get_linear_frag_sz | |-- drivers-net-ethernet-yunsilicon-xsc-net-main.c:warning:no-previous-prototype-for-function-xsc_rx_is_linear_skb | |-- drivers-net-ethernet-yunsilicon-xsc-net-main.c:warning:no-previous-prototype-for-function-xsc_select_queue | |-- drivers-net-ethernet-yunsilicon-xsc-net-main.c:warning:variable-txq_ix-is-uninitialized-when-used-here | |-- drivers-net-ethernet-yunsilicon-xsc-net-xsc_dcbnl.c:warning:variable-buffer_size-set-but-not-used | |-- drivers-net-ethernet-yunsilicon-xsc-net-xsc_dcbnl.c:warning:variable-curr_pfc_en-is-uninitialized-when-used-here | |-- drivers-net-ethernet-yunsilicon-xsc-net-xsc_dcbnl.c:warning:variable-prio2buffer-set-but-not-used | |-- drivers-net-ethernet-yunsilicon-xsc-pci-main.c:warning:no-previous-prototype-for-function-xsc_devid_to_pcie_no | |-- drivers-net-ethernet-yunsilicon-xsc-pci-xsc_pci_ctrl.c:warning:no-previous-prototype-for-function-find_kallsyms_lookup_name | |-- drivers-net-ethernet-yunsilicon-xsc-pci-xsc_pci_ctrl.c:warning:no-previous-prototype-for-function-noop_pre | |-- drivers-net-ethernet-yusur-k2-..-platform-ys_intr.c:warning:overlapping-comparisons-always-evaluate-to-false | |-- drivers-net-ethernet-yusur-k2-ys_k2_tx.c:warning:variable-clean_tail_ptr-set-but-not-used | |-- drivers-ub-urma-ubcore-ubcore_device.c:warning:no-previous-prototype-for-function-ubcore_find_tpf_device_legacy | |-- drivers-ub-urma-ubcore-ubcore_tp.c:warning:no-previous-prototype-for-function-ubcore_modify_tp_state | |-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_dev_accessible_by_ns | |-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_set_dev_ns | `-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_set_ns_mode |-- x86_64-buildonly-randconfig-003-20240324 | |-- drivers-ub-urma-ubcore-ubcore_device.c:warning:no-previous-prototype-for-function-ubcore_find_tpf_device_legacy | |-- drivers-ub-urma-ubcore-ubcore_tp.c:warning:no-previous-prototype-for-function-ubcore_modify_tp_state | |-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_dev_accessible_by_ns | |-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_set_dev_ns | `-- drivers-ub-urma-uburma-uburma_main.c:warning:no-previous-prototype-for-function-uburma_set_ns_mode |-- x86_64-buildonly-randconfig-006-20240324 | `-- drivers-ptp-ptp_hisi.c:warning:unused-variable-hisi_ptp_acpi_match |-- x86_64-randconfig-015-20240323 | |-- kernel-livepatch-core.c:warning:no-previous-prototype-for-function-klp_try_disable_patch | `-- kernel-livepatch-core.c:warning:no-previous-prototype-for-function-klp_try_enable_patch `-- x86_64-randconfig-071-20240323 `-- drivers-net-dsa-mv88e6xxx-chip.c:error:implicit-declaration-of-function-mv88e6xxx_g2_eeprom_wait-Werror-Wimplicit-function-declaration elapsed time: 725m configs tested: 35 configs skipped: 149 tested configs: arm64 allmodconfig clang arm64 allnoconfig gcc arm64 defconfig gcc arm64 randconfig-001-20240323 gcc arm64 randconfig-002-20240323 gcc arm64 randconfig-003-20240323 clang arm64 randconfig-004-20240323 clang x86_64 allnoconfig clang x86_64 allyesconfig clang x86_64 buildonly-randconfig-001-20240324 gcc x86_64 buildonly-randconfig-002-20240324 gcc x86_64 buildonly-randconfig-003-20240324 clang x86_64 buildonly-randconfig-004-20240324 clang x86_64 buildonly-randconfig-005-20240324 gcc x86_64 buildonly-randconfig-006-20240324 clang x86_64 defconfig gcc x86_64 randconfig-001-20240324 clang x86_64 randconfig-002-20240324 clang x86_64 randconfig-003-20240324 clang x86_64 randconfig-004-20240324 clang x86_64 randconfig-005-20240324 clang x86_64 randconfig-006-20240324 gcc x86_64 randconfig-011-20240324 clang x86_64 randconfig-012-20240324 gcc x86_64 randconfig-013-20240324 gcc x86_64 randconfig-014-20240324 gcc x86_64 randconfig-015-20240324 gcc x86_64 randconfig-016-20240324 clang x86_64 randconfig-071-20240324 clang x86_64 randconfig-072-20240324 gcc x86_64 randconfig-073-20240324 clang x86_64 randconfig-074-20240324 clang x86_64 randconfig-075-20240324 clang x86_64 randconfig-076-20240324 gcc x86_64 rhel-8.3-rust clang -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1780/6857] kernel/module/strict_rwx.c:36:6: warning: no previous prototype for function 'module_disable_ro'
by kernel test robot 24 Mar '24

24 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 1b4212c630731d88b07d5b6e28ecaff1a76d3839 commit: c8783f92771c891518257c9deb22cd91d4e1a212 [1780/6857] livepatch/core: Revert module_enable_ro and module_disable_ro config: x86_64-randconfig-015-20240323 (https://download.01.org/0day-ci/archive/20240324/202403240225.chgQpK3C-lkp@…) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240324/202403240225.chgQpK3C-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/202403240225.chgQpK3C-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/module/strict_rwx.c:36:6: warning: no previous prototype for function 'module_disable_ro' [-Wmissing-prototypes] 36 | void module_disable_ro(const struct module *mod) | ^ kernel/module/strict_rwx.c:36:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 36 | void module_disable_ro(const struct module *mod) | ^ | static 1 warning generated. vim +/module_disable_ro +36 kernel/module/strict_rwx.c 34 35 #ifdef CONFIG_LIVEPATCH_WO_FTRACE > 36 void module_disable_ro(const struct module *mod) 37 { 38 if (!IS_ENABLED(CONFIG_STRICT_MODULE_RWX)) 39 return; 40 #ifdef CONFIG_STRICT_MODULE_RWX 41 if (!rodata_enabled) 42 return; 43 #endif 44 45 module_set_memory(mod, MOD_TEXT, set_memory_rw); 46 module_set_memory(mod, MOD_INIT_TEXT, set_memory_rw); 47 module_set_memory(mod, MOD_RODATA, set_memory_rw); 48 module_set_memory(mod, MOD_INIT_RODATA, set_memory_rw); 49 } 50 #endif /* CONFIG_LIVEPATCH_WO_FTRACE */ 51 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2165/30000] kernel/livepatch/core.c:1102:5: warning: no previous prototype for function 'klp_try_disable_patch'
by kernel test robot 24 Mar '24

24 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b670dd901cbbf97745380d373b1d2607b3235590 commit: c33e42836a745f2b3ab28bd6cb09c208cbcc950e [2165/30000] livepatch/core: Allow implementation without ftrace config: x86_64-randconfig-015-20240323 (https://download.01.org/0day-ci/archive/20240324/202403240050.7nMqX49L-lkp@…) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240324/202403240050.7nMqX49L-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/202403240050.7nMqX49L-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/livepatch/core.c:1084:12: warning: no previous prototype for function 'klp_check_calltrace' [-Wmissing-prototypes] 1084 | int __weak klp_check_calltrace(struct klp_patch *patch, int enable) | ^ kernel/livepatch/core.c:1084:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1084 | int __weak klp_check_calltrace(struct klp_patch *patch, int enable) | ^ | static kernel/livepatch/core.c:1107:27: error: incomplete definition of type 'struct patch_data' 1107 | if (atomic_inc_return(&pd->cpu_count) == 1) { | ~~^ kernel/livepatch/core.c:1105:9: note: forward declaration of 'struct patch_data' 1105 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1108:31: error: incomplete definition of type 'struct patch_data' 1108 | struct klp_patch *patch = pd->patch; | ~~^ kernel/livepatch/core.c:1105:9: note: forward declaration of 'struct patch_data' 1105 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1112:18: error: incomplete definition of type 'struct patch_data' 1112 | atomic_inc(&pd->cpu_count); | ~~^ kernel/livepatch/core.c:1105:9: note: forward declaration of 'struct patch_data' 1105 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1117:18: error: incomplete definition of type 'struct patch_data' 1117 | atomic_inc(&pd->cpu_count); | ~~^ kernel/livepatch/core.c:1105:9: note: forward declaration of 'struct patch_data' 1105 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1120:17: error: incomplete definition of type 'struct patch_data' 1120 | atomic_inc(&pd->cpu_count); | ~~^ kernel/livepatch/core.c:1105:9: note: forward declaration of 'struct patch_data' 1105 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1122:25: error: incomplete definition of type 'struct patch_data' 1122 | while (atomic_read(&pd->cpu_count) <= num_online_cpus()) | ~~^ kernel/livepatch/core.c:1105:9: note: forward declaration of 'struct patch_data' 1105 | struct patch_data *pd = (struct patch_data *)data; | ^ >> kernel/livepatch/core.c:1102:5: warning: no previous prototype for function 'klp_try_disable_patch' [-Wmissing-prototypes] 1102 | int klp_try_disable_patch(void *data) | ^ kernel/livepatch/core.c:1102:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1102 | int klp_try_disable_patch(void *data) | ^ | static kernel/livepatch/core.c:1134:20: error: variable has incomplete type 'struct patch_data' 1134 | struct patch_data patch_data = { | ^ kernel/livepatch/core.c:1134:9: note: forward declaration of 'struct patch_data' 1134 | struct patch_data patch_data = { | ^ kernel/livepatch/core.c:1151:8: error: implicit declaration of function 'stop_machine' [-Werror,-Wimplicit-function-declaration] 1151 | ret = stop_machine(klp_try_disable_patch, &patch_data, cpu_online_mask); | ^ kernel/livepatch/core.c:1258:27: error: incomplete definition of type 'struct patch_data' 1258 | if (atomic_inc_return(&pd->cpu_count) == 1) { | ~~^ kernel/livepatch/core.c:1256:9: note: forward declaration of 'struct patch_data' 1256 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1259:31: error: incomplete definition of type 'struct patch_data' 1259 | struct klp_patch *patch = pd->patch; | ~~^ kernel/livepatch/core.c:1256:9: note: forward declaration of 'struct patch_data' 1256 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1263:18: error: incomplete definition of type 'struct patch_data' 1263 | atomic_inc(&pd->cpu_count); | ~~^ kernel/livepatch/core.c:1256:9: note: forward declaration of 'struct patch_data' 1256 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1268:18: error: incomplete definition of type 'struct patch_data' 1268 | atomic_inc(&pd->cpu_count); | ~~^ kernel/livepatch/core.c:1256:9: note: forward declaration of 'struct patch_data' 1256 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1271:17: error: incomplete definition of type 'struct patch_data' 1271 | atomic_inc(&pd->cpu_count); | ~~^ kernel/livepatch/core.c:1256:9: note: forward declaration of 'struct patch_data' 1256 | struct patch_data *pd = (struct patch_data *)data; | ^ kernel/livepatch/core.c:1273:25: error: incomplete definition of type 'struct patch_data' 1273 | while (atomic_read(&pd->cpu_count) <= num_online_cpus()) | ~~^ kernel/livepatch/core.c:1256:9: note: forward declaration of 'struct patch_data' 1256 | struct patch_data *pd = (struct patch_data *)data; | ^ >> kernel/livepatch/core.c:1253:5: warning: no previous prototype for function 'klp_try_enable_patch' [-Wmissing-prototypes] 1253 | int klp_try_enable_patch(void *data) | ^ kernel/livepatch/core.c:1253:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1253 | int klp_try_enable_patch(void *data) | ^ | static kernel/livepatch/core.c:1285:20: error: variable has incomplete type 'struct patch_data' 1285 | struct patch_data patch_data = { | ^ kernel/livepatch/core.c:1285:9: note: forward declaration of 'struct patch_data' 1285 | struct patch_data patch_data = { | ^ kernel/livepatch/core.c:1302:8: error: implicit declaration of function 'stop_machine' [-Werror,-Wimplicit-function-declaration] 1302 | ret = stop_machine(klp_try_enable_patch, &patch_data, cpu_online_mask); | ^ 3 warnings and 16 errors generated. vim +/klp_try_disable_patch +1102 kernel/livepatch/core.c 1101 > 1102 int klp_try_disable_patch(void *data) 1103 { 1104 int ret = 0; > 1105 struct patch_data *pd = (struct patch_data *)data; 1106 1107 if (atomic_inc_return(&pd->cpu_count) == 1) { 1108 struct klp_patch *patch = pd->patch; 1109 1110 ret = klp_check_calltrace(patch, 0); 1111 if (ret) { 1112 atomic_inc(&pd->cpu_count); 1113 return ret; 1114 } 1115 ret = disable_patch(patch); 1116 if (ret) { 1117 atomic_inc(&pd->cpu_count); 1118 return ret; 1119 } 1120 atomic_inc(&pd->cpu_count); 1121 } else { 1122 while (atomic_read(&pd->cpu_count) <= num_online_cpus()) 1123 cpu_relax(); 1124 1125 klp_smp_isb(); 1126 } 1127 1128 return ret; 1129 } 1130 1131 static int __klp_disable_patch(struct klp_patch *patch) 1132 { 1133 int ret; 1134 struct patch_data patch_data = { 1135 .patch = patch, 1136 .cpu_count = ATOMIC_INIT(0), 1137 }; 1138 1139 if (WARN_ON(!patch->enabled)) 1140 return -EINVAL; 1141 1142 #ifdef CONFIG_LIVEPATCH_STACK 1143 /* enforce stacking: only the last enabled patch can be disabled */ 1144 if (!list_is_last(&patch->list, &klp_patches) && 1145 list_next_entry(patch, list)->enabled) { 1146 pr_err("only the last enabled patch can be disabled\n"); 1147 return -EBUSY; 1148 } 1149 #endif 1150 1151 ret = stop_machine(klp_try_disable_patch, &patch_data, cpu_online_mask); 1152 if (ret) 1153 return ret; 1154 1155 klp_free_patch_async(patch); 1156 return 0; 1157 } 1158 #endif /* ifdef CONFIG_LIVEPATCH_FTRACE */ 1159 1160 #ifdef CONFIG_LIVEPATCH_FTRACE 1161 static int __klp_enable_patch(struct klp_patch *patch) 1162 { 1163 struct klp_object *obj; 1164 int ret; 1165 1166 if (klp_transition_patch) 1167 return -EBUSY; 1168 1169 if (WARN_ON(patch->enabled)) 1170 return -EINVAL; 1171 1172 pr_notice("enabling patch '%s'\n", patch->mod->name); 1173 1174 klp_init_transition(patch, KLP_PATCHED); 1175 1176 /* 1177 * Enforce the order of the func->transition writes in 1178 * klp_init_transition() and the ops->func_stack writes in 1179 * klp_patch_object(), so that klp_ftrace_handler() will see the 1180 * func->transition updates before the handler is registered and the 1181 * new funcs become visible to the handler. 1182 */ 1183 smp_wmb(); 1184 1185 klp_for_each_object(patch, obj) { 1186 if (!klp_is_object_loaded(obj)) 1187 continue; 1188 1189 ret = klp_pre_patch_callback(obj); 1190 if (ret) { 1191 pr_warn("pre-patch callback failed for object '%s'\n", 1192 klp_is_module(obj) ? obj->name : "vmlinux"); 1193 goto err; 1194 } 1195 1196 ret = klp_patch_object(obj); 1197 if (ret) { 1198 pr_warn("failed to patch object '%s'\n", 1199 klp_is_module(obj) ? obj->name : "vmlinux"); 1200 goto err; 1201 } 1202 } 1203 1204 klp_start_transition(); 1205 patch->enabled = true; 1206 klp_try_complete_transition(); 1207 1208 return 0; 1209 err: 1210 pr_warn("failed to enable patch '%s'\n", patch->mod->name); 1211 1212 klp_cancel_transition(); 1213 return ret; 1214 } 1215 #else /* ifdef CONFIG_LIVEPATCH_WO_FTRACE */ 1216 /* 1217 * This function is called from stop_machine() context. 1218 */ 1219 static int enable_patch(struct klp_patch *patch) 1220 { 1221 struct klp_object *obj; 1222 int ret; 1223 1224 pr_notice_once("tainting kernel with TAINT_LIVEPATCH\n"); 1225 add_taint(TAINT_LIVEPATCH, LOCKDEP_STILL_OK); 1226 1227 if (!try_module_get(patch->mod)) 1228 return -ENODEV; 1229 1230 patch->enabled = true; 1231 1232 pr_notice("enabling patch '%s'\n", patch->mod->name); 1233 1234 klp_for_each_object(patch, obj) { 1235 if (!klp_is_object_loaded(obj)) 1236 continue; 1237 1238 ret = klp_patch_object(obj); 1239 if (ret) { 1240 pr_warn("failed to patch object '%s'\n", 1241 klp_is_module(obj) ? obj->name : "vmlinux"); 1242 goto disable; 1243 } 1244 } 1245 1246 return 0; 1247 1248 disable: 1249 disable_patch(patch); 1250 return ret; 1251 } 1252 > 1253 int klp_try_enable_patch(void *data) 1254 { 1255 int ret = 0; > 1256 struct patch_data *pd = (struct patch_data *)data; 1257 1258 if (atomic_inc_return(&pd->cpu_count) == 1) { 1259 struct klp_patch *patch = pd->patch; 1260 1261 ret = klp_check_calltrace(patch, 1); 1262 if (ret) { 1263 atomic_inc(&pd->cpu_count); 1264 return ret; 1265 } 1266 ret = enable_patch(patch); 1267 if (ret) { 1268 atomic_inc(&pd->cpu_count); 1269 return ret; 1270 } 1271 atomic_inc(&pd->cpu_count); 1272 } else { 1273 while (atomic_read(&pd->cpu_count) <= num_online_cpus()) 1274 cpu_relax(); 1275 1276 klp_smp_isb(); 1277 } 1278 1279 return ret; 1280 } 1281 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 29921/30000] drivers/net/dsa/mv88e6xxx/chip.c:2320:4: error: implicit declaration of function 'mv88e6xxx_g2_eeprom_wait'
by kernel test robot 24 Mar '24

24 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b670dd901cbbf97745380d373b1d2607b3235590 commit: 02956abc74ede6549249eb21e5b319b92dd147f3 [29921/30000] net: dsa: mv88e6xxx: Avoid EEPROM timeout when EEPROM is absent config: x86_64-randconfig-071-20240323 (https://download.01.org/0day-ci/archive/20240324/202403240020.k6ATfsBm-lkp@…) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240324/202403240020.k6ATfsBm-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/202403240020.k6ATfsBm-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/net/dsa/mv88e6xxx/chip.c:2320:4: error: implicit declaration of function 'mv88e6xxx_g2_eeprom_wait' [-Werror,-Wimplicit-function-declaration] 2320 | mv88e6xxx_g2_eeprom_wait(chip); | ^ drivers/net/dsa/mv88e6xxx/chip.c:2320:4: note: did you mean 'mv88e6xxx_g2_pvt_write'? drivers/net/dsa/mv88e6xxx/global2.h:457:19: note: 'mv88e6xxx_g2_pvt_write' declared here 457 | static inline int mv88e6xxx_g2_pvt_write(struct mv88e6xxx_chip *chip, | ^ 1 error generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_KEY_PARSER Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=n] Selected by [y]: - PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] vim +/mv88e6xxx_g2_eeprom_wait +2320 drivers/net/dsa/mv88e6xxx/chip.c 2306 2307 static void mv88e6xxx_hardware_reset(struct mv88e6xxx_chip *chip) 2308 { 2309 struct gpio_desc *gpiod = chip->reset; 2310 2311 /* If there is a GPIO connected to the reset pin, toggle it */ 2312 if (gpiod) { 2313 /* If the switch has just been reset and not yet completed 2314 * loading EEPROM, the reset may interrupt the I2C transaction 2315 * mid-byte, causing the first EEPROM read after the reset 2316 * from the wrong location resulting in the switch booting 2317 * to wrong mode and inoperable. 2318 */ 2319 if (chip->info->ops->get_eeprom) > 2320 mv88e6xxx_g2_eeprom_wait(chip); 2321 2322 gpiod_set_value_cansleep(gpiod, 1); 2323 usleep_range(10000, 20000); 2324 gpiod_set_value_cansleep(gpiod, 0); 2325 usleep_range(10000, 20000); 2326 2327 if (chip->info->ops->get_eeprom) 2328 mv88e6xxx_g2_eeprom_wait(chip); 2329 } 2330 } 2331 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 18399/30000] kernel/sched/bpf_sched.c:108:5: warning: "CONFIG_CGROUP_SCHED" is not defined, evaluates to 0
by kernel test robot 23 Mar '24

23 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: b670dd901cbbf97745380d373b1d2607b3235590 commit: 7cdbdbf5b6c12b1bff2ffb6b4bf08910ecf1689a [18399/30000] sched: programmable: Add helpers to set tag of task or task_group config: x86_64-randconfig-012-20240323 (https://download.01.org/0day-ci/archive/20240323/202403232345.qUtlhdt3-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/20240323/202403232345.qUtlhdt3-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/202403232345.qUtlhdt3-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/sched/bpf_sched.c: In function '____bpf_sched_set_tg_tag': >> kernel/sched/bpf_sched.c:108:5: warning: "CONFIG_CGROUP_SCHED" is not defined, evaluates to 0 [-Wundef] 108 | #if CONFIG_CGROUP_SCHED | ^~~~~~~~~~~~~~~~~~~ vim +/CONFIG_CGROUP_SCHED +108 kernel/sched/bpf_sched.c 105 106 BPF_CALL_2(bpf_sched_set_tg_tag, struct task_group *, tg, s64, tag) 107 { > 108 #if CONFIG_CGROUP_SCHED 109 if (tg == NULL || tg == &root_task_group) 110 return -EINVAL; 111 112 if (tg->tag == tag) 113 return 0; 114 115 rcu_read_lock(); 116 walk_tg_tree_from(tg, tg_change_tag, tg_nop, (void *)(&tag)); 117 rcu_read_unlock(); 118 119 return 0; 120 #endif 121 return -EPERM; 122 } 123 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 13138/21930] arch/x86/kernel/livepatch.c:225:5: warning: no previous prototype for function 'arch_klp_init_func'
by kernel test robot 23 Mar '24

23 Mar '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 25bf6ba385a44e446068067e861e1b843f6174e2 commit: 7e2ab91ea07673f855f16b54b7c6e6853b2efc1c [13138/21930] livepatch/x86: support livepatch without ftrace config: x86_64-randconfig-015-20240323 (https://download.01.org/0day-ci/archive/20240323/202403232323.GK5ks0fh-lkp@…) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403232323.GK5ks0fh-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/202403232323.GK5ks0fh-lkp@intel.com/ All warnings (new ones prefixed by >>): >> arch/x86/kernel/livepatch.c:225:5: warning: no previous prototype for function 'arch_klp_init_func' [-Wmissing-prototypes] 225 | int arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ arch/x86/kernel/livepatch.c:225:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 225 | int arch_klp_init_func(struct klp_object *obj, struct klp_func *func) | ^ | static >> arch/x86/kernel/livepatch.c:230:6: warning: no previous prototype for function 'arch_klp_free_func' [-Wmissing-prototypes] 230 | void arch_klp_free_func(struct klp_object *obj, struct klp_func *limit) | ^ arch/x86/kernel/livepatch.c:230:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 230 | void arch_klp_free_func(struct klp_object *obj, struct klp_func *limit) | ^ | static arch/x86/kernel/livepatch.c:258:6: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 258 | void arch_klp_code_modify_prepare(void) | ^ arch/x86/kernel/livepatch.c:258:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 258 | void arch_klp_code_modify_prepare(void) | ^ | static arch/x86/kernel/livepatch.c:264:6: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 264 | void arch_klp_code_modify_post_process(void) | ^ arch/x86/kernel/livepatch.c:264:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 264 | void arch_klp_code_modify_post_process(void) | ^ | static 4 warnings generated. -- kernel/livepatch/core.c:402:5: warning: no previous prototype for function 'klp_try_disable_patch' [-Wmissing-prototypes] 402 | int klp_try_disable_patch(void *data) | ^ kernel/livepatch/core.c:402:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 402 | int klp_try_disable_patch(void *data) | ^ | static kernel/livepatch/core.c:441:13: warning: no previous prototype for function 'arch_klp_code_modify_prepare' [-Wmissing-prototypes] 441 | void __weak arch_klp_code_modify_prepare(void) | ^ kernel/livepatch/core.c:441:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 441 | void __weak arch_klp_code_modify_prepare(void) | ^ | static kernel/livepatch/core.c:445:13: warning: no previous prototype for function 'arch_klp_code_modify_post_process' [-Wmissing-prototypes] 445 | void __weak arch_klp_code_modify_post_process(void) | ^ kernel/livepatch/core.c:445:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 445 | void __weak arch_klp_code_modify_post_process(void) | ^ | static kernel/livepatch/core.c:617:5: warning: no previous prototype for function 'klp_try_enable_patch' [-Wmissing-prototypes] 617 | int klp_try_enable_patch(void *data) | ^ kernel/livepatch/core.c:617:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 617 | int klp_try_enable_patch(void *data) | ^ | static >> kernel/livepatch/core.c:1013:12: warning: no previous prototype for function 'arch_klp_func_can_patch' [-Wmissing-prototypes] 1013 | int __weak arch_klp_func_can_patch(struct klp_func *func) | ^ kernel/livepatch/core.c:1013:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1013 | int __weak arch_klp_func_can_patch(struct klp_func *func) | ^ | static 5 warnings generated. vim +/arch_klp_init_func +225 arch/x86/kernel/livepatch.c 224 > 225 int arch_klp_init_func(struct klp_object *obj, struct klp_func *func) 226 { 227 return 0; 228 } 229 > 230 void arch_klp_free_func(struct klp_object *obj, struct klp_func *limit) 231 { 232 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 20947/21930] net/netfilter/.tmp_nf_nat_proto.o: warning: objtool: missing symbol for section .text
by kernel test robot 23 Mar '24

23 Mar '24
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 25bf6ba385a44e446068067e861e1b843f6174e2 commit: 83abe3a3b85762720192809ac8695ff9255cfd23 [20947/21930] netfilter: nat: remove csum_recalc hook config: x86_64-buildonly-randconfig-004-20240323 (https://download.01.org/0day-ci/archive/20240323/202403232115.AU4CMSAJ-lkp@…) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403232115.AU4CMSAJ-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/202403232115.AU4CMSAJ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> net/netfilter/.tmp_nf_nat_proto.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 14628/30000] ld.lld: error: undefined symbol: proc_mm_idle_operations
by kernel test robot 23 Mar '24

23 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 459341c4b4845b283c7a884e6a0dc4bd8cdb89e6 commit: 4232d9005401d839ceeb1a02da34749b6dab1376 [14628/30000] etmem: add CONFIG_ETMEM macro definition for etmem feature config: x86_64-randconfig-072-20240323 (https://download.01.org/0day-ci/archive/20240323/202403231943.bTlhzqcv-lkp@…) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403231943.bTlhzqcv-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/202403231943.bTlhzqcv-lkp@intel.com/ All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: proc_mm_idle_operations >>> referenced by base.c >>> proc/base.o:(tid_base_stuff) in archive fs/built-in.a >>> referenced by base.c >>> proc/base.o:(tgid_base_stuff) in archive fs/built-in.a -- >> ld.lld: error: undefined symbol: proc_mm_swap_operations >>> referenced by base.c >>> proc/base.o:(tid_base_stuff) in archive fs/built-in.a >>> referenced by base.c >>> proc/base.o:(tgid_base_stuff) in archive fs/built-in.a -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 1770/6857] kernel/livepatch/core.c:1587:12: warning: no previous prototype for function 'arch_klp_check_activeness_func'
by kernel test robot 23 Mar '24

23 Mar '24
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 1b4212c630731d88b07d5b6e28ecaff1a76d3839 commit: 583e6e55fb6aa193b1a82909069e8028c5d5653d [1770/6857] livepatch/x86: Support livepatch without ftrace config: x86_64-randconfig-015-20240323 (https://download.01.org/0day-ci/archive/20240323/202403231944.DuQR0aQA-lkp@…) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240323/202403231944.DuQR0aQA-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/202403231944.DuQR0aQA-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/livepatch/core.c:1587:12: warning: no previous prototype for function 'arch_klp_check_activeness_func' [-Wmissing-prototypes] 1587 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ kernel/livepatch/core.c:1587:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1587 | int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, | ^ | static kernel/livepatch/core.c:1811:14: warning: no previous prototype for function 'arch_klp_mem_alloc' [-Wmissing-prototypes] 1811 | void __weak *arch_klp_mem_alloc(size_t size) | ^ kernel/livepatch/core.c:1811:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1811 | void __weak *arch_klp_mem_alloc(size_t size) | ^ | static kernel/livepatch/core.c:1816:13: warning: no previous prototype for function 'arch_klp_mem_free' [-Wmissing-prototypes] 1816 | void __weak arch_klp_mem_free(void *mem) | ^ kernel/livepatch/core.c:1816:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1816 | void __weak arch_klp_mem_free(void *mem) | ^ | static 3 warnings generated. vim +/arch_klp_check_activeness_func +1587 kernel/livepatch/core.c 1586 > 1587 int __weak arch_klp_check_activeness_func(struct klp_func *func, int enable, 1588 klp_add_func_t add_func, 1589 struct list_head *func_list) 1590 { 1591 int ret; 1592 unsigned long func_addr = 0; 1593 unsigned long func_size; 1594 struct klp_func_node *func_node = NULL; 1595 unsigned long old_func = (unsigned long)func->old_func; 1596 1597 func_node = func->func_node; 1598 /* Check func address in stack */ 1599 if (enable) { 1600 if (func->patched || func->force == KLP_ENFORCEMENT) 1601 return 0; 1602 /* 1603 * When enable, checking the currently active functions. 1604 */ 1605 if (list_empty(&func_node->func_stack)) { 1606 /* 1607 * Not patched on this function [the origin one] 1608 */ 1609 func_addr = old_func; 1610 func_size = func->old_size; 1611 } else { 1612 /* 1613 * Previously patched function [the active one] 1614 */ 1615 struct klp_func *prev; 1616 1617 prev = list_first_or_null_rcu(&func_node->func_stack, 1618 struct klp_func, stack_node); 1619 func_addr = (unsigned long)prev->new_func; 1620 func_size = prev->new_size; 1621 } 1622 /* 1623 * When preemption is disabled and the replacement area 1624 * does not contain a jump instruction, the migration 1625 * thread is scheduled to run stop machine only after the 1626 * execution of instructions to be replaced is complete. 1627 */ 1628 if (IS_ENABLED(CONFIG_PREEMPTION) || 1629 (func->force == KLP_NORMAL_FORCE) || 1630 arch_check_jump_insn(func_addr)) { 1631 ret = add_func(func_list, func_addr, func_size, 1632 func->old_name, func->force); 1633 if (ret) 1634 return ret; 1635 if (func_addr != old_func) { 1636 ret = add_func(func_list, old_func, KLP_MAX_REPLACE_SIZE, 1637 func->old_name, func->force); 1638 if (ret) 1639 return ret; 1640 } 1641 } 1642 } else { 1643 #ifdef CONFIG_PREEMPTION 1644 /* 1645 * No scheduling point in the replacement instructions. Therefore, 1646 * when preemption is not enabled, atomic execution is performed 1647 * and these instructions will not appear on the stack. 1648 */ 1649 if (list_is_singular(&func_node->func_stack)) { 1650 func_addr = old_func; 1651 func_size = func->old_size; 1652 } else { 1653 struct klp_func *prev; 1654 1655 prev = list_first_or_null_rcu( 1656 &func_node->func_stack, 1657 struct klp_func, stack_node); 1658 func_addr = (unsigned long)prev->new_func; 1659 func_size = prev->new_size; 1660 } 1661 ret = add_func(func_list, func_addr, 1662 func_size, func->old_name, 0); 1663 if (ret) 1664 return ret; 1665 if (func_addr != old_func) { 1666 ret = add_func(func_list, old_func, KLP_MAX_REPLACE_SIZE, 1667 func->old_name, 0); 1668 if (ret) 1669 return ret; 1670 } 1671 #endif 1672 1673 func_addr = (unsigned long)func->new_func; 1674 func_size = func->new_size; 1675 ret = add_func(func_list, func_addr, 1676 func_size, func->old_name, 0); 1677 if (ret) 1678 return ret; 1679 } 1680 return 0; 1681 } 1682 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 1202
  • 1203
  • 1204
  • 1205
  • 1206
  • 1207
  • 1208
  • ...
  • 1880
  • Older →

HyperKitty Powered by HyperKitty