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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,USER_AGENT_GIT 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 E44D1C10F13 for ; Thu, 11 Apr 2019 18:01:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B708320850 for ; Thu, 11 Apr 2019 18:01:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DEWG5Ord" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbfDKSB1 (ORCPT ); Thu, 11 Apr 2019 14:01:27 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44911 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726577AbfDKSB0 (ORCPT ); Thu, 11 Apr 2019 14:01:26 -0400 Received: by mail-pf1-f193.google.com with SMTP id y13so3810999pfm.11 for ; Thu, 11 Apr 2019 11:01:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=LnXY2JQ+AvT2TeKIyUF3DHjJXBSRjqaNrPZu85aDqX4=; b=DEWG5OrdS7RnpwpCQdS8YfVJrZd6LZ/hLP5o2cAEJFMNg77rhhRSIF99CALXU0t4Nw b61UA/0mK5HXbDxjxt7jndpUYbmVs1gGAk/DbGgrivMNtpbgX6uuvLvpnp4m/5ro2mol lW4mnnZ2qu9RJ5/EAW4wqLEAhFw4CNdzaeq8s= 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=LnXY2JQ+AvT2TeKIyUF3DHjJXBSRjqaNrPZu85aDqX4=; b=F1ki3JSkGSTImjFC1Nzytp2kgQ2qzON718OooIRqM6xXZvXdBwBXC6oE0DnUdDItso oF4622fSx1JDd2HgGb5xgyISrOj5DXwnX29T3kwPAOIcQ/BpDXQ6XpQcKRnnH3GAiMgw /1gh3tfjD7WrJhgG8KcNFO+EECjck9FcNJR8Amcjkc+iqR4GlYCKY9tKWjnX0buzgBOE TUpEqtue6cUBGR8yzQinhO+IVVxG2qWaKL3ZqXpR4V5c0XwDQO33zp0ATQIwzcobxVdE yf1EUQVbsSd94MMl4c0FVDID4Rl2jSQmqt/QIVjanicFmg2DlhzdMPcUVECxtJ7x2Bbe nhKg== X-Gm-Message-State: APjAAAWJXsA1sinasNwE6wcXOm+hpMru+AEV092dbZoK2jFgjdhmuGe7 57vnvhqCaGQUJY1Gx736dIlugA== X-Google-Smtp-Source: APXvYqzlUv4V4sPs10niFMNU7nfZb2ZRwYswecBl5RhG/CFnIB5027ab+KFPG1dObeIJ7ZNBKSFhmQ== X-Received: by 2002:a63:1d26:: with SMTP id d38mr44965807pgd.357.1555005686261; Thu, 11 Apr 2019 11:01:26 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id v12sm52331660pfe.148.2019.04.11.11.01.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2019 11:01:25 -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@lists.openwall.com, linux-security-module@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] Refactor memory initialization hardening Date: Thu, 11 Apr 2019 11:01:14 -0700 Message-Id: <20190411180117.27704-1-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: This is a proposed alternative for the memory initialization series, which refactoring the existing gcc plugins into a separate Kconfig file and collects all the related options together with some more language to describe their differences. The last patch adds the Clang auto init option, as done by Alexander Potapenko. Since there isn't really a good way to "select" with dependencies, I've left out CONFIG_INIT_ALL_MEMORY for the moment... 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 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 | 125 ++------------------------- security/Kconfig | 2 + security/Kconfig.hardening | 163 ++++++++++++++++++++++++++++++++++++ 4 files changed, 177 insertions(+), 118 deletions(-) create mode 100644 security/Kconfig.hardening -- 2.17.1