From: Simon Horman <horms@verge.net.au>
To: Russell King <rmk@armlinux.org.uk>
Cc: Pratyush Anand <panand@redhat.com>,
Kexec Mailing List <kexec@lists.infradead.org>,
linux-arm-kernel@lists.infradead.org, Baoquan He <bhe@redhat.com>,
Kees Cook <keescook@google.com>
Subject: Re: [PATCH 1/2] arm: plug a zImage corner case
Date: Fri, 15 Jul 2016 13:13:44 +0900 [thread overview]
Message-ID: <20160715041343.GC28151@verge.net.au> (raw)
In-Reply-To: <E1bL9rj-0002Ow-6i@e0050434b2927.dyn.armlinux.org.uk>
On Thu, Jul 07, 2016 at 03:01:19PM +0100, Russell King wrote:
> If a zImage is built with ARM_APPENDED_DTB enabled, the zImage will
> look at the word following the zImage and check whether it contains
> the DTB magic number.
>
> Generally, kexec will clear the destination pages before copying the
> zImage, but there is a corner case where the zImage is a multiple of
> the page size, where the following page will not be touched. Should
> the first word in this page contain the DTB magic number, the data
> following will be interpreted as a DTB image.
>
> In order to make this bullet-proof, we must always initialise the word
> following the zImage. Arrange this by specifying the zImage memory
> size one word bigger than the buffer size.
>
> Signed-off-by: Russell King <rmk@armlinux.org.uk>
Thanks, I have applied this and the next patch.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: horms@verge.net.au (Simon Horman)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm: plug a zImage corner case
Date: Fri, 15 Jul 2016 13:13:44 +0900 [thread overview]
Message-ID: <20160715041343.GC28151@verge.net.au> (raw)
In-Reply-To: <E1bL9rj-0002Ow-6i@e0050434b2927.dyn.armlinux.org.uk>
On Thu, Jul 07, 2016 at 03:01:19PM +0100, Russell King wrote:
> If a zImage is built with ARM_APPENDED_DTB enabled, the zImage will
> look at the word following the zImage and check whether it contains
> the DTB magic number.
>
> Generally, kexec will clear the destination pages before copying the
> zImage, but there is a corner case where the zImage is a multiple of
> the page size, where the following page will not be touched. Should
> the first word in this page contain the DTB magic number, the data
> following will be interpreted as a DTB image.
>
> In order to make this bullet-proof, we must always initialise the word
> following the zImage. Arrange this by specifying the zImage memory
> size one word bigger than the buffer size.
>
> Signed-off-by: Russell King <rmk@armlinux.org.uk>
Thanks, I have applied this and the next patch.
next prev parent reply other threads:[~2016-07-15 4:13 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 17:59 kexec failures with DEBUG_RODATA Russell King - ARM Linux
2016-06-14 17:59 ` Russell King - ARM Linux
2016-06-14 18:05 ` Kees Cook
2016-06-14 18:05 ` Kees Cook
2016-06-15 2:43 ` Baoquan He
2016-06-15 2:43 ` Baoquan He
2016-06-15 21:13 ` Russell King - ARM Linux
2016-06-15 21:13 ` Russell King - ARM Linux
2016-06-15 22:20 ` Kees Cook
2016-06-15 22:20 ` Kees Cook
2016-06-15 22:42 ` Russell King - ARM Linux
2016-06-15 22:42 ` Russell King - ARM Linux
2016-06-15 22:54 ` Kees Cook
2016-06-15 22:54 ` Kees Cook
2016-06-15 23:13 ` Russell King - ARM Linux
2016-06-15 23:13 ` Russell King - ARM Linux
2016-06-21 11:48 ` Pratyush Anand
2016-06-21 11:48 ` Pratyush Anand
2016-06-21 15:37 ` Russell King - ARM Linux
2016-06-21 15:37 ` Russell King - ARM Linux
2016-07-07 10:20 ` Russell King - ARM Linux
2016-07-07 10:20 ` Russell King - ARM Linux
2016-07-07 14:01 ` [PATCH 1/2] arm: plug a zImage corner case Russell King
2016-07-07 14:01 ` Russell King
2016-07-15 4:13 ` Simon Horman [this message]
2016-07-15 4:13 ` Simon Horman
2016-08-02 23:09 ` libdrm-armada repository Joshua Clayton
2016-08-02 23:28 ` Russell King
2016-08-03 17:47 ` Joshua Clayton
2016-08-03 1:38 ` Fabio Estevam
2016-08-03 17:55 ` Joshua Clayton
2016-07-07 14:01 ` [PATCH 2/2] arm: use zImage size from header Russell King
2016-07-07 14:01 ` Russell King
2016-07-21 7:00 ` kexec failures with DEBUG_RODATA Tony Lindgren
2016-07-21 7:00 ` Tony Lindgren
2016-07-07 10:00 ` Russell King - ARM Linux
2016-07-07 10:00 ` Russell King - ARM Linux
2016-06-15 7:55 ` Pratyush Anand
2016-06-15 7:55 ` Pratyush Anand
2016-06-15 19:13 ` Russell King - ARM Linux
2016-06-15 19:13 ` Russell King - ARM Linux
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=20160715041343.GC28151@verge.net.au \
--to=horms@verge.net.au \
--cc=bhe@redhat.com \
--cc=keescook@google.com \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=panand@redhat.com \
--cc=rmk@armlinux.org.uk \
/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.