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] [day] [month] [year] [list]
Date:   Fri, 06 Jul 2018 09:03:04 +1000
From:   NeilBrown <neilb@...e.com>
To:     Masahiro Yamada <yamada.masahiro@...ionext.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

On Thu, Jul 05 2018, Masahiro Yamada wrote:

> 2018-07-05 6:54 GMT+09:00 NeilBrown <neilb@...e.com>:
>> On Wed, Jul 04 2018, Masahiro Yamada wrote:
>>
>>> 2018-07-04 7:14 GMT+09:00 NeilBrown <neilb@...e.com>:
>>>>
>>>> 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.
>>
>> I'd prefer that too in general.
>> But some modules are bigger than others and some times it helps to
>> sub-divide a module.
>> xfs, btrfs, ceph, net/dccp, and lustre all already use multiple
>> directories despite the poor support, so clearly some developers
>> like a more structured approach to organizing their code.
>> Wouldn't it be good to allow them to make full use of the kbuild system?
>
>
> xfs is quite big, but the others are not too bad.
> You can collect files into a single directory if you want.
> If you mind the namespace, one tip might be to group files with prefix.
> For example,
>
>   drivers/btrfs/tests/foo.o  ->  drivers/btrfs/test-foo.o

Certainly that is possible.  We could even place all of linux in a
single directory, but that would be a bad idea.  Subdividing large
bodies of code into files and then directories is a widely used
practice.  Why do you want make it hard for people to structure their
code in the way that seems most suitable to them?
My particular interest is lustre which has quite a few more
subdirectories than btrfs or xfs.  It currently builds as nearly a dozen
modules, one per directory (and that is just the client side).  This
requires a lot more exports than should be necessary, and exposes
internal detail unnecessarily. I would much rather it were fewer
modules.

>
> I do not want to introduce a mess to core build scripts.

What mess are you referring to?  The code I provided follows the style
of the current code and has the same general level of complexity as the
current code.  How is it a mess?

Thanks,
NeilBrown

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ