Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2616422rdb; Mon, 4 Dec 2023 02:42:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHx2r9Lu4MnfiGYPXBdVRFkt9zfIdJ2LPBHj09wC7VDohOLhJpYKsTZrE1dZEFPMnZqzHm X-Received: by 2002:a05:6358:60cc:b0:16b:9653:a40d with SMTP id i12-20020a05635860cc00b0016b9653a40dmr4104765rwi.13.1701686552010; Mon, 04 Dec 2023 02:42:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701686551; cv=none; d=google.com; s=arc-20160816; b=jxFLxXWl25sQNX/kElbrvW+Yq5tvjQ5PEaLvnaEY+Nhw/AGoOa9n0jkB2c6yzNv12n +khSU1AwQYlTiEsJvCGms09nVSHi7tebGiI+40mB7OmLIIFNVZfKKTqRgQIuvZM4pogU l+YFo+tl6BZUIu12J0gSoq0R8SBxSsr9RYVN/2kO5Jn1v4ZeNKT4YhexjYAqCQ5mlQQ7 cW8Yu4feo9MLs4tU5htAe6fdSiRLqvOJ2ccr3rUuB+O3DmR5mVgUPGhD8JCMM5u+CiNA rPmeTSjP3+FqV2b92yF80Gg5s4GrM7AXQImJInnNfkiOzHSqy3EQTunv0RzFUhJ7M8li Y1cw== 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; bh=rIdPRbeNJB2AgK9lsDZnO/5NNbh3yMK+MZCEKKVsLKc=; fh=8wcZyh0vHc4uwF7EB9IW1lbSLhBkNhH6PuC8RTxd/u4=; b=0QYbzKoyrkFqXWPP71DuvGZh2rM9hFZdjrjo4m0IoaMGRAopurTWU38DesH9wzzRC3 arFf5WqHR+cSe4W7Eqj+EVIJ7DL8/uFc7Y2mgda2jmL3p47ylHW5zo6A1lfW8zMbUZh3 Tpbk3X5/aS4+VvxHl+qSF5X7a7/1NW1LJwXZvhQ8WqlfAYeC5fl5JlRwVjB8jaQA13E2 u7jIFi/i76sfP3GzzcBx+jSqgpBYw05OS3NutbnFOyaOm2ObCCCw5w2N23CE6kqcRWBx kdMwotRJ0hPpEjpqwCW+B8heP/aKJFbRJ44ISQ6xv/vrYancPq9/gJ/6sOoXnxFKbaMM qMuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id w15-20020a63d74f000000b005bdbd683601si7857157pgi.57.2023.12.04.02.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 02:42:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 92BB0808EDD0; Mon, 4 Dec 2023 02:42:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235320AbjLDKmN (ORCPT + 99 others); Mon, 4 Dec 2023 05:42:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbjLDKmM (ORCPT ); Mon, 4 Dec 2023 05:42:12 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0A994D5 for ; Mon, 4 Dec 2023 02:42:19 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19597169C; Mon, 4 Dec 2023 02:43:06 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.44.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F087B3F6C4; Mon, 4 Dec 2023 02:42:17 -0800 (PST) Date: Mon, 4 Dec 2023 10:42:15 +0000 From: Mark Rutland To: Borislav Petkov Cc: Peter Zijlstra , X86 ML , LKML Subject: Re: [RFC PATCH] x86/Kconfig: Disable KASLR on debug builds Message-ID: References: <20231130120552.6735-1-bp@alien8.de> <20231130120831.GB20153@noisy.programming.kicks-ass.net> <20231130124909.GEZWiExTP4J1pjNxPq@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231130124909.GEZWiExTP4J1pjNxPq@fat_crate.local> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 fry.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 (fry.vger.email [0.0.0.0]); Mon, 04 Dec 2023 02:42:29 -0800 (PST) On Thu, Nov 30, 2023 at 01:49:09PM +0100, Borislav Petkov wrote: > On Thu, Nov 30, 2023 at 01:08:31PM +0100, Peter Zijlstra wrote: > > Works for me, but I have "nokaslr no_hash_pointers" on all my machines > > by now. It goes right along with "debug ignore_loglevel > > sysrq_always_enabled earlyprintk=serial,ttyS0,115200" :-) > > Bah, there's cmdline switches. Lemme add them to all my scripts starting > guests and grub too. Thanks for the hint! > > I guess we could still do the Kconfig dependency when we're on new > machines, without the scripts. > > Btw, I'm not the only one who's walked right into this one: > > config KCOV > bool "Code coverage for fuzzing" > > ... > > If RANDOMIZE_BASE is enabled, PC values will not be stable across > different machines and across reboots. If you need stable PC values, > disable RANDOMIZE_BASE. IIUC that's no longer necessary, and the Kconfig.debug wording is stale. That wording was introduced in March 2016 as part of the original KCOV support in commit: 5c9a8750a6409c63 ("kernel: add kcov code coverage") Later, in December 2016 we made KCOV adjust the address to remove the KASLR offset in commit: 4983f0ab7ffaad1e ("kcov: make kcov work properly with KASLR enabled") ... so I think that's been stale for ~7 years, and we just forgot to clean up the Kconfig.debug text. Mark.