From patchwork Thu Apr 12 10:13:47 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: 10338159 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 BA097604D4 for ; Thu, 12 Apr 2018 10:15:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A811C28765 for ; Thu, 12 Apr 2018 10:15:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9CB8E28769; Thu, 12 Apr 2018 10:15:37 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 57A2128765 for ; Thu, 12 Apr 2018 10:15:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbeDLKOS (ORCPT ); Thu, 12 Apr 2018 06:14:18 -0400 Received: from mail-ua0-f202.google.com ([209.85.217.202]:42093 "EHLO mail-ua0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbeDLKOO (ORCPT ); Thu, 12 Apr 2018 06:14:14 -0400 Received: by mail-ua0-f202.google.com with SMTP id g34so3271329uaa.9 for ; Thu, 12 Apr 2018 03:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:in-reply-to:message-id:references:subject:from:to :cc; bh=hLToXwmJbg1yX1jC7Gu/EfyfWfqzqbHKgkap6xjATG4=; b=qGRqY4zGG0CzLp6FChP9ibhqtItRwa2Ba8Kbe65fM9FPPt8Ji0F/bam5FbEQJIrGId HJr/fiPkOjezxWh0XWl4teU0euYKsJQHcggO46zJRSWl4cUhm+faF5DtRcCv8H0o5JWM aeAF7L5ZdEmjYwk8BFz5CguG1cNfKdWRDaF6FhYJOF2RXyovZDkeUEMI8Q24+2u+NY4n nfji2bvm57JvuBiwECzoqobdezY5WLTIp8aB7PX4QnAjV89cBEb8jarltKQczBzkMIl6 6d2cdVDuIi0v1oo41dfsmDPwuld/8E9G1x/AVCYFQ4XusztZur+fvCcxGDgsFDombhP8 R2vQ== 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:in-reply-to:message-id :references:subject:from:to:cc; bh=hLToXwmJbg1yX1jC7Gu/EfyfWfqzqbHKgkap6xjATG4=; b=MDHy1ZQaEA6Nn2GJHKt43YGF/c8ezTVSF5qfu7TgIzw9avwFQOaRyelQcHqsj/GiGr pm/YJ1Ca0CfWQrRIDBnGniKu1tFoviLD4xq7IeVV4Kg5Iv1uh90QBx7Y3alsSNL12Mzi MO+UzVmJP7kZjn0vGew91obqcsEULFg4HQo4P7wpYPOq+zP+1YK+8WJ2VIOxjkSr9IIC 7ZI1virEyHBTbCOwFP3v+YZPt/Yy9859hYVuvgcRfF+t0B6/krFLCwHJTx1uSF6lCzVq iL4cLLrMJPuwg3/KL3ZqR2eiVxv7nn8AclCQwDDzFwAAHHClelQr/tTmUTGG3pztaSo8 qo+Q== X-Gm-Message-State: ALQs6tA/ixVWc7BXjZIf1JYRAd7PTnb3h9QFrqmCiqeJjnTcjLl3D2XI X6+/bKOyO/E3E2/WJoPB+ktzi2+U8w== X-Google-Smtp-Source: AIpwx4+YebI2DgHw/imgDzddOfsNN3MaXHtjY48IlSsMC+Q5Ga4X//WOhrvUkz7RXzWdw0/NAp7X6fNwMQ== MIME-Version: 1.0 X-Received: by 10.176.81.38 with SMTP id e35mr131835uaa.48.1523528053240; Thu, 12 Apr 2018 03:14:13 -0700 (PDT) Date: Thu, 12 Apr 2018 12:13:47 +0200 In-Reply-To: <20180412101350.210547-1-tweek@google.com> Message-Id: <20180412101350.210547-2-tweek@google.com> References: <20180412101350.210547-1-tweek@google.com> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog Subject: [PATCH v2 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 Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen --- 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..d74568d58a66 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((__be32 *)sizep); + base = be64_to_cpup((__be64 *)basep); } else { size = *sizep; base = *basep;