Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7419427imu; Thu, 31 Jan 2019 09:47:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN702exCG1XGKMPqzL+WkO/WBK0REQV726ocPO/q9M/KWUedRFit/mp2UjVJMDPW8/MBOcUV X-Received: by 2002:a63:fe48:: with SMTP id x8mr32805029pgj.261.1548956841693; Thu, 31 Jan 2019 09:47:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548956841; cv=none; d=google.com; s=arc-20160816; b=B/0SkmABjb/MrZZ9PyUPqV+kJJgFz2sLgqjlDVwwcU3uxPaz50nz7RvDz1k2y57C+a 91L0vvyRU02/qAimOJDWqhSEFkNTK7C/aUaCW2Ieogz1qL2Rlek9bsiGdx1x4Dcx+PI5 6Gmdyz/SkbpSrQUM/x2vuUVVyy/YWiToG/+td6ip7e/l419juKErQ+VQmD/8rnIktBFz AQ984KnY3+cExXAqngqV+maDjchM5HKeC5uPzTrTOHVze6t+LzrSZoz6TtFcLeQun6pP pq8k1O7zI/Z037a8pVvngqL+AXhrBcP8PCoWx5iTbCeiPbfEXXeojlpcap1ni/2axJPN Tblw== 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=z/qGLqs3Y9QIb+ifodOXo9LL2UnAj6Xio+3e9N5Habg=; b=GLTU2pSUYbPAl6vO39kYVk16aNpgH81Qh6IsSGE/sJ//qat4tG0x0a2Uzx++5yINl2 2kjCC4Qo/MeP6nlhtqbM2IsjcfWyNafWEN7DPocLQ27wOdf5b59bp0MVVsSY0PfEgCIr hFbKyBqbkaMWqqtSDWr27lfboO4JnG1RHaNk1FlUENw5D6Nj/kCA79Z108+8iAcjE5mE P5OpfGPwv2HgAdoe1WhT8ywOBv/9Q1h3QpSc+MSmShP6UbmeocxoSXTU9NRA+aSTc13y lVMw2FWwjeazXr+SVeAWc/yEx/udbF8P8oLbzIbjM6hizZsaPq+0Va4gq/IBSveoDD4L 0YzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Lbm7Ajk5; 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 n125si4611061pga.179.2019.01.31.09.47.06; Thu, 31 Jan 2019 09:47:21 -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=@linux-foundation.org header.s=google header.b=Lbm7Ajk5; 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 S1726446AbfAaRoD (ORCPT + 99 others); Thu, 31 Jan 2019 12:44:03 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:32908 "EHLO mail-lj1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726287AbfAaRoD (ORCPT ); Thu, 31 Jan 2019 12:44:03 -0500 Received: by mail-lj1-f175.google.com with SMTP id v1-v6so3468704ljd.0 for ; Thu, 31 Jan 2019 09:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z/qGLqs3Y9QIb+ifodOXo9LL2UnAj6Xio+3e9N5Habg=; b=Lbm7Ajk5iswWNdIclqld/UBPsufNmlCro+hy7ZQbWDUIqLPA0o711Y6gfzbXGbszXC PXZbOtPAEOU/tl4dy5u/0qBtpfp9a3FEpl5AMSimiNHB7ynmwTty6OaQrExYhDTmVvqz NL628HoGZ1uRIY/4Rq28xM4l2ykzlkE2eUkIo= 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=z/qGLqs3Y9QIb+ifodOXo9LL2UnAj6Xio+3e9N5Habg=; b=mv+6BrLjH5v8hQF5SKK4FbAavd2YwGEU3ptN11rujYxI6+oIHT3mBHmT5yJzj2lZGB QIYSTmTy9ZoQaVs+ysT1b164TvPeRTe05xY6Tt+10lz+uQS0txHPtOO9gpPmED4KFiII cOh89/nFXIA+v81pnNYSgLiMiS1XkExvV06Y/6Jq0LLvQwin2lq+zJJ/dLrWDjIc4X/+ YbB8rkJR3/G8OLurtoeoHxvYzvaoM8Jda0QWHo4cl264PtYs3q/i15D07yJZ+g2+89PL fXr6HcqVVxdolxCgbrCzWM8kA+xx1wrycmzC4YMrYTiQdRBmsesUYe/XTvCHYzTAucAW ek/Q== X-Gm-Message-State: AHQUAuYAYgCkutSEIicidIyoY9p6U3fo3jLACeByLEOHmA/tMArgIUGg hcHhoqgwU/66bZ1L0Jl8oUoyrL/SVms= X-Received: by 2002:a2e:9694:: with SMTP id q20-v6mr16934149lji.173.1548956640555; Thu, 31 Jan 2019 09:44:00 -0800 (PST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id k20sm954800lfe.3.2019.01.31.09.43.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 09:43:59 -0800 (PST) Received: by mail-lf1-f52.google.com with SMTP id p6so3016130lfc.1 for ; Thu, 31 Jan 2019 09:43:59 -0800 (PST) X-Received: by 2002:a19:ef15:: with SMTP id n21mr28198593lfh.21.1548956638976; Thu, 31 Jan 2019 09:43:58 -0800 (PST) MIME-Version: 1.0 References: <20190120160413.GB30478@linux.intel.com> <20190122010218.GA26713@linux.intel.com> <20190122025836.GH25163@ziepe.ca> <20190122132910.GA2720@linux.intel.com> <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> In-Reply-To: <20190131170603.GA18349@linux.intel.com> From: Linus Torvalds Date: Thu, 31 Jan 2019 09:43:42 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Getting weird TPM error after rebasing my tree to security/next-general To: Jarkko Sakkinen Cc: Jason Gunthorpe , James Bottomley , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Linux List Kernel Mailing , tomas.winkler@intel.com Content-Type: text/plain; charset="UTF-8" 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 9:06 AM Jarkko Sakkinen wrote: > > Found something that *does* fix the issue. If I replace memcpy_*io() > calls with regular memcpy(), the driver works and all my tests pass. That's not surprising, since that's what we used to do. And it's horribly wrong because "memcpy()" can do things that are horribly wrong on IO accesses. Like doing them twice, but alternatively also "copy one byte at a time" which generally works, but is horrendously slow for IO. Can you check *which* memcpy_*io() triggers the issue? Maybe by "bisecting" them (first perhaps on a file-by-file basis, and then within a file). Linus