Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3865481pxu; Tue, 20 Oct 2020 02:30:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJEVc/ORLdGzbYDuZymSzNIJ1adUDXftjgJBoYUojgm/bqCRAqUwvaAPQ4tZxSg8Z3wz56 X-Received: by 2002:a17:906:3799:: with SMTP id n25mr2185057ejc.6.1603186222458; Tue, 20 Oct 2020 02:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603186222; cv=none; d=google.com; s=arc-20160816; b=GCG0itMAqgEPRvWOTqbqnGpaAh2y/NykZyyZzIVVvSC3ZKyGKBU9KTOf2dUbVF3Cma 9DrpVDMK0lr8/ij7tAwuRDSw8CtEllYGHHVp97Z1DSg9n81lhfWmWpfPnU+5l32K4t3Y X3FvR7VE+idzL7PKX0Rh/cxMRiagCUlypYIM4fPKOKSx5aqq65Z19yJvZQh2X/mKd8zd 6O6r9ljpZR3LwJHHcETBqYxfRjyIbv1gzDz4ywGMKs2YsUD2fHYUaV149VzFJUnp6upp vqfJhPKP0i4yRiPYiwzr9bxypX0VMqTwNfPPvVsd1rYBuwfK0sH49GnL75WlwwW6yltA XTfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=z9wYYqXSCH9hJsvZCRRfPmiplKII60fDiq3y/0UOTRQ=; b=uOSHsq8bQdAD0NGsocQrT6F1OFMCFS/W2+dr9pZaN43t57rBUoROG/p05Y4txxI5Dn mbrv3+2w9A9ppEoaS1SGq9GxL+doiAEig7n2wuOYjUV2p6s40Pd6WuQID2vD5Ha7lOL1 x/PQy0libN0W6KntGPOLtCKqIo1/FVuStuezqYOHlgUARFGp4JPW/I9XP/Sio0zbT5Wa j2z9J8xJy+6Gy6Cl4omV3pTDU5LAyFNmhgE8Axk+alIbbxPn2oJHCWL1g4ZQNnKY4mnC r6ktpCQDY6YfO4zsby8y2ZX/eJa6wEykyLQnUwXfqMa9RrMyANx6NOd83w5hak94qjLw cBAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nFj+RhH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id hk12si976442ejb.25.2020.10.20.02.30.00; Tue, 20 Oct 2020 02:30:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nFj+RhH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2391608AbgJTFUS (ORCPT + 99 others); Tue, 20 Oct 2020 01:20:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391604AbgJTFUS (ORCPT ); Tue, 20 Oct 2020 01:20:18 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CA98C0613CE for ; Mon, 19 Oct 2020 22:20:18 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id f21so572928qko.5 for ; Mon, 19 Oct 2020 22:20:18 -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=rvficZHWNgqiYYGgzyHbmdOxf1genNnGDlTvAptAotL6n5sb8VOJV2/IlyPlcyuFeJ x+bsiGo+5Q/t4AhZxMkfCwDMJkThx1cLzXalz4CMSLXiQDBY3gM7/hpoXHaAfYY+/zJa X/gkKIa0rI7UfNd71kfkk3UpEKK11KlPeYjP+mDnPPddmqc2ddIvynzjD+gMq1RWC+YD Vs+pfR8qVsj1IEUqsQ+JM3gZCNRljL14BfZBMGT3RrvAZZQvcjOBom8JKd2L0OBoVShb DcakM5MGsEXHTfL9LPiIosnc48ZmCsz8+hvWcWOwhACR24Nxc9Rxajku6/+/UT5rJVNB epmw== X-Gm-Message-State: AOAM53307XnbllWrv9KBFBjc8lrOpZCdIX5lqNiZGy3yayKptW6/+psr rVkkjmRh13DVPVGuDMBKlpzX7PbvVXcH8L/Pz2HrYA== 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.