Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp6953213imm; Wed, 27 Jun 2018 16:53:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdaCRU/ukXiuGcWUw3cT5X8vjs6V0AR3o852IKj7x0pcZfv24HA8Kcy4zAm3A90kH07MLgg X-Received: by 2002:a62:6203:: with SMTP id w3-v6mr7774931pfb.65.1530143632900; Wed, 27 Jun 2018 16:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530143632; cv=none; d=google.com; s=arc-20160816; b=AA+jSRiOwO8KEUHgQ9et+5VmZl3e19cqZe8T3n2mbF5PFPUSl/oSXSPJbCekW33VPc nOke4t2M8/D5Ro2PpWgoIGwVRgDwU30G7eBsz4Yc4IG40pkKerGdoUG9XIuoYcBrpM8b aGHGwof54SC1V3uogvqvHHGkalywXugolZNHl4HT3fqwMfN+oXc2EQV6NKfUGuJsBNco CrE55pm1SJRP33+uhuthyFBlx2FGsniFJMDyfgn4QuPNSUVB9Bh8HVYYsS4iGP1bgsQn WXP2paVfR2TKu09YH+/HjDV9XkuQKMKhM9lArGUYwg7X63EeGV16U0i2/ULVirNlX3Fo QdTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=9Odlvc32CEziQ0p2utrlNS3A/z9tx1FQdfKlC3BKUXQ=; b=Qcm+2UPq8sB/HNJh6RzcpVjhrgxW+aJz9XHD9eeSGv0JfI2BIJZYek69m5M7Olc8vG g3MfD8q+fS7r+gqmaebw7likCNBu5fgNUZD5PALnemwA5hhjh0m+yFJZmusLAT2nEUXi 8yawI1WjBbbc1wAFNPQ6GjXeP+VwA7GSdRxqAsAvAT9v+ftvmvZSnvyg6iUGk9Ed2/ux fpBR0hJW0yApEKoaxaEeGzAricbvxdtqcFCN8P/brnTUbe6p11ngCiWg9xFDp31t3dgb RqM9UGdEKxyQocWQnM7NIOP2+oVPkzL6LHckAfshZlBLQVkNBE+eX5jur8x7GiZOlByI fHkA== ARC-Authentication-Results: i=1; mx.google.com; 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 n7-v6si4479555pgp.434.2018.06.27.16.53.38; Wed, 27 Jun 2018 16:53:52 -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; 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 S1752157AbeF0XIG (ORCPT + 99 others); Wed, 27 Jun 2018 19:08:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:41684 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbeF0XIE (ORCPT ); Wed, 27 Jun 2018 19:08:04 -0400 Received: from localhost.localdomain (c-24-4-125-7.hsd1.ca.comcast.net [24.4.125.7]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4B74A9F0; Wed, 27 Jun 2018 23:08:02 +0000 (UTC) Date: Wed, 27 Jun 2018 16:08:00 -0700 From: Andrew Morton To: Andrey Konovalov Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , Will Deacon , Christoph Lameter , Mark Rutland , Nick Desaulniers , Marc Zyngier , Dave Martin , Ard Biesheuvel , "Eric W . Biederman" , Ingo Molnar , Paul Lawrence , Geert Uytterhoeven , Arnd Bergmann , "Kirill A . Shutemov" , Greg Kroah-Hartman , Kate Stewart , Mike Rapoport , kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kbuild@vger.kernel.org, Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Jann Horn , Mark Brand , Chintan Pandya Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer Message-Id: <20180627160800.3dc7f9ee41c0badbf7342520@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jun 2018 15:15:10 +0200 Andrey Konovalov wrote: > This patchset adds a new mode to KASAN [1], which is called KHWASAN > (Kernel HardWare assisted Address SANitizer). > > The plan is to implement HWASan [2] for the kernel with the incentive, > that it's going to have comparable to KASAN performance, but in the same > time consume much less memory, trading that off for somewhat imprecise > bug detection and being supported only for arm64. Why do we consider this to be a worthwhile change? Is KASAN's memory consumption actually a significant problem? Some data regarding that would be very useful. If it is a large problem then we still have that problem on x86, so the problem remains largely unsolved? > ====== Benchmarks > > The following numbers were collected on Odroid C2 board. Both KASAN and > KHWASAN were used in inline instrumentation mode. > > Boot time [1]: > * ~1.7 sec for clean kernel > * ~5.0 sec for KASAN > * ~5.0 sec for KHWASAN > > Slab memory usage after boot [2]: > * ~40 kb for clean kernel > * ~105 kb + 1/8th shadow ~= 118 kb for KASAN > * ~47 kb + 1/16th shadow ~= 50 kb for KHWASAN > > Network performance [3]: > * 8.33 Gbits/sec for clean kernel > * 3.17 Gbits/sec for KASAN > * 2.85 Gbits/sec for KHWASAN > > Note, that KHWASAN (compared to KASAN) doesn't require quarantine. > > [1] Time before the ext4 driver is initialized. > [2] Measured as `cat /proc/meminfo | grep Slab`. > [3] Measured as `iperf -s & iperf -c 127.0.0.1 -t 30`. The above doesn't actually demonstrate the whole point of the patchset: to reduce KASAN's very high memory consumption?