public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", install generated keys
Date: Thu, 15 Jun 2023 15:53:40 +0200	[thread overview]
Message-ID: <09981d71-71b3-e217-56a2-e5f7348df0bd@gentoo.org> (raw)
In-Reply-To: <CAJ0EP426px_7tssr1XAgAQ-dzXKvg+UxG+bHQX-fQmAPF2h8gw@mail.gmail.com>

On 15/06/2023 15:46, Mike Gilbert wrote:
> On Thu, Jun 15, 2023 at 9:06 AM Andrew Ammerlaan
> <andrewammerlaan@gentoo.org> wrote:
>>    # @FUNCTION: kernel-build_merge_configs
>> @@ -270,16 +354,39 @@ kernel-build_merge_configs() {
>>          local user_configs=( "${BROOT}"/etc/kernel/config.d/*.config )
>>          shopt -u nullglob
>>
>> +       local merge_configs=( "${@}" )
>> +
>> +       if [[ -n "${ALLOW_MODULES_SIGN}" ]]; then
>> +               if use modules-sign; then
>> +                       : "${MODULES_SIGN_HASH:=sha512}"
>> +                       cat <<-EOF > "${WORKDIR}/modules-sign.config" || die
>> +                               ## Enable module signing
>> +                               CONFIG_MODULE_SIG=y
>> +                               CONFIG_MODULE_SIG_ALL=y
>> +                               CONFIG_MODULE_SIG_FORCE=y
>> +                               CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y
> 
> I'm not sure if it matters, but menuconfig would also set
> CONFIG_MODULE_SIG_HASH. eg.

When I tested this earlier CONFIG_MODULE_SIG_HASH was entirely dependent 
on the setting of CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}.
I.e. setting CONFIG_MODULE_SIG_${MODULES_SIGN_HASH^^}=y automatically 
sets CONFIG_MODULE_SIG_HASH=${MODULES_SIGN_HASH} to the same value. Only 
setting CONFIG_MODULE_SIG_HASH is ignored and it reverts back to the 
default value of CONFIG_MODULE_SIG_SHA512. We could set both, but there 
is no functional difference.

Best regards,
Andrew



  reply	other threads:[~2023-06-15 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  9:50 [gentoo-dev] [PATCH 1/2] kernel-build.eclass: add IUSE="strip", install generated keys Andrew Ammerlaan
2023-06-15 13:06 ` [gentoo-dev] [PATCH 1/2 v2] kernel-build.eclass: add IUSE="+strip modules-sign", " Andrew Ammerlaan
2023-06-15 13:46   ` Mike Gilbert
2023-06-15 13:53     ` Andrew Ammerlaan [this message]
2023-06-17 18:12 ` [gentoo-dev] [PATCH 1/2 v3] kernel-build.eclass: add IUSE="strip", " Andrew Ammerlaan

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=09981d71-71b3-e217-56a2-e5f7348df0bd@gentoo.org \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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