From patchwork Wed Apr 25 13:26:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Thi=C3=A9baud_Weksteen?= X-Patchwork-Id: 10363235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 58E5F601D3 for ; Wed, 25 Apr 2018 13:27:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4971128D6B for ; Wed, 25 Apr 2018 13:27:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E2AA28E05; Wed, 25 Apr 2018 13:27:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F14F528D6B for ; Wed, 25 Apr 2018 13:27:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754491AbeDYN0x (ORCPT ); Wed, 25 Apr 2018 09:26:53 -0400 Received: from mail-qt0-f201.google.com ([209.85.216.201]:50980 "EHLO mail-qt0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754252AbeDYN0s (ORCPT ); Wed, 25 Apr 2018 09:26:48 -0400 Received: by mail-qt0-f201.google.com with SMTP id e12-v6so17328571qtp.17 for ; Wed, 25 Apr 2018 06:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:message-id:subject:from:to:cc; bh=Y7Lh2wdJK0LGcfRaMwEzE2ObRu76T8OZI1g/bW+CYs4=; b=h7KOBqWwisGoVGIr0dVJ2v4tLL/BE6b5sXNlYmojh6PuTL0aLBdQ29BXsNZUKcCWhW Ie8vbpxgpE8/bBIYNkPY2rnMORVP84NuQdrAvfn9j5hkisambQUg7Q3A+iFKFQeyBjw+ WoVxJZi53tDJfj88LJzR56kpkfXUw2uvhE8Evh2+ECmI0Jt1UIZEWIOlqZpJuKpOr4i3 JC1Tj31WPXrJWRNcCe9jNIj+jLzVlt4MZJl0Ua2KHpJVezgE8p2aoHU2D2DfxLxEbgSb vEoWm+C/wPubPNFvF9iHiy/FkF52mA5f/gTKvNyovapOUbMAAxWDTqT/UKcQbokJl24b 0dhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=Y7Lh2wdJK0LGcfRaMwEzE2ObRu76T8OZI1g/bW+CYs4=; b=tf3uiBET9dA90SU5juhSjer5fZQ4L+xm7iHgAAKLKZLTAdgkOgiDMeH0xaTwzd3nPw qf/GjriV6u63dtZbhOqYw3lJoTaT4etAXu0w1OXvQGktMKRcIyJiCXmtot9qOpuAgMv3 Zq3EHdQ/eeTM+sXcIh/a7ksV2wAwA3WBLRMyDt8KlQlqHPb0WpP+O+GkH9XCoRDtJENO 3pTNA9TpmFFTnF6WXjb9NFq6uLv9Nwz2+PPFs7PMYuFOZsnm5UlPTP2W7AJS3afeRMeQ Q5s9vIV0aAOj7z0Lp/obVAWZIUDMlXFyN+N/H5Kr7gvji8zjlWCPtNzT4OQPeF6wZ3DX LgKw== X-Gm-Message-State: ALQs6tCM1P/HzAVmZFE3ucUKmz2k0rsg+CCdj/6/yDerf61EZIEnRCxz C0c1pMshACj6VvPYP0+qYpoVM6kIBw== X-Google-Smtp-Source: AB8JxZpZxaHJr9EB/Kt5a0PykElzXl4i796FIZXHL1Jo0jc7T3VCiOZStGAOxHgO+31F+gpFDj2h5JjXBA== MIME-Version: 1.0 X-Received: by 2002:ac8:114:: with SMTP id e20-v6mr20209062qtg.27.1524662807777; Wed, 25 Apr 2018 06:26:47 -0700 (PDT) Date: Wed, 25 Apr 2018 15:26:41 +0200 Message-Id: <20180425132641.106385-1-tweek@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Subject: [PATCH v3 1/4] tpm: Add explicit endianness cast From: Thiebaud Weksteen To: jarkko.sakkinen@linux.intel.com, nayna@linux.vnet.ibm.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, tweek@google.com Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Thiebaud Weksteen Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Thiebaud Weksteen --- drivers/char/tpm/tpm_eventlog_of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_eventlog_of.c b/drivers/char/tpm/tpm_eventlog_of.c index 96fd5646f866..ea0f16f19d73 100644 --- a/drivers/char/tpm/tpm_eventlog_of.c +++ b/drivers/char/tpm/tpm_eventlog_of.c @@ -56,8 +56,8 @@ int tpm_read_log_of(struct tpm_chip *chip) * but physical tpm needs the conversion. */ if (of_property_match_string(np, "compatible", "IBM,vtpm") < 0) { - size = be32_to_cpup(sizep); - base = be64_to_cpup(basep); + size = be32_to_cpup((__force __be32 *)sizep); + base = be64_to_cpup((__force __be64 *)basep); } else { size = *sizep; base = *basep;