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=-17.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 B456DC433F5 for ; Wed, 15 Sep 2021 07:50:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93DC361216 for ; Wed, 15 Sep 2021 07:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231728AbhIOHvm (ORCPT ); Wed, 15 Sep 2021 03:51:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:44726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231591AbhIOHvl (ORCPT ); Wed, 15 Sep 2021 03:51:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADF2D60FC0; Wed, 15 Sep 2021 07:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631692222; bh=rOV6VdXOkJfIxOZPAprG0bTwTgNrwNK0GLwnyoOsXsw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CosvF/2mEpaBVAjk53vkw4rFZiBvUkNPDmFsfVfB8AfAS5yKMJtJV7Y0n9VW7nXSW UvG1NsbzUEVdWxb/8+mUtvh2ifCubaNGGvEYAUm08wx36HbFK088m8v+2hra9wu2jh sWoZW8Jj4vByrYnQTEiu1EQ1Y2ZR7IR3AbV7vvpaY/iknKCt+E26mYv1aHOG627H5M xjE6Tql5nC5Ewy5IST3yo3/SRyx4pEgwAnAHgk0MW5MD4+50RRRk1RBjEFLW90V2ld ohXEW9BtfzBlPBGqAa2MMXpaaSEYtPTUvU40gQ7po2aPVi681FStvYPDlvnLWk0x/p 1TjIrJPBhXsiA== Date: Wed, 15 Sep 2021 08:50:17 +0100 From: Will Deacon To: Kees Cook Cc: Greg Kroah-Hartman , Masahiro Yamada , llvm@lists.linux.dev, Nick Desaulniers , Nathan Chancellor , "Gustavo A. R. Silva" , Michal Marek , James Morris , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-security-module@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZERO Message-ID: <20210915075011.GA7321@willie-the-truck> References: <20210914200203.1667751-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914200203.1667751-1-keescook@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org On Tue, Sep 14, 2021 at 01:02:03PM -0700, Kees Cook wrote: > Currently under Clang, CC_HAS_AUTO_VAR_INIT_ZERO requires an extra > -enable flag compared to CC_HAS_AUTO_VAR_INIT_PATTERN. GCC does not, > and will happily ignore the Clang-specific flag. However, its presence > on the command-line is both cumbersome and confusing. Due to GCC's > tolerant behavior, though, we can continue to use a single Kconfig > cc-option test for the feature on both compilers, but then drop the > Clang-specific option in the Makefile. > > Cc: Greg Kroah-Hartman > Cc: Masahiro Yamada > Cc: llvm@lists.linux.dev > Fixes: dcb7c0b9461c ("hardening: Clarify Kconfig text for auto-var-init") > Suggested-by: Will Deacon > Link: https://lore.kernel.org/lkml/20210914102837.6172-1-will@kernel.org/ > Reviewed-by: Nick Desaulniers > Reviewed-by: Nathan Chancellor > Signed-off-by: Kees Cook > --- > Makefile | 6 +++--- > security/Kconfig.hardening | 5 ++++- > 2 files changed, 7 insertions(+), 4 deletions(-) Acked-by: Will Deacon Cheers for sorting this out! Will