Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7029290ybi; Thu, 13 Jun 2019 08:23:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1W/U58fAiQ/TbjTLBlmwuStGas0WCrw1E4dRxVrGubyeuoohHSBe6yadZ96RxLFw6JLCO X-Received: by 2002:aa7:92da:: with SMTP id k26mr40814763pfa.70.1560439417448; Thu, 13 Jun 2019 08:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560439417; cv=none; d=google.com; s=arc-20160816; b=zz0AcQuEoRDETVVHYuaceXK/j6sKQ6bmhMVpAf9ZIfxXLEoBQKFh4CQirwv/vphQAI Z/svDe8W42qiK+BXmLXyEsLFq8Px7iV/hFAsi8JfsGeHQwBaFfc4M5pJy2GouxJJvxsO jYm0SgjWiFozr0TPNju+lVPd5HgUbmKKeLfLpJB30OlChI9zfxhDDCzqEt4E/BkeCq8U CtGZZvGRSyghKAQ2BPEZF2OAEnkyjWux9dedNJQfBlNp1VZBNof8N04+KpRjUdrM9NO6 Ai8tzdrjZu3raboDf6HwNHfdp7Fs+Zr+qfHVYjFi8HCpp2yHVqk+fWXX9SQnLteXyOvf ecFA== 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; bh=W4CLAIpeJG06PjCbzsvwamFdGAAxmhkCmW4gQXkIrJw=; b=zm2snmnqLpy5B1ywZJULp+UrHPZKta8+/H4MU3O92gUwxc57FpC/Uo0SZBlOsFNyh+ hkCgtaRWAysCgKH4F+kAfsR9eytAQ7xzdzserjomjHg8AYCWA4dPhy/S5Y4e7BzpLo+e F8lWhugxPo/3TQhWqTTJxF7iAGPQxLTiyEpEXvMnBIu/fpfq4EkCwFdApRmd9y87G3g2 xPueK0N7E8kBumiBe8PQhOr7HBNq16WY2q0KFk647GKJkcPseGh8bQis7dIF41PsVCo9 D5vw2pFXAanQs2TYZFhyhAkNn0WK/4iXNYEtiJc6BRzLBPoTGnDZs19JiVoa8WyZyUbX VDtw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7si3229038plq.246.2019.06.13.08.23.22; Thu, 13 Jun 2019 08:23:37 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389069AbfFMPW3 (ORCPT + 99 others); Thu, 13 Jun 2019 11:22:29 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:39021 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731981AbfFMMkx (ORCPT ); Thu, 13 Jun 2019 08:40:53 -0400 Received: by mail-qk1-f195.google.com with SMTP id i125so12596618qkd.6; Thu, 13 Jun 2019 05:40:52 -0700 (PDT) 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=W4CLAIpeJG06PjCbzsvwamFdGAAxmhkCmW4gQXkIrJw=; b=YQy0fiZoLELAKrhSCZI9hN4RolQ3mGr9GW0aLk1VWo90FBmIwcd7Xh6hD60tsJE8a3 vPFXn6q7tUjsJqY74TiLVpWlhNDcgRnpmay8jgunVDGiuhwCL4oljVCO9ojRzmK+L8RT o601bEDcYetPfXsuDmjpiQbwqN2YXIsZaHHaCb7ZpXOjoCp/y4ilH25mDIPMb6DmXn16 Qf73KnBS1/Ulp5VhWDJWQn7Mv3CE6j2WqZensSDYcVGPINA4UJNALPn5FNUPh1KlUhhg O5Bbb05V++1Z4c1hngZw9qui4V1HWO2DlTnOPktv+f8rx1htmb9qIkyG82tvbbgF4FFd dHUg== X-Gm-Message-State: APjAAAVGEu3Hvs0IYDEHDW2kBQSCHTT8OUKIue1ZjRIWg3NFjzPVBocY h0vcgc8zc2b10oEch6eeBmqnPj+UiWsXK1hgz1k= X-Received: by 2002:a37:a4d3:: with SMTP id n202mr68904510qke.84.1560429652313; Thu, 13 Jun 2019 05:40:52 -0700 (PDT) MIME-Version: 1.0 References: <20190611125904.1013-1-cai@lca.pw> In-Reply-To: From: Arnd Bergmann Date: Thu, 13 Jun 2019 14:40:35 +0200 Message-ID: Subject: Re: [PATCH -next] efi/tpm: fix a compilation warning To: Bartosz Szczepanek Cc: Qian Cai , Ard Biesheuvel , Matthew Garrett , linux-efi , Jarkko Sakkinen , Linux Kernel Mailing List 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, Jun 13, 2019 at 1:41 PM Bartosz Szczepanek wrote: > > On Thu, Jun 13, 2019 at 10:55 AM Arnd Bergmann wrote: > > > > - efi.tpm_final_log is a physical address that gets passed into > > memremap() to return a pointer > > - tpm2_calc_event_log_size() takes a pointer argument and > > dereferences it. > > Where does it? It's passed with some added offset to > __calc_tpm2_event_size, which does the remapping part. That's why > physical address is used here. Ah, right. I was confused by how __calc_tpm2_event_size() may or may not do the mapping again based on the 'bool do_mapping' argument, which is 'true' here. Would it be correct to change that to 'false' then (or completely remove the additional remap, given that the other two callers pass false already) and pass final_tbl? Arnd