From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55E90C433E7 for ; Tue, 20 Oct 2020 05:20:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 825E522259 for ; Tue, 20 Oct 2020 05:20:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="nFj+RhH5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 825E522259 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4632B6B005C; Tue, 20 Oct 2020 01:20:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EC0A6B0062; Tue, 20 Oct 2020 01:20:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DAFE6B0068; Tue, 20 Oct 2020 01:20:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id F28756B005C for ; Tue, 20 Oct 2020 01:20:18 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6FF9A180AD811 for ; Tue, 20 Oct 2020 05:20:18 +0000 (UTC) X-FDA: 77391152916.16.shape92_4b0bb6c2723d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id 4F7891021D0AE for ; Tue, 20 Oct 2020 05:20:18 +0000 (UTC) X-HE-Tag: shape92_4b0bb6c2723d X-Filterd-Recvd-Size: 4291 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 20 Oct 2020 05:20:17 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id y198so587308qka.0 for ; Mon, 19 Oct 2020 22:20:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z9wYYqXSCH9hJsvZCRRfPmiplKII60fDiq3y/0UOTRQ=; b=nFj+RhH527dSF15OyCknqBlNqu/5E4YnS1qpIFJZvkK0948u69zvGZW4bKEqndnMFz 8yyx70GM4gugorWaNi9Kci+S9s4l/cZTT/4+wlXS78kRrYtRgPdN4mgLPQ6Xh7ovioJR gUO2EnXkClA3Rx+rf65BWHug7V0rfi7T4GnGTpLU0Ez5EEZ0aXY6b1Ga9I8unR45iRM4 righHXZWlAPHkljP5Y23955u2C47+j6rgw7tV/zyL1TqZpFVY8JhWYzmwEGFLnHsz/i1 ido0lhbQv3Uryk5j7uKTd5JqVqzYSe8vbOBMaxvzBaZ7BX2Bq64/CxUZqemmfqlASOAn ioog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z9wYYqXSCH9hJsvZCRRfPmiplKII60fDiq3y/0UOTRQ=; b=aX2PgMLhbQV+QEwiBbQ5iyh8OyDxdj3ZPMGUmEA4Ff2P3+yYYTmF//5IWw6l3qpWoM O3fCtjvUkv2ewlAD5NsPKDWLMvVlKO27lN5w04JPeZhmdrgXYGMOe7qXvMtpnffTXHvF Z0WRMarWI6Kn7TwvX8NbrzqPHBDQFfDDM97RDYsNxDvOC3N+9x7q6NQImP2QYZTcZuD9 kWMglr0p1JBANcOacRkYJSwvfA34hRlML3eD1BojXNvkCp8xeBNN6SNgpCSc11qGo+Sh dj/TX23+sYdpF1TQwuy0l69Ad4Jx2ZDldbLO4rtGG7s9iA+IMw/ZamXLx525oPFgMmoU /m6g== X-Gm-Message-State: AOAM533LA/FKM5zasuqt6iAUQ+ngFciideWWmtwDQT+06EGk01STD8Sw Y92lZcMZmQTVslkCBJF73KPkrQ45gt5og/GmqoFCRA== X-Google-Smtp-Source: ABdhPJyx8CWXpC5StOxXKhwfKyIBUtcww66CulSXXuA5OMvHecs0nRH1A9mqu15lKale74SmTIIJ6I71TjzxvW0MI9I= X-Received: by 2002:a37:9301:: with SMTP id v1mr1244436qkd.350.1603171216987; Mon, 19 Oct 2020 22:20:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dmitry Vyukov Date: Tue, 20 Oct 2020 07:20:05 +0200 Message-ID: Subject: Re: [PATCH RFC 0/8] kasan: hardware tag-based mode for production use on arm64 To: Marco Elver Cc: Andrey Konovalov , Catalin Marinas , Will Deacon , Vincenzo Frascino , Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML , Serban Constantinescu , Kostya Serebryany Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Oct 19, 2020 at 2:23 PM Marco Elver wrote: > > On Wed, 14 Oct 2020 at 22:44, Andrey Konovalov wrote: > [...] > > A question to KASAN maintainers: what would be the best way to support the > > "off" mode? I see two potential approaches: add a check into each kasan > > callback (easier to implement, but we still call kasan callbacks, even > > though they immediately return), or add inline header wrappers that do the > > same. > > This is tricky, because we don't know how bad the performance will be > if we keep them as calls. We'd have to understand the performance > impact of keeping them as calls, and if the performance impact is > acceptable or not. > > Without understanding the performance impact, the only viable option I > see is to add __always_inline kasan_foo() wrappers, which use the > static branch to guard calls to __kasan_foo(). This sounds reasonable to me.