From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAF27C0650F for ; Mon, 5 Aug 2019 16:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8857521738 for ; Mon, 5 Aug 2019 16:01:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PMxbfiSM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbfHEQBd (ORCPT ); Mon, 5 Aug 2019 12:01:33 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40421 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728855AbfHEQBc (ORCPT ); Mon, 5 Aug 2019 12:01:32 -0400 Received: by mail-wr1-f66.google.com with SMTP id r1so84911256wrl.7 for ; Mon, 05 Aug 2019 09:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I6j4ZxMaWGS3ScQ5dYywCZhv8aZuc2y/2ZEwdEBFjM0=; b=PMxbfiSMRVb2CVi78S7JPr4kqNeAtYQt4QEY6FnGOvc/Y9c8iJhcL1bzUGgTScNz9Z 4Iz7Ay6J+hDVaWZc7sclhnUOzWo9QvkJj26mj39rToOdpSyYK6Marij2v4EmUrvQ81z6 XzFvCFAX70+HYi1F4I3AXJF+/9WLydPCtMmiIn2pzmeLqA5DAtvCO1q10rtHRZyyFa4V lQgtvFRVTAG4aMgIeRLk5jKdg4xj1A9Mthd6V4RJn8U2SI6U/WqVaB3DafYYp4GA2Pj3 sT+oPkdvPkl1RLTV6Dux5uvcH/THfNfwFpZ7G5XUGJLaEj8O9Deqgt3ZMAhoyrICv/O3 p4qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I6j4ZxMaWGS3ScQ5dYywCZhv8aZuc2y/2ZEwdEBFjM0=; b=fL7IYXmz7uYyb0GgtVMYf5UpuYbfw1Q8Cq68LWxXVorfCtlG5M7s4pLkUocsIVI1Mx EqyriexDcLkofO8P27d0wCNHyIIG/pe6hMoJD2oiNFfOga9dv3pwsau/Qd5mU0h4cI0d sZIwt8xF44DVp/IZZelQEESypwHnLfoVkFY75Q4GGrvAXDESYH8NUZl7hEGDBmV5pRt9 RySOA1h5wH5cX3Q/mVpmEApEP2Ywj34IUA0zdCuM5nW/RWZdKSDAFeZFqLmBAV3Jd0nE dXwnivrrO+Ne/f5pj28o+VOf5qqXEYIOSwV/X5X29HjDGXfqMWSr3+a/RkqQHlgmDc0+ ypvQ== X-Gm-Message-State: APjAAAX7NBGWOE82lmsJOonEFcKpoStLYQBmkecxMPCZ3gOrgXNTcxFs uMEjk+hEnw7AbnGCxrF/BYm98yaYDEifkgP46PnV2Q== X-Google-Smtp-Source: APXvYqzzl2uBb2K29t8VL4rEak+IjBCH2cxdGjkA0Y/AUt/aWR4t/c7z3oqdAHgJrbelidfqtath+dA0ugEzYW8v6GA= X-Received: by 2002:a5d:46cf:: with SMTP id g15mr26783408wrs.93.1565020889861; Mon, 05 Aug 2019 09:01:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ard Biesheuvel Date: Mon, 5 Aug 2019 19:01:20 +0300 Message-ID: Subject: Re: 5.3 boot regression caused by 5.3 TPM changes To: Hans de Goede Cc: Matthew Garrett , Jarkko Sakkinen , Peter Huewe , Greg Kroah-Hartman , Thomas Gleixner , Ingo Molnar , linux-integrity , Linux Kernel Mailing List , linux-efi Content-Type: text/plain; charset="UTF-8" Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Sun, 4 Aug 2019 at 19:12, Hans de Goede wrote: > > Hi, > > On 04-08-19 17:33, Ard Biesheuvel wrote: > > Hi Hans, > > > > On Sun, 4 Aug 2019 at 13:00, Hans de Goede wrote: > >> > >> Hi All, > >> > >> While testing 5.3-rc2 on an Irbis TW90 Intel Cherry Trail based > >> tablet I noticed that it does not boot on this device. > >> > >> A git bisect points to commit 166a2809d65b ("tpm: Don't duplicate > >> events from the final event log in the TCG2 log") > >> > >> And I can confirm that reverting just that single commit makes > >> the TW90 boot again. > >> > >> This machine uses AptIO firmware with base component versions > >> of: UEFI 2.4 PI 1.3. I've tried to reproduce the problem on > >> a Teclast X80 Pro which is also CHT based and also uses AptIO > >> firmware with the same base components. But it does not reproduce > >> there. Neither does the problem reproduce on a CHT tablet using > >> InsideH20 based firmware. > >> > >> Note that these devices have a software/firmware TPM-2.0 > >> implementation, they do not have an actual TPM chip. > >> > >> Comparing TPM firmware setting between the 2 AptIO based > >> tablets the settings are identical, but the troublesome > >> TW90 does have some more setting then the X80, it has > >> the following settings which are not shown on the X80: > >> > >> Active PCR banks: SHA-1 (read only) > >> Available PCR banks: SHA-1,SHA256 (read only) > >> TPM2.0 UEFI SPEC version: TCG_2 (other possible setting: TCG_1_2 > >> Physical Presence SPEC ver: 1.2 (other possible setting: 1.3) > >> > >> I have the feeling that at least the first 2 indicate that > >> the previous win10 installation has actually used the > >> TPM, where as on the X80 the TPM is uninitialized. > >> Note this is just a hunch I could be completely wrong. > >> > >> I would be happy to run any commands to try and debug this > >> or to build a kernel with some patches to gather more info. > >> > >> Note any kernel patches to printk some debug stuff need > >> to be based on 5.3 with 166a2809d65b reverted, without that > >> reverted the device will not boot, and thus I cannot collect > >> logs without it reverted. > >> > > > > Are you booting a 64-bit kernel on 32-bit firmware? > > Yes you are right, I must say that this is somewhat surprising > most Cherry Trail devices do use 64 bit firmware (where as Bay Trail > typically uses 32 bit). But I just checked efibootmgr output and it > says it is booting: \EFI\FEDORA\SHIMIA32.EFI so yeah 32 bit firmware. > > Recent Fedora releases take care of this so seamlessly I did not > even realize... > OK, so we'll have to find out how this patch affects 64-bit code running on 32-bit firmware. The only EFI call in that patch is get_config_table(), which is not actually a EFI boot service call but a EFI stub helper that parses the config table array in the EFI system table.