Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1152749rdb; Fri, 1 Dec 2023 08:16:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtihUmtbA0HmqAZAyNF3myNvXth8oylqezZINs+tXiakWCr4EckPFvNmxn8f44XztC4rB3 X-Received: by 2002:a05:6a21:33aa:b0:18b:ef96:be44 with SMTP id yy42-20020a056a2133aa00b0018bef96be44mr29385338pzb.26.1701447398433; Fri, 01 Dec 2023 08:16:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701447398; cv=none; d=google.com; s=arc-20160816; b=cS8OIlpoCKK29bhoo7610FoqGhWyCtALbuL4rRs4Vz34kDQoGRKwaFMjP/oo5mr2Tt cAoaKZEmT8G8Uxd0gEmk+Bi0NBKp6yCDszeZfUObOmPD+tIjtzc4hwKemd64IXZYVIQX AUNvOL7Cby0znn9WQo1rbuIHhW9U2UwoQw34aLCz7Esxnv2QymT+Ip0LFFtSYCBGpOlY SdaNFCeDXajjeokA+X1Gqu1aLLZD4SQDlVuCN+hwyuhaewwgiWw5LG2edpDF55PfNfU7 DZrchoUFo1nHrDDJxV/2etE+d0VOh/AJEQZ2k6lNkdfh/hwxnMHsuX2VH/iFVfD+QmLS nwog== 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=sPvI209V58mc48xoO3mwjTAg/Pzu3fL6RJXDN4f325M=; fh=GKTWQdtsTNcMx6J5Gq8P9YvHh7TJJnxHNtaIndOIzIU=; b=V9msbMA++0L/tIYQF1ZUG7InXY4RasPyuU2Q9dYEx/GJNC2Xy6ov+mamcNlafrndvo 7cCFoml/pNLTMTJ7m0lbJFea1L0bbqM6+jGnKAt6h6k0xbbywz/ZvlzmjbX2otabLWeH 6DYaEmkU/fuk7/Yvtl2meCyRfqgk3xEpLOZfaHIc/pMnzA1HIlTJKW4finLfbieKYFMS CUUl1KQ6aO3l41Xo6payoUWSqWdmGOhrSaHVaGP54ORntIKOczkP8tBJFV+fkHXSS8Kg U+rzjgCY/h7hxvCCd4K9f/s0Gu+xDLwfYBYmq/JfEXxD+qCJlhOFRm7+LAQLZeowfR8o ssWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jBA0AQLj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id be26-20020a056a001f1a00b00690f9e835d8si3619293pfb.132.2023.12.01.08.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 08:16:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jBA0AQLj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A35CC8183EE8; Fri, 1 Dec 2023 08:16:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378131AbjLAQQG (ORCPT + 99 others); Fri, 1 Dec 2023 11:16:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjLAQQF (ORCPT ); Fri, 1 Dec 2023 11:16:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79720199D for ; Fri, 1 Dec 2023 08:16:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF6B6C433C8; Fri, 1 Dec 2023 16:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701447372; bh=YlEMUCQH+3T1yvOEG3nI8rm7boerLN9aqXrhBnxcKaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jBA0AQLjW90sAkd+I+zzy5Ui9ZMQJsFQl2hMAoP2tXCT2NJJvPybtW8LbmZQAJ5Rc QbrNEvnZNGn3v2gkQVZChPZX7UFq92mQBFqZPk7S6H9RwOAYT5qBm1GsktW0WZl/4C GNrX6RWZUfwt++VmH4J68HGqEQoPTZVmuPgnhcAN0gaqNyb24akJ1pF0AaIOsNKjtS eoB7OSUkCcc72OhCJw1PstwrrwSnwG7vbIkHdzAHoAWVzN/jajMsG5sqJyrV8vTU1w udFfgGd4gopKCiLslwthuNmuSNAgOXmBtrxhs936Bg4myRNxNU/RVE63BbIPFjFc95 yHC0gzhqKGHdg== Date: Fri, 1 Dec 2023 09:16:10 -0700 From: Nathan Chancellor To: Borislav Petkov Cc: X86 ML , LKML Subject: Re: [RFC PATCH] x86/Kconfig: Disable KASLR on debug builds Message-ID: <20231201161610.GA2948377@dev-arch.thelio-3990X> References: <20231130120552.6735-1-bp@alien8.de> <20231130181051.GA3357088@dev-arch.thelio-3990X> <20231130193428.GNZWjjxKJ38Ruh7puz@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130193428.GNZWjjxKJ38Ruh7puz@fat_crate.local> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 01 Dec 2023 08:16:26 -0800 (PST) On Thu, Nov 30, 2023 at 08:34:28PM +0100, Borislav Petkov wrote: > On Thu, Nov 30, 2023 at 11:10:51AM -0700, Nathan Chancellor wrote: > > I know Peter pointed out that there is a runtime switch for this, which > > should make this patch obsolete but in case there is more reasons needed > > for why this might be a bad idea, > > Bad idea? Why? > > Because they'd have EXPERT enabled and thus disable KASLR by accident > this way? Right, this is the diff of Fedora's configuration before and after this change: diff --git a/.config.old b/.config index d5fe0c930725..d409b1738c0f 100644 --- a/.config.old +++ b/.config @@ -520,12 +520,8 @@ CONFIG_ARCH_SUPPORTS_CRASH_HOTPLUG=y CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y CONFIG_PHYSICAL_START=0x1000000 CONFIG_RELOCATABLE=y -CONFIG_RANDOMIZE_BASE=y -CONFIG_X86_NEED_RELOCS=y CONFIG_PHYSICAL_ALIGN=0x1000000 CONFIG_DYNAMIC_MEMORY_LAYOUT=y -CONFIG_RANDOMIZE_MEMORY=y -CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa CONFIG_ADDRESS_MASKING=y CONFIG_HOTPLUG_CPU=y # CONFIG_COMPAT_VDSO is not set