From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbaJAPc1 (ORCPT ); Wed, 1 Oct 2014 11:32:27 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41129 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365AbaJAPcZ (ORCPT ); Wed, 1 Oct 2014 11:32:25 -0400 Message-ID: <542C1E5A.4000202@zytor.com> Date: Wed, 01 Oct 2014 08:31:38 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Andrey Ryabinin , linux-kernel@vger.kernel.org CC: Dmitry Vyukov , Konstantin Serebryany , Dmitry Chernenkov , Andrey Konovalov , Yuri Gribov , Konstantin Khlebnikov , Sasha Levin , Christoph Lameter , Joonsoo Kim , Andrew Morton , Dave Hansen , Andi Kleen , Vegard Nossum , x86@kernel.org, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar Subject: Re: [RFC/PATCH v2 02/10] x86_64: add KASan support References: <1404905415-9046-1-git-send-email-a.ryabinin@samsung.com> <1410359487-31938-1-git-send-email-a.ryabinin@samsung.com> <1410359487-31938-3-git-send-email-a.ryabinin@samsung.com> <54111E99.7080309@zytor.com> <5411339E.8080007@samsung.com> In-Reply-To: <5411339E.8080007@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/10/2014 10:31 PM, Andrey Ryabinin wrote: > On 09/11/2014 08:01 AM, H. Peter Anvin wrote: >> On 09/10/2014 07:31 AM, Andrey Ryabinin wrote: >>> This patch add arch specific code for kernel address sanitizer. >>> >>> 16TB of virtual addressed used for shadow memory. >>> It's located in range [0xffff800000000000 - 0xffff900000000000] >>> Therefore PAGE_OFFSET has to be changed from 0xffff880000000000 >>> to 0xffff900000000000. >> >> NAK on this. >> >> 0xffff880000000000 is the lowest usable address because we have agreed >> to leave 0xffff800000000000-0xffff880000000000 for the hypervisor or >> other non-OS uses. >> >> Bumping PAGE_OFFSET seems needlessly messy, why not just designate a >> zone higher up in memory? >> > > I already answered to Dave why I choose to place shadow bellow PAGE_OFFSET (answer copied bellow). > In short - yes, shadow could be higher. But for some sort of kernel bugs we could have confusing oopses in kasan kernel. > Confusing how? I presume you are talking about something trying to touch a non-canonical address, which is usually a very blatant type of bug. -hpa