tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: a786a35ec1aeb84a5ff258956854c2eaebec12b7
commit: 206f9c11a8c8b0197da5a26859d96d2ed65f5757 [18554/22398] net: ngbe: Add Netswift Giga NIC driver
config: x86_64-buildonly-randconfig-004-20240510 (https://download.01.org/0day-ci/archive/20240511/202405110244.yz4AxkCm-lkp@…)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240511/202405110244.yz4AxkCm-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/202405110244.yz4AxkCm-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/netswift/ngbe/ngbe_main.c:38:
drivers/net/ethernet/netswift/ngbe/ngbe.h:764:6: warning: variable 'cur_diff' set but not used [-Wunused-but-set-variable]
764 | u32 cur_diff = 0;
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:170:6: warning: no previous prototype for function 'ngbe_service_event_schedule' [-Wmissing-prototypes]
170 | void ngbe_service_event_schedule(struct ngbe_adapter *adapter)
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:170:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
170 | void ngbe_service_event_schedule(struct ngbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:433:7: warning: variable 'real_tx_hang' set but not used [-Wunused-but-set-variable]
433 | bool real_tx_hang = false;
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3223:6: warning: no previous prototype for function 'ngbe_configure_isb' [-Wmissing-prototypes]
3223 | void ngbe_configure_isb(struct ngbe_adapter *adapter)
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3223:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3223 | void ngbe_configure_isb(struct ngbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3233:6: warning: no previous prototype for function 'ngbe_configure_port' [-Wmissing-prototypes]
3233 | void ngbe_configure_port(struct ngbe_adapter *adapter)
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3233:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3233 | void ngbe_configure_port(struct ngbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3592:6: warning: no previous prototype for function 'ngbe_disable_device' [-Wmissing-prototypes]
3592 | void ngbe_disable_device(struct ngbe_adapter *adapter)
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3592:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3592 | void ngbe_disable_device(struct ngbe_adapter *adapter)
| ^
| static
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3693:5: warning: no previous prototype for function 'ngbe_init_shared_code' [-Wmissing-prototypes]
3693 | s32 ngbe_init_shared_code(struct ngbe_hw *hw)
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3693:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
3693 | s32 ngbe_init_shared_code(struct ngbe_hw *hw)
| ^
| static
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:5810:5: warning: no previous prototype for function 'ngbe_skb_pad_nonzero' [-Wmissing-prototypes]
5810 | int ngbe_skb_pad_nonzero(struct sk_buff *skb, int pad)
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:5810:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
5810 | int ngbe_skb_pad_nonzero(struct sk_buff *skb, int pad)
| ^
| static
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:6010:6: warning: variable 'prtad' set but not used [-Wunused-but-set-variable]
6010 | int prtad, devad, ret = 0;
| ^
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:6010:13: warning: variable 'devad' set but not used [-Wunused-but-set-variable]
6010 | int prtad, devad, ret = 0;
| ^
10 warnings generated.
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:257: warning: Function parameter or member 'quiet' not described in 'ngbe_read_reg'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:1644: warning: Function parameter or member 'queues' not described in 'ngbe_irq_enable'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:1644: warning: Function parameter or member 'flush' not described in 'ngbe_irq_enable'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:2035: warning: Function parameter or member 'adapter' not described in 'ngbe_configure_msi_and_legacy'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:2449: warning: Function parameter or member 'adapter' not described in 'ngbe_configure_bridge_mode'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:2913: warning: Function parameter or member 'pool' not described in 'ngbe_write_uc_addr_list'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:3722: warning: cannot understand function prototype: 'const u32 def_rss_key[10] = '
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4583: warning: Function parameter or member 'adapter' not described in 'ngbe_check_hang_subtask'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4648: warning: Function parameter or member 'adapter' not described in 'ngbe_watchdog_update_link_status'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4744: warning: Function parameter or member 'adapter' not described in 'ngbe_watchdog_link_is_up'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4789: warning: Function parameter or member 'adapter' not described in 'ngbe_watchdog_link_is_down'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4856: warning: Function parameter or member 'adapter' not described in 'ngbe_watchdog_flush_tx'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4928: warning: Function parameter or member 'adapter' not described in 'ngbe_watchdog_subtask'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4957: warning: Function parameter or member 't' not described in 'ngbe_service_timer'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:4957: warning: Excess function parameter 'data' description in 'ngbe_service_timer'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:6043: warning: Function parameter or member 'dev' not described in 'ngbe_setup_tc'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:6043: warning: Excess function parameter 'netdev' description in 'ngbe_setup_tc'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:6297: warning: Excess function parameter 'device_id' description in 'ngbe_wol_supported'
drivers/net/ethernet/netswift/ngbe/ngbe_main.c:6297: warning: Excess function parameter 'subdev_id' description in 'ngbe_wol_supported'
>> drivers/net/ethernet/netswift/ngbe/ngbe_main.o: warning: objtool: missing symbol for section .init.text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: a786a35ec1aeb84a5ff258956854c2eaebec12b7
commit: 7fc993d55d1b54ae40e29dfac825a18d04d644c6 [14777/22394] scsi/hifc: add hifc driver FC service module
config: x86_64-buildonly-randconfig-004-20240510 (https://download.01.org/0day-ci/archive/20240510/202405102258.1OIgsP3m-lkp@…)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240510/202405102258.1OIgsP3m-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/202405102258.1OIgsP3m-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/scsi/huawei/hifc/hifc_portmng.c:6:
In file included from drivers/scsi/huawei/hifc/hifc_module.h:10:
In file included from drivers/scsi/huawei/hifc/unf_common.h:9:
In file included from drivers/scsi/huawei/hifc/unf_scsi_common.h:10:
In file included from drivers/scsi/huawei/hifc/hifc_knl_adp.h:30:
In file included from include/scsi/scsi_host.h:12:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:16:
include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict]
425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/huawei/hifc/hifc_portmng.c:570:5: warning: no previous prototype for function 'hifc_dfx_get_rxtx_error_state' [-Wmissing-prototypes]
570 | int hifc_dfx_get_rxtx_error_state(void *v_hba, void *v_buff_out)
| ^
drivers/scsi/huawei/hifc/hifc_portmng.c:570:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
570 | int hifc_dfx_get_rxtx_error_state(void *v_hba, void *v_buff_out)
| ^
| static
drivers/scsi/huawei/hifc/hifc_portmng.c:1118:14: warning: no previous prototype for function 'hifc_port_info' [-Wmissing-prototypes]
1118 | unsigned int hifc_port_info(struct unf_hinicam_pkg *v_input)
| ^
drivers/scsi/huawei/hifc/hifc_portmng.c:1118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1118 | unsigned int hifc_port_info(struct unf_hinicam_pkg *v_input)
| ^
| static
3 warnings generated.
>> drivers/scsi/huawei/hifc/hifc_portmng.o: warning: objtool: missing symbol for section .text
--
In file included from drivers/scsi/huawei/hifc/hifc_cmdq.c:21:
In file included from drivers/scsi/huawei/hifc/hifc_knl_adp.h:30:
In file included from include/scsi/scsi_host.h:12:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:16:
include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict]
425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/huawei/hifc/hifc_cmdq.c:1316:5: warning: no previous prototype for function 'hifc_set_cmdq_ctxts' [-Wmissing-prototypes]
1316 | int hifc_set_cmdq_ctxts(struct hifc_hwdev *hwdev)
| ^
drivers/scsi/huawei/hifc/hifc_cmdq.c:1316:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
1316 | int hifc_set_cmdq_ctxts(struct hifc_hwdev *hwdev)
| ^
| static
2 warnings generated.
>> drivers/scsi/huawei/hifc/hifc_cmdq.o: warning: objtool: missing symbol for section .text
--
In file included from drivers/scsi/huawei/hifc/unf_event.c:8:
In file included from drivers/scsi/huawei/hifc/unf_common.h:9:
In file included from drivers/scsi/huawei/hifc/unf_scsi_common.h:10:
In file included from drivers/scsi/huawei/hifc/hifc_knl_adp.h:30:
In file included from include/scsi/scsi_host.h:12:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:16:
include/linux/pagemap.h:425:21: warning: cast from 'int (*)(struct file *, struct page *)' to 'filler_t *' (aka 'int (*)(void *, struct page *)') converts to incompatible function type [-Wcast-function-type-strict]
425 | filler_t *filler = (filler_t *)mapping->a_ops->readpage;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/huawei/hifc/unf_event.c:18:14: warning: no previous prototype for function 'unf_init_event_msg' [-Wmissing-prototypes]
18 | unsigned int unf_init_event_msg(struct unf_lport_s *v_lport)
| ^
drivers/scsi/huawei/hifc/unf_event.c:18:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
18 | unsigned int unf_init_event_msg(struct unf_lport_s *v_lport)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:69:6: warning: no previous prototype for function 'unf_init_event_node' [-Wmissing-prototypes]
69 | void unf_init_event_node(struct unf_cm_event_report *v_event_node)
| ^
drivers/scsi/huawei/hifc/unf_event.c:69:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
69 | void unf_init_event_node(struct unf_cm_event_report *v_event_node)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:85:29: warning: no previous prototype for function 'unf_get_free_event_node' [-Wmissing-prototypes]
85 | struct unf_cm_event_report *unf_get_free_event_node(void *v_lport)
| ^
drivers/scsi/huawei/hifc/unf_event.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
85 | struct unf_cm_event_report *unf_get_free_event_node(void *v_lport)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:128:6: warning: no previous prototype for function 'unf_check_event_mgr_status' [-Wmissing-prototypes]
128 | void unf_check_event_mgr_status(struct unf_event_mgr *v_event_mgr)
| ^
drivers/scsi/huawei/hifc/unf_event.c:128:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
128 | void unf_check_event_mgr_status(struct unf_event_mgr *v_event_mgr)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:142:6: warning: no previous prototype for function 'unf_release_event' [-Wmissing-prototypes]
142 | void unf_release_event(void *v_lport, void *v_event_node)
| ^
drivers/scsi/huawei/hifc/unf_event.c:142:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
142 | void unf_release_event(void *v_lport, void *v_event_node)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:166:6: warning: no previous prototype for function 'unf_post_event' [-Wmissing-prototypes]
166 | void unf_post_event(void *v_lport, void *v_event_node)
| ^
drivers/scsi/huawei/hifc/unf_event.c:166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
166 | void unf_post_event(void *v_lport, void *v_event_node)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:249:6: warning: no previous prototype for function 'unf_wait_event_mgr_complete' [-Wmissing-prototypes]
249 | void unf_wait_event_mgr_complete(struct unf_event_mgr *v_event_mgr)
| ^
drivers/scsi/huawei/hifc/unf_event.c:249:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
249 | void unf_wait_event_mgr_complete(struct unf_event_mgr *v_event_mgr)
| ^
| static
drivers/scsi/huawei/hifc/unf_event.c:355:6: warning: no previous prototype for function 'unf_release_global_event' [-Wmissing-prototypes]
355 | void unf_release_global_event(void *v_event_node)
| ^
drivers/scsi/huawei/hifc/unf_event.c:355:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
355 | void unf_release_global_event(void *v_event_node)
| ^
| static
9 warnings generated.
>> drivers/scsi/huawei/hifc/unf_event.o: warning: objtool: missing symbol for section .text
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
From: Damien Le Moal <damien.lemoal(a)wdc.com>
mainline inclusion
from mainline-v5.16-rc1
commit c749301ebee82eb5e97dec14b6ab31a4aabe37a6
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNFK
CVE: CVE-2021-47182
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
For devices that explicitly asked for MODE SENSE(10) use, make sure that
scsi_mode_sense() is called with a buffer of at least 8 bytes so that the
sense header fits.
Link: https://lore.kernel.org/r/20210820070255.682775-4-damien.lemoal@wdc.com
Signed-off-by: Damien Le Moal <damien.lemoal(a)wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Fixes: 907ea672e30b ("scsi: core: Fix scsi_mode_sense() buffer length handling")
Conflicts:
drivers/scsi/sd.c
[ Mianline commit 0610959fbbca ("scsi: sd: Allow user to configure
command retries") use 'sdkp->device' intead of 'sdp'. ]
Signed-off-by: Li Nan <linan122(a)huawei.com>
---
drivers/scsi/sd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 45d6174d3458..f618726bbe70 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2612,6 +2612,13 @@ sd_do_mode_sense(struct scsi_device *sdp, int dbd, int modepage,
unsigned char *buffer, int len, struct scsi_mode_data *data,
struct scsi_sense_hdr *sshdr)
{
+ /*
+ * If we must use MODE SENSE(10), make sure that the buffer length
+ * is at least 8 bytes so that the mode sense header fits.
+ */
+ if (sdp->use_10_for_ms && len < 8)
+ len = 8;
+
return scsi_mode_sense(sdp, dbd, modepage, buffer, len,
SD_TIMEOUT, SD_MAX_RETRIES, data,
sshdr);
--
2.39.2
From: Damien Le Moal <damien.lemoal(a)wdc.com>
mainline inclusion
from mainline-v5.16-rc1
commit c749301ebee82eb5e97dec14b6ab31a4aabe37a6
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNFK
CVE: CVE-2021-47182
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
For devices that explicitly asked for MODE SENSE(10) use, make sure that
scsi_mode_sense() is called with a buffer of at least 8 bytes so that the
sense header fits.
Link: https://lore.kernel.org/r/20210820070255.682775-4-damien.lemoal@wdc.com
Signed-off-by: Damien Le Moal <damien.lemoal(a)wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Fixes: 907ea672e30b ("scsi: core: Fix scsi_mode_sense() buffer length handling")
Conflicts:
drivers/scsi/sd.c
[ Mianline commit 0610959fbbca ("scsi: sd: Allow user to configure
command retries") changed context. ]
Signed-off-by: Li Nan <linan122(a)huawei.com>
---
drivers/scsi/sd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 45d6174d3458..8d3f8ac2d1ce 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2612,6 +2612,13 @@ sd_do_mode_sense(struct scsi_device *sdp, int dbd, int modepage,
unsigned char *buffer, int len, struct scsi_mode_data *data,
struct scsi_sense_hdr *sshdr)
{
+ /*
+ * If we must use MODE SENSE(10), make sure that the buffer length
+ * is at least 8 bytes so that the mode sense header fits.
+ */
+ if (sdkp->device->use_10_for_ms && len < 8)
+ len = 8;
+
return scsi_mode_sense(sdp, dbd, modepage, buffer, len,
SD_TIMEOUT, SD_MAX_RETRIES, data,
sshdr);
--
2.39.2
From: Damien Le Moal <damien.lemoal(a)wdc.com>
mainline inclusion
from mainline-v5.16-rc1
commit c749301ebee82eb5e97dec14b6ab31a4aabe37a6
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNFK
CVE: CVE-2021-47182
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?…
--------------------------------
For devices that explicitly asked for MODE SENSE(10) use, make sure that
scsi_mode_sense() is called with a buffer of at least 8 bytes so that the
sense header fits.
Link: https://lore.kernel.org/r/20210820070255.682775-4-damien.lemoal@wdc.com
Signed-off-by: Damien Le Moal <damien.lemoal(a)wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Fixes: 46708639bcd8 ("[Backport] scsi: core: Fix scsi_mode_sense() buffer length handling")
Signed-off-by: Li Nan <linan122(a)huawei.com>
---
drivers/scsi/sd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 5385805e06a8..595891482986 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2657,6 +2657,13 @@ sd_do_mode_sense(struct scsi_disk *sdkp, int dbd, int modepage,
unsigned char *buffer, int len, struct scsi_mode_data *data,
struct scsi_sense_hdr *sshdr)
{
+ /*
+ * If we must use MODE SENSE(10), make sure that the buffer length
+ * is at least 8 bytes so that the mode sense header fits.
+ */
+ if (sdkp->device->use_10_for_ms && len < 8)
+ len = 8;
+
return scsi_mode_sense(sdkp->device, dbd, modepage, buffer, len,
SD_TIMEOUT, sdkp->max_retries, data,
sshdr);
--
2.39.2