108 Commits

Author SHA1 Message Date
Qiumiao Zhang
0c043ec8e8 commands/efi/tpm: Re-enable measurements on confidential computing platforms
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit c76475ce1e25392e52d1dc6740fc3f4c7f8f1129)
2024-12-12 16:24:50 +08:00
yueyuankun
14b97f4386 acpi: Fix out of bounds access in grub_acpi_xsdt_find_table()
(cherry picked from commit 3d099f07174b832482b0f627930b802effd7790a)
2024-11-18 11:23:23 +08:00
hanliyang
c2e34573a4 use confidential computing provisioned secrets for disk decryption
The code of this functionality is cherry-picked from
https://mail.gnu.org/archive/html/grub-devel/2022-02/msg00064.html.

Signed-off-by: hanliyang <hanliyang@hygon.cn>
(cherry picked from commit 7413ba71dd6b911c03dc1ddb0b9c68ab8fb5c54f)
2024-11-13 21:13:56 +08:00
Qiumiao Zhang
4fcba96670 10_linux: fix missing "ro" in kernel boot parameters
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 6d2e2f52e74ebe3700fe7da76c59414ea2a97b1b)
2024-11-12 17:32:54 +08:00
chench00
5dda2f3914 add support for hygon tpcm
(cherry picked from commit e6b6bc11f76aff9e11daf59f339b8f83e4db1746)
2024-09-03 21:26:04 +08:00
wangyueliang
c66773399e Inherit 'Add BLS Support' patch from grub-2.06
(cherry picked from commit 1c3e5b182f63ce0a6a3450e8dce9e8fb390ac83a)
2024-08-09 17:25:02 +08:00
peng_zou
77937c85b2 remove BuildRequires:pesign >= 0.99-8 and fix bug about petitboot doesn't ignore EFI entries for ppc64le
(cherry picked from commit 234d66e79a2dfbbad011ff2d36619b2a5bc0f5d9)
2024-07-25 17:01:09 +08:00
yueyuankun
535e7e1f80 Export all variables from the initial context when creating a submenu.
(cherry picked from commit ffc10c83b2bb50085e13b652a35e39d3fdedfe3f)
2024-07-02 14:41:34 +08:00
peng_zou
a064672857 add support for ppc64le
(cherry picked from commit b4e3f33334d50d143781e09d69171aaf786e30a4)
2024-06-25 16:20:34 +08:00
Qiumiao Zhang
7716f9035b fix log printing in tpcm_kunpeng module again
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 4444af68de5a9fa588a296537208ff24f7c78212)
2024-06-24 21:15:58 +08:00
Qiumiao Zhang
a468738ec8 fix log printing in tpcm_kunpeng module
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit b991af1095137f6b9bb0a3d45c90293abd1beb0c)
2024-06-20 15:37:09 +08:00
yueyuankun
cd9055d5d0 :Add gfxterm_background and serial modules to grub.efi
(cherry picked from commit 16ede924d72eb579e3fc5a58eead2146a4bad170)
2024-06-20 09:41:29 +08:00
wangziliang
50a7ecc051 disk/mdraid1x_linux: Prevent infinite recursion
(cherry picked from commit 8c7269a15f9cd142bad32e63fc78aba25db966b2)
2024-06-19 14:56:03 +08:00
Qiumiao Zhang
2809f32357 lib/libtasn1: Fix ETYPE_OK off by one array size check
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 4155120fe548cfc7cff865d1b938514a7d25da28)
2024-06-12 10:56:10 +08:00
Xue Liu
edd6e5173a Fix that patch233 introduced old code
(cherry picked from commit 48fdc532e5fef9f652843f24114384c2f765aa2d)
2024-06-06 14:14:38 +08:00
Juxin Gao
93c996230e LoongArch: Add back-compatibility for linux kernel.
Signed-off-by: Juxin Gao <gaojuxin@loongson.cn>
(cherry picked from commit 49d8f0dc100cd059916c5ad1fe319fbccc856be7)
2024-06-05 10:50:26 +08:00
ouuleilei
75b057def9 Add sophgo's patch to support risc-v machine SG2042
(cherry picked from commit 20f2ea943e4cbb4e35477767638b41ddcf77eadc)
2024-06-05 10:20:12 +08:00
Qiumiao Zhang
83cca1b13f loongarch64: fix GRUB_EFI_MAX_ALLOCATION_ADDRESS undeclared
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit c7c931741222dc5d1fb93839ad463c152e217ef8)
2024-05-11 16:44:18 +08:00
肖在
15ec184dc9 Handle non-continuous data blocks in directory extents
(cherry picked from commit eaccc141e1795ac3b376afe158a54a6f52fc6b62)
2024-05-11 15:47:50 +08:00
肖在
3e8531a1a5 Revert "Handle non-continuous data blocks in"
This reverts commit e0cd43f8a5486debeba17349abbb088001164d70.

(cherry picked from commit 88a9257d4914cb2aca40f3b0494a0dcb8927482d)
2024-05-11 15:47:50 +08:00
肖在
10587ba6bf Handle non-continuous data blocks in
directory extents

The directory extent list does not have to be a continuous list of data
blocks. When GRUB tries to read a non-existant member of the list,
grub_xfs_read_file() will return a block of zero'ed memory. Checking for
a zero'ed magic number is sufficient to skip this non-existant data block.

Prior to commit 07318ee7e (fs/xfs: Fix XFS directory extent parsing)
this was handled as a subtle side effect of reading the (non-existant)
tail data structure. Since the block was zero'ed the computation of the
number of directory entries in the block would return 0 as well.

(cherry picked from commit e0cd43f8a5486debeba17349abbb088001164d70)
2024-05-11 15:47:50 +08:00
肖在
a2b94147ab Revert " Handle non-continuous data blocks in"
This reverts commit 242fa05f2412202b241bbea01dc2bd69214b2e33.

(cherry picked from commit fd1e9fdd653fbd874133cbfd0a7885bd1fb2916f)
2024-05-11 15:47:50 +08:00
肖在
23a4c6f1d0 Handle non-continuous data blocks in
directory extents

The directory extent list does not have to be a continuous list of data
blocks. When GRUB tries to read a non-existant member of the list,
grub_xfs_read_file() will return a block of zero'ed memory. Checking for
a zero'ed magic number is sufficient to skip this non-existant data block.

(cherry picked from commit 242fa05f2412202b241bbea01dc2bd69214b2e33)
2024-05-11 15:47:50 +08:00
Qiumiao Zhang
30809adee6 sync patches from openEuler-22.03-LTS-SP3
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit ce31b98a9c7cb28116572daf9e62349bc24e2a2f)
2024-05-07 21:32:10 +08:00
Qiumiao Zhang
6e27946b9f sync patches from 22.03-LTS-Next
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 908a3e71137970eaa927be7b646ead3ac17ce084)
2024-04-10 11:25:20 +08:00
Qiumiao Zhang
89baa5568c fix compressed kernel verification failed
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit f567bbdc444bb5ddf157c65e568e5b50a1f17169)
2024-04-08 16:50:46 +08:00
jinlun
09babe7e08 Interface for replacing the EFI signature
(cherry picked from commit c9cf3a76023a60fa416036bb95da3e32cb977d4f)
2024-04-08 15:48:15 +08:00
Qiumiao Zhang
1021e175e1 add TPCM support with ipmi channel
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 1e52014b39673718830070eb7dfe450646954074)
2024-04-01 14:48:49 +08:00
Qiumiao Zhang
faefb4e8c7 Don't require a password to boot entries generated by grub-mkconfig
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit e07518a0fb083b68bc4dbf4ea3b2eb6bcbe7c5f6)
2024-04-01 14:36:25 +08:00
Qiumiao Zhang
7aa8ba7c07 look for grub.cfg on efi where the app was found
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 4c4771d498e643899d768f102c0bc6f49fe3e7be)
2024-03-08 18:11:31 +08:00
Qiumiao Zhang
03ef4d01cf modify klist in 10_linux.in
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2024-03-07 02:39:46 +00:00
Qiumiao Zhang
3f42453819 update to 2.12
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2024-03-04 19:17:07 +08:00
Yingkun Meng
54048ecd9e loongarch: Disable relaxation relocations
Signed-off-by: Yingkun Meng <mengyingkun@loongson.cn>
2023-12-25 11:26:57 +08:00
Qiumiao Zhang
317a2cc40c skip verification when not loading grub.cfg
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit 1a70c89178317faf0fe5fe4a7402ce5c1f301084)
2023-12-22 15:30:05 +08:00
Qiumiao Zhang
6c106ce2b6 change the name of module tpcm to tpcm_kunpeng
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit a5fc32e5290b5fd2231cad4ed738d840460e0133)
2023-12-11 14:44:54 +08:00
Qiumiao Zhang
5fbe53a8e7 add TPCM support with ipmi channel
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit bf5379d84f0bd61d407e87d2e4a1dd90528e2e1d)
2023-12-11 10:10:08 +08:00
Qiumiao Zhang
01e5499b45 support openEuler signature
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit ff7aab7c6032ca8c05300ebc886d3d6c8c58af2f)
2023-11-16 16:52:43 +08:00
Qiumiao Zhang
0d987655f0 fix CVE-2023-4692 and CVE-2023-4693
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-10-07 19:56:25 +08:00
Qiumiao Zhang
fbde2eddf8 backport some patches from upstream
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-09-13 22:49:55 +08:00
ouuleilei
034249d78b add a patch to fix build error 2023-09-08 10:11:09 +08:00
Qiumiao Zhang
fa477f729e backport some patches from upstream
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-08-17 19:47:05 +08:00
Yingkun Meng
1eae189350 loongarch: Fix the initrd parameter passing
Signed-off-by: Yingkun Meng <mengyingkun@loongson.cn>
2023-08-09 14:16:50 +08:00
Qiumiao Zhang
526de9571a remove the items of unsupported filesystems in fs.lst
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-07-24 22:06:04 +08:00
Qiumiao Zhang
794af19021 Override the linker and force noexecstack stacks
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-07-17 16:17:40 +08:00
Qiumiao Zhang
2252eb370e use xsdt_addr if present
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-07-03 19:54:42 +08:00
Qiumiao Zhang
581a5d3a1d Revert "EFI: allocate kernel in EFI_RUNTIME_SERVICES_CODE instead of EFI_LOADER_DATA."
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-06-15 22:12:59 +08:00
Qiumiao Zhang
36491a7d0e Read /etc/default/grub.d/*.cfg after /etc/default/grub
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-04-23 21:57:43 +08:00
Qiumiao Zhang
1857bf1c82 backport some patches from upstream
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
2023-04-10 22:22:30 +08:00
mengyingkun
8a04f685e3 LoongArch: Implement cache synchronization operation
Signed-off-by: mengyingkun <mengyingkun@loongson.cn>
(cherry picked from commit 60c48504c262606c75540c014de0c4c5a9ef65bd)
2023-03-23 11:34:39 +08:00
mengyingkun
be5296dfe0 LoongArch: Force initrd load address 64KiB alignment
Signed-off-by: mengyingkun <mengyingkun@loongson.cn>
(cherry picked from commit 49bab1d9ae8b2a13648c414a8cc31b113873e17c)
2023-03-21 14:25:33 +08:00