From: Catalin Marinas <catalin.marinas@arm.com>
To: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>,
linux-arm-kernel@lists.infradead.org, Yury <yury.norov@gmail.com>,
Alexey Klimov <klimov.linux@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-mm@kvack.org, Linus Walleij <linus.walleij@linaro.org>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
David Keitel <dkeitel@codeaurora.org>,
Alexander Potapenko <glider@google.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Michal Marek <mmarek@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [PATCH v5 5/6] arm64: add KASAN support
Date: Tue, 11 Aug 2015 17:37:10 +0100 [thread overview]
Message-ID: <20150811163709.GI23307@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <1439259499-13913-6-git-send-email-ryabinin.a.a@gmail.com>
On Tue, Aug 11, 2015 at 05:18:18AM +0300, Andrey Ryabinin wrote:
> This patch adds arch specific code for kernel address sanitizer
> (see Documentation/kasan.txt).
>
> 1/8 of kernel addresses reserved for shadow memory. There was no
> big enough hole for this, so virtual addresses for shadow were
> stolen from vmalloc area.
>
> At early boot stage the whole shadow region populated with just
> one physical page (kasan_zero_page). Later, this page reused
> as readonly zero shadow for some memory that KASan currently
> don't track (vmalloc).
> After mapping the physical memory, pages for shadow memory are
> allocated and mapped.
>
> Functions like memset/memmove/memcpy do a lot of memory accesses.
> If bad pointer passed to one of these function it is important
> to catch this. Compiler's instrumentation cannot do this since
> these functions are written in assembly.
> KASan replaces memory functions with manually instrumented variants.
> Original functions declared as weak symbols so strong definitions
> in mm/kasan/kasan.c could replace them. Original functions have aliases
> with '__' prefix in name, so we could call non-instrumented variant
> if needed.
> Some files built without kasan instrumentation (e.g. mm/slub.c).
> Original mem* function replaced (via #define) with prefixed variants
> to disable memory access checks for such files.
>
> Signed-off-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
> Tested-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
--
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>
next prev parent reply other threads:[~2015-08-11 16:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 2:18 [PATCH v5 0/6] KASAN for amr64 Andrey Ryabinin
2015-08-11 2:18 ` [PATCH v5 1/6] x86/kasan: define KASAN_SHADOW_OFFSET per architecture Andrey Ryabinin
2015-08-11 2:18 ` [PATCH v5 2/6] x86/kasan, mm: introduce generic kasan_populate_zero_shadow() Andrey Ryabinin
2015-08-11 15:41 ` Catalin Marinas
2015-08-11 16:25 ` Andrey Ryabinin
2015-08-11 16:40 ` Catalin Marinas
2015-08-12 9:30 ` Andrey Ryabinin
2015-08-12 9:37 ` Will Deacon
2015-08-12 12:19 ` Andrey Ryabinin
2015-08-12 13:41 ` Will Deacon
2015-08-11 16:30 ` Andrey Ryabinin
2015-08-11 2:18 ` [PATCH v5 3/6] arm64: introduce VA_START macro - the first kernel virtual address Andrey Ryabinin
2015-08-11 2:18 ` [PATCH v5 4/6] arm64: move PGD_SIZE definition to pgalloc.h Andrey Ryabinin
2015-08-11 2:18 ` [PATCH v5 5/6] arm64: add KASAN support Andrey Ryabinin
2015-08-11 16:37 ` Catalin Marinas [this message]
2015-08-11 2:18 ` [PATCH v5 6/6] ARM64: kasan: print memory assignment 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=20150811163709.GI23307@e104818-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=dkeitel@codeaurora.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=klimov.linux@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mmarek@suse.com \
--cc=ryabinin.a.a@gmail.com \
--cc=will.deacon@arm.com \
--cc=yury.norov@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox