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] [thread-next>] [day] [month] [year] [list]
Message-ID: <0529aae6-19ef-4e10-9444-a99e54c90edc@intel.com>
Date: Wed, 15 Oct 2025 12:47:48 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, Shyam Sundar S K
	<Shyam-sundar.S-k@....com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
 Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Egor Pomozov
	<epomozov@...vell.com>, Potnuri Bharat Teja <bharat@...lsio.com>, "Dimitris
 Michailidis" <dmichail@...gible.com>, MD Danish Anwar <danishanwar@...com>,
	Roger Quadros <rogerq@...nel.org>
CC: Richard Cochran <richardcochran@...il.com>, Russell King
	<linux@...linux.org.uk>, Vladimir Oltean <vladimir.oltean@....com>, "Simon
 Horman" <horms@...nel.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 3/7] amd-xgbe: convert to ndo_hwtstamp
 callbacks



On 10/14/2025 3:42 PM, Vadim Fedorenko wrote:
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c b/drivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c
> index bc52e5ec6420..0127988e10be 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-hwtstamp.c
> @@ -157,26 +157,24 @@ void xgbe_tx_tstamp(struct work_struct *work)
>  	spin_unlock_irqrestore(&pdata->tstamp_lock, flags);
>  }
>  
> -int xgbe_get_hwtstamp_settings(struct xgbe_prv_data *pdata, struct ifreq *ifreq)
> +int xgbe_get_hwtstamp_settings(struct net_device *netdev,
> +			       struct kernel_hwtstamp_config *config)
>  {
> -	if (copy_to_user(ifreq->ifr_data, &pdata->tstamp_config,
> -			 sizeof(pdata->tstamp_config)))
> -		return -EFAULT;
> +	struct xgbe_prv_data *pdata = netdev_priv(netdev);
> +
> +	*config = pdata->tstamp_config;
>  
>  	return 0;
>  }
>  
> -int xgbe_set_hwtstamp_settings(struct xgbe_prv_data *pdata, struct ifreq *ifreq)
> +int xgbe_set_hwtstamp_settings(struct net_device *netdev,
> +			       struct kernel_hwtstamp_config *config,
> +			       struct netlink_ext_ack *extack)
>  {
> -	struct hwtstamp_config config;
> -	unsigned int mac_tscr;
> -
> -	if (copy_from_user(&config, ifreq->ifr_data, sizeof(config)))
> -		return -EFAULT;
> -
> -	mac_tscr = 0;
> +	struct xgbe_prv_data *pdata = netdev_priv(netdev);
> +	unsigned int mac_tscr = 0;
>  

I noticed in this driver you didn't bother to add NL_SET_ERR_MSG calls.
Any particular reason?


Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ