Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4595184pja; Thu, 21 Nov 2019 22:31:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyoKWDneExFYMOTjkSMEHsYlp+DeWH97GFg7U3nQ8FD5qhKAp3+nFfWWV6UBArNdzTe5oow X-Received: by 2002:a17:906:1da1:: with SMTP id u1mr20272562ejh.275.1574404276736; Thu, 21 Nov 2019 22:31:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404276; cv=none; d=google.com; s=arc-20160816; b=KBXOZ7Fy5S53wn2kKTI6J2BO1G12gu1An3LcM6hYnEt3K3ehR9e2MChXEU2b4MY/mg rp6IhVtHF1EoQQwo6U2PbvzjpcrBzurmK4zbYXpjPqw8sZxxGJDDwFjjHBD0gtUWGtf2 yloDQZWVsNb9c2Vhrx9vMgs5wNCLe/UEWO+J136alktfkxXe61vSTENLR2mhBR4FNKqM 93wQvZHGAVtF5oO9QViVJApvKfCIEuZ6eJxws/sw9ZtQOVvZNy9MtsEtls/FqmxbnekR Nm3k1VF/WpKKJzEcRKVjiGvA4tUfMkBls2uJmpj5JOD+VI3WxCs0LPxwgjKePJ+dW9WG HSUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Isw9wmG1/+2iij5D1b0l0edVSeAHwj/ew0MDTfxsKLs=; b=K2NCJkr3/szsa98gAiT2CQ7C8+OF6p3zwAcjBtXarnpsiSmG47X+jjbfhFkQlRbtxL YP/XRJMvY2FAehpcouYjrPVkQ/ExE3AdQwU3B7rLL8gF3tt87Osw3ENgix5kLDBbqvVq 40g2WJ1Grtdk1vkXmVsmy3ZOKm8oGPb2Bjdcq9i+pGfhiPAZeyfgL+6vkI9vvwRaz00I d/IlX06ELwxquYx87SZP1PbHEM6Nj6ndyQY5kH8FWPH+ggIalycT+LhLtSvqwtsKtZKD 1/24YEUn9I7awIJsI1Ph6HmnamJceSJ336ZggUXTp+N6tMVqIikIVt6VBN7F7LqiWije R9zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XZuhG71r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e25si3884266edr.117.2019.11.21.22.30.51; Thu, 21 Nov 2019 22:31:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XZuhG71r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727897AbfKVFuv (ORCPT + 99 others); Fri, 22 Nov 2019 00:50:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:55534 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727851AbfKVFup (ORCPT ); Fri, 22 Nov 2019 00:50:45 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 333C92084B; Fri, 22 Nov 2019 05:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401844; bh=NtarbQ3mMcuCpzgGK4ZA5qZrc+60HUEkX7IGiYZOgdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XZuhG71r3JE0TGEMTOFdDO74LrCxziTlJuUZKXIxKJCisxeErIjnGwRWu0BYW7ypj GrbVrCVq2zSFVCS9stVUVA2nr5e5F4QtQYap5TgXDkV1s+KfxDOdu0M+lSe2mSVvXK Jw8ZlheL7caA8txSh/ajMZSpHYY3a5JLlvCvcDSo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Masami Hiramatsu , Andrea Righi , Andy Lutomirski , Anil S Keshavamurthy , Borislav Petkov , "David S . Miller" , Linus Torvalds , "Naveen N . Rao" , Peter Zijlstra , Thomas Gleixner , Yonghong Song , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL 4.19 083/219] kprobes/x86: Show x86-64 specific blacklisted symbols correctly Date: Fri, 22 Nov 2019 00:46:55 -0500 Message-Id: <20191122054911.1750-76-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masami Hiramatsu [ Upstream commit fe6e65615415987629a2dda583b4495677d8c388 ] Show x86-64 specific blacklisted symbols in debugfs. Since x86-64 prohibits probing on symbols which are in entry text, those should be shown. Tested-by: Andrea Righi Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Anil S Keshavamurthy Cc: Borislav Petkov Cc: David S. Miller Cc: Linus Torvalds Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yonghong Song Link: http://lkml.kernel.org/r/154503488425.26176.17136784384033608516.stgit@devbox Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/kernel/kprobes/core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index e83a057564d1b..173e915e11d54 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c @@ -1140,6 +1140,12 @@ bool arch_within_kprobe_blacklist(unsigned long addr) is_in_entry_trampoline_section; } +int __init arch_populate_kprobe_blacklist(void) +{ + return kprobe_add_area_blacklist((unsigned long)__entry_text_start, + (unsigned long)__entry_text_end); +} + int __init arch_init_kprobes(void) { return 0; -- 2.20.1