Verifier running out of memory on ieee1275/powerpc64

2020-03-17 Thread Stefan Berger
Hello!  I trying to add (v)TPM support for the ieee1275/powerpc64 platform to grub. The issue I have been running into is that the verifier runs out of memory. At that point it has loaded the (~ 32MB) Linux kernel and now the verifier is invoked to load the file. Unfortunately it cannot load

Re: Verifier running out of memory on ieee1275/powerpc64

2020-03-18 Thread Stefan Berger
On 3/18/20 11:59 AM, Simon Hardy wrote: The 2020/03/17 13:15, Stefan Berger wrote:  I trying to add (v)TPM support for the ieee1275/powerpc64 platform to grub. The issue I have been running into is that the verifier runs out of memory. At that point it has loaded the (~ 32MB) Linux kernel and

Re: Verifier running out of memory on ieee1275/powerpc64

2020-03-18 Thread Stefan Berger
On 3/18/20 3:32 PM, Stefan Berger wrote: On 3/18/20 11:59 AM, Simon Hardy wrote: The 2020/03/17 13:15, Stefan Berger wrote:   I trying to add (v)TPM support for the ieee1275/powerpc64 platform to grub. The issue I have been running into is that the verifier runs out of memory. At that point

Re: Verifier running out of memory on ieee1275/powerpc64

2020-03-19 Thread Stefan Berger
On 3/18/20 6:17 PM, Simon Hardy wrote: I was wondering whether it would not be possible to load the raw file into memory, pass it to the firmware for hashing (and logging) via the verifier, and if we do not trust that the firmware treated the file data as a read-only array, load the file again in

Re: [PATCH v2 05/22] docs/grub: Document signing grub under UEFI

2021-07-12 Thread Stefan Berger
On 6/30/21 4:40 AM, Daniel Axtens wrote: Before adding information about how grub is signed with an appended signature scheme, it's worth adding some information about how it can currently be signed for UEFI. Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- docs/grub

Re: [PATCH v2 06/22] docs/grub: Document signing grub with an appended signature

2021-07-12 Thread Stefan Berger
g. on powerpc-ieee1275, to the PReP partition) +@end group +@end example + +As with UEFI secure boot, it is necessary to build in the required modules, +or sign them separately. + + @node Platform limitations @chapter Platform limitations Reviewed-by: Stefan Berger _

Re: [PATCH v2 02/22] ieee1275: claim more memory

2021-07-12 Thread Stefan Berger
grub with this change under SLOF and PFW. Signed-off-by: Daniel Axtens Tested-by: Stefan Berger --- docs/grub-dev.texi | 6 ++- grub-core/kern/ieee1275/init.c | 81 +++--- 2 files changed, 69 insertions(+), 18 deletions(-) diff --git a/docs/gru

Re: [PATCH v2 03/22] ieee1275: request memory with ibm, client-architecture-support

2021-07-12 Thread Stefan Berger
wer the amount of memory your partition has below 512MB.) Signed-off-by: Daniel Axtens Tested-by: Stefan Berger --- grub-core/kern/ieee1275/cmain.c | 3 + grub-core/kern/ieee1275/init.c | 144 ++- include/grub/ieee1275/ieee1275.h | 6 ++ 3 files

Re: [PATCH v2 01/22] ieee1275: drop HEAP_MAX_ADDR, HEAP_MIN_SIZE

2021-07-12 Thread Stefan Berger
these patches it runs out of memory. From what I can see they work fine. Tested-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 17 - 1 file changed, 17 deletions(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index d483e35eed2b..

Re: [PATCH v2 08/22] pgp: factor out rsa_pad

2021-07-12 Thread Stefan Berger
is just to spin rsa_pad out into its own PKCS#1 v1.5 module. Signed-off-by: Daniel Axtens This an almost straight move of code from one function into another one: Reviewed-by: Stefan Berger --- grub-core/Makefile.core.def | 8 + grub-core/commands/pgp.c| 28 ++ gru

Re: [PATCH v2 07/22] dl: provide a fake grub_dl_set_persistent for the emu target

2021-07-12 Thread Stefan Berger
persistent modules) Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- include/grub/dl.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/grub/dl.h b/include/grub/dl.h index b3753c9ca262..5decbe2f2fb9 100644 --- a/include/grub/dl.h +++ b/include/grub/dl.h

Re: [PATCH v2 13/22] libtasn1: changes for grub compatibility

2021-07-12 Thread Stefan Berger
all to grub_divmod64, preventing creation of __udivdi3 calls on 32 bit platforms. Signed-off-by: Daniel Axtens --- v2: Clean up strcat handling, thanks Stefan Berger. --- grub-core/lib/libtasn1/lib/decoding.c | 11 ++- grub-core/lib/libtasn1/lib/element.c| 3 ++- grub-core/lib

Re: [PATCH v2 04/22] Add suport for signing grub with an appended signature

2021-07-12 Thread Stefan Berger
On 6/30/21 4:40 AM, Daniel Axtens wrote: From: Rashmica Gupta Add infrastructure to allow firmware to verify the integrity of grub by use of a Linux-kernel-module-style appended signature. We initially target powerpc-ieee1275, but the code should be extensible to other platforms. Usually thes

Re: [PATCH v2 09/22] crypto: move storage for grub_crypto_pk_* to crypto.c

2021-07-12 Thread Stefan Berger
etc) use grub_crypto_lookup_cipher_by_name() to get a cipher handle. That depends on grub_ciphers being populated by people calling grub_cipher_register. import_gcry.py ensures that the symmetric ciphers call it.] Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- grub-core/comma

Re: [PATCH v2 10/22] posix_wrap: tweaks in preparation for libtasn1

2021-07-12 Thread Stefan Berger
bits on all our platforms, including 64 bit platforms, so we also use that value. - Provide strto[u]l[l] preprocessor macros that resolve to grub_strto[u]l[l]. To avoid gcrypt redefining strtoul, we also define HAVE_STRTOUL here. Signed-off-by: Daniel Axtens Reviewed-by

Re: [PATCH v2 14/22] libtasn1: compile into asn1 module

2021-07-12 Thread Stefan Berger
On 6/30/21 4:40 AM, Daniel Axtens wrote: Create a wrapper file that specifies the module license. Set up the makefile so it is built. Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- grub-core/Makefile.core.def| 15 +++ grub-core/lib/libtasn1_wrap

[PATCH] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-12 Thread Stefan Berger
From: Stefan Berger Add support for trusted boot using a vTPM 2.0 on the IBM ieee1275 platform. With this patch grub now measures text and binary data into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform does. This patch requires Daniel Axtens's patches for claiming m

Re: [PATCH v2 16/22] grub-install: support embedding x509 certificates

2021-07-12 Thread Stefan Berger
grub core image in the same way as PGP keys. Signed-off-by: Alastair D'Silva Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- grub-core/commands/pgp.c| 2 +- include/grub/kernel.h | 3 ++- include/grub/util/install.h | 7 +-- util/grub-install-comm

Re: [PATCH] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-14 Thread Stefan Berger
On 7/14/21 12:16 PM, Daniel Kiper wrote: CC-ing folks CC-ed in Daniel's patch series and Eric. On Mon, Jul 12, 2021 at 03:02:19PM -0400, Stefan Berger wrote: From: Stefan Berger Add support for trusted boot using a vTPM 2.0 on the IBM ieee1275 platform. With this patch grub now mea

Re: [PATCH v2 17/22] appended signatures: import GNUTLS's ASN.1 description files

2021-07-19 Thread Stefan Berger
/857543cc24114431dd5dde0e83c2c44b9b7e6050/lib/pkix_asn1_tab.c Reviewed-by: Stefan Berger --- .../commands/appendedsig/gnutls_asn1_tab.c| 121 + .../commands/appendedsig/pkix_asn1_tab.c | 484 ++ 2 files changed, 605 insertions(+) create mode 100644 grub-core/commands

Re: [PATCH v2 18/22] appended signatures: parse PKCS#7 signedData and X.509 certificates

2021-07-19 Thread Stefan Berger
rious code and comment cleanups. Thanks to Nayna Jain and Stefan Berger for their reviews. revert Signed-off-by: Daniel Axtens --- grub-core/commands/appendedsig/appendedsig.h | 118 ++ grub-core/commands/appendedsig/asn1util.c| 103 ++ grub-core/commands/appendedsig/pkcs7.c |

Re: [PATCH v2 22/22] ieee1275: enter lockdown based on /ibm,secure-boot

2021-07-19 Thread Stefan Berger
On 6/30/21 4:40 AM, Daniel Axtens wrote: If the 'ibm,secure-boot' property of the root node is 2 or greater, enter lockdown. Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- docs/grub.texi | 4 ++-- grub-core/Makefile.core.def| 1 + grub

Re: [PATCH v2 21/22] appended signatures: documentation

2021-07-19 Thread Stefan Berger
On 6/30/21 4:40 AM, Daniel Axtens wrote: This explains how appended signatures can be used to form part of a secure boot chain, and documents the commands and variables introduced. Signed-off-by: Daniel Axtens One small thing below. --- v2: fix a grammar issue, thanks Stefan Berger

Re: [PATCH v2 19/22] appended signatures: support verifying appended signatures

2021-07-19 Thread Stefan Berger
signatures - Support multiple signers - Use an enum rather than 0, 1 and 2 for various signature enforcement states. - Spin out a file reading function that was duplicated. - Fix some code style and clarity issues. Thanks to Nayna Jain and Stefan Berger for their reviews. Revert "f

Re: [PATCH v2 20/22] appended signatures: verification tests

2021-07-20 Thread Stefan Berger
On 6/30/21 4:40 AM, Daniel Axtens wrote: These tests are run through all_functional_test and test a range of commands and behaviours. Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger --- v2 changes: - add a test for EKU - add tests for files signed with multiple signers

Re: [PATCH] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-20 Thread Stefan Berger
On 7/14/21 12:16 PM, Daniel Kiper wrote: Signed-off-by: Stefan Berger --- grub-core/Makefile.core.def | 8 ++ grub-core/commands/ieee1275/ibmvtpm.c | 118 ++ grub-core/kern/ieee1275/ibmvtpm.c | 62 ++ include/grub/ieee1275/ibmvtpm.h

[PATCH v2 1/4] ieee1275: drop HEAP_MAX_ADDR, HEAP_MIN_SIZE

2021-07-20 Thread Stefan Berger
potentially override the HEAP_MAX_ADDR check. It is now unused. Remove it. Signed-off-by: Daniel Axtens Tested-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 17 - 1 file changed, 17 deletions(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee12

[PATCH v2 4/4] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-20 Thread Stefan Berger
From: Stefan Berger Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 PowerPC platform. With this patch grub now measures text and binary data into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform does. Cc: Eric Snowberg Signed-off-by: Stefan Berger ---

[PATCH v2 3/4] ieee1275: request memory with ibm, client-architecture-support

2021-07-20 Thread Stefan Berger
oots. (phyp is super sticky with the RMA size - it persists even on cold boots. So if you've ever booted Linux in a partition, you'll probably never have grub call CAS. It'll only ever fire the first time a partition loads grub, or if you deliberately lower the amount of memory y

[PATCH v2 2/4] ieee1275: claim more memory

2021-07-20 Thread Stefan Berger
ernel. So we can't address memory beyond 4GB. This gives a natural cap of 1GB for powerpc-ieee1275. Also apply this 1/4 approach to i386-ieee1275, but keep the 32MB cap. make check still works for both i386 and powerpc and I've booted powerpc grub with this change under SLOF and PFW. Sign

[PATCH v2 0/4] Add support for trusted boot on IBM PPC platform

2021-07-20 Thread Stefan Berger
From: Stefan Berger This series of patches adds support for trusted boot using vTPM on the IBM IEEE1275 PowerPC platform. Stefan v2: - Prepended Daniel's patches to claim more memory on IBM platform - Added documentation to vTPM patch and major refactoring following Daniels&#x

Re: [PATCH v2 11/22] libtasn1: import libtasn1-4.16.0

2021-07-20 Thread Stefan Berger
Acked-by: Stefan Berger ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH v2 12/22] libtasn1: disable code not needed in grub

2021-07-20 Thread Stefan Berger
n the future. With these exclusions we also avoid the need for minmax.h, which is convenient because it means we don't have to import it from gnulib. Signed-off-by: Daniel Axtens Reviewed-by: Stefan Berger ___ Grub-devel mailing list Grub-dev

Re: [PATCH v2 1/4] ieee1275: drop HEAP_MAX_ADDR, HEAP_MIN_SIZE

2021-07-21 Thread Stefan Berger
On 7/21/21 10:36 AM, Daniel Kiper wrote: On Tue, Jul 20, 2021 at 05:14:46PM -0400, Stefan Berger wrote: From: Daniel Axtens HEAP_MAX_ADDR is confusing. Currently it is set to 32MB, except on ieee1275 on x86, where it is 64MB. There is a comment which purports to explain it: /* If possible

Re: [PATCH v2 02/22] ieee1275: claim more memory

2021-07-21 Thread Stefan Berger
On 7/21/21 10:45 AM, Daniel Kiper wrote: On Fri, Jul 16, 2021 at 05:59:20AM +0200, Patrick Steinhardt wrote: On Thu, Jul 15, 2021 at 11:51:04PM +0200, Daniel Kiper wrote: CC-in a few people who can be interested in this... On Wed, Jun 30, 2021 at 06:40:11PM +1000, Daniel Axtens wrote: On pow

Re: [PATCH v2 02/22] ieee1275: claim more memory

2021-07-22 Thread Stefan Berger
On 7/21/21 10:45 AM, Daniel Kiper wrote: On Fri, Jul 16, 2021 at 05:59:20AM +0200, Patrick Steinhardt wrote: I think that my [1] should solve the issue generically. Instead of bumping any of the static limits we have in place, we just drop them altogether in favor of dynamically requesting add

Re: [PATCH v2 4/4] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-29 Thread Stefan Berger
On 7/28/21 9:25 AM, Daniel Kiper wrote: On Tue, Jul 20, 2021 at 05:14:49PM -0400, Stefan Berger wrote: +#define IEEE1275_CELL_TRUE ((grub_ieee1275_cell_t) -1) This smells like global constant. Does not it? If yes could you define it in a global header and use it? Maybe even replace

Re: [PATCH v2 4/4] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-30 Thread Stefan Berger
On 7/30/21 8:44 AM, Daniel Kiper wrote: On Thu, Jul 29, 2021 at 09:30:49AM -0400, Stefan Berger wrote: On 7/28/21 9:25 AM, Daniel Kiper wrote: On Tue, Jul 20, 2021 at 05:14:49PM -0400, Stefan Berger wrote: +#define IEEE1275_CELL_TRUE ((grub_ieee1275_cell_t) -1) This smells like global

[PATCH v3 4/4] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2021-07-30 Thread Stefan Berger
From: Stefan Berger Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 PowerPC platform. With this patch grub now measures text and binary data into the TPM's PCRs 8 and 9 in the same way as the x86_64 platform does. This patch requires Daniel Axtens's patches for cla

[PATCH v3 3/4] ieee1275: request memory with ibm, client-architecture-support

2021-07-30 Thread Stefan Berger
oots. (phyp is super sticky with the RMA size - it persists even on cold boots. So if you've ever booted Linux in a partition, you'll probably never have grub call CAS. It'll only ever fire the first time a partition loads grub, or if you deliberately lower the amount of memory y

[PATCH v3 2/4] ieee1275: claim more memory

2021-07-30 Thread Stefan Berger
ernel. So we can't address memory beyond 4GB. This gives a natural cap of 1GB for powerpc-ieee1275. Also apply this 1/4 approach to i386-ieee1275, but keep the 32MB cap. make check still works for both i386 and powerpc and I've booted powerpc grub with this change under SLOF and PFW. Sign

[PATCH v3 0/4] Add support for trusted boot on IBM PPC platform

2021-07-30 Thread Stefan Berger
From: Stefan Berger This series of patches adds support for trusted boot using vTPM on the IBM IEEE1275 PowerPC platform. Stefan v3: - Rebased on latest master - Moving #defines from ieee1275.c to ieee1275.h - More refactoring in patch 4 v2: - Prepended Daniel's patches to

[PATCH v3 1/4] ieee1275: Move #defines into common ieee1275.h header

2021-07-30 Thread Stefan Berger
From: Stefan Berger Move some #defines from ieee1275.c into the common ieee1275.h header file. Adjust the case used in IHANDLE_INVALID to use proper ihandle_t. Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/ieee1275.c | 29 - include/grub/ieee1275

Re: [PATCH v3 2/4] ieee1275: claim more memory

2021-08-04 Thread Stefan Berger
On 8/4/21 7:19 AM, Daniel Kiper wrote: CC-ing Patrick. On Fri, Jul 30, 2021 at 11:45:38AM -0400, Stefan Berger wrote: From: Daniel Axtens On powerpc-ieee1275, we are running out of memory trying to verify anything. This is because: - we have to load an entire file into memory to verify

Re: [PATCH v3 1/4] ieee1275: Move #defines into common ieee1275.h header

2021-08-05 Thread Stefan Berger
On 7/30/21 11:45 AM, Stefan Berger wrote: From: Stefan Berger Move some #defines from ieee1275.c into the common ieee1275.h header file. Adjust the case used in IHANDLE_INVALID to use proper ihandle_t. Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/ieee1275.c | 29

Re: [PATCH v2 00/15] Dynamic allocation of memory regions and IBM vTPM v2

2022-05-18 Thread Stefan Berger
On 4/14/22 11:30, Daniel Kiper wrote: On Thu, Apr 07, 2022 at 04:41:04PM +0200, Daniel Kiper wrote: On Mon, Mar 28, 2022 at 05:22:25PM +1100, Daniel Axtens wrote: Hi all, This is, at long last, an updated version of my series extending Patrick's dynamic memory regions to ieee1275. Noteworth

Re: [PATCH 2/6] ieee1275/powerpc: enables device mapper discovery

2024-03-15 Thread Stefan Berger
On 3/15/24 00:06, Michael Chang via Grub-devel wrote: On Mon, May 08, 2023 at 01:58:36PM +, Avnish Chouhan wrote: From: Diego Domingos This patch enables the device mapper discovery on ofpath.c. Currently, when we are dealing with a device like /dev/dm-* the ofpath returns null since the

Re: [PATCH v10 10/20] tpm2: Add TPM Software Stack (TSS)

2024-04-09 Thread Stefan Berger
On 4/9/24 04:30, Gary Lin via Grub-devel wrote: From: Hernan Gatta A Trusted Platform Module (TPM) Software Stack (TSS) provides logic to compose, submit, and parse TPM commands and responses. A limited number of TPM commands may be accessed via the EFI TCG2 protocol. This protocol exposes f

Re: [PATCH v11 10/20] tpm2: Add TPM Software Stack (TSS)

2024-04-12 Thread Stefan Berger
On 4/12/24 04:39, Gary Lin wrote: From: Hernan Gatta A Trusted Platform Module (TPM) Software Stack (TSS) provides logic to compose, submit, and parse TPM commands and responses. compose and submit TPM commands and parse reponses. A limited number of TPM commands may be accessed via the E

Re: [PATCH v10 20/20] tests: Add tpm2_test

2024-04-12 Thread Stefan Berger
On 4/9/24 04:30, Gary Lin via Grub-devel wrote: For the tpm2 module, the TCG2 command submission function is the only difference between the a QEMU instance and grub-emu. To test TPM key unsealing with a QEMU instance, it requires an extra OS image to invoke grub-protect to seal the LUKS key, r

Re: [PATCH v11 14/20] tpm2: Support authorized policy

2024-04-12 Thread Stefan Berger
,gpt1)/boot/grub2/sealed.tpm cryptomount -u -P tpm2 For any change in the boot components, just run the 'sign' command again to update the signature in sealed.tpm, and TPM can unseal the key file with the updated PCR policy. (*1) https://www.hansenpartnership.com/draft-bottomley-tpm2-keys.html

Re: [PATCH v11 00/20] Automatic Disk Unlock with TPM2

2024-04-12 Thread Stefan Berger
ibtasn1: compile into asn1 module -: - > 7: 24c129e64 asn1_test: test module for libtasn1 -: - > 8: 7a1aced55 libtasn1: Add the documentation -: - > 9: 957b048f2 key_protector: Add key protectors framework 1: ca024f496 ! 10: cbeaf8472 tpm2: Add TPM Software St

Re: [PATCH v11 09/20] key_protector: Add key protectors framework

2024-04-12 Thread Stefan Berger
t +grub_key_protector_unregister (struct grub_key_protector *protector); + +grub_err_t +grub_key_protector_recover_key (const char *protector, + grub_uint8_t **key, + grub_size_t *key_size); + +#endif /* ! GRUB_PROTECTOR_HEADER */ with nit fixed: R

Re: [PATCH v11 11/20] key_protector: Add TPM2 Key Protector

2024-04-12 Thread Stefan Berger
On 4/12/24 04:39, Gary Lin via Grub-devel wrote: From: Hernan Gatta The TPM2 key protector is a module that enables the automatic retrieval of a fully-encrypted disk's unlocking key from a TPM 2.0. A few minor finds/comments below. The theory of operation is such that the module accepts

Re: [PATCH v11 12/20] cryptodisk: Support key protectors

2024-04-12 Thread Stefan Berger
" + "failed to unlock %s%s%s (%s)\n", +cargs->protectors[i], source->name, +source->partition != NULL ? "," : "", +part != NULL ? part : N_("UNKNO

Re: [PATCH v11 13/20] util/grub-protect: Add new tool

2024-04-12 Thread Stefan Berger
On 4/12/24 04:39, Gary Lin via Grub-devel wrote: From: Hernan Gatta To utilize the key protectors framework, there must be a way to protect full-disk encryption keys in the first place. The grub-protect tool includes support for the TPM2 key protector but other protectors that require setup a

Re: [PATCH v11 15/20] tpm2: Implement NV index

2024-04-12 Thread Stefan Berger
-by: Patrick Colp Signed-off-by: Gary Lin Reviewed-by: Stefan Berger --- grub-core/tpm2/module.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/grub-core/tpm2/module.c b/grub-core/tpm2/module.c index 0ed8f2682..b4d588b0c 100644 --- a/grub-core/t

Re: [PATCH v11 19/20] tpm2: Enable tpm2 module for grub-emu

2024-04-12 Thread Stefan Berger
the device node on host, it's easy to implement the essential TCG2 command submission function with the read/write functions and enable tpm2 module for grub-emu, so that we can further test TPM key unsealing with grub-emu. Signed-off-by: Gary Lin Reviewed-by: Stefan Berger --- grub

Re: [PATCH v11 17/20] cryptodisk: wipe out the cached keys from protectors

2024-04-12 Thread Stefan Berger
emory to retrieve the secret key. To defend such attack, wipe out the cached key when we don't need it. Signed-off-by: Gary Lin Cc: Fabian Vogt Reviewed-by: Stefan Berger --- grub-core/disk/cryptodisk.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grub

Re: [PATCH v11 16/20] cryptodisk: Fallback to passphrase

2024-04-12 Thread Stefan Berger
On 4/12/24 04:39, Gary Lin via Grub-devel wrote: From: Patrick Colp If a protector is specified, but it fails to unlock the disk, fall back to asking for the passphrase. However, an error was set indicating that the protector(s) failed. Later code (e.g., LUKS code) fails as `grub_errno` is no

Re: [PATCH v11 00/20] Automatic Disk Unlock with TPM2

2024-04-15 Thread Stefan Berger
On 4/15/24 05:45, Gary Lin wrote: On Fri, Apr 12, 2024 at 12:24:36PM -0400, Stefan Berger wrote: On 4/12/24 04:39, Gary Lin via Grub-devel wrote: GIT repo for v11: https://github.com/lcp/grub2/tree/tpm2-unlock-v11 This patch series is based on "Automatic TPM Disk Unlock"(*1)

Re: [PATCH v12 16/20] cryptodisk: Fallback to passphrase

2024-04-19 Thread Stefan Berger
now set. Print the existing errors out first, before proceeding with the passphrase. Cc: Stefan Berger Signed-off-by: Patrick Colp Signed-off-by: Gary Lin Reviewed-by: Stefan Berger --- grub-core/disk/cryptodisk.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v12 20/20] tests: Add tpm2_test

2024-04-19 Thread Stefan Berger
image, try to mount the image with tpm2_key_protector_init and cryptomount, and verify the result. Based on the idea from Michael Chang. Cc: Michael Chang Cc: Stefan Berger Signed-off-by: Gary Lin --- Makefile.util.def| 6 + tests/tpm2_test.in | 311

Re: [PATCH v12 18/20] diskfilter: look up cryptodisk devices first

2024-04-19 Thread Stefan Berger
d then others, so that the auto-unlocked disk will be found first, not the attacker's disk. Signed-off-by: Gary Lin Cc: Fabian Vogt Reviewed-by: Stefan Berger --- grub-core/disk/diskfilter.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) di

Re: [PATCH v12 13/20] util/grub-protect: Add new tool

2024-04-19 Thread Stefan Berger
ten in the key file, so there is no need to specify PCRs when invoking tpm2_key_protector_init. Cc: Stefan Berger Signed-off-by: Hernan Gatta Signed-off-by: Gary Lin Reviewed-by: Stefan Berger ___ Grub-devel mailing list Grub-devel@gnu

Re: [PATCH v12 10/20] tpm2: Add TPM Software Stack (TSS)

2024-04-19 Thread Stefan Berger
yAuthorize, TPM2_TestParms Cc: Stefan Berger Signed-off-by: Hernan Gatta Signed-off-by: Gary Lin Reviewed-by: Stefan Berger ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

Re: [PATCH v13 04/20] libtasn1: changes for grub compatibility

2024-04-30 Thread Stefan Berger
Reviewed-by: Stefan Berger --- grub-core/lib/libtasn1/lib/decoding.c | 8 grub-core/lib/libtasn1/lib/element.c| 2 +- grub-core/lib/libtasn1/lib/gstr.c | 2 +- grub-core/lib/libtasn1/lib/int.h| 3 +-- grub-core/lib/libtasn1/lib/parser_aux.c | 2 +- in

Re: [PATCH v19 33/33] docs: Document TPM2 key protector

2024-09-13 Thread Stefan Berger
On 9/6/24 5:11 AM, Gary Lin wrote: Update the user manual to address TPM2 key protector including the two related commands, tpm2_key_protector_init and tpm2_key_protector_clear, and the user-space utility: grub-protect. Signed-off-by: Gary Lin --- docs/grub.texi | 507 ++

Re: [PATCH v19 00/33] Automatic Disk Unlock with TPM2

2024-09-13 Thread Stefan Berger
On 9/6/24 5:10 AM, Gary Lin wrote: GIT repo for v19: https://github.com/lcp/grub2/tree/tpm2-unlock-v19 This patch series is based on "Automatic TPM Disk Unlock"(*1) posted by Hernan Gatta to introduce the key protector framework and TPM2 stack to GRUB2, and this could be a useful feature for t

Re: [PATCH v19 00/33] Automatic Disk Unlock with TPM2

2024-09-16 Thread Stefan Berger
On 9/15/24 11:35 PM, Gary Lin wrote: On Mon, Sep 16, 2024 at 10:24:03AM +0800, Gary Lin wrote: On Fri, Sep 13, 2024 at 10:32:39AM -0400, Stefan Berger wrote: On 9/6/24 5:10 AM, Gary Lin wrote: GIT repo for v19: https://github.com/lcp/grub2/tree/tpm2-unlock-v19 This patch series is based

Re: [PATCH v3 11/15] ieee1275: request memory with ibm, client-architecture-support

2022-07-19 Thread Stefan Berger
Daniel K., were you going to push the last 4 patches of this series into the repo as well now that the first 10 are checked in? Regards, Stefan On 4/21/22 01:24, Daniel Axtens wrote: On PowerVM, the first time we boot a Linux partition, we may only get 256MB of real memory area, even if

Re: [PATCH] tpm: Disable tpm verifier if tpm is not present

2022-10-06 Thread Stefan Berger
00644 --- a/include/grub/tpm.h +++ b/include/grub/tpm.h @@ -36,4 +36,5 @@ grub_err_t grub_tpm_measure (unsigned char *buf, grub_size_t size, grub_uint8_t pcr, const char *description); +int grub_tpm_present (void); #endif Reviewed-by: Stefan Berger

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-11-30 Thread Stefan Berger
Axtens (4): ieee1275: request memory with ibm,client-architecture-support ieee1275: drop len -= 1 quirk in heap_init ieee1275: support runtime memory claiming [RFC] Add memtool module with memory allocation stress-test Stefan Berger (1): ibmvtpm: Add support for trusted boot using a vT

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-11-30 Thread Stefan Berger
On 11/30/22 14:47, Stefan Berger wrote: On 11/24/22 12:56, Daniel Kiper wrote: Hi, Adding Sudhakar and Glenn... On Thu, Aug 11, 2022 at 02:40:58PM -0300, Diego Domingos wrote: Hello, This is an addition to the series sent from Daniel Axtens (https://lists.gnu.org/archive/html/grub

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-11-30 Thread Stefan Berger
On 11/30/22 16:24, Stefan Berger wrote: On 11/30/22 14:47, Stefan Berger wrote: On 11/24/22 12:56, Daniel Kiper wrote: Hi, Adding Sudhakar and Glenn... On Thu, Aug 11, 2022 at 02:40:58PM -0300, Diego Domingos wrote: Hello, This is an addition to the series sent from Daniel Axtens

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-12-01 Thread Stefan Berger
On 12/1/22 00:19, Glenn Washburn wrote: On Wed, 30 Nov 2022 17:42:40 -0500 Stefan Berger wrote: On 11/30/22 16:24, Stefan Berger wrote: On 11/30/22 14:47, Stefan Berger wrote: On 11/24/22 12:56, Daniel Kiper wrote: Hi, Adding Sudhakar and Glenn... On Thu, Aug 11, 2022 at 02:40

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-12-01 Thread Stefan Berger
On 12/1/22 09:02, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 08:43:56AM -0500, Stefan Berger wrote: On 12/1/22 00:19, Glenn Washburn wrote: On Wed, 30 Nov 2022 17:42:40 -0500 Stefan Berger wrote: On 11/30/22 16:24, Stefan Berger wrote: On 11/30/22 14:47, Stefan Berger wrote: On 11/24/22

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-12-01 Thread Stefan Berger
On 12/1/22 09:47, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 09:22:42AM -0500, Stefan Berger wrote: On 12/1/22 09:02, Daniel Kiper wrote: [...] ./configure --target=i386 --with-platform=ieee1275 ... I had to adjust the created symlist.h like this to make it compile at least

Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-12-01 Thread Stefan Berger
On 12/1/22 10:51, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 09:58:45AM -0500, Stefan Berger wrote: On 12/1/22 09:47, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 09:22:42AM -0500, Stefan Berger wrote: On 12/1/22 09:02, Daniel Kiper wrote: [...] ./configure --target=i386 --with-platform

[PATCH v2 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2022-12-01 Thread Stefan Berger
Diego Domingos (1): ieee1275: implement vec5 for cas negotiation Stefan Berger (1): ibmvtpm: Add support for trusted boot using a vTPM 2.0 configure.ac | 1 + docs/grub-dev.texi| 7 +- docs/grub.texi| 3 +- grub-core

[PATCH v2 3/6] ieee1275: support runtime memory claiming

2022-12-01 Thread Stefan Berger
nux with space to satisfy its early allocations. Allow other space to be allocated at runtime. Tested-by: Stefan Berger Signed-off-by: Daniel Axtens --- docs/grub-dev.texi | 7 +- grub-core/kern/ieee1275/init.c | 268 ++--- 2 files changed, 255 in

[PATCH v2 4/6] ieee1275: implement vec5 for cas negotiation

2022-12-01 Thread Stefan Berger
values to 0 (default). Signed-off-by: Diego Domingos Acked-by: Daniel Axtens Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c

[PATCH v2 5/6] Add memtool module with memory allocation stress-test

2022-12-01 Thread Stefan Berger
gions * stress_big_allocs - stress test large allocations: - how much memory can we allocate in one chunk? - how many 1MB chunks can we allocate? - check that gap-filling works with a 1MB aligned 900kB alloc + a 100kB alloc. Signed-off-by: Daniel Axtens Signed-off-by: Stefan Berger --- configu

[PATCH v2 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2022-12-01 Thread Stefan Berger
splayed in the Linux kernel log. Those users will have to update their machines to the firmware levels mentioned above. Cc: Eric Snowberg Signed-off-by: Stefan Berger Signed-off-by: Daniel Axtens --- docs/grub.texi| 3 +- grub-core/Makefile.core.def | 7 ++

[PATCH v2 2/6] ieee1275: drop len -= 1 quirk in heap_init

2022-12-01 Thread Stefan Berger
From: Daniel Axtens This was apparently 'required by some firmware': commit dc9468500919 ("2007-02-12 Hollis Blanchard "). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and buggy now. It doesn't cause issues on qem

[PATCH v2 1/6] ieee1275: request memory with ibm, client-architecture-support

2022-12-01 Thread Stefan Berger
nly ever fire the first time a partition loads grub, or if you deliberately lower the amount of memory your partition has below 512MB.) Signed-off-by: Daniel Axtens Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/cmain.c | 3 + grub-core/kern/ieee1275/init.c | 165 +++

Re: [PATCH v2 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2022-12-13 Thread Stefan Berger
On 12/13/22 11:35, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 04:12:01PM -0500, Stefan Berger wrote: Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 PowerPC platform. With this patch grub now measures text and binary data into the TPM's PCRs 8 and 9 in the same way a

Re: [PATCH v2 3/6] ieee1275: support runtime memory claiming

2022-12-13 Thread Stefan Berger
On 12/13/22 11:14, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 04:11:58PM -0500, Stefan Berger wrote: From: Daniel Axtens On powerpc-ieee1275, we are running out of memory trying to verify anything. This is because: - we have to load an entire file into memory to verify it. This is

Re: [PATCH v2 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2022-12-14 Thread Stefan Berger
On 12/14/22 09:20, Daniel Kiper wrote: On Tue, Dec 13, 2022 at 01:18:34PM -0500, Stefan Berger wrote: On 12/13/22 11:35, Daniel Kiper wrote: On Thu, Dec 01, 2022 at 04:12:01PM -0500, Stefan Berger wrote: Add support for trusted boot using a vTPM 2.0 on the IBM IEEE1275 PowerPC platform

[PATCH v3 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2023-01-30 Thread Stefan Berger
ieee1275: request memory with ibm, client-architecture-support ieee1275: drop len -= 1 quirk in heap_init ieee1275: support runtime memory claiming Add memtool module with memory allocation stress-test Diego Domingos (1): ieee1275: implement vec5 for cas negotiation Stefan Berger (1): ib

[PATCH v3 1/6] ieee1275: request memory with ibm, client-architecture-support

2023-01-30 Thread Stefan Berger
nly ever fire the first time a partition loads grub, or if you deliberately lower the amount of memory your partition has below 512MB.) Signed-off-by: Daniel Axtens Signed-off-by: Stefan Berger Reviewed-by: Daniel Kiper --- grub-core/kern/ieee1275/cmain.c | 5 + grub-core/kern/ieee1275/i

[PATCH v3 2/6] ieee1275: drop len -= 1 quirk in heap_init

2023-01-30 Thread Stefan Berger
From: Daniel Axtens This was apparently 'required by some firmware': commit dc9468500919 ("2007-02-12 Hollis Blanchard "). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and buggy now. It doesn't cause issues on qem

[PATCH v3 6/6] ibmvtpm: Add support for trusted boot using a vTPM 2.0

2023-01-30 Thread Stefan Berger
e firmware levels mentioned above. Cc: Eric Snowberg Signed-off-by: Stefan Berger Signed-off-by: Daniel Axtens Reviewed-by: Daniel Kiper --- docs/grub.texi| 3 +- grub-core/Makefile.core.def | 7 ++ grub-core/commands/ieee1275/ibmvt

[PATCH v3 4/6] ieee1275: implement vec5 for cas negotiation

2023-01-30 Thread Stefan Berger
values to 0 (default). Signed-off-by: Diego Domingos Acked-by: Daniel Axtens Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c

[PATCH v3 3/6] ieee1275: support runtime memory claiming

2023-01-30 Thread Stefan Berger
nux with space to satisfy its early allocations. Allow other space to be allocated at runtime. Tested-by: Stefan Berger Signed-off-by: Daniel Axtens --- docs/grub-dev.texi | 7 +- grub-core/kern/ieee1275/init.c | 270 ++--- 2 files changed, 257 in

[PATCH v3 5/6] Add memtool module with memory allocation stress-test

2023-01-30 Thread Stefan Berger
gions * stress_big_allocs - stress test large allocations: - how much memory can we allocate in one chunk? - how many 1MB chunks can we allocate? - check that gap-filling works with a 1MB aligned 900kB alloc + a 100kB alloc. Signed-off-by: Daniel Axtens Signed-off-by: Stefan Berger Reviewed-by: D

[PATCH v3 0/6] Dynamic allocation of memory regions and IBM vTPM v2

2023-01-30 Thread Stefan Berger
ieee1275: request memory with ibm, client-architecture-support ieee1275: drop len -= 1 quirk in heap_init ieee1275: support runtime memory claiming Add memtool module with memory allocation stress-test Diego Domingos (1): ieee1275: implement vec5 for cas negotiation Stefan Berger (1): ib

[PATCH v3 4/6] ieee1275: implement vec5 for cas negotiation

2023-01-30 Thread Stefan Berger
values to 0 (default). Signed-off-by: Diego Domingos Acked-by: Daniel Axtens Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c

[PATCH v3 3/6] ieee1275: support runtime memory claiming

2023-01-30 Thread Stefan Berger
nux with space to satisfy its early allocations. Allow other space to be allocated at runtime. Tested-by: Stefan Berger Signed-off-by: Daniel Axtens --- docs/grub-dev.texi | 7 +- grub-core/kern/ieee1275/init.c | 270 ++--- 2 files changed, 257 in

[PATCH v3 1/6] ieee1275: request memory with ibm, client-architecture-support

2023-01-30 Thread Stefan Berger
nly ever fire the first time a partition loads grub, or if you deliberately lower the amount of memory your partition has below 512MB.) Signed-off-by: Daniel Axtens Signed-off-by: Stefan Berger Reviewed-by: Daniel Kiper --- grub-core/kern/ieee1275/cmain.c | 5 + grub-core/kern/ieee1275/i

  1   2   3   >