Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1474795pxu; Fri, 16 Oct 2020 12:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeL4hfXSG7Fz6CuCNnbulQeOAhwUpWF//EVPGWEyDVw+3/EeSe5/+FUL3iGs5bIAlgAW0+ X-Received: by 2002:a17:906:a859:: with SMTP id dx25mr5361180ejb.459.1602878212075; Fri, 16 Oct 2020 12:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602878212; cv=none; d=google.com; s=arc-20160816; b=xUxtX2+Gr57dijIgNng26gWyp/GcUyA6MXhRhNtpGvdkKlq3HJf/LfiA8+F42LBUsh dcveZoi2OMb4Tc5JJzs/aQPavLt4/x91fnQl39k1+QVVjeXFl+oHHswsAjuREAZOSNow V2efJt89GpVqI42Lv4phZ4PFUY/etPnzgqw088C6yyqF4d5nhFx4XzzEiGHoDbbQ59me I/D6Ww900+ZUh6k6LItZE/xrfUfXKIw4c6XBeVvjNMfqZgkShNwNIhhkcHiR9XH+JWnm 804NB9qvNsAn9Wm8Uy1Elc4Jze52+YHYIbmPuzA0lS+IIlyd6ahGt+Lj6E8bLPrf/h+o G5zQ== 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=3kC6Vgkm0RSxbZXaUeBWqyQrYh34yUHxn1mWSex6aQg=; b=pIs99xDYH8vslYVrAwpJdA2Q1Iz7QIXxZZ1pYK1/Mf52tL5IeyM4r6tMguFV2PsKp3 8O5luCwejtxurxr+4EaM1YLGr1y1ahCpoZPO9r9bBy2SsOFSvnwLXeHX3MlJA2jralmI MhqIIaft+GPt3GNc7yptIwh5n0fxgP34XrcGV34zirpdPtdTUweZ9ArORj/8wWCYseD4 RmxTdpBDiBer0Lnu7/4G9c6KA/v4ZZ5YaI178/w1eckKxjvSOsF7HHN/eD7rsExO/5Ll 7JU3cTv0Z1SRGup2i50XHib2oP4GkcaLQnPbkILAeYj+IHy3xVLrJzx7HR+hFiNnXJqV aJQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=odYcfxCn; 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 p25si2728093ejc.412.2020.10.16.12.56.23; Fri, 16 Oct 2020 12:56:52 -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=odYcfxCn; 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 S2410455AbgJPPwy (ORCPT + 99 others); Fri, 16 Oct 2020 11:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408853AbgJPPwy (ORCPT ); Fri, 16 Oct 2020 11:52:54 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 367F9C061755 for ; Fri, 16 Oct 2020 08:52:54 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id az3so1605627pjb.4 for ; Fri, 16 Oct 2020 08:52:54 -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=3kC6Vgkm0RSxbZXaUeBWqyQrYh34yUHxn1mWSex6aQg=; b=odYcfxCnyO63/MjMhL7cfs6jP1gja2pd9uJY5C3fTUJvDuBt0YH3tRVq2JKVNtzeCI D8vfHkPSsL6N9G38+hY4l/69kTSE47p7QnVn6NZrEQqPwtkJgl4oXDQUJdkA6FXqSgBs bE82uQBBlxMgsk3ztKAXTZm0cBg8H8ZOVMpPl6yAIPq8nqdbCIUi4sPLe0vPV4stzKaE XitSrlYOTBRuvkq5vqUx1CfWPy1tH+knwUMt365htcT6qN0bcO8BI/WVt4aioRIDEo71 fJNGIEGke2MNKIf89Zef56tb0PVAWGgJESO4H/AI65+Zrny/Gy6A7UglDOlZ6PABluYl 8cXQ== 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=3kC6Vgkm0RSxbZXaUeBWqyQrYh34yUHxn1mWSex6aQg=; b=HXDAj7sQ4J5iXUEXno9Wp1+ugax5CBJ5nJK9HJHwfP72RfTzTTvME6mgsnvLdDtTjx 4Uqy2Z3nh0g7jQM+LAF/sh7KImWudbMECx7qmM05HF4DuPG2xyWcCAnWPhBXwmT7bAFc 7eQzGP6gbvPOdID4cqfbkRb5IxKIC937e7FBK5p5J3J88qIncwUc7PtrvuF8ChnjihAT Au43vuZU2Ab0lMNnrTeD/SaJEbIojhGh/Lc+hLQWhQmSK8pmi4YAVjqbcRmev5li2BQ+ qKlz7/Xz/A4wKk6y/WjG5QO2OwY1I/Vc78ObKnxSnpUzU3dPNep5f//peLJr5NPCqYRC AFZw== X-Gm-Message-State: AOAM532S9DL4pysKN5Z7BRBO5Y+k37zehoddk2Etm24WsoYKDWDpCB4P n4JJx8r2V0QTNS9Tq8SiLoe1boey28WJzedYpAuVJw== X-Received: by 2002:a17:902:5992:b029:d5:c794:3595 with SMTP id p18-20020a1709025992b02900d5c7943595mr3319246pli.57.1602863573590; Fri, 16 Oct 2020 08:52:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrey Konovalov Date: Fri, 16 Oct 2020 17:52:42 +0200 Message-ID: Subject: Re: [PATCH RFC 0/8] kasan: hardware tag-based mode for production use on arm64 To: Kostya Serebryany , Serban Constantinescu Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Elena Petrova , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML , Marco Elver Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 16, 2020 at 3:31 PM Marco Elver wrote: > > On Fri, 16 Oct 2020 at 15:17, 'Andrey Konovalov' via kasan-dev > wrote: > [...] > > > > The intention with this kind of a high level switch is to hide the > > > > implementation details. Arguably, we could add multiple switches that allow > > > > to separately control each KASAN or MTE feature, but I'm not sure there's > > > > much value in that. > > > > > > > > Does this make sense? Any preference regarding the name of the parameter > > > > and its values? > > > > > > KASAN itself used to be a debugging tool only. So introducing an "on" > > > mode which no longer follows this convention may be confusing. > > > > Yeah, perhaps "on" is not the best name here. > > > > > Instead, maybe the following might be less confusing: > > > > > > "full" - current "debug", normal KASAN, all debugging help available. > > > "opt" - current "on", optimized mode for production. > > > > How about "prod" here? > > SGTM. > > [...] > > > > > > Should we somehow control whether to panic the kernel on a tag fault? > > > > Another boot time parameter perhaps? > > > > > > It already respects panic_on_warn, correct? > > > > Yes, but Android is unlikely to enable panic_on_warn as they have > > warnings happening all over. AFAIR Pixel 3/4 kernels actually have a > > custom patch that enables kernel panic for KASAN crashes specifically > > (even though they don't obviously use KASAN in production), and I > > think it's better to provide a similar facility upstream. Maybe call > > it panic_on_kasan or something? > > Best would be if kasan= can take another option, e.g. > "kasan=prod,panic". I think you can change the strcmp() to a > str_has_prefix() for the checks for full/prod/on/off, and then check > if what comes after it is ",panic". > > Thanks, > -- Marco CC Kostya and Serban.