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, 06 Dec 2022 20:03:05 +0000
From:   Nick Alcock <nick.alcock@...cle.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     mcgrof@...nel.org, masahiroy@...nel.org,
        linux-modules@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        linux-kernel@...r.kernel.org, arnd@...db.de,
        akpm@...ux-foundation.org, eugene.loh@...cle.com,
        kris.van.hees@...cle.com
Subject: Re: [PATCH v10 05/13] kbuild: remove
 MODULE_LICENSE/AUTHOR/DESCRIPTION in non-modules

On 6 Dec 2022, Geert Uytterhoeven uttered the following:

> On Mon, Dec 5, 2022 at 5:34 PM Nick Alcock <nick.alcock@...cle.com> wrote:
>> Since commit 8b41fc4454e ("kbuild: create modules.builtin without
>> Makefile.modbuiltin or tristate.conf"), MODULE_LICENSE declarations in
>> non-modules will cause modprobe to misidentify their containing object
>> file as a module when it is not, which might cause it to spuriously fail
>> when trying to load something that is built in to the kernel.  They
>> also cause misconstruction of modules.builtin.objs, leading to incorrect
>> output in kallmodsyms (notating things as being in modules when they
>> actually cannot be built as a module at all).
>>
>> Automatically identified with the new tristate checker, and purged with
>> sed and a subsequent make allmodconfig to double-check.
>>
>> Signed-off-by: Nick Alcock <nick.alcock@...cle.com>
>
> I can (sort of) agree with the MODULE_LICENSE(), as it duplicates the
> SPDX-License-Identifier at the top.
> However, you don't explain why it is a good thing to remove the
> MODULE_{AUTHOR,DESCRIPTION}, too.  This is useful information, in an
> easy-to-parse format.

I was concerned about that, but I kinda thought they went together and
it would be neater to take them out in one go -- but I'd be happy to
keep them in and only drop MODULE_LICENSE.

> Moreover, many of the affected drivers might be converted into modules
> in the near or far future.
>
> If the presence of these causes issues for the tooling, perhaps the
> tooling can be fixed instead?

Only MODULE_LICENSE invokes MODULE_FILE and thus ends up introducing a
KBUILD_MODOBJS entry that triggers things going wrong iff not a module:
so only it needs to go out (or be replaced with a variant that doesn't
invoke MODULE_FILE, if you want to keep the license in too -- but if the
thing is no longer a standalone entity at all I'm not sure what meaning
it could possibly have).

-- 
NULL && (void)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ