All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Ryabinin <a.ryabinin@samsung.com>
To: David Keitel <dkeitel@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: add KASan support
Date: Wed, 15 Apr 2015 21:04:37 +0300	[thread overview]
Message-ID: <552EA835.5070704@samsung.com> (raw)
In-Reply-To: <552DCED9.40207@codeaurora.org>

On 04/15/2015 05:37 AM, David Keitel wrote:
>>>> +	pgd = __pgd(__pa(kasan_zero_pmd) | PAGE_KERNEL);
>>>> +#else
>>>> +	pgd = __pgd(__pa(kasan_zero_pte) | PAGE_KERNEL);
>>>> +#endif
>>>> +
>>>> +	for (i = pgd_index(start); start < end; i++) {
>>>> +		set_pgd(&pgdp[i], pgd);
>>>> +		start += PGDIR_SIZE;
>>>> +	}
>>>> +}
>>>
>>> Same problem as above with PAGE_KERNEL. You should just use
>>> pgd_populate().
> 
> Any suggestion what the correct flag setting would be here for a 4K mapping?
> 
> I tried fixing this by changing this to pud and setting the PMD_TYPE_TABLE flag for kasan_zero_pmd. However the MMU doesn't like it and I get a first level address translation fault.
> 
> If you have any updated patches to share I'd be glad to try them out.
> 

Sorry, I didn't have much time on work on this yet.

I've pushed the most fresh thing that I have in git:
	git://github.com/aryabinin/linux.git kasan/arm64v1

It's the same patches with two simple but important fixes on top of it.

WARNING: multiple messages have this Message-ID (diff)
From: Andrey Ryabinin <a.ryabinin@samsung.com>
To: David Keitel <dkeitel@codeaurora.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] arm64: add KASan support
Date: Wed, 15 Apr 2015 21:04:37 +0300	[thread overview]
Message-ID: <552EA835.5070704@samsung.com> (raw)
In-Reply-To: <552DCED9.40207@codeaurora.org>

On 04/15/2015 05:37 AM, David Keitel wrote:
>>>> +	pgd = __pgd(__pa(kasan_zero_pmd) | PAGE_KERNEL);
>>>> +#else
>>>> +	pgd = __pgd(__pa(kasan_zero_pte) | PAGE_KERNEL);
>>>> +#endif
>>>> +
>>>> +	for (i = pgd_index(start); start < end; i++) {
>>>> +		set_pgd(&pgdp[i], pgd);
>>>> +		start += PGDIR_SIZE;
>>>> +	}
>>>> +}
>>>
>>> Same problem as above with PAGE_KERNEL. You should just use
>>> pgd_populate().
> 
> Any suggestion what the correct flag setting would be here for a 4K mapping?
> 
> I tried fixing this by changing this to pud and setting the PMD_TYPE_TABLE flag for kasan_zero_pmd. However the MMU doesn't like it and I get a first level address translation fault.
> 
> If you have any updated patches to share I'd be glad to try them out.
> 

Sorry, I didn't have much time on work on this yet.

I've pushed the most fresh thing that I have in git:
	git://github.com/aryabinin/linux.git kasan/arm64v1

It's the same patches with two simple but important fixes on top of it.

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: a.ryabinin@samsung.com (Andrey Ryabinin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: add KASan support
Date: Wed, 15 Apr 2015 21:04:37 +0300	[thread overview]
Message-ID: <552EA835.5070704@samsung.com> (raw)
In-Reply-To: <552DCED9.40207@codeaurora.org>

On 04/15/2015 05:37 AM, David Keitel wrote:
>>>> +	pgd = __pgd(__pa(kasan_zero_pmd) | PAGE_KERNEL);
>>>> +#else
>>>> +	pgd = __pgd(__pa(kasan_zero_pte) | PAGE_KERNEL);
>>>> +#endif
>>>> +
>>>> +	for (i = pgd_index(start); start < end; i++) {
>>>> +		set_pgd(&pgdp[i], pgd);
>>>> +		start += PGDIR_SIZE;
>>>> +	}
>>>> +}
>>>
>>> Same problem as above with PAGE_KERNEL. You should just use
>>> pgd_populate().
> 
> Any suggestion what the correct flag setting would be here for a 4K mapping?
> 
> I tried fixing this by changing this to pud and setting the PMD_TYPE_TABLE flag for kasan_zero_pmd. However the MMU doesn't like it and I get a first level address translation fault.
> 
> If you have any updated patches to share I'd be glad to try them out.
> 

Sorry, I didn't have much time on work on this yet.

I've pushed the most fresh thing that I have in git:
	git://github.com/aryabinin/linux.git kasan/arm64v1

It's the same patches with two simple but important fixes on top of it.

  reply	other threads:[~2015-04-15 18:05 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 14:49 [PATCH 0/2] KASan for arm64 Andrey Ryabinin
2015-03-24 14:49 ` Andrey Ryabinin
2015-03-24 14:49 ` Andrey Ryabinin
2015-03-24 14:49 ` [PATCH 1/2] kasan, x86: move KASAN_SHADOW_OFFSET to the arch Kconfig Andrey Ryabinin
2015-03-24 14:49   ` Andrey Ryabinin
2015-03-24 14:49   ` Andrey Ryabinin
2015-03-24 14:49 ` [PATCH 2/2] arm64: add KASan support Andrey Ryabinin
2015-03-24 14:49   ` Andrey Ryabinin
2015-03-24 14:49   ` Andrey Ryabinin
2015-04-01 12:28   ` Catalin Marinas
2015-04-01 12:28     ` Catalin Marinas
2015-04-01 12:28     ` Catalin Marinas
2015-04-03 13:44     ` Andrey Ryabinin
2015-04-03 13:44       ` Andrey Ryabinin
2015-04-03 13:44       ` Andrey Ryabinin
2015-04-15  2:37       ` David Keitel
2015-04-15  2:37         ` David Keitel
2015-04-15  2:37         ` David Keitel
2015-04-15 18:04         ` Andrey Ryabinin [this message]
2015-04-15 18:04           ` Andrey Ryabinin
2015-04-15 18:04           ` Andrey Ryabinin
2015-04-17 18:39           ` David Keitel
2015-04-17 18:39             ` David Keitel
2015-04-17 18:39             ` David Keitel
2015-04-20  6:48             ` Andrey Ryabinin
2015-04-20  6:48               ` Andrey Ryabinin
2015-04-20  6:48               ` Andrey Ryabinin
2015-04-09 20:17   ` Arnd Bergmann
2015-04-09 20:17     ` Arnd Bergmann
2015-04-09 20:17     ` Arnd Bergmann
2015-04-10 10:48     ` Andrey Ryabinin
2015-04-10 10:48       ` Andrey Ryabinin
2015-04-10 10:48       ` Andrey Ryabinin
2015-04-10 13:02       ` Arnd Bergmann
2015-04-10 13:02         ` Arnd Bergmann
2015-04-10 13:02         ` Arnd Bergmann
2015-04-10 13:37         ` Andrey Ryabinin
2015-04-10 13:37           ` Andrey Ryabinin
2015-04-10 13:37           ` 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=552EA835.5070704@samsung.com \
    --to=a.ryabinin@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dkeitel@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=will.deacon@arm.com \
    /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.