From patchwork Tue Apr 23 19:49:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10913695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB9801515 for ; Tue, 23 Apr 2019 19:49:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DD7F1FFDB for ; Tue, 23 Apr 2019 19:49:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DB9F2853A; Tue, 23 Apr 2019 19:49:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id A83B5285BD for ; Tue, 23 Apr 2019 19:49:48 +0000 (UTC) Received: (qmail 13548 invoked by uid 550); 23 Apr 2019 19:49:43 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 13523 invoked from network); 23 Apr 2019 19:49:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=JqAaK9I/spSaCaSg32F1HZpvpilgyAJuQuVGnfyCAUk=; b=JBKWk1tRiUbt/drJcZZK+fxAj/IFkPWCj8FaR1MO9kt0dOXEQzv6257cr/0W9JMMdu JgYJExvus7KrzfCeodCF129yTnA+C3n/iSQbYhzEwqaSTvTwg1EzYTxsTpUy2LGhWOPs zjEq/6qOTqLP9VHwdInOLb80Q8vNTRH8aWKis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JqAaK9I/spSaCaSg32F1HZpvpilgyAJuQuVGnfyCAUk=; b=oB4qaKHcJ93EFwZFACMrlbLBiRbU62H6sboaiRPkKEaIPcFzgkVvLdJ2SnR6qPGmzg ozrAHjcBlRXIZNLVAshjYKIsqhGBzmyLDHAqfX1eDYY64efP/b5dKWnTumOJfVf9rn7u nL/vZXKIbgeMXUc0i5sV2YQl/0sYARbrt39oJx34AEM/2FXLtuJkTFwESMYTbvrXsRtf a0bu+ZBPjvzT9AlLEo/wQZlCn3j6jZiKSSYXgFKExf2hXPNU1x07dXbZGfunN+thkcra 7CdzRKkw9tGwYieZOA0ZS26Duhg7TO5sD7E5wjbUj9we10YIhc0zzuqKf20Hc/LrXtyo Z2ng== X-Gm-Message-State: APjAAAUPGj1KMzMyfZ1/s9yvdCfyVG2W4sPcg8oTKV2QqjJ7YNlUxukZ Yr1tAiuwo7+1peZHti+CVGmHVA== X-Google-Smtp-Source: APXvYqyHP29unDWinUcnH+Ag9bS8LYObT2ApmXeIFunfZPXS4hb87Bbahe9vbDP2ng987BuDqNPVDg== X-Received: by 2002:a17:902:7883:: with SMTP id q3mr27909874pll.60.1556048970907; Tue, 23 Apr 2019 12:49:30 -0700 (PDT) From: Kees Cook To: Alexander Potapenko Cc: Kees Cook , Masahiro Yamada , James Morris , Alexander Popov , Nick Desaulniers , Kostya Serebryany , Dmitry Vyukov , Sandeep Patil , Laura Abbott , Randy Dunlap , Michal Marek , Emese Revfy , "Serge E. Hallyn" , Kernel Hardening , linux-security-module , Linux Kbuild mailing list , Linux Kernel Mailing List Subject: [PATCH v3 0/3] Refactor memory initialization hardening Date: Tue, 23 Apr 2019 12:49:22 -0700 Message-Id: <20190423194925.32151-1-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP This refactors the stack memory initialization configs in order to keep things together when adding Clang stack initialization, and in preparation for future heap memory initialization configs. I intend to carry this in the gcc-plugins tree, but I'd really like to get Acks from Masahiro (Kconfig changes, Makefile change), and from James (adding the new Kconfig.hardening to security/Kconfig). Thanks! -Kees v3: - clean up menu/if with a merged "depends on" (masahiro) - add CONFIG_COMPILE_TEST defaults (masahiro) v2: - add plugin menu (masahiro) - adjust patch subject prefixes (masahiro) - drop redundent "depends" (masahiro) - fixed early use of CC_HAS_AUTO_VAR_INIT (masahiro) - dropped default-enabled for STACK_INIT_ALL (masahiro) Kees Cook (3): security: Create "kernel hardening" config area security: Move stackleak config to Kconfig.hardening security: Implement Clang's stack initialization Makefile | 5 ++ scripts/gcc-plugins/Kconfig | 126 ++------------------------- security/Kconfig | 2 + security/Kconfig.hardening | 164 ++++++++++++++++++++++++++++++++++++ 4 files changed, 177 insertions(+), 120 deletions(-) create mode 100644 security/Kconfig.hardening Acked-by: Masahiro Yamada