Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3850676ima; Mon, 4 Feb 2019 06:17:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IbRKM0SufVEf2fbuEkpIlJNL5WPlgvdC7YdnpsOfOXBl5LStr5OG5sKw2wPSVPTha0RfhFo X-Received: by 2002:a17:902:684:: with SMTP id 4mr1867726plh.3.1549289858239; Mon, 04 Feb 2019 06:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549289858; cv=none; d=google.com; s=arc-20160816; b=yJnqjWQHhKK2A1tiunmTaq4tIGkUvzeMdIjq9l2nYOeZJ5xc2sxOYzydGW3kR2b791 PWmlE4vB/ZnUK+Fly/pQlXvEDmrNozOg2NiVNIcpaFEE0zf82+sIaY41NMCk09ttQ047 /9Rx2tOA0E4xR6BG2s2IL+qBDYUAgIpZB0eeu92Z1k/W1h6X1yVerv3AymP6ZSeigw5C t9cYfSb/xropVBscqL6nOAPzIVzDJIQ2QmY9UT/wqqQnUjv6nO0I5gED+Ss75OpquwPO aoC5ZHfTXt9TBUBfb4TPLbc0+b/DOm1lyCC6+9foCp+XWygGkgjP0MruyibnusIk87Tu /rZw== 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:cc :to:from:date; bh=czZ5RSAJjYiz6h/T64UFmCs5juEF1ZztEPF166sm55s=; b=KBQ2sKvk5vIhaGdZUF37NO0iktzVFHbrRLmZduLl+Y4Ak99wtbZO7GmcNxkBA/VBzf z1UaE5ucze+ocgSWt2E9wWdcniP1BxyBDJzadpbWiRcO+rOYRlPIjvb4lSwWfhg/7XXh Pkhh3Ity1KRQANEeytDf2zYobE/4dPPmEcOGeMMXBebfiKUmc6n6cP6nIi2Qx38HHNaE 9dDIDSryF7A1wi1vCBqIwkNLzYBXtnTQJnb6ia1JZyh0ZLgPkkZ+VHMOyH7wurkR/f3d DNd8bNUf6hfAO7nJ+8HL8e6KlNA6bplN027hhkvGpWlCZjg6zAKrR7R8XkEyoqBEXBYT TfkQ== 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 u186si150702pgd.131.2019.02.04.06.17.21; Mon, 04 Feb 2019 06:17:38 -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 S1728760AbfBDL62 (ORCPT + 99 others); Mon, 4 Feb 2019 06:58:28 -0500 Received: from mga02.intel.com ([134.134.136.20]:23151 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727571AbfBDL62 (ORCPT ); Mon, 4 Feb 2019 06:58:28 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Feb 2019 03:58:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,560,1539673200"; d="scan'208";a="113533776" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.172]) by orsmga006.jf.intel.com with ESMTP; 04 Feb 2019 03:58:23 -0800 Date: Mon, 4 Feb 2019 13:58:23 +0200 From: Jarkko Sakkinen To: Linus Torvalds Cc: Tomas Winkler , 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: <20190204115823.GC26799@linux.intel.com> References: <20190123153638.GA8727@linux.intel.com> <20190129132016.GA1602@linux.intel.com> <20190131122606.GA12470@linux.intel.com> <20190131160437.GA5629@linux.intel.com> <20190131170603.GA18349@linux.intel.com> <20190131183530.GA27112@linux.intel.com> <20190131204510.GA354@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, Feb 01, 2019 at 10:04:35AM -0800, Linus Torvalds wrote: > On Thu, Jan 31, 2019 at 12:45 PM Jarkko Sakkinen > wrote: > > > > I understand what you mean. Just surprised that this hasn't failed > > before to anyone (the same driver has been even successfully used > > on ARM64 with TrustZone based fTPM implementation). It has been in > > for three years now. > > Just to finish this thread off: it turns out that both ARM and ARM64 > worked fine, because neither did a memcpy(), but had explicit IO copy > routines. > > And in those explicit routines, 32-bit ARM did only byte accesses, and > 64-bit ARM did 8-byte accesses for the bulk transfer part, but byte > accesses for the unaligned head and tail of the IO area. > > So I think it's all good. x86 used to work by luck (either because all > machines that used that TPM chip always had ERMS, or because the > people who didn't have it never cared), and ARM just worked because it > would never do unaligned IO accesses anyway (well, I guess you can > force them with "readl()" on an unaligned address, but then you just > have yourself to blame). > > Linus OK, thanks for the summary. This kind of answered to my question. Should be sufficient to include the tpm_crb fix to the 5.1 PR. /Jarkko