Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2187234pxb; Thu, 3 Feb 2022 00:56:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhaanmPPM5q5xtr9BgEInpgJ/KwIvc0ddTm+j+cvLsA2IqVfXp0Mej0b1vS5UOGheGJhZx X-Received: by 2002:a17:90b:17ca:: with SMTP id me10mr12597023pjb.189.1643878585086; Thu, 03 Feb 2022 00:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643878585; cv=none; d=google.com; s=arc-20160816; b=kET5Pkgs35JIkE5FrATz1y5JmabzayVw9oxIRmy2edE7fHrn8Egeg4EDusz/MIuqg7 vmdKosjTN6hAbucexS514p7lDqs7uTrgHtxzHI6GNi38xBFofjs8JxuSna0Q289Hwnoc 9Cqbmac7N2kAJfFpX87zqPHFXiuigfLNrtK2PqkTmMK9ZZfHV4PiAqgF7ULqM53u0MKo JmbNybME61M8Avbo9LFj5Smko2ScNAFK/xj0uFEfI+7ws4vA/LdazHAW1+oJyXbqSaiJ 2K7ZSyA2QnAtfR+ElZOffhYw8bEteFFtQWJMIusewNQwH22aPp6mlbbnSrM1lzB2OY/G zrFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UOz2viW0BElLS+TGumDBU674xDtw0fIIZshAd52tWL8=; b=tTw2k3hOSN1ZNNeBj1Ibv9DZ8Wcyrk+YIV5uhX1lddxBKC2mpoAyNkRMVbXPWBaAdu fgptjikdDyDADg84UPhTaX34XHfNId/OfHVcNNd0VZMcDCNKOougBrF7VHfDf1jdyUGu OQKD2JryfED68LiZerGTG/muPgpYVgqtUkH/5Ee9Fcz1OqnfjHdLmzJByUIP87P7Rslw wJMpHlodVLgu8BjXhEFElm106VAEzOhy9YA+pKf2+jDsB1gUcwXvc6r8HY0tE16AnNRT 4cYGDgYKAC+gl5MNCMI9R9V2TXIWCOQ7e0tzjhszt3DZVZYEBkhPO3DGT6IbBSkd4Pih EgQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cAjE6EEe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i10si24981138plr.231.2022.02.03.00.56.13; Thu, 03 Feb 2022 00:56:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cAjE6EEe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236499AbiBAKej (ORCPT + 99 others); Tue, 1 Feb 2022 05:34:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236363AbiBAKeh (ORCPT ); Tue, 1 Feb 2022 05:34:37 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B73C8C061714 for ; Tue, 1 Feb 2022 02:34:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=UOz2viW0BElLS+TGumDBU674xDtw0fIIZshAd52tWL8=; b=cAjE6EEetAKPQUBol/TtVXPulw 08Er2eRCrpxma2QIo9SCOucCehBGFepkEXVt71XUVdW5z1ep9esaa27U4ejHaDFPk0zwiNfgUJOsy xJB5Bt95AvLNehRAlc4fBNYy0SeTUNRve5/8LYc6ws1jnV6qIsPurgXVF5+trjM3m6X+79b5dM2yr AuQFeerlMjSK0nLe3CvG+XoynFDC54l6Y0gibnVPhYFKQ7DHTQLHgSifuqc01rGs5KiYqZ6gpJo3C SY/HvAkX/nJLyTsdNa/7XjF0s3H7H3PvkxuNM0Lc8k7z/u9pPBm/owRCKWKWKLk5JS+AR9esRKYHY WXhaqyVA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nEqUT-00C02S-3T; Tue, 01 Feb 2022 10:34:25 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 061D898623E; Tue, 1 Feb 2022 11:34:24 +0100 (CET) Date: Tue, 1 Feb 2022 11:34:23 +0100 From: Peter Zijlstra To: Marco Elver Cc: Thomas Gleixner , Kees Cook , Ingo Molnar , Elena Reshetova , Nathan Chancellor , Nick Desaulniers , Alexander Potapenko , llvm@lists.linux.dev, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] stack: Introduce CONFIG_RANDOMIZE_KSTACK_OFFSET Message-ID: <20220201103423.GT20638@worktop.programming.kicks-ass.net> References: <20220131090521.1947110-1-elver@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220131090521.1947110-1-elver@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 31, 2022 at 10:05:20AM +0100, Marco Elver wrote: > The randomize_kstack_offset feature is unconditionally compiled in when > the architecture supports it. > > To add constraints on compiler versions, we require a dedicated Kconfig > variable. Therefore, introduce RANDOMIZE_KSTACK_OFFSET. > > Furthermore, this option is now also configurable by EXPERT kernels: > while the feature is supposed to have zero performance overhead when > disabled, due to its use of static branches, there are few cases where > giving a distribution the option to disable the feature entirely makes > sense. For example, in very resource constrained environments, which > would never enable the feature to begin with, in which case the > additional kernel code size increase would be redundant. > > Signed-off-by: Marco Elver > Reviewed-by: Nathan Chancellor For both patches: Acked-by: Peter Zijlstra (Intel)