Re: [PATCH v8 2/4] KEYS: trusted: Introduce TEE based Trusted Keys

Started by Jarkko Sakkinen on Feb 11, 2021 · 6 messages from 2 authors · Last reply Feb 24, 2021

open the first message on its own page

Message details and related content
On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote:
Hi Jarkko,

On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Thu, Jan 21, 2021 at 05:23:45PM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 4:24 PM, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 05:07:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 09:44:07AM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 1:02 AM, Jarkko Sakkinen via OP-TEE wrote:
quoted
On Wed, Jan 20, 2021 at 12:53:28PM +0530, Sumit Garg wrote:
quoted
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote:
quoted
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote:
quoted
Add support for TEE based trusted keys where TEE provides the functionality
to seal and unseal trusted keys using hardware unique key.

Refer to Documentation/tee.txt for detailed information about TEE.

Signed-off-by: Sumit Garg <redacted>
I haven't yet got QEMU environment working with aarch64, this produces
just a blank screen:

./output/host/usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 1 -kernel output/images/Image -initrd output/images/rootfs.cpio -serial stdio

My BuildRoot fork for TPM and keyring testing is located over here:

162 more quoted lines

I spentt couple of days to try to get this running.

Here's the log:

❯ ./qemu.sh
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v2.3():v2.3
NOTICE:  BL1: Built : 13:28:04, Jan 25 2021
NOTICE:  BL1: Booting BL2
NOTICE:  BL2: v2.3():v2.3
NOTICE:  BL2: Built : 13:28:06, Jan 25 2021
NOTICE:  BL1: Booting BL31
NOTICE:  BL31: v2.3():v2.3
NOTICE:  BL31: Built : 13:28:08, Jan 25 2021
UEFI firmware (version  built at 18:49:27 on Nov 18 2019)
pflash_write: Write to buffer emulation is flawed
pflash_write: Write to buffer emulation is flawed
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
Booting Linux on physical CPU 0x0000000000 [0x411fd070]
Linux version 5.11.0-rc5 (jarkko@suppilovahvero) (aarch64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2021.02-rc1-10-ga72c90b972) 9.3.0, GNU ld (GNU Binutils) 2.35.2) #1 SMP Thu Feb 11 22:04:53 EET 2021
Machine model: linux,dummy-virt
efi: EFI v2.70 by EDK II
efi: SMBIOS=0x7f520000 SMBIOS 3.0=0x7f500000 MEMATTR=0x7e59b018 MEMRESERVE=0x7c143f18
Zone ranges:
  DMA      [mem 0x0000000040000000-0x000000007fffffff]
  DMA32    empty
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000040000000-0x0000000041ffffff]
  node   0: [mem 0x0000000042200000-0x000000007be3ffff]
  node   0: [mem 0x000000007be40000-0x000000007c13ffff]
  node   0: [mem 0x000000007c140000-0x000000007f41ffff]
  node   0: [mem 0x000000007f420000-0x000000007f4affff]
  node   0: [mem 0x000000007f4b0000-0x000000007f4cffff]
  node   0: [mem 0x000000007f4d0000-0x000000007f5dffff]
  node   0: [mem 0x000000007f5e0000-0x000000007fffffff]

168 more lines

Message details and related content
On Fri, Feb 12, 2021 at 01:34:31AM +0200, Jarkko Sakkinen wrote:
On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Thu, Jan 21, 2021 at 05:23:45PM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 4:24 PM, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 05:07:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 09:44:07AM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 1:02 AM, Jarkko Sakkinen via OP-TEE wrote:
quoted
On Wed, Jan 20, 2021 at 12:53:28PM +0530, Sumit Garg wrote:
quoted
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote:
quoted
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote:
quoted
Add support for TEE based trusted keys where TEE provides the functionality
to seal and unseal trusted keys using hardware unique key.

Refer to Documentation/tee.txt for detailed information about TEE.

Signed-off-by: Sumit Garg <redacted>
I haven't yet got QEMU environment working with aarch64, this produces
just a blank screen:

./output/host/usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 1 -kernel output/images/Image -initrd output/images/rootfs.cpio -serial stdio

My BuildRoot fork for TPM and keyring testing is located over here:

369 more quoted lines

NOTE: aarch64-fw.bin is the binary file for FW that you provided. I just renamed it.

/Jarkko
Message details and related content
On Fri, 12 Feb 2021 at 05:04, Jarkko Sakkinen [off-list ref] wrote:
On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Thu, Jan 21, 2021 at 05:23:45PM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 4:24 PM, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 05:07:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 09:44:07AM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 1:02 AM, Jarkko Sakkinen via OP-TEE wrote:
quoted
On Wed, Jan 20, 2021 at 12:53:28PM +0530, Sumit Garg wrote:
quoted
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote:
quoted
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote:
quoted
Add support for TEE based trusted keys where TEE provides the functionality
to seal and unseal trusted keys using hardware unique key.

Refer to Documentation/tee.txt for detailed information about TEE.

Signed-off-by: Sumit Garg <redacted>
I haven't yet got QEMU environment working with aarch64, this produces
just a blank screen:

./output/host/usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 1 -kernel output/images/Image -initrd output/images/rootfs.cpio -serial stdio

371 more quoted lines

It mostly sounds like an issue with your buildroot filesystem.

Can you try with this [1] init ramdisk instead?

-initrd rootfs.cpio.gz

[1] https://people.linaro.org/~sumit.garg/rootfs.cpio.gz

-Sumit
/Jarkko
Message details and related content
On Mon, Feb 15, 2021 at 06:37:00PM +0530, Sumit Garg wrote:
On Fri, 12 Feb 2021 at 05:04, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Thu, Jan 21, 2021 at 05:23:45PM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 4:24 PM, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 05:07:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 09:44:07AM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 1:02 AM, Jarkko Sakkinen via OP-TEE wrote:
quoted
On Wed, Jan 20, 2021 at 12:53:28PM +0530, Sumit Garg wrote:
quoted
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote:
quoted
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote:
quoted
Add support for TEE based trusted keys where TEE provides the functionality
to seal and unseal trusted keys using hardware unique key.

Refer to Documentation/tee.txt for detailed information about TEE.

Signed-off-by: Sumit Garg <redacted>
I haven't yet got QEMU environment working with aarch64, this produces
just a blank screen:

./output/host/usr/bin/qemu-system-aarch64 -M virt -cpu cortex-a53 -smp 1 -kernel output/images/Image -initrd output/images/rootfs.cpio -serial stdio

382 more quoted lines

That does not include my LKM's.

/Jarkko
Message details and related content
On Tue, 16 Feb 2021 at 12:59, Jarkko Sakkinen [off-list ref] wrote:
On Mon, Feb 15, 2021 at 06:37:00PM +0530, Sumit Garg wrote:
quoted
On Fri, 12 Feb 2021 at 05:04, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Thu, Jan 21, 2021 at 05:23:45PM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 4:24 PM, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 05:07:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 09:44:07AM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 1:02 AM, Jarkko Sakkinen via OP-TEE wrote:
quoted
On Wed, Jan 20, 2021 at 12:53:28PM +0530, Sumit Garg wrote:
quoted
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote:
quoted
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote:
quoted
Add support for TEE based trusted keys where TEE provides the functionality
to seal and unseal trusted keys using hardware unique key.

Refer to Documentation/tee.txt for detailed information about TEE.

Signed-off-by: Sumit Garg <redacted>
I haven't yet got QEMU environment working with aarch64, this produces
just a blank screen:

387 more quoted lines

You can give a try with my kernel image [1] which has required built
in kernel modules. Also, you should be able to build a similar kernel
image.

[1] https://people.linaro.org/~sumit.garg/Image

-Sumit
/Jarkko
Message details and related content
On Mon, Feb 22, 2021 at 12:45:18PM +0530, Sumit Garg wrote:
On Tue, 16 Feb 2021 at 12:59, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Mon, Feb 15, 2021 at 06:37:00PM +0530, Sumit Garg wrote:
quoted
On Fri, 12 Feb 2021 at 05:04, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Mon, Jan 25, 2021 at 02:47:38PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Fri, 22 Jan 2021 at 23:42, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Thu, Jan 21, 2021 at 05:23:45PM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 4:24 PM, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 05:07:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Thu, Jan 21, 2021 at 09:44:07AM +0100, Jerome Forissier wrote:
quoted

On 1/21/21 1:02 AM, Jarkko Sakkinen via OP-TEE wrote:
quoted
On Wed, Jan 20, 2021 at 12:53:28PM +0530, Sumit Garg wrote:
quoted
On Wed, 20 Jan 2021 at 07:01, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Jan 19, 2021 at 12:30:42PM +0200, Jarkko Sakkinen wrote:
quoted
On Fri, Jan 15, 2021 at 11:32:31AM +0530, Sumit Garg wrote:
quoted
On Thu, 14 Jan 2021 at 07:35, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Wed, Jan 13, 2021 at 04:47:00PM +0530, Sumit Garg wrote:
quoted
Hi Jarkko,

On Mon, 11 Jan 2021 at 22:05, Jarkko Sakkinen [off-list ref] wrote:
quoted
On Tue, Nov 03, 2020 at 09:31:44PM +0530, Sumit Garg wrote:
quoted
Add support for TEE based trusted keys where TEE provides the functionality
to seal and unseal trusted keys using hardware unique key.

Refer to Documentation/tee.txt for detailed information about TEE.

Signed-off-by: Sumit Garg <redacted>
I haven't yet got QEMU environment working with aarch64, this produces

394 more quoted lines

It comes down to that I need to be able to build my own kernel and user
space.

I need to be able to build my own kernel. There's been some bugs that I've
reported back to BuildRoot with the latest kernel tree and also with
binutils [*].

I'll retry once they are fixed, and try to find out what it causing the
problem.

[*] https://bugs.busybox.net/show_bug.cgi?id=13546

/Jarkko
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help