From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3E576C636CD for ; Tue, 7 Feb 2023 10:16:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LkjjDd6apvF5EXWxxNUoImXQ8RhOlESLfMEHbKYvoxw=; b=uQcdagBqu04mvD qk1iwKJj2hAXMIaXjMkBvYRMfT8dSP1H1+TOUfwWBt09vEwhQarv2vE4lieYBgHuCQ73wM2oPJElq S34KRaZPdkUokBCzUrsMAdYxoJvq1/wkCyiTlRB8+DbWmiHTeQo5mfq9rwfVZOYWC3hfLe34RC9qt kZfmPQDo20NUp8uEDLpp35hB/mJdhlC1i6RaGNGg7bJT+rU6PEsccYzxP+DC71ezCxjuD5zXIWyuD i1dIJAGTp4IOfeMU5aqEdtjJPuHmVjqEdvENQS6Ks+ckHqyNaWkEqQtBPihc7IWWUZeFSQ2hOCItD irzDxVxkLp0OkzUVjLZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPL0a-00BfG2-FT; Tue, 07 Feb 2023 10:15:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPL0X-00BfFW-Od for linux-arm-kernel@lists.infradead.org; Tue, 07 Feb 2023 10:15:27 +0000 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 A8BB9106F; Tue, 7 Feb 2023 02:16:06 -0800 (PST) Received: from FVFF77S0Q05N (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 456E43F8C6; Tue, 7 Feb 2023 02:15:23 -0800 (PST) Date: Tue, 7 Feb 2023 10:15:07 +0000 From: Mark Rutland To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, Nathan Chancellor Subject: Re: [PATCH] arm64: kprobes: Drop ID map text from kprobes blacklist Message-ID: References: <20230204101807.2862321-1-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230204101807.2862321-1-ardb@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230207_021525_862930_B061F546 X-CRM114-Status: GOOD ( 18.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Feb 04, 2023 at 11:18:07AM +0100, Ard Biesheuvel wrote: > The ID mapped text region is never accessed via the normal kernel > mapping of text, and so it was moved into .rodata instead. This means it > is no longer considered as a suitable place for kprobes by default, and > the explicit blacklist is unnecessary, and actually results in an error > message at boot: > > kprobes: Failed to populate blacklist (error -22), kprobes not restricted, be careful using them! > > So stop blacklisting the ID map text explicitly. > > Fixes: af7249b317e4d0b3d ("arm64: kernel: move identity map out of .text mapping") > Reported-by: Nathan Chancellor > Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Mark. > --- > arch/arm64/kernel/probes/kprobes.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c > index f35d059a9a366fa6..70b91a8c6bb3f358 100644 > --- a/arch/arm64/kernel/probes/kprobes.c > +++ b/arch/arm64/kernel/probes/kprobes.c > @@ -387,10 +387,6 @@ int __init arch_populate_kprobe_blacklist(void) > (unsigned long)__irqentry_text_end); > if (ret) > return ret; > - ret = kprobe_add_area_blacklist((unsigned long)__idmap_text_start, > - (unsigned long)__idmap_text_end); > - if (ret) > - return ret; > ret = kprobe_add_area_blacklist((unsigned long)__hyp_text_start, > (unsigned long)__hyp_text_end); > if (ret || is_kernel_in_hyp_mode()) > -- > 2.39.1 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel