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=-3.7 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 2D11FC4742C for ; Mon, 16 Nov 2020 13:51:36 +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 9094B206B7 for ; Mon, 16 Nov 2020 13:51:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="He5yMiY6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="Qd0w7ayR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9094B206B7 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=CiG7RQUQhAzWiuppwAeEkInQGE7tUg45EmRYKU9+I1s=; b=He5yMiY6lwoxmXqlfQ4435mgL iqnVwknSq381znXv+kAADfgTA3Y1L8ZE744zWTD2BOVE4SSW5d1DyU7hObn5QvUjqg8G9HUnS9L+C yFQ3U5qUXHnZzNDW1lszm1dOkILDWwVpLUXGkJ2rf2ZiHLwCC8Pe50LAq1pond5gj21JsIiGd90jj TNHPHA/ojNgjWKW+fxB+23kWGjUqHxyw+e7A76hlJ2PGrn7NE2hv3re7abwwMpH8pRMWd2QYMcTzW aioxNIZAo74WSspxQVuIgX54ECmoOhi7/w34G6CTu/0+5jv2kPex2cC3TaO6lSt+maxuow91AJa7d 4QYtfCb/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keeuT-0003hZ-60; Mon, 16 Nov 2020 13:51:09 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keeuO-0003fz-FI for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 13:51:07 +0000 Received: by mail-pf1-x442.google.com with SMTP id q5so14180124pfk.6 for ; Mon, 16 Nov 2020 05:51:00 -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=Rn/GWbCehAJ+GBDtTEnmHyxU7fKIylPW3sz5YfB6oF4=; b=Qd0w7ayRM8p7I/3VxgXVb4Z+J477qPtHJvdhPbVFZ9XwhU7nk+YIXKJu4H/Ta0BwxF t9LBldP1K5XDosLSOw3/pnqneWKXcl2MAT7jJwhpfMGCFjCLG8nlIPEqNH5LXJzKdw4r hr8XIOrGSHOlI22td39a7HRCgRFjfUeDiIH734cDyKiZ68QevmkYAEuchyFDMAuLKEqZ EgO3AZ61AP3smMYLMHfqLFo23PKIeUJ90LOqKZx0qfAplIA9GMZ8oMr+8aX9VJiOh9PE bW5TpM7ui3z/vQ8pnShVeYdJ5P+56IgzT4D8odEtpOEZX5GImbBhIvwmx1hwaAFkFwc8 L4PA== 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=Rn/GWbCehAJ+GBDtTEnmHyxU7fKIylPW3sz5YfB6oF4=; b=gG3+LDlmWyHvsoyzOkQJQSdcy9mJJIXBDFXLAHlwFvbg5+VOIDnxfktEsQ/tzQTngq z/EefPLXDcNTlrwcitGCqk+xAE+W3H36hjsaHawJWUNnT7oO8R/NPIo/Bbb58A3JZ977 F2UsB/uJGix1U2PkgUiziNtsE0QsK2q3ajUyq++NXRHnoOzAJpUFiQ8/LJr0KUSMgjrO 6emhaCcV0wHuCgsPLh5UXx4dtRZHck6Z7x/xzKLscJHd3r5AshR3w7K8BSKXBrVIspS1 sNH5dstvi0Li/cg8Em5zHsrJwNedgEaf+zC850jxUApR3YxUfheumTC+irfsUXGaBezd DN6g== X-Gm-Message-State: AOAM530a8qv65eJXwmwoXf0SSkjeJgH+dGKgzRYVjT4qLP+siwUsPrHE ik6mfeA5pCfGzas8WYZ/7OmvsRwE+DbJUllMxK8hkg== X-Google-Smtp-Source: ABdhPJyvNgxXCuDbqJB50x51i5+dENxPWgpyPuR9VhmAxxqRwC1mORwFApTMW9UZQkgyp1z4DmVpwkJSoeiP2hglNho= X-Received: by 2002:a63:f20:: with SMTP id e32mr12949674pgl.130.1605534658700; Mon, 16 Nov 2020 05:50:58 -0800 (PST) MIME-Version: 1.0 References: <9d4156e6-ec4f-a742-a44e-f38bf7fa9ba9@arm.com> In-Reply-To: <9d4156e6-ec4f-a742-a44e-f38bf7fa9ba9@arm.com> From: Andrey Konovalov Date: Mon, 16 Nov 2020 14:50:47 +0100 Message-ID: Subject: Re: [PATCH RFC v2 04/21] kasan: unpoison stack only with CONFIG_KASAN_STACK To: Vincenzo Frascino , Dmitry Vyukov , Marco Elver , Catalin Marinas X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_085104_543807_3A108510 X-CRM114-Status: GOOD ( 18.14 ) 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: Branislav Rankov , Elena Petrova , Linux-MM , Kevin Brodsky , Will Deacon , LKML , kasan-dev , Kostya Serebryany , Alexander Potapenko , Linux ARM , Serban Constantinescu , Andrey Ryabinin , Andrew Morton , Peter Collingbourne , Evgenii Stepanov 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, Nov 16, 2020 at 1:42 PM Vincenzo Frascino wrote: > > >>>> > >>>> Not sure why we did this instead of the following, but okay. > >>>> > >>>> config KASAN_STACK > >>>> - int > >>>> - default 1 if KASAN_STACK_ENABLE || CC_IS_GCC > >>>> - default 0 > >>>> + bool > >>>> + default y if KASAN_STACK_ENABLE || CC_IS_GCC > >>>> + default n > >>> > >>> I wondered the same, but then looking at scripts/Makefile.kasan I > >>> think it's because we directly pass it to the compiler: > >>> ... > >>> $(call cc-param,asan-stack=$(CONFIG_KASAN_STACK)) \ > >>> ... > >> > >> Try this instead: > >> > >> $(call cc-param,asan-stack=$(if $(CONFIG_KASAN_STACK),1,0)) \ > > > > > > We could have just 1 config instead of 2 as well. > > For gcc we could do no prompt and default value y, and for clang -- > > prompt and default value n. I think it should do what we need. > > > > I agree with Catalin's proposal since it should simplify things. > > Nit: 'default n' is the default hence I do not think it should be required > explicitly. Fixing this sounds like a good idea, but perhaps not as a part of this series, to not overinflate it even further. I've filed a bug for this: https://bugzilla.kernel.org/show_bug.cgi?id=210221 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel