From: Jeffrey Hugo <quic_jhugo@quicinc.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Nicolas Schier <n.schier@avm.de>,
Masahiro Yamada <masahiroy@kernel.org>,
<linux-kbuild@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Kees Cook <kees@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Ben Hutchings <ben@decadent.org.uk>,
<regressions@lists.linux.dev>
Subject: Re: [PATCH 3/4] kbuild: slim down package for building external modules
Date: Fri, 28 Feb 2025 15:04:18 -0700 [thread overview]
Message-ID: <8bfa88b3-484e-4933-bc59-9dc12e37e691@quicinc.com> (raw)
In-Reply-To: <2025022057-reclusive-overreach-ac89@gregkh>
On 2/20/2025 10:43 AM, Greg KH wrote:
> On Thu, Feb 20, 2025 at 10:24:32AM -0700, Jeffrey Hugo wrote:
>> On 2/20/2025 9:49 AM, Greg KH wrote:
>>> What do you need/want to parse the .config file in the first place? Why
>>> not rely on the generated .h files instead as those can be parsed the
>>> same way as before, right?
>>
>> Two usecases -
>>
>> First when secure boot is enabled, DKMS looks for CONFIG_MODULE_SIG_HASH to
>> figure out signing the modules so that they can be loaded. Removing .config
>> causes an error in DKMS and the module signing process will fail. The
>> resulting modules (already compiled successfully) will fail to load.
>> Whatever the user needed those modules for will no longer work.
>
> Shouldn't the "normal" kbuild process properly sign the module if it
> needs to be signed? Or are you trying to do this "by hand"?
>
>> If the user is on Ubuntu, and has built a kernel 6.12 or later, they need to
>> build upstream DKMS and use it as none of the Canonical provided DKMS builds
>> have the fix. This feels like a situation that would make the user afraid
>> to upgrade their kernel (to your point above).
>>
>> This feels very much like an "at runtime" issue, assuming external modules
>> are supported. I may be wrong here.
>
> external modules can be broken at any moment in time, you know that.
> There's never a guarantee for that at all.
>
>> Second, our usecase is that we look at the .config to tell if a particular
>> driver is included in the kernel build (config =y or =m). This driver
>> provides diagnostic information which is useful to our product, but not
>> required for operation. It does not have headers that are exposed to the
>> rest of the kernel, so checking the generated .h files does not work. If
>> the driver is not built, we provide a backported version that is then built
>> out of tree.
>
> You can check the same .h files for those config options, no need to
> manually parse a .config file. What's wrong with including
> include/generated/autoconf.h properly? That's what the build system
> uses, right?
I can't check .h files that don't exist.
However, I think your viewpoint is coming through pretty clear - we'll
fix up what we can in our control, and I guess anything else gets
dropped on the floor. Seems like I have a conclusion.
-Jeff
next prev parent reply other threads:[~2025-02-28 22:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-27 7:42 [PATCH 0/4] kbuild: cross-compile linux-headers package Masahiro Yamada
2024-07-27 7:42 ` [PATCH 1/4] modpost: remove unused HOST_ELFCLASS Masahiro Yamada
2024-07-31 20:43 ` Nicolas Schier
2024-07-27 7:42 ` [PATCH 2/4] modpost: detect endianness on run-time Masahiro Yamada
2024-07-31 20:47 ` Nicolas Schier
2024-07-27 7:42 ` [PATCH 3/4] kbuild: slim down package for building external modules Masahiro Yamada
2024-07-31 21:01 ` Nicolas Schier
2024-08-24 12:27 ` Thomas Weißschuh
2024-08-24 16:58 ` Masahiro Yamada
2025-02-18 20:25 ` Jeffrey Hugo
2025-02-20 10:03 ` Nicolas Schier
2025-02-20 15:03 ` Jeffrey Hugo
2025-02-20 15:54 ` Nicolas Schier
2025-02-20 16:31 ` Jeffrey Hugo
2025-02-20 16:49 ` Greg KH
2025-02-20 17:24 ` Jeffrey Hugo
2025-02-20 17:43 ` Greg KH
2025-02-20 18:12 ` Masahiro Yamada
2025-02-28 22:04 ` Jeffrey Hugo [this message]
2025-02-20 17:57 ` Masahiro Yamada
2024-07-27 7:42 ` [PATCH 4/4] kbuild: cross-compile linux-headers package when possible Masahiro Yamada
2024-07-30 1:03 ` Kees Cook
2024-08-01 2:26 ` Masahiro Yamada
2024-07-31 21:10 ` Nicolas Schier
2024-08-01 2:37 ` Masahiro Yamada
2024-08-01 7:04 ` Nicolas Schier
2024-10-17 14:45 ` Ron Economos
2024-10-17 19:24 ` Nicolas Schier
2024-10-17 19:34 ` Ron Economos
2024-11-14 20:57 ` Charlie Jenkins
2024-11-16 8:03 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bfa88b3-484e-4933-bc59-9dc12e37e691@quicinc.com \
--to=quic_jhugo@quicinc.com \
--cc=ben@decadent.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=kees@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=n.schier@avm.de \
--cc=nathan@kernel.org \
--cc=regressions@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox