Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2497950pxb; Mon, 11 Jan 2021 11:08:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxr3k/Y9+JmHv0lwZE5n0xn5vk7E2A4j03cEWtRi7fWkLPLu473MeDqhKpXXKZLVLcLhKSv X-Received: by 2002:a17:906:add7:: with SMTP id lb23mr676657ejb.352.1610392109668; Mon, 11 Jan 2021 11:08:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610392109; cv=none; d=google.com; s=arc-20160816; b=kNAqez16P0VIaSRW2byDlD16Hufn0ul/BNsGVp2Td0vPZckyBt7u/XA94i4cCjVN/F Rw1RLYSe0Ok+l3aAK9Doo7EcRdZYmSlnp3cFurrIqrT1589Uc40i0E8FHOapwHh6g1xh GJpDZPCIcifmLbkFX4oph0uiaq+mrtcF1NzqscFwK4WoDx3HosoT3mSDlaT94d4p27xI Ll8agSnSsPsLMyoCIP4Eax8NpxfjbkmZUvfWsNAbrylgOCzNkkxheYG+nFqkplf4K76I P951I2zaXaUPUT4TMwgGXg/75jbT3PYUmMTXPor8ijDmVVku0OVUJpt9FDkMGSHJmKKC da7w== 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=0M90n7WjWo+X1yIVKHdOTyfvfwcWqL9tkBr22HLMVsY=; b=dFjIgUnjYI18ORnU4a9gRHpBo26JxerEcrLCoagTEExJ3v0zgSRzie7COuYBIKrttm QRXWRzya7okWz9ndVvMd9iiYUBqdstQHOdk8keJiBe+XEok690h6DrqXze8/8rjRF7Su 1bI8/xuHr40yURTpfrjgTn+eFoDemPOhyVY0OacOpt4HqV1mGf0sVh+O/kHiUmn2brAH aWAdsABuhZ7nPn3qCM4+Y7h8DXoXXn7ZStxmfrmFqnMetIvSJMTvxnoIVBdWTQl8f302 dL716XZg+x3IF9DHsH4L+iFj80TgBfo936hnldT2IvYIOEgnxhJcHfBXCt7JshQji+Zt fkNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mQxWWfxr; 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 d5si105353ejk.389.2021.01.11.11.07.46; Mon, 11 Jan 2021 11:08:29 -0800 (PST) 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=mQxWWfxr; 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 S2389860AbhAKTEW (ORCPT + 99 others); Mon, 11 Jan 2021 14:04:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbhAKTEV (ORCPT ); Mon, 11 Jan 2021 14:04:21 -0500 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AA4BC061786 for ; Mon, 11 Jan 2021 11:03:41 -0800 (PST) Received: by mail-pf1-x430.google.com with SMTP id c79so514161pfc.2 for ; Mon, 11 Jan 2021 11:03:41 -0800 (PST) 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=0M90n7WjWo+X1yIVKHdOTyfvfwcWqL9tkBr22HLMVsY=; b=mQxWWfxrpoJqQpQ0teH0JWLWjRlCD6LzwnF9DaADN1VituMO7/JZhJSc19maKjmKa0 XAhLsG6GziZLcTS2nrs4aZgJyR1MwzUKmkGihnYT4kRyKGczg0UL7kcyLDEfJM67gV4o C6Qe1DfX/qHHCoZSiQr1IC3yt5haB46iMoLbiVigq5Z4Wk9LZWV1EsqDj7jVKI0Idjm+ 9FgiQytvEQ6ZkCGZeiYITKvdh+L8AFRXr2eHwaMMEDY3+zyb7fJvMawbCCycvQOicRPY 459LZinhBEH0OuPe0NVfJ99MWMN4iZoQOUkf3GKueztCB5U3p47j+G6zeNylLPU3TE3A l7/Q== 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=0M90n7WjWo+X1yIVKHdOTyfvfwcWqL9tkBr22HLMVsY=; b=LBWiw5IwvNmdP7ReSwDZ6ztjbN+BxHFS+s5jCvhmw5dyysL0yi3MLuEgIJbpSfcBmn IRbw2e7uQP7P2GowoMcn5hpuNMhMdzsS6EGO8SQ5KQxYWwnSrn0XkqVXXMngywKagTaw Is/7YPWSuBto+E/xfJEjk4ZktsNMlTJrXyNKIb7AUSP9N60ANjLoEHFasZMUfs9Hv1zL /LDOLHTMS1Pnq0EoUQAexLWlTlAPhomfZ936WoHoRTO94zlRN0xstij3NnDH1CrCvBPK zNKUAIhujgmfg6N98nYhGejue442cGQDeR46q470118AJ9XvABz+5EXJ3mGfa90c5u/M Agog== X-Gm-Message-State: AOAM530webm4DNYy42MlHXnWGQKj5QSCCVMGYIpPaQUlDgCng7aytv51 mvXQtjZPODQcZPdXjAxz260J9sFXedMMWjpGVjgLIA== X-Received: by 2002:a62:14c4:0:b029:19d:d3f5:c304 with SMTP id 187-20020a6214c40000b029019dd3f5c304mr991822pfu.55.1610391820883; Mon, 11 Jan 2021 11:03:40 -0800 (PST) MIME-Version: 1.0 References: <20210108040940.1138-1-walter-zh.wu@mediatek.com> <20210111185902.GA2112090@ubuntu-m3-large-x86> In-Reply-To: <20210111185902.GA2112090@ubuntu-m3-large-x86> From: Andrey Konovalov Date: Mon, 11 Jan 2021 20:03:29 +0100 Message-ID: Subject: Re: [PATCH v3] kasan: remove redundant config option To: Nathan Chancellor Cc: Walter Wu , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , kasan-dev , Linux Memory Management List , LKML , Linux ARM , wsd_upstream , "moderated list:ARM/Mediatek SoC..." Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 7:59 PM Nathan Chancellor wrote: > > > > -config KASAN_STACK_ENABLE > > > +config KASAN_STACK > > > bool "Enable stack instrumentation (unsafe)" if CC_IS_CLANG && !COMPILE_TEST > > > > Does this syntax mean that KASAN_STACK is only present for > > CC_IS_CLANG? Or that it can only be disabled for CC_IS_CLANG? > > It means that the option can only be disabled for clang. OK, got it. > > Anyway, I think it's better to 1. allow to control KASAN_STACK > > regardless of the compiler (as it was possible before), and 2. avoid > > It has never been possible to control KASAN_STACK for GCC because of the > bool ... if ... syntax. This patch does not change that logic. Making it > possible to control KASAN_STACK with GCC seems fine but that is going to > be a new change that would probably be suited for a new patch on top of > this one. The if syntax was never applied to KASAN_STACK, only to KASAN_STACK_ENABLE, so it should have been possible (although I've never specifically tried it).