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]
Message-ID: <CAK7LNAS22VUQytcX=BQt48qeAn9Rq00Sb555Gu98J+=8R_3OVA@mail.gmail.com>
Date:   Wed, 4 Jul 2018 21:08:43 +0900
From:   Masahiro Yamada <yamada.masahiro@...ionext.com>
To:     NeilBrown <neilb@...e.com>
Cc:     Michal Marek <michal.lkml@...kovi.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>
Subject: Re: [PATCH 4/5] kbuild: disable KBUILD_MODNAME when building for mod.a

2018-07-04 7:14 GMT+09:00 NeilBrown <neilb@...e.com>:
> On Wed, Jun 27 2018, Masahiro Yamada wrote:
>
>> 2018-06-18 13:55 GMT+09:00 NeilBrown <neilb@...e.com>:
>>> When building an object to be included in mod.a we
>>> cannot know the name of the module.  So don't define
>>> KBUILD_MODNAME.  This will ensure attempt to use
>>> that macro when the module name isn't know will
>>> trigger an error.
>>
>> Honestly, I hate KBUILD_MODNAME.
>>
>> If KBUILD_MODNAME is undefined,
>> you cannot call pr_debug() in the sub-directory for example.
>
> I think this is only true if you have something like
>
> #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>
> in your .c files.  Developers who use modobj-m could be advised not to
> do this.
>
>>
>> CONFIG_DYNAMIC_DEBUG requires KBUILD_MODNAME,
>> but people often miss to notice that, then cause build errors.
>
> Yes, I can see that.
> We could change it to use a default ("no-name") if KBUILD_MODNAME isn't
> defined.  Or we could require that KBUILD_MODNAME always be defined.
>
> Where I've been using these patches I've sometimes been adding
>
>   ccflags-y += -DKBUILD_MODNAME='"FOO"'
>
> to Makefiles so that modules_params get handled correctly on non-module
> builds.  I've thought about instead allowing "modobj-name" to be defined
> and requiring that it be set if either modobj-[yn] is set.  Then it gets
> used for the KBUILD_MODNAME when building modobj modules.
>
> Would you prefer to always require KBUILD_MODNAME, or to use a default
> name for dynamic-debug?
>
> Thanks,
> NeilBrown


I prefer flat directory structure for modules.
Most of modules fit in a single directory.


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ