Re: [edk2-devel] [PATCH] ShellPkg/AcpiView: ERST Parser

2023-01-27 Thread Gao, Zhichao
Can you share then code change link of your personal repo? The patch I download from this email cannot apply to the open source branch. Thanks, Zhichao > -Original Message- > From: devel@edk2.groups.io On Behalf Of Jeshua > Smith via groups.io > Sent: Wednesday, January 25, 2023 4:55 AM

Re: [edk2-devel] [PATCH v1 0/4] Don't require self-signed PK in setup mode

2023-01-27 Thread Sean
Did i mention how much i hate reviewing code over email?  :) Even after looking at it a few times I missed that change. I think this change looks fine.  Personally, i think this code has terrible readability and high complexity and with high impact.  It would be great to at least get unit test

[edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: StandaloneMmMemLib: Change max address computation

2023-01-27 Thread Girish Mahadevan via groups.io
Currently the standalonemmlibinternal assumes the max physical bits to be 36 which is causing issues on v8 architectures. Instead use the MAX_ADDRESS macro to determine the maximum allowed address rather than recomputing it locally. Signed-off-by: Girish Mahadevan --- .../ArmStandaloneMmMemLibIn

Re: [edk2-devel] [PATCH 2/2] DynamicTablesPkg: Add Smbios Type17 Table generator

2023-01-27 Thread Girish Mahadevan via groups.io
Hi Sami Sorry for the long silence. I've sent you v2 of the patch (only framework not the Type17) which includes a link to a github branch. Few more comments inline , prefixed by [GM]. Best Regards Girish On 10/18/2022 9:36 AM, Sami Mujawar via groups.io wrote: *External email: Use caution

Re: [edk2-devel] [PATCH] MdeModulePkg: Correct memory type in PrePiDxeCis.h

2023-01-27 Thread Dionna Glaze via groups.io
> BTW, you need to add below guys in the CC list because they're the > reviewers/maintainers of the pkgs. > > MdePkg: > M: Michael D Kinney [mdkinney] > M: Liming Gao [lgao4] > R: Zhiguang Liu [LiuZhiguang001] > > MdeModulePkg > M: Jian J Wang [jwang36] > M: Liming Gao [lgao4] > CC'd, thanks

[edk2-devel] [PATCH v2 1/1] DynamicTablesPkg: Add SMBIOS table generation

2023-01-27 Thread Girish Mahadevan via groups.io
Add the SMBIOS Table generator code to the DynamicTablesPkg. This change includes adding new logic to the DynamicTableManager to process and add SMBIOS tables and augmenting the existing SMBIOS Factory generator to include installing multiple SMBIOS tables . Also included is running the SMBIOS and

Re: [edk2-devel] [PATCH] MdeModulePkg: Correct memory type in PrePiDxeCis.h

2023-01-27 Thread Min Xu
On January 28, 2023 3:21 AM, Dionna Glaze wrote: > The enumeration in MdePkg/Include/Pi/PiDxeCis.h has a duplicated entry, so > the 8th position in the list doesn't count as index 7. The value > EfiGcdMemoryTypeUnaccepted will have when added before > EfiGcdMemoryTypeMaximum will be 6. > > Cc: Min

Re: [edk2-devel] [PATCH v1 0/4] Don't require self-signed PK in setup mode

2023-01-27 Thread Jan Bobek via groups.io
> I read your replacement a little different. > > - if ((InCustomMode () && UserPhysicalPresent ()) || ((mPlatformMode == > SETUP_MODE) && !IsPk)) { > > with > > + if ( (InCustomMode () && UserPhysicalPresent ()) > + || ( (mPlatformMode == SETUP_MODE) > +&& !(FeaturePcdGet (PcdRequ

Re: [edk2-devel] [PATCH v1 0/4] Don't require self-signed PK in setup mode

2023-01-27 Thread Sean
I read your replacement a little different. - if ((InCustomMode () && UserPhysicalPresent ()) || ((mPlatformMode == SETUP_MODE) && !IsPk)) { with + if ( (InCustomMode () && UserPhysicalPresent ()) + || ( (mPlatformMode == SETUP_MODE) +&& !(FeaturePcdGet (PcdRequireSelfSignedPk)

[edk2-devel] [PATCH v1] uefi-sct: move Maintainers.txt to top level directory

2023-01-27 Thread Abhimanyu Singh
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4327 Maintainers.txt has been moved from under uefi-sct/ to the top level directory. This is consistent with other TianoCore repos in which Maintainers.txt is in the top level directory. Now under edk2-test/ Cc: G Edhaya Chandran Cc: Barton Gao

[edk2-devel] [PATCH] MdeModulePkg: Correct memory type in PrePiDxeCis.h

2023-01-27 Thread Dionna Glaze via groups.io
The enumeration in MdePkg/Include/Pi/PiDxeCis.h has a duplicated entry, so the 8th position in the list doesn't count as index 7. The value EfiGcdMemoryTypeUnaccepted will have when added before EfiGcdMemoryTypeMaximum will be 6. Cc: Min M Xu Cc: Jiewen Yao Signed-off-by: Dionna Glaze --- Mde

[edk2-devel] Minor bug: off-by-one in mGcdMemoryTypeNames for "Unaccepte" entry

2023-01-27 Thread Dionna Glaze via groups.io
I was debugging some stuff with unaccepted memory, and noticed that AddMemorySpace counted the unaccepted memory as "Unknown" because "Unaccepte" is mGcdMemoryTypeNames[6] instead of mGcdMemoryTypeNames[7]. https://github.com/tianocore/edk2/blob/720c25ab41400f9a3dfd0742da5a6d237991df5b/MdeModulePk

[edk2-devel] Too little and too quick UEFI HTTPv6 error messages

2023-01-27 Thread Luiz Angelo Daros de Luca
Hello, I'm not an UEFI dev but a sysadm using UEFI to netboot using PXE/HTTP IPv4/IPv6. It took a lot of time for me to discover why the firmware was failing to accept the URL offered by the DHCPv6 server. I only got this pretty quick message: "Error: Could not retrieve NBP file size from HTTP se

[edk2-devel] [PATCH] ArmPkg/DefaultExceptionHandler: Dump ESR and FAR in RELEASE builds

2023-01-27 Thread Ard Biesheuvel
In RELEASE builds, the AArch64 default exception handler only dumps the exception type and the ELR, which is the value of the program counter when the exception was taken. Given that DXE phase drivers are loaded dynamically at arbitrary addresses, this is probably the least useful bit of informatio

Re: [edk2-devel] [PATCH 1/1 v3] EmulatorPkg: fixes for NetBSD compilation

2023-01-27 Thread Pedro Falcato
(+cc Mike Kinney) On Fri, Jan 27, 2023 at 5:30 PM Pedro Falcato via groups.io wrote: > > On Mon, Jan 9, 2023 at 5:03 PM wrote: > > > > EmulatorPkg: fixes for NetBSD compilation. > > > > Note: generated against today (2023-01-09) master. > > > > v3: > > - Macro __NetBSD__ used instead of lower le

Re: [edk2-devel] [PATCH 1/1 v3] EmulatorPkg: fixes for NetBSD compilation

2023-01-27 Thread Pedro Falcato
On Mon, Jan 9, 2023 at 5:03 PM wrote: > > EmulatorPkg: fixes for NetBSD compilation. > > Note: generated against today (2023-01-09) master. > > v3: > - Macro __NetBSD__ used instead of lower level _NETBSD_SOURCE; > - The required fd value (-1) for mmap(3) under *BSD is given as is > with a comme

Re: [edk2-devel] [PATCH v2 0/4] BaseTools,ArmPkg,ArmVirtPkg: Remove leftover RVCT and RealView Debugger support

2023-01-27 Thread Ard Biesheuvel
On Fri, 27 Jan 2023 at 18:14, Michael D Kinney wrote: > > Hi Ard, > > Acked-by: Michael D Kinney > > I have no objections. Bob may not be online until early next week. > Thanks, There is no rush - this is just janitorial stuff so I'm happy to wait a couple of days. -=-=-=-=-=-=-=-=-=-=-=- Gr

[edk2-devel] PING [PATCH 1/1 v3] EmulatorPkg: fixes for NetBSD compilation

2023-01-27 Thread tlaro...@polynum.com
Hello, Could I have a statement about this patch? ACK, NACK, DROPPED, IGNORED or whatever? TIA Le Mon, Jan 09, 2023 at 06:03:38PM +0100, tlaro...@polynum.com a écrit : > EmulatorPkg: fixes for NetBSD compilation. > > Note: generated against today (2023-01-09) master. > > v3: > - Macro __NetBSD

Re: [edk2-devel] [PATCH v2 0/4] BaseTools,ArmPkg,ArmVirtPkg: Remove leftover RVCT and RealView Debugger support

2023-01-27 Thread Michael D Kinney
Hi Ard, Acked-by: Michael D Kinney I have no objections. Bob may not be online until early next week. Mike > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ard Biesheuvel > Sent: Friday, January 27, 2023 9:00 AM > To: devel@edk2.groups.io; rebe...@bsdio.com; Gao, Limi

Re: [edk2-devel] [PATCH v2 0/4] BaseTools,ArmPkg,ArmVirtPkg: Remove leftover RVCT and RealView Debugger support

2023-01-27 Thread Ard Biesheuvel
On Fri, 27 Jan 2023 at 17:43, Rebecca Cran wrote: > > Personal PR: https://github.com/tianocore/edk2/pull/3958 > > Changes from v1 to v2: > > Removed reference to CYGWIN_NT-5.1-i686 from Scripts/PatchCheck.py > Removed RealView Debugger support and references. > > Rebecca Cran (4): > BaseTools:

Re: [edk2-devel] [PATCH 1/1] BaseTools: Delete Bin/{CYGWIN_NT-5.1-i686,Darwin-i386} directories

2023-01-27 Thread Rebecca Cran
On 1/27/23 06:56, Ard Biesheuvel wrote: Acked-by: Ard Biesheuvel Could you please get rid of the reference below as well? Thanks BaseTools/Scripts/PatchCheck.py:369: self.filename.startswith('BaseTools/Bin/CYGWIN_NT-5.1-i686/') or \ Thanks. I've sent out a v2 patch series "BaseTools,ArmPkg,

Re: [edk2-devel] [PATCH v2 4/4] ArmVirtPkg: Remove RealView Debugger lines from ArmVirtPkg.dsc.inc

2023-01-27 Thread Marvin Häuser
@Reviewers: In case there are concerns regarding remaining users - to me, it appears the old RVD code has been broken for a very long time anyway: https://github.com/mhaeuser/edk2/commit/fc7b6713ec8772622eeb3f579914f5f15a86e1ee Thanks, Rebecca! Best regards, Marvin > On 27. Jan 2023, at 17:42,

[edk2-devel] [PATCH v2 4/4] ArmVirtPkg: Remove RealView Debugger lines from ArmVirtPkg.dsc.inc

2023-01-27 Thread Rebecca Cran
Since RvdPeCoffExtraActionLib has been deleted, remove lines referencing it and the RealView Debugger from ArmVirtPkg.dsc.inc. Signed-off-by: Rebecca Cran --- ArmVirtPkg/ArmVirt.dsc.inc | 7 --- 1 file changed, 7 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.

[edk2-devel] [PATCH v2 1/4] BaseTools: Delete Bin/{CYGWIN_NT-5.1-i686,Darwin-i386} directories

2023-01-27 Thread Rebecca Cran
The Bin/CYGWIN_NT-5.1-i686 and Bin/Darwin-i386 directories contained files needed for RVCT support. Since EDK2 no longer supports RVCT, delete those directories. Signed-off-by: Rebecca Cran Acked-by: Ard Biesheuvel --- BaseTools/Bin/CYGWIN_NT-5.1-i686/BootSectImage |

[edk2-devel] [PATCH v2 3/4] ArmPkg: Remove RealView Debugger support

2023-01-27 Thread Rebecca Cran
The RealView Debugger is related to RVCT, which is no longer supported. Given that, remove RvdPeCoffExtraActionLib and code from RvdPeCoffExtraActionLib which prints lines for use with the RealView Debugger. Signed-off-by: Rebecca Cran --- ArmPkg/ArmPkg.dsc

[edk2-devel] [PATCH v2 2/4] BaseTools: Remove CYGWIN_NT-5.1-i686 ref from Scripts/PatchCheck.py

2023-01-27 Thread Rebecca Cran
With the removal of RVCT support and the related Bin/CYGWIN_NT-5.1-i686 and Darwin-i386 directories, remove a leftover reference to CYGWIN_NT-5.1-i686 from Scripts/PatchCheck.py. Signed-off-by: Rebecca Cran --- BaseTools/Scripts/PatchCheck.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Ba

[edk2-devel] [PATCH v2 0/4] BaseTools,ArmPkg,ArmVirtPkg: Remove leftover RVCT and RealView Debugger support

2023-01-27 Thread Rebecca Cran
Personal PR: https://github.com/tianocore/edk2/pull/3958 Changes from v1 to v2: Removed reference to CYGWIN_NT-5.1-i686 from Scripts/PatchCheck.py Removed RealView Debugger support and references. Rebecca Cran (4): BaseTools: Delete Bin/{CYGWIN_NT-5.1-i686,Darwin-i386} directories BaseTools:

Re: [edk2-devel] [edk2-platforms][PATCH v3 06/11] Ext4Pkg: Corrects integer overflow check logic in DiskUtil

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 4:10 PM Savva Mitrofanov wrote: > > > Why this whitespace change? > > Seems code formatter just removed trailing space. If you want so, I can drop > this change in v4. No need, I just couldn't see what changed here :) No trailing space = good. -- Pedro -=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms][PATCH v3 05/11] Ext4Pkg: Fix shift out of bounds in Ext4OpenSuperblock

2023-01-27 Thread Savva Mitrofanov
Thanks, I corrected this in the referenced repository fork. Will be included in v4. > On 27 Jan 2023, at 20:22, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> Missing check for wrong s_log_block_size exponent leads to shift out of >> bounds. Limit block

Re: [edk2-devel] [edk2-platforms][PATCH v3 06/11] Ext4Pkg: Corrects integer overflow check logic in DiskUtil

2023-01-27 Thread Savva Mitrofanov
> Why this whitespace change? Seems code formatter just removed trailing space. If you want so, I can drop this change in v4. > On 27 Jan 2023, at 20:24, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> Corrects multiplication overflow check code >> >>

Re: [edk2-devel] [PATCH v2] OvmfPkg: Create additional PML1 entries for large SEV-SNP VMs

2023-01-27 Thread Lendacky, Thomas via groups.io
On 1/26/23 14:26, Mikolaj Lisik wrote: Edk2 was failing, rather than creating more PML4 entries, when they weren't present in the initial memory acceptance flow. Because of that VMs with more than 512G memory were crashing. This code fixes that. This change affects only SEV-SNP VMs. The code wa

Re: [edk2-devel] [edk2-platforms][PATCH v3 10/11] Ext4Pkg: Fixes build on MSVC

2023-01-27 Thread Marvin Häuser
On 27. Jan 2023, at 15:33, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov > wrote: >> >> Accessing array using index of uint64 type makes MSVC compiler to >> include `__allmul` function in NOOPT which is not referenced in IA32. >> So we null

Re: [edk2-devel] [edk2-platforms][PATCH v3 09/11] Ext4Pkg: Add missing exit Status in Ext4OpenDirent

2023-01-27 Thread Marvin Häuser
Reviewed-by: Marvin Häuser > On 27. Jan 2023, at 15:28, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> Missing EFI_OUT_OF_RESOURCES exit status on failed Ext4CreateDentry >> leads to NULL-pointer dereference in Ext4GetFileInfo (passing NULL >> buffer in

Re: [edk2-devel] [edk2-platforms][PATCH v3 08/11] Ext4Pkg: Check VolumeName allocation correctness in Ext4GetVolumeName

2023-01-27 Thread Marvin Häuser
This code makes me wish for an in-place conversion lib, there really is no reason for dynamic allocation here... Reviewed-by: Marvin Häuser > On 27. Jan 2023, at 15:27, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> Missing check in some cases leads t

Re: [edk2-devel] [edk2-platforms][PATCH v3 10/11] Ext4Pkg: Fixes build on MSVC

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > Accessing array using index of uint64 type makes MSVC compiler to > include `__allmul` function in NOOPT which is not referenced in IA32. > So we null-terminates string using ReadSize, which should be equal to > SymlinkSizeTmp after corre

Re: [edk2-devel] [edk2-platforms][PATCH v3 07/11] Ext4Pkg: Check that source file is directory in Ext4OpenInternal

2023-01-27 Thread Marvin Häuser
Reviewed-by: Marvin Häuser > On 27. Jan 2023, at 15:26, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> This check already present in the while loop below, but absent for cases >> when input file is nameless, so to handle assertion in Ext4ReadFile we >>

Re: [edk2-devel] [edk2-platforms][PATCH v3 02/11] Ext4Pkg: Fix incorrect checksum metadata feature check

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 10:02 AM Marvin Häuser wrote: > > On 27. Jan 2023, at 10:29, Savva Mitrofanov wrote: > > > > Missing comparison != 0 leads to broken logic condition. > > The actual issue appears to be FeaturesCompat vs FeaturesRoCompat (latter is > hidden by your usage of the macro). Che

Re: [edk2-devel] [edk2-platforms][PATCH v3 09/11] Ext4Pkg: Add missing exit Status in Ext4OpenDirent

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > Missing EFI_OUT_OF_RESOURCES exit status on failed Ext4CreateDentry > leads to NULL-pointer dereference in Ext4GetFileInfo (passing NULL > buffer in Ext4ReadDir) > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov > Fixes:

Re: [edk2-devel] [edk2-platforms][PATCH v3 08/11] Ext4Pkg: Check VolumeName allocation correctness in Ext4GetVolumeName

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > Missing check in some cases leads to failed StrCpyS call in > Ext4GetVolumeLabelInfo. Also correct condition that checks Inode pointer > for being NULL in Ext4AllocateInode > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov

Re: [edk2-devel] [edk2-platforms][PATCH v3 07/11] Ext4Pkg: Check that source file is directory in Ext4OpenInternal

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > This check already present in the while loop below, but absent for cases > when input file is nameless, so to handle assertion in Ext4ReadFile we > need to add it at the top of function > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vi

Re: [edk2-devel] [edk2-platforms][PATCH v3 06/11] Ext4Pkg: Corrects integer overflow check logic in DiskUtil

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > Corrects multiplication overflow check code > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov > Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") > Signed-off-by: Savva Mitrofanov > --- > Features/Ext4Pkg/Ext4Pkg.dsc

Re: [edk2-devel] [edk2-platforms][PATCH v3 05/11] Ext4Pkg: Fix shift out of bounds in Ext4OpenSuperblock

2023-01-27 Thread Marvin Häuser
Reviewed-by: Marvin Häuser > On 27. Jan 2023, at 15:22, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov > wrote: >> >> Missing check for wrong s_log_block_size exponent leads to shift out of >> bounds. Limit block size to 2 MiB >> >> Cc: M

Re: [edk2-devel] [edk2-platforms][PATCH v3 05/11] Ext4Pkg: Fix shift out of bounds in Ext4OpenSuperblock

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > Missing check for wrong s_log_block_size exponent leads to shift out of > bounds. Limit block size to 2 MiB > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov > Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") > Signed

Re: [edk2-devel] [edk2-platforms][PATCH v3 04/11] Ext4Pkg: Add inode number validity check

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > We need to validate inode number to prevent possible null-pointer > dereference of directory parent in Ext4OpenDirent. Also checks that > inode number valid across opened partition before we read it in > Ext4ReadInode. > > Cc: Marvin Häus

Re: [edk2-devel] [edk2-platforms][PATCH v3 03/11] Ext4Pkg: Fix division by zero by adding check for s_inodes_per_group

2023-01-27 Thread Marvin Häuser
Reviewed-by: Marvin Häuser > On 27. Jan 2023, at 15:13, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> Superblock s_inodes_per_group field can't be zero, it leads to division >> by zero in BlockGroup routine Ext4ReadInode >> >> Cc: Marvin Häuser >> Cc

Re: [edk2-devel] [edk2-platforms][PATCH v3 01/11] Ext4Pkg: Fix memory leak in Ext4RetrieveDirent

2023-01-27 Thread Marvin Häuser
Reviewed-by: Marvin Häuser mailto:mhaeu...@posteo.de>> > On 27. Jan 2023, at 15:12, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: >> >> We need to free buffer on return if BlockRemainder != 0. Also changed >> return logic from function to use use common exit

Re: [edk2-devel] [edk2-platforms][PATCH v3 11/11] Ext4Pkg: Filter out directory entry names containing \0 as invalid

2023-01-27 Thread Marvin Häuser
> On 27. Jan 2023, at 15:09, Pedro Falcato wrote: > > On Fri, Jan 27, 2023 at 10:04 AM Marvin Häuser wrote: >> >> On 27. Jan 2023, at 10:29, Savva Mitrofanov wrote: >>> >>> The directory entry name conventions forbid having null-terminator >>> symbols in its body and can lead to undefined

Re: [edk2-devel] [edk2-platforms][PATCH v3 03/11] Ext4Pkg: Fix division by zero by adding check for s_inodes_per_group

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > Superblock s_inodes_per_group field can't be zero, it leads to division > by zero in BlockGroup routine Ext4ReadInode > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov > Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver."

Re: [edk2-devel] [edk2-platforms][PATCH v3 01/11] Ext4Pkg: Fix memory leak in Ext4RetrieveDirent

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 9:29 AM Savva Mitrofanov wrote: > > We need to free buffer on return if BlockRemainder != 0. Also changed > return logic from function to use use common exit to prevent code > duplication. > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov > Fixes: d9ceedca6

Re: [edk2-devel] [edk2-platforms][PATCH v3 11/11] Ext4Pkg: Filter out directory entry names containing \0 as invalid

2023-01-27 Thread Pedro Falcato
On Fri, Jan 27, 2023 at 10:04 AM Marvin Häuser wrote: > > On 27. Jan 2023, at 10:29, Savva Mitrofanov wrote: > > > > The directory entry name conventions forbid having null-terminator > > symbols in its body and can lead to undefined behavior conditions > > and crashes > > > > Cc: Marvin Häuser

Re: [edk2-devel] [PATCH v5 0/2] ArmPkg: Implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls for AArch64

2023-01-27 Thread Ard Biesheuvel
On Fri, 27 Jan 2023 at 05:10, Rebecca Cran wrote: > > Could I get some more reviews on this please? > > Reviewed-by: Ard Biesheuvel Thanks a lot for your persistence. Queued up here https://github.com/tianocore/edk2/pull/3956 > > On 1/16/23 21:57, Rebecca Cran wrote: > > Implement EFI_MP_SE

Re: [edk2-devel] [PATCH 1/1] tools_def: Remove duplicated -Os

2023-01-27 Thread Ard Biesheuvel
On Wed, 25 Jan 2023 at 10:21, wrote: > > From: Pierre Gondois > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2928 > > commit 17bd834eb5fd ("BaseTools: Factorize GCC flags") > makes GCC48_ALL_CC_FLAGS inherit from GCC_ALL_CC_FLAGS. > GCC_ALL_CC_FLAGS contains the '-Os' flag. > The latest f

Re: [edk2-devel] [PATCH 1/1] BaseTools: Delete Bin/{CYGWIN_NT-5.1-i686,Darwin-i386} directories

2023-01-27 Thread Ard Biesheuvel
On Thu, 26 Jan 2023 at 16:22, Rebecca Cran wrote: > > The Bin/CYGWIN_NT-5.1-i686 and Bin/Darwin-i386 directories contained > files needed for RVCT support. > > Since EDK2 no longer supports RVCT, delete those directories. > > Signed-off-by: Rebecca Cran > --- > BaseTools/Bin/CYGWIN_NT-5.1-i686/B

Re: [edk2-devel] Question/bug in ArmPkg (ArmArchTimerLib)

2023-01-27 Thread Ard Biesheuvel
On Thu, 26 Jan 2023 at 13:06, Gierszynski, Przemyslaw wrote: > > Hi All, > > My name is Przemysław Gierszyński and I work as a Firmware Engineer in Intel > Technology Poland. > I was doing some work that required review of some parts of EDK2 and I think > I have found a small bug in ArmPkg modul

Re: [edk2-devel] [PATCH V4 06/12] OvmfPkg/PeilessStartupLib: Build GuidHob for Tdx measurement

2023-01-27 Thread Gerd Hoffmann
On Fri, Jan 27, 2023 at 11:30:46AM +, Xu, Min M wrote: > On January 27, 2023 3:54 PM, Gerd Hoffmann wrote: > > On Fri, Jan 27, 2023 at 08:11:00AM +0800, Min Xu wrote: > > > From: Min M Xu > > > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > > > > What is the reason to create

Re: [edk2-devel] [PATCH V4 06/12] OvmfPkg/PeilessStartupLib: Build GuidHob for Tdx measurement

2023-01-27 Thread Min Xu
On January 27, 2023 3:54 PM, Gerd Hoffmann wrote: > On Fri, Jan 27, 2023 at 08:11:00AM +0800, Min Xu wrote: > > From: Min M Xu > > > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4243 > > > What is the reason to create a new TdxHelperLib btw.? > Are there any problems with the code being in

[edk2-devel] [PATCH 2/2] OvmfPkg: move OvmfTpmDxe.fdf.inc to Include/Fdf

2023-01-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- OvmfPkg/AmdSev/AmdSevX64.fdf | 2 +- OvmfPkg/CloudHv/CloudHvX64.fdf | 2 +- OvmfPkg/OvmfPkgIa32.fdf | 2 +- OvmfPkg/OvmfPkgIa32X64.fdf | 2 +- OvmfPkg/OvmfPkgX64.fdf | 2 +-

[edk2-devel] [PATCH 0/2] OvmfPkg: move two include files to Include/Fdf

2023-01-27 Thread Gerd Hoffmann
Gerd Hoffmann (2): OvmfPkg: move OvmfTpmPei.fdf.inc to Include/Fdf OvmfPkg: move OvmfTpmDxe.fdf.inc to Include/Fdf OvmfPkg/AmdSev/AmdSevX64.fdf | 4 ++-- OvmfPkg/CloudHv/CloudHvX64.fdf | 4 ++-- OvmfPkg/OvmfPkgIa32.fdf | 4 ++-- OvmfPkg/Ov

[edk2-devel] [PATCH 1/2] OvmfPkg: move OvmfTpmPei.fdf.inc to Include/Fdf

2023-01-27 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- OvmfPkg/AmdSev/AmdSevX64.fdf | 2 +- OvmfPkg/CloudHv/CloudHvX64.fdf | 2 +- OvmfPkg/OvmfPkgIa32.fdf | 2 +- OvmfPkg/OvmfPkgIa32X64.fdf | 2 +- OvmfPkg/OvmfPkgX64.fdf | 2 +-

Re: [edk2-devel] [edk2-platforms][PATCH v3 11/11] Ext4Pkg: Filter out directory entry names containing \0 as invalid

2023-01-27 Thread Marvin Häuser
On 27. Jan 2023, at 10:29, Savva Mitrofanov wrote: > > The directory entry name conventions forbid having null-terminator > symbols in its body and can lead to undefined behavior conditions > and crashes > > Cc: Marvin Häuser > Cc: Pedro Falcato > Cc: Vitaly Cheptsov > Fixes: 89b2bb0db263 ("E

Re: [edk2-devel] [edk2-platforms][PATCH v3 02/11] Ext4Pkg: Fix incorrect checksum metadata feature check

2023-01-27 Thread Marvin Häuser
On 27. Jan 2023, at 10:29, Savva Mitrofanov wrote: > > Missing comparison != 0 leads to broken logic condition. The actual issue appears to be FeaturesCompat vs FeaturesRoCompat (latter is hidden by your usage of the macro). Checking for != 0 is redundant (albeit required by the code style gui

[edk2-devel] [edk2-platforms][PATCH v3 11/11] Ext4Pkg: Filter out directory entry names containing \0 as invalid

2023-01-27 Thread Savva Mitrofanov
The directory entry name conventions forbid having null-terminator symbols in its body and can lead to undefined behavior conditions and crashes Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: 89b2bb0db263 ("Ext4Pkg: Fix and clarify handling regarding non-utf8 dir entries") Sign

[edk2-devel] [edk2-platforms][PATCH v3 10/11] Ext4Pkg: Fixes build on MSVC

2023-01-27 Thread Savva Mitrofanov
Accessing array using index of uint64 type makes MSVC compiler to include `__allmul` function in NOOPT which is not referenced in IA32. So we null-terminates string using ReadSize, which should be equal to SymlinkSizeTmp after correct reading. Also adds missing MultU64x32 in Ext4Read. Cc: Marvin H

[edk2-devel] [edk2-platforms][PATCH v3 07/11] Ext4Pkg: Check that source file is directory in Ext4OpenInternal

2023-01-27 Thread Savva Mitrofanov
This check already present in the while loop below, but absent for cases when input file is nameless, so to handle assertion in Ext4ReadFile we need to add it at the top of function Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") Sign

[edk2-devel] [edk2-platforms][PATCH v3 09/11] Ext4Pkg: Add missing exit Status in Ext4OpenDirent

2023-01-27 Thread Savva Mitrofanov
Missing EFI_OUT_OF_RESOURCES exit status on failed Ext4CreateDentry leads to NULL-pointer dereference in Ext4GetFileInfo (passing NULL buffer in Ext4ReadDir) Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: 21b1853880d5 ("Ext4Pkg: Add a directory entry tree.") Signed-off-by: Savva

[edk2-devel] [edk2-platforms][PATCH v3 08/11] Ext4Pkg: Check VolumeName allocation correctness in Ext4GetVolumeName

2023-01-27 Thread Savva Mitrofanov
Missing check in some cases leads to failed StrCpyS call in Ext4GetVolumeLabelInfo. Also correct condition that checks Inode pointer for being NULL in Ext4AllocateInode Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: cfbbae595eec ("Ext4Pkg: Add handling of EFI_FILE_SYSTEM_VOLUME_

[edk2-devel] [edk2-platforms][PATCH v3 05/11] Ext4Pkg: Fix shift out of bounds in Ext4OpenSuperblock

2023-01-27 Thread Savva Mitrofanov
Missing check for wrong s_log_block_size exponent leads to shift out of bounds. Limit block size to 2 MiB Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") Signed-off-by: Savva Mitrofanov --- Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.h| 14

[edk2-devel] [edk2-platforms][PATCH v3 04/11] Ext4Pkg: Add inode number validity check

2023-01-27 Thread Savva Mitrofanov
We need to validate inode number to prevent possible null-pointer dereference of directory parent in Ext4OpenDirent. Also checks that inode number valid across opened partition before we read it in Ext4ReadInode. Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4

[edk2-devel] [edk2-platforms][PATCH v3 06/11] Ext4Pkg: Corrects integer overflow check logic in DiskUtil

2023-01-27 Thread Savva Mitrofanov
Corrects multiplication overflow check code Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") Signed-off-by: Savva Mitrofanov --- Features/Ext4Pkg/Ext4Pkg.dsc| 2 +- Features/Ext4Pkg/Ext4Dxe/DiskUtil.c | 8 2 files ch

[edk2-devel] [edk2-platforms][PATCH v3 03/11] Ext4Pkg: Fix division by zero by adding check for s_inodes_per_group

2023-01-27 Thread Savva Mitrofanov
Superblock s_inodes_per_group field can't be zero, it leads to division by zero in BlockGroup routine Ext4ReadInode Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") Signed-off-by: Savva Mitrofanov --- Features/Ext4Pkg/Ext4Dxe/Superbl

[edk2-devel] [edk2-platforms][PATCH v3 02/11] Ext4Pkg: Fix incorrect checksum metadata feature check

2023-01-27 Thread Savva Mitrofanov
Missing comparison != 0 leads to broken logic condition. Also replaced CSUM_SEED feature_incompat check with predefined macro EXT4_HAS_INCOMPAT Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") Signed-off-by: Savva Mitrofanov --- Feat

[edk2-devel] [edk2-platforms][PATCH v3 01/11] Ext4Pkg: Fix memory leak in Ext4RetrieveDirent

2023-01-27 Thread Savva Mitrofanov
We need to free buffer on return if BlockRemainder != 0. Also changed return logic from function to use use common exit to prevent code duplication. Cc: Marvin Häuser Cc: Pedro Falcato Cc: Vitaly Cheptsov Fixes: d9ceedca6c8f ("Ext4Pkg: Add Ext4Dxe driver.") Signed-off-by: Savva Mitrofanov ---

[edk2-devel] [edk2-platforms][PATCH v3 00/11] Ext4Pkg: Code correctness and security improvements

2023-01-27 Thread Savva Mitrofanov
Hi all, In v3 I rebased patches according upstream and removed already applied patches. Also in this revision I corrected 'Fixes' tag formatting, added corrections to Ext4GetUcs2DirentName to filter out directory entry names containing \0 as invalid and added a fix for building using MSVC. This

[edk2-devel] [edk2-platforms][PATCH V2 5/5] Platform/Sgi: Enable SoC expansion block for RD-N2 variants

2023-01-27 Thread Vivek Kumar Gautam
For all the RD-N2 platform variants, include the SSDT ACPI table that describes the devices present in SoC expansion block that is connected to the IO virtualization block. Signed-off-by: Vivek Gautam --- Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 7 +++ Platform/ARM/SgiPkg/Acpi

[edk2-devel] [edk2-platforms][PATCH V2 4/5] Platform/Sgi: Initialize additional UART controllers

2023-01-27 Thread Vivek Kumar Gautam
From: Shriram K The IO virtualization block on reference design platforms allow connecting SoC expansion devices such as PL011 UART. On platforms that support this, initialize the UART controller connected to the IO virtualization block. Signed-off-by: Shriram K Signed-off-by: Vivek Gautam ---

[edk2-devel] [edk2-platforms][PATCH V2 3/5] Platform/Sgi: Add SSDT table for IO virtualization SoC expansion block

2023-01-27 Thread Vivek Kumar Gautam
Arm reference design platforms have multiple IO virtualization blocks that allow connecting PCIe root bus or non-PCIe SoC peripherals to the system. Each of these IO virtualization blocks consists of an instance of SMMUv3, a GIC-ITS and a NCI (network chip interconnect) to support traffic flow and

[edk2-devel] [edk2-platforms][PATCH V2 2/5] Platform/Sgi: Enable virtio-p9 device on RD-N2 platform variants

2023-01-27 Thread Vivek Kumar Gautam
Enable the virtio-p9 device that is present as part of the RoS peripherals on RD-N2 platform variants. This will allow filesystem sharing between the Host PC and target platform. Signed-off-by: Vivek Gautam --- Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 8 ++-- Platform/ARM/SgiP

[edk2-devel] [edk2-platforms][PATCH V2 1/5] Platform/Sgi: Add SSDT table for Virtio-P9

2023-01-27 Thread Vivek Kumar Gautam
Some of the Arm reference design FVP platforms support the Virtio-p9 device as part of the RoS subsystem. Add an entry for this device in the SSDT acpi table. The device entry is listed in a new SSDT file as only some of the reference design FVP platforms support it and so this file is included in

[edk2-devel] [edk2-platforms][PATCH V2 0/5] Enable SoC expansion block and Virtio-P9 for RD-N2 variants

2023-01-27 Thread Vivek Kumar Gautam
Arm reference design Fixed Virtual Platforms (FVPs) such as the RD-N2 platform variants have multiple IO virtualization blocks that allow connecting PCIe root bus or non-PCIe SoC peripherals to the system. Each of these IO virtualization blocks consists of an Arm SMMUv3, a GIC-ITS and a NCI (networ

Re: [edk2-devel] [PATCH edk2-platforms 5/5] Platform/ARM/Sgi: Add VariableFlashInfoLib to SgiPlatformMm.dsc.inc

2023-01-27 Thread Sami Mujawar
Hi Pierre, Thank you for this patch. Reviewed-by: Sami Mujawar Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99129): https://edk2.groups.io/g/devel/message/99129 Mute This Topic: https://groups.io/mt/96518048/2

Re: [edk2-devel] [PATCH edk2-platforms 2/5] Platform/StandaloneMm: Remove '-march=armv8-a+nofp' flag

2023-01-27 Thread Sami Mujawar
Hi Pierre, Thank you for this patch. Reviewed-by: Sami Mujawar Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99128): https://edk2.groups.io/g/devel/message/99128 Mute This Topic: https://groups.io/mt/96518044/2

Re: [edk2-devel] [PATCH edk2-platforms 1/5] Platform/ARM/SgiPkg: Remove '-march=armv8-a+nofp' flag

2023-01-27 Thread Sami Mujawar
Hi Pierre, Thank you for this patch. Reviewed-by: Sami Mujawar Regards, Sami Mujawar -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#99127): https://edk2.groups.io/g/devel/message/99127 Mute This Topic: https://groups.io/mt/96518042/2

Re: [edk2-devel] [PATCH v2] OvmfPkg: Create additional PML1 entries for large SEV-SNP VMs

2023-01-27 Thread Gerd Hoffmann
On Thu, Jan 26, 2023 at 08:26:40PM +, Mikolaj Lisik via groups.io wrote: > Edk2 was failing, rather than creating more PML4 entries, when they > weren't present in the initial memory acceptance flow. Because of that > VMs with more than 512G memory were crashing. This code fixes that. > > This