Re: [PATCH 00/17] Add export symbol namespace PL_CHROMEOS

From: Gwendal Grignou
Date: Wed Jan 05 2022 - 23:26:53 EST


On Wed, Jan 5, 2022 at 2:58 PM Dmitry Torokhov <dtor@xxxxxxxxxxxx> wrote:
>
> Hi Gwendal,
>
> On Wed, Jan 5, 2022 at 2:07 PM Gwendal Grignou <gwendal@xxxxxxxxxxxx> wrote:
> >
> > Add a symbol namespace for functions exported by the plaform chromeos
> > subsystem.
>
> It would be great to explain why this is needed/desirable. What are
> the benefits of introducing this namespace? What problem are you
> trying to solve?
The issue came when reviewing an iio sensor
(https://www.spinics.net/lists/linux-iio/msg66280.html). I wanted to
be ahead of the curve (for once).

>
> > Add depenencies for all drivers using these function.
> >
> > 'make nsdeps' is used to fix the dependencies.
> >
> > Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> >
> > Gwendal Grignou (17):
> > plaform: chrome: Add PL_CHROMEOS export symbol namespace
> > iio:cros_ec_sensors: Add PL_CHROMEOS dependency
>
> I wonder if ordering patches this way breaks compilation (patches
> should be structured in such a way that one need not apply entire
> series to get to buildable kernel). Isn't putting symbols into new
> namespace makes them unavailable to modules unless they explicitly
> import it?
>From https://www.kernel.org/doc/html/latest/core-api/symbol-namespaces.html#loading-modules-that-use-namespaced-symbols,
since MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is set by default, this
is just a warning at load time.

Gwendal.
>
> Thanks.
>
> --
> Dmitry