Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6900581imu; Mon, 21 Jan 2019 18:59:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN7H+psE+CvCfJD0MGEkXMA0TYKC9h7ksqXTvVIGGE91i9Gz68QC538dPH3vIPqpGb9SWinn X-Received: by 2002:a62:7a8b:: with SMTP id v133mr32460720pfc.159.1548125998442; Mon, 21 Jan 2019 18:59:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548125998; cv=none; d=google.com; s=arc-20160816; b=tPBHc8xb36NAe8Xp/LB+s7P0ovyNTJ7HqOv52Ufcpv5g6UWJgqbIBEUO/3myyct3Ym RdqgNWhh2rcgTGrOg4w55WE0VVyLxpoBOd5nSw6+/XqKo95L59gpKXsQQ+QSRoZwnnUz ks0r5Kdckl66o+yO0fp75Fsku9ae5wG05Ad9bmV4j2rIDyKXntPfqln1GAfdm7zE9v7r /ykr+niOitXYRvLT9o1lG5c44c8X0l5QO6V4cyK6xr5bBfCPpYqfVNEjv6kRUTUpWkMj q8TfZvZ4hl9L+e0jRfBwUYjl+CvMap5Ya9Jh4ui/HbVhO2Obn7q3gSz0zNmZIMOr1H/V +xeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a5JfqlRB8d08NKHQ+Y2k/1n98WJrQMCzg/lSbr2I8jw=; b=TlWTAIFAw4HH5lv68c9ZbMjbhIdKjDWlIfVtkkzcn82ibFoHJlFWAJCAcPWsYH9Our 9BA+vuPyjbyT9coIQUawtiRVVKUFHdHcSMJSFB8pUqnuD3Gnj3E8vsOj+fHwHpl0QD1Z a0+fDXCOhOXorkfHvgQEJOO9CtaD0L+NAF2ncDo9xKWGb70l82tb4LrcU+HlUxji21TF mzWZSZettlFowrF5sIF3xTH12eSvMSODgrPWIba/Q8JReHa1mb73NIujqIlcrKmg34ft hikW29SAreO6GW8M50pTaYD5A+pX5/9hsMxzgZ5VuwbghoGij2b/I2mAkiPxtc62wHzF 6m0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=H7jiZuvN; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si14972271pla.20.2019.01.21.18.59.42; Mon, 21 Jan 2019 18:59:58 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=H7jiZuvN; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726859AbfAVC6k (ORCPT + 99 others); Mon, 21 Jan 2019 21:58:40 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34113 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725901AbfAVC6j (ORCPT ); Mon, 21 Jan 2019 21:58:39 -0500 Received: by mail-pl1-f194.google.com with SMTP id w4so10719295plz.1 for ; Mon, 21 Jan 2019 18:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=a5JfqlRB8d08NKHQ+Y2k/1n98WJrQMCzg/lSbr2I8jw=; b=H7jiZuvNlmrsmsLRVoiGjfJl6Uks7DwBqHRkA187HLSisqMf9WsYOxOF4pBMWDH2KG +8XImc0RJEpceRF7rASvUOUd/KBej57Vx7xmzuwdssHhseilOyhOWC97enmx39eLMPE4 Wr/LkQ/uuK0uByOophBICWTp1SWGSqVNXrM8BSViYcCPZaEq9x/nTfWJt1KS9zexzJxf ZDJKGFDGuHwxR5evZT65ktGkYoXYKiU+Z+nkcqN1iPsipzK807UVNPlohnla1UL1OStY p3NKSlhVTCRPuX5aa4jykNDWxQVVeVYflUbNcqaMQiDflNEcZ/lBtAnl9zTMHdOoLODo TNVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=a5JfqlRB8d08NKHQ+Y2k/1n98WJrQMCzg/lSbr2I8jw=; b=d/0jD4P4oahGJiDYc3vZEeaVjnqywSodziQIzscyljGdMx/V4jvsJ51N6BDlwcBWyV o7JdI/DMsNAzDWUNZkpOXMZq511ZlcA2isUfA/UntF5kBPyBgfbTroUfZjYuQ+zJXDQt dPF6cI1sbWfvRoqvaMOzZT5FI2qgkRKgofT5nOjFmohNQyG1gfa/OSTy5pbizcupcU0t A0L42ZiI3rNJ502oufDxEePXUcEJWoc8WeUmf6EPjJeSK1Ouv8fXsZ0di1AfWKq0ECIA 2BxBNT+0IgIaF1H84bymwT7wCJID/gBZ/KFOCF7xvNXdmcdkgdJxcgaw2LEk3Q0H3TKh +bbg== X-Gm-Message-State: AJcUukcfbvmH4a9iJEGAbsLQ77b0DM+WOSa5Lj5Ugc8OQSxk+hFFHfoF AUR1r2KbsvIkyy+jtTWSq2PLgoV8k8Q= X-Received: by 2002:a17:902:1008:: with SMTP id b8mr31402866pla.252.1548125918903; Mon, 21 Jan 2019 18:58:38 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id v191sm33180592pgb.77.2019.01.21.18.58.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 18:58:37 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1glmGq-0004YG-T5; Mon, 21 Jan 2019 19:58:36 -0700 Date: Mon, 21 Jan 2019 19:58:36 -0700 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: James Bottomley , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Getting weird TPM error after rebasing my tree to security/next-general Message-ID: <20190122025836.GH25163@ziepe.ca> References: <20190118142559.GA4080@linux.intel.com> <1547849358.2794.90.camel@HansenPartnership.com> <20190120160413.GB30478@linux.intel.com> <20190122010218.GA26713@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190122010218.GA26713@linux.intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 22, 2019 at 03:02:18AM +0200, Jarkko Sakkinen wrote: > On Sun, Jan 20, 2019 at 06:04:13PM +0200, Jarkko Sakkinen wrote: > > On Fri, Jan 18, 2019 at 02:09:18PM -0800, James Bottomley wrote: > > > On Fri, 2019-01-18 at 16:25 +0200, Jarkko Sakkinen wrote: > > > > I get this on a Geminilake NUC after rebasing my maintainer trees: > > > > > > > > tpm tpm0: A TPM error (-1) occurred attempting the self test > > > > > > > > I checked the latest commit ID from drivers/char/tpm to make sure > > > > that I did not put anything broken to my last PR [1]. It works > > > > without issues. > > > > > > > > In addition [2] gives me an empty diff. > > > > > > > > Something outside of the TPM driver must have happened that breaks > > > > the driver. Any ideas? > > > > > > > > [1] commit 9488585b21bef0df1217e510c7134905d1d376a7 > > > > [2] git diff 9488585b21bef0df1217e510c7134905d1d376a7 master > > > > drivers/char/tpm/ > > > > > > I'm afraid you're going to have to bisect to find the offending in- > > > kernel commit, which is going to be painful since it seems to depend on > > > physical hardware. My first instinct is that we're getting a zero > > > length read somewhere, but I still can't see anything in the merge > > > window that would cause that behaviour. > > > > Yeah, I've started to bisect it (still 9 rounds to go). > > Fails on commit 170d13ca3a2fdaaa0283399247631b76b441cca2. Still works on > preceding commit a959dc88f9c8900296ccf13e2f3e1cbc555a8917. This changes the IO access pattern in memcpy_to/fromio.. Presumably CRB HW doesn't like the new 4 byte move? Swap each one in crb to memcpy to confirm.. If the HW requires particular access patterns you can't use memcpy_to/fromio Jason