Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp333199ima; Fri, 1 Feb 2019 04:08:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IZzjdfXfYcdKFfSq116dENNvClM7BouWyO20gGwACP8yq1Tz4gAC4Cq8eHN8z0KX41UlUR4 X-Received: by 2002:a62:8a57:: with SMTP id y84mr8058698pfd.197.1549022937036; Fri, 01 Feb 2019 04:08:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549022937; cv=none; d=google.com; s=arc-20160816; b=pNHd/2Gx1nCQi+3NEUpuc/vak2kUHJS1QiZfmxSWs+gd0Ze+G+G06u2y3gj5rCsfmu ohQdiLk60QOpKTq9dFoMzNg2+KNYNuohdZ8szX9R8XnM27Z1dBG7ivUkEGZIhgmnixEf 9BFyD3oIwx3XAAh+WnAHBaqgQ3Hrsdzx1S7dJiivyRloJOuXV2CtK43bq8jzwnU/SawO Z9vK+n7tCh7dxNzyJT/sxvcwmPVVfOZoiktWdiC2QFZcGqKqPlWWFxDO8MsiI9YS94qM qoAlDfNywcEw8mGnWFMcB5HhAiMETNeH3ON8Rmn3a7gCNbEU1o2U2NEkjjWoNgPVhC8v YLng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=o9kV1eIN7ReO1JJvrLHAzCOX8lph1iIK1EBmopA80ps=; b=rzYcxBM/SGyw7dg+4D1rl7IurK/f1O2ZrhP2Rb0gATogen30mgLsZTbv0ig9Gfkw1o izbPDFplj2SzxRc/uW7KQKfNAm2icktTxc5lv1nqxqc+2XBAjgtP7Xfh8/14IlZezZe+ sfonJKHV7oclkA5jZR9cSD58snzhnIm/IKeheJ2yn/RIe3sJkvZ9+ZXOIdp0g5P7b78O ff8lOib8g4ZoB7JPwy6PFj4H/7ND6F0L7OTbKsIPR0VOhw0GDFppeilakTZFtptOb5ca uWQEskYfzzsyob6u67R/3Jfaj402vsG6cJHW9BTCLbOvuQwcmh8bhC0ks31QOpaWzGuZ rYVA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34si7496709ple.280.2019.02.01.04.08.41; Fri, 01 Feb 2019 04:08:57 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729044AbfBALkp (ORCPT + 99 others); Fri, 1 Feb 2019 06:40:45 -0500 Received: from mga03.intel.com ([134.134.136.65]:32546 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfBALko (ORCPT ); Fri, 1 Feb 2019 06:40:44 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Feb 2019 03:40:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,548,1539673200"; d="scan'208";a="143365139" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.172]) by fmsmga001.fm.intel.com with ESMTP; 01 Feb 2019 03:40:41 -0800 Date: Fri, 1 Feb 2019 13:40:41 +0200 From: Jarkko Sakkinen To: Linus Torvalds , tomas.winkler@intel.com, Jason Gunthorpe , James Bottomley , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Linux List Kernel Mailing Subject: Re: Getting weird TPM error after rebasing my tree to security/next-general Message-ID: <20190201114041.GA15858@linux.intel.com> References: <20190131122606.GA12470@linux.intel.com> <20190131160437.GA5629@linux.intel.com> <20190131170603.GA18349@linux.intel.com> <20190131183530.GA27112@linux.intel.com> <20190131204710.GB354@linux.intel.com> <20190131233136.3dhadb7a46lp2nu6@cantor> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190131233136.3dhadb7a46lp2nu6@cantor> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 31, 2019 at 04:31:36PM -0700, Jerry Snitselaar wrote: > On Thu Jan 31 19, Linus Torvalds wrote: > > On Thu, Jan 31, 2019 at 12:47 PM Jarkko Sakkinen > > wrote: > > > > > > I'll try it first thing when I wake up tomorrow (11PM in Finland ATM). > > > > Thanks. > > > > > Appreciate for taking time on this. > > > > Hey, it was my commit that broke it for you. Even if it happened to > > work before, and only did so by pure luck, it was a functional > > regression. > > > > I get very upset when other developers don't step up when *their* > > changes break something, and I don't consider "it shouldn't have > > worked in the first place" to be a valid excuse. You broke it, you'd > > better fix it. > > > > So I had better fix my own mess too, in order to not look too hypocritical. > > > > And I was very aware that hardcoding the memcpy_*io() access patterns > > might break something. I just _hoped_ it wouldn't, because we actually > > ended up going back to the very original access patterns (but it was > > from a long long time ago). > > > > In fact, while it's slightly annoying, in many ways it's actually good > > that we found breakage, and could pinpoint exactly *why* it broke. > > That does validate the whole "we shouldn't just depend on the random > > implementation detail of 'memcpy()'" argument. > > > > So I'll wait to hear back whether that patch fixes things for you, but > > I _think_ it will, and we'll be better off in the long range with this > > whole thing. > > > > Linus > > I just did a quick test here of booting and running a couple commands > (tpm2_getcap, tpm2_pcrlist), and the patch seems to work for me. I was > seeing the error during tpm_crb initialization without the patch. Works for me too. Just submitted tpm_crb level fix too for the reasons explained in accompanied commit message. Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen /Jarkko