[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231020092151.00a20fcf@kernel.org>
Date: Fri, 20 Oct 2023 09:21:51 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew@...n.ch, paul.greenwalt@...el.com,
hkallweit1@...il.com, linux@...linux.org.uk, gal@...dia.com
Subject: Re: [PATCH net-next] ethtool: untangle the linkmode and ethtool
headers
On Fri, 20 Oct 2023 12:24:29 +0300 Vladimir Oltean wrote:
> On Thu, Oct 19, 2023 at 08:28:15AM -0700, Jakub Kicinski wrote:
> > +EXPORT_SYMBOL_GPL(ethtool_forced_speed_maps_init);
>
> Is there a rule for EXPORT_SYMBOL() vs EXPORT_SYMBOL_GPL()? My rule of
> thumb was that symbols used by drivers should get EXPORT_SYMBOL() for
> maximum compatibility with their respective licenses, while symbols
> exported for other core kernel modules should get EXPORT_SYMBOL_GPL().
I think that Russell is right that it's author's preference. I don't
have a strong one so I just copy what's in the file. Luck would have
it that the closest was EXPORT_SYMBOL_GPL(ethtool_set_ethtool_phy_ops);
We should perhaps have clearer guidance. You say drivers but even what
we put under drivers/net/ vs net/ is not crystal clear. With some
protocols leaving in one place and others in the other. Pretty core
things like netconsole are under drivers/ and qdiscs which have a
non-GPL API (IIRC) are under net/.
We'd need to consult with people who have more exposure to proprietary
code to figure out good rules. For better or worse I'm not one of them
:(
Powered by blists - more mailing lists