From patchwork Thu Apr 11 18:01:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10896565 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 8E1611515 for ; Thu, 11 Apr 2019 18:01:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8166028D22 for ; Thu, 11 Apr 2019 18:01:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 750D428D7F; Thu, 11 Apr 2019 18:01:41 +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 AAE0F28D22 for ; Thu, 11 Apr 2019 18:01:40 +0000 (UTC) Received: (qmail 11400 invoked by uid 550); 11 Apr 2019 18:01:39 -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 11378 invoked from network); 11 Apr 2019 18:01:38 -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=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=P29j/A173jumr9TS2YpuYiIxNkiEIN8tLsiDUkE9fh9sg7MCh3VUD8pNos5YKZNyfP YAvXmP0QT58yqXBRoyxQ/wSYRySh4+pqAwdeUhtKl1sYV3UNKDB+2xO8gft6l/CqUfV/ cjm2IyDzUNT3xjRLN9iVNJ46YpOg50OVmvLOpA8TZo4iyq/Sept3f6aGg1PXtqvg8Nka n10M+WkvVAljJWt+0uNgHAAh65U6YiUdaAFqAsaAUTzCiJNxd29CAXPTGbjdlQ2n/GXY MEu0uvBM+OYBYVt13sDNrAM3tPI1lH2lQFFo/E6u0gpj0hqdSzobfAE4GUaSK6XQAZIm nm6g== X-Gm-Message-State: APjAAAXasYz97ZxwxtULc5GsVcmB6Z0Id3M0NQeTaACn15yTiEPjw4Ca u5dhBquGUpAu6D1IEOThbFPTSw== 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) 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 X-Virus-Scanned: ClamAV using ClamSMTP 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