Received: by 10.213.65.68 with SMTP id h4csp256427imn; Tue, 13 Mar 2018 03:25:26 -0700 (PDT) X-Google-Smtp-Source: AG47ELtvflKhzEokBGvNVjO5weXqHjzox1D8TnLfH/XQDP0iNgwT1f56la3sqhhtg/E+8u/Cj++4 X-Received: by 10.98.141.205 with SMTP id p74mr47246pfk.211.1520936726198; Tue, 13 Mar 2018 03:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520936726; cv=none; d=google.com; s=arc-20160816; b=yssvQhvGyXikUJtBOfDKJc9j7xpfCgUEzFTXAGpShOosKez5tneglKKroumSCGB0gr 5h4O4hS1OE5KOjuQ4FVL/8xgdWIA8685C6S9Gml0BocNcJMAMIzNC9i4Gi0gTuoMBN4s jTPUtSlegQ3C39xiRm2WfQBm/9kEDHhkNQv5sEKT0f7Yri4+MuKzHpsP5CH+WGT2jS1w Spslm7ZQ78D0argIBlP/umNN43KRg870zu/ESBPYTOuE0TbHaOYXr3xrgFzc1HQPAGJj hPN6mZuxwIiFe7h0StjeRzE6mdBjw/3SVrDZkqaysDsar+Cp0/Alb1EKkGG+dmegaN2d O7hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=S8DP+bL9ycoTcA2bFIUTCB84BisBrDFkTOXIk2CXs8c=; b=zCW6wLjvMpN2W3wU3PjtA1U1VXUQqxZ/B1L7LLckTJOqngETa4RlLDwlwequnsv6sj csnXk+j3q0+MBCQrHi9aMRtzJPjIVRNYEKkGoKtUWT1x9PKKeUvUmb+7EV4EBV6D8lCu DEswgishBHFqd6Zl6T2DTeidUgD2YgdgINBRulRdKXFky+vZLcSXgTy83UWDF4/tdkVn lfz7O7zqyE1I/jUk9hjybovj7Dv0AJRwb440QNCfW7eWXRLhuQRTdIdXkRP70TrtUih9 QcRrWsS2/oa9quSiIYUC65r6KnC7bD1tJSsda6gOR/IGzIraPWyJ0e5LUsV56u6LzkwI Qurg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OP5DBB57; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1-v6si7594347plc.679.2018.03.13.03.25.11; Tue, 13 Mar 2018 03:25:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=OP5DBB57; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932681AbeCMKXn (ORCPT + 99 others); Tue, 13 Mar 2018 06:23:43 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:42092 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932564AbeCMKXl (ORCPT ); Tue, 13 Mar 2018 06:23:41 -0400 Received: by mail-io0-f174.google.com with SMTP id u84so15090915iod.9 for ; Tue, 13 Mar 2018 03:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S8DP+bL9ycoTcA2bFIUTCB84BisBrDFkTOXIk2CXs8c=; b=OP5DBB57PrZoONgZTnVaAATRqnFot072wrwnZmwPys+JAuLUyNn3gkhFxm+XNr3MeW o8I8w5p4006uq/XT7cB2NuvIag6+uXn46xf6TzryAh6JHWSNLRNMYh6F6z5tDqPPx/c8 AT1Wian9s/6OVxRyhlPerhKr1GXIymd90FrhmxMsVywekW9Ybw49o4YXtM+WCx9Q5tZp yL0JYEp8ySlLgW2t0r9xedixqI7X5JDN50OUlqiowXwcoxxR0n5Z1LDqs1wrYFRjA1On 2gmoAY9d7y7z0HQwnqca1xcGzXgKyjFqWt1z6cTrPU8yX9tCtYiLklHZZs3bLSz0Bxm1 RQ0Q== 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=S8DP+bL9ycoTcA2bFIUTCB84BisBrDFkTOXIk2CXs8c=; b=rZr7hbPjS7453l6qL9Z6WdOhXz9BrwPNM1jvjMc08bKQ7WP57AOJoPRo6gNMZFIl4q QGIFBkm+IjQD6EipyuCfi7/yyMqiAbjmCYIhDHM9Ul9u+iF17mx4nYF02UieG73KznG6 xbAX6FysVNDjdWDDBXwmmrFsF3zIFitudwo2lg/kSIhvfEmtHphdiAJwyIUxv2Qvh7cL Rjg4l5W1JXlSnP0cxrUzEBer6XNW8oO9f3m55r0upgQrYXKF7H2CzaYgtarpk9nb7mUz CJ2tDTofE9Pjfq+Cr5GFJkMB97z/GxvApYhzBDxFMV1ZcvxTDnlyjNM9bj+KX3tHympH MGlQ== X-Gm-Message-State: AElRT7Emf6c0o+v2P3PgBktS/BTYARYTxEIAjW4wfrlEUFV1mLppepvb 7nQNh/WMReGmfLasntToQIaqQC5idSckK+tCb2NIPA== X-Received: by 10.107.183.65 with SMTP id h62mr66210iof.278.1520936620163; Tue, 13 Mar 2018 03:23:40 -0700 (PDT) MIME-Version: 1.0 References: <01000161fc0b4755-df0621f4-ab5d-479a-b425-adf98427a308-000000@email.amazonses.com> <29c1640a-cf19-ca19-7de9-96f202edfb5a@redhat.com> <010001620bafa06b-41525407-603e-40a9-ba11-6033b2f5dcc7-000000@email.amazonses.com> <010001621a9e5069-0b1a6328-97e4-4396-9438-b90f5b8c82a4-000000@email.amazonses.com> <010001621b287e42-58955302-cc14-4212-b7b0-e6e358633dab-000000@email.amazonses.com> <010001621b7ce5a3-b80c55b8-be68-4b44-ab52-4949e8ddb8d0-000000@email.amazonses.com> In-Reply-To: From: Thiebaud Weksteen Date: Tue, 13 Mar 2018 10:23:28 +0000 Message-ID: Subject: Re: Regression from efi: call get_event_log before ExitBootServices To: Ard Biesheuvel Cc: hdegoede@redhat.com, Jeremy Cline , Javier Martinez Canillas , Jarkko Sakkinen , linux-efi@vger.kernel.org, linux-integrity@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2018 at 8:59 AM Ard Biesheuvel wrote: > On 13 March 2018 at 07:47, Hans de Goede wrote: > > Hi, > > > > > > On 12-03-18 20:55, Thiebaud Weksteen wrote: > >> > ... > >> > >> Hans, you said you configured the tablet to use the 32-bit version of grub > >> instead > >> of 64. Why's that? > > > > > > Because this tablet, like (almost?) all Bay Trail hardware has a 32 bit > > UEFI, > > even though the processor is 64 bit capable (AFAIK 64 bit Windows drivers > > were > > not ready in time so all Bay Trail devices shipped with a 32 bit Windows). > > > > So this is running a 32 bit grub which boots a 64 bit kernel. > > > >> Jeremy, could you confirm if you are building the kernel in 64bit mode? Is > >> your Android install working? (that is, what happens if you boot > >> Boot0000)? > > > > > > AFAIK the kernel on Jeremy's tablet (which I initially installed) is 64 bit. > > > > Could the problem perhaps be that the new code for the TPM event-log is > > missing some handling to deal with running on a 32 bit firmware? I know the > > rest of the kernel has special code to deal with this. > > Yes, that was my guess as well. > That is a very good point, and I missed that this is a 64-bit kernel > running on 32-bit UEFI. > The TPM code does use efi_call_proto() directly, and now I am thinking > it is perhaps the allocate_pages() call that simply only initializes > the low 32-bits of log_tbl. That make sense. Would you know what happens to the arguments of the function in this case? (I'm thinking &log_location ?) Would it be safer to skip the code completely on EFI_MIXED systems? > Jeremy, could you please try initializing tcg2_protocol and log_tbl to > NULL at the start of the function?