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-5.10] io_uring: prevent opcode speculation
by Long Li 21 Mar '25

21 Mar '25
From: Pavel Begunkov <asml.silence(a)gmail.com> mainline inclusion from mainline-v6.10-rc2 commit 1e988c3fe1264708f4f92109203ac5b1d65de50b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBSVZU CVE: CVE-2025-21863 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- sqe->opcode is used for different tables, make sure we santitise it against speculations. Cc: stable(a)vger.kernel.org Fixes: d3656344fea03 ("io_uring: add lookup table for various opcode needs") Signed-off-by: Pavel Begunkov <asml.silence(a)gmail.com> Reviewed-by: Li Zetao <lizetao1(a)huawei.com> Link: https://lore.kernel.org/r/7eddbf31c8ca0a3947f8ed98271acc2b4349c016.17395684… Signed-off-by: Jens Axboe <axboe(a)kernel.dk> Conflicts: io_uring/io_uring.c [Context conflict] Signed-off-by: Long Li <leo.lilong(a)huawei.com> --- io_uring/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 17a4e37a177f..883e2b74f82e 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -7196,6 +7196,8 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, if (!io_check_restriction(ctx, req, sqe_flags)) return -EACCES; + req->opcode = array_index_nospec(req->opcode, IORING_OP_LAST); + if ((sqe_flags & IOSQE_BUFFER_SELECT) && !io_op_defs[req->opcode].buffer_select) return -EOPNOTSUPP; -- 2.39.2
2 1
0 0
[openeuler:OLK-5.10 2816/2816] drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
by kernel test robot 21 Mar '25

21 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 762816c3c07e052877c68911685e3700fe073298 commit: a0c5bfdbc099daf30cbadb9657803f0cb3f89d0b [2816/2816] drivers: support for rnpm drivers from Mucse Technology N10/N400 config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250321/202503210356.tFg9vkJQ-lkp@…) compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250321/202503210356.tFg9vkJQ-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/202503210356.tFg9vkJQ-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnpm/rnpm_common.c:12: >> drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1137 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1162:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1162 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ 2 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnpm/rnpm_ethtool.c:20: >> drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1137 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1162:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1162 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_ethtool.c:1232:7: warning: variable 'autoneg_changed' set but not used [-Wunused-but-set-variable] 1232 | bool autoneg_changed = false, duplex_changed = false; | ^ drivers/net/ethernet/mucse/rnpm/rnpm_ethtool.c:1232:32: warning: variable 'duplex_changed' set but not used [-Wunused-but-set-variable] 1232 | bool autoneg_changed = false, duplex_changed = false; | ^ drivers/net/ethernet/mucse/rnpm/rnpm_ethtool.c:2029:6: warning: variable 'dma_ch' set but not used [-Wunused-but-set-variable] 2029 | u32 dma_ch; | ^ 5 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnpm/rnpm_main.c:32: >> drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1137 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1162:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1162 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:245:6: warning: no previous prototype for function 'rnpm_pf_service_event_schedule' [-Wmissing-prototypes] 245 | void rnpm_pf_service_event_schedule(struct rnpm_pf_adapter *pf_adapter) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:245:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 245 | void rnpm_pf_service_event_schedule(struct rnpm_pf_adapter *pf_adapter) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:1768:5: warning: no previous prototype for function 'rnpm_rx_ring_reinit' [-Wmissing-prototypes] 1768 | int rnpm_rx_ring_reinit(struct rnpm_adapter *adapter, struct rnpm_ring *rx_ring) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:1768:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1768 | int rnpm_rx_ring_reinit(struct rnpm_adapter *adapter, struct rnpm_ring *rx_ring) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:1957:7: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable] 1957 | bool xdp_xmit = false; | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2142:6: warning: no previous prototype for function 'rnpm_write_eitr' [-Wmissing-prototypes] 2142 | void rnpm_write_eitr(struct rnpm_q_vector *q_vector, bool is_rxframe) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2142:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2142 | void rnpm_write_eitr(struct rnpm_q_vector *q_vector, bool is_rxframe) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2381:6: warning: variable 'packets' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 2381 | if (!ring_container->ring) | ^~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2387:7: note: uninitialized use occurs here 2387 | if (!packets) | ^~~~~~~ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2381:2: note: remove the 'if' if its condition is always true 2381 | if (!ring_container->ring) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 2382 | 2383 | packets = ring_container->total_packets; drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2374:37: note: initialize the variable 'packets' to silence this warning 2374 | unsigned int avg_wire_size, packets, bytes; | ^ | = 0 drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2969:5: warning: no previous prototype for function 'rnpm_xmit_nop_frame_ring' [-Wmissing-prototypes] 2969 | int rnpm_xmit_nop_frame_ring(struct rnpm_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2969:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2969 | int rnpm_xmit_nop_frame_ring(struct rnpm_adapter *adapter, | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2985:5: warning: no previous prototype for function 'rnpm_xmit_nop_frame_ring_temp' [-Wmissing-prototypes] 2985 | int rnpm_xmit_nop_frame_ring_temp(struct rnpm_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:2985:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2985 | int rnpm_xmit_nop_frame_ring_temp(struct rnpm_adapter *adapter, | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:3851:6: warning: no previous prototype for function 'rnpm_vlan_stags_flag' [-Wmissing-prototypes] 3851 | void rnpm_vlan_stags_flag(struct rnpm_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:3851:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3851 | void rnpm_vlan_stags_flag(struct rnpm_adapter *adapter) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:3972:6: warning: no previous prototype for function 'control_mac_rx' [-Wmissing-prototypes] 3972 | void control_mac_rx(struct rnpm_adapter *adapter, bool on) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:3972:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3972 | void control_mac_rx(struct rnpm_adapter *adapter, bool on) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5689:6: warning: no previous prototype for function 'rnpm_pf_service_timer' [-Wmissing-prototypes] 5689 | void rnpm_pf_service_timer(struct timer_list *t) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5689:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 5689 | void rnpm_pf_service_timer(struct timer_list *t) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5707:6: warning: no previous prototype for function 'rnpm_service_timer' [-Wmissing-prototypes] 5707 | void rnpm_service_timer(struct timer_list *t) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5707:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 5707 | void rnpm_service_timer(struct timer_list *t) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5853:21: warning: no previous prototype for function 'wait_all_port_resetting' [-Wmissing-prototypes] 5853 | __maybe_unused void wait_all_port_resetting(struct rnpm_pf_adapter *pf_adapter) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5853:16: note: declare 'static' if the function is not intended to be used outside of this translation unit 5853 | __maybe_unused void wait_all_port_resetting(struct rnpm_pf_adapter *pf_adapter) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5865:21: warning: no previous prototype for function 'clean_all_port_resetting' [-Wmissing-prototypes] 5865 | __maybe_unused void clean_all_port_resetting(struct rnpm_pf_adapter *pf_adapter) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_main.c:5865:16: note: declare 'static' if the function is not intended to be used outside of this translation unit 5865 | __maybe_unused void clean_all_port_resetting(struct rnpm_pf_adapter *pf_adapter) | ^ | static -- In file included from drivers/net/ethernet/mucse/rnpm/rnpm_n10.c:11: >> drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1137 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1162:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1162 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_n10.c:448:5: warning: no previous prototype for function 'rnpm_reset_pipeline_n10' [-Wmissing-prototypes] 448 | s32 rnpm_reset_pipeline_n10(struct rnpm_hw *hw) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_n10.c:448:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 448 | s32 rnpm_reset_pipeline_n10(struct rnpm_hw *hw) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_n10.c:503:6: warning: variable 'status' set but not used [-Wunused-but-set-variable] 503 | s32 status = 0; | ^ 4 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:10: >> drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1137 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1162:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1162 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:14:24: warning: no previous prototype for function 'mbx_cookie_zalloc' [-Wmissing-prototypes] 14 | struct mbx_req_cookie *mbx_cookie_zalloc(int priv_len) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:14:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 14 | struct mbx_req_cookie *mbx_cookie_zalloc(int priv_len) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:28:5: warning: no previous prototype for function 'rnpm_mbx_write_posted_locked' [-Wmissing-prototypes] 28 | int rnpm_mbx_write_posted_locked(struct rnpm_hw *hw, struct mbx_fw_cmd_req *req) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:28:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 28 | int rnpm_mbx_write_posted_locked(struct rnpm_hw *hw, struct mbx_fw_cmd_req *req) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:81:6: warning: no previous prototype for function 'rnpm_link_stat_mark_disable' [-Wmissing-prototypes] 81 | void rnpm_link_stat_mark_disable(struct rnpm_hw *hw) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:81:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 81 | void rnpm_link_stat_mark_disable(struct rnpm_hw *hw) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:86:5: warning: no previous prototype for function 'rnpm_mbx_fw_post_req' [-Wmissing-prototypes] 86 | int rnpm_mbx_fw_post_req(struct rnpm_hw *hw, | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:86:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 86 | int rnpm_mbx_fw_post_req(struct rnpm_hw *hw, | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:153:5: warning: no previous prototype for function 'rnpm_fw_send_cmd_wait' [-Wmissing-prototypes] 153 | int rnpm_fw_send_cmd_wait(struct rnpm_hw *hw, | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:153:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 153 | int rnpm_fw_send_cmd_wait(struct rnpm_hw *hw, | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:633:5: warning: no previous prototype for function 'rnpm_mbx_lldp_all_ports_enable' [-Wmissing-prototypes] 633 | int rnpm_mbx_lldp_all_ports_enable(struct rnpm_hw *hw, bool enable) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:633:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 633 | int rnpm_mbx_lldp_all_ports_enable(struct rnpm_hw *hw, bool enable) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:936:5: warning: no previous prototype for function 'rnpm_mbx_pluginout_evt_en' [-Wmissing-prototypes] 936 | int rnpm_mbx_pluginout_evt_en(struct rnpm_hw *hw, int in_dir, int enable) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:936:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 936 | int rnpm_mbx_pluginout_evt_en(struct rnpm_hw *hw, int in_dir, int enable) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:963:5: warning: no previous prototype for function 'rnpm_fw_get_capablity' [-Wmissing-prototypes] 963 | int rnpm_fw_get_capablity(struct rnpm_hw *hw, struct phy_abilities *abil) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:963:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 963 | int rnpm_fw_get_capablity(struct rnpm_hw *hw, struct phy_abilities *abil) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1153:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] 1153 | int err; | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1188:6: warning: variable 'value' set but not used [-Wunused-but-set-variable] 1188 | int value; | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1184:5: warning: no previous prototype for function 'rnpm_fw_reg_read' [-Wmissing-prototypes] 1184 | int rnpm_fw_reg_read(struct rnpm_hw *hw, int addr, int sz) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1184:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1184 | int rnpm_fw_reg_read(struct rnpm_hw *hw, int addr, int sz) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1255:18: warning: variable 'hw' set but not used [-Wunused-but-set-variable] 1255 | struct rnpm_hw *hw; | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1476:5: warning: no previous prototype for function 'rnpm_get_port_stats2' [-Wmissing-prototypes] 1476 | int rnpm_get_port_stats2(struct rnpm_hw *hw, int *pabs, int *pspeed, int *plink) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1476:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1476 | int rnpm_get_port_stats2(struct rnpm_hw *hw, int *pabs, int *pspeed, int *plink) | ^ | static drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1528:9: warning: variable 'err' is uninitialized when used here [-Wuninitialized] 1528 | return err ? -err : 0; | ^~~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.c:1509:9: note: initialize the variable 'err' to silence this warning 1509 | int err; | ^ | = 0 16 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnpm/rnpm_sysfs.c:17: >> drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1137:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1137 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h:1162:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1162 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnpm/rnpm_sysfs.c:263:5: warning: no previous prototype for function 'rnpm_mbx_get_pn_sn' [-Wmissing-prototypes] 263 | int rnpm_mbx_get_pn_sn(struct rnpm_hw *hw, char pn[33], char sn[33]) | ^ drivers/net/ethernet/mucse/rnpm/rnpm_sysfs.c:263:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 263 | int rnpm_mbx_get_pn_sn(struct rnpm_hw *hw, char pn[33], char sn[33]) | ^ | static 3 warnings generated. vim +/int +1137 drivers/net/ethernet/mucse/rnpm/rnpm_mbx_fw.h 1119 1120 static inline void 1121 build_link_set_loopback_req(struct mbx_fw_cmd_req *req, 1122 void *cookie, 1123 enum LOOPBACK_LEVEL level, 1124 enum LOOPBACK_FORCE_SPEED force_speed) 1125 { 1126 req->flags = 0; 1127 req->opcode = SET_LOOPBACK_MODE; 1128 req->datalen = sizeof(req->loopback); 1129 req->cookie = cookie; 1130 req->reply_lo = 0; 1131 req->reply_hi = 0; 1132 1133 req->loopback.loopback_level = level; 1134 req->loopback.loopback_type = LOOPBACK_TYPE_LOCAL; 1135 if (force_speed != LOOPBACK_FORCE_SPEED_NONE) { 1136 req->loopback.loopback_force_speed = force_speed; > 1137 req->loopback.loopback_force_speed_enable = 1; 1138 } 1139 } 1140 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[PATCH OLK-6.6 0/2] arm64: entry: Support hardware xint and xcall
by Jinjie Ruan 20 Mar '25

20 Mar '25
Support hardware xint and xcall. Jinjie Ruan (2): arm64: entry: Support hardware xint arm64: entry: Support hardware xcall arch/Kconfig | 14 ++--- arch/arm64/Kconfig | 12 ++++ arch/arm64/include/asm/sysreg.h | 7 +++ arch/arm64/kernel/cpufeature.c | 100 +++++++++++++++++++++++++++++++ arch/arm64/kernel/entry-common.c | 75 ++++++++++++++++++++--- arch/arm64/kernel/entry.S | 74 +++++++++++++++++++++-- arch/arm64/tools/cpucaps | 4 +- drivers/irqchip/irq-gic-v3.c | 36 ++++++++++- 8 files changed, 298 insertions(+), 24 deletions(-) -- 2.34.1
2 3
0 0
[PATCH OLK-6.6] io_uring: prevent opcode speculation
by Long Li 20 Mar '25

20 Mar '25
From: Pavel Begunkov <asml.silence(a)gmail.com> mainline inclusion from mainline-v6.10-rc2 commit 1e988c3fe1264708f4f92109203ac5b1d65de50b category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBSVZU CVE: CVE-2025-21863 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?… -------------------------------- sqe->opcode is used for different tables, make sure we santitise it against speculations. Cc: stable(a)vger.kernel.org Fixes: d3656344fea03 ("io_uring: add lookup table for various opcode needs") Signed-off-by: Pavel Begunkov <asml.silence(a)gmail.com> Reviewed-by: Li Zetao <lizetao1(a)huawei.com> Link: https://lore.kernel.org/r/7eddbf31c8ca0a3947f8ed98271acc2b4349c016.17395684… Signed-off-by: Jens Axboe <axboe(a)kernel.dk> Signed-off-by: Long Li <leo.lilong(a)huawei.com> --- io_uring/io_uring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 833fd9b6a1f3..3aaac1023efb 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -2173,6 +2173,8 @@ static int io_init_req(struct io_ring_ctx *ctx, struct io_kiocb *req, req->opcode = 0; return io_init_fail_req(req, -EINVAL); } + opcode = array_index_nospec(opcode, IORING_OP_LAST); + def = &io_issue_defs[opcode]; if (unlikely(sqe_flags & ~SQE_COMMON_FLAGS)) { /* enforce forwards compatibility on users */ -- 2.39.2
2 1
0 0
[openeuler:OLK-5.10 2816/2816] kernel/rcu/update.o: warning: objtool: synchronize_rcu_tasks_rude()+0xe0: unreachable instruction
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 762816c3c07e052877c68911685e3700fe073298 commit: 2509f2079e7247ed0d695bdb69c3d019a700a4b8 [2816/2816] rcu-tasks: Make rude RCU-Tasks work well with CPU hotplug config: x86_64-buildonly-randconfig-003-20250320 (https://download.01.org/0day-ci/archive/20250320/202503202016.ACG7odcD-lkp@…) compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503202016.ACG7odcD-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/202503202016.ACG7odcD-lkp@intel.com/ All warnings (new ones prefixed by >>): >> kernel/rcu/update.o: warning: objtool: synchronize_rcu_tasks_rude()+0xe0: unreachable instruction -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 2816/2816] drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 762816c3c07e052877c68911685e3700fe073298 commit: e53494b741272933726616122ea77143d9742631 [2816/2816] drivers: initial support for rnp drivers from Mucse Technology config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250320/202503201925.S7VuFUSk-lkp@…) compiler: clang version 20.1.1 (https://github.com/llvm/llvm-project 424c2d9b7e4de40d0804dd374721e6411c27d1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201925.S7VuFUSk-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/202503201925.S7VuFUSk-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: In file included from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_main.c:34: In file included from drivers/net/ethernet/mucse/rnp/rnp_tc_u32_parse.h:6: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: 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:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:174:6: warning: no previous prototype for function 'rnp_unmap_and_free_tx_resource' [-Wmissing-prototypes] 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:174:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 174 | void rnp_unmap_and_free_tx_resource(struct rnp_ring *ring, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:669:5: warning: no previous prototype for function 'rnp_rx_ring_reinit' [-Wmissing-prototypes] 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:669:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 669 | int rnp_rx_ring_reinit(struct rnp_adapter *adapter, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:1777:7: warning: variable 'xdp_xmit' set but not used [-Wunused-but-set-variable] 1777 | bool xdp_xmit = false; | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:6: warning: no previous prototype for function 'rnp_write_eitr_rx' [-Wmissing-prototypes] 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:2012:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 2012 | void rnp_write_eitr_rx(struct rnp_q_vector *q_vector) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:2818:6: warning: variable 'rxctrl' set but not used [-Wunused-but-set-variable] 2818 | u32 rxctrl = 0, dma_axi_ctl; | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:6: warning: no previous prototype for function 'rnp_vlan_stags_flag' [-Wmissing-prototypes] 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3152:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3152 | void rnp_vlan_stags_flag(struct rnp_adapter *adapter) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:5: warning: no previous prototype for function 'rnp_xmit_nop_frame_ring' [-Wmissing-prototypes] 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:3558:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 3558 | int rnp_xmit_nop_frame_ring(struct rnp_adapter *adapter, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:6: warning: no previous prototype for function 'rnp_service_timer' [-Wmissing-prototypes] 4811 | void rnp_service_timer(struct timer_list *t) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4811:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4811 | void rnp_service_timer(struct timer_list *t) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:6: warning: no previous prototype for function 'rnp_service_task' [-Wmissing-prototypes] 4919 | void rnp_service_task(struct work_struct *work) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:4919:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 4919 | void rnp_service_task(struct work_struct *work) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:5: warning: no previous prototype for function 'rnp_delete_knode' [-Wmissing-prototypes] 5941 | int rnp_delete_knode(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:5941:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 5941 | int rnp_delete_knode(struct net_device *dev, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:5: warning: no previous prototype for function 'rnp_config_knode' [-Wmissing-prototypes] 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6030:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6030 | int rnp_config_knode(struct net_device *dev, __be16 protocol, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:5: warning: no previous prototype for function 'rnp_setup_tc_cls_u32' [-Wmissing-prototypes] 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6089:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 6089 | int rnp_setup_tc_cls_u32(struct net_device *dev, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:6: warning: no previous prototype for function 'rnp_do_reset' [-Wmissing-prototypes] 6166 | void rnp_do_reset(struct net_device *netdev) | ^ drivers/net/ethernet/mucse/rnp/rnp_main.c:6166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit -- In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_common.c:10: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: 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:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ 6 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_lib.c:4: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: 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:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:5: warning: no previous prototype for function 'rnp_acquire_msix_vectors' [-Wmissing-prototypes] 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:439:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 439 | int rnp_acquire_msix_vectors(struct rnp_adapter *adapter, int vectors) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:6: warning: no previous prototype for function 'rnp_print_ring_info' [-Wmissing-prototypes] 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ drivers/net/ethernet/mucse/rnp/rnp_lib.c:985:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 985 | void rnp_print_ring_info(struct rnp_adapter *adapter) | ^ | static 8 warnings generated. -- In file included from drivers/net/ethernet/mucse/rnp/rnp_n10.c:8: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_n10.c:8: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: 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:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:122:5: warning: no previous prototype for function 'rnp_eth_set_rar_n10' [-Wmissing-prototypes] 122 | s32 rnp_eth_set_rar_n10(struct rnp_eth_info *eth, u32 index, u8 *addr, | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:122:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 122 | s32 rnp_eth_set_rar_n10(struct rnp_eth_info *eth, u32 index, u8 *addr, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:179:5: warning: no previous prototype for function 'rnp_eth_clear_rar_n10' [-Wmissing-prototypes] 179 | s32 rnp_eth_clear_rar_n10(struct rnp_eth_info *eth, u32 index) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:179:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 179 | s32 rnp_eth_clear_rar_n10(struct rnp_eth_info *eth, u32 index) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:214:5: warning: no previous prototype for function 'rnp_eth_set_vmdq_n10' [-Wmissing-prototypes] 214 | s32 rnp_eth_set_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:214:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 214 | s32 rnp_eth_set_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:244:5: warning: no previous prototype for function 'rnp_eth_clear_vmdq_n10' [-Wmissing-prototypes] 244 | s32 rnp_eth_clear_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:244:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 244 | s32 rnp_eth_clear_vmdq_n10(struct rnp_eth_info *eth, u32 rar, u32 vmdq) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:328:5: warning: no previous prototype for function 'rnp_addr_list_itr' [-Wmissing-prototypes] 328 | u8 *rnp_addr_list_itr(struct rnp_hw __maybe_unused *hw, u8 **mc_addr_ptr) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:328:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 328 | u8 *rnp_addr_list_itr(struct rnp_hw __maybe_unused *hw, u8 **mc_addr_ptr) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:359:5: warning: no previous prototype for function 'rnp_eth_update_mc_addr_list_n10' [-Wmissing-prototypes] 359 | s32 rnp_eth_update_mc_addr_list_n10(struct rnp_eth_info *eth, | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:359:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 359 | s32 rnp_eth_update_mc_addr_list_n10(struct rnp_eth_info *eth, | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:442:6: warning: no previous prototype for function 'rnp_eth_clr_mc_addr_n10' [-Wmissing-prototypes] 442 | void rnp_eth_clr_mc_addr_n10(struct rnp_eth_info *eth) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:442:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 442 | void rnp_eth_clr_mc_addr_n10(struct rnp_eth_info *eth) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:457:6: warning: no previous prototype for function 'rnp_eth_update_rss_key_n10' [-Wmissing-prototypes] 457 | void rnp_eth_update_rss_key_n10(struct rnp_eth_info *eth, bool sriov_flag) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:457:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 457 | void rnp_eth_update_rss_key_n10(struct rnp_eth_info *eth, bool sriov_flag) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:486:6: warning: no previous prototype for function 'rnp_eth_update_rss_table_n10' [-Wmissing-prototypes] 486 | void rnp_eth_update_rss_table_n10(struct rnp_eth_info *eth) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:486:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 486 | void rnp_eth_update_rss_table_n10(struct rnp_eth_info *eth) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:511:5: warning: no previous prototype for function 'rnp_eth_set_vfta_n10' [-Wmissing-prototypes] 511 | s32 rnp_eth_set_vfta_n10(struct rnp_eth_info *eth, u32 vlan, bool vlan_on) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:511:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 511 | s32 rnp_eth_set_vfta_n10(struct rnp_eth_info *eth, u32 vlan, bool vlan_on) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:551:6: warning: no previous prototype for function 'rnp_eth_clr_vfta_n10' [-Wmissing-prototypes] 551 | void rnp_eth_clr_vfta_n10(struct rnp_eth_info *eth) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:551:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 551 | void rnp_eth_clr_vfta_n10(struct rnp_eth_info *eth) | ^ | static drivers/net/ethernet/mucse/rnp/rnp_n10.c:577:5: warning: no previous prototype for function 'rnp_layer2_pritologic_n10' [-Wmissing-prototypes] 577 | u16 rnp_layer2_pritologic_n10(u16 hw_id) | ^ drivers/net/ethernet/mucse/rnp/rnp_n10.c:577:1: note: declare 'static' if the function is not intended to be used outside of this translation unit -- In file included from drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:9: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:20: In file included from drivers/net/ethernet/mucse/rnp/rnp_type.h:960: >> drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:898:37: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 898 | req->set_phy_reg.recall_qsfp_page = 1; | ^ ~ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h:1068:45: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion] 1068 | req->loopback.loopback_force_speed_enable = 1; | ^ ~ In file included from drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:9: In file included from drivers/net/ethernet/mucse/rnp/rnp.h:21: drivers/net/ethernet/mucse/rnp/rnp_common.h:298:7: warning: variable 'has_mac' set but not used [-Wunused-but-set-variable] 298 | bool has_mac, has_trans; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:298:16: 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:299:6: warning: variable 'headroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_common.h:299:16: warning: variable 'tailroom' set but not used [-Wunused-but-set-variable] 299 | int headroom, tailroom; | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1100:6: warning: variable 'err' set but not used [-Wunused-but-set-variable] 1100 | int err; | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1140:6: warning: variable 'value' set but not used [-Wunused-but-set-variable] 1140 | int value; | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1136:5: warning: no previous prototype for function 'rnp_fw_reg_read' [-Wmissing-prototypes] 1136 | int rnp_fw_reg_read(struct rnp_hw *hw, int addr, int sz) | ^ drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.c:1136:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1136 | int rnp_fw_reg_read(struct rnp_hw *hw, int addr, int sz) | ^ | static 9 warnings generated. .. vim +/int +898 drivers/net/ethernet/mucse/rnp/rnp_mbx_fw.h 879 880 static inline void build_set_phy_reg(struct mbx_fw_cmd_req *req, 881 void *cookie, 882 enum PHY_INTERFACE phy_inf, 883 char nr_lane, int reg, int w_data, 884 int recall_qsfp_page) 885 { 886 req->flags = 0; 887 req->opcode = SET_PHY_REG; 888 req->datalen = sizeof(req->set_phy_reg); 889 req->cookie = cookie; 890 req->reply_lo = 0; 891 req->reply_hi = 0; 892 req->set_phy_reg.phy_interface = phy_inf; 893 req->set_phy_reg.nr_lane = nr_lane; 894 req->set_phy_reg.phy_reg_addr = reg; 895 req->set_phy_reg.phy_w_data = w_data; 896 897 if (recall_qsfp_page) > 898 req->set_phy_reg.recall_qsfp_page = 1; 899 else 900 req->set_phy_reg.recall_qsfp_page = 0; 901 } 902 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1509/1509] net/netfilter/ipvs/ip_vs_ctl.c:2480:9: warning: 'ret' may be used uninitialized in this function
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d54ba3f54612a8622df13d42bc1870048cb63d20 commit: 56ee6566622b8a8f58ec8d99e403d4ba9f29e693 [1509/1509] ipvs: Fix uninit-value in do_ip_vs_set_ctl() config: arm64-randconfig-002-20250320 (https://download.01.org/0day-ci/archive/20250320/202503201839.XDDCG7DI-lkp@…) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201839.XDDCG7DI-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/202503201839.XDDCG7DI-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): net/netfilter/ipvs/ip_vs_ctl.c: In function 'do_ip_vs_set_ctl': >> net/netfilter/ipvs/ip_vs_ctl.c:2480:9: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] 2480 | return ret; | ^~~ vim +/ret +2480 net/netfilter/ipvs/ip_vs_ctl.c c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2337 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2338 static int ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2339 do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2340 { fc723250c9cb04 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-01-03 2341 struct net *net = sock_net(sk); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2342 int ret; 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2343 unsigned char arg[MAX_SET_ARGLEN]; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2344 struct ip_vs_service_user *usvc_compat; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2345 struct ip_vs_service_user_kern usvc; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2346 struct ip_vs_service *svc; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2347 struct ip_vs_dest_user *udest_compat; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2348 struct ip_vs_dest_user_kern udest; ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2349 struct netns_ipvs *ipvs = net_ipvs(net); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2350 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2351 BUILD_BUG_ON(sizeof(arg) > 255); df008c91f83583 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2012-11-16 2352 if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2353 return -EPERM; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2354 04bcef2a83f40c net/netfilter/ipvs/ip_vs_ctl.c Arjan van de Ven 2010-01-04 2355 if (cmd < IP_VS_BASE_CTL || cmd > IP_VS_SO_SET_MAX) 04bcef2a83f40c net/netfilter/ipvs/ip_vs_ctl.c Arjan van de Ven 2010-01-04 2356 return -EINVAL; 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2357 if (len != set_arglen[CMDID(cmd)]) { 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2358 IP_VS_DBG(1, "set_ctl: len %u != %u\n", 5fcf0cf6073d4a net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2014-09-03 2359 len, set_arglen[CMDID(cmd)]); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2360 return -EINVAL; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2361 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2362 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2363 if (copy_from_user(arg, user, len) != 0) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2364 return -EFAULT; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2365 ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2366 /* Handle daemons since they have another lock */ ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2367 if (cmd == IP_VS_SO_SET_STARTDAEMON || ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2368 cmd == IP_VS_SO_SET_STOPDAEMON) { ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2369 struct ip_vs_daemon_user *dm = (struct ip_vs_daemon_user *)arg; ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2370 e0b26cc997d573 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2371 if (cmd == IP_VS_SO_SET_STARTDAEMON) { e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2372 struct ipvs_sync_daemon_cfg cfg; e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2373 e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2374 memset(&cfg, 0, sizeof(cfg)); 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2375 ret = -EINVAL; 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2376 if (strscpy(cfg.mcast_ifn, dm->mcast_ifn, 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2377 sizeof(cfg.mcast_ifn)) <= 0) e2eda307807970 net/netfilter/ipvs/ip_vs_ctl.c Davide Caratti 2019-11-13 2378 return ret; e4ff67513096e6 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2379 cfg.syncid = dm->syncid; 6ac121d710697c net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2380 ret = start_sync_thread(ipvs, &cfg, dm->state); e0b26cc997d573 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2381 } else { b3cf3cbfb57c27 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2382 ret = stop_sync_thread(ipvs, dm->state); e0b26cc997d573 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2015-07-26 2383 } e2eda307807970 net/netfilter/ipvs/ip_vs_ctl.c Davide Caratti 2019-11-13 2384 return ret; ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2385 } ae1d48b23d5e79 net/netfilter/ipvs/ip_vs_ctl.c Hans Schillstrom 2011-10-11 2386 7926dbfa4bc14e net/netfilter/ipvs/ip_vs_ctl.c Pablo Neira Ayuso 2014-07-31 2387 mutex_lock(&__ip_vs_mutex); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2388 if (cmd == IP_VS_SO_SET_FLUSH) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2389 /* Flush the virtual service */ ef7c599d91172d net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2390 ret = ip_vs_flush(ipvs, false); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2391 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2392 } else if (cmd == IP_VS_SO_SET_TIMEOUT) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2393 /* Set timeout values for (tcp tcpfin udp) */ f1faa1e7495445 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2394 ret = ip_vs_set_timeout(ipvs, (struct ip_vs_timeout_user *)arg); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2395 goto out_unlock; 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2396 } else if (!len) { 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2397 /* No more commands with len == 0 below */ 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2398 ret = -EINVAL; 56ee6566622b8a net/netfilter/ipvs/ip_vs_ctl.c Peilin Ye 2020-11-04 2399 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2400 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2401 c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2402 usvc_compat = (struct ip_vs_service_user *)arg; c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2403 udest_compat = (struct ip_vs_dest_user *)(usvc_compat + 1); c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2404 c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2405 /* We only use the new structs internally, so copy userspace compat c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2406 * structs to extended internal versions */ c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2407 ip_vs_copy_usvc_compat(&usvc, usvc_compat); c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2408 ip_vs_copy_udest_compat(&udest, udest_compat); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2409 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2410 if (cmd == IP_VS_SO_SET_ZERO) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2411 /* if no service address is set, zero counters in all */ c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2412 if (!usvc.fwmark && !usvc.addr.ip && !usvc.port) { c60856c687d601 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2413 ret = ip_vs_zero_all(ipvs); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2414 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2415 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2416 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2417 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2418 if ((cmd == IP_VS_SO_SET_ADD || cmd == IP_VS_SO_SET_EDIT) && 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2419 strnlen(usvc.sched_name, IP_VS_SCHEDNAME_MAXLEN) == 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2420 IP_VS_SCHEDNAME_MAXLEN) { 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2421 ret = -EINVAL; 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2422 goto out_unlock; 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2423 } 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2424 2906f66a5682e5 net/netfilter/ipvs/ip_vs_ctl.c Venkata Mohan Reddy 2010-02-18 2425 /* Check for valid protocol: TCP or UDP or SCTP, even for fwmark!=0 */ 2906f66a5682e5 net/netfilter/ipvs/ip_vs_ctl.c Venkata Mohan Reddy 2010-02-18 2426 if (usvc.protocol != IPPROTO_TCP && usvc.protocol != IPPROTO_UDP && 2906f66a5682e5 net/netfilter/ipvs/ip_vs_ctl.c Venkata Mohan Reddy 2010-02-18 2427 usvc.protocol != IPPROTO_SCTP) { 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2428 pr_err("set_ctl: invalid protocol: %d %pI4:%d\n", 14d5e834f6b366 net/netfilter/ipvs/ip_vs_ctl.c Harvey Harrison 2008-10-31 2429 usvc.protocol, &usvc.addr.ip, 52f96757905bbf net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2018-05-19 2430 ntohs(usvc.port)); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2431 ret = -EFAULT; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2432 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2433 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2434 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2435 /* Lookup the exact service by <protocol, addr, port> or fwmark */ ceec4c38168184 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2013-03-22 2436 rcu_read_lock(); c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2437 if (usvc.fwmark == 0) bb2e2a8c957fd1 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2438 svc = __ip_vs_service_find(ipvs, usvc.af, usvc.protocol, b18610de9ec272 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2439 &usvc.addr, usvc.port); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2440 else 1ed8b947806155 net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2441 svc = __ip_vs_svc_fwm_find(ipvs, usvc.af, usvc.fwmark); ceec4c38168184 net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2013-03-22 2442 rcu_read_unlock(); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2443 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2444 if (cmd != IP_VS_SO_SET_ADD c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2445 && (svc == NULL || svc->protocol != usvc.protocol)) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2446 ret = -ESRCH; 26c15cfd291f8b net/netfilter/ipvs/ip_vs_ctl.c Julian Anastasov 2010-09-21 2447 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2448 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2449 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2450 switch (cmd) { ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2451 case IP_VS_SO_SET_ADD: ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2452 if (svc != NULL) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2453 ret = -EEXIST; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2454 else 5060bd8307fcfb net/netfilter/ipvs/ip_vs_ctl.c Eric W. Biederman 2015-09-21 2455 ret = ip_vs_add_service(ipvs, &usvc, &svc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2456 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2457 case IP_VS_SO_SET_EDIT: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2458 ret = ip_vs_edit_service(svc, &usvc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2459 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2460 case IP_VS_SO_SET_DEL: ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2461 ret = ip_vs_del_service(svc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2462 if (!ret) ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2463 goto out_unlock; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2464 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2465 case IP_VS_SO_SET_ZERO: ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2466 ret = ip_vs_zero_service(svc); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2467 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2468 case IP_VS_SO_SET_ADDDEST: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2469 ret = ip_vs_add_dest(svc, &udest); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2470 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2471 case IP_VS_SO_SET_EDITDEST: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2472 ret = ip_vs_edit_dest(svc, &udest); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2473 break; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2474 case IP_VS_SO_SET_DELDEST: c860c6b1479992 net/ipv4/ipvs/ip_vs_ctl.c Julius Volz 2008-09-02 2475 ret = ip_vs_del_dest(svc, &udest); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2476 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2477 ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2478 out_unlock: 14cc3e2b633bb6 net/ipv4/ipvs/ip_vs_ctl.c Ingo Molnar 2006-03-26 2479 mutex_unlock(&__ip_vs_mutex); ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 @2480 return ret; ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2481 } ^1da177e4c3f41 net/ipv4/ipvs/ip_vs_ctl.c Linus Torvalds 2005-04-16 2482 :::::: The code at line 2480 was first introduced by commit :::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2 :::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org> :::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:openEuler-1.0-LTS 1509/1509] drivers/dma/pl330.c:2599:15: warning: 'src' may be used uninitialized in this function
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: d54ba3f54612a8622df13d42bc1870048cb63d20 commit: 0299853c014aa0eecf7fb85ac2f1ebd0a9a6ba73 [1509/1509] dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV config: arm64-randconfig-003-20250320 (https://download.01.org/0day-ci/archive/20250320/202503201721.gZeymcpc-lkp@…) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201721.gZeymcpc-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/202503201721.gZeymcpc-lkp@intel.com/ Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/dma/pl330.c: In function 'pl330_prep_dma_cyclic': >> drivers/dma/pl330.c:2599:15: warning: 'src' may be used uninitialized in this function [-Wmaybe-uninitialized] 2599 | px->src_addr = src; | ~~~~~~~~~~~~~^~~~~ drivers/dma/pl330.c:2657:13: note: 'src' was declared here 2657 | dma_addr_t src; | ^~~ >> drivers/dma/pl330.c:2598:15: warning: 'dst' may be used uninitialized in this function [-Wmaybe-uninitialized] 2598 | px->dst_addr = dst; | ~~~~~~~~~~~~~^~~~~ drivers/dma/pl330.c:2656:13: note: 'dst' was declared here 2656 | dma_addr_t dst; | ^~~ drivers/dma/pl330.c:297: warning: cannot understand function prototype: 'struct pl330_reqcfg ' vim +/src +2599 drivers/dma/pl330.c b3040e40675ec2c Jassi Brar 2010-05-23 2593 b3040e40675ec2c Jassi Brar 2010-05-23 2594 static inline void fill_px(struct pl330_xfer *px, b3040e40675ec2c Jassi Brar 2010-05-23 2595 dma_addr_t dst, dma_addr_t src, size_t len) b3040e40675ec2c Jassi Brar 2010-05-23 2596 { b3040e40675ec2c Jassi Brar 2010-05-23 2597 px->bytes = len; b3040e40675ec2c Jassi Brar 2010-05-23 @2598 px->dst_addr = dst; b3040e40675ec2c Jassi Brar 2010-05-23 @2599 px->src_addr = src; b3040e40675ec2c Jassi Brar 2010-05-23 2600 } b3040e40675ec2c Jassi Brar 2010-05-23 2601 :::::: The code at line 2599 was first introduced by commit :::::: b3040e40675ec2c43542331cd30d4ee3dae797e8 DMA: PL330: Add dma api driver :::::: TO: Jassi Brar <jassi.brar(a)samsung.com> :::::: CC: Dan Williams <dan.j.williams(a)intel.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2045/2045] arch/arm64/kvm/virtcca_cvm.c:810:5: warning: no previous prototype for function 'virtcca_get_tmi_version'
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 961f596cd0017f5f254fb4b0ab9f5b9975177b84 commit: 86b9cab8c4752eb46e3ec038325aee5686805c69 [2045/2045] VirtCCA: an interface to retrieve the TMI version is added config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250320/202503201027.i8HE43EJ-lkp@…) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503201027.i8HE43EJ-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/202503201027.i8HE43EJ-lkp@intel.com/ All warnings (new ones prefixed by >>): In file included from arch/arm64/kvm/virtcca_cvm.c:5: In file included from include/linux/kvm_host.h:16: In file included from include/linux/mm.h:2253: 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 + | ~~~~~~~~~~~~~~~~~~~~~~ >> arch/arm64/kvm/virtcca_cvm.c:810:5: warning: no previous prototype for function 'virtcca_get_tmi_version' [-Wmissing-prototypes] 810 | u64 virtcca_get_tmi_version(void) | ^ arch/arm64/kvm/virtcca_cvm.c:810:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 810 | u64 virtcca_get_tmi_version(void) | ^ | static arch/arm64/kvm/virtcca_cvm.c:1274:5: warning: no previous prototype for function 'cvm_arm_smmu_domain_set_kvm' [-Wmissing-prototypes] 1274 | int cvm_arm_smmu_domain_set_kvm(struct device *dev, void *data) | ^ arch/arm64/kvm/virtcca_cvm.c:1274:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1274 | int cvm_arm_smmu_domain_set_kvm(struct device *dev, void *data) | ^ | static 7 warnings generated. vim +/virtcca_get_tmi_version +810 arch/arm64/kvm/virtcca_cvm.c 809 > 810 u64 virtcca_get_tmi_version(void) 811 { 812 u64 res = tmi_version(); 813 814 if (res == SMCCC_RET_NOT_SUPPORTED) 815 return 0; 816 return res; 817 } 818 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 2045/2045] drivers/coda/coda_pci.c:228: warning: Function parameter or member 'p' not described in 'virtcca_pci_get_rom_size'
by kernel test robot 20 Mar '25

20 Mar '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 961f596cd0017f5f254fb4b0ab9f5b9975177b84 commit: 67773feaf933058b9e64a9089345b3c64f823acd [2045/2045] VirtCCA: cvm support UEFI boot config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250320/202503200858.XSvAPfQM-lkp@…) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250320/202503200858.XSvAPfQM-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/202503200858.XSvAPfQM-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/coda/coda_pci.c:36: warning: expecting prototype for virtcca_pci_write_msi_msg(). Prototype was for virtcca_pci_write_msg_msi() instead >> drivers/coda/coda_pci.c:228: warning: Function parameter or member 'p' not described in 'virtcca_pci_get_rom_size' >> drivers/coda/coda_pci.c:228: warning: Excess function parameter 'pdev' description in 'virtcca_pci_get_rom_size' vim +228 drivers/coda/coda_pci.c 28 29 /** 30 * virtcca_pci_write_msi_msg - secure dev write msi msg 31 * @desc: MSI-X description 32 * @msg: Msg information 33 * 34 **/ 35 bool virtcca_pci_write_msg_msi(struct msi_desc *desc, struct msi_msg *msg) > 36 { 37 if (!is_virtcca_cvm_enable()) 38 return false; 39 40 void __iomem *base = pci_msix_desc_addr(desc); 41 u32 ctrl = desc->pci.msix_ctrl; 42 bool unmasked = !(ctrl & PCI_MSIX_ENTRY_CTRL_MASKBIT); 43 u64 pbase = mmio_va_to_pa(base); 44 struct pci_dev *pdev = (desc->dev != NULL && 45 dev_is_pci(desc->dev)) ? to_pci_dev(desc->dev) : NULL; 46 47 if (!is_cc_dev(pci_dev_id(pdev))) 48 return false; 49 50 u64 addr = (u64)msg->address_lo | ((u64)msg->address_hi << 32); 51 52 if (addr) { 53 /* Get the offset of the its register of a specific device */ 54 u64 offset = addr - CVM_MSI_ORIG_IOVA; 55 56 addr = get_g_cc_dev_msi_addr(pci_dev_id(pdev)); 57 addr += offset; 58 if (!addr) 59 return true; 60 } 61 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_LOWER_ADDR, 62 lower_32_bits(addr), CVM_RW_32_BIT, pci_dev_id(pdev)); 63 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_UPPER_ADDR, 64 upper_32_bits(addr), CVM_RW_32_BIT, pci_dev_id(pdev)); 65 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_DATA, 66 msg->data, CVM_RW_32_BIT, pci_dev_id(pdev)); 67 68 if (unmasked) 69 pci_msix_write_vector_ctrl(desc, ctrl); 70 tmi_mmio_read(pbase + PCI_MSIX_ENTRY_DATA, 71 CVM_RW_32_BIT, pci_dev_id(pdev)); 72 73 return true; 74 } 75 76 void virtcca_msix_prepare_msi_desc(struct pci_dev *dev, 77 struct msi_desc *desc, void __iomem *addr) 78 { 79 desc->pci.msix_ctrl = tmi_mmio_read(mmio_va_to_pa(addr + PCI_MSIX_ENTRY_VECTOR_CTRL), 80 CVM_RW_32_BIT, pci_dev_id(dev)); 81 } 82 83 /* 84 * If it is a safety device, write vector ctrl need 85 * use tmi interface 86 */ 87 bool virtcca_pci_msix_write_vector_ctrl(struct msi_desc *desc, u32 ctrl) 88 { 89 if (!is_virtcca_cvm_enable()) 90 return false; 91 92 void __iomem *desc_addr = pci_msix_desc_addr(desc); 93 struct pci_dev *pdev = (desc->dev != NULL && 94 dev_is_pci(desc->dev)) ? to_pci_dev(desc->dev) : NULL; 95 96 if (pdev == NULL || !is_cc_dev(pci_dev_id(pdev))) 97 return false; 98 99 if (desc->pci.msi_attrib.can_mask) 100 tmi_mmio_write(mmio_va_to_pa(desc_addr + PCI_MSIX_ENTRY_VECTOR_CTRL), 101 ctrl, CVM_RW_32_BIT, pci_dev_id(pdev)); 102 return true; 103 } 104 105 /* 106 * If it is a safety device, read msix need 107 * use tmi interface 108 */ 109 bool virtcca_pci_msix_mask(struct msi_desc *desc) 110 { 111 if (!is_virtcca_cvm_enable()) 112 return false; 113 114 struct pci_dev *pdev = (desc->dev != NULL && 115 dev_is_pci(desc->dev)) ? to_pci_dev(desc->dev) : NULL; 116 117 if (pdev == NULL || !is_cc_dev(pci_dev_id(pdev))) 118 return false; 119 120 /* Flush write to device */ 121 tmi_mmio_read(mmio_va_to_pa(desc->pci.mask_base), CVM_RW_32_BIT, pci_dev_id(pdev)); 122 return true; 123 } 124 125 /** 126 * virtcca_msix_mask_all_cc - mask all secure dev msix c 127 * @dev: Pointer to the pci_dev data structure of MSI-X device function 128 * @base: Io address 129 * @tsize: Number of entry 130 * @dev_num: Dev number 131 * 132 * Returns: 133 * %0 if msix mask all cc device success 134 **/ 135 int virtcca_msix_mask_all_cc(struct pci_dev *dev, void __iomem *base, int tsize, u64 dev_num) 136 { 137 int i; 138 u16 rw_ctrl; 139 u32 ctrl = PCI_MSIX_ENTRY_CTRL_MASKBIT; 140 u64 pbase = mmio_va_to_pa(base); 141 142 if (pci_msi_ignore_mask) 143 goto out; 144 145 for (i = 0; i < tsize; i++, base += PCI_MSIX_ENTRY_SIZE) { 146 tmi_mmio_write(pbase + PCI_MSIX_ENTRY_VECTOR_CTRL, 147 ctrl, CVM_RW_32_BIT, dev_num); 148 } 149 150 out: 151 pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &rw_ctrl); 152 rw_ctrl &= ~PCI_MSIX_FLAGS_MASKALL; 153 rw_ctrl |= 0; 154 pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, rw_ctrl); 155 156 pcibios_free_irq(dev); 157 return 0; 158 } 159 160 /* If device is secure dev, read config need transfer to tmm module */ 161 int virtcca_pci_generic_config_read(void __iomem *addr, unsigned char bus_num, 162 unsigned int devfn, int size, u32 *val) 163 { 164 u32 cvm_bit = size == 1 ? CVM_RW_8_BIT : size == 2 ? CVM_RW_16_BIT : CVM_RW_32_BIT; 165 166 *val = tmi_mmio_read(mmio_va_to_pa(addr), cvm_bit, PCI_DEVID(bus_num, devfn)); 167 return 0; 168 } 169 170 /* If device is secure dev, write config need transfer to tmm module */ 171 int virtcca_pci_generic_config_write(void __iomem *addr, unsigned char bus_num, 172 unsigned int devfn, int size, u32 val) 173 { 174 u32 cvm_bit = size == 1 ? CVM_RW_8_BIT : size == 2 ? CVM_RW_16_BIT : CVM_RW_32_BIT; 175 176 tmi_mmio_write(mmio_va_to_pa(addr), val, cvm_bit, PCI_DEVID(bus_num, devfn)); 177 return 0; 178 } 179 180 /* Judge startup virtcca_cvm_host is enable and device is secure or not */ 181 bool is_virtcca_pci_io_rw(struct vfio_pci_core_device *vdev) 182 { 183 if (!is_virtcca_cvm_enable()) 184 return false; 185 186 struct pci_dev *pdev = vdev->pdev; 187 bool cc_dev = pdev == NULL ? false : is_cc_dev(pci_dev_id(pdev)); 188 189 if (cc_dev) 190 return true; 191 192 return false; 193 } 194 EXPORT_SYMBOL_GPL(is_virtcca_pci_io_rw); 195 196 /* Transfer to tmm write io value */ 197 void virtcca_pci_io_write(struct vfio_pci_core_device *vdev, u64 val, 198 u64 size, void __iomem *io) 199 { 200 struct pci_dev *pdev = vdev->pdev; 201 202 WARN_ON(tmi_mmio_write(mmio_va_to_pa(io), val, size, pci_dev_id(pdev))); 203 } 204 EXPORT_SYMBOL_GPL(virtcca_pci_io_write); 205 206 /* Transfer to tmm read io value */ 207 u64 virtcca_pci_io_read(struct vfio_pci_core_device *vdev, 208 u64 size, void __iomem *io) 209 { 210 struct pci_dev *pdev = vdev->pdev; 211 212 return tmi_mmio_read(mmio_va_to_pa(io), size, pci_dev_id(pdev)); 213 } 214 EXPORT_SYMBOL_GPL(virtcca_pci_io_read); 215 216 /** 217 * virtcca_pci_get_rom_size - obtain the actual size of the ROM image 218 * @pdev: target PCI device 219 * @rom: kernel virtual pointer to image of ROM 220 * @size: size of PCI window 221 * return: size of actual ROM image 222 * 223 * Determine the actual length of the ROM image. 224 * The PCI window size could be much larger than the 225 * actual image size. 226 */ 227 size_t virtcca_pci_get_rom_size(void *p, void __iomem *rom, size_t size) > 228 { -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • ...
  • 1829
  • Older →

HyperKitty Powered by HyperKitty