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: <23131f95a2afeb32e49d4db797855b17ea24444e.camel@mellanox.com>
Date:   Fri, 15 Nov 2019 00:04:19 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "richardcochran@...il.com" <richardcochran@...il.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "christopher.s.hall@...el.com" <christopher.s.hall@...el.com>,
        Eugenia Emantayev <eugenia@...lanox.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "sergei.shtylyov@...entembedded.com" 
        <sergei.shtylyov@...entembedded.com>,
        Feras Daoud <ferasda@...lanox.com>,
        "stefan.sorensen@...ctralink.com" <stefan.sorensen@...ctralink.com>,
        "brandon.streiff@...com" <brandon.streiff@...com>,
        "jacob.e.keller@...el.com" <jacob.e.keller@...el.com>,
        "jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "felipe.balbi@...ux.intel.com" <felipe.balbi@...ux.intel.com>
Subject: Re: [PATCH net 12/13] mlx5: Reject requests to enable time stamping
 on both edges.

On Thu, 2019-11-14 at 10:45 -0800, Richard Cochran wrote:
> This driver enables rising edge or falling edge, but not both, and so
> this patch validates that the request contains only one of the two
> edges.
> 
> Signed-off-by: Richard Cochran <richardcochran@...il.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> index 819097d9b583..43f97601b500 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/clock.c
> @@ -243,6 +243,12 @@ static int mlx5_extts_configure(struct
> ptp_clock_info *ptp,
>  				PTP_STRICT_FLAGS))
>  		return -EOPNOTSUPP;
>  
> +	/* Reject requests to enable time stamping on both edges. */
> +	if ((rq->extts.flags & PTP_STRICT_FLAGS) &&
> +	    (rq->extts.flags & PTP_ENABLE_FEATURE) &&
> +	    (rq->extts.flags & PTP_EXTTS_EDGES) == PTP_EXTTS_EDGES)
> +		return -EOPNOTSUPP;
> +
>  	if (rq->extts.index >= clock->ptp_info.n_pins)
>  		return -EINVAL;
>  


Reviewed-by: Saeed Mahameed <saeedm@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ