Linux EFI development
 help / color / mirror / Atom feed
From: ross.philipson@oracle.com
To: Ard Biesheuvel <ardb@kernel.org>, Jonathan McDowell <noodles@earth.li>
Cc: kernel test robot <lkp@intel.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	linux-integrity@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-crypto@vger.kernel.org, kexec@lists.infradead.org,
	linux-efi@vger.kernel.org, iommu@lists.linux-foundation.org,
	oe-kbuild-all@lists.linux.dev, dpsmith@apertussolutions.com,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	hpa@zytor.com, dave.hansen@linux.intel.com, mjg59@srcf.ucam.org,
	James.Bottomley@hansenpartnership.com, peterhuewe@gmx.de,
	jarkko@kernel.org, jgg@ziepe.ca, luto@amacapital.net,
	nivedita@alum.mit.edu, herbert@gondor.apana.org.au,
	davem@davemloft.net, corbet@lwn.net, ebiederm@xmission.com,
	dwmw2@infradead.org, baolu.lu@linux.intel.com,
	kanth.ghatraju@oracle.com
Subject: Re: [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch
Date: Thu, 29 Aug 2024 08:13:34 -0700	[thread overview]
Message-ID: <98330007-d07e-4124-a26a-0ffb3d50a773@oracle.com> (raw)
In-Reply-To: <CAMj1kXHvTjC1ALgHnu-_Tad4Ur9RqJR_d9h8bQDvXcx2p5H2AA@mail.gmail.com>

On 8/29/24 6:28 AM, Ard Biesheuvel wrote:
> On Thu, 29 Aug 2024 at 15:24, Jonathan McDowell <noodles@earth.li> wrote:
>>
>> On Wed, Aug 28, 2024 at 01:19:16PM -0700, ross.philipson@oracle.com wrote:
>>> On 8/28/24 10:14 AM, Ard Biesheuvel wrote:
>>>> On Wed, 28 Aug 2024 at 19:09, kernel test robot <lkp@intel.com> wrote:
>>>>>
>>>>> Hi Ross,
>>>>>
>>>>> kernel test robot noticed the following build warnings:
>>>>>
>>>>> [auto build test WARNING on tip/x86/core]
>>>>> [also build test WARNING on char-misc/char-misc-testing char-misc/char-misc-next char-misc/char-misc-linus herbert-cryptodev-2.6/master efi/next linus/master v6.11-rc5]
>>>>> [cannot apply to herbert-crypto-2.6/master next-20240828]
>>>>> [If your patch is applied to the wrong git tree, kindly drop us a note.
>>>>> And when submitting patch, we suggest to use '--base' as documented in
>>>>> https://urldefense.com/v3/__https://git-scm.com/docs/git-format-patch*_base_tree_information__;Iw!!ACWV5N9M2RV99hQ!KhkZK77BXRIR4F24tKkUeIlIrdqXtUW2vcnDV74c_5BmrQBQaQ4FqcDKKv9LB3HQUocTGkrmIxuz-LAC$ ]
>>>>>
>>>>> url:    https://urldefense.com/v3/__https://github.com/intel-lab-lkp/linux/commits/Ross-Philipson/Documentation-x86-Secure-Launch-kernel-documentation/20240827-065225__;!!ACWV5N9M2RV99hQ!KhkZK77BXRIR4F24tKkUeIlIrdqXtUW2vcnDV74c_5BmrQBQaQ4FqcDKKv9LB3HQUocTGkrmI7Z6SQKy$
>>>>> base:   tip/x86/core
>>>>> patch link:    https://urldefense.com/v3/__https://lore.kernel.org/r/20240826223835.3928819-21-ross.philipson*40oracle.com__;JQ!!ACWV5N9M2RV99hQ!KhkZK77BXRIR4F24tKkUeIlIrdqXtUW2vcnDV74c_5BmrQBQaQ4FqcDKKv9LB3HQUocTGkrmIzWfs1XZ$
>>>>> patch subject: [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch
>>>>> config: i386-randconfig-062-20240828 (https://urldefense.com/v3/__https://download.01.org/0day-ci/archive/20240829/202408290030.FEbUhHbr-lkp@intel.com/config__;!!ACWV5N9M2RV99hQ!KhkZK77BXRIR4F24tKkUeIlIrdqXtUW2vcnDV74c_5BmrQBQaQ4FqcDKKv9LB3HQUocTGkrmIwkYG0TY$ )
>>>>
>>>>
>>>> This is a i386 32-bit build, which makes no sense: this stuff should
>>>> just declare 'depends on 64BIT'
>>>
>>> Our config entry already has 'depends on X86_64' which in turn depends on
>>> 64BIT. I would think that would be enough. Do you think it needs an explicit
>>> 'depends on 64BIT' in our entry as well?
>>
>> The error is in x86-stub.c, which is pre-existing and compiled for 32
>> bit as well, so you need more than a "depends" here.
>>
> 
> Ugh, that means this is my fault - apologies. Replacing the #ifdef
> with IS_ENABLED() makes the code visible to the 32-bit compiler, even
> though the code is disregarded.
> 
> I'd still prefer IS_ENABLED(), but this would require the code in
> question to live in a separate compilation unit (which depends on
> CONFIG_SECURE_LAUNCH). If that is too fiddly, feel free to bring back
> the #ifdef CONFIG_SECURE_LAUNCH here (and retain my R-b)

Thanks to both of you for the followup.

If there was a very large amount of new code here, I would consider 
making a separate compilation unit. I can't really say if this is a 
wider issue with the the EFI libstub code but if it ware broken up 
later, it would make sense to move our bits to where 64bit only code lives.

Given that it is a small block of code though, I am inclined to just go 
back to #ifdef's for now.

Thanks
Ross

      reply	other threads:[~2024-08-29 15:19 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 22:38 [PATCH v10 00/20] x86: Trenchboot secure dynamic launch Linux kernel support Ross Philipson
2024-08-26 22:38 ` [PATCH v10 01/20] Documentation/x86: Secure Launch kernel documentation Ross Philipson
2024-08-26 22:38 ` [PATCH v10 02/20] x86: Secure Launch Kconfig Ross Philipson
2024-08-26 22:38 ` [PATCH v10 03/20] x86: Secure Launch Resource Table header file Ross Philipson
2024-08-26 22:38 ` [PATCH v10 04/20] x86: Secure Launch main " Ross Philipson
2024-08-26 22:38 ` [PATCH v10 05/20] x86: Add early SHA-1 support for Secure Launch early measurements Ross Philipson
2024-08-26 22:38 ` [PATCH v10 06/20] x86: Add early SHA-256 " Ross Philipson
2024-08-26 22:38 ` [PATCH v10 07/20] x86/msr: Add variable MTRR base/mask and x2apic ID registers Ross Philipson
2024-08-26 22:38 ` [PATCH v10 08/20] x86/boot: Place TXT MLE header in the kernel_info section Ross Philipson
2024-08-27 10:29   ` Ard Biesheuvel
2024-08-26 22:38 ` [PATCH v10 09/20] x86: Secure Launch kernel early boot stub Ross Philipson
2024-08-26 22:38 ` [PATCH v10 10/20] x86: Secure Launch kernel late " Ross Philipson
2024-08-26 22:38 ` [PATCH v10 11/20] x86: Secure Launch SMP bringup support Ross Philipson
2024-08-26 22:38 ` [PATCH v10 12/20] kexec: Secure Launch kexec SEXIT support Ross Philipson
2024-08-26 22:38 ` [PATCH v10 13/20] x86/reboot: Secure Launch SEXIT support on reboot paths Ross Philipson
2024-08-26 22:38 ` [PATCH v10 14/20] tpm: Protect against locality counter underflow Ross Philipson
2024-08-26 22:38 ` [PATCH v10 15/20] tpm: Ensure tpm is in known state at startup Ross Philipson
2024-08-26 22:38 ` [PATCH v10 16/20] tpm: Make locality requests return consistent values Ross Philipson
2024-08-26 22:38 ` [PATCH v10 17/20] tpm: Add ability to set the default locality the TPM chip uses Ross Philipson
2024-08-26 22:38 ` [PATCH v10 18/20] tpm: Add sysfs interface to allow setting and querying the default locality Ross Philipson
2024-08-26 22:38 ` [PATCH v10 19/20] x86: Secure Launch late initcall platform module Ross Philipson
2024-08-26 22:38 ` [PATCH v10 20/20] x86/efi: EFI stub DRTM launch support for Secure Launch Ross Philipson
2024-08-27 10:28   ` Ard Biesheuvel
2024-08-27 17:19     ` ross.philipson
2024-08-27 20:09   ` kernel test robot
2024-08-28 17:09   ` kernel test robot
2024-08-28 17:14     ` Ard Biesheuvel
2024-08-28 20:19       ` ross.philipson
2024-08-29 13:23         ` Jonathan McDowell
2024-08-29 13:28           ` Ard Biesheuvel
2024-08-29 15:13             ` ross.philipson [this message]

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=98330007-d07e-4124-a26a-0ffb3d50a773@oracle.com \
    --to=ross.philipson@oracle.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=ardb@kernel.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=dpsmith@apertussolutions.com \
    --cc=dwmw2@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=kanth.ghatraju@oracle.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=nivedita@alum.mit.edu \
    --cc=noodles@earth.li \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=peterhuewe@gmx.de \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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