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 6A7D3C636D6 for ; Sun, 5 Feb 2023 18:38:50 +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=y1F6d+NVBwGjyl/SUpAc/a8zCBRzYW4vgrvlrstqTa0=; b=Nawq6NHtnDLljf fZe97qP9pDl8KjOP5xENT4OKHRmYlXSIrLu58CKKNFgPkIXQItFA76O1Ii5OX3ZWKoq6ArN//a3aU QJh039b7Xrq/UzQ3cVUdC0su9IIVWmL6KOMzbpBXg6PXELKG6C0eAAlCXclado8fy5Trimdc9h1NA gsFijMG+HW3DB83Jp7n468GsTT+mGjv6cxltS//gPaxt08prVWWk3qlLa05hkqMOgIr9oZVTqTjgy pvXnNdMoUmfNd7sEM1fZ21HnTtZkWShYpZpL7Ucj3FPwX9+84SYUtC75DMirUrB2rHtn11ay8pyyg JS1hK7JTXhzmQjomD6yQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOjtM-006gA3-VS; Sun, 05 Feb 2023 18:37:33 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pOjtJ-006g9d-UC for linux-arm-kernel@lists.infradead.org; Sun, 05 Feb 2023 18:37:31 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1AF5A60BC8; Sun, 5 Feb 2023 18:37:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EB26C433D2; Sun, 5 Feb 2023 18:37:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675622246; bh=iQAyCb79XPdE7M9MIeEyY3H+hSOZY7vnrCq176E6beQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V3gTxYwSiCEDJmjAAt/85y0FYXTzSU/tAD4OHF+qISQ+hwVExVJmPc1QXknAC7f1J UEBk8YjJenEXc4xZoQ4T3SmLuCmrqeFchkgkVayi3RjhhGMNesyj7WsBKo7g1V60XP 6ruluOmcXi+WXF/oFYoWIu7OwF3mtshSJUMVo/ZOOAQv3MVXp1jRRpW3vKszAA1VVw ZZBZF7RBLSzwHo2iij0T8C0sYdGnPJVbplXVPz/atTIviBLs8H2642STUXT74GHzGr tAanftSM3XYNltXo2geQUxomtYObqGhBE+6u2mC8JB7oWuUDgwnrtLY7ZIh58X97/3 2X/LTQgPc8RAg== Date: Sun, 5 Feb 2023 11:37:24 -0700 From: Nathan Chancellor To: Ard Biesheuvel Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org 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-20230205_103730_053249_026EFD9B X-CRM114-Status: GOOD ( 18.71 ) 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 Thank you for the quick fix! Tested-by: Nathan Chancellor > --- > 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