All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: fix endianness annotation in get_kaslr_seed()
Date: Thu, 29 Jun 2017 10:59:30 +0100	[thread overview]
Message-ID: <20170629095929.GB14607@arm.com> (raw)
In-Reply-To: <20170628145805.24587-1-luc.vanoostenryck@gmail.com>

On Wed, Jun 28, 2017 at 04:58:05PM +0200, Luc Van Oostenryck wrote:
> 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 <luc.vanoostenryck@gmail.com>
> ---
>  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;

I think this should be fdt64_t.

Will

  reply	other threads:[~2017-06-29  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 14:58 [PATCH] arm64: fix endianness annotation in get_kaslr_seed() Luc Van Oostenryck
2017-06-29  9:59 ` Will Deacon [this message]
2017-06-29 14:35   ` [PATCH v2] " Luc Van Oostenryck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170629095929.GB14607@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.