Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp330864imm; Mon, 2 Jul 2018 12:17:51 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ6YmiAhEii3HC3eG7BRh6QWR8dBaRC1dSkvkSdXWvLRWvQ3DGqg9/HJxJ8Nmxf5gjcv9qg X-Received: by 2002:a63:8f53:: with SMTP id r19-v6mr22465418pgn.17.1530559071568; Mon, 02 Jul 2018 12:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530559071; cv=none; d=google.com; s=arc-20160816; b=tgv82il5FSLTsPKJb3M8ckXOEr8VNy8slekcH1jd4a7KNPvyqqeoec975B2kxQ8+Lr j3QgPgOBohj1CE7E/ynYacn1rIMqhZXorYfwe0zJxyuJDy2Ew9ZQoa2Sj4Wibp832hXZ M9e+TRxvR7kPnQc+OidIEpPgNS6mKLPfILlwtfnbpvUcfoccr5Ot/cK9DiZ3Rhm/RYj8 kra+pWH4KxmzN/DRUQvQ7SGY4Q+OXvny0OeSAuyhLOOCBaC2q4dzESd3n6++zmtKSV70 qYhvYtaDVOZ5jW0wtglREvawpt8m57Y/KVpboObLiCDoS9p3zfTQGnc8RMePjAelltgO /HLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=zM8QdUYcU79fmKmDab6fB3QO6ufAC+g62NgcxdseyEE=; b=vzD9sjARVbV8DO1bAaVLLMHqtmU6bJtNOkgNcUi6Mxyjd1DBKxVOgJHxu6r5NDfzq4 i40FxD79ELJI1ET4rqdVUPiENr4K57Br8XU4rq0RcWHTYM2X0ElcN6+C3IO+WgV1zgPS OH9NtcxCsE9tSNVbNSyWn6TP+a3EEVIVBJRZaVxssEffu3MfBGLtSgnOq1NM8aQ9Hj6H pQpNlT2yrSrqTlE0icXivbvW4bpUWLBcBpSD4O/2Vd3qV7ySg5ca2A74R1MbPtsBYoul XDexmKCJKAwLMzWQUS1RO2JY5CwqItCWhmQ5uN8tUHa71HeGT3LCrKF0b/urtxoyYi0r GNOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=hkun1gkt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r87-v6si3304024pfj.331.2018.07.02.12.17.36; Mon, 02 Jul 2018 12:17:51 -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=pass header.i=@google.com header.s=20161025 header.b=hkun1gkt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753531AbeGBTQt (ORCPT + 99 others); Mon, 2 Jul 2018 15:16:49 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:36986 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753357AbeGBTQp (ORCPT ); Mon, 2 Jul 2018 15:16:45 -0400 Received: by mail-ua0-f196.google.com with SMTP id u8-v6so5417460uao.4 for ; Mon, 02 Jul 2018 12:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zM8QdUYcU79fmKmDab6fB3QO6ufAC+g62NgcxdseyEE=; b=hkun1gktPhl05hCgoKO9IHYr2GlqavZXde45ML0ZGNGf+MSUtAmd/O1bJp/e49UdW3 uK6elNgGXRJ7Y7TEqXapmnMJawKGKoS/WS3jTVVdi6Gy2oc87msugrkKdUwqkbfIx+v2 ghEiTylkhhL2XIdHIj2T6dVsQ+ULY/X4AnmyxQZrODy6Hz1tNcMKoM9fufgSx/dYnHJ8 tgr8nrTkgFd1w2yHCAV44n5lFJRxxuayg4bhEyWY25mV3TZoKqXofAOnX3YmpZ7et2Dm pdKQ8BdP+DiDaV6PmgXDB+0UmY5hUIt1kYX5hoGkPljjfImmVGHCiy9SkCavNZVrCIZt 0jSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zM8QdUYcU79fmKmDab6fB3QO6ufAC+g62NgcxdseyEE=; b=FI/r8iVJsE6/GTOIfiOzmnzFpEUG43GcFV9tATfOe6rSUZqk3cTN65f+Ihp6rM4CQs ZhFV0OCs7YI7Xgv4wAjSgPhxuPrTddJc0A+IXri4YtbH3eCIGfK7WTGlN8+rTYi4LFzd b9ITeAr4I9ScZ8dSRCtbI38c0eWF4JaFy1OvXYMAsd65yLQjoNXb28JYeSzG7lSHmf7T X23vpMnIBMIY59f++zgDTIXkzV4BUAX2NDVSvgy9s6CczRctMsoz3QJKmKlRNiiEUNF7 A4yEKSAL7gzoRP22s/ij0CjT0Us3bY05ya6UMLc0EcWdcT22mYb/EcBX35Xxzgtq1MVW F/Dg== X-Gm-Message-State: APt69E0b+92WCd3pfvrKqPSpDdm1Tv9x/2PZkpJfzAXc7AzOtlBk5JGv gf4sVW0pXqo7Bt0L1bScXbKsDD+twPbxXJA5PelqiQ== X-Received: by 2002:a9f:2523:: with SMTP id 32-v6mr8853089uaz.101.1530559003965; Mon, 02 Jul 2018 12:16:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:9d83:0:0:0:0:0 with HTTP; Mon, 2 Jul 2018 12:16:42 -0700 (PDT) In-Reply-To: <20180629194117.01b2d31e805808eee5c97b4d@linux-foundation.org> References: <20180627160800.3dc7f9ee41c0badbf7342520@linux-foundation.org> <20180628124039.8a42ab5e2994fb2876ff4f75@linux-foundation.org> <20180629194117.01b2d31e805808eee5c97b4d@linux-foundation.org> From: Evgenii Stepanov Date: Mon, 2 Jul 2018 12:16:42 -0700 Message-ID: Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer To: Andrew Morton 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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'? >