Commit 352df98b authored by Paolo Abeni's avatar Paolo Abeni
Browse files
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2025-12-17 (i40e, iavf, idpf, e1000)

For i40e:
Przemyslaw immediately schedules service task following changes to
filters to ensure timely setup for PTP.

Gregory Herrero adjusts VF descriptor size checks to be device specific.

For iavf:
Kohei Enju corrects a couple of condition checks which caused off-by-one
issues.

For idpf:
Larysa fixes LAN memory region call to follow expected requirements.

Brian Vazquez reduces mailbox wait time during init to avoid lengthy
delays.

For e1000:
Guangshuo Li adds validation of data length to prevent out-of-bounds
access.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  e1000: fix OOB in e1000_tbi_should_accept()
  idpf: reduce mbx_task schedule delay to 300us
  idpf: fix LAN memory regions command on some NVMs
  iavf: fix off-by-one issues in iavf_config_rss_reg()
  i40e: validate ring_len parameter against hardware-specific values
  i40e: fix scheduling in set_rx_mode
====================

Link: https://patch.msgid.link/


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents d5dc2830 9c72a518
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -4094,7 +4094,15 @@ static bool e1000_tbi_should_accept(struct e1000_adapter *adapter,
				    u32 length, const u8 *data)
{
	struct e1000_hw *hw = &adapter->hw;
	u8 last_byte = *(data + length - 1);
	u8 last_byte;

	/* Guard against OOB on data[length - 1] */
	if (unlikely(!length))
		return false;
	/* Upper bound: length must not exceed rx_buffer_len */
	if (unlikely(length > adapter->rx_buffer_len))
		return false;
	last_byte = *(data + length - 1);

	if (TBI_ACCEPT(hw, status, errors, length, last_byte)) {
		unsigned long irq_flags;
+11 −0
Original line number Diff line number Diff line
@@ -1422,4 +1422,15 @@ static inline struct i40e_veb *i40e_pf_get_main_veb(struct i40e_pf *pf)
	return (pf->lan_veb != I40E_NO_VEB) ? pf->veb[pf->lan_veb] : NULL;
}

static inline u32 i40e_get_max_num_descriptors(const struct i40e_pf *pf)
{
	const struct i40e_hw *hw = &pf->hw;

	switch (hw->mac.type) {
	case I40E_MAC_XL710:
		return I40E_MAX_NUM_DESCRIPTORS_XL710;
	default:
		return I40E_MAX_NUM_DESCRIPTORS;
	}
}
#endif /* _I40E_H_ */
+0 −12
Original line number Diff line number Diff line
@@ -2013,18 +2013,6 @@ static void i40e_get_drvinfo(struct net_device *netdev,
		drvinfo->n_priv_flags += I40E_GL_PRIV_FLAGS_STR_LEN;
}

static u32 i40e_get_max_num_descriptors(struct i40e_pf *pf)
{
	struct i40e_hw *hw = &pf->hw;

	switch (hw->mac.type) {
	case I40E_MAC_XL710:
		return I40E_MAX_NUM_DESCRIPTORS_XL710;
	default:
		return I40E_MAX_NUM_DESCRIPTORS;
	}
}

static void i40e_get_ringparam(struct net_device *netdev,
			       struct ethtool_ringparam *ring,
			       struct kernel_ethtool_ringparam *kernel_ring,
+1 −0
Original line number Diff line number Diff line
@@ -2234,6 +2234,7 @@ static void i40e_set_rx_mode(struct net_device *netdev)
		vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
		set_bit(__I40E_MACVLAN_SYNC_PENDING, vsi->back->state);
	}
	i40e_service_event_schedule(vsi->back);
}

/**
+2 −2
Original line number Diff line number Diff line
@@ -656,7 +656,7 @@ static int i40e_config_vsi_tx_queue(struct i40e_vf *vf, u16 vsi_id,

	/* ring_len has to be multiple of 8 */
	if (!IS_ALIGNED(info->ring_len, 8) ||
	    info->ring_len > I40E_MAX_NUM_DESCRIPTORS_XL710) {
	    info->ring_len > i40e_get_max_num_descriptors(pf)) {
		ret = -EINVAL;
		goto error_context;
	}
@@ -726,7 +726,7 @@ static int i40e_config_vsi_rx_queue(struct i40e_vf *vf, u16 vsi_id,

	/* ring_len has to be multiple of 32 */
	if (!IS_ALIGNED(info->ring_len, 32) ||
	    info->ring_len > I40E_MAX_NUM_DESCRIPTORS_XL710) {
	    info->ring_len > i40e_get_max_num_descriptors(pf)) {
		ret = -EINVAL;
		goto error_param;
	}
Loading