Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1574511 > unrolled thread
| Started by | Masami Hiramatsu <mhiramat@kernel.org> |
|---|---|
| First post | 2017-02-06 11:00 +0100 |
| Last post | 2017-02-06 11:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH tip/master 0/2] kprobes: trivial cleanups Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-06 11:00 +0100
[PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop Masami Hiramatsu <mhiramat@kernel.org> - 2017-02-06 11:00 +0100
[tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() tip-bot for Masami Hiramatsu <tipbot@zytor.com> - 2017-02-06 11:20 +0100
| From | Masami Hiramatsu <mhiramat@kernel.org> |
|---|---|
| Date | 2017-02-06 11:00 +0100 |
| Subject | [PATCH tip/master 0/2] kprobes: trivial cleanups |
| Message-ID | <t7Ofv-3hX-5@gated-at.bofh.it> |
Hi,
Here are two trivial cleanups. Both may make no actual meaningful
changes, just clarify what is needed.
- [1/2] Remove unneeded dependency of CONFIG_HAVE_KRETPROBES on arm64
- [2/2] Use hlist_for_each_entry() for non-modify loop.
Thank you,
---
Masami Hiramatsu (2):
arm64: kprobes: Remove redundant dependency in Kconfig
kprobes: x86: Use hlist_for_each_entry() for first loop
arch/arm64/Kconfig | 2 +-
arch/x86/kernel/kprobes/core.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
Masami Hiramatsu
[toc] | [next] | [standalone]
| From | Masami Hiramatsu <mhiramat@kernel.org> |
|---|---|
| Date | 2017-02-06 11:00 +0100 |
| Subject | [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop |
| Message-ID | <t7Ofw-3hX-23@gated-at.bofh.it> |
| In reply to | #1574511 |
Use hlist_for_each_entry() for first loop on kretprobe
trampoline_handler because it doesn't change the hlist.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
arch/x86/kernel/kprobes/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index eb35093..520b8df 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -745,7 +745,7 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)
* will be the real return address, and all the rest will
* point to kretprobe_trampoline.
*/
- hlist_for_each_entry_safe(ri, tmp, head, hlist) {
+ hlist_for_each_entry(ri, head, hlist) {
if (ri->task != current)
/* another task is sharing our hash bucket */
continue;
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Masami Hiramatsu <tipbot@zytor.com> |
|---|---|
| Date | 2017-02-06 11:20 +0100 |
| Subject | [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() |
| Message-ID | <t7OyS-3E0-23@gated-at.bofh.it> |
| In reply to | #1574513 |
Commit-ID: b6263178b8dbd9fe70d55f136c2a1da39309520e
Gitweb: http://git.kernel.org/tip/b6263178b8dbd9fe70d55f136c2a1da39309520e
Author: Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Mon, 6 Feb 2017 18:55:43 +0900
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 6 Feb 2017 11:07:07 +0100
kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe()
Use hlist_for_each_entry() in the first loop in the kretprobe
trampoline_handler() function, because it doesn't change the hlist.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/148637493309.19245.12546866092052500584.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/kprobes/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index eb35093..520b8df 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -745,7 +745,7 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)
* will be the real return address, and all the rest will
* point to kretprobe_trampoline.
*/
- hlist_for_each_entry_safe(ri, tmp, head, hlist) {
+ hlist_for_each_entry(ri, head, hlist) {
if (ri->task != current)
/* another task is sharing our hash bucket */
continue;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web