From patchwork Thu Jun 29 14:35:29 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: 9817203 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 D763A602B1 for ; Thu, 29 Jun 2017 14:40:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8D0C28710 for ; Thu, 29 Jun 2017 14:40:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD6A128746; Thu, 29 Jun 2017 14:40:17 +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 7503728710 for ; Thu, 29 Jun 2017 14:40:17 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0Fq7GQmECywre9O2R962UbAOVYMIuPSQa65ZVlRkNQE=; b=EmBxkSG3gmQy7L i6GGsy1uSC844sQtoCF2xdFo6ZY2Mxhtv60TbrrEeteRDys1ufaoQLdvn2hiRLh/YjxzMsCDByz6b kUeHt4N6U3IRJeGjjKMkEm8LJ6JRJlLwWap3r+JF+s4SeEE5HEXHo7Q1FrpKI16+vMhSt0tRxaiCl E8Tnkn+SwYQ8W0/kkz9OnxTVHY5ta8sEjny6C4YkP3L+m1xL4qVYm5BJoCmYSGkHHzEw4HsQhjnvC yTsfysZKS55RS8aD6fxMLZ9zaMdjfLs0NEBrnAUIV96ZbInnrIdPlynaei1huuek/6fGU8+7ync7r lbXlvA6VjuiT3MXadl9g==; 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 1dQacC-0008EQ-Sa; Thu, 29 Jun 2017 14:40:16 +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 1dQaXx-0005U5-BR for linux-arm-kernel@lists.infradead.org; Thu, 29 Jun 2017 14:35:54 +0000 Received: by mail-wm0-x242.google.com with SMTP id y5so2939849wmh.3 for ; Thu, 29 Jun 2017 07:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GqgrIi6iSw8VnOjPw5uKBLno30NKt260Lmf6Y4TOQ1o=; b=CewYBPLI4urgalVOOnoy0FPiPqTSAzzwoHcTLcGSQ0NP0y+eChWDiXbPnNDMJQxD1n PuDf4eKSLANKO4+x4chI9wg3gRjOSsFV6WvCXBqo8T9MSBrN6bJe8qJ+BqQZ3e0vHoft xxjw7OlbKGaraObhgIsD6kQVI3xImNS87uZBecEIixGyYT6bgA5i96cl0NXuQ48ViKfN BMuy/OXwh91LYnIzrKmU4lVpMz+FNbkms8GXBPmJK0MSO4iARYqh+jH4s/cdK5iCAe30 FizJ6mthAXwWstwXj5jPqI8mE8tnfKmq7wJaxrw2XRMEUtmituj5U3UbfHJl4UJcJhsk tyzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GqgrIi6iSw8VnOjPw5uKBLno30NKt260Lmf6Y4TOQ1o=; b=l85SQt0BYhQwFsklZzjyUnpx1a2kss/YPD9R7qJy9BPPhKzNPxAcgpVjf97wt2E2Ml HtduJjtBtgLgcN7f9ZLLvYZmMnsqWjDzp7/bOT/C631UttQofc88wKdxga9hRPGIRtF4 YfcVrygoH7Q3YcEYk8226CKpy3FndszcPoJWCXn+uNGPtikbeFMEEcla/64JrdxPE5NA HKeQ+k2eV6eXpubx98zyQLkv73K6ArL13S1QANEFwkT1xNd5wtDo4ie4ALpbvsbAxeV/ i9Fr8jOxUYB+vF22XlAmWusGe42p0L1oTmNcFaXZE4cVK4wCDGwegrVjjPg1tzCZOCgH xtdQ== X-Gm-Message-State: AKS2vOwBsvhRjYawg+8kzuCEnrUepDQML5mbya5nVggYBV0TetLxgQ+S dSx6/dpg2jJDFT25LDM= X-Received: by 10.80.170.218 with SMTP id r26mr1988722edc.113.1498746931525; Thu, 29 Jun 2017 07:35:31 -0700 (PDT) Received: from ltop.local ([2a02:a03f:837:f300:1816:df24:7b15:fb23]) by smtp.gmail.com with ESMTPSA id d36sm858580edb.63.2017.06.29.07.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 07:35:30 -0700 (PDT) Date: Thu, 29 Jun 2017 16:35:29 +0200 From: Luc Van Oostenryck To: Will Deacon Subject: [PATCH v2] arm64: fix endianness annotation in get_kaslr_seed() Message-ID: <20170629143528.feomz4qwwdytpclx@ltop.local> References: <20170628145805.24587-1-luc.vanoostenryck@gmail.com> <20170629095929.GB14607@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170629095929.GB14607@arm.com> User-Agent: NeoMutt/20170428 (1.8.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170629_073553_572260_85E30447 X-CRM114-Status: GOOD ( 12.63 ) 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 , Catalin Marinas , Neeraj Upadhyay , linux-arm-kernel@lists.infradead.org, Ard Biesheuvel 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 fdt64_t instead of u64 (fdt64_t being itself typedefed to __be64). Signed-off-by: Luc Van Oostenryck --- Change since v1: - use 'fdt64_t' instead of a plain '__be64'. 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..a9710efb8 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; + fdt64_t *prop; u64 ret; node = fdt_path_offset(fdt, "/chosen");