59 Commits

Author SHA1 Message Date
hanliyang
3f980ee773 Add build process that uses OvmfPkg/AmdSev/AmdSevX64.dsc
The build depends on OvmfPkg/AmdSev/Grub/grub.efi, and grub.efi further
depends on Grub with efisecret support. When the build system's native
Grub supports efisecret, remove this fake OvmfPkg/AmdSev/Grub/grub.efi.

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2025-03-18 16:02:22 +08:00
hy
2ff9fe43ad Fix CVE-2024-4603 2025-03-17 23:16:50 +08:00
hanliyang
ca2a749250 Fix boot failure on OvmfPkg/AmdSev
This PR backports 3 commits:

  020cc9e2e705 OvmfPkg: Disable PcdFirstTimeWakeUpAPsBySipi
  8b66f9df1bb0 OvmfPkg/AmdSev: Disable PcdFirstTimeWakeUpAPsBySipi
  f008890ae559 OvmfPkg/AmdSev: fix BdsPlatform.c assertion failure during boot

from upstream to fix the regression of boot failure on OvmfPkg/AmdSev

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2025-03-13 17:44:44 +08:00
ShenYage
16940cf319
Merge branch 'openEuler-24.03-LTS' of gitee.com:src-openeuler/edk2 into openEuler-24.03-LTS
Signed-off-by: ShenYage <shenyage1@huawei.com>
2025-03-10 13:35:45 +00:00
ShenYage
47faa28f95 fix some bugs for CVE-2023-45236、CVE-2023-45237
Signed-off-by: ShenYage <shenyage1@huawei.com>
2025-02-28 22:15:51 +08:00
hanliyang
1ffbd1357e Hygon: support build OvmfX64 without option -D SECURE_BOOT_ENABLE=TRUE
When building OVMF{_CODE}.fd using OvmfPkgX64.dsc and define
SECURE_BOOT_ENABLE=TRUE, the OVMF{_CODE}.fd will failure to boot the
AMD SEV/SEV-ES/SEV-SNP and Hygon CSV/CSV2/CSV3 VMs. The root cause
is that the upstream commit 4f173db8b45b ("OvmfPkg/PlatformInitLib:
Add functions for EmuVariableNvStore") rename the function from
TdxValidateCfv to PlatformValidateNvVarStore, and place the function
PlatformValidateNvVarStore to the common lib PlatformInitLib.

I have submitted a bugzilla to the community:

    https://bugzilla.tianocore.org/show_bug.cgi?id=4807

and sent partial fix patches to the mailing lists:

    https://edk2.groups.io/g/devel/message/119921?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C%2COvmfPkg%2FPlatformInitLib%3A+Detect+FlashNvVarStore+before+validate+it%2C20%2C2%2C0%2C107212891

I don't have a machine that supports SEV-SNP, so I ultimately can't
fully fix the issue, and the patches I sent couldn't be accepted.

In order to support boot AMD SEV... and Hygon CSV... VMs using the OVMF
from the RPM package, I modified the edk2.spec to build OVMF.fd,
OVMF_CODE.fd and OVMF_VARS.fd without the build option
' -D SECURE_BOOT_ENABLE=TRUE'.

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2025-02-28 19:30:24 +08:00
hy
3dace7f7b0 Fixes CVE-2024-13176、CVE-2024-4741、CVE-2023-5363 2025-02-25 23:44:47 +08:00
Adttil
996e638320 vdpa: support vdpa blk/scsi device boot 2024-11-29 11:09:52 +08:00
hanliyang
8f8a38d6e0 Support live migration for Hygon CSV1/2/3 guests, fix nesting #VC
The live migration of Hygon CSV1/2/3 guest depends on the KVM
hypercall KVM_HC_MAP_GPA_RANGE, add code to sync page enc/dec
status to KVM.

The MMIO routine of VC handler will get memory encrypt status to
validate MMIO address. MemEncryptSevGetEncryptionMask() will enable
interrupt while interrupt must be disabled during VC. During DXE
stage, VC routine as below:
  CcExitHandleVc
    -> MemEncryptSevGetAddressRangeState
      -> MemEncryptSevGetEncryptionMask->PcdGet64(PcdPteMemoryEncryptionAddressOrMask)

Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-10-23 18:02:32 +08:00
ShenYage
d95c0c9f0f Fix CVE-2023-45236、CVE-2023-45237
Signed-off-by: ShenYage <shenyage1@huawei.com>
2024-10-15 23:04:06 +08:00
hanliyang
42da937f6e Add support for Hygon CSV3 guest
Signed-off-by: hanliyang <hanliyang@hygon.cn>
2024-10-20 18:06:07 +08:00
zhangxianting
e90700e1bb fix CVE-2024-38796 2024-10-09 16:00:51 +08:00
Xiaotian Wu
ec60765a8e add LoongArch support
backport edk2-platform to build with edk2-2308

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
2024-09-13 10:57:43 +08:00
ShenYage
442bc876f4 Fix CVE-2024-6119
Signed-off-by: ShenYage <shenyage1@huawei.com>
2024-09-05 15:24:44 +08:00
ShenYage
f14a124daa Fix CVE-2024-5535
Signed-off-by: ShenYage <shenyage1@huawei.com>
2024-07-11 19:49:46 +08:00
ShenYage
3e468ca7b5 Fix CVE-2024-1298
Signed-off-by: ShenYage <shenyage1@huawei.com>
2024-06-11 17:48:09 +08:00
jiangdongxu
31c4073175 edk2.spec: make EFI_LOADER_DATA executable again
As commit(2997ae387397) make EFI_LOADER_DATA non-executable, old
operation system using old GRUB cannot boot. As we need to support
these operation systems, make EFI_LOADER_DATA executable again.

Signed-off-by: jiangdongxu <jiangdongxu1@huawei.com>
2024-04-24 14:19:56 +08:00
ShenYage
d411de33f5 Fix CVE-2023-6237、CVE-2024-2511
Signed-off-by: ShenYage <shenyage1@huawei.com>
(cherry picked from commit 591443e21eac71b083d7910220c4102648987009)
2024-04-17 16:02:11 +08:00
yexiao
e237463fd2 Fix som CVE
Fix CVE-2023-45229、CVE-2023-45230、CVE-2023-45231、CVE-2023-45232、CVE-2023-45233、CVE-2023-45234、CVE-2023-45235

Signed-off-by: yexiao <yexiao7@huawei.com>
(cherry picked from commit aa6a1dc11863945714f63746d5f1159ed3ede3e7)
2024-03-18 10:53:43 +08:00
yexiao
33439c309c Fix some CVE
fix CVE-2022-36763、CVE-2022-36764、CVE-2022-36765

Signed-off-by: yexiao <yexiao7@huawei.com>
(cherry picked from commit 45d7902c879c8a960a59b4d86c97ca7b7c1765c6)
2024-03-11 09:58:09 +08:00
yexiao
73840139ff Fix some CVE
CVE-2023-3446、CVE-2023-3817、CVE-2024-0727、CVE-2023-2975、CVE-2023-6129

Signed-off-by: yexiao <yexiao7@huawei.com>
2024-03-01 11:18:10 +08:00
duyiwei
a0c638905f Added firmware scanning directory mapping for libvirt XML
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
2024-01-25 17:44:47 +08:00
openeuler-ci-bot
34e91a4d10
!164 upgrade to 202308 for support riscv64 and add a patch to fix build error on the riscv64 obs build environment.
From: @ouuleilei 
Reviewed-by: @caojinhuajy, @yezengruan 
Signed-off-by: @yezengruan
2023-09-13 03:24:54 +00:00
ouuleilei
d3d233a55d upgrade to 202308 for support riscv64 and add a patch to fix build error on the riscv64 obs build environment. 2023-09-12 10:08:28 +08:00
yexiao
95521053a1 Fix miss of changelog
Signed-off-by: yexiao <yexiao7@huawei.com>
2023-07-27 03:49:50 +08:00
Jiabo Feng
b436e3c8aa solving the compilation failure problem of gcc 12.3.0
reference:
https://github.com/google/brotli/pull/893
https://github.com/tianocore/edk2/pull/2347
https://github.com/tianocore/edk2/pull/2694

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
2023-07-14 10:26:46 +08:00
yexiao
f51f632f91 Fix CVE-2022-4304
Signed-off-by: yexiao <yexiao7@huawei.com>
2023-07-03 16:47:22 +08:00
chenhuiying
4515de537b fix CVE-2023-0286
Signed-off-by: chenhuiying <chenhuiying4@huawei.com>
2023-02-26 14:48:09 +08:00
chenhuiying
e25a53b4bb fix CEV-2023-0215
Signed-off-by: chenhuiying <chenhuiying4@huawei.com>
2023-02-26 13:12:03 +08:00
s00803682
1506bbc136 fix CVE-2023-0401 2023-02-26 11:11:38 +08:00
s00803682
f6a7530990 fix CVE-2022-4450 2023-02-25 18:07:13 +08:00
chenhuiying
d212ca2421 CVE-2021-38578 2022-11-29 10:43:21 +08:00
chenhuiying
6e56773a39 fix CVE-2019-11098
Signed-off-by: chenhuiying <chenhuiying4@huawei.com>
2022-09-29 09:54:27 +08:00
miaoyubo
df8d559553 Enable tpm for edk
Enable TPM for pcr 0-7
2022-06-14 10:30:34 +08:00
mylee
ba5cc503db fix spec changelog date 2022-05-16 14:55:28 +08:00
yezengruan
701fa89c5d edk: update changelog
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-04-27 19:24:48 +08:00
Jinhua Cao
377f2ac93a OvmfPkg:VirtioNetDxe:Extend the RxBufferSize to avoid data truncation
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
(cherry picked from commit 27bd8394db13f2beff206c975f0d7febb69d639b)
2022-03-30 15:39:31 +08:00
c00576969
924da87b5c update edk2 to stable 202011
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-30 15:38:19 +08:00
Jinhua Cao
3da4384e42 fix CVE-2021-38576
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
2022-01-27 11:39:11 +08:00
Jinhua Cao
e61d8414ff fix CVE-2021-28216
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
2022-01-18 19:17:30 +08:00
Jinhua Cao
2f0b056664 BaseTools: Adapter for python3.9
fix ucs-2 lookup on python3.9
    Work around array.array.tostring() removal in python3.9
    (cherry-pick: 5d8648345c 43bec9ea3d)

Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
2022-01-18 19:04:29 +08:00
imxcc
5a3c9bbbde fix cve-2021-38575
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-09-22 17:40:47 +08:00
miaoyubo
b8316529d8 Fix CVE-2021-28211 2021-08-31 09:53:19 +08:00
eillon
85be15144b ArmPkg/CompilerIntrinsicsLib: provide atomics intrinsics
Gary reports the GCC 10 will emit calls to atomics intrinsics routines
unless -mno-outline-atomics is specified. This means GCC-10 introduces
new intrinsics, and even though it would be possible to work around this
by specifying the command line option, this would require a new GCC10
toolchain profile to be created, which we prefer to avoid.

So instead, add the new intrinsics to our library so they are provided
when necessary.
2021-07-30 10:00:25 +08:00
Jiajie Li
30b95c6463 Fix CVE-2021-28210
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-06-28 16:42:40 +08:00
AlexChen
de34a2e0be spec: remove useless BuildRequire python2
The build of the edk2 don't need python2 anymore, so remote it.

Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-11-02 10:51:23 +08:00
Ying Fang
086d6ccc13 spec: convert Source0 to http url
update Source0 to http url, OBS will build pkg using Source0

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-09-29 09:00:20 +08:00
jiangfangjie
d285d5a0fb ArmvirtPkg/ArmVirtQemu: enable TPM2 based measured boot and enable the TPM2 configuration module
Signed-off-by: jiangfangjie <jiangfangjie@huawei.com>
2020-08-05 18:42:45 +08:00
zhanghailiang
07555356d1 Update edk2.spec. Add build option to enable secure boot 2020-07-29 10:54:12 +08:00
Xiang Zheng
7d22e06acf Upgrade edk2 to stable202002 and OpenSSL to 1.1.1f
Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>
2020-05-12 11:09:52 +08:00