From patchwork Tue Aug 25 08:36:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1350861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BbMlz6mJqz9sTg; Tue, 25 Aug 2020 18:36:31 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1kAURQ-0006qq-Mg; Tue, 25 Aug 2020 08:36:28 +0000 Received: from mail-pf1-f193.google.com ([209.85.210.193]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kAURP-0006qc-4S for kernel-team@lists.ubuntu.com; Tue, 25 Aug 2020 08:36:27 +0000 Received: by mail-pf1-f193.google.com with SMTP id d22so6765712pfn.5 for ; Tue, 25 Aug 2020 01:36:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q+cfdTHpA5sH/6QVecyueCe474ctHpnx9ymxKqrjPfc=; b=MWHbDr5nbl98m2ldE4mF6zEY2xHneAuyFR3QMxYjE8SIfEi4338QIXps41Abpcycy/ mjiKNE2TVyTFB5+yzqw+ujb7BkccBrUdmxinO4UtXecVDqB8mjH9ikbgK8yS856XBxLq VO04Vj2iJ03ej164lISa99G35h8G598ckZvVXXHi+t2cf9yZkuRUZgoY5XOrM7QgWfyb QczvJ/2YtLgHSLl5iWrKXNMVS2wqAJO3Hi31z+umQNyr2NfQINtZqBctqi2u0vnM90mt Amz2IGPyK/v2IaBs2SHtB0/pZAOWCxfEGYPfQhTYHjE8KehkHQh36hevhqAvtN/cqgYW bFPA== X-Gm-Message-State: AOAM533rAAZi6fJ7YOooJXyWCe4PXxE42LctT+Nd1Hq3IgllXoKsOijF U8jsiJxb5kTOeXd4tay7IB0NCx4n+BXuyw== X-Google-Smtp-Source: ABdhPJx5fXc0fMm8eoCVlH9IJxW15YcTMmb8o52C3WWvDuN2z5kutQjnWueREDRYpeGMuQMUpjS6OA== X-Received: by 2002:a17:902:9a0a:: with SMTP id v10mr2925737plp.331.1598344584609; Tue, 25 Aug 2020 01:36:24 -0700 (PDT) Received: from localhost (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id h15sm2142975pjf.54.2020.08.25.01.36.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 01:36:23 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/1][SRU][OEM-5.6] Fix system boot hang at efi_tpm_eventlog_init Date: Tue, 25 Aug 2020 16:36:20 +0800 Message-Id: <20200825083621.310249-1-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.193; envelope-from=vicamo@gmail.com; helo=mail-pf1-f193.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1892827 [Impact] Some systems may hang at boot. With "earlycon=efifb", more debug messages for EFI are dumpped. Last call trace as: RIP: 0010:efi_tpm_eventlog_init+0x1aa/0x2a2 ... Call Trace: efi_config_parse_tables+0x12d/0x213 efi_init+0x218/0x36b ? e820__print_table+0x65/0x6e setup_arch+458/0xa84 This affects all mainline kernel since v5.2 to v5.7.6. Fix available in v5.8-rc3 and has been backported to v5.7.7, v5.4.50. [Fix] Commit ea3cdcaa43b0 ("efi/tpm: Verify event log header before parsing") fixes commit 6b0326190205 ("efi: Attempt to get the TCG2 event log in the boot stub"). [Test Case] So far it can be easily reproduced with a green installation of Focal on USB key on a few Dell platforms. [Regression Potential] Low. This checks validity of tmp event log header before parsing them, so it affects only platforms might generate invalid entries only. [Other Info] This affects -generic for eoan and oem-5.6 for focal, but the former has be EOL-ed. Fabian Vogt (1): efi/tpm: Verify event log header before parsing include/linux/tpm_eventlog.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)