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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 07BEBC742AA for ; Fri, 12 Jul 2019 03:36:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5C7D214AF for ; Fri, 12 Jul 2019 03:36:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729413AbfGLDgH (ORCPT ); Thu, 11 Jul 2019 23:36:07 -0400 Received: from mga11.intel.com ([192.55.52.93]:3347 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729166AbfGLDgG (ORCPT ); Thu, 11 Jul 2019 23:36:06 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 20:36:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,481,1557212400"; d="scan'208";a="193621127" Received: from gonegri-mobl.ger.corp.intel.com (HELO localhost) ([10.252.48.192]) by fmsmga002.fm.intel.com with ESMTP; 11 Jul 2019 20:36:02 -0700 Date: Fri, 12 Jul 2019 06:35:56 +0300 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: Douglas Anderson , stable@vger.kernel.org, groeck@chromium.org, gregkh@linuxfoundation.org, sukhomlinov@google.com, Arnd Bergmann , Peter Huewe , linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org Subject: Re: [PATCH] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations Message-ID: <20190712033556.4pze65z7cxga5tdu@linux.intel.com> References: <20190711162919.23813-1-dianders@chromium.org> <20190711163915.GD25807@ziepe.ca> <20190711183533.lypj2gwffwheq3qu@linux.intel.com> <20190711194313.3w6gkbayq7yifvgg@linux.intel.com> <20190711194626.GI25807@ziepe.ca> <20190712033138.tonhpqy4yfdlkvs4@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190712033138.tonhpqy4yfdlkvs4@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 12, 2019 at 06:31:38AM +0300, Jarkko Sakkinen wrote: > On Thu, Jul 11, 2019 at 04:46:26PM -0300, Jason Gunthorpe wrote: > > On Thu, Jul 11, 2019 at 10:43:13PM +0300, Jarkko Sakkinen wrote: > > > On Thu, Jul 11, 2019 at 09:35:33PM +0300, Jarkko Sakkinen wrote: > > > > > Careful with this, you can't backport this to any kernels that don't > > > > > have the sysfs ops locking changes or they will crash in sysfs code. > > > > > > > > Oops, I was way too fast! Thanks Jason. > > > > > > Hmm... hold on a second. > > > > > > How would the crash realize? I mean this is at the point when user space > > > should not be active. > > > > Not strictly, AFAIK > > > > > Secondly, why the crash would not realize with > > > TPM2? The only thing the fix is doing is to do the same thing with TPM1 > > > essentially. > > > > TPM2 doesn't use the unlocked sysfs path > > Gah, sorry :-) I should have known that. > > I can go through the patches needed when I come back from my leave after > two weeks. It might require a number of patches but maybe it makes also overally sense to fix the racy sysfs code in stable kernels. /Jarkko