Re: [RFC PATCH 2/2] net: include: mii: Refactor: Use BIT() for ADVERTISE_* bits

From: Vladimir Oltean
Date: Wed Jun 05 2024 - 11:33:51 EST


On Wed, Jun 05, 2024 at 04:47:27PM +0200, Csókás Bence wrote:
> Hi!
>
> On 6/5/24 16:13, Vladimir Oltean wrote:
> > On Wed, Jun 05, 2024 at 02:16:49PM +0200, Csókás, Bence wrote:
> > > Replace hex values with BIT() and GENMASK() for readability
> > >
> > > Cc: trivial@xxxxxxxxxx
> > >
> > > Signed-off-by: "Csókás, Bence" <csokas.bence@xxxxxxxxx>
> > > ---
> >
> > You can't use BIT() and GENMASK() in headers exported to user space.
> >
> > I mean you can, but the BIT() and GENMASK() macros themselves aren't
> > exported to user space, and you would break any application which used
> > values dependent on them.
> >
>
> I thought the vDSO headers (which currently hold the definition for `BIT()`)
> *are* exported. Though `GENMASK()`, and the headers which would normally
> include vdso/bits.h, might not be... But then again, is uapi/linux/mii.h
> itself even exported?

grep through the output of "make -j 8 headers_install O=headers" is
a good place to start.

> And if so, why aren't these macros? Is there any reason _not_ to
> export the entire linux/bits.h?

Sorry, I'm not the person who can answer these questions.