From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: fix warning about swapper_pg_dir overflow
Date: Wed, 15 Feb 2017 11:33:59 +0000 [thread overview]
Message-ID: <20170215113358.GC9630@arm.com> (raw)
In-Reply-To: <20170214212718.2792194-1-arnd@arndb.de>
On Tue, Feb 14, 2017 at 10:27:01PM +0100, Arnd Bergmann wrote:
> With 4 levels of 16KB pages, we get this warning about the fact that we are
> copying a whole page into an array that is declared as having only two pointers
> for the top level of the page table:
>
> arch/arm64/mm/mmu.c: In function 'paging_init':
> arch/arm64/mm/mmu.c:528:2: error: 'memcpy' writing 16384 bytes into a region of size 16 overflows the destination [-Werror=stringop-overflow=]
>
> This is harmless since we actually reserve a whole page in the definition of the
> array that comes from, and just the extern declaration is short. The pgdir
> is initialized to zero either way, so copying the actual entries here seems
> like the best solution.
Thanks, I'll queue this up for 4.11 with the acks.
Will
prev parent reply other threads:[~2017-02-15 11:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 21:27 [PATCH] arm64: fix warning about swapper_pg_dir overflow Arnd Bergmann
2017-02-14 21:33 ` Ard Biesheuvel
2017-02-14 22:06 ` Arnd Bergmann
2017-02-15 10:56 ` Mark Rutland
2017-02-15 11:33 ` Will Deacon [this message]
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=20170215113358.GC9630@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).