Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5420038yba; Tue, 30 Apr 2019 14:36:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyx1p+4w9s7sYVOPumDpekNRtucbYdOcuh+oBeIhyg0GBYu2HgbYE0+O0QeJoj7qskFA55C X-Received: by 2002:a17:902:b217:: with SMTP id t23mr22561479plr.49.1556660191093; Tue, 30 Apr 2019 14:36:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556660191; cv=none; d=google.com; s=arc-20160816; b=vHTf12FLfz1cd4tzdR75UKM0vBPFqORfcwTq4aT8wPesdq3otYWy6joDCOHthz3za7 yTSXN4o1xM8mHVKmtzfBaVJSMjf37dxeX13h6YBM32yRjlxS2UD15S6jNr7UEj8NIaq7 RPG/ygGczJiBKik6xb5lQcOoIXG0s0HZd775+zVLbZkYoY2fiwLprPvDcFp4/6LTcl4y +l8VMGUTT40ZpICQZNTXQvSAqX+pDN32jAxqP7s3PuoBYgMfT7jVqY3rOls0xZ1PwRES tEIkOBIp8uIc1ROf7f3uUBCepGBYitOYLQxkHRmXWe9XuswyVwc7UZXyW/YJMkmplMEL uc4Q== 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; bh=xwbA6m1IlkHcQAdDn+q8EF7OA9bDmXUDL8pQ3xlxeqo=; b=XZlqKRJgi7qakml6QxmT95i42H5RlcvAEWDNDfd4A71YxjshyLi2rADNaaF4dPC1tC ttR8MmJfAeZoJxAEUpjTJBF31kkD9s7TwAKT5F4HGFbLutmLypp+z+wzc39osQMF6QFZ BJc4+bUb4I8bRS2an9e8Z9yKCUoQfCsHIrR2tAe89UUqz4uKSBVqE1RsJ/BQmoPODO0V /KJzob4ji7GCYH8gua0K0Ib/L8AYvTLwbQ0FgbxWSO4c3IdAklW7wj+DPGqVhxQe4i8b LJfL6/rhUxtibD7KxH5r/pHB9E7rY6vY6S4TYpYxuC7iqgiIRq2iQmhg2oec49LFgPv7 HkXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Sq8KNLYM; 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 r20si2410146pls.19.2019.04.30.14.36.15; Tue, 30 Apr 2019 14:36:31 -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=Sq8KNLYM; 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 S1726412AbfD3VfW (ORCPT + 99 others); Tue, 30 Apr 2019 17:35:22 -0400 Received: from mail-it1-f194.google.com ([209.85.166.194]:34853 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbfD3VfW (ORCPT ); Tue, 30 Apr 2019 17:35:22 -0400 Received: by mail-it1-f194.google.com with SMTP id l140so5990002itb.0 for ; Tue, 30 Apr 2019 14:35:21 -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=xwbA6m1IlkHcQAdDn+q8EF7OA9bDmXUDL8pQ3xlxeqo=; b=Sq8KNLYMoEQTJQ8Stw6ktrYFYw+zkDUBePOHtQKKTkZvwVtovOluTVKwMnP5OxwkEI xRPL4YOMPiqolt7cnNDIoRjpVwHdC9cPNhE5Az/2QlbtpvjxgVHuNqQuQHGGwpUVVukW nC5xJQiZfC1wh2gFeunojseYcQqwKNo5P06mvHmBW2ZJ7630qxkTzOArc13ieUXbbmh7 u5k9icmaMxO9TnXKm5AyU5gnXzs5kmyR4Kumoh2cWT3xkILJnt8pw/wQ2BbT/p/BhhX2 Y8Wt5n3FwizMxkHPOOXZHoN+O5XlGBIpYOk+347M3eRzLEcaJhRYkVvbP14mTC1og8mp 0aeQ== 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=xwbA6m1IlkHcQAdDn+q8EF7OA9bDmXUDL8pQ3xlxeqo=; b=NweeWmdHH9KBo4NBNA2KlNdpRr1OEpAIazUEw/L3LGXUybjXFNdGm8sVSmU81Jf9v1 8E3RxbzSBfOWGZkWib7RS1JtdYPJKTy4Lu3AfVq1l4xH1bPlE1H7HbjNlrpO7VvJXkKN fegtrT+vwQB1pqG7hbxCF8seN9ptha7IhW922TOH7+g2Xo3TtO03129tKun38t+0WNqP KtB408/nRgDD2G5GrxINvALWgYmvFQrXG9qvJooqynzN6YnSVpXTB+SuhV1L7mcK/rSo P/zYvjCmsQSUiMENYo0QiErjfXT+w+zIcbOUtbrvfjEeqIvf5dJfWyUYrBm2k4V0f1hW 6kRA== X-Gm-Message-State: APjAAAXQLjtQ0OgDiGzNRfZJ4ypKASztRlo2VUxoCrF86A/eok15xjGO A2gEMnojd7TbYSWru7AwOmGUpf5Y+PVbUtwYj6WgYw== X-Received: by 2002:a24:a86:: with SMTP id 128mr5346735itw.118.1556660120632; Tue, 30 Apr 2019 14:35:20 -0700 (PDT) MIME-Version: 1.0 References: <20190227202658.197113-1-matthewgarrett@google.com> <20190227202658.197113-3-matthewgarrett@google.com> In-Reply-To: From: Matthew Garrett Date: Tue, 30 Apr 2019 14:35:09 -0700 Message-ID: Subject: Re: [PATCH V5 2/4] tpm: Reserve the TPM final events table To: Bartosz Szczepanek Cc: linux-integrity , Peter Huewe , Jarkko Sakkinen , Jason Gunthorpe , Roberto Sassu , linux-efi , LSM List , Linux Kernel Mailing List , =?UTF-8?Q?Thi=C3=A9baud_Weksteen?= Content-Type: multipart/mixed; boundary="0000000000008759370587c62d7b" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000008759370587c62d7b Content-Type: text/plain; charset="UTF-8" On Tue, Apr 30, 2019 at 12:51 PM Matthew Garrett wrote: > Yes, it looks like this is just broken. Can you try with the attached patch? Actually, please try this one. --0000000000008759370587c62d7b Content-Type: text/x-patch; charset="US-ASCII"; name="fix_log.diff" Content-Disposition: attachment; filename="fix_log.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jv4b8h1f0 ZGlmZiAtLWdpdCBhL2RyaXZlcnMvZmlybXdhcmUvZWZpL3RwbS5jIGIvZHJpdmVycy9maXJtd2Fy ZS9lZmkvdHBtLmMKaW5kZXggMmNjYWE2NjYxYWFmLi5kYjBmZGFhOWM2NjYgMTAwNjQ0Ci0tLSBh L2RyaXZlcnMvZmlybXdhcmUvZWZpL3RwbS5jCisrKyBiL2RyaXZlcnMvZmlybXdhcmUvZWZpL3Rw bS5jCkBAIC0yOCw2ICsyOCw3IEBAIHN0YXRpYyBpbnQgdHBtMl9jYWxjX2V2ZW50X2xvZ19zaXpl KHZvaWQgKmRhdGEsIGludCBjb3VudCwgdm9pZCAqc2l6ZV9pbmZvKQogCQlpZiAoZXZlbnRfc2l6 ZSA9PSAwKQogCQkJcmV0dXJuIC0xOwogCQlzaXplICs9IGV2ZW50X3NpemU7CisJCWNvdW50LS07 CiAJfQogCiAJcmV0dXJuIHNpemU7CkBAIC00MSw2ICs0Miw3IEBAIGludCBfX2luaXQgZWZpX3Rw bV9ldmVudGxvZ19pbml0KH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