Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp393098imm; Mon, 2 Jul 2018 13:35:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdpZhtzVcnHtYR4vndi9BiqMp4vnqjjRKuvZfWVA6hxT3lL+AWx4MobimDqhVkjIdCmJPGU X-Received: by 2002:a63:b74a:: with SMTP id w10-v6mr14597248pgt.266.1530563707085; Mon, 02 Jul 2018 13:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530563707; cv=none; d=google.com; s=arc-20160816; b=fRAZ+YzkPla1dIrycfkm+U78aNxboCm6pgMfPhzV1cu9uXIvvsRpD9FZo4ZhqOojip ySNVT8BgndqIVNkc0FlzgkXLY+/Y84CL5nqogK6kF+Ofym8nbdMFzPQC6u4QIKhw593u gRRkqidcSvUCg7adTRw60pdyrmv90LY8OaCfnfIzEEbxB8ncWcpofDJsMnJOf0EREgB3 9FLZaNKsNYMcyqz6H+sPm3rJrf7MHtn5E33ocF9dvV8cl7BQhAc3f7GAeghR3jk7+Gz5 WVTCQTbMezcw9NVapxSwLd6g5txo8pCQAQsH/91GjntiVnF3J2xK8btu47mK2bOtasqT ZCVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=+l+loOYFVRC/LmvQ+sJhqUFloWFSZOBmg40ommuB4BY=; b=KRI8Z7TInd33DTxNgTFb/zjGl7Q8YqUzuR6eW0XW21jfmgPMM105nv7x4HoEzTElVK cTRlvg5N6zkkvO4B60dmFHySDg8SuUJ6yTb9aW5MUWAAeiBQ6CFLrXeYM9EVyuKfTPCc XpbiqwEQttTpx8ls1NFNLUPvqFwbTabTznoI45Y870rBtAdcdRWKFaKLuVlFr4+x62GR Cnc8FRmIZFtPbymQwpGbRZ06lnkzpNLPJ3s9oNqVyTgpIjoOreVDWe3y9gLXbByeWejW Z6rQPk//gOWA6qbRCuFMWxgdEufCrAiABm3h9tVEyfMOpWwVJ/FXc6yGrDAtr23cIEj1 x64w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fszUa4yO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e16-v6si14328342pgv.561.2018.07.02.13.34.52; Mon, 02 Jul 2018 13:35:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=fszUa4yO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143AbeGBUdx (ORCPT + 99 others); Mon, 2 Jul 2018 16:33:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34032 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752579AbeGBUdv (ORCPT ); Mon, 2 Jul 2018 16:33:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+l+loOYFVRC/LmvQ+sJhqUFloWFSZOBmg40ommuB4BY=; b=fszUa4yOzJyVKK+p/mF9M2TPm 8e0XjT8yjy2uXIXG0U502Y7dvO6HmUe086xgIDg63/MGo054ZPec2iSzz0N5TCkIwLtnpC0fOMzah Z4KxaN0fd8Stw3BOIw9Q0LVcjKZc+Llbp62ThZ8nAwJqgTqUJV0oyXT86e7Chm+V7QMJHsY5J636S adzq3NvADLOL8ZvpKJ+ZTd+n0vrHtV4D0/Bc6fEuiPxrm8do004dJ5Kkdr/OaIzcV7CQKqmiilkt6 hPLnt/get0qx8xcrdjYw/haCMUbJZae8AQwReONDgSp9apfvVGP/xr4laAYZ7aKjuFOAJjw2sTl6G Rc/kTg5eg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fa5Vh-0003A5-6R; Mon, 02 Jul 2018 20:33:21 +0000 Date: Mon, 2 Jul 2018 13:33:21 -0700 From: Matthew Wilcox To: Kostya Serebryany Cc: Andrew Morton , Andrey Konovalov , aryabinin@virtuozzo.com, Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , will.deacon@arm.com, cl@linux.com, mark.rutland@arm.com, Nick Desaulniers , marc.zyngier@arm.com, dave.martin@arm.com, ard.biesheuvel@linaro.org, ebiederm@xmission.com, mingo@kernel.org, Paul Lawrence , geert@linux-m68k.org, arnd@arndb.de, kirill.shutemov@linux.intel.com, Greg KH , Kate Stewart , rppt@linux.vnet.ibm.com, kasan-dev , linux-doc@vger.kernel.org, LKML , linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Jann Horn , Mark Brand , cpandya@codeaurora.org, Vishwath Mohan Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer Message-ID: <20180702203321.GA8371@bombadil.infradead.org> References: <20180627160800.3dc7f9ee41c0badbf7342520@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 27, 2018 at 05:04:28PM -0700, Kostya Serebryany wrote: > The problem is more significant on mobile devices than on desktop/server. > I'd love to have [K]HWASAN on x86_64 as well, but it's less trivial since x86_64 > doesn't have an analog of aarch64's top-byte-ignore hardware feature. Well, can we emulate it in software? We've got 48 bits of virtual address space on x86. If we need all 8 bits, then that takes us down to 40 bits (39 bits for user and 39 bits for kernel). My laptop only has 34 bits of physical memory, so could we come up with a memory layout which works for me?