Received: by 10.213.65.68 with SMTP id h4csp403706imn; Tue, 13 Mar 2018 08:02:20 -0700 (PDT) X-Google-Smtp-Source: AG47ELtq1mOdK4eirMxlUXufmWmFzvrBNrnhoByh7F4sqeVPqS5HLr8gDmkmkygc9gwvCOZQ+v7N X-Received: by 10.99.120.205 with SMTP id t196mr735079pgc.392.1520953340191; Tue, 13 Mar 2018 08:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520953340; cv=none; d=google.com; s=arc-20160816; b=OQ0Lc00LaYmVfgb2vDXIfrwicUzZsbBB0q8FGgnsO2I82wDD3GLiJlBW6PXuncUmI5 KHJhzDzTV6igT4xptLr6WxyMGkA/T3sT7yAoVBBxMNTX6UlpTnY3pVFBmxyKPrBDLETm /lz8ulVYYif//Nn+JnsznWKmP/RFxWezFausLeIq3kv4d+MRSQXMTfa5EmzzjV/PEoAo Z82hXh6eTtWmaUuWxEC1L5liClqrc0kXV8ioYn7MGKc0RbDbCmZ0mrJWO2tJkRTXWtJT 9RPGNZ9/bGx7RPedUKKkG/pBUyKb7t0LIccG6IwnLovicUiQGtgpoFY3IhjxiCL2aqxu /rLA== 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=LRh7vH/LCZQ5PCk/ZU1HRPm9bAxS5K0XpHzA7/rIe8A=; b=E7EQLYO4gHDXGUExCiihJLSysyn5S5ih8f6yIL4ukwBfh1eYVZwJ+FYb5SctKpo24f k0f7ZMsvqrptzQ1f1tBcRVwy/6Lf0d/IzcWKVPcHPf/jD69YdWVNBsHqcw0hg+uZAQpm SNDyEciEHQj2j56BUxt192KwgxpkNM9ibZKS8QjyuCy/IvF/3nwvYaIrmsEJ5ENDlUMI xYe88yEZ2csleQucNij/4YRbaXeZwgsjaxu2Fj0pkPQ4tTVWuVQwhFurukm75CV1C6TL SAXN0UxOhqrfvOc21T1aAF33m6kudKzGRJzJsiL6rzDJw/ZaBKHhQbEk+2y9XG5+okYx luPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=K3yhUeqp; 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 h7si222365pgc.663.2018.03.13.08.02.02; Tue, 13 Mar 2018 08:02:20 -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=K3yhUeqp; 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 S1751651AbeCMPAg (ORCPT + 99 others); Tue, 13 Mar 2018 11:00:36 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:52689 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbeCMPAe (ORCPT ); Tue, 13 Mar 2018 11:00:34 -0400 Received: by mail-it0-f47.google.com with SMTP id k135-v6so495755ite.2 for ; Tue, 13 Mar 2018 08:00:34 -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=LRh7vH/LCZQ5PCk/ZU1HRPm9bAxS5K0XpHzA7/rIe8A=; b=K3yhUeqpDREozTBBYI8ojzwxUzIWrKxQvE8oq/2YsYSrnMYxfEAW0g1P5Gh8qVmQ2a rDWPuyksHECxa+RDgxlLOixcPypOWmoq+iF/Y03kSuGz4i29Ii2t5dmsri2FpObI8L/6 1pQxuXLVOwK4la0wjXx5GpmIPNC2nIc/VvHoUslj+nbZlIK5ZtTvXff3rs+pQenwm5Bq SA02czpmkkjCaDtQquCu0O3XoFhTNVBaTDixRebFcjlVGNM0PIV4aaTJ2TGzvNywBfXe hni9QDqBrMbhAhRwdMIUEMqYTJiUIpk3UTTmO18s3SYB6MIbnI3KnNGOyjSToCdouZZu tYnw== 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=LRh7vH/LCZQ5PCk/ZU1HRPm9bAxS5K0XpHzA7/rIe8A=; b=t3f1dGzWzwtJxreLgz83GteMeCZHrD+m9AxIXJdnoz8C+z7/WJ/GK1KsgUeEs1nVi2 q+3h3DdxO2Zyr2JUb8dCbB4zxJTuFvOXgDhKXG2f8iPGJWt6m3lvhqNNwS3eQA/vwpD3 o3bpCidHxTk0VMR1vQX/4+CnYE1HZCjqqGTkYbCRQVKY96T3NnLMkarkTjCm+f4/L5OE i/ipAn/EFm2vgZXx3vwPbB8eJIoTakI4LxiRsqeaYFwktZPjWsVXR/VVK8If5wX1+5Ju x3C+beS6y4j57DDZfUM19L0sq4LAtCIUfbhDjSmgXU5gqNYi6ss+EhEYdyL294/4Ne83 zADg== X-Gm-Message-State: AElRT7GqPtogxJsGHua6GZhA5mpwK2be0/o4U3ZrWre6giRFT8FRTn+1 f+U2m/lq9Xqus8KUdGgoWu5QAEtfhBjmTBLmfjPHHg== X-Received: by 10.36.175.70 with SMTP id l6mr1340828iti.76.1520953233260; Tue, 13 Mar 2018 08:00:33 -0700 (PDT) MIME-Version: 1.0 References: <01000161fc0b4755-df0621f4-ab5d-479a-b425-adf98427a308-000000@email.amazonses.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> <010001621f97c0bb-898ceaeb-668d-4543-8835-dc374ba02539-000000@email.amazonses.com> In-Reply-To: From: Thiebaud Weksteen Date: Tue, 13 Mar 2018 15:00:22 +0000 Message-ID: Subject: Re: Regression from efi: call get_event_log before ExitBootServices To: Ard Biesheuvel , hdegoede@redhat.com, Jeremy Cline Cc: 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 2:43 PM Ard Biesheuvel wrote: > On 13 March 2018 at 13:41, Jeremy Cline wrote: > > On 03/13/2018 03: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. > >>> > >> > >> 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. > >> > >> Jeremy, could you please try initializing tcg2_protocol and log_tbl to > >> NULL at the start of the function? > >> > > > > That was it, it boots when those are initialized to NULL. > > > Thanks for confirming. I'll send out a patch. Sweet! Jeremy, Hans, thanks for the help debugging! Ard, thanks for the help fixing the issue!