lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53A98722.8020900@cogentembedded.com>
Date:	Tue, 24 Jun 2014 18:11:46 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	davem@...emloft.net, Neerav Parikh <neerav.parikh@...el.com>
CC:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>, netdev@...r.kernel.org,
	gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 03/14] i40e: Add PF reset when Malicious driver event
 for PF

Hello.

On 06/24/2014 04:47 AM, Jeff Kirsher wrote:

> From: Neerav Parikh <neerav.parikh@...el.com>

> As per the spec when the PF driver receives a Malicious driver event
> the queue that caused the event is already stopped and it is expected
> that the function that owns the queue will reset the queue.
> In some cases it may not be possible to determine the queue and it is
> suggested to reset the whole function.

> This patch takes the later approach when the event is owned by the PF
> that owns it.

> Change-ID: I40f9764a6a5e068c0ef8438db00c5aa9c2c6c1c8
> Signed-off-by: Neerav Parikh <neerav.parikh@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_main.c | 25 +++++++++++++++++++++++++
>   1 file changed, 25 insertions(+)

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 0a68065..b751258 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
[...]
> @@ -5867,6 +5868,30 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
>   		mdd_detected = true;
>   	}
>
> +	if (mdd_detected) {
> +		reg = rd32(hw, I40E_PF_MDET_TX);
> +		if (reg & I40E_PF_MDET_TX_VALID_MASK) {
> +			wr32(hw, I40E_PF_MDET_TX, 0xFFFF);
> +			dev_info(&pf->pdev->dev,
> +				 "MDD TX event is for this function 0x%08x requesting PF reset.\n",

    Need some punctuation after a number.

> +				 reg);
> +			pf_mdd_detected = true;
> +		}
> +		reg = rd32(hw, I40E_PF_MDET_RX);
> +		if (reg & I40E_PF_MDET_RX_VALID_MASK) {
> +			wr32(hw, I40E_PF_MDET_RX, 0xFFFF);
> +			dev_info(&pf->pdev->dev,
> +				 "MDD RX event is for this function 0x%08x requesting PF reset.\n",

    Likewise.

> +				 reg);
> +			pf_mdd_detected = true;
> +		}
> +		/* Queue belongs to the PF initiate a reset */

    Need some punctuation after PF.

> +		if (pf_mdd_detected) {
> +			set_bit(__I40E_PF_RESET_REQUESTED, &pf->state);
> +			i40e_service_event_schedule(pf);
> +		}
> +	}
> +
>   	/* see if one of the VFs needs its hand slapped */
>   	for (i = 0; i < pf->num_alloc_vfs && mdd_detected; i++) {
>   		vf = &(pf->vf[i]);
>

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ