Message ID | 20231204171807.3313022-1-mark.rutland@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2911828vqy; Mon, 4 Dec 2023 09:18:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaJWd+MMH6Z3KHJKLP53+WjgTG5owz58g8rcwU5dXmx0qQYnlJAQW/88Cx59tXl/GfyguQ X-Received: by 2002:a05:6a21:6da0:b0:18f:e1f:32ce with SMTP id wl32-20020a056a216da000b0018f0e1f32cemr5005894pzb.115.1701710335028; Mon, 04 Dec 2023 09:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701710335; cv=none; d=google.com; s=arc-20160816; b=W6CE3jUvTIzBzfqQN21Sogjik7CCnlKblx0Bs0GX+U07zsZ2+ylQCtTSPtXGWIvUcl MGuyeHhLykhAKjxZ41roV4cZmD6SXsornyT1EXGca/yuVwwI1O0CNWxH19g8ldim6A4d 4tLKvjzRf6+sNTz3woCMQQ6yydvKPIDxOrMRtdyRhS25PgVWpDtQh9dGIyWS+lyUgE0+ 3wVLJoy/VfeFeBLXZrbxEFpYsEs+bQfGsNcUFf2/9+hOeYUk9fr28kp3fvyQD73AD1Px +2gx0A0e19aNDMi83q8+z6ODkYcAd7hOnxfPfK46fvET+VsWDwtnG7+42Xy0OhiwKhJU pvJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=AMR720FqeCjcnzSfUnsVIUbM7YZ1gpn8DTzDS7zjoCg=; fh=2muOxCO+RwktFCMc5nxQXtBmYKObLbAcDuqmMdRZOeE=; b=q6o4QasgnXrqu3lXmFj7UiOb0ePo6f4w8yeSz63WAcTf8rwrLPhU1L+t5BNfgE1l2l EcFZ5RZRsqHr2SWXc9oCCZAYJTf76BghHEW0FxGz7p5vLVR8tRpnewvrGVsWUeslY3DY C1BwrMvhOXT+oMx0GVZAGeB3iNN6gcP1QCOuFXipsYkrzynnct6tsWsmO2fd8o9bYUaf I8Nl6xCj48md3N9Dzr0ryX/nMrF46dGhME2cqTrnlPJgpwouQNkoybq/aF/4PtXvb0aV 9jR4R3xaLTjw+Li0lh6hGFp3burEpe2bQg0qmDD681I7d0svGEnhV+x0OswHAIz4O0zi D6KA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bg2-20020a056a02010200b005c6259da621si8343547pgb.555.2023.12.04.09.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 09:18:55 -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; 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=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 lipwig.vger.email (Postfix) with ESMTP id 17E658053611; Mon, 4 Dec 2023 09:18:31 -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 S229542AbjLDRSN (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Mon, 4 Dec 2023 12:18:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjLDRSM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 4 Dec 2023 12:18:12 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B6474C0 for <linux-kernel@vger.kernel.org>; Mon, 4 Dec 2023 09:18:17 -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 5F5EC13D5; Mon, 4 Dec 2023 09:19:04 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3377F3F6C4; Mon, 4 Dec 2023 09:18:16 -0800 (PST) From: Mark Rutland <mark.rutland@arm.com> To: linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, alex.popov@linux.com, andreyknvl@gmail.com, bp@alien8.de, dvyukov@google.com, mark.rutland@arm.com Subject: [PATCH] kcov: remove stale RANDOMIZE_BASE text Date: Mon, 4 Dec 2023 17:18:07 +0000 Message-Id: <20231204171807.3313022-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> 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]); Mon, 04 Dec 2023 09:18:31 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784372616556999394 X-GMAIL-MSGID: 1784372616556999394 |
Series |
kcov: remove stale RANDOMIZE_BASE text
|
|
Commit Message
Mark Rutland
Dec. 4, 2023, 5:18 p.m. UTC
The Kconfig help text for CONFIG_KCOV describes that recorded PC values
will not be stable across machines or reboots when RANDOMIZE_BASE is
selected. This was the case when KCOV was introduced in commit:
5c9a8750a6409c63 ("kernel: add kcov code coverage")
However, this changed in commit:
4983f0ab7ffaad1e ("kcov: make kcov work properly with KASLR enabled")
Since that commit KCOV always subtracts the KASLR offset from PC values,
which ensures that these are stable across machines and across reboots
even when RANDOMIZE_BASE is selected.
Unfortunately, that commit failed to update the Kconfig help text, which
still suggests disabling RANDOMIZE_BASE even though this is no longer
necessary.
Remove the stale Kconfig text.
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Alexander Popov <alex.popov@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
---
lib/Kconfig.debug | 4 ----
1 file changed, 4 deletions(-)
Comments
On Mon, 4 Dec 2023 at 18:18, Mark Rutland <mark.rutland@arm.com> wrote: > > The Kconfig help text for CONFIG_KCOV describes that recorded PC values > will not be stable across machines or reboots when RANDOMIZE_BASE is > selected. This was the case when KCOV was introduced in commit: > > 5c9a8750a6409c63 ("kernel: add kcov code coverage") > > However, this changed in commit: > > 4983f0ab7ffaad1e ("kcov: make kcov work properly with KASLR enabled") > > Since that commit KCOV always subtracts the KASLR offset from PC values, > which ensures that these are stable across machines and across reboots > even when RANDOMIZE_BASE is selected. > > Unfortunately, that commit failed to update the Kconfig help text, which > still suggests disabling RANDOMIZE_BASE even though this is no longer > necessary. > > Remove the stale Kconfig text. > > Reported-by: Borislav Petkov <bp@alien8.de> > Signed-off-by: Mark Rutland <mark.rutland@arm.com> > Cc: Alexander Popov <alex.popov@linux.com> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Andrey Konovalov <andreyknvl@gmail.com> > Cc: Dmitry Vyukov <dvyukov@google.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com> Thanks for fixing this. > --- > lib/Kconfig.debug | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index cc7d53d9dc019..e77873cf85c78 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -2103,10 +2103,6 @@ config KCOV > KCOV exposes kernel code coverage information in a form suitable > for coverage-guided fuzzing (randomized testing). > > - 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. > - > For more details, see Documentation/dev-tools/kcov.rst. > > config KCOV_ENABLE_COMPARISONS > -- > 2.30.2 >
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index cc7d53d9dc019..e77873cf85c78 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2103,10 +2103,6 @@ config KCOV KCOV exposes kernel code coverage information in a form suitable for coverage-guided fuzzing (randomized testing). - 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. - For more details, see Documentation/dev-tools/kcov.rst. config KCOV_ENABLE_COMPARISONS