LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: jpoimboe@redhat.com, jbaron@akamai.com, rostedt@goodmis.org,
	ardb@kernel.org, naveen.n.rao@linux.ibm.com,
	anil.s.keshavamurthy@intel.com, mhiramat@kernel.org,
	davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: [PATCH 3/3] kprobe/static_call: Restore missing static_call_text_reserved()
Date: Mon, 28 Jun 2021 13:24:12 +0200
Message-ID: <20210628113045.167127609@infradead.org> (raw)
In-Reply-To: <20210628112409.233121975@infradead.org>

Restore two hunks from commit 6333e8f73b83 ("static_call: Avoid
kprobes on inline static_call()s") that went walkabout.

Fixes: 76d4acf22b48 ("Merge tag 'perf-kprobes-2020-12-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 kernel/kprobes.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -35,6 +35,7 @@
 #include <linux/ftrace.h>
 #include <linux/cpu.h>
 #include <linux/jump_label.h>
+#include <linux/static_call.h>
 #include <linux/perf_event.h>
 
 #include <asm/sections.h>
@@ -1551,6 +1552,7 @@ static int check_kprobe_address_safe(str
 	if (!kernel_text_address((unsigned long) p->addr) ||
 	    within_kprobe_blacklist((unsigned long) p->addr) ||
 	    jump_label_text_reserved(p->addr, p->addr) ||
+	    static_call_text_reserved(p->addr, p->addr) ||
 	    find_bug((unsigned long)p->addr)) {
 		ret = -EINVAL;
 		goto out;



  parent reply index

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 11:24 [PATCH 0/3] jump_label/static_call/kprobes: *_text_reserved() fixes Peter Zijlstra
2021-06-28 11:24 ` [PATCH 1/3] jump_label: Fix jump_label_text_reserved() vs __init Peter Zijlstra
2021-06-28 13:43   ` Masami Hiramatsu
2021-07-05  7:53   ` [tip: locking/urgent] " tip-bot2 for Peter Zijlstra
2021-07-05  9:05   ` tip-bot2 for Peter Zijlstra
2021-06-28 11:24 ` [PATCH 2/3] static_call: Fix static_call_text_reserved() " Peter Zijlstra
2021-06-28 14:26   ` Masami Hiramatsu
2021-07-05  7:53   ` [tip: locking/urgent] " tip-bot2 for Peter Zijlstra
2021-07-05  9:05   ` tip-bot2 for Peter Zijlstra
2021-06-28 11:24 ` Peter Zijlstra [this message]
2021-06-28 11:34   ` [PATCH 3/3] kprobe/static_call: Restore missing static_call_text_reserved() Peter Zijlstra
2021-06-28 14:24     ` Masami Hiramatsu
2021-06-28 15:03       ` Peter Zijlstra
2021-06-28 14:25   ` Masami Hiramatsu
2021-07-05  7:53   ` [tip: locking/urgent] " tip-bot2 for Peter Zijlstra
2021-07-05  9:05   ` tip-bot2 for Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210628113045.167127609@infradead.org \
    --to=peterz@infradead.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=ardb@kernel.org \
    --cc=davem@davemloft.net \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lore.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git