From patchwork Wed Jun 28 14:58:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9814735 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 7E6E260365 for ; Wed, 28 Jun 2017 15:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FBB6251F4 for ; Wed, 28 Jun 2017 15:39:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63F3D285C8; Wed, 28 Jun 2017 15:39:47 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 148FB251F4 for ; Wed, 28 Jun 2017 15:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=xWU4WLhe6rVbBoP/WWuKvl0hmPt0q6OxOvpqo2IInf4=; b=XGp kBirH+5JamkTgXsaQ+rUxG7N7m0rw6+WJuJvg1/B/WMKxOuf/BqZzQbH4NqEtYv5ovzhWztKVi4aH L7R5VVvXbzMhV6vSTQ/dfP5iuXI3A1UgxqSfMKYzakwh89I+aKSmQ7BiVTu9MD4Z0WZzt2V+gn/Hc LKmZVjvc6OR+VqguRaObhaqD7pDSG60kzOtgDuQHIDcs/XrT4w6z4tZbmUZkqivjgAYGnddNhcY7O IkrrKwRVJ5dbZ2sBtIw2eN7IE5LqwVHIVD23nnsYBdi8533IRr4xS46GYj3RiUg+YOMGdaBZnxPyG bzTjyqIzY60kKpopst/1caiW/9ZW4DQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dQF4E-00055p-Km; Wed, 28 Jun 2017 15:39:46 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dQEQE-0004sj-A5 for linux-arm-kernel@lists.infradead.org; Wed, 28 Jun 2017 14:58:28 +0000 Received: by mail-wm0-x242.google.com with SMTP id j85so12027909wmj.0 for ; Wed, 28 Jun 2017 07:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ucEkhNr/OuUJ9PrG55pF+gzhrQJspxEyrieQHILkXDw=; b=AoGVKE17E1hbArAsN1YiL4HMbWq0aFMKldHggHsyNXNSHaSyTi8GsJdD675EoUcyhw m3p9JiEuYnN90Vzd8Z7LjY0gyHSJMUeaO1LWjyFA6TddXtiPW3yqwDDE40qJPJp9mcWo RUAfDL0aXLCPjS2d3+2Lp7QsP+1l7hqKbPiWVmBgp5TIBgpTzGSY0iB04v6Bd2VVMoWz YWFdnNbFMWhNsPcol/m+9QId975wvRWVelRdoGTpnpkkC8XS/KtabuZswajQ4NIwgviW VTSIZifVQf9s95Nh6w0ZJY2j1ZV6kYg24i70eeFnTXwhgrT9xP2i8pUpSn3U3AS0qXeT jRnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ucEkhNr/OuUJ9PrG55pF+gzhrQJspxEyrieQHILkXDw=; b=ceuLE74ybogeHeDrBrTdOnp0G3ruChLApcTeiyEKiIK4LHpWr8GoZxN++A1syB6M6w /AMndO03xePCWMPt+KP6oZJKW4T1c6wWrAMKW4nhnylHYaWU974OafwFk2E887Qt3e/2 hUbyH0b1exV8dqe3huzjF4moa8TmYsKwg3x9yeE9dMuKix/p7urGBYathQWbHDgzs5us NBytNzShlX7Vehd54MXMGcW/dljgAJGYLAZtrfwz7JmEQmwJyC/wdvRaNlNugT0lzxGX e64v0Eb9S2oISRf3H6JUzxyk7jOwCNXxJREE9wmgR+Yi2dvYNWmrT2oBbgoQwi2QGoUT wMxw== X-Gm-Message-State: AKS2vOz0yq/8N1yYoBPiuGE/CSvNrg+cTNAtAc/WwgYefQpG/iiaU8XV umvXLOsp9nAjQajQP/s= X-Received: by 10.80.172.93 with SMTP id w29mr8189330edc.13.1498661887156; Wed, 28 Jun 2017 07:58:07 -0700 (PDT) Received: from localhost.localdomain ([91.177.84.115]) by smtp.gmail.com with ESMTPSA id x44sm1390312edx.38.2017.06.28.07.58.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Jun 2017 07:58:06 -0700 (PDT) From: Luc Van Oostenryck To: Will Deacon Subject: [PATCH] arm64: fix endianness annotation in get_kaslr_seed() Date: Wed, 28 Jun 2017 16:58:05 +0200 Message-Id: <20170628145805.24587-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170628_075826_585565_F4320844 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jisheng Zhang , Ard Biesheuvel , Catalin Marinas , linux-arm-kernel@lists.infradead.org, Neeraj Upadhyay , Luc Van Oostenryck MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In the flattened device tree format, all integer properties are in big-endian order. Here the property "kaslr-seed" is read from the fdt and then correctly converted to native order (via fdt64_to_cpu()) but the pointer used for this is not annotated as being for big-endian. Fix this by declaring the pointer as __be64 instead of u64. Signed-off-by: Luc Van Oostenryck --- arch/arm64/kernel/kaslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c index d7e90d97f..b9f0ec99e 100644 --- a/arch/arm64/kernel/kaslr.c +++ b/arch/arm64/kernel/kaslr.c @@ -27,7 +27,7 @@ u16 __initdata memstart_offset_seed; static __init u64 get_kaslr_seed(void *fdt) { int node, len; - u64 *prop; + __be64 *prop; u64 ret; node = fdt_path_offset(fdt, "/chosen");