From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by mx.groups.io with SMTP id smtpd.web11.37739.1601912066523660602 for ; Mon, 05 Oct 2020 08:34:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=f1IMTjvy; spf=pass (domain: 9elements.com, ip: 209.85.161.50, mailfrom: marcello.bauer@9elements.com) Received: by mail-oo1-f50.google.com with SMTP id o20so2346778ook.1 for ; Mon, 05 Oct 2020 08:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lj7z7nbzpR0Bpvsa7Dm0uyGPpnE1ScdtTAhpaV6oKjQ=; b=f1IMTjvyxFIr+DyBTb75JiEcM7+ZLGgFMjF17W8TVjR6ibITWNCZeD+CSjMHnAktao VkafhDY1eO0PNZVeYwdPAZsm7/x708ELrhEKDqblkgy5zv1Oq4WEkeYlXtGMKSIUUEsf lx/FK28PPriWzxvUhJtbTaOmArg2NRy34clMv5MUjDCySQjRPrjb6TpIcO3nO45Df6Ud aSsHCOnwSpYlrHiX4YEkrQPvpFw6pPfF15stumeZvGv8ak15pDemZjQpvJfsHA4/7WX1 2+JBccR4UYRQQgRUdELRvDZMSXuDpbq72tGIAUkpnv9r4t8oTjgjIE5tdhJuNl2dWuaS WTdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lj7z7nbzpR0Bpvsa7Dm0uyGPpnE1ScdtTAhpaV6oKjQ=; b=dRpJetrKY0WciqnOnXCgse6FdOSysPQJGCjXoXpxw23FZnQidTNGiqjqzap6PmpCkd gTMWArNmPv86s2jPC62g0Z4Yf+mbmvQxUIMzTFQGznBp9/M7QXqgqmqunsuN8qqC3qS/ q8v/4XqQxTRn0WRmKRCKvkAgFVV2WMyXxuf5FlJ5c6jUs0irvJMGyYX0+knuVF1JPYV5 O5tLjQ+zq6W7ydqMCAt5dfFWpdOVQL4B2HL3eiNxxC4zWMpCU5lS5fhQCGj6PIyK21x9 xXMiwvF++svsvqDdl0pSVLhhJCufSfmEBle4/GhpkVG7fVi0aryQ1NU7ebz3UgWyAiQp uabw== X-Gm-Message-State: AOAM532BOXwebmgJJsJk8uep22KI6t0/gUVlCzEXHEBRZwgtua9YVQSp nhS2UmIF3MpuoRs7x1vwqRWAaXxGZTOzyNisAqtPOw== X-Google-Smtp-Source: ABdhPJyyWD6ynlTOuI0wqe1+Et9IaxouoDlcDyDyXxb/e6DwmpH4nN46q6118SdwSlxdCunSeMV4kJ00KfMsabr/4Qw= X-Received: by 2002:a4a:888d:: with SMTP id j13mr31880ooa.56.1601912065768; Mon, 05 Oct 2020 08:34:25 -0700 (PDT) MIME-Version: 1.0 References: <20200708120125.24344-1-marcello.bauer@9elements.com> <20200708120125.24344-2-marcello.bauer@9elements.com> <65d39699-fc22-8362-ddb3-8c04e7129f5a@redhat.com> In-Reply-To: <65d39699-fc22-8362-ddb3-8c04e7129f5a@redhat.com> From: "Marcello Sylvester Bauer" Date: Mon, 5 Oct 2020 17:34:14 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot tables To: Laszlo Ersek Cc: devel@edk2.groups.io, Guo Dong , "Ma, Maurice" , "Desimone, Nathaniel L" , "Zeng, Star" Content-Type: multipart/alternative; boundary="000000000000a452f805b0ee376b" --000000000000a452f805b0ee376b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Oct 1, 2020 at 12:24 PM Laszlo Ersek wrote: > On 09/14/20 19:32, Guo Dong wrote: > > > > OK. Let me merge this patch firstly. /Guo > > The PR at failed 17 days > ago and there have been no updates since, as far as I can tell. I've > closed the PR for now. > > Thanks > Laszlo > "Mergify / Rule: Automatically merge a PR when all required checks pass an= d 'push' label is present (merge)" is the only that failed, because mergify thinks it has no rights to update th= e base branch (tianocore/master). I don't understand why. What should I do? Thanks Marcello > > > > From: Marcello Sylvester Bauer > > Sent: Monday, September 14, 2020 2:00 AM > > To: Dong, Guo > > Cc: devel@edk2.groups.io; Ma, Maurice ; Desimone= , > Nathaniel L ; Zeng, Star < > star.zeng@intel.com> > > Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect > coreboot tables > > > > Hi Guo, > > > > Sounds like a good proposal, but it would be great to merge this chang= e > temporarily. > > In some cases of the current implementation edk2 does override the > memory area, where the coreboot table pointer is located. > > Therefore the kernel and cbmem tool is not able to locate the tables > anymore. > > > > Thanks, > > Marcello > > > > On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo guo.dong@intel.com>> wrote: > > > > Hi Marcello, > > > > In the UEFI payload, we should not hardcoded any memory usage. It mean= s > UEFI payload should use the memory map whatever reported from the > bootloader. I plan to remove this hardcoded memory usage soon. > > Before that, it is OK for me to merge this change if you want. > > BTW, did you see any issue with current implement? > > > > Thanks, > > Guo > > > >> -----Original Message----- > >> From: devel@edk2.groups.io < > devel@edk2.groups.io> On Behalf Of Marcello > >> Sylvester Bauer > >> Sent: Wednesday, July 8, 2020 5:01 AM > >> To: devel@edk2.groups.io > >> Cc: Ma, Maurice >; > Desimone, Nathaniel L > >> >; > Zeng, Star > > >> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect coreboot > tables > >> > >> From: Patrick Rudolph patrick.rudolph@9elements.com>> > >> > >> Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com>> > >> Signed-off-by: Marcello Sylvester Bauer > > >> Cc: Maurice Ma > > >> Cc: Nate DeSimone nathaniel.l.desimone@intel.com>> > >> Cc: Star Zeng > > >> --- > >> UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 ++++++++++++++------ > >> 1 file changed, 19 insertions(+), 7 deletions(-) > >> > >> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c > >> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c > >> index 22972453117a..b3ff065a537e 100644 > >> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c > >> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c > >> @@ -390,24 +390,36 @@ BlPeiEntryPoint ( > >> EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo; > >> > >> EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo; > >> > >> > >> > >> - > >> > >> - // > >> > >> - // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TES= TED > >> > >> - // is intentionally omitted to prevent erasing of the coreboot hea= der > >> > >> - // record before it is processed by ParseMemoryInfo. > >> > >> + // Report lower 640KB of RAM. > >> > >> + // Mark memory as reserved to keep coreboot header in place. > >> > >> // > >> > >> BuildResourceDescriptorHob ( > >> > >> - EFI_RESOURCE_SYSTEM_MEMORY, > >> > >> + EFI_RESOURCE_MEMORY_RESERVED, > >> > >> ( > >> > >> EFI_RESOURCE_ATTRIBUTE_PRESENT | > >> > >> EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > >> > >> + EFI_RESOURCE_ATTRIBUTE_TESTED | > >> > >> EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | > >> > >> EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | > >> > >> EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | > >> > >> EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE > >> > >> ), > >> > >> (EFI_PHYSICAL_ADDRESS)(0), > >> > >> - (UINT64)(0xA0000) > >> > >> + (UINT64)(0x1000) > >> > >> + ); > >> > >> + > >> > >> + BuildResourceDescriptorHob ( > >> > >> + EFI_RESOURCE_SYSTEM_MEMORY, > >> > >> + ( > >> > >> + EFI_RESOURCE_ATTRIBUTE_PRESENT | > >> > >> + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | > >> > >> + EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE | > >> > >> + EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | > >> > >> + EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | > >> > >> + EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE > >> > >> + ), > >> > >> + (EFI_PHYSICAL_ADDRESS)(0x1000), > >> > >> + (UINT64)(0x9F000) > >> > >> ); > >> > >> > >> > >> BuildResourceDescriptorHob ( > >> > >> -- > >> 2.27.0 > >> > >> > >> -=3D-=3D-=3D-=3D-=3D-=3D > >> Groups.io Links: You receive all messages sent to this group. > >> > >> View/Reply Online (#62229): > https://edk2.groups.io/g/devel/message/62229 > >> Mute This Topic: https://groups.io/mt/75374752/1781375 > >> Group Owner: devel+owner@edk2.groups.io devel%2Bowner@edk2.groups.io> > >> Unsubscribe: https://edk2.groups.io/g/devel/unsub [guo.dong@intel.co= m > ] > >> -=3D-=3D-=3D-=3D-=3D-=3D > > > > > > -- > > [Marcello Sylvester Bauer] > > > > [http://static.9elements.com/logo-signature.png] > > 9elements Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany > > Email: [DEINE EMAIL ADDRESSE]< > https://static.9elements.com/email_signatur.html> > > Phone: +49 234 68 94 188 > > Mobile: +49 1722847618 > > > > Sitz der Gesellschaft: Bochum > > Handelsregister: Amtsgericht Bochum, HRB 17519 > > Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar > > > > Datenschutzhinweise nach Art. 13 DSGVO > > > >=20 > > > > --=20 *[Marcello Sylvester Bauer]* 9elements Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany Email: [DEINE EMAIL ADDRESSE] Phone: *+49 234 68 94 188 <+492346894188>* Mobile: *+49 1722847618 <+491722847618>* Sitz der Gesellschaft: Bochum Handelsregister: Amtsgericht Bochum, HRB 17519 Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar Datenschutzhinweise nach Art. 13 DSGVO --000000000000a452f805b0ee376b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Oct 1, 2020 at 12:24 PM Laszl= o Ersek <lersek@redhat.com> = wrote:
On 09/14/= 20 19:32, Guo Dong wrote:
>
> OK. Let me merge this patch firstly. /Guo

The PR at <https://github.com/tianocore/edk2/pull/9= 24> failed 17 days
ago and there have been no updates since, as far as I can tell. I've closed the PR for now.

Thanks
Laszlo

"Mergify / Rule: Automatically merge a PR when all= required checks pass and 'push' label is present (merge)" is<= br>the only that failed, because mergify thinks it has no rights to update = the base branch (tianocore/master).
I don't understand why. What sho= uld I do?

Thanks
Marcello
>
> From: Marcello Sylvester Bauer <marcello.bauer@9elements.com>
> Sent: Monday, September 14, 2020 2:00 AM
> To: Dong, Guo <guo.dong@intel.com>
> Cc: devel@e= dk2.groups.io; Ma, Maurice <maurice.ma@intel.com>; Desimone, Nathaniel L <<= a href=3D"mailto:nathaniel.l.desimone@intel.com" target=3D"_blank">nathanie= l.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: Re: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect core= boot tables
>
> Hi Guo,
>
> Sounds like a good proposal, but it would be great to merge this chan= ge temporarily.
> In some cases of the current implementation edk2 does override the me= mory area, where the coreboot table pointer is located.
> Therefore the kernel and cbmem tool is not able to locate the tables = anymore.
>
> Thanks,
> Marcello
>
> On Tue, Sep 8, 2020 at 11:40 PM Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>= ;> wrote:
>
> Hi Marcello,
>
> In the UEFI payload, we should not hardcoded any memory usage. It mea= ns UEFI payload should use the memory map whatever reported from the bootlo= ader. I plan to remove this hardcoded memory usage soon.
> Before that, it is OK for me to merge this change if you want.
> BTW, did you see any issue with current implement?
>
> Thanks,
> Guo
>
>> -----Original Message-----
>> From: d= evel@edk2.groups.io<mailto:devel@edk2.groups.io> <devel@edk2.groups.io<mailto:devel@edk2.groups.io>> On Behalf Of Marcello
>> Sylvester Bauer
>> Sent: Wednesday, July 8, 2020 5:01 AM
>> To:
dev= el@edk2.groups.io<mailto:devel@edk2.groups.io>
>> Cc: Ma, Maurice <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>; Desimone, = Nathaniel L
>> <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.desimone@intel.com= >>; Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>
>> Subject: [edk2-devel] [PATCH v1 1/1] UefipayloadPkg: Protect core= boot tables
>>
>> From: Patrick Rudolph <patrick.rudolph@9elements.com<mailto:patrick.rud= olph@9elements.com>>
>>
>> Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com<m= ailto:pa= trick.rudolph@9elements.com>>
>> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@9elements.com<mailto:marcello.bauer@9elements.com>>
>> Cc: Maurice Ma <maurice.ma@intel.com<mailto:maurice.ma@intel.com>>
>> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com<mailto:nathaniel.l.= desimone@intel.com>>
>> Cc: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>
>> ---
>>=C2=A0 UefiPayloadPkg/BlSupportPei/BlSupportPei.c | 26 +++++++++++= +++------
>>=C2=A0 1 file changed, 19 insertions(+), 7 deletions(-)
>>
>> diff --git a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> index 22972453117a..b3ff065a537e 100644
>> --- a/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> +++ b/UefiPayloadPkg/BlSupportPei/BlSupportPei.c
>> @@ -390,24 +390,36 @@ BlPeiEntryPoint (
>>=C2=A0 =C2=A0 EFI_PEI_GRAPHICS_DEVICE_INFO_HOB GfxDeviceInfo;
>>
>>=C2=A0 =C2=A0 EFI_PEI_GRAPHICS_DEVICE_INFO_HOB *NewGfxDeviceInfo;<= br> >>
>>
>>
>> -
>>
>> -=C2=A0 //
>>
>> -=C2=A0 // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTR= IBUTE_TESTED
>>
>> -=C2=A0 // is intentionally omitted to prevent erasing of the cor= eboot header
>>
>> -=C2=A0 // record before it is processed by ParseMemoryInfo.
>>
>> +=C2=A0 // Report lower 640KB of RAM.
>>
>> +=C2=A0 // Mark memory as reserved to keep coreboot header in pla= ce.
>>
>>=C2=A0 =C2=A0 //
>>
>>=C2=A0 =C2=A0 BuildResourceDescriptorHob (
>>
>> -=C2=A0 =C2=A0 EFI_RESOURCE_SYSTEM_MEMORY,
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_MEMORY_RESERVED,
>>
>>=C2=A0 =C2=A0 =C2=A0 (
>>
>>=C2=A0 =C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_PRESENT |
>>
>>=C2=A0 =C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_TESTED |
>>
>>=C2=A0 =C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>>
>>=C2=A0 =C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | >>
>>=C2=A0 =C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABL= E |
>>
>>=C2=A0 =C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE >>
>>=C2=A0 =C2=A0 =C2=A0 ),
>>
>>=C2=A0 =C2=A0 =C2=A0 (EFI_PHYSICAL_ADDRESS)(0),
>>
>> -=C2=A0 =C2=A0 (UINT64)(0xA0000)
>>
>> +=C2=A0 =C2=A0 (UINT64)(0x1000)
>>
>> +=C2=A0 =C2=A0 );
>>
>> +
>>
>> +=C2=A0 BuildResourceDescriptorHob (
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_SYSTEM_MEMORY,
>>
>> +=C2=A0 =C2=A0 (
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_PRESENT |
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
>>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | >>
>> +=C2=A0 =C2=A0 EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE
>>
>> +=C2=A0 =C2=A0 ),
>>
>> +=C2=A0 =C2=A0 (EFI_PHYSICAL_ADDRESS)(0x1000),
>>
>> +=C2=A0 =C2=A0 (UINT64)(0x9F000)
>>
>>=C2=A0 =C2=A0 =C2=A0 );
>>
>>
>>
>>=C2=A0 =C2=A0 BuildResourceDescriptorHob (
>>
>> --
>> 2.27.0
>>
>>
>> -=3D-=3D-=3D-=3D-=3D-=3D
>> Groups.io Links: You receive all messages sent to this group.
>>
>> View/Reply Online (#62229): https://edk2.group= s.io/g/devel/message/62229
>> Mute This Topic: https://groups.io/mt/75374752/178137= 5
>> Group Owner: devel+owner@edk2.groups.io<mailto:devel%2Bowner@edk2.groups.i= o>
>> Unsubscribe: https://edk2.groups.io/g/devel/unsub= = =C2=A0 [guo.dong@i= ntel.com<mailto:guo.dong@intel.com>]
>> -=3D-=3D-=3D-=3D-=3D-=3D
>
>
> --
> [Marcello Sylvester Bauer]
>
> [http://static.9elements.com/logo-signature.png<= /a>]
> 9elements Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany=
> Email:=C2=A0 [DEINE EMAIL ADDRESSE]<
https:/= /static.9elements.com/email_signatur.html>
> Phone:=C2=A0 +49 234 68 94 188<tel:+492346894188>
> Mobile:=C2=A0 +49 1722847618<tel:+491722847618>
>
> Sitz der Gesellschaft: Bochum
> Handelsregister: Amtsgericht Bochum, HRB 17519
> Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, Eray Basar
>
> Datenschutzhinweise nach Art. 13 DSGVO<https://9elements.com/p= rivacy>
>
>
>



--
= [Marcello Sylvester Bauer]=C2=A0



9element= s Agency GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany=
Email:=C2=A0=C2=A0[DEINE EMAIL ADDRESSE]
Phone:=C2=A0=C2=A0+49 234 68 94 188
Mobile:=C2=A0=C2=A0+49 1722847618

Sit= z der Gesellschaft: Bochum
Handelsregister: Amtsgericht Bochum, HRB 17519
Gesch=C3=A4ftsf=C3=BChrung: Sebastian Deutsch, = Eray Basar
--000000000000a452f805b0ee376b--