From patchwork Tue Jan 15 06:23:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 10764007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E3826C2 for ; Tue, 15 Jan 2019 06:24:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71E9E2B125 for ; Tue, 15 Jan 2019 06:24:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65F7E2B165; Tue, 15 Jan 2019 06:24:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48AE42B125 for ; Tue, 15 Jan 2019 06:24:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=8gBqhYt6dVj7MisbsNF69hBv4L7wX5itmkqX26qQkJM=; b=uDL4EX4Zv2XrmK dKmQITmsNedS9s31iRQC+cc2Hjl+dnVn2fUATtAv2RP59P9dpMuwAwzFQ9zkqYb9MqF+nI68GqmfY +l+mXmivNXPL1p8WRQZnxJBEZ+NCmghEriUSO+oJGO72VcacTicztwjGr/l/KkUAeYbPQjesM7ydG bszFc23WOUxGFKQMWxnSflJHLhj6/sBS4nIbqjCeQ0Av6qWU0Y0BV+ZAexUja1RhOkhwuzO4Z8yL7 3fy3jPH0k7e9JkQADx382EjnliA+DfY0SRqP9uOLq/XWb8tSaOWzsyR6/iOC8T1GgHP7cwQVG2QtM q1/I29+/DrQH1bA+K3pA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjI8t-0004na-22; Tue, 15 Jan 2019 06:24:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjI8p-0004nA-Di for linux-arm-kernel@lists.infradead.org; Tue, 15 Jan 2019 06:24:04 +0000 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9446220651; Tue, 15 Jan 2019 06:24:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547533442; bh=M5ZDJU8js+RTgGe66Ho1fUpZuVQo2/Q9RHdHmc4kBdg=; h=From:To:Cc:Subject:Date:From; b=a36Hwwf3r5f2yM6YQmasuIow5Q2TUHgI6O8oiI/KnDXyNfz6j+fkwyLWEqfQwNp8v reJogmLtN64oGutxeve6OJd7zI+TrQqifZ/Owp49O9bHCBR6R0mZvMIWnpRXT2L27L whlC6Fxg9O8JhadwR9jvFEOQ3tQC+GAn+Cj7o3i0= From: Masami Hiramatsu To: Catalin Marinas , Will Deacon Subject: [PATCH v2 0/4] arm64: kprobes: Update blacklist checking on arm64 Date: Tue, 15 Jan 2019 15:23:39 +0900 Message-Id: <154753341900.31541.8135985235882849464.stgit@devbox> X-Mailer: git-send-email 2.13.6 User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190114_222403_484007_06C9E7A8 X-CRM114-Status: GOOD ( 11.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pratyush Anand , linux-kernel , James Morse , Masami Hiramatsu , linux-arm-kernel@lists.infradead.org, "David A . Long" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, Here is the v2 series of update of the kprobe blacklist checking on arm64. I found that some blacklist checking code were mis-placed in arch_prepare_kprobe() and arch_within_kprobe_blacklist(). Since the blacklist just filters by symbol, smaller than the symbol, like extable must be checked in arch_prepare_kprobe(). Also, all function (symbol) level check must be done by blacklist. For arm64, it checks the extable entry address in blacklist and exception/irqentry function in arch_prepare_kprobe(). And, RODATA check is unneeded since kernel/kprobes.c already ensures the probe address is in kernel-text area. In v2, I updated [1/4]'s description and added James' Reviewed-by. Also, in this version, I added a patch which uses arch_populate_kprobe_blacklist() instead of arch_within_kprobe_blacklist() so that user can see the full list of blacklisted symbols under the debugfs. Changes in v2: - [1/4] change description so that it make clear and add James' Reviewed-by. - [4/4] new patch. Thank you, --- Masami Hiramatsu (4): arm64: kprobes: Move extable address check into arch_prepare_kprobe() arm64: kprobes: Remove unneeded RODATA check arm64: kprobes: Move exception_text check in blacklist arm64: kprobes: Use arch_populate_kprobe_blacklist() arch/arm64/kernel/probes/kprobes.c | 49 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 25 deletions(-) -- Masami Hiramatsu (Linaro)