On 2022/10/25 1:37, Casey Schaufler wrote:
> What I'm insisting is that "warrant the freedom to
load
> loadable LSM modules without recompiling the whole kernel".
Since security modules are optional and the LSM infrastructure
itself is optional you can't ensure that any given kernel would
support a loadable security module.
Like I propose adding EXPORT_SYMBOL_GPL(security_hook_heads),
I'm not taking about distributors who choose CONFIG_SECURITY=n.
> Adding EXPORT_SYMBOL_GPL(security_hook_heads) is the only way
that can "allow
> LSM modules which distributors cannot support to be legally loaded".
I believe that I've identified an alternative. It isn't easy or cheap.
No. You are just handwaving/postponing the problem using something unknown
that is not yet shown as a workable code. Anything that can be disabled via
kernel config option cannot be an alternative.
Quoting from
https://lkml.kernel.org/r/2225aec6-f0f3-d38e-ee3c-6139a7c25a37@I-love.SAK...
Like Paul Moore said
However, I will caution that it is becoming increasingly difficult for people
to find time to review potential new LSMs so it may a while to attract sufficient
comments and feedback.
, being unable to legally use loadable LSMs deprives of chances to develop/try
new LSMs, and makes LSM interface more and more unattractive. The consequence
would be "The LSM interface is dead. We will give up implementing as LSMs."
The biggest problem is that quite few developers show interest in loadable LSM modules.
How many developers responded to this topic? Once the ability to allow loadable LSM
modules is technically lost, nobody shall be able to revive it. You will be happy with
ignoring poor people.
You are already and completely trapped into "only in-tree and supported by
distributors
is correct" crap.
Of course the upstream kernel isn't going to have LSM IDs for
out-of-tree
security modules. That's one of many reasons loadable modules are going to
have to be treated differently from built-in modules, if they're allowed
at all.
Then, I have to hate your idea of having fixed sized array.
Nacked-by: Tetsuo Handa <penguin-kernel(a)I-love.SAKURA.ne.jp>