Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp334497imm; Mon, 2 Jul 2018 12:22:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeURV83SDhpsz2N/BO95R7wZFFVa2wWUQFfGXJya7RGEOvzLoVNVcPHAzBdDOpQY/DzMcoE X-Received: by 2002:a65:5803:: with SMTP id g3-v6mr23135615pgr.117.1530559334531; Mon, 02 Jul 2018 12:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530559334; cv=none; d=google.com; s=arc-20160816; b=H/+NtXVnQqZ4USfEguA1QIJDoSgmzJ+KVbdn6ebBcfyGnBE4P9gP4CWEc4g1otelzs 1fIcgJoCBk1pR86/Tod3Dtf5b4tyzYOkEo6ls2YGbP8hErQCXdOp3yKCbaLU5nLpSLIa mt/o8hwkSzqJ/EMcIYdS6QJzbesfHXhU5yGDSKMeMTiA8QoU6ob5OwgI3H/MH3v0dm9K V8/cKCWguaZcJb1x6w+oboida4s5MGaCG8yaDht+NpxNq+lnxlAyEkimAs8UkB614Re2 5MRN4no79gZlKwk/A9cTPnaOWpn0rVMd5KfPpgj0VN0cjoQJ5JvXgYeyM+NICJ+zL5db JLww== 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=bDGA85sK5xf0qjWpX80Lj8e7OTN9UYBoHPNGrHrSffM=; b=C2TaTSzVaIWoRCyveVC8ejtbdad6JCSj+oYBA90MuNeIMJbivkdGKzw57NzcryTT/R bD9MrgELQ32uGRTwZFS+uFl3+o6v8Md8Ath0kHsJIuQK7XVqTaU13uLWPE5PpQsD3945 04x7lYS0BZjL8S0UCCG/9qeXbK3W8o0shLOXr6gmfZ0Bh4xfsnrfj3cSBzENwqL7mwb9 iSx+v92g5JCkArAL9Jz0Hd9mAMPqD1yyeFSRGcoohJqB6eD2JPWEiklUiVIe+kLuAf0c dmAk4DJR5p5J4IZI8K9c7l0SuAHA1QEbKbz51UzFDafv6uv6AvI3fc8fYfOfVJHP6rF3 rpgw== 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 o6-v6si16241382plh.158.2018.07.02.12.21.59; Mon, 02 Jul 2018 12:22:14 -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 S1752756AbeGBTVS (ORCPT + 99 others); Mon, 2 Jul 2018 15:21:18 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55220 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752237AbeGBTVQ (ORCPT ); Mon, 2 Jul 2018 15:21:16 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E64A6CB7; Mon, 2 Jul 2018 19:21:13 +0000 (UTC) Date: Mon, 2 Jul 2018 12:21:12 -0700 From: Andrew Morton To: Evgenii Stepanov Cc: Andrey Konovalov , 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 , linux-doc@vger.kernel.org, LKML , Linux ARM , linux-sparse@vger.kernel.org, Linux Memory Management List , Linux Kbuild mailing list , Kostya Serebryany , 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: <20180702122112.267261b1e1609cf522753cf3@linux-foundation.org> In-Reply-To: References: <20180627160800.3dc7f9ee41c0badbf7342520@linux-foundation.org> <20180628124039.8a42ab5e2994fb2876ff4f75@linux-foundation.org> <20180629194117.01b2d31e805808eee5c97b4d@linux-foundation.org> X-Mailer: Sylpheed 3.6.0 (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 Mon, 2 Jul 2018 12:16:42 -0700 Evgenii Stepanov wrote: > On Fri, Jun 29, 2018 at 7:41 PM, Andrew Morton > wrote: > > On Fri, 29 Jun 2018 14:45:08 +0200 Andrey Konovalov wrote: > > > >> >> What kind of memory consumption testing would you like to see? > >> > > >> > Well, 100kb or so is a teeny amount on virtually any machine. I'm > >> > assuming the savings are (much) more significant once the machine gets > >> > loaded up and doing work? > >> > >> So with clean kernel after boot we get 40 kb memory usage. With KASAN > >> it is ~120 kb, which is 200% overhead. With KHWASAN it's 50 kb, which > >> is 25% overhead. This should approximately scale to any amounts of > >> used slab memory. For example with 100 mb memory usage we would get > >> +200 mb for KASAN and +25 mb with KHWASAN. (And KASAN also requires > >> quarantine for better use-after-free detection). I can explicitly > >> mention the overhead in %s in the changelog. > >> > >> If you think it makes sense, I can also make separate measurements > >> with some workload. What kind of workload should I use? > > > > Whatever workload people were running when they encountered problems > > with KASAN memory consumption ;) > > > > I dunno, something simple. `find / > /dev/null'? > > > > Looking at a live Android device under load, slab (according to > /proc/meminfo) + kernel stack take 8-10% available RAM (~350MB). > Kasan's overhead of 2x - 3x on top of it is not insignificant. > (top-posting repaired. Please don't) For a debugging, not-for-production-use feature, that overhead sounds quite acceptable to me. What problems is it known to cause?