Received: by 10.223.185.116 with SMTP id b49csp3347393wrg; Tue, 13 Feb 2018 00:57:41 -0800 (PST) X-Google-Smtp-Source: AH8x226HCJIkP67QrCqyC3dk2bc7bn2m5LBorZgmHvmqNpBMBxgURcEZO/TkmVVaWjpOnhL6QYEZ X-Received: by 10.98.163.15 with SMTP id s15mr533071pfe.67.1518512261118; Tue, 13 Feb 2018 00:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518512261; cv=none; d=google.com; s=arc-20160816; b=GMpWsZs/aD2L4KKCDYlxHoPZcVYGd4udZSmIDVAhxu5Tdjxzsm8i/KxdKZvFPVKvwg ul3ti0YWBpf+xQnxPv2npxHaZTgq3zbZ//86CuROHt0lU6Y5qLHkmkTTPPEkTLfb0uoJ ZKcmfgBRyUNUqlmQHK2jKz7Y3qJ1UJGm7391m8RrEHblpoaq2Vf2WR/BX/1JQRNdrtNa tqLFVFY5ERuKMfwb4WrovY7rxcZ1sDWPUoReu1XTsS3SsX18z5xxgLJms88XraB7Uk31 YJEtXyToqWrMhRDrmXNEfuJzOeTvqS+GYhQ7hdwkEqUUswjd+LmsaYRrc1Hkx2FM/y/w vtJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=C4J1weRpWcEftjdY3A6w/Eb22FdJy5wAgDh8DJ0lw7I=; b=dKpUcvqATGVS4CvmQnRzAp3WDuztp/ckG+8c3WyQzQdnb5OAMDU5NYvl1EQbKSK2o2 +Dri+zG1madZg0EdZn/njgTa6/a0Qtt9EO4SgFBlXU0zEdlANRU4rNdCU6XyzW/wB6AI tKc78/NmFlcO91HvU+mCCTfFUdkcU9fqbMfCkeFqvgfEi7xVU6NlIH5dTKjLR3tr7C4M tBOnW0NuLFh+wSIHa4pKJ5iBJ8UVQ6gn/DEOG6fWD8R4H29ggZ+auu9/SL3uRZyplW07 +/IuQ+06wQlVCXCzznHuCb3AkYeqDNfmt8i9xNqXs/4uEwwmkGzaY7yP7vyLJJKzhh6e i5HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yxv8112D; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si804904pga.146.2018.02.13.00.57.25; Tue, 13 Feb 2018 00:57:41 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=Yxv8112D; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933843AbeBMIzp (ORCPT + 99 others); Tue, 13 Feb 2018 03:55:45 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:45797 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933717AbeBMIzm (ORCPT ); Tue, 13 Feb 2018 03:55:42 -0500 Received: by mail-lf0-f45.google.com with SMTP id x196so24034257lfd.12; Tue, 13 Feb 2018 00:55:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=C4J1weRpWcEftjdY3A6w/Eb22FdJy5wAgDh8DJ0lw7I=; b=Yxv8112DnK8tzWIXCGMDn8YdvHtJd/cvDZWo/wNgMGgU7+IMst8wMH0MGE8Ah9BCrZ BVXXlcs+dQL2xb4QIOItIE3j9itqHJXnZm/Ql2vnVPZOYL38kfBxwYEE14Zj7j/okAqp HE52nWhQz3cCmB/XgXuFjrmHzw2pCZLYJ9u+KzPMZTD0oJ/iVwEPYWwCflxQg081zjZa C6d91cS/g/Y556B7GbIpjkMklll0ocWQJgkP8gRqXuV8oiatoSRY4OQ3AuoMiqI7sQ+K HWKrqTPazAlepYLS0Ze6FY+BhOWsDlICLn2joRmJzjLns0vnie//Ilf/vMogqlXEjPxA flQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=C4J1weRpWcEftjdY3A6w/Eb22FdJy5wAgDh8DJ0lw7I=; b=Vp78RSUTpAmBX4NVVjliuvslRF7XbRrRbwgj1lv3UrQjJQLbPtyg4TTGANW9EB5X/T yJtSNh9b2FZCdoeCWvq1wYD3eLldc7gBCqua5XVwMZL7dTAwtS90SngvQyC4qttO2YCB Y9eTst+Fs21v2VDQf6K+5z5hxgZxDUDKbNRjvLsqYZOMsBdKwTcYeNJeHsHRn4zaDm/P cmkux4PlKLljYVHdUz/7sba4/GUY531O5itDox2WKH5HNZafLlDLYYnQBvvpVLHwt87E P7s+iK2vWUnLsabHCzK2hiBqUk0ku1v8CqfxQHo+mo9VxoUVH3NvVGvJHKrr/tiEXkJL AJZQ== X-Gm-Message-State: APf1xPCSOyF5rMVbEaB54aVh3Gwlprzm2XBBNxR0Go7x6gmdPaT1QmPS znRJL/aupCqzWJXrLRgiztU= X-Received: by 10.46.82.211 with SMTP id n80mr380897lje.145.1518512140588; Tue, 13 Feb 2018 00:55:40 -0800 (PST) Received: from huvuddator (ua-213-113-106-221.cust.bredbandsbolaget.se. [213.113.106.221]) by smtp.gmail.com with ESMTPSA id l3sm1958608lja.24.2018.02.13.00.55.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2018 00:55:39 -0800 (PST) Date: Tue, 13 Feb 2018 09:55:37 +0100 From: Ulf Magnusson To: Masahiro Yamada Cc: Kees Cook , Linus Torvalds , Linux Kbuild mailing list , Greg Kroah-Hartman , Andrew Morton , Nicolas Pitre , "Luis R . Rodriguez" , Randy Dunlap , Sam Ravnborg , Michal Marek , Martin Schwidefsky , Pavel Machek , linux-s390 , Jiri Kosina , Linux Kernel Mailing List , Tejun Heo , Ingo Molnar , "Van De Ven, Arjan" Subject: Re: [RFC PATCH 4/7] kconfig: support new special property shell= Message-ID: <20180213085537.dj7w2hqdxucjpzl2@huvuddator> References: <20180210085519.737ckf4bcl57h4g2@huvuddator> <20180211103432.pf2ot6nd7nbhdhsy@huvuddator> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 13, 2018 at 01:10:34AM +0900, Masahiro Yamada wrote: > 2018-02-13 0:46 GMT+09:00 Kees Cook : > > On Mon, Feb 12, 2018 at 2:44 AM, Masahiro Yamada > > wrote: > >> Linus said: > >> > >>> But yes, I also reacted to your earlier " It can't silently rewrite it > >>> to _REGULAR because the compiler support for _STRONG regressed." > >>> Because it damn well can. If the compiler doesn't support > >>> -fstack-protector-strong, we can just fall back on -fstack-protector. > >>> Silently. No extra crazy complex logic for that either. > >> > >> > >> If I understood his comment correctly, > >> we do not need either WANT_* or _AUTO. > >> > >> > >> Kees' comment: > >> > >>> In the stack-protector case, this becomes quite important, since the > >>> goal is to record the user's selection regardless of compiler > >>> capability. For example, if someone selects _REGULAR, it shouldn't > >>> "upgrade" to _STRONG. (Similarly for _NONE.) > >> > >> No. Kconfig will not do this silently. > >> > >> "make oldconfig" (or "make silentoldconfig" as well) > >> always ask users about new symbols. > > > > The case I want to make sure can never happen is to have a config > > setting that ends up not actually being true. For example, if > > CONFIG_CC_STACKPROTECTOR appears in /proc/config.gz but the kernel > > wasn't actually built with a stack protector, that's bad. We end up in > > a place where the user can't trust the config to represent the actual > > results of the build. > > > > So, as long as the Kconfig options are strongly tied to the compiler > > capabilities, we're good on that front. > > > >> So, I can suggest to remove _REGULAR and _NONE. > >> > >> We have just two bool options, like follows. > >> > >> ------------------->8----------------- > >> config CC_STACKPROTECTOR > >> bool "Use stack protector" > >> depends on CC_HAS_STACKPROTECTOR > >> > >> config CC_STACKPROTECTOR_STRONG > >> bool "Use strong strong stack protector" > >> depends on CC_STACKPROTECTOR > >> depends on CC_HAS_STACKPROTECTOR_STRONG > >> -------------------->8------------------ > >> > >> This will work well for all{yes,mod,no}config. > > > > This two-option arrangement is fine (though it assumes there won't be > > another stack protector option in the future). > > > > The issue I have is this removes _AUTO, which I think can be solved in > > the two-option arrangement too. The purpose of _AUTO is to effectively > > enable stack-protector by default. As this option has been available > > for over 10 years, and all distros enable it, it's an obvious > > candidate to be enabled-by-default, especially since it kills a class > > of exploits (as mentioned in my commit log: BlueBorne was trivially > > defeated with stack-protector). So it should be possible to make these > > two options "default y", yes? > > > Yes. > > Both should be "default y" to keep the equivalent behavior > since the current default is _AUTO. > Since the discussions in this thread are going in a million different directions and making my head hurt, ping me if I'm needed re. the WANT_* stuff or anything else. Masahiro's two-symbol version is much simpler and neater if the caveats re. "fallback" are minor enough to not matter. :) Cheers, Ulf