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=-13.3 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 28962C4332D for ; Mon, 11 Jan 2021 19:31:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F341122CAE for ; Mon, 11 Jan 2021 19:31:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403908AbhAKTbV (ORCPT ); Mon, 11 Jan 2021 14:31:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732738AbhAKTbU (ORCPT ); Mon, 11 Jan 2021 14:31:20 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39FA6C061794 for ; Mon, 11 Jan 2021 11:30:40 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id c132so325892pga.3 for ; Mon, 11 Jan 2021 11:30:40 -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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=ax0g20+io9+hknWBPpMxAQv86e3BV9BnGMFgIqXJ9pFv1sGGayp8i3795ZIxSkMX8w sbhmLQZbNam8/SGqG8EAQzIj2k55phmPp6LF3oUCv0Ys+SZvKDJPdZpq7/YAVAXY8s62 c+LidHl99KI5JXqsljDZrcrpJPEMVXH4vAL6MtI56FSRor4vCDSD3vv0bg3IWq5cVANZ GLDHUEO3zwD0hgxSKUdlCf1dsNIbmaiekqEHoyzlSXmDfWpvhMESBCOXOTlLrxsfjlJv Y8Y43ATIACr24S3GqGb6p3pg5RaYkhN0eHtAvg/DD7XAGQCRN6gUP267twpShI2WGMvP QX6g== 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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=g5fWgT2pso2pq2ZNhmyW5AnqOYSk1+JxM2eWJWP4Nfltn1MEg3uf1GKwcJHfRqPJ4B b1LLiGf6wzSOwAqiXwMINOm4g/2LxY7k49rJGSHFHVe709iHlKFEYTGk9FtgKtKokEYB JUve20x64+7B2aT1AzWcIaZay0a7JpGHWbIIq4Ul9lv8LfOMMYmM897TdNbJvnscgpxQ R1/qd+4VPH8ITqFX3gpPVwqcbIyjjlAIB0Jw+0DrutLKmWK51QjDZ2aoatNVxHxr0H2l fi5W/LzkYd5zYiwzQqkWUHnwwiYyalTdmMuWteOVbakLroYnvjZP32c2fZv4HOksJyca WtCA== X-Gm-Message-State: AOAM531dfayVl9Fcp0kkkqFpWn9zswO7FAkgCD7PRVoM7JtX263hxjNn iLflsMPc/0Ka++TnL5AsP/FNp6a+9Hc1Ii/u/Yvuuw== X-Google-Smtp-Source: ABdhPJxfnVekwDDs7W26tTKMU0LtLEZSR7eufar20rcVzDPc4DtJT/9lOoaOHA5Sf6AozuXRQZaWL4OnIHnX0NlzO/4= X-Received: by 2002:a62:e309:0:b029:1ae:5b4a:3199 with SMTP id g9-20020a62e3090000b02901ae5b4a3199mr927134pfh.24.1610393439604; Mon, 11 Jan 2021 11:30:39 -0800 (PST) MIME-Version: 1.0 References: <20210108040940.1138-1-walter-zh.wu@mediatek.com> <20210111185902.GA2112090@ubuntu-m3-large-x86> <20210111191154.GA2941328@ubuntu-m3-large-x86> In-Reply-To: <20210111191154.GA2941328@ubuntu-m3-large-x86> From: Andrey Konovalov Date: Mon, 11 Jan 2021 20:30:28 +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 8:11 PM Nathan Chancellor wrote: > > On Mon, Jan 11, 2021 at 08:03:29PM +0100, Andrey Konovalov wrote: > > 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). > > CONFIG_KASAN_STACK was not a user selectable symbol so it was always 1 > for GCC. Ah, indeed. Thanks for the clarification! 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=-13.3 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 10068C433E0 for ; Mon, 11 Jan 2021 19:30:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9238622473 for ; Mon, 11 Jan 2021 19:30:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9238622473 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 0B4DF6B01F7; Mon, 11 Jan 2021 14:30:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 03E806B01F9; Mon, 11 Jan 2021 14:30:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E48286B01FA; Mon, 11 Jan 2021 14:30:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id CA6BB6B01F7 for ; Mon, 11 Jan 2021 14:30:41 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 94EB0180AD815 for ; Mon, 11 Jan 2021 19:30:41 +0000 (UTC) X-FDA: 77694486282.28.bears04_03160b42750f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 46A766C3A for ; Mon, 11 Jan 2021 19:30:41 +0000 (UTC) X-HE-Tag: bears04_03160b42750f X-Filterd-Recvd-Size: 4785 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by imf50.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 Jan 2021 19:30:40 +0000 (UTC) Received: by mail-pg1-f171.google.com with SMTP id 30so315680pgr.6 for ; Mon, 11 Jan 2021 11:30:40 -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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=ax0g20+io9+hknWBPpMxAQv86e3BV9BnGMFgIqXJ9pFv1sGGayp8i3795ZIxSkMX8w sbhmLQZbNam8/SGqG8EAQzIj2k55phmPp6LF3oUCv0Ys+SZvKDJPdZpq7/YAVAXY8s62 c+LidHl99KI5JXqsljDZrcrpJPEMVXH4vAL6MtI56FSRor4vCDSD3vv0bg3IWq5cVANZ GLDHUEO3zwD0hgxSKUdlCf1dsNIbmaiekqEHoyzlSXmDfWpvhMESBCOXOTlLrxsfjlJv Y8Y43ATIACr24S3GqGb6p3pg5RaYkhN0eHtAvg/DD7XAGQCRN6gUP267twpShI2WGMvP QX6g== 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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=KBQHhe7mf1d+yhC853UVKDZuuFj6bmmuwk76cWUv6Va/nYDZGV2v6g14LNHtsaa4J+ yHCYICgGONhnIPG8ZmYtf+G3WT8l5QnQ7nXB9QOxQwMJEN+5pinC/GBz6WEJK+OWf9YA 0CqyQ/LP2PiSVmf5HqheF2T9D+q0uyG2xOj7MA7htlv9WDL023uzV1CYjG4vhHEbYsVw crVzLQfHNmLymVnvWfwUmhpLHIVx8a75APPKxhvpT80BVv29qNV+ZLy2zqizDjmT7Cug RMtyK1Ej52a6g4qETFgAfrE1LQfddnfWHQiXTprFb0sCDiM52dq3e18PBzb5QMOCJA3k L5PA== X-Gm-Message-State: AOAM532Eu1Ikkyhk39X9DCStNBw3uBp6r8vTkoZTdJX5dK36IvS9XnI6 pwENXnFlBMDKoDTCmhMBnfoIWbgjLvPrHPNH+M4eGw== X-Google-Smtp-Source: ABdhPJxfnVekwDDs7W26tTKMU0LtLEZSR7eufar20rcVzDPc4DtJT/9lOoaOHA5Sf6AozuXRQZaWL4OnIHnX0NlzO/4= X-Received: by 2002:a62:e309:0:b029:1ae:5b4a:3199 with SMTP id g9-20020a62e3090000b02901ae5b4a3199mr927134pfh.24.1610393439604; Mon, 11 Jan 2021 11:30:39 -0800 (PST) MIME-Version: 1.0 References: <20210108040940.1138-1-walter-zh.wu@mediatek.com> <20210111185902.GA2112090@ubuntu-m3-large-x86> <20210111191154.GA2941328@ubuntu-m3-large-x86> In-Reply-To: <20210111191154.GA2941328@ubuntu-m3-large-x86> From: Andrey Konovalov Date: Mon, 11 Jan 2021 20:30:28 +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" 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, Jan 11, 2021 at 8:11 PM Nathan Chancellor wrote: > > On Mon, Jan 11, 2021 at 08:03:29PM +0100, Andrey Konovalov wrote: > > 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). > > CONFIG_KASAN_STACK was not a user selectable symbol so it was always 1 > for GCC. Ah, indeed. Thanks for the clarification! 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 810D7C433DB for ; Mon, 11 Jan 2021 19:30:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4019022473 for ; Mon, 11 Jan 2021 19:30:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4019022473 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=srAgfLFT8jdtjdZ7YW5dG8qW//HKd0qYhQbDvGYjImo=; b=FsYZWkuGngMQlJL7N0mxDgTw7 gc1pgPymEVENLSmchOP6SXdOT1ttT1vLMgzW/2rDJC8RY/G2+FsZy5qHHDpmnV6RjH8ZMatCMc8+b OhFrpOml/cgE/OuDPL1VVV+wKfPzjVBBbQ15tofGbk8Zbe5h7A1wygoIaCzJ9nHUc1bNkU80czD43 ARg+kGcmLgyYikFp4jLfx0aou5faCLt2OLu1kr1BJsA1loVBxGVqC8cjMVPS+C42S/V+DmpTD1raa Wm3IJU0fKLAAFKkY8Y5aFRzXhKHpIzMB4lY7T8TgFryVVgjZwYu9kXk7w7rAtaJdOrSkYYm/oGUMu J2lj2frzA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz2to-0002Ak-Kf; Mon, 11 Jan 2021 19:30:44 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz2tl-00028f-Tx for linux-mediatek@lists.infradead.org; Mon, 11 Jan 2021 19:30:42 +0000 Received: by mail-pg1-x533.google.com with SMTP id p18so301111pgm.11 for ; Mon, 11 Jan 2021 11:30: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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=ax0g20+io9+hknWBPpMxAQv86e3BV9BnGMFgIqXJ9pFv1sGGayp8i3795ZIxSkMX8w sbhmLQZbNam8/SGqG8EAQzIj2k55phmPp6LF3oUCv0Ys+SZvKDJPdZpq7/YAVAXY8s62 c+LidHl99KI5JXqsljDZrcrpJPEMVXH4vAL6MtI56FSRor4vCDSD3vv0bg3IWq5cVANZ GLDHUEO3zwD0hgxSKUdlCf1dsNIbmaiekqEHoyzlSXmDfWpvhMESBCOXOTlLrxsfjlJv Y8Y43ATIACr24S3GqGb6p3pg5RaYkhN0eHtAvg/DD7XAGQCRN6gUP267twpShI2WGMvP QX6g== 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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=M0ujGaoXX4TXq96Dute0Pw4Yh52NYrJRtGxcKs/ffrb76zt4me+fBLa5GFypEbfG7Z No6igN/+VnGkf6CyPC4SjIqmGNXkgQvJh28yLLvI2qHRahbJSlczPN31Fh5jhaequE9e B3tX9CnmqJFV/9cZbmU/W+vUIVFl3L9l847+u1g3TSNX3WMV+BMdU/CMVPqBOpQtUwZ+ bifhMi4ivMl4J8V4KC3OCmoox01gHtXv/e8Lvroz98sWT7N7jxBXjhRCiVIPJK3vymS0 qDn2Fqan/LfzLPHgWi7OALfNKTBQm7QVR19K6rqb3shYV4jsnLwZuvPxUbJrCLqesj+M Uwfg== X-Gm-Message-State: AOAM533n7oqoK5xiP8Y2UhZZQdNRkkVjwNTrQeUBMuZ8DC/4ndZLSAcx m9huV1K6nxMnnHPi8S27+E3pPVjnH0OFEB0WGWfFhQ== X-Google-Smtp-Source: ABdhPJxfnVekwDDs7W26tTKMU0LtLEZSR7eufar20rcVzDPc4DtJT/9lOoaOHA5Sf6AozuXRQZaWL4OnIHnX0NlzO/4= X-Received: by 2002:a62:e309:0:b029:1ae:5b4a:3199 with SMTP id g9-20020a62e3090000b02901ae5b4a3199mr927134pfh.24.1610393439604; Mon, 11 Jan 2021 11:30:39 -0800 (PST) MIME-Version: 1.0 References: <20210108040940.1138-1-walter-zh.wu@mediatek.com> <20210111185902.GA2112090@ubuntu-m3-large-x86> <20210111191154.GA2941328@ubuntu-m3-large-x86> In-Reply-To: <20210111191154.GA2941328@ubuntu-m3-large-x86> From: Andrey Konovalov Date: Mon, 11 Jan 2021 20:30:28 +0100 Message-ID: Subject: Re: [PATCH v3] kasan: remove redundant config option To: Nathan Chancellor X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_143042_005318_46F2C8E7 X-CRM114-Status: GOOD ( 20.74 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Walter Wu , wsd_upstream , "moderated list:ARM/Mediatek SoC..." , LKML , kasan-dev , Linux Memory Management List , Alexander Potapenko , Linux ARM , Andrey Ryabinin , Andrew Morton , Dmitry Vyukov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Mon, Jan 11, 2021 at 8:11 PM Nathan Chancellor wrote: > > On Mon, Jan 11, 2021 at 08:03:29PM +0100, Andrey Konovalov wrote: > > 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). > > CONFIG_KASAN_STACK was not a user selectable symbol so it was always 1 > for GCC. Ah, indeed. Thanks for the clarification! _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 77340C433E0 for ; Mon, 11 Jan 2021 19:32:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23FA222CAD for ; Mon, 11 Jan 2021 19:32:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23FA222CAD Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3BnbvjEot0aJVN2ZxMMrvc0u2CdVr7y3ZSwVxz4Nzqc=; b=HFchKoBGjzUrNokwtZxwSBGm7 cbj+83hSjZ6mjmdMyAeMtsk4OBnV+uc0yYdoeWp1/jRCUMazyQmsOotz0OUZIUaEvFuv6Pj2WR/wF fxVm6StVSaIOtcCyeWZp677eUoRIGN8XA6pADJ/fQqBT3sbEHjafcPy1BhKDYB5qX50VkdKz0yiDJ VBQwl38JyCjLoIxJXd7xCFoSj80SmhKvflmJvcpFXkW5iWx2seg6jshdQtyH+SNPcWinoIgrgFuD0 qQ71L7MBujd0svkjzNphveIR9X1hfTVrdtDNp3XES18OjpkxzjQbDLm9ou3Fhvc+linbczxVdNjnF NuGEVE2mw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz2tq-0002B2-Tr; Mon, 11 Jan 2021 19:30:46 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz2tm-00028d-95 for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2021 19:30:43 +0000 Received: by mail-pf1-x436.google.com with SMTP id w2so525497pfc.13 for ; Mon, 11 Jan 2021 11:30: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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=ax0g20+io9+hknWBPpMxAQv86e3BV9BnGMFgIqXJ9pFv1sGGayp8i3795ZIxSkMX8w sbhmLQZbNam8/SGqG8EAQzIj2k55phmPp6LF3oUCv0Ys+SZvKDJPdZpq7/YAVAXY8s62 c+LidHl99KI5JXqsljDZrcrpJPEMVXH4vAL6MtI56FSRor4vCDSD3vv0bg3IWq5cVANZ GLDHUEO3zwD0hgxSKUdlCf1dsNIbmaiekqEHoyzlSXmDfWpvhMESBCOXOTlLrxsfjlJv Y8Y43ATIACr24S3GqGb6p3pg5RaYkhN0eHtAvg/DD7XAGQCRN6gUP267twpShI2WGMvP QX6g== 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=qo2fQAXd+OsMiLPHSUfSpNVkpbDbRR3kE8tJYakNl9E=; b=NZoBYg50XHyapoKnp7bBfjMfOYDnTNmvjvdTZFGurlAKwqyzfkQw8KGhvioJGdhe71 qa4PBuCouC7YN1Th0Smz2ehZCvY8P0Khq5KIWqn+eUvmoohB7HMVcBOM38WwfLOA8mzg vDolj2wWsW5v5YV68ZmXQkRmWK/bhnN/Z78vrzpegNnfLQYl+EIQbFMhsyl23aHG6/qJ +KDmw9GwYHKnENggjqaBW+oqqeWC0vHiOgv4rfLhDLns2SR647Kmbl9z5nnuoYTw2b/W lIr2A0pUbuXOYnP5NahFBGzcNyfXO4GMIdbVRzjVZdzRTstY3mcpXwRM3ia3jIQqykYr gQjQ== X-Gm-Message-State: AOAM5305FLxjGAdrecS4+ScgcEM1Aanv9H290KWn8VwZJkKXmCRhvfBo QxVz3jFn/ByrGyRbwgMmmiCaktcqyG5P7eSexSh3oQ== X-Google-Smtp-Source: ABdhPJxfnVekwDDs7W26tTKMU0LtLEZSR7eufar20rcVzDPc4DtJT/9lOoaOHA5Sf6AozuXRQZaWL4OnIHnX0NlzO/4= X-Received: by 2002:a62:e309:0:b029:1ae:5b4a:3199 with SMTP id g9-20020a62e3090000b02901ae5b4a3199mr927134pfh.24.1610393439604; Mon, 11 Jan 2021 11:30:39 -0800 (PST) MIME-Version: 1.0 References: <20210108040940.1138-1-walter-zh.wu@mediatek.com> <20210111185902.GA2112090@ubuntu-m3-large-x86> <20210111191154.GA2941328@ubuntu-m3-large-x86> In-Reply-To: <20210111191154.GA2941328@ubuntu-m3-large-x86> From: Andrey Konovalov Date: Mon, 11 Jan 2021 20:30:28 +0100 Message-ID: Subject: Re: [PATCH v3] kasan: remove redundant config option To: Nathan Chancellor X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_143042_361654_416BCB3F X-CRM114-Status: GOOD ( 22.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Walter Wu , wsd_upstream , "moderated list:ARM/Mediatek SoC..." , LKML , kasan-dev , Linux Memory Management List , Alexander Potapenko , Linux ARM , Andrey Ryabinin , Andrew Morton , Dmitry Vyukov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 11, 2021 at 8:11 PM Nathan Chancellor wrote: > > On Mon, Jan 11, 2021 at 08:03:29PM +0100, Andrey Konovalov wrote: > > 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). > > CONFIG_KASAN_STACK was not a user selectable symbol so it was always 1 > for GCC. Ah, indeed. Thanks for the clarification! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel