* [PATCH tip/master 0/2] kprobes: trivial cleanups
@ 2017-02-06 9:53 Masami Hiramatsu
2017-02-06 9:54 ` [PATCH tip/master 1/2] arm64: kprobes: Remove redundant dependency in Kconfig Masami Hiramatsu
2017-02-06 9:55 ` [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop Masami Hiramatsu
0 siblings, 2 replies; 5+ messages in thread
From: Masami Hiramatsu @ 2017-02-06 9:53 UTC (permalink / raw)
To: Ingo Molnar
Cc: Masami Hiramatsu, linux-kernel, Peter Zijlstra,
Ananth N Mavinakayanahalli, Thomas Gleixner, H . Peter Anvin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH tip/master 1/2] arm64: kprobes: Remove redundant dependency in Kconfig
2017-02-06 9:53 [PATCH tip/master 0/2] kprobes: trivial cleanups Masami Hiramatsu
@ 2017-02-06 9:54 ` Masami Hiramatsu
2017-02-06 10:10 ` [tip:perf/core] kprobes/arm64: Remove a redundant dependency from the Kconfig tip-bot for Masami Hiramatsu
2017-02-06 9:55 ` [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop Masami Hiramatsu
1 sibling, 1 reply; 5+ messages in thread
From: Masami Hiramatsu @ 2017-02-06 9:54 UTC (permalink / raw)
To: Ingo Molnar
Cc: Masami Hiramatsu, linux-kernel, Peter Zijlstra,
Ananth N Mavinakayanahalli, Thomas Gleixner, H . Peter Anvin
Remove redundant dependency of HAVE_KRETPROBES to HAVE_KPROBES
in arm64 Kconfig. Since HAVE_KPROBES always selected above line,
we don't have to check it at HAVE_KRETPROBES.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
CC: Sandeepa Prabhu <sandeepa.s.prabhu@gmail.com>
CC: David A. Long <dave.long@linaro.org>
CC: Catalin Marinas <catalin.marinas@arm.com>
---
arch/arm64/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1117421..f7dfd6d5 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -96,7 +96,7 @@ config ARM64
select HAVE_RCU_TABLE_FREE
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_KPROBES
- select HAVE_KRETPROBES if HAVE_KPROBES
+ select HAVE_KRETPROBES
select IOMMU_DMA if IOMMU_SUPPORT
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop
2017-02-06 9:53 [PATCH tip/master 0/2] kprobes: trivial cleanups Masami Hiramatsu
2017-02-06 9:54 ` [PATCH tip/master 1/2] arm64: kprobes: Remove redundant dependency in Kconfig Masami Hiramatsu
@ 2017-02-06 9:55 ` Masami Hiramatsu
2017-02-06 10:10 ` [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() tip-bot for Masami Hiramatsu
1 sibling, 1 reply; 5+ messages in thread
From: Masami Hiramatsu @ 2017-02-06 9:55 UTC (permalink / raw)
To: Ingo Molnar
Cc: Masami Hiramatsu, linux-kernel, Peter Zijlstra,
Ananth N Mavinakayanahalli, Thomas Gleixner, H . Peter Anvin
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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:perf/core] kprobes/arm64: Remove a redundant dependency from the Kconfig
2017-02-06 9:54 ` [PATCH tip/master 1/2] arm64: kprobes: Remove redundant dependency in Kconfig Masami Hiramatsu
@ 2017-02-06 10:10 ` tip-bot for Masami Hiramatsu
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2017-02-06 10:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, mingo, catalin.marinas, hpa, ananth,
sandeepa.s.prabhu, dave.long, peterz, mhiramat, tglx, torvalds
Commit-ID: cd1ee3b1e30b4c6c0858e0c0b4ca1b4d86020ada
Gitweb: http://git.kernel.org/tip/cd1ee3b1e30b4c6c0858e0c0b4ca1b4d86020ada
Author: Masami Hiramatsu <mhiramat@kernel.org>
AuthorDate: Mon, 6 Feb 2017 18:54:33 +0900
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 6 Feb 2017 11:07:06 +0100
kprobes/arm64: Remove a redundant dependency from the Kconfig
Remove the 'HAVE_KPROBES' dependency from the HAVE_KRETPROBES line,
since HAVE_KPROBES is already selected unconditionally in the Kconfig
line above this one.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David A. Long <dave.long@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sandeepa Prabhu <sandeepa.s.prabhu@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/148637486369.19245.316601692744886725.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/arm64/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 1117421..f7dfd6d5 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -96,7 +96,7 @@ config ARM64
select HAVE_RCU_TABLE_FREE
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_KPROBES
- select HAVE_KRETPROBES if HAVE_KPROBES
+ select HAVE_KRETPROBES
select IOMMU_DMA if IOMMU_SUPPORT
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe()
2017-02-06 9:55 ` [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop Masami Hiramatsu
@ 2017-02-06 10:10 ` tip-bot for Masami Hiramatsu
0 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Masami Hiramatsu @ 2017-02-06 10:10 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, linux-kernel, hpa, ananth, mingo, peterz, mhiramat, torvalds
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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-02-06 10:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 9:53 [PATCH tip/master 0/2] kprobes: trivial cleanups Masami Hiramatsu
2017-02-06 9:54 ` [PATCH tip/master 1/2] arm64: kprobes: Remove redundant dependency in Kconfig Masami Hiramatsu
2017-02-06 10:10 ` [tip:perf/core] kprobes/arm64: Remove a redundant dependency from the Kconfig tip-bot for Masami Hiramatsu
2017-02-06 9:55 ` [PATCH tip/master 2/2] kprobes: x86: Use hlist_for_each_entry() for first loop Masami Hiramatsu
2017-02-06 10:10 ` [tip:perf/core] kprobes/x86: Use hlist_for_each_entry() instead of hlist_for_each_entry_safe() tip-bot for Masami Hiramatsu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.