All of lore.kernel.org
 help / color / mirror / Atom feed
From: akuster808 <akuster808@gmail.com>
To: Mikko Rapeli <mikko.rapeli@linaro.org>,
	Stefan Berger <stefanb@linux.ibm.com>
Cc: Jose Quaresma <quaresma.jose@gmail.com>,
	yocto@lists.yoctoproject.org,
	Jose Quaresma <jose.quaresma@foundries.io>
Subject: Re: [yocto] [meta-security][PATCH 1/8] Revert "ima-evm-utils: Update ima-evm-utils to v1.5 and add a patch"
Date: Wed, 10 May 2023 10:25:02 -0400	[thread overview]
Message-ID: <4f9206ad-aa2d-bdb0-dec7-fd40f1fee826@gmail.com> (raw)
In-Reply-To: <ZFuY1UtAFKNI4Oyt@nuoska>



On 5/10/23 9:15 AM, Mikko Rapeli wrote:
> Hi,
>
> On Wed, May 10, 2023 at 08:23:18AM -0400, Stefan Berger wrote:
>>
>> On 5/10/23 07:44, Armin Kuster wrote:
>>>
>>> On 5/9/23 2:56 PM, Jose Quaresma wrote:
>>>> This reverts commit 9de807705b27b05bbf84e9f16502fe6cdaa8928f.
>>>>
>>>> The full patchset are overriding the do_configure task and also added a kernel patch
>>>> on meta-integrity/recipes-kernel/linux/linux_ima.inc and this file is included
>>>> in every recipe that follows the pattern pattern starting by linux- (recipes-kernel/linux/linux-%.bbappend).
>>>> So the patch fails in some recipes and also do_configure task doesn't make sense.
>>>> This breaks many recipes like linux-firmware and maybe others.
>>> I fail to see how  this package update is part of the issue above. I am still trying to sort out the store here to figure out how we move forward.
>> My suggestion would be that I post a v2 of my fix patches containing:
>>
>> 1) removal of the Linux kernel patch
>> 2) removal of the squashfs option (less important)
>> 3) the suggestion outlined here: https://lists.yoctoproject.org/g/yocto/message/59955
>>     but modified to look like this with '&& [ -f .config ]' appended:
>>
>>   do_configure:append() {
>>       if [ "${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'yes', '', d)}" = "yes" ] && [ -f .config ] ; then
>>           sed -i "s|^CONFIG_SYSTEM_TRUSTED_KEYS=.*|CONFIG_SYSTEM_TRUSTED_KEYS=\"${IMA_EVM_ROOT_CA}\"|" .config
>>       fi
>>   }
>>
>> I don't want to hold things up but maybe it's worth discussing the suggested changes.
>>
>>  From what I can see 'bitbake linux-firmware' builds under OpenBMC now with these suggested changes
>> and it did NOT build before. My suggestion would be to discuss the proposal under that thread there.
>> The problems seem to be that the file meta-security/meta-integrity/recipes-kernel/linux/linux-%.bbappend
>> matches the pattern linux-firmware as well and therefore its contents get included when building
>> linux-firmware. When building linux-firmware while having also DISTRO_FEATURES ima set in local.conf then the
>> ima.scc is added to SRC_URI and the do_configure is also appended. The latter will not have side-effects but
>> I don't know about the former nor how to create a better filter (other than DISTRO_FEATURES) for not having
>> these included for linux-firmware.
> Why is the bbappend applying changes to all recipes where name starts with
> "linux-"?
>
> It is aiming at Linux kernel recipes which by default in yocto are
> called "linux-yocto", so the bbappend could simply be
> "linux-yocto_%.bbappend" (or "linux-yocto%.bbappend to catch the rt
> and other variants too).

Well that one is on me. That change came in when I ported over the 
meta-intel-iot-security layer.

6680225 meta-integrity: port over from meta-intel-iot-security

I will send a patch correcting that.

Thanks for the reminder and pointing this out.

BR,
Armin

>
> I think it's a bad idea to try to apply this change automatically to all
> possible BSP layer kernels which may or may not have names starting with
> "linux-" and it's well known that there are a lot of recipe names which
> start with "linux-" which are not Linux kernels (linux-firmware,
> linux-libc-headers, linux-dummy etc).
>
> Cheers,
>
> -Mikko



  parent reply	other threads:[~2023-05-10 14:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 18:56 [meta-security][PATCH 1/8] Revert "ima-evm-utils: Update ima-evm-utils to v1.5 and add a patch" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 2/8] Revert "linux: overlayfs: Add kernel patch resolving a file change notification issue" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 3/8] Revert "integrity: Update the README for IMA support" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 4/8] Revert "ima: Sign all executables and the ima-policy in the root filesystem" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 5/8] Revert "ima: Rename IMA_EVM_POLICY_SYSTEMD to IMA_EVM_POLICY" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 6/8] Revert "ima: Fix the IMA kernel feature" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 7/8] Revert "ima: Fix the ima_policy_appraise_all to appraise executables & libraries" Jose Quaresma
2023-05-09 18:56 ` [meta-security][PATCH 8/8] Revert "ima: Document and replace keys and adapt scripts for EC keys" Jose Quaresma
2023-05-10 11:44 ` [yocto] [meta-security][PATCH 1/8] Revert "ima-evm-utils: Update ima-evm-utils to v1.5 and add a patch" akuster808
2023-05-10 12:23   ` Stefan Berger
2023-05-10 13:15     ` Mikko Rapeli
2023-05-10 14:20       ` Stefan Berger
2023-05-10 14:34         ` Mikko Rapeli
2023-05-10 14:25       ` akuster808 [this message]
2023-05-10 14:33         ` Jose Quaresma
     [not found]         ` <175DCECAC59B5A82.14362@lists.yoctoproject.org>
2023-05-10 14:35           ` Jose Quaresma

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=4f9206ad-aa2d-bdb0-dec7-fd40f1fee826@gmail.com \
    --to=akuster808@gmail.com \
    --cc=jose.quaresma@foundries.io \
    --cc=mikko.rapeli@linaro.org \
    --cc=quaresma.jose@gmail.com \
    --cc=stefanb@linux.ibm.com \
    --cc=yocto@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.