[edk2-devel] Edk2 support MIPI SyS-T TraceHub Debug Library [TraceHubDebugLibSysT]

2022-11-22 Thread Guo, Gua
@Kinney, Michael D and @gaoliming We want to add TraceHubDebug library support on Edk2. It's new added library on Edk2, so it doesn't have any backward and forward issue. May I know have any process we may need to follow up. Ha

Re: [edk2-devel] [PATCH 1/3] CloudHv:arm: add kernel load fs driver

2022-11-22 Thread Jianyong Wu
Hi Sami, You can try it as following steps: 1. build edk2 for CLOUDHv from https://github.com/jongwu/edk2/tree/direct_kernel 2. build cloud hypervisor with my patch set from https://github.com/jongwu/cloud-hypervisor/tree/direct_kernel a. install rust environment, see https://www.rust-la

Re: [edk2-devel] [PATCH 3/3] CloudHv:arm: add kernel load driver into dsc/fdf

2022-11-22 Thread Jianyong Wu
Hi Sami, Inline reply From: Sami Mujawar Sent: Tuesday, November 22, 2022 11:48 PM To: Jianyong Wu ; devel@edk2.groups.io Cc: ardb+tianoc...@kernel.org; Justin He ; nd Subject: Re: [PATCH 3/3] CloudHv:arm: add kernel load driver into dsc/fdf Hi Jianyong, Please find my response inline marked

Re: [edk2-devel] [PATCH V1 0/5] Use CcExitLib instead of VmgExitLib in edk2-platforms

2022-11-22 Thread Michael D Kinney
Pushed 1e1e35bb3b..4ad557e494 Mike > -Original Message- > From: Kinney, Michael D > Sent: Tuesday, November 22, 2022 8:02 PM > To: devel@edk2.groups.io; Xu, Min M ; Kinney, Michael D > > Cc: Chiu, Chasel ; Desimone, Nathaniel L > ; Oram, Isaac W > ; Gao, Liming ; Yao, Jiewen > ; Don

Re: [edk2-devel] [PATCH V1 0/5] Use CcExitLib instead of VmgExitLib in edk2-platforms

2022-11-22 Thread Michael D Kinney
Series Reviewed-by: Michael D Kinney > -Original Message- > From: devel@edk2.groups.io On Behalf Of Min Xu > Sent: Thursday, November 17, 2022 11:57 PM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Chiu, Chasel ; > Desimone, Nathaniel L > ; Oram, Isaac W ; > Gao, Liming ; Yao, Jiewen >

Re: [edk2-devel] [PATCH 2/3] CloudHv:arm: build hob for kernel image memory as read-only

2022-11-22 Thread Jianyong Wu
Hi Sami, Inline reply. > -Original Message- > From: Sami Mujawar > Sent: Tuesday, November 22, 2022 11:48 PM > To: Jianyong Wu ; devel@edk2.groups.io > Cc: ardb+tianoc...@kernel.org; Justin He ; nd > > Subject: Re: [PATCH 2/3] CloudHv:arm: build hob for kernel image memory as > read-on

Re: [edk2-devel] [PATCH] edk II C Coding Standard: Remove section 5.4.2.2 STATIC

2022-11-22 Thread Michael D Kinney
Hi Pedro, CONST and VOID are defined in Section 2.3 of the UEFI Specification. So we need to keep them to consume .h files based on UEF Spec contents. STATIC is not part of any industry standard spec. Mike From: Pedro Falcato Sent: Tuesday, November 22, 2022 2:12 PM To: devel@edk2.groups.io;

[edk2-devel] [PATCH v4 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Pedro Falcato
RDRAND has notoriously been broken many times over its lifespan. Add a smoketest to RDRAND, in order to better sniff out potential security concerns. Also add a proper CPUID test in order to support older CPUs which may not have it; it was previously being tested but then promptly ignored. Testin

Re: [edk2-devel] [PATCH] edk II C Coding Standard: Remove section 5.4.2.2 STATIC

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 6:10 PM Michael D Kinney wrote: > Hi Abner, > > Removing that section 5.4.2.2 is required to close this bug. > > Meaning of 'static' is covered by the ANSI C standards. > Mike, Sorry for spinning off a bit, but if we're dropping STATIC, can we also drop the other defines

[edk2-devel] [PATCH v3 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Pedro Falcato
RDRAND has notoriously been broken many times over its lifespan. Add a smoketest to RDRAND, in order to better sniff out potential security concerns. Also add a proper CPUID test in order to support older CPUs which may not have it; it was previously being tested but then promptly ignored. Testin

Re: [edk2-devel] [PATCH] edk II C Coding Standard: Remove section 5.4.2.2 STATIC

2022-11-22 Thread Michael D Kinney
Hi Abner, Removing that section 5.4.2.2 is required to close this bug. Meaning of 'static' is covered by the ANSI C standards. Use of 'static' for non-public variable/functions in EDK II libraries/modules is recommended. However, it is not required. It is recommended to reduce chances of symbo

Re: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Michael D Kinney
Hi Pedro, Pointers to external content that were used to create the code change can be captured in the BZ and the commit message. Thanks, Mike From: devel@edk2.groups.io On Behalf Of Pedro Falcato Sent: Tuesday, November 22, 2022 7:56 AM To: Jason A. Donenfeld Cc: devel@edk2.groups.io; Kinney

Re: [edk2-devel] [PATCH] Multiple Coverity issues were found from EDK2 ShellPkg

2022-11-22 Thread Michael D Kinney
Hi Kalaivani, The file header updates do not match EDK II requirements. No issues with adding a copyright statement in the existing EDK II file header. References to "AMI licensing agreement" cannot be accepted. Contributions to these files must be under the existing license: SPDX-License-Ide

Re: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Jason A. Donenfeld via groups.io
On Tue, Nov 22, 2022 at 4:56 PM Pedro Falcato wrote: > > On Tue, Nov 22, 2022 at 3:39 PM Jason A. Donenfeld wrote: >> >> On Tue, Nov 22, 2022 at 4:32 PM Pedro Falcato >> wrote: >> > + // Testing algorithm inspired by linux's >> > arch/x86/kernel/cpu/rdrand.c:x86_init_rdrand >> > + // as reli

Re: [edk2-devel] edksetup.sh: fix for non POSIX whereis(1)

2022-11-22 Thread tlaronde
Le Tue, Nov 22, 2022 at 04:31:14PM +, Pedro Falcato a écrit : > On Tue, Nov 22, 2022 at 4:26 PM wrote: > > > Le Tue, Nov 22, 2022 at 08:40:30AM -0700, Rebecca Cran a écrit : > > > On 11/21/22 15:22, Pedro Falcato wrote: > > > > > > > I kind of dislike your solution. Does NetBSD ship /bin/whic

Re: [edk2-devel] edksetup.sh: fix for non POSIX whereis(1)

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 4:26 PM wrote: > Le Tue, Nov 22, 2022 at 08:40:30AM -0700, Rebecca Cran a écrit : > > On 11/21/22 15:22, Pedro Falcato wrote: > > > > > I kind of dislike your solution. Does NetBSD ship /bin/which by > default? > > > I think replacing whereis with "which -a" would be a lot

Re: [edk2-devel] edksetup.sh: fix for non POSIX whereis(1)

2022-11-22 Thread tlaronde
Le Tue, Nov 22, 2022 at 08:40:30AM -0700, Rebecca Cran a écrit : > On 11/21/22 15:22, Pedro Falcato wrote: > > > I kind of dislike your solution. Does NetBSD ship /bin/which by default? > > I think replacing whereis with "which -a" would be a lot better. > > I don't think there's a 100% standard w

Re: [edk2-devel] edksetup.sh: fix for non POSIX whereis(1)

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 3:40 PM Rebecca Cran wrote: > On 11/21/22 15:22, Pedro Falcato wrote: > > > I kind of dislike your solution. Does NetBSD ship /bin/which by default? > > I think replacing whereis with "which -a" would be a lot better. > > I don't think there's a 100% standard way to do thi

Re: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 3:39 PM Jason A. Donenfeld wrote: > On Tue, Nov 22, 2022 at 4:32 PM Pedro Falcato > wrote: > > + // Testing algorithm inspired by linux's > arch/x86/kernel/cpu/rdrand.c:x86_init_rdrand > > + // as relicensed by the author, Jason Donenfeld, in the EDK2 mailing > list. >

Re: [edk2-devel] [PATCH 3/3] CloudHv:arm: add kernel load driver into dsc/fdf

2022-11-22 Thread Sami Mujawar
Hi Jianyong, Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 16/09/2022 03:46 am, Jianyong Wu wrote: As CloudHv kernel load fs driver is implemented, add it into dsc/fdf. Signed-off-by: Jianyong Wu --- ArmVirtPkg/ArmVirtCloudHv.dsc | 8 +++

Re: [edk2-devel] [PATCH 2/3] CloudHv:arm: build hob for kernel image memory as read-only

2022-11-22 Thread Sami Mujawar
Hi Jianyong, Please see my feedback marked inline as [SAMI]. Regards, Sami Mujawar On 16/09/2022 03:46 am, Jianyong Wu wrote: As we use memory to pass kernel image, the memory region where kernel image locates should be added into hob as read-only. Signed-off-by: Jianyong Wu --- .../Cloud

Re: [edk2-devel] [PATCH 1/3] CloudHv:arm: add kernel load fs driver

2022-11-22 Thread Sami Mujawar
Hi Jianyoung, I am trying to understand your patch series. Is it possible to send me the steps to test your patches using CloudHv, please? Also, please see my response for patch 2/3 as I have some queries. Regards, Sami Mujawar On 16/09/2022 03:46 am, Jianyong Wu wrote: This is used for s

Re: [edk2-devel] [PATCH 1/3] CloudHv:arm: add kernel load fs driver

2022-11-22 Thread Sami Mujawar
Hi Jianyoung, I am trying to understand your patch series. Is it possible to send me the steps to test your patches using CloudHv, please? Also, please see my response for patch 2/3 as I have some queries. Regards, Sami Mujawar On 16/09/2022 03:46 am, Jianyong Wu wrote: This is used for s

Re: [edk2-devel] edksetup.sh: fix for non POSIX whereis(1)

2022-11-22 Thread Rebecca Cran
On 11/21/22 15:22, Pedro Falcato wrote: I kind of dislike your solution. Does NetBSD ship /bin/which by default? I think replacing whereis with "which -a" would be a lot better. I don't think there's a 100% standard way to do this in POSIX, as which isn't POSIX either, and your solution seems..

Re: [edk2-devel] [PATCH v2 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Jason A. Donenfeld via groups.io
On Tue, Nov 22, 2022 at 4:32 PM Pedro Falcato wrote: > + // Testing algorithm inspired by linux's > arch/x86/kernel/cpu/rdrand.c:x86_init_rdrand > + // as relicensed by the author, Jason Donenfeld, in the EDK2 mailing list. > + // As is, the algorithm samples rdrand $RDRAND_TEST_SAMPLES times

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Jason A. Donenfeld via groups.io
Hi again, On Tue, Nov 22, 2022 at 11:35:06AM +, Pedro Falcato wrote: > We should probably also test for stupidly broken rdrand implementations > like the notorious Zen 3 which always return 0x (per xkcd 221 ;)). On this topic, if you did want to improve this part of that DXE, the kern

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Jason A. Donenfeld via groups.io
Hi, On Tue, Nov 22, 2022 at 3:17 PM Pedro Falcato wrote: > I have sent out a patch (https://edk2.groups.io/g/devel/message/96552) fixing > the CPUID checks with a naive attempt to sniff out RDRAND issues. > Your Linux snippet is probably better but I couldn't look at it due to > licensing conce

[edk2-devel] [PATCH] Multiple Coverity issues were found from EDK2 ShellPkg

2022-11-22 Thread Kalaivani P via groups.io
Attached is the report for Coverity issues identified in ShellPkg based on edk2-stable202205. Cc: Vasudevan Sambandan Cc: Sundaresan Selvaraj Cc: Arun k Signed-off-by: kalaivani P --- ShellPkg/Application/Shell/ShellManParser.c | 14 - ShellPkg/Application/Shell/ShellProtocol.

Re: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Jason A. Donenfeld via groups.io
Hi, On Tue, Nov 22, 2022 at 02:01:21PM +, Pedro Falcato wrote: > RDRAND has notoriously been broken many times over its lifespan. > Add a smoketest to RDRAND, in order to better sniff out potential > security concerns. > > Also add a proper CPUID test in order to support older CPUs which may

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Jason A. Donenfeld via groups.io
Hi Pedro, On 11/22/22, Pedro Falcato wrote: > I am aware, but I'm more scared when it comes to very early boot (think > linux's EFI stub or some other bootloader) I can see how > an ill-advised RNG_PROTOCOL user can try to exclusively rely on it (if it's > available, which I don't believe it is a

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Jason A. Donenfeld via groups.io
Hi Pedro, On Tue, Nov 22, 2022 at 12:35 PM Pedro Falcato wrote: > Given this patch plus the corresponding linux-efi patches wrt RNG, I'm > mildly concerned about buggy RDRAND implementations compromising the > kernel's RNG. Is this not a concern? Speaking with my kernel RNG maintainer hat on, no

Re: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 2:19 PM Jason A. Donenfeld wrote: > Considering our discussion an hour ago, I would have appreciated you > CC'ing me. I'm not subscribed to this list, and it's not on lore, so > this is a bit of a PITA to subscribe to. > Sorry about that, Cc'd you on v2. Pedro -=-=-=-=

[edk2-devel] [PATCH v2 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Pedro Falcato
RDRAND has notoriously been broken many times over its lifespan. Add a smoketest to RDRAND, in order to better sniff out potential security concerns. Also add a proper CPUID test in order to support older CPUs which may not have it; it was previously being tested but then promptly ignored. Many t

Re: [edk2-devel] [PATCH V1 1/1] UefiCpuPkg: Add back VmgExitLib to fix downstream incompatibility issue

2022-11-22 Thread Yao, Jiewen
Can we put this patch to downstream directly? Why it must be upstream? > -Original Message- > From: Xu, Min M > Sent: Tuesday, November 22, 2022 10:17 PM > To: devel@edk2.groups.io > Cc: Xu, Min M ; Dong, Eric ; > Ni, Ray ; Kinney, Michael D > ; Yao, Jiewen ; > Huang, Yanbo > Subject: [

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 1:10 PM Jason A. Donenfeld wrote: > Yes. If what you say is true, this should be fixed asap. Do you intend > to send a patch? > I have sent out a patch (https://edk2.groups.io/g/devel/message/96552) fixing the CPUID checks with a naive attempt to sniff out RDRAND issues.

[edk2-devel] [PATCH V1 1/1] UefiCpuPkg: Add back VmgExitLib to fix downstream incompatibility issue

2022-11-22 Thread Min Xu
From: Min M Xu VmgExitLib is renamed as CcExitLib in commit a89f558d3c. This brought incompatibility issues for platforms downstream. This patch adds back VmgExitLib (VmgExitLib.h & VmgExitLibNull) to fix the issue this time and we will work out the long term solution later. After the incompatibi

[edk2-devel] [PATCH 1/1] MdePkg/BaseRngLib: Add a smoketest for RDRAND and check CPUID

2022-11-22 Thread Pedro Falcato
RDRAND has notoriously been broken many times over its lifespan. Add a smoketest to RDRAND, in order to better sniff out potential security concerns. Also add a proper CPUID test in order to support older CPUs which may not have it; it was previously being tested but then promptly ignored. Signed

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Pedro Falcato
On Tue, Nov 22, 2022 at 12:20 PM Jason A. Donenfeld wrote: > Hi Pedro, > > On Tue, Nov 22, 2022 at 12:35 PM Pedro Falcato > wrote: > > Given this patch plus the corresponding linux-efi patches wrt RNG, I'm > > mildly concerned about buggy RDRAND implementations compromising the > > kernel's RNG.

[edk2-devel] [PATCH 3/3] .azurepipelines: Expand PlatformCI template for Shell UnitTest

2022-11-22 Thread duntan
Expand PlatformCI build and run steps template for Shell UnitTest. Add a new parameter unit_test_list to support building and running specific Shell UnitTest modules. In stuart_pr_eval step, if the unit_test_list passed from platform yml file is not null, it will select some packages from the pack

[edk2-devel] [PATCH 2/3] OvmfPkg/PlatformCI: Add new JOB in .yml of OvmfPkg PlatformCI

2022-11-22 Thread duntan
Add new job like OVMF_X64_DEBUG_UNIT_TEST in OvmfPkg PlatformCI .yml file. New parameter unit_test_list is used to specify Shell Unit Test list which needs to build and run. Format for this input should be:'-u ModulePath1:DscPath1,ModulePath2:DscPath2' or '-u ModulePath1:DscPath1 -u ModulePath2:Dsc

[edk2-devel] [PATCH 1/3] OvmfPkg/PlatformCI: Expand Ovmf PlatformCI for Shell UnitTest

2022-11-22 Thread duntan
Expand Ovmf PlatformBuild.py and PlatformBuildLib.py to support building and running specific Shell target UnitTest modules. In the new CommonPlatform class: It provides new class attributes and new methods to support build and run specific Shell Unit Test modules. In the new SettingsManager class

[edk2-devel] [PATCH 0/3] Expand Ovmf PlatformCI to enable CI for Shell UnitTest

2022-11-22 Thread duntan
OvmfPkg/PlatformCI: Expand Ovmf PlatformCI python files for Shell UnitTest OvmfPkg/PlatformCI: Add new JOB in .yml of OvmfPkg PlatformCI yml files .azurepipelines: Expand PlatformCI template yml files for Shell UnitTest Dun Tan (3): OvmfPkg/PlatformCI: Expand Ovmf PlatformCI for Shell UnitTest

Re: [edk2-devel] [PATCH 3/3] OvmfPkg/OvmfX86: Enable RDRAND based EFI_RNG_PROTOCOL implementation

2022-11-22 Thread Pedro Falcato
Hi Ard, Given this patch plus the corresponding linux-efi patches wrt RNG, I'm mildly concerned about buggy RDRAND implementations compromising the kernel's RNG. Is this not a concern? It's also worth noting that MdePkg/Library/BaseRngLib skips the CPUID bit check in ArchIsRngSupported for $REASO

回复: [edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, November 22, 2022 #cal-reminder

2022-11-22 Thread gaoliming via groups.io
Few issues are reported this week. Let’s cancel this week meeting. Thanks Liming 发件人: devel@edk2.groups.io 代表 Group Notification 发送时间: 2022年11月22日 10:30 收件人: devel@edk2.groups.io 主题: [edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, November 22, 2022 #cal-reminder Remin

Re: [edk2-devel] EmulatorPkg: fixes for NetBSD compilation

2022-11-22 Thread tlaronde
Hello Pedro, Le Mon, Nov 21, 2022 at 10:32:51PM +, Pedro Falcato a écrit : > On Mon, Nov 21, 2022 at 9:21 PM wrote: > > > diff --git a/EmulatorPkg/Unix/Host/BlockIo.c > > b/EmulatorPkg/Unix/Host/BlockIo.c > > index cf2d6b4cda..c0c694be55 100644 > > --- a/EmulatorPkg/Unix/Host/BlockIo.c > > +

Re: [edk2-devel] edksetup.sh: fix for non POSIX whereis(1)

2022-11-22 Thread tlaronde
Hello Pedro, Le Mon, Nov 21, 2022 at 10:22:21PM +, Pedro Falcato a écrit : > On Mon, Nov 21, 2022 at 9:21 PM wrote: > > > diff --git a/edksetup.sh b/edksetup.sh > > index 06d2f041e6..46b295c430 100755 > > --- a/edksetup.sh > > +++ b/edksetup.sh > > @@ -105,6 +105,19 @@ function SetupEnv() >

Re: [edk2-devel] [PATCH v5 19/19] SecurityPkg: Add references to new *.inf files

2022-11-22 Thread Wang, Jian J
Reviewed-by: Jian J Wang Regards, Jian > -Original Message- > From: Vang, Judah > Sent: Sunday, November 06, 2022 3:35 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Yao, Jiewen ; > Mistry, Nishant C > Subject: [PATCH v5 19/19] SecurityPkg: Add references to new *.inf files > >