Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3978338yba; Tue, 23 Apr 2019 12:51:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRTgFIM1ODCfHIzEpAKgAvDKWmKOcd4TRvo6/O/8f0bXEJX9K7dCKUcVOPjRai/PGR9fIK X-Received: by 2002:aa7:820c:: with SMTP id k12mr28784209pfi.177.1556049116398; Tue, 23 Apr 2019 12:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556049116; cv=none; d=google.com; s=arc-20160816; b=u3h9uSkLI3WCPkh9q0S6TJ7j4axTIm34xn4a/XV/KmxO+pynAZZRwpxIfiKjBiyupy vR0h6abZyXCqSL8xwM95UsqMgthSqR+nMTeDRzpISqimHPcKvUJVek4j3ZQq7l8hEzdK CFnE7uReYcEZ65yifKGLlPgk6/dr9SoqBK9aE7FnL/B2KJRdjAs0QjfdNTs4q9kVz2Aa msxaWBWk+LnKwBhTIAVc40KzxPLz3LVrj6MePwwoyH6+QPtCbz5FlhNVHcPClhv5X1fo tjKRM0uSXZD/J9zYtHpTuaW13h14SH6tlohzxBXYn6IEeUwcUKN7n1IWzkqdDhTB95iK UZ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=JqAaK9I/spSaCaSg32F1HZpvpilgyAJuQuVGnfyCAUk=; b=P4z8o0EfSCE/8TRi+qVGWraS4xSImDE7TPpUe5z3jjpoGpJ9tYxDby/IVYGl7BxWKx WUuwDLX1EdIs8weQFMwp7uxi4I+IZErwRreB/+k3yaPXf6Jghd0HZ7ixgum6cV4DwETQ fg7zoFcJW28v2nr5OShzVEeVioBq3KDT7dYmH4F5teQWSLWW3rqWPyfk+WdGHxm8R6ew RyBJqU+ixrl42+0iOGmVazuFlAgsRrqjmmaby2BBznzvAjY3BB8OhhZH/Mc/iIhv7Dv7 bcvB04A8VFJejxbWOumVZWPR185O/BmMvG5dt89jHTVfcSHK5vNx+spPrLxyYTb8GSVf nG5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JBKWk1tR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o65si3770980pga.106.2019.04.23.12.51.40; Tue, 23 Apr 2019 12:51:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=JBKWk1tR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726790AbfDWTtc (ORCPT + 99 others); Tue, 23 Apr 2019 15:49:32 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:46693 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbfDWTtb (ORCPT ); Tue, 23 Apr 2019 15:49:31 -0400 Received: by mail-pl1-f193.google.com with SMTP id o7so5786232pll.13 for ; Tue, 23 Apr 2019 12:49:31 -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=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=nj8nQoIKTDAAuf45rRHR1vEDrRlY4G6luJbroW2/SXwSnS2tQotrS2r40fierLnFh6 qCCNalJ1onrIE28N5RQsfT3LmdKMjQnx8jTpccCOveFnhacSoMZFL/TiYlOVsheUxzr6 Fh+hi4sKBXR95J+IX5aB2NYxZsreH3sfwiuYtoQefbU5OLPDQpdo52lphEEhebJ/lMZF oMmIvdc2rPAeWPx5b1KGy7KAlo1GErRhN6xEf2rApjaTSZYPWf6A3b+PhS5MUNOTJTiV wArSoGfljtOQy1CIZqHq29f2wOXRLlyMfvmW8ljJh6M3H5EibqSxd1XmS6RI6anSJgop owGw== X-Gm-Message-State: APjAAAVxZq7rii74vm2Uk5VDJ4P7A46RB+cEUYliAUhJ4t+K/f4tM97a Qi42yqfXqv4EvO9ZShbY6GtMEw== X-Received: by 2002:a17:902:7883:: with SMTP id q3mr27909874pll.60.1556048970907; Tue, 23 Apr 2019 12:49:30 -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 17sm30947814pfw.65.2019.04.23.12.49.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Apr 2019 12:49:29 -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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.17.1