mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-13 14:59:34 +02:00
GRUB: update to rev 2.14-rc1 December 2025
The argon2 patches were dropped (PHC implementation), because GRUB has now its own Argon2 KDF implementation as part of its recent libgcrypt update. Argon2 support is therefore retained, but GNU's implementation has replaced the one that Libreboot previously used. This brings in the following upstream changes: * 280715ec6 Release 2.14~rc1 * e549317e1 windows: Fix symbol table generation during module conversion from PE to ELF * a340750f9 windows: Fix relocation sections generation during module conversion from PE to ELF * c602035a9 loader/efi/linux: Fix compile error with Clang * f62269767 build: Add tpm2key.asn file for reference to dist archive * 46be4488f build: Include new zstd test support files in dist archive * fa79d5ea9 build: Include MAINTAINERS and SECURITY files in dist archive * 8271bcc13 build: Add appended signatures header file to EXTRA_DIST * 11845da2b lib/xzembed/xz_dec_stream: Replace grub_memcpy() call with memcpy() * 7ded35fea bootstrap: Fix patching warnings * 4129e9ad6 tss2: Always init out buffer before calling tpm2_submit_command_real() * 000e48b42 fs/ntfs: Correct next_attribute validation * 5ff9c43cf kern/ieee1275/init: Use net config for boot location instead of firmware bootpath * c2cae77ab net/tftp: Fix NULL pointer dereference in grub_net_udp_close() * fadc94b91 net/dns: Prevent UAF and double free * cd24e2591 net/bootp: Prevent a UAF in network interface unregister * fca6c0afd docs: Document lsmemregions and memtools commands * 42c099786 commands/memtools: Add lsmemregions command * 20211246a tests/file_filter: Add zstd tests * 092449f63 tests/file_filter: Add zstd test file * 356dcac9a tests/file_filter: Regenerate gpg keys * 8ea83c3ee io/zstdio: Implement zstdio decompression * 7c22c1000 fs/btrfs: Update doc link for bootloader support * 6435551a6 docs: Add Btrfs env block and special env vars * b63447748 util/grub.d/00_header.in: Wire grub.cfg to use env_block when present * e4e177661 fs/btrfs: Add environment block to reserved header area * d6525f0e6 util/grub-editenv: Add probe call for external envblk * 4b5ea8dca util/grub-editenv: Wire list_variables() to optional fs_envblk * 84e2bc2f1 util/grub-editenv: Wire unset_variables() to optional fs_envblk * c7c901916 util/grub-editenv: Wire set_variables() to optional fs_envblk * 2abdd8cd2 util/grub-editenv: Add fs_envblk write helper * e4d684cc4 util/grub-editenv: Add fs_envblk open helper * 512e33ec7 tests: Add "z" length modifier printf tests * 3c9762b12 kern/misc: Add the "z" length modifier support * 91ddada64 disk/cryptodisk: Add --hw-accel to enable hardware acceleration * f8f68f14a libgcrypt: Add hardware acceleration for gcry_sha512 * 70b2f5f08 libgcrypt: Add hardware acceleration for gcry_sha256 * 2158d8e8a libgcrypt: Declare the sha256 shaext function * 0ff5faf8c libgcrypt: Implement _gcry_get_hw_features() * 812356191 libgcrypt: Copy sha512 x86_64 assembly files * 7f9c590af libgcrypt: Copy sha256 x86_64 assembly files * 8423176f1 lib/hwfeatures-gcry: Enable SSE and AVX for x86_64 EFI * 06a5b88ba lib/hwfeatures-gcry: Introduce functions to manage hardware features * d01abd713 configure: Tweak autoconf/automake files to detect x86_64 features * a122e0262 lib/pbkdf2: Optimize PBKDF2 by reusing HMAC handle * 961e38b2b lib/crypto: Introduce new HMAC functions to reuse buffers * 59304a7b5 docs: Document argon2 and argon2_test modules * 28dbe8a3b kern/misc: Implement faster grub_memcpy() for aligned buffers * da01eb0c5 tests/util/grub-fs-tester: Use Argon2id for LUKS2 test * c1bd9fc82 tests: Integrate Argon2 tests into functional_test * 6a525ee64 tests: Import Argon2 tests from libgcrypt * 6052fc2cf disk/luks2: Add Argon2 support * 66b8718f9 argon2: Introduce grub_crypto_argon2() * de201105d libgcrypt/kdf: Fix 64-bit modulus on 32-bit platforms * 93544861b libgcrypt/kdf: Remove unsupported KDFs * 1ff720641 libgcrypt/kdf: Get rid of gpg_err_code_from_errno() * 0c06a454f libgcrypt/kdf: Implement hash_buffers() for BLAKE2b-512 * bc94dfd54 crypto: Update crypto.h for libgcrypt KDF functions * 5b81f490c util/import_gcry: Import kdf.c for Argon2 * 6b5c671d3 commands/menuentry: Fix for out of bound access * 21cdcb125 tests/tpm2_key_protector_test: Add a test for PCR Capping * afddba012 tpm2_key_protector: Support PCR capping * ae7a39900 tss2: Implement grub_tcg2_cap_pcr() for emu * 7b39970e9 tss2: Implement grub_tcg2_cap_pcr() for ieee1275 * 39f98e471 tss2: Implement grub_tcg2_cap_pcr() for EFI * d47d261ec tss2: Introduce grub_tcg2_cap_pcr() * b2549b4d3 tss2: Add TPM2_PCR_Event command * e1b9d92a8 loader/i386/linux: Transfer EDID information to kernel * a8379e693 fs/hfsplus: Allow reading files created by Mac OS 9 * c5ff0d616 docs: Fix build warnings in libgcrypt and blsuki doc * fa93f2412 kern/command,commands/extcmd: Perform explicit NULL check in both the unregister helpers * 9a725391f commands/efi/tpm: Call get_active_pcr_banks() only with TCG2 1.1 or newer * 894241c85 kern: Include function name on debug and error print functions * 75a20cc14 kern: Make grub_error() more verbose * 8abbafa49 net/tcp: Fix TCP port number reused on reboot * 3dff10a97 docs/grub: Document appended signature * 0f2dda8cf docs/grub: Document signing GRUB with an appended signature * 0b59d379f docs/grub: Document signing GRUB under UEFI * dbfa3d7d7 appended signatures: Verification tests * 7f68c7195 appended signatures: GRUB commands to manage the hashes * 6cb58b1c9 appended signatures: GRUB commands to manage the certificates * ab7b17717 appended signatures: Using db and dbx lists for signature verification * 97f7001e1 appended signatures: Create db and dbx lists * b5e872417 appended signatures: Introducing key management environment variable * 76158ed1a powerpc/ieee1275: Read the db and dbx secure boot variables * 069f3614e appended signatures: Support verifying appended signatures * f8e8779d8 powerpc/ieee1275: Enter lockdown based on /ibm, secure-boot * e95c52f1f appended signatures: Parse X.509 certificates * a33754979 appended signatures: Parse PKCS#7 signed data * 3e4ff6ffb appended signatures: Parse ASN1 node * 7d28bdb0b appended signatures: Import GNUTLS's ASN.1 description files * 1fca5f397 grub-install: Support embedding x509 certificates * aefe0de22 pgp: Rename OBJ_TYPE_PUBKEY to OBJ_TYPE_GPG_PUBKEY * f826cc8b0 crypto: Move storage for grub_crypto_pk_* to crypto.c * 31cc7dfe5 powerpc/ieee1275: Add support for signing GRUB with an appended signature * ee789e1a6 lib/b64dec: Use grub_size_t instead of size_t for _gpgrt_b64dec_proc() function definition * abb8fb6d1 util/grub-mkimagexx: Fix riscv32 relocation offset * 1f9092bfd libgcrypt: Allow GRUB to build with Clang * 1d2ee8f8b tests: Add test ISO files to dist package * dfa3dbf61 tests: Test dates outside of 32-bit Unix range * 6837293b8 lib/datetime: Support dates outside of 1901..2038 range * 02788bfdf bootstrap: Ensure shallow gnulib clone works on newer git * 4e42199f3 docs: Correct some URLs * 733cc28eb docs: Update Future section to reflect current release * 54c8573ef docs: Document new libgrypt modules * 1562dee69 docs: Clarify section heading and fix wording * cf1b75a14 BUGS: Update to point to bug tracking system * 236663dfb INSTALL: Document libtasn1 needed for grub-protect * 7bfb38627 po: Update translations to build with gettext 0.26 * 49e76ad16 term/efi/console: Treat key.scan_code 0x0102 (suspend) as Enter * de72f3998 util/bash-completion.d/Makefile.am: s/mkrescure/mkrescue/g * 14c2966c7 blsuki: Add uki command to load Unified Kernel Image entries * 5190df851 blsuki: Check for mounted /boot in emu * 51b960132 util/misc.c: Change offset type for grub_util_write_image_at() * 8cee1c284 blsuki: Add blscfg command to parse Boot Loader Specification snippets * e016d6d60 kern/misc: Implement grub_strtok() * 587db89af kern/xen: Add Xen command line parsing * b2a975bc5 include/xen/xen.h: Add warning comment for cmd_line * 19c698d12 zfs: Fix LINUX_ROOT_DEVICE when grub-probe fails * 6898fcf74 relocator: Switch to own page table while moving chunks * 67a95527b configure: Generate tar-ustar tarball instead of tar-v7 * 29d515b4c build: Add new libgcrypt and libtasn1 related files to EXTRA_DISTS * eb76b064d build: Add util/import_gcrypt_inth.sed to EXTRA_DISTS * eb56a6af9 include/xen/xen.h: Rename MAX_GUEST_CMDLINE to GRUB_XEN_MAX_GUEST_CMDLINE * 80df5e132 loader/arm64/xen_boot: Set correctly bootargs property for modules * 6831d242a loader/efi/linux: Return correct size from LoadFile2 * f326c5c47 commands/bli: Set LoaderTpm2ActivePcrBanks runtime variable * 0e367796c docs: Write how to import new libgcrypt * b930bfa37 libgcrypt: Fix a memory leak * d48c277c4 libgcrypt: Don't use 64-bit division on platforms where it's slow * de49514c9 util/import_gcry: Fix pylint warnings * 334353a97 util/import_gcry: Make compatible with Python 3.4 * 2a6de4209 libgcrypt: Import blake family of hashes * e54187912 libgcrypt: Ignore sign-compare warnings * e3b78e49c libgcrypt: Remove now unneeded compilation flag * e23704ad4 libgcrypt: Fix Coverity warnings * d65810b01 keccak: Disable acceleration with SSE asm * f808ef0d2 tests: Add DSA and RSA SEXP tests * 0739d24cd libgcrypt: Adjust import script, definitions and API users for libgcrypt 1.11 * 3e1c2890b b64dec: Add harness for compilation in GRUB environment * 5ca0d5e41 b64dec: Import b64dec from gpg-error * 3312af6e0 libgcrypt: Import libgcrypt 1.11 * a0d4c94ef loader/efi/linux: Use shim loader image handle where available * 1b9a84e63 loader/efi/chainloader: Use shim loader image handle where available * e31d0cd7f efi/sb: Add API for retrieving shim loader image handles * ed7e053a3 efi/sb: Add support for the shim loader protocol * 70897d3d3 efi: Provide wrappers for load_image, start_image and unload_image * 030a70fca loader/arm64/xen_boot: Consider alignment calling grub_arch_efi_linux_boot_image() * e82609a47 loader/arm64/xen_boot: Use bool instead of int * d1a470b69 loader/arm64/xen_boot: Remove correctly all modules loaded by xen_module command * cf5e52fa8 dl: Fix grub_dl_is_persistent() for emu
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
From dae0cfdbb484eb3576300ad9c4d2c362f4e8fa64 Mon Sep 17 00:00:00 2001
|
||||
From 3334727192bca5c64e9e1321da23c4b1e745deb2 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 31 Oct 2021 03:47:05 +0000
|
||||
Subject: [PATCH 01/14] mitigate grub's missing characters for borders/arrow
|
||||
Subject: [PATCH 1/8] mitigate grub's missing characters for borders/arrow
|
||||
characters
|
||||
|
||||
This cleans up the display on the main screen in GRUB.
|
||||
@@ -86,5 +86,5 @@ index 9c383e64a..8ec1dd1e8 100644
|
||||
grub_term_highlight_color = old_color_highlight;
|
||||
geo->timeout_y = geo->first_entry_y + geo->num_entries
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 25ae072be49c23abffff657085c16ac3780b8cda Mon Sep 17 00:00:00 2001
|
||||
From cc6d74da1a6a77935e094601f4f212cd410f5b53 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sat, 19 Nov 2022 16:30:24 +0000
|
||||
Subject: [PATCH 02/14] say the name libreboot, in the grub menu
|
||||
Subject: [PATCH 2/8] say the name libreboot, in the grub menu
|
||||
|
||||
---
|
||||
grub-core/normal/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 96abfda2f..d806db9c4 100644
|
||||
index de9a3f961..1fabb9c86 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -209,7 +209,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
@@ -215,7 +215,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
|
||||
grub_term_cls (term);
|
||||
|
||||
@@ -21,5 +21,5 @@ index 96abfda2f..d806db9c4 100644
|
||||
return;
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From e9969b4ee38e3d9fda1fdff02e127830d7fdf2ec Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 03/14] Add CC0 license
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
grub-core/kern/dl.c | 3 ++-
|
||||
util/grub-module-verifierXX.c | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index de8c3aa8d..4a3be8568 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -495,7 +495,8 @@ grub_dl_check_license (grub_dl_t mod, Elf_Ehdr *e)
|
||||
|
||||
if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
|
||||
|| grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
|
||||
- || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
|
||||
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0
|
||||
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=CC0") == 0)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
|
||||
index a42c20bd1..7157a30aa 100644
|
||||
--- a/util/grub-module-verifierXX.c
|
||||
+++ b/util/grub-module-verifierXX.c
|
||||
@@ -236,7 +236,8 @@ check_license (const char * const filename,
|
||||
Elf_Shdr *s = find_section (arch, e, ".module_license", module_size);
|
||||
if (s && (strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3") == 0
|
||||
|| strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3+") == 0
|
||||
- || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0))
|
||||
+ || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0
|
||||
+ || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=CC0") == 0))
|
||||
return;
|
||||
grub_util_error ("%s: incompatible license", filename);
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From a90a11f02d5bfc8b9f9e1253a67906fde9102a14 Mon Sep 17 00:00:00 2001
|
||||
From d5aead07155d6eeb36971c0a2e5ee1392a025f91 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Mon, 30 Oct 2023 22:19:21 +0000
|
||||
Subject: [PATCH 09/15] at_keyboard coreboot: force scancodes2+translate
|
||||
Subject: [PATCH 3/8] at_keyboard coreboot: force scancodes2+translate
|
||||
|
||||
Scan code set 2 with translation should be assumed in
|
||||
every case, as the default starting position.
|
||||
@@ -103,5 +103,5 @@ index f8a129eb7..8207225c2 100644
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 2)
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 421a44b2f8211fa46ea523fc0feeaba9940af0e7 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 04/14] Define GRUB_UINT32_MAX
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
include/grub/types.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/include/grub/types.h b/include/grub/types.h
|
||||
index 45079bf65..8c0b30395 100644
|
||||
--- a/include/grub/types.h
|
||||
+++ b/include/grub/types.h
|
||||
@@ -156,6 +156,7 @@ typedef grub_int32_t grub_ssize_t;
|
||||
#define GRUB_SHRT_MAX 0x7fff
|
||||
#define GRUB_SHRT_MIN (-GRUB_SHRT_MAX - 1)
|
||||
#define GRUB_UINT_MAX 4294967295U
|
||||
+#define GRUB_UINT32_MAX 4294967295U
|
||||
#define GRUB_INT_MAX 0x7fffffff
|
||||
#define GRUB_INT_MIN (-GRUB_INT_MAX - 1)
|
||||
#define GRUB_INT32_MAX 2147483647
|
||||
@@ -177,6 +178,13 @@ typedef grub_int32_t grub_ssize_t;
|
||||
#define GRUB_TYPE_U_MAX(type) ((unsigned long long)((typeof (type))(~0)))
|
||||
#define GRUB_TYPE_U_MIN(type) 0ULL
|
||||
|
||||
+# define GRUB_UINT32_C(x) x ## U
|
||||
+# if GRUB_ULONG_MAX >> 31 >> 31 >> 1 == 1
|
||||
+# define GRUB_UINT64_C(x) x##UL
|
||||
+# elif 1
|
||||
+# define GRUB_UINT64_C(x) x##ULL
|
||||
+# endif
|
||||
+
|
||||
typedef grub_uint64_t grub_properly_aligned_t;
|
||||
|
||||
#define GRUB_PROPERLY_ALIGNED_ARRAY(name, size) grub_properly_aligned_t name[((size) + sizeof (grub_properly_aligned_t) - 1) / sizeof (grub_properly_aligned_t)]
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 86d06a8075d87cdaece0c5495f7505ff01f1e752 Mon Sep 17 00:00:00 2001
|
||||
From 22a0e4608428f7f0131789b6bc0e0203b994163f Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Tue, 31 Oct 2023 10:33:28 +0000
|
||||
Subject: [PATCH 10/15] keylayouts: don't print "Unknown key" message
|
||||
Subject: [PATCH 4/8] keylayouts: don't print "Unknown key" message
|
||||
|
||||
on keyboards with stuck keys, this results in GRUB just
|
||||
spewing it repeatedly, preventing use of GRUB.
|
||||
@@ -34,5 +34,5 @@ index aa3ba34f2..445fa0601 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 92aab8e78e0a9dc400376f31fdd7eee980aa33aa Mon Sep 17 00:00:00 2001
|
||||
From d04a862006aaf754af4d0ec8efee33e9a59c7d0c Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 16:14:58 +0000
|
||||
Subject: [PATCH 11/15] don't print missing prefix errors on the screen
|
||||
Subject: [PATCH 5/8] don't print missing prefix errors on the screen
|
||||
|
||||
we do actually set the prefix. this patch modifies
|
||||
grub to still set grub_errno and return accordingly,
|
||||
@@ -85,10 +85,10 @@ index 18de52562..2a0fea6c8 100644
|
||||
}
|
||||
file = try_open_from_prefix (prefix, filename);
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 4a3be8568..6ae3d73f8 100644
|
||||
index de8c3aa8d..eac3ea48d 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -881,7 +881,7 @@ grub_dl_load (const char *name)
|
||||
@@ -880,7 +880,7 @@ grub_dl_load (const char *name)
|
||||
return 0;
|
||||
|
||||
if (! grub_dl_dir) {
|
||||
@@ -98,5 +98,5 @@ index 4a3be8568..6ae3d73f8 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From 594a7011d551af530bbbdf5e39b941811a0b7811 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 06/14] Error on missing Argon2id parameters
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
grub-core/disk/luks2.c | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index b17cd2115..bbd8f5579 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -39,6 +39,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
enum grub_luks2_kdf_type
|
||||
{
|
||||
LUKS2_KDF_TYPE_ARGON2I,
|
||||
+ LUKS2_KDF_TYPE_ARGON2ID,
|
||||
LUKS2_KDF_TYPE_PBKDF2
|
||||
};
|
||||
typedef enum grub_luks2_kdf_type grub_luks2_kdf_type_t;
|
||||
@@ -91,7 +92,7 @@ struct grub_luks2_keyslot
|
||||
grub_int64_t time;
|
||||
grub_int64_t memory;
|
||||
grub_int64_t cpus;
|
||||
- } argon2i;
|
||||
+ } argon2;
|
||||
struct
|
||||
{
|
||||
const char *hash;
|
||||
@@ -161,10 +162,11 @@ luks2_parse_keyslot (grub_luks2_keyslot_t *out, const grub_json_t *keyslot)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Missing or invalid KDF");
|
||||
else if (!grub_strcmp (type, "argon2i") || !grub_strcmp (type, "argon2id"))
|
||||
{
|
||||
- out->kdf.type = LUKS2_KDF_TYPE_ARGON2I;
|
||||
- if (grub_json_getint64 (&out->kdf.u.argon2i.time, &kdf, "time") ||
|
||||
- grub_json_getint64 (&out->kdf.u.argon2i.memory, &kdf, "memory") ||
|
||||
- grub_json_getint64 (&out->kdf.u.argon2i.cpus, &kdf, "cpus"))
|
||||
+ out->kdf.type = !grub_strcmp (type, "argon2i")
|
||||
+ ? LUKS2_KDF_TYPE_ARGON2I : LUKS2_KDF_TYPE_ARGON2ID;
|
||||
+ if (grub_json_getint64 (&out->kdf.u.argon2.time, &kdf, "time") ||
|
||||
+ grub_json_getint64 (&out->kdf.u.argon2.memory, &kdf, "memory") ||
|
||||
+ grub_json_getint64 (&out->kdf.u.argon2.cpus, &kdf, "cpus"))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Missing Argon2i parameters");
|
||||
}
|
||||
else if (!grub_strcmp (type, "pbkdf2"))
|
||||
@@ -460,6 +462,7 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
switch (k->kdf.type)
|
||||
{
|
||||
case LUKS2_KDF_TYPE_ARGON2I:
|
||||
+ case LUKS2_KDF_TYPE_ARGON2ID:
|
||||
ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Argon2 not supported");
|
||||
goto err;
|
||||
case LUKS2_KDF_TYPE_PBKDF2:
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 62f4bd17485c3d65649de2cef398ec708f35ea9d Mon Sep 17 00:00:00 2001
|
||||
From 1d72be25322037c703c5fa95ee29b8ee7b7d7106 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 16:36:22 +0000
|
||||
Subject: [PATCH 12/15] don't print error if module not found
|
||||
Subject: [PATCH 6/8] don't print error if module not found
|
||||
|
||||
still set grub_errno accordingly, and otherwise
|
||||
behave the same. in libreboot, we remove a lot of
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 6ae3d73f8..4c15027fe 100644
|
||||
index eac3ea48d..6d67ba54f 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -511,7 +511,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
|
||||
@@ -510,7 +510,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
|
||||
|
||||
s = grub_dl_find_section (e, ".modname");
|
||||
if (!s)
|
||||
@@ -30,5 +30,5 @@ index 6ae3d73f8..4c15027fe 100644
|
||||
mod->name = grub_strdup ((char *) e + s->sh_offset);
|
||||
if (! mod->name)
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
From 6a757a3cdf22e840162bb222a87446a32d9b94a2 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 07/14] Compile with Argon2id support
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
Makefile.util.def | 6 +++++-
|
||||
grub-core/Makefile.core.def | 2 +-
|
||||
grub-core/disk/luks2.c | 13 +++++++++++--
|
||||
3 files changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 038253b37..2f19569c9 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -3,7 +3,7 @@ AutoGen definitions Makefile.tpl;
|
||||
library = {
|
||||
name = libgrubkern.a;
|
||||
cflags = '$(CFLAGS_GNULIB)';
|
||||
- cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json';
|
||||
+ cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json -I$(srcdir)/grub-core/lib/argon2';
|
||||
|
||||
common = util/misc.c;
|
||||
common = grub-core/kern/command.c;
|
||||
@@ -36,6 +36,10 @@ library = {
|
||||
common = grub-core/kern/misc.c;
|
||||
common = grub-core/kern/partition.c;
|
||||
common = grub-core/lib/crypto.c;
|
||||
+ common = grub-core/lib/argon2/argon2.c;
|
||||
+ common = grub-core/lib/argon2/core.c;
|
||||
+ common = grub-core/lib/argon2/ref.c;
|
||||
+ common = grub-core/lib/argon2/blake2/blake2b.c;
|
||||
common = grub-core/lib/json/json.c;
|
||||
common = grub-core/disk/luks.c;
|
||||
common = grub-core/disk/luks2.c;
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 0ee65d54d..cd29a9df8 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1242,7 +1242,7 @@ module = {
|
||||
common = disk/luks2.c;
|
||||
common = lib/gnulib/base64.c;
|
||||
cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
|
||||
- cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json';
|
||||
+ cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json -I$(srcdir)/lib/argon2';
|
||||
};
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index bbd8f5579..02cd615d9 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/safemath.h>
|
||||
|
||||
+#include <argon2.h>
|
||||
#include <base64.h>
|
||||
#include <json.h>
|
||||
|
||||
@@ -463,8 +464,16 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
{
|
||||
case LUKS2_KDF_TYPE_ARGON2I:
|
||||
case LUKS2_KDF_TYPE_ARGON2ID:
|
||||
- ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Argon2 not supported");
|
||||
- goto err;
|
||||
+ ret = argon2_hash (k->kdf.u.argon2.time, k->kdf.u.argon2.memory, k->kdf.u.argon2.cpus,
|
||||
+ passphrase, passphraselen, salt, saltlen, area_key, k->area.key_size,
|
||||
+ k->kdf.type == LUKS2_KDF_TYPE_ARGON2I ? Argon2_i : Argon2_id,
|
||||
+ ARGON2_VERSION_NUMBER);
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ grub_dprintf ("luks2", "Argon2 failed: %s\n", argon2_error_message (ret));
|
||||
+ goto err;
|
||||
+ }
|
||||
+ break;
|
||||
case LUKS2_KDF_TYPE_PBKDF2:
|
||||
hash = grub_crypto_lookup_md_by_name (k->kdf.u.pbkdf2.hash);
|
||||
if (!hash)
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 272c5f5724c0790aff48b0d6ba75928de2275b33 Mon Sep 17 00:00:00 2001
|
||||
From a0e49c6ae97114afa386286f6005dd9b3a896797 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 17:25:20 +0000
|
||||
Subject: [PATCH 13/26] don't print empty error messages
|
||||
Subject: [PATCH 7/8] don't print empty error messages
|
||||
|
||||
this is part two of the quest to kill the prefix
|
||||
error message. after i disabled prefix-related
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
|
||||
index 53c734de7..7cac53983 100644
|
||||
index ba04b57fb..dab62646d 100644
|
||||
--- a/grub-core/kern/err.c
|
||||
+++ b/grub-core/kern/err.c
|
||||
@@ -107,7 +107,8 @@ grub_print_error (void)
|
||||
@@ -116,7 +116,8 @@ grub_print_error (void)
|
||||
{
|
||||
if (grub_errno != GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -27,5 +27,5 @@ index 53c734de7..7cac53983 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 4e4ded3f127f5567bdb41de7b671bd9b2a478125 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 08/14] Make grub-install work with Argon2
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
util/grub-install.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 060246589..059036d3c 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -448,6 +448,8 @@ probe_mods (grub_disk_t disk)
|
||||
{
|
||||
grub_util_cryptodisk_get_abstraction (disk,
|
||||
push_cryptodisk_module, NULL);
|
||||
+ /* HACK: always push argon2 */
|
||||
+ grub_install_push_module ("argon2");
|
||||
have_abstractions = 1;
|
||||
have_cryptodisk = 1;
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 818f1b19f32e355cc2a0ebe29eee2a2bac7bcb3f Mon Sep 17 00:00:00 2001
|
||||
From b6f5e33972320c171d0fe44ac2afe4eac0b4b3eb Mon Sep 17 00:00:00 2001
|
||||
From: Paul Menzel <pmenzel@molgen.mpg.de>
|
||||
Date: Mon, 17 May 2021 10:24:36 +0200
|
||||
Subject: [PATCH 14/14] kern/coreboot/mmap: Map to reserved
|
||||
Subject: [PATCH 8/8] kern/coreboot/mmap: Map to reserved
|
||||
|
||||
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
|
||||
|
||||
@@ -33,5 +33,5 @@ index caf8f7cef..2fc316e8d 100644
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
tree="default"
|
||||
rev="a68a7dece464c35b1c8d20b98502b6881b103911"
|
||||
rev="280715ec63a3424f5cf1289302cb4ab4e98768f4"
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 759a673b3c4601a32837f2b26661d2998f6cb8d6 Mon Sep 17 00:00:00 2001
|
||||
From 248018d7623fa1dc0e1b4ef3a430eac04cbe51bf Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 31 Oct 2021 03:47:05 +0000
|
||||
Subject: [PATCH 01/15] mitigate grub's missing characters for borders/arrow
|
||||
Subject: [PATCH 1/9] mitigate grub's missing characters for borders/arrow
|
||||
characters
|
||||
|
||||
This cleans up the display on the main screen in GRUB.
|
||||
@@ -86,5 +86,5 @@ index 9c383e64a..8ec1dd1e8 100644
|
||||
grub_term_highlight_color = old_color_highlight;
|
||||
geo->timeout_y = geo->first_entry_y + geo->num_entries
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 88007c24f8bceb97d0aecf31545c3b49b380b1a6 Mon Sep 17 00:00:00 2001
|
||||
From d029792781fe280b8dac1bed457ef78b2af84ee2 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sat, 19 Nov 2022 16:30:24 +0000
|
||||
Subject: [PATCH 02/15] say the name libreboot, in the grub menu
|
||||
Subject: [PATCH 2/9] say the name libreboot, in the grub menu
|
||||
|
||||
---
|
||||
grub-core/normal/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 96abfda2f..d806db9c4 100644
|
||||
index de9a3f961..1fabb9c86 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -209,7 +209,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
@@ -215,7 +215,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
|
||||
grub_term_cls (term);
|
||||
|
||||
@@ -21,5 +21,5 @@ index 96abfda2f..d806db9c4 100644
|
||||
return;
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From d1925aadf848c269b35a3004c104e014df582536 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 03/15] Add CC0 license
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
grub-core/kern/dl.c | 3 ++-
|
||||
util/grub-module-verifierXX.c | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index de8c3aa8d..4a3be8568 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -495,7 +495,8 @@ grub_dl_check_license (grub_dl_t mod, Elf_Ehdr *e)
|
||||
|
||||
if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
|
||||
|| grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
|
||||
- || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
|
||||
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0
|
||||
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=CC0") == 0)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
|
||||
index a42c20bd1..7157a30aa 100644
|
||||
--- a/util/grub-module-verifierXX.c
|
||||
+++ b/util/grub-module-verifierXX.c
|
||||
@@ -236,7 +236,8 @@ check_license (const char * const filename,
|
||||
Elf_Shdr *s = find_section (arch, e, ".module_license", module_size);
|
||||
if (s && (strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3") == 0
|
||||
|| strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3+") == 0
|
||||
- || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0))
|
||||
+ || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0
|
||||
+ || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=CC0") == 0))
|
||||
return;
|
||||
grub_util_error ("%s: incompatible license", filename);
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From fc815438e70cbb13166ab6711b6f6460521b1fd4 Mon Sep 17 00:00:00 2001
|
||||
From b42452eca17efb562e1ffe809ff8d3bdbbda3728 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Mon, 30 Oct 2023 22:19:21 +0000
|
||||
Subject: [PATCH 09/14] at_keyboard coreboot: force scancodes2+translate
|
||||
Subject: [PATCH 3/9] at_keyboard coreboot: force scancodes2+translate
|
||||
|
||||
Scan code set 2 with translation should be assumed in
|
||||
every case, as the default starting position.
|
||||
@@ -103,5 +103,5 @@ index f8a129eb7..8207225c2 100644
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 2)
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From b0adafee9fcd820dd9d1c03a9619953cb3407854 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 04/15] Define GRUB_UINT32_MAX
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
include/grub/types.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/include/grub/types.h b/include/grub/types.h
|
||||
index 45079bf65..8c0b30395 100644
|
||||
--- a/include/grub/types.h
|
||||
+++ b/include/grub/types.h
|
||||
@@ -156,6 +156,7 @@ typedef grub_int32_t grub_ssize_t;
|
||||
#define GRUB_SHRT_MAX 0x7fff
|
||||
#define GRUB_SHRT_MIN (-GRUB_SHRT_MAX - 1)
|
||||
#define GRUB_UINT_MAX 4294967295U
|
||||
+#define GRUB_UINT32_MAX 4294967295U
|
||||
#define GRUB_INT_MAX 0x7fffffff
|
||||
#define GRUB_INT_MIN (-GRUB_INT_MAX - 1)
|
||||
#define GRUB_INT32_MAX 2147483647
|
||||
@@ -177,6 +178,13 @@ typedef grub_int32_t grub_ssize_t;
|
||||
#define GRUB_TYPE_U_MAX(type) ((unsigned long long)((typeof (type))(~0)))
|
||||
#define GRUB_TYPE_U_MIN(type) 0ULL
|
||||
|
||||
+# define GRUB_UINT32_C(x) x ## U
|
||||
+# if GRUB_ULONG_MAX >> 31 >> 31 >> 1 == 1
|
||||
+# define GRUB_UINT64_C(x) x##UL
|
||||
+# elif 1
|
||||
+# define GRUB_UINT64_C(x) x##ULL
|
||||
+# endif
|
||||
+
|
||||
typedef grub_uint64_t grub_properly_aligned_t;
|
||||
|
||||
#define GRUB_PROPERLY_ALIGNED_ARRAY(name, size) grub_properly_aligned_t name[((size) + sizeof (grub_properly_aligned_t) - 1) / sizeof (grub_properly_aligned_t)]
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From defb7ad35579c321d32b81af7ddd6fecf34cb618 Mon Sep 17 00:00:00 2001
|
||||
From 831d6824c79032db08a68acbbea6ea374399dba4 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Tue, 31 Oct 2023 10:33:28 +0000
|
||||
Subject: [PATCH 10/14] keylayouts: don't print "Unknown key" message
|
||||
Subject: [PATCH 4/9] keylayouts: don't print "Unknown key" message
|
||||
|
||||
on keyboards with stuck keys, this results in GRUB just
|
||||
spewing it repeatedly, preventing use of GRUB.
|
||||
@@ -34,5 +34,5 @@ index aa3ba34f2..445fa0601 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,7 +1,7 @@
|
||||
From d0345db429be8089145e0c072db9ac8db0b644bd Mon Sep 17 00:00:00 2001
|
||||
From 095ecdc8ad06ac2581a06e4dacbf4091aba8ec6a Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 16:14:58 +0000
|
||||
Subject: [PATCH 11/14] don't print missing prefix errors on the screen
|
||||
Subject: [PATCH 5/9] don't print missing prefix errors on the screen
|
||||
|
||||
we do actually set the prefix. this patch modifies
|
||||
grub to still set grub_errno and return accordingly,
|
||||
@@ -85,10 +85,10 @@ index 18de52562..2a0fea6c8 100644
|
||||
}
|
||||
file = try_open_from_prefix (prefix, filename);
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 4a3be8568..6ae3d73f8 100644
|
||||
index de8c3aa8d..eac3ea48d 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -881,7 +881,7 @@ grub_dl_load (const char *name)
|
||||
@@ -880,7 +880,7 @@ grub_dl_load (const char *name)
|
||||
return 0;
|
||||
|
||||
if (! grub_dl_dir) {
|
||||
@@ -98,5 +98,5 @@ index 4a3be8568..6ae3d73f8 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From 6c74f4ff91f741e74dca1accc6c173c277f4ca5b Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 06/15] Error on missing Argon2id parameters
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
grub-core/disk/luks2.c | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index b17cd2115..bbd8f5579 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -39,6 +39,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
enum grub_luks2_kdf_type
|
||||
{
|
||||
LUKS2_KDF_TYPE_ARGON2I,
|
||||
+ LUKS2_KDF_TYPE_ARGON2ID,
|
||||
LUKS2_KDF_TYPE_PBKDF2
|
||||
};
|
||||
typedef enum grub_luks2_kdf_type grub_luks2_kdf_type_t;
|
||||
@@ -91,7 +92,7 @@ struct grub_luks2_keyslot
|
||||
grub_int64_t time;
|
||||
grub_int64_t memory;
|
||||
grub_int64_t cpus;
|
||||
- } argon2i;
|
||||
+ } argon2;
|
||||
struct
|
||||
{
|
||||
const char *hash;
|
||||
@@ -161,10 +162,11 @@ luks2_parse_keyslot (grub_luks2_keyslot_t *out, const grub_json_t *keyslot)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Missing or invalid KDF");
|
||||
else if (!grub_strcmp (type, "argon2i") || !grub_strcmp (type, "argon2id"))
|
||||
{
|
||||
- out->kdf.type = LUKS2_KDF_TYPE_ARGON2I;
|
||||
- if (grub_json_getint64 (&out->kdf.u.argon2i.time, &kdf, "time") ||
|
||||
- grub_json_getint64 (&out->kdf.u.argon2i.memory, &kdf, "memory") ||
|
||||
- grub_json_getint64 (&out->kdf.u.argon2i.cpus, &kdf, "cpus"))
|
||||
+ out->kdf.type = !grub_strcmp (type, "argon2i")
|
||||
+ ? LUKS2_KDF_TYPE_ARGON2I : LUKS2_KDF_TYPE_ARGON2ID;
|
||||
+ if (grub_json_getint64 (&out->kdf.u.argon2.time, &kdf, "time") ||
|
||||
+ grub_json_getint64 (&out->kdf.u.argon2.memory, &kdf, "memory") ||
|
||||
+ grub_json_getint64 (&out->kdf.u.argon2.cpus, &kdf, "cpus"))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Missing Argon2i parameters");
|
||||
}
|
||||
else if (!grub_strcmp (type, "pbkdf2"))
|
||||
@@ -460,6 +462,7 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
switch (k->kdf.type)
|
||||
{
|
||||
case LUKS2_KDF_TYPE_ARGON2I:
|
||||
+ case LUKS2_KDF_TYPE_ARGON2ID:
|
||||
ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Argon2 not supported");
|
||||
goto err;
|
||||
case LUKS2_KDF_TYPE_PBKDF2:
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 06f9480a670d374e1599bf9871f6cd26656418a7 Mon Sep 17 00:00:00 2001
|
||||
From 198cb517f44ada4eb561e3182e61b1598535c51b Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 16:36:22 +0000
|
||||
Subject: [PATCH 12/26] don't print error if module not found
|
||||
Subject: [PATCH 6/9] don't print error if module not found
|
||||
|
||||
still set grub_errno accordingly, and otherwise
|
||||
behave the same. in libreboot, we remove a lot of
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 6ae3d73f8..4c15027fe 100644
|
||||
index eac3ea48d..6d67ba54f 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -511,7 +511,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
|
||||
@@ -510,7 +510,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
|
||||
|
||||
s = grub_dl_find_section (e, ".modname");
|
||||
if (!s)
|
||||
@@ -30,5 +30,5 @@ index 6ae3d73f8..4c15027fe 100644
|
||||
mod->name = grub_strdup ((char *) e + s->sh_offset);
|
||||
if (! mod->name)
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
From 50157401f90366e5b7c8f80ae7bc59c2276f7c35 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 07/15] Compile with Argon2id support
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
Makefile.util.def | 6 +++++-
|
||||
grub-core/Makefile.core.def | 2 +-
|
||||
grub-core/disk/luks2.c | 13 +++++++++++--
|
||||
3 files changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 038253b37..2f19569c9 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -3,7 +3,7 @@ AutoGen definitions Makefile.tpl;
|
||||
library = {
|
||||
name = libgrubkern.a;
|
||||
cflags = '$(CFLAGS_GNULIB)';
|
||||
- cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json';
|
||||
+ cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json -I$(srcdir)/grub-core/lib/argon2';
|
||||
|
||||
common = util/misc.c;
|
||||
common = grub-core/kern/command.c;
|
||||
@@ -36,6 +36,10 @@ library = {
|
||||
common = grub-core/kern/misc.c;
|
||||
common = grub-core/kern/partition.c;
|
||||
common = grub-core/lib/crypto.c;
|
||||
+ common = grub-core/lib/argon2/argon2.c;
|
||||
+ common = grub-core/lib/argon2/core.c;
|
||||
+ common = grub-core/lib/argon2/ref.c;
|
||||
+ common = grub-core/lib/argon2/blake2/blake2b.c;
|
||||
common = grub-core/lib/json/json.c;
|
||||
common = grub-core/disk/luks.c;
|
||||
common = grub-core/disk/luks2.c;
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 0ee65d54d..cd29a9df8 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1242,7 +1242,7 @@ module = {
|
||||
common = disk/luks2.c;
|
||||
common = lib/gnulib/base64.c;
|
||||
cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
|
||||
- cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json';
|
||||
+ cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json -I$(srcdir)/lib/argon2';
|
||||
};
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index bbd8f5579..02cd615d9 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/safemath.h>
|
||||
|
||||
+#include <argon2.h>
|
||||
#include <base64.h>
|
||||
#include <json.h>
|
||||
|
||||
@@ -463,8 +464,16 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
{
|
||||
case LUKS2_KDF_TYPE_ARGON2I:
|
||||
case LUKS2_KDF_TYPE_ARGON2ID:
|
||||
- ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Argon2 not supported");
|
||||
- goto err;
|
||||
+ ret = argon2_hash (k->kdf.u.argon2.time, k->kdf.u.argon2.memory, k->kdf.u.argon2.cpus,
|
||||
+ passphrase, passphraselen, salt, saltlen, area_key, k->area.key_size,
|
||||
+ k->kdf.type == LUKS2_KDF_TYPE_ARGON2I ? Argon2_i : Argon2_id,
|
||||
+ ARGON2_VERSION_NUMBER);
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ grub_dprintf ("luks2", "Argon2 failed: %s\n", argon2_error_message (ret));
|
||||
+ goto err;
|
||||
+ }
|
||||
+ break;
|
||||
case LUKS2_KDF_TYPE_PBKDF2:
|
||||
hash = grub_crypto_lookup_md_by_name (k->kdf.u.pbkdf2.hash);
|
||||
if (!hash)
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 5a1dd3c19307859aac7d1a22a7a0c0c7ffb09ddb Mon Sep 17 00:00:00 2001
|
||||
From e344c1bb1bc0bc4df4cf9c049e1e4ba2daf8c2af Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 17:25:20 +0000
|
||||
Subject: [PATCH 13/14] don't print empty error messages
|
||||
Subject: [PATCH 7/9] don't print empty error messages
|
||||
|
||||
this is part two of the quest to kill the prefix
|
||||
error message. after i disabled prefix-related
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
|
||||
index 53c734de7..7cac53983 100644
|
||||
index ba04b57fb..dab62646d 100644
|
||||
--- a/grub-core/kern/err.c
|
||||
+++ b/grub-core/kern/err.c
|
||||
@@ -107,7 +107,8 @@ grub_print_error (void)
|
||||
@@ -116,7 +116,8 @@ grub_print_error (void)
|
||||
{
|
||||
if (grub_errno != GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -27,5 +27,5 @@ index 53c734de7..7cac53983 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From c8d5481586133d7738a9e2d27b5554470bef719d Mon Sep 17 00:00:00 2001
|
||||
From e390ed303e135f6509889ff1ef3f5e3bcb28e89f Mon Sep 17 00:00:00 2001
|
||||
From: Mate Kukri <km@mkukri.xyz>
|
||||
Date: Mon, 20 May 2024 11:43:35 +0100
|
||||
Subject: [PATCH 14/15] Add native NVMe driver based on SeaBIOS
|
||||
Subject: [PATCH 8/9] Add native NVMe driver based on SeaBIOS
|
||||
|
||||
Tested to successfully boot Debian on QEMU and OptiPlex 3050.
|
||||
|
||||
@@ -31,10 +31,10 @@ index 43635d5ff..2c86dbbf6 100644
|
||||
|
||||
endif
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index cd29a9df8..0034f8c61 100644
|
||||
index fa4bc54aa..c608d0450 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -2682,3 +2682,9 @@ module = {
|
||||
@@ -2768,3 +2768,9 @@ module = {
|
||||
cflags = '-Wno-uninitialized';
|
||||
cppflags = '-I$(srcdir)/lib/libtasn1-grub -I$(srcdir)/tests/asn1/';
|
||||
};
|
||||
@@ -1070,5 +1070,5 @@ index fbf23df7f..186e76f0b 100644
|
||||
|
||||
struct grub_disk;
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From 2f7814e55cbae04cb2b307fee559f40cdc70609c Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 08/15] Make grub-install work with Argon2
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
util/grub-install.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 060246589..059036d3c 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -448,6 +448,8 @@ probe_mods (grub_disk_t disk)
|
||||
{
|
||||
grub_util_cryptodisk_get_abstraction (disk,
|
||||
push_cryptodisk_module, NULL);
|
||||
+ /* HACK: always push argon2 */
|
||||
+ grub_install_push_module ("argon2");
|
||||
have_abstractions = 1;
|
||||
have_cryptodisk = 1;
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From d73ca74ef879bf602274bee6eb24f0080a45d235 Mon Sep 17 00:00:00 2001
|
||||
From 53e9097777bfc3830b9d986e9fd2ff00f40b2aa8 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Menzel <pmenzel@molgen.mpg.de>
|
||||
Date: Mon, 17 May 2021 10:24:36 +0200
|
||||
Subject: [PATCH 26/26] kern/coreboot/mmap: Map to reserved
|
||||
Subject: [PATCH 9/9] kern/coreboot/mmap: Map to reserved
|
||||
|
||||
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
|
||||
|
||||
@@ -33,5 +33,5 @@ index caf8f7cef..2fc316e8d 100644
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
tree="nvme"
|
||||
rev="a68a7dece464c35b1c8d20b98502b6881b103911"
|
||||
rev="280715ec63a3424f5cf1289302cb4ab4e98768f4"
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 6a04ceb244366ddab75ce229afd19687ce35d15a Mon Sep 17 00:00:00 2001
|
||||
From 5e70ef9fa3a6474ec827c15329d13c9c984f147a Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 31 Oct 2021 03:47:05 +0000
|
||||
Subject: [PATCH 01/26] mitigate grub's missing characters for borders/arrow
|
||||
Subject: [PATCH 01/20] mitigate grub's missing characters for borders/arrow
|
||||
characters
|
||||
|
||||
This cleans up the display on the main screen in GRUB.
|
||||
@@ -86,5 +86,5 @@ index 9c383e64a..8ec1dd1e8 100644
|
||||
grub_term_highlight_color = old_color_highlight;
|
||||
geo->timeout_y = geo->first_entry_y + geo->num_entries
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From c18175417d4fa4501dac21ef26b9c30f67ece0fd Mon Sep 17 00:00:00 2001
|
||||
From f87a74e198cea4ee79051fc789a06ad3695ad1db Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sat, 19 Nov 2022 16:30:24 +0000
|
||||
Subject: [PATCH 02/26] say the name libreboot, in the grub menu
|
||||
Subject: [PATCH 02/20] say the name libreboot, in the grub menu
|
||||
|
||||
---
|
||||
grub-core/normal/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c
|
||||
index 96abfda2f..d806db9c4 100644
|
||||
index de9a3f961..1fabb9c86 100644
|
||||
--- a/grub-core/normal/main.c
|
||||
+++ b/grub-core/normal/main.c
|
||||
@@ -209,7 +209,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
@@ -215,7 +215,7 @@ grub_normal_init_page (struct grub_term_output *term,
|
||||
|
||||
grub_term_cls (term);
|
||||
|
||||
@@ -21,5 +21,5 @@ index 96abfda2f..d806db9c4 100644
|
||||
return;
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
From 72b0b0f76b3cc7f03e42322b77400b89c3ccf766 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 03/26] Add CC0 license
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
grub-core/kern/dl.c | 3 ++-
|
||||
util/grub-module-verifierXX.c | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index de8c3aa8d..4a3be8568 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -495,7 +495,8 @@ grub_dl_check_license (grub_dl_t mod, Elf_Ehdr *e)
|
||||
|
||||
if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
|
||||
|| grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
|
||||
- || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
|
||||
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0
|
||||
+ || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=CC0") == 0)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
|
||||
index a42c20bd1..7157a30aa 100644
|
||||
--- a/util/grub-module-verifierXX.c
|
||||
+++ b/util/grub-module-verifierXX.c
|
||||
@@ -236,7 +236,8 @@ check_license (const char * const filename,
|
||||
Elf_Shdr *s = find_section (arch, e, ".module_license", module_size);
|
||||
if (s && (strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3") == 0
|
||||
|| strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3+") == 0
|
||||
- || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0))
|
||||
+ || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0
|
||||
+ || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=CC0") == 0))
|
||||
return;
|
||||
grub_util_error ("%s: incompatible license", filename);
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From dfbfe525d6f138e3db1e683096302045c064096f Mon Sep 17 00:00:00 2001
|
||||
From e647f6b06788022a746e8f38ed2b092013d1d570 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Mon, 30 Oct 2023 22:19:21 +0000
|
||||
Subject: [PATCH 09/26] at_keyboard coreboot: force scancodes2+translate
|
||||
Subject: [PATCH 03/20] at_keyboard coreboot: force scancodes2+translate
|
||||
|
||||
Scan code set 2 with translation should be assumed in
|
||||
every case, as the default starting position.
|
||||
@@ -103,5 +103,5 @@ index f8a129eb7..8207225c2 100644
|
||||
grub_dprintf ("atkeyb", "returned set %d\n", ps2_state.current_set);
|
||||
if (ps2_state.current_set == 2)
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 451ca97719aa9178f3202554c74ab636baece616 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 04/26] Define GRUB_UINT32_MAX
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
include/grub/types.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/include/grub/types.h b/include/grub/types.h
|
||||
index 45079bf65..8c0b30395 100644
|
||||
--- a/include/grub/types.h
|
||||
+++ b/include/grub/types.h
|
||||
@@ -156,6 +156,7 @@ typedef grub_int32_t grub_ssize_t;
|
||||
#define GRUB_SHRT_MAX 0x7fff
|
||||
#define GRUB_SHRT_MIN (-GRUB_SHRT_MAX - 1)
|
||||
#define GRUB_UINT_MAX 4294967295U
|
||||
+#define GRUB_UINT32_MAX 4294967295U
|
||||
#define GRUB_INT_MAX 0x7fffffff
|
||||
#define GRUB_INT_MIN (-GRUB_INT_MAX - 1)
|
||||
#define GRUB_INT32_MAX 2147483647
|
||||
@@ -177,6 +178,13 @@ typedef grub_int32_t grub_ssize_t;
|
||||
#define GRUB_TYPE_U_MAX(type) ((unsigned long long)((typeof (type))(~0)))
|
||||
#define GRUB_TYPE_U_MIN(type) 0ULL
|
||||
|
||||
+# define GRUB_UINT32_C(x) x ## U
|
||||
+# if GRUB_ULONG_MAX >> 31 >> 31 >> 1 == 1
|
||||
+# define GRUB_UINT64_C(x) x##UL
|
||||
+# elif 1
|
||||
+# define GRUB_UINT64_C(x) x##ULL
|
||||
+# endif
|
||||
+
|
||||
typedef grub_uint64_t grub_properly_aligned_t;
|
||||
|
||||
#define GRUB_PROPERLY_ALIGNED_ARRAY(name, size) grub_properly_aligned_t name[((size) + sizeof (grub_properly_aligned_t) - 1) / sizeof (grub_properly_aligned_t)]
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 18f88785a46e6657e1404e1914638f4768d65008 Mon Sep 17 00:00:00 2001
|
||||
From 1f0c3362178d1ad44998a98782bcb1e412af9d79 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Tue, 31 Oct 2023 10:33:28 +0000
|
||||
Subject: [PATCH 10/26] keylayouts: don't print "Unknown key" message
|
||||
Subject: [PATCH 04/20] keylayouts: don't print "Unknown key" message
|
||||
|
||||
on keyboards with stuck keys, this results in GRUB just
|
||||
spewing it repeatedly, preventing use of GRUB.
|
||||
@@ -34,5 +34,5 @@ index aa3ba34f2..445fa0601 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,7 +1,7 @@
|
||||
From afd68d1e132970e4fa8e26e9ca0ccb7efb69dc37 Mon Sep 17 00:00:00 2001
|
||||
From b902f68dacba764fe4d4200cae000cf23385df8e Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 16:14:58 +0000
|
||||
Subject: [PATCH 11/26] don't print missing prefix errors on the screen
|
||||
Subject: [PATCH 05/20] don't print missing prefix errors on the screen
|
||||
|
||||
we do actually set the prefix. this patch modifies
|
||||
grub to still set grub_errno and return accordingly,
|
||||
@@ -85,10 +85,10 @@ index 18de52562..2a0fea6c8 100644
|
||||
}
|
||||
file = try_open_from_prefix (prefix, filename);
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 4a3be8568..6ae3d73f8 100644
|
||||
index de8c3aa8d..eac3ea48d 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -881,7 +881,7 @@ grub_dl_load (const char *name)
|
||||
@@ -880,7 +880,7 @@ grub_dl_load (const char *name)
|
||||
return 0;
|
||||
|
||||
if (! grub_dl_dir) {
|
||||
@@ -98,5 +98,5 @@ index 4a3be8568..6ae3d73f8 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From c75424efa3a6357d4785c7a66721809a642b3968 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 06/26] Error on missing Argon2id parameters
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
grub-core/disk/luks2.c | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index b17cd2115..bbd8f5579 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -39,6 +39,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
||||
enum grub_luks2_kdf_type
|
||||
{
|
||||
LUKS2_KDF_TYPE_ARGON2I,
|
||||
+ LUKS2_KDF_TYPE_ARGON2ID,
|
||||
LUKS2_KDF_TYPE_PBKDF2
|
||||
};
|
||||
typedef enum grub_luks2_kdf_type grub_luks2_kdf_type_t;
|
||||
@@ -91,7 +92,7 @@ struct grub_luks2_keyslot
|
||||
grub_int64_t time;
|
||||
grub_int64_t memory;
|
||||
grub_int64_t cpus;
|
||||
- } argon2i;
|
||||
+ } argon2;
|
||||
struct
|
||||
{
|
||||
const char *hash;
|
||||
@@ -161,10 +162,11 @@ luks2_parse_keyslot (grub_luks2_keyslot_t *out, const grub_json_t *keyslot)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Missing or invalid KDF");
|
||||
else if (!grub_strcmp (type, "argon2i") || !grub_strcmp (type, "argon2id"))
|
||||
{
|
||||
- out->kdf.type = LUKS2_KDF_TYPE_ARGON2I;
|
||||
- if (grub_json_getint64 (&out->kdf.u.argon2i.time, &kdf, "time") ||
|
||||
- grub_json_getint64 (&out->kdf.u.argon2i.memory, &kdf, "memory") ||
|
||||
- grub_json_getint64 (&out->kdf.u.argon2i.cpus, &kdf, "cpus"))
|
||||
+ out->kdf.type = !grub_strcmp (type, "argon2i")
|
||||
+ ? LUKS2_KDF_TYPE_ARGON2I : LUKS2_KDF_TYPE_ARGON2ID;
|
||||
+ if (grub_json_getint64 (&out->kdf.u.argon2.time, &kdf, "time") ||
|
||||
+ grub_json_getint64 (&out->kdf.u.argon2.memory, &kdf, "memory") ||
|
||||
+ grub_json_getint64 (&out->kdf.u.argon2.cpus, &kdf, "cpus"))
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Missing Argon2i parameters");
|
||||
}
|
||||
else if (!grub_strcmp (type, "pbkdf2"))
|
||||
@@ -460,6 +462,7 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
switch (k->kdf.type)
|
||||
{
|
||||
case LUKS2_KDF_TYPE_ARGON2I:
|
||||
+ case LUKS2_KDF_TYPE_ARGON2ID:
|
||||
ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Argon2 not supported");
|
||||
goto err;
|
||||
case LUKS2_KDF_TYPE_PBKDF2:
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 2fe963570ac19e3390a792ca2c195112d4efdc24 Mon Sep 17 00:00:00 2001
|
||||
From 2da7fd383afee0a91c1eeb5120a46e165b9386c3 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 16:36:22 +0000
|
||||
Subject: [PATCH 12/14] don't print error if module not found
|
||||
Subject: [PATCH 06/20] don't print error if module not found
|
||||
|
||||
still set grub_errno accordingly, and otherwise
|
||||
behave the same. in libreboot, we remove a lot of
|
||||
@@ -17,10 +17,10 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
||||
index 6ae3d73f8..4c15027fe 100644
|
||||
index eac3ea48d..6d67ba54f 100644
|
||||
--- a/grub-core/kern/dl.c
|
||||
+++ b/grub-core/kern/dl.c
|
||||
@@ -511,7 +511,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
|
||||
@@ -510,7 +510,7 @@ grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
|
||||
|
||||
s = grub_dl_find_section (e, ".modname");
|
||||
if (!s)
|
||||
@@ -30,5 +30,5 @@ index 6ae3d73f8..4c15027fe 100644
|
||||
mod->name = grub_strdup ((char *) e + s->sh_offset);
|
||||
if (! mod->name)
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
From 801aa8b85d8f3b999f4660cc299a3517e811f0bb Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 07/26] Compile with Argon2id support
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
Makefile.util.def | 6 +++++-
|
||||
grub-core/Makefile.core.def | 2 +-
|
||||
grub-core/disk/luks2.c | 13 +++++++++++--
|
||||
3 files changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.util.def b/Makefile.util.def
|
||||
index 038253b37..2f19569c9 100644
|
||||
--- a/Makefile.util.def
|
||||
+++ b/Makefile.util.def
|
||||
@@ -3,7 +3,7 @@ AutoGen definitions Makefile.tpl;
|
||||
library = {
|
||||
name = libgrubkern.a;
|
||||
cflags = '$(CFLAGS_GNULIB)';
|
||||
- cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json';
|
||||
+ cppflags = '$(CPPFLAGS_GNULIB) -I$(srcdir)/grub-core/lib/json -I$(srcdir)/grub-core/lib/argon2';
|
||||
|
||||
common = util/misc.c;
|
||||
common = grub-core/kern/command.c;
|
||||
@@ -36,6 +36,10 @@ library = {
|
||||
common = grub-core/kern/misc.c;
|
||||
common = grub-core/kern/partition.c;
|
||||
common = grub-core/lib/crypto.c;
|
||||
+ common = grub-core/lib/argon2/argon2.c;
|
||||
+ common = grub-core/lib/argon2/core.c;
|
||||
+ common = grub-core/lib/argon2/ref.c;
|
||||
+ common = grub-core/lib/argon2/blake2/blake2b.c;
|
||||
common = grub-core/lib/json/json.c;
|
||||
common = grub-core/disk/luks.c;
|
||||
common = grub-core/disk/luks2.c;
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index 0ee65d54d..cd29a9df8 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -1242,7 +1242,7 @@ module = {
|
||||
common = disk/luks2.c;
|
||||
common = lib/gnulib/base64.c;
|
||||
cflags = '$(CFLAGS_POSIX) $(CFLAGS_GNULIB)';
|
||||
- cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json';
|
||||
+ cppflags = '$(CPPFLAGS_POSIX) $(CPPFLAGS_GNULIB) -I$(srcdir)/lib/json -I$(srcdir)/lib/argon2';
|
||||
};
|
||||
|
||||
module = {
|
||||
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
|
||||
index bbd8f5579..02cd615d9 100644
|
||||
--- a/grub-core/disk/luks2.c
|
||||
+++ b/grub-core/disk/luks2.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/safemath.h>
|
||||
|
||||
+#include <argon2.h>
|
||||
#include <base64.h>
|
||||
#include <json.h>
|
||||
|
||||
@@ -463,8 +464,16 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
{
|
||||
case LUKS2_KDF_TYPE_ARGON2I:
|
||||
case LUKS2_KDF_TYPE_ARGON2ID:
|
||||
- ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Argon2 not supported");
|
||||
- goto err;
|
||||
+ ret = argon2_hash (k->kdf.u.argon2.time, k->kdf.u.argon2.memory, k->kdf.u.argon2.cpus,
|
||||
+ passphrase, passphraselen, salt, saltlen, area_key, k->area.key_size,
|
||||
+ k->kdf.type == LUKS2_KDF_TYPE_ARGON2I ? Argon2_i : Argon2_id,
|
||||
+ ARGON2_VERSION_NUMBER);
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ grub_dprintf ("luks2", "Argon2 failed: %s\n", argon2_error_message (ret));
|
||||
+ goto err;
|
||||
+ }
|
||||
+ break;
|
||||
case LUKS2_KDF_TYPE_PBKDF2:
|
||||
hash = grub_crypto_lookup_md_by_name (k->kdf.u.pbkdf2.hash);
|
||||
if (!hash)
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 97381d8c85c0934ca500f07339d89f9f6245b079 Mon Sep 17 00:00:00 2001
|
||||
From 5c26d4bb0cc69cb9f4b9e4f6de794f309d5210f4 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Rowe <leah@libreboot.org>
|
||||
Date: Sun, 5 Nov 2023 17:25:20 +0000
|
||||
Subject: [PATCH 13/15] don't print empty error messages
|
||||
Subject: [PATCH 07/20] don't print empty error messages
|
||||
|
||||
this is part two of the quest to kill the prefix
|
||||
error message. after i disabled prefix-related
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Leah Rowe <leah@libreboot.org>
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/grub-core/kern/err.c b/grub-core/kern/err.c
|
||||
index 53c734de7..7cac53983 100644
|
||||
index ba04b57fb..dab62646d 100644
|
||||
--- a/grub-core/kern/err.c
|
||||
+++ b/grub-core/kern/err.c
|
||||
@@ -107,7 +107,8 @@ grub_print_error (void)
|
||||
@@ -116,7 +116,8 @@ grub_print_error (void)
|
||||
{
|
||||
if (grub_errno != GRUB_ERR_NONE)
|
||||
{
|
||||
@@ -27,5 +27,5 @@ index 53c734de7..7cac53983 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From c114684bb103af427296e40b78adc0d036a9b237 Mon Sep 17 00:00:00 2001
|
||||
From: Ax333l <main@axelen.xyz>
|
||||
Date: Thu, 17 Aug 2023 00:00:00 +0000
|
||||
Subject: [PATCH 08/26] Make grub-install work with Argon2
|
||||
|
||||
Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
|
||||
---
|
||||
util/grub-install.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/util/grub-install.c b/util/grub-install.c
|
||||
index 060246589..059036d3c 100644
|
||||
--- a/util/grub-install.c
|
||||
+++ b/util/grub-install.c
|
||||
@@ -448,6 +448,8 @@ probe_mods (grub_disk_t disk)
|
||||
{
|
||||
grub_util_cryptodisk_get_abstraction (disk,
|
||||
push_cryptodisk_module, NULL);
|
||||
+ /* HACK: always push argon2 */
|
||||
+ grub_install_push_module ("argon2");
|
||||
have_abstractions = 1;
|
||||
have_cryptodisk = 1;
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
From 1c5716f42deb27b1111839b9782fd06b077eaa90 Mon Sep 17 00:00:00 2001
|
||||
From b47687966ebad85b16d58469237b048c10f86610 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Sun, 15 Nov 2020 19:00:27 +0100
|
||||
Subject: [PATCH 14/26] grub-core/bus/usb: Parse SuperSpeed companion
|
||||
Subject: [PATCH 08/20] grub-core/bus/usb: Parse SuperSpeed companion
|
||||
descriptors
|
||||
|
||||
Parse the SS_ENDPOINT_COMPANION descriptor, which is only present on USB 3.0
|
||||
@@ -161,7 +161,7 @@ index f5608e330..2ae29cba1 100644
|
||||
if ((endp->endp_addr & 128) && grub_usb_get_ep_type(endp)
|
||||
== GRUB_USB_EP_INTERRUPT)
|
||||
diff --git a/grub-core/commands/usbtest.c b/grub-core/commands/usbtest.c
|
||||
index 2c6d93fe6..55a657635 100644
|
||||
index 3184ac9af..7d128449d 100644
|
||||
--- a/grub-core/commands/usbtest.c
|
||||
+++ b/grub-core/commands/usbtest.c
|
||||
@@ -185,7 +185,7 @@ usb_iterate (grub_usb_device_t dev, void *data __attribute__ ((unused)))
|
||||
@@ -242,5 +242,5 @@ index aac5ab05a..bb2ab2e27 100644
|
||||
{
|
||||
grub_uint8_t length;
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 260f27e1ea1dbcdeb63d4411dbdddb97ebb39668 Mon Sep 17 00:00:00 2001
|
||||
From 05b2607120d0ccfb826bc83d4f4d2741f4f0a6a1 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Mon, 7 Dec 2020 08:41:22 +0100
|
||||
Subject: [PATCH 15/26] usb: Add enum for xHCI
|
||||
Subject: [PATCH 09/20] usb: Add enum for xHCI
|
||||
|
||||
Will be used in future patches.
|
||||
|
||||
@@ -25,5 +25,5 @@ index 688c11f6d..ea6ee8c2c 100644
|
||||
|
||||
typedef int (*grub_usb_iterate_hook_t) (grub_usb_device_t dev, void *data);
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 97f71a34c011ad9d37b96c02eb7483fe253c6025 Mon Sep 17 00:00:00 2001
|
||||
From 8de1eafa067bfaae5d58ca0c5616e159356dc6c8 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Mon, 7 Dec 2020 08:41:23 +0100
|
||||
Subject: [PATCH 16/26] usbtrans: Set default maximum packet size
|
||||
Subject: [PATCH 10/20] usbtrans: Set default maximum packet size
|
||||
|
||||
Set the maximum packet size to 512 for SuperSpeed devices.
|
||||
|
||||
@@ -29,5 +29,5 @@ index c5680b33a..c1080bb33 100644
|
||||
max = 64;
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From ea5081844c3112b582f52360cfb14ef95b56f5e1 Mon Sep 17 00:00:00 2001
|
||||
From 4cda4c986931067b1442c165d6d207d6948529b8 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Sun, 15 Nov 2020 19:51:42 +0100
|
||||
Subject: [PATCH 17/26] grub-core/bus/usb: Add function pointer for
|
||||
Subject: [PATCH 11/20] grub-core/bus/usb: Add function pointer for
|
||||
attach/detach events
|
||||
|
||||
The xHCI code needs to be called for attaching or detaching a device.
|
||||
@@ -117,5 +117,5 @@ index ea6ee8c2c..4dd179db2 100644
|
||||
grub_uint64_t pending_reset;
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 7db1cdd1cdbb79a8da04648dcbf7318d200f72a4 Mon Sep 17 00:00:00 2001
|
||||
From e29dd6f6ccc73f2e4c04261c0367e1c6a0dbbce6 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Mon, 7 Dec 2020 08:41:25 +0100
|
||||
Subject: [PATCH 18/26] grub-core/bus/usb/usbhub: Add new private fields for
|
||||
Subject: [PATCH 12/20] grub-core/bus/usb/usbhub: Add new private fields for
|
||||
xHCI controller
|
||||
|
||||
Store the root port number, the route, consisting out of the port ID
|
||||
@@ -73,5 +73,5 @@ index 4dd179db2..609faf7d0 100644
|
||||
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 6b34ac2449362da5139e702e484a432d828a505d Mon Sep 17 00:00:00 2001
|
||||
From aa09b16597347353c561f55a32eb27f662b41053 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Mon, 7 Dec 2020 08:41:26 +0100
|
||||
Subject: [PATCH 19/26] grub-core/bus/usb: Add xhci support
|
||||
Subject: [PATCH 13/20] grub-core/bus/usb: Add xhci support
|
||||
|
||||
Add support for xHCI USB controllers.
|
||||
The code is based on seabios implementation, but has been heavily
|
||||
@@ -67,10 +67,10 @@ index 43635d5ff..65016f856 100644
|
||||
|
||||
endif
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index cd29a9df8..d3947739f 100644
|
||||
index fa4bc54aa..208badbdf 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -667,6 +667,13 @@ module = {
|
||||
@@ -675,6 +675,13 @@ module = {
|
||||
enable = arm_coreboot;
|
||||
};
|
||||
|
||||
@@ -2803,5 +2803,5 @@ index 609faf7d0..eb71fa1c7 100644
|
||||
|
||||
#endif /* GRUB_USB_H */
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From d84ac94dc55baad9a2297980b2017cd22e4ecb3c Mon Sep 17 00:00:00 2001
|
||||
From 861b218be772b8abf090647fc24eb7c7ccc1d2db Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Mon, 7 Dec 2020 08:41:27 +0100
|
||||
Subject: [PATCH 20/26] grub-core/bus/usb/usbhub: Add xHCI non root hub support
|
||||
Subject: [PATCH 14/20] grub-core/bus/usb/usbhub: Add xHCI non root hub support
|
||||
|
||||
Tested on Intel PCH C246, the USB3 hub can be configured by grub.
|
||||
|
||||
@@ -123,5 +123,5 @@ index 039ebed65..d6c3f71dc 100644
|
||||
#define GRUB_USB_FEATURE_ENDP_HALT 0x00
|
||||
#define GRUB_USB_FEATURE_DEV_REMOTE_WU 0x01
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 0433c5bb1e40fba93205e1c9fd6b1b397d31ae5a Mon Sep 17 00:00:00 2001
|
||||
From 0a1a2f3a2f4b3908f094133c86fda0e882dabda5 Mon Sep 17 00:00:00 2001
|
||||
From: Sven Anderson <sven@anderson.de>
|
||||
Date: Sat, 28 May 2022 21:39:23 +0200
|
||||
Subject: [PATCH 21/26] xHCI: also accept SBRN 0x31 and 0x32
|
||||
Subject: [PATCH 15/20] xHCI: also accept SBRN 0x31 and 0x32
|
||||
|
||||
Signed-off-by: Sven Anderson <sven@anderson.de>
|
||||
---
|
||||
@@ -22,5 +22,5 @@ index a5bd3c97d..cde21f57a 100644
|
||||
grub_dprintf ("xhci", "XHCI grub_xhci_pci_iter: Wrong SBRN: %0x\n",
|
||||
release);
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From d300f12cb624998f3d5ab5948c3fc64d6d7baf4f Mon Sep 17 00:00:00 2001
|
||||
From 9343cdda106d47561f25ce1e39a86d62cb0bfd08 Mon Sep 17 00:00:00 2001
|
||||
From: Sven Anderson <sven@anderson.de>
|
||||
Date: Mon, 13 Jan 2025 19:51:41 +0100
|
||||
Subject: [PATCH 22/26] xhci: fix port indexing
|
||||
Subject: [PATCH 16/20] xhci: fix port indexing
|
||||
|
||||
---
|
||||
grub-core/bus/usb/xhci.c | 10 +++++-----
|
||||
@@ -39,5 +39,5 @@ index f4591ffb5..dc89b9619 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 0a669ef9815267de4fb14f3c329431ac531755c9 Mon Sep 17 00:00:00 2001
|
||||
From 41e966e3054862e1921e14bd2ecec3bfb20cba8f Mon Sep 17 00:00:00 2001
|
||||
From: Sven Anderson <sven@anderson.de>
|
||||
Date: Mon, 13 Jan 2025 20:26:32 +0100
|
||||
Subject: [PATCH 23/26] xhci: configure TT for non-root-hubs
|
||||
Subject: [PATCH 17/20] xhci: configure TT for non-root-hubs
|
||||
|
||||
---
|
||||
grub-core/bus/usb/usbhub.c | 6 +++++
|
||||
@@ -94,5 +94,5 @@ index eb71fa1c7..df97a60cc 100644
|
||||
|
||||
grub_usb_err_t grub_usb_get_descriptor (grub_usb_device_t dev,
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 625fdcf42f2cf11a4bfe644412450c9e4f551d25 Mon Sep 17 00:00:00 2001
|
||||
From 114346473d1e5d3660ea0dae4ed9f4c8ad98bbeb Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
Date: Wed, 24 Feb 2021 08:25:41 +0100
|
||||
Subject: [PATCH 24/26] Fix compilation on x86_64
|
||||
Subject: [PATCH 18/20] Fix compilation on x86_64
|
||||
|
||||
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
|
||||
---
|
||||
@@ -86,5 +86,5 @@ index 88c9ac57f..9b9bae6e5 100644
|
||||
}
|
||||
else
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
From 1ede42b39a87ccb2cc43d919f3ee4803d6551102 Mon Sep 17 00:00:00 2001
|
||||
From 2b255ee97a48f280a20acd807386bec52ea447c8 Mon Sep 17 00:00:00 2001
|
||||
From: Mate Kukri <km@mkukri.xyz>
|
||||
Date: Mon, 20 May 2024 11:43:35 +0100
|
||||
Subject: [PATCH 25/26] Add native NVMe driver based on SeaBIOS
|
||||
Subject: [PATCH 19/20] Add native NVMe driver based on SeaBIOS
|
||||
|
||||
Tested to successfully boot Debian on QEMU and OptiPlex 3050.
|
||||
|
||||
@@ -31,10 +31,10 @@ index 65016f856..7bc0866ba 100644
|
||||
|
||||
endif
|
||||
diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def
|
||||
index d3947739f..fb9f24c0f 100644
|
||||
index 208badbdf..219282524 100644
|
||||
--- a/grub-core/Makefile.core.def
|
||||
+++ b/grub-core/Makefile.core.def
|
||||
@@ -2689,3 +2689,9 @@ module = {
|
||||
@@ -2775,3 +2775,9 @@ module = {
|
||||
cflags = '-Wno-uninitialized';
|
||||
cppflags = '-I$(srcdir)/lib/libtasn1-grub -I$(srcdir)/tests/asn1/';
|
||||
};
|
||||
@@ -1070,5 +1070,5 @@ index fbf23df7f..186e76f0b 100644
|
||||
|
||||
struct grub_disk;
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
From 9228fa35d5af64e67a33372231baa3862f6fad67 Mon Sep 17 00:00:00 2001
|
||||
From 4ece79a5e4708b96c2fd06a80b1aac0b6e232675 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Menzel <pmenzel@molgen.mpg.de>
|
||||
Date: Mon, 17 May 2021 10:24:36 +0200
|
||||
Subject: [PATCH 15/15] kern/coreboot/mmap: Map to reserved
|
||||
Subject: [PATCH 20/20] kern/coreboot/mmap: Map to reserved
|
||||
|
||||
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=6de9ee86bf9ae50967413e6a73b5dfd13e5ffb50
|
||||
|
||||
@@ -33,5 +33,5 @@ index caf8f7cef..2fc316e8d 100644
|
||||
return 1;
|
||||
}
|
||||
--
|
||||
2.39.5
|
||||
2.47.3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
tree="xhci_nvme"
|
||||
rev="a68a7dece464c35b1c8d20b98502b6881b103911"
|
||||
rev="280715ec63a3424f5cf1289302cb4ab4e98768f4"
|
||||
|
||||
Reference in New Issue
Block a user