From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 876CF955 for ; Wed, 3 Aug 2016 17:23:46 +0000 (UTC) Received: from mail-yw0-f182.google.com (mail-yw0-f182.google.com [209.85.161.182]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 0BDB72C2 for ; Wed, 3 Aug 2016 17:23:46 +0000 (UTC) Received: by mail-yw0-f182.google.com with SMTP id u134so234231666ywg.3 for ; Wed, 03 Aug 2016 10:23:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1470228158.2482.36.camel@HansenPartnership.com> From: Matthew Garrett Date: Wed, 3 Aug 2016 10:23:44 -0700 Message-ID: To: Andy Lutomirski Content-Type: text/plain; charset=UTF-8 Cc: James Bottomley , Josh Boyer , Jason Cooper , "ksummit-discuss@lists.linuxfoundation.org" , Mark Brown Subject: Re: [Ksummit-discuss] [TOPIC] Secure/verified boot and roots of trust List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Aug 3, 2016 at 10:04 AM, Andy Lutomirski wrote: > What's wrong with that? In grub language, this would be approximately: > > linuxefi path/to/image > linuxkeypolicy path/to/policy Thinking about it further - there's no real problem integrating this with a build-time key. Rather than having the public half in the kernel, stash the public half in the packaging and then have the signing step (that's signing the kernel anyway) also sign the key. The bootloader verifies that the key is signed by a trusted root and passes that on to the kernel. If we have a standardised mechanism for the bootloader to pass this information on, it's absolutely possible to push the root of trust down to the bootloader (and also make it responsible for pulling any other signing keys out of EFI variables or wherever) > Anyway, here's a concrete proposal for a cross-arch way to pass > trusted policy from the bootloader to the kernel: define a new > structure: > > struct trusted_policy_header { > unsigned long size; > }; > > Rig up the linker script so the trusted_policy is at the very end of > the kernel virtual address space and lives in its own ELF segment (or > arch equivalent). That segment will have filesize == 0 and memsize == > sizeof(struct trusted_policy_header). Mark the segment so the > bootloader knows about it. > > Now the bootloader can supply policy (keys and whatever else it wants) > by simply writing it to the trusted_policy_header and beyond in > memory. The bootloader doesn't see the ELF object on (at least) x86?