linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	David Keitel <dkeitel@codeaurora.org>,
	Alexander Potapenko <glider@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alexey Klimov <klimov.linux@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v4 2/7] mm: kasan: introduce generic kasan_populate_zero_shadow()
Date: Mon, 10 Aug 2015 15:00:05 +0300	[thread overview]
Message-ID: <CAPAsAGwsA138f=oNaqJ4qT6Ow9VyoSqAkwZSa_pCDJVsA-JuAg@mail.gmail.com> (raw)
In-Reply-To: <87mvxzptqv.fsf@linux.vnet.ibm.com>

2015-08-10 9:01 GMT+03:00 Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>:
> Andrey Ryabinin <a.ryabinin@samsung.com> writes:
>
>> Introduce generic kasan_populate_zero_shadow(start, end).
>> This function maps kasan_zero_page to the [start, end] addresses.
>>
>> In follow on patches it will be used for ARMv8 (and maybe other
>> architectures) and will replace x86_64 specific populate_zero_shadow().
>>
>> Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
>
> This assume that we can have shared pgtable_t in generic code ? Is that
> true for generic code ? Even if it is we may want to allow some arch to
> override this ? On ppc64, we store the hardware hash page table slot
> number in pte_t, Hence we won't be able to share pgtable_t.
>

So, ppc64 could define some config which will disable compilation of
mm/kasan/kasan_init.c.
However, it might be a bad idea to use such never defined config symbol now.
So I think this could be done later, in "KASAN for powerpc" series.

>
>
>> ---
>>  arch/x86/mm/kasan_init_64.c |  14 ----
>>  include/linux/kasan.h       |   8 +++
>>  mm/kasan/Makefile           |   2 +-
>>  mm/kasan/kasan_init.c       | 151 ++++++++++++++++++++++++++++++++++++++++++++
>>  4 files changed, 160 insertions(+), 15 deletions(-)
>>  create mode 100644 mm/kasan/kasan_init.c
>>
>> diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
>> index e1840f3..812086c 100644
>> --- a/arch/x86/mm/kasan_init_64.c
>> +++ b/arch/x86/mm/kasan_init_64.c
>> @@ -12,20 +12,6 @@
>>  extern pgd_t early_level4_pgt[PTRS_PER_PGD];
>>  extern struct range pfn_mapped[E820_X_MAX];
>>
>> -static pud_t kasan_zero_pud[PTRS_PER_PUD] __page_aligned_bss;
>> -static pmd_t kasan_zero_pmd[PTRS_PER_PMD] __page_aligned_bss;
>> -static pte_t kasan_zero_pte[PTRS_PER_PTE] __page_aligned_bss;
>> -
>> -/*
>
> -aneesh
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-08-10 12:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 16:41 [PATCH v4 0/7] KASAN for arm64 Andrey Ryabinin
2015-07-24 16:41 ` [PATCH v4 1/7] x86/kasan: generate KASAN_SHADOW_OFFSET in Makefile Andrey Ryabinin
2015-07-27 16:40   ` Catalin Marinas
2015-07-27 17:52     ` Andrey Ryabinin
2015-07-24 16:41 ` [PATCH v4 2/7] mm: kasan: introduce generic kasan_populate_zero_shadow() Andrey Ryabinin
2015-07-27 14:23   ` Yury
2015-07-27 17:52     ` Andrey Ryabinin
2015-08-10  6:01   ` Aneesh Kumar K.V
2015-08-10 12:00     ` Andrey Ryabinin [this message]
2015-07-24 16:41 ` [PATCH v4 3/7] arm64: introduce VA_START macro - the first kernel virtual address Andrey Ryabinin
2015-07-24 16:41 ` [PATCH v4 4/7] arm64: move PGD_SIZE definition to pgalloc.h Andrey Ryabinin
2015-07-24 16:41 ` [PATCH v4 5/7] arm64: add KASAN support Andrey Ryabinin
2015-07-27 15:59   ` Catalin Marinas
2015-07-27 17:53     ` Andrey Ryabinin
2015-07-24 16:41 ` [PATCH v4 6/7] ARM64: kasan: print memory assignment Andrey Ryabinin
2015-07-24 16:41 ` [PATCH v4 7/7] x86/kasan: switch to generic kasan_populate_zero_shadow() Andrey Ryabinin
2015-07-27 16:57   ` Catalin Marinas
2015-07-27 17:53     ` Andrey Ryabinin
2015-07-27  8:13 ` [PATCH v4 0/7] KASAN for arm64 Andrey Ryabinin

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='CAPAsAGwsA138f=oNaqJ4qT6Ow9VyoSqAkwZSa_pCDJVsA-JuAg@mail.gmail.com' \
    --to=ryabinin.a.a@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=dkeitel@codeaurora.org \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=hpa@zytor.com \
    --cc=klimov.linux@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    --cc=x86@kernel.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).