lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150811163709.GI23307@e104818-lin.cambridge.arm.com>
Date:	Tue, 11 Aug 2015 17:37:10 +0100
From:	Catalin Marinas <catalin.marinas@....com>
To:	Andrey Ryabinin <ryabinin.a.a@...il.com>
Cc:	Will Deacon <will.deacon@....com>,
	linux-arm-kernel@...ts.infradead.org, Yury <yury.norov@...il.com>,
	Alexey Klimov <klimov.linux@...il.com>,
	Arnd Bergmann <arnd@...db.de>, linux-mm@...ck.org,
	Linus Walleij <linus.walleij@...aro.org>,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Keitel <dkeitel@...eaurora.org>,
	Alexander Potapenko <glider@...gle.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Michal Marek <mmarek@...e.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dmitry Vyukov <dvyukov@...gle.com>
Subject: Re: [PATCH v5 5/6] arm64: add KASAN support

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@...il.com>
> Tested-by: Linus Walleij <linus.walleij@...aro.org>

Reviewed-by: Catalin Marinas <catalin.marinas@....com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ