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]
Date: Tue, 09 Apr 2024 10:43:58 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Kory Maincent <kory.maincent@...tlin.com>, 
 Florian Fainelli <florian.fainelli@...adcom.com>, 
 Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, 
 Andrew Lunn <andrew@...n.ch>, 
 Heiner Kallweit <hkallweit1@...il.com>, 
 Russell King <linux@...linux.org.uk>, 
 "David S. Miller" <davem@...emloft.net>, 
 Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Paolo Abeni <pabeni@...hat.com>, 
 Richard Cochran <richardcochran@...il.com>, 
 Radu Pirea <radu-nicolae.pirea@....nxp.com>, 
 Jay Vosburgh <j.vosburgh@...il.com>, 
 Andy Gospodarek <andy@...yhouse.net>, 
 Nicolas Ferre <nicolas.ferre@...rochip.com>, 
 Claudiu Beznea <claudiu.beznea@...on.dev>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
 Jonathan Corbet <corbet@....net>, 
 Horatiu Vultur <horatiu.vultur@...rochip.com>, 
 UNGLinuxDriver@...rochip.com, 
 Simon Horman <horms@...nel.org>, 
 Vladimir Oltean <vladimir.oltean@....com>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
 netdev@...r.kernel.org, 
 linux-kernel@...r.kernel.org, 
 linux-doc@...r.kernel.org, 
 Maxime Chevallier <maxime.chevallier@...tlin.com>, 
 Rahul Rameshbabu <rrameshbabu@...dia.com>, 
 Kory Maincent <kory.maincent@...tlin.com>
Subject: Re: [PATCH net-next v10 02/13] net: Move dev_set_hwtstamp_phylib to
 net/core/dev.h

Kory Maincent wrote:
> This declaration was added to the header to be called from ethtool.
> ethtool is separated from core for code organization but it is not really
> a separate entity, it controls very core things.
> As ethtool is an internal stuff it is not wise to have it in netdevice.h.
> Move the declaration to net/core/dev.h instead.
> 
> Remove the EXPORT_SYMBOL_GPL call as ethtool can not be built as a module.
> 
> Signed-off-by: Kory Maincent <kory.maincent@...tlin.com>

Reviewed-by: Willem de Bruijn <willemb@...gle.com>

At this point this function does not need to be defined in a header at
all. But patch 12 will change that.

net/ethtool can be built-in or not, but cannot be built as module, so
no need for the EXPORT_SYMBOL_GPL indeed.

> ---
> 
> Change in v10:
> - New patch.
> ---
>  include/linux/netdevice.h | 3 ---
>  net/core/dev.h            | 4 ++++
>  net/core/dev_ioctl.c      | 1 -
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index d45f330d083d..9a4b92b49fac 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -3901,9 +3901,6 @@ int generic_hwtstamp_get_lower(struct net_device *dev,
>  int generic_hwtstamp_set_lower(struct net_device *dev,
>  			       struct kernel_hwtstamp_config *kernel_cfg,
>  			       struct netlink_ext_ack *extack);
> -int dev_set_hwtstamp_phylib(struct net_device *dev,
> -			    struct kernel_hwtstamp_config *cfg,
> -			    struct netlink_ext_ack *extack);
>  int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *userdata);
>  unsigned int dev_get_flags(const struct net_device *);
>  int __dev_change_flags(struct net_device *dev, unsigned int flags,
> diff --git a/net/core/dev.h b/net/core/dev.h
> index 8572d2c8dc4a..39819fffece7 100644
> --- a/net/core/dev.h
> +++ b/net/core/dev.h
> @@ -167,4 +167,8 @@ static inline void dev_xmit_recursion_dec(void)
>  	__this_cpu_dec(softnet_data.xmit.recursion);
>  }
>  
> +int dev_set_hwtstamp_phylib(struct net_device *dev,
> +			    struct kernel_hwtstamp_config *cfg,
> +			    struct netlink_ext_ack *extack);
> +
>  #endif
> diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
> index 9a66cf5015f2..b9719ed3c3fd 100644
> --- a/net/core/dev_ioctl.c
> +++ b/net/core/dev_ioctl.c
> @@ -363,7 +363,6 @@ int dev_set_hwtstamp_phylib(struct net_device *dev,
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(dev_set_hwtstamp_phylib);
>  
>  static int dev_set_hwtstamp(struct net_device *dev, struct ifreq *ifr)
>  {
> 
> -- 
> 2.34.1
> 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ