linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: aryabinin@virtuozzo.com (Andrey Ryabinin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: kasan: Use actual memory node when populating the kernel image shadow
Date: Fri, 11 Mar 2016 16:55:03 +0300	[thread overview]
Message-ID: <56E2CE37.10700@virtuozzo.com> (raw)
In-Reply-To: <CAKv+Gu_sJ5N9DinfVWC5k1dbuX_=3w97u8FGnK2w_JtRrF4JDA@mail.gmail.com>



On 03/11/2016 05:31 AM, Ard Biesheuvel wrote:
> On 11 March 2016 at 01:57, Catalin Marinas <catalin.marinas@arm.com> wrote:
>> With the 16KB or 64KB page configurations, the generic
>> vmemmap_populate() implementation warns on potential offnode
>> page_structs via vmemmap_verify() because the arm64 kasan_init() passes
>> NUMA_NO_NODE instead of the actual node for the kernel image memory.
>>
>> Fixes: f9040773b7bb ("arm64: move kernel image to base of vmalloc area")
>> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
>> Reported-by: James Morse <james.morse@arm.com>
> 
> I still think using vmemmap_populate() is somewhat of a hack here, and
> the fact that we have different versions for 4k pages and !4k pages,
> while perhaps justified for the actual real purpose of allocating
> struct page arrays, makes this code more fragile than it needs to be.
> How difficult would it be to simply have a kasan specific
> vmalloc_shadow() function that performs a
> memblock_alloc/create_mapping, and does the right thing wrt aligning
> the edges, rather than putting knowledge about how vmemmap_populate
> happens to align its allocations into the kasan code?

Should be easy.

Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

      parent reply	other threads:[~2016-03-11 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 18:57 [PATCH] arm64: kasan: Use actual memory node when populating the kernel image shadow Catalin Marinas
2016-03-11  2:31 ` Ard Biesheuvel
2016-03-10  7:50   ` Mark Rutland
2016-03-11 10:44   ` Catalin Marinas
2016-03-11 13:55   ` Andrey Ryabinin [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=56E2CE37.10700@virtuozzo.com \
    --to=aryabinin@virtuozzo.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).