Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4414316imu; Mon, 14 Jan 2019 22:48:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN6ubyzKpkdpoxhSthnUJ74m3SDjTQtKwxdWp44AZjw6VS/H59bxw3umAf1bCI1Qkmxh6aYa X-Received: by 2002:a62:6204:: with SMTP id w4mr2472706pfb.5.1547534930489; Mon, 14 Jan 2019 22:48:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547534930; cv=none; d=google.com; s=arc-20160816; b=ML1IPM9psVwN5OEmfWsvvOhAjqlUynEP1UqsSWdwQXux9hO+XVgSI0JMmsIQ46qNku PIp9fQ5rELatynXMybUAwTNO+HQQV+uFAfDTQ18WAr20bNursIwYlvZlzpR58IZPXDyg rXDlr+7AhwaTscFzXmyJ3Me46g17+xiDa48tVvhLy8FWCOgug80nQa2r/FFj9X0kKijw Oi2Q+PnqYfjoOChzIra9q8zxrynYOz8IpsqLrG+AcrkUYBQ9tV0cQTv8b4H/8tpokbj0 xn47CmrrddyqYcJateVgtukUW5A9ZEdUNmJSpWE1EEAGl4r2mt/f+7EcAg6Zy3auTcYq EEXA== 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 :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=YQxhlluWfy8mm5oYFkdL/DxVkZAUB8oJIRWbSBIR/z0=; b=Wd7+4BJ4J/OikqKs8FrgOm+wQnMzIUvweepykuZqoLpYwiV5PCXjyHI+EMKKnFKCVk W197cEnxWpEsb8poSOKRk7YyXjD6ApKy5EqEJy84H52GQgjwRPBc4ZPohhhL7fwTkVLU zRmHHVkdQmxAKLo8ZnXfDm9rTdGn7UMiIjnM2evFQ1gu6Vo9bU1rmXbXArwEIPPi8MSO zxzaQPCtBJRQemm0BuoefX6yaeAPSCrggAPD8EpEN1oC3mAahEb2wfyyc9CF8RRE6iqi OfsFxb1IASKkm3753gtSBKG3lxGG45QqPUajS4IMb3VPZ8Pbct83QOyMsKUGNQfAbrEa 4NEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a36Hwwf3; 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 y3si2555591pfb.152.2019.01.14.22.48.34; Mon, 14 Jan 2019 22:48:50 -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=a36Hwwf3; 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 S1727882AbfAOGYD (ORCPT + 99 others); Tue, 15 Jan 2019 01:24:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:41184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725929AbfAOGYD (ORCPT ); Tue, 15 Jan 2019 01:24:03 -0500 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 Cc: Masami Hiramatsu , Pratyush Anand , "David A . Long" , linux-arm-kernel@lists.infradead.org, linux-kernel , James Morse 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)