Re: [BUG][SEVERE] Enabling EFI runtime services causes panics in the T2 security chip on Macs equipped with it.

From: Aditya Garg
Date: Tue Jan 11 2022 - 02:32:37 EST




> On 10-Jan-2022, at 11:15 PM, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>
> On Mon, 10 Jan 2022 at 17:37, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>>
>> On Mon, 10 Jan 2022 at 17:28, Aditya Garg <gargaditya08@xxxxxxxx> wrote:
> ...
>>>>>
>>>>> This seems to be triggered by EFI_QUERY_VARIABLE_INFO here
>>>>>
>>>>
>>>> This is interesting. QueryVariableInfo() was introduced in EFI 2.00,
>>>> and for a very long time, Intel MACs would claim to implement EFI 1.10
>>>> only. This means Linux would never attempt to use QueryVariableInfo()
>>>> on such platforms.
>>>>
>>>> Can you please check your boot log which revision it claims to implement now?
>>>>
>>>> Mine says
>>>>
>>>> efi: EFI v1.10 by Apple
>>>
>>> Mine says
>>>
>>> efi: EFI v2.40 by Apple
>>>
>
> Can you check whether things work as before after applying the change below?
Patch works for me Ard :)
I am able to boot without efi=norumtime now.
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 147c30a81f15..d7203355cc69 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -399,7 +399,7 @@ static int __init efi_systab_init(unsigned long phys)
> efi_nr_tables = systab32->nr_tables;
> }
>
> - efi.runtime_version = hdr->revision;
> + efi.runtime_version = EFI_1_10_SYSTEM_TABLE_REVISION;
>
> efi_systab_report_header(hdr, efi_fw_vendor);
> early_memunmap(p, size);