Re: [PATCH] kprobes: Warn if the kprobe is reregistered

2021-02-03 Thread Ananth N Mavinakayanahalli
On 2/3/21 8:29 PM, Masami Hiramatsu wrote: Warn if the kprobe is reregistered, since there must be a software bug (actively used resource must not be re-registered) and caller must be fixed. Signed-off-by: Masami Hiramatsu Acked-by: Ananth N Mavinakayanahalli

[tip:perf/urgent] MAINTAINERS: Add Naveen N. Rao as kprobes co-maintainer

2018-07-24 Thread tip-bot for Ananth N Mavinakayanahalli
Commit-ID: 4799f6856fdd38c8078a190eca3288029287cf66 Gitweb: https://git.kernel.org/tip/4799f6856fdd38c8078a190eca3288029287cf66 Author: Ananth N Mavinakayanahalli AuthorDate: Tue, 17 Jul 2018 11:32:37 +0530 Committer: Ingo Molnar CommitDate: Tue, 24 Jul 2018 17:01:28 +0200 MAINTAINERS

[tip:perf/urgent] MAINTAINERS: Add Naveen N. Rao as kprobes co-maintainer

2018-07-17 Thread tip-bot for Ananth N Mavinakayanahalli
Commit-ID: 1b51a2fe84d87ae3df11b169cfb38db16df0c9af Gitweb: https://git.kernel.org/tip/1b51a2fe84d87ae3df11b169cfb38db16df0c9af Author: Ananth N Mavinakayanahalli AuthorDate: Tue, 17 Jul 2018 11:32:37 +0530 Committer: Ingo Molnar CommitDate: Tue, 17 Jul 2018 09:23:23 +0200 MAINTAINERS

[PATCH] kprobes: Kprobes maintainer change

2018-07-16 Thread Ananth N Mavinakayanahalli
Naveen has been contributing consistently reviewing and hardening kprobes for some time now. I have not been able to do the same due to other commitments. Signed-off-by: Ananth N Mavinakayanahalli --- MAINTAINERS |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS

Re: [RFC][PATCH] Lock down kprobes

2017-11-09 Thread Ananth N Mavinakayanahalli
On Thu, Nov 09, 2017 at 09:54:50PM +, David Howells wrote: > Ananth N Mavinakayanahalli wrote: > > > Yes, this patch will prevent any kprobe registration. > > Can I put that down as a Reviewed-by? Reviewed-by: Ananth N Mavinakayanahalli

Re: [RFC][PATCH] Lock down kprobes

2017-11-09 Thread Ananth N Mavinakayanahalli
On Thu, Nov 09, 2017 at 04:52:05PM +, David Howells wrote: > Hi, > > I need to lock down kprobes under secure boot conditions as part of the patch > series that can be found here: > > > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=efi-lock-down > > Can

Re: [RFC][PATCH] Lock down kprobes

2017-11-08 Thread Ananth N Mavinakayanahalli
On Wed, Nov 08, 2017 at 04:21:33PM +, David Howells wrote: > Hi, > > I need to lock down kprobes under secure boot conditions as part of the patch > series that can be found here: > > > https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=efi-lock-down > > Can

Re: [PATCH v2] ppc64/kprobe: Fix oops when kprobed on 'stdu' instruction

2017-04-10 Thread Ananth N Mavinakayanahalli
k pointer from memory using lwz, > effectively loading a corrupt (32bit) address, causing the kernel crash. > > Fix this by loading the 64bit value instead. > > Fixes: be96f63375a1 ("powerpc: Split out instruction analysis part of > emulate_step()") > Signed-off-by: Ravi Bangoria > Reviewed-by: Naveen N. Rao Reviewed-by: Ananth N Mavinakayanahalli

Re: [PATCH v2 2/5] powerpc: kretprobes: override default function entry offset

2017-02-24 Thread Ananth N Mavinakayanahalli
On Wed, Feb 22, 2017 at 07:23:38PM +0530, Naveen N. Rao wrote: > With ABIv2, we offset 8 bytes into a function to get at the local entry > point. > Looks good. > Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-14 Thread Ananth N Mavinakayanahalli
On Wed, Feb 15, 2017 at 12:28:34AM +0530, Naveen N. Rao wrote: > Allow kprobes to be placed on ftrace _mcount() call sites. This > optimization avoids the use of a trap, by riding on ftrace > infrastructure. > > This depends on HAVE_DYNAMIC_FTRACE_WITH_REGS which depends on > MPROFILE_KERNEL, whic

Re: [PATCH 3/3] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-14 Thread Ananth N Mavinakayanahalli
; > Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli

Re: [PATCH 2/3] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-14 Thread Ananth N Mavinakayanahalli
On Tue, Feb 14, 2017 at 02:08:02PM +0530, Naveen N. Rao wrote: > This helper will be used in a subsequent patch to emulate instructions > on re-entering the kprobe handler. No functional change. > > Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli

Re: [PATCH 1/3] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-14 Thread Ananth N Mavinakayanahalli
> c00d04c8 k _do_fork+0x8[DISABLED] > c00d04d0 k _do_fork+0x10[DISABLED] > c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] > > Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli

Re: [PATCH] kretprobes: reject registration if a symbol offset is specified

2017-02-14 Thread Ananth N Mavinakayanahalli
word for naveen: > insmod: ERROR: could not insert module > samples/kprobes/kretprobe_example.ko: Operation not permitted > > And dmesg: > [48253.757629] register_kretprobe failed, returned -22 > > Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli

Re: [PATCH 1/2] perf: add container identifier entry in perf sample data

2016-08-25 Thread Ananth N Mavinakayanahalli
On Thu, Aug 25, 2016 at 10:50:18PM +0530, Hari Bathini wrote: > > > On Thursday 25 August 2016 06:31 PM, Peter Zijlstra wrote: > >On Thu, Aug 25, 2016 at 05:27:54PM +0530, Hari Bathini wrote: > > > >>diff --git a/include/uapi/linux/perf_event.h > >>b/include/uapi/linux/perf_event.h > >>index c66

Re: [PATCH tip/master] [BUGFIX] kprobes/x86: Fix to clear TF bit in fault-on-single-stepping

2016-06-12 Thread Ananth N Mavinakayanahalli
etting running kprobe. > > Signed-off-by: Masami Hiramatsu Good catch! Reviewed-by: Ananth N Mavinakayanahalli

[MAINTAINERS] Update email address

2016-04-18 Thread Ananth N Mavinakayanahalli
The current ID is going away soon... update email address Signed-off-by: Ananth N Mavinakayanahalli diff --git a/MAINTAINERS b/MAINTAINERS index 1d5b4be..dc23998 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6400,7 +6400,7 @@ F:mm/kmemleak.c F: mm/kmemleak-test.c KPROBES -M

Re: [PATCH 1/2] perf/powerpc: Fix kprobe and kretprobe handling with kallsyms

2016-04-06 Thread Ananth N Mavinakayanahalli
On Wed, Apr 06, 2016 at 06:02:57PM +0530, Naveen N. Rao wrote: > + if (!pev->uprobes && map->dso->symtab_type == DSO_BINARY_TYPE__KALLSYMS) > tev->point.offset += PPC64LE_LEP_OFFSET; uprobes check against kallsysms? Am I missing something here? Ananth

Re: [PATCH 2/2] tools/perf: Fix kallsyms perf test on ppc64le

2016-04-06 Thread Ananth N Mavinakayanahalli
adjust all the symbols during symbol table load, > but only adjust the probe trace point. > > Cc: Mark Wielaard > Cc: Thiago Jung Bauermann > Cc: Ananth N Mavinakayanahalli > Cc: Arnaldo Carvalho de Melo > Cc: Masami Hiramatsu > Reported-by: Michael Ellerman > Signed-off-by: Naveen N. Rao Acked-by: Ananth N Mavinakayanahalli

[PATCH V3 2/2] kprobes: Mark OPTPROBES na for powerpc

2015-07-20 Thread Ananth N Mavinakayanahalli
had with a direct jump instead of a breakpoint, but the caveats need to be traded off with the complexity it brings in. For now, mark OPTPROBES na for powerpc. Signed-off-by: Ananth N Mavinakayanahalli --- .../features/debug/optprobes/arch-support.txt |2 +- 1 file changed, 1 insertion

[PATCH V3 1/2] Documentation/features: Add na key to arch-support.txt

2015-07-20 Thread Ananth N Mavinakayanahalli
To be used for features we will not support on a particular architecture. The git log that adds this needs to provide the justification 'why?' Signed-off-by: Ananth N Mavinakayanahalli --- Documentation/features/arch-support.txt |1 + 1 file changed, 1 insertion(+) di

[PATCH V2 2/2] kprobes: Mark OPTPROBES na for powerpc

2015-07-17 Thread Ananth N Mavinakayanahalli
: Ananth N Mavinakayanahalli --- .../features/debug/optprobes/arch-support.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/features/debug/optprobes/arch-support.txt b/Documentation/features/debug/optprobes/arch-support.txt index b8999d8..73662f9

[PATCH V2 1/2] Documentation/features: Add na key to arch-support.txt

2015-07-17 Thread Ananth N Mavinakayanahalli
To be used for features we will not support on a particular architecture. The git log that adds this needs to provide the justification 'why?' Signed-off-by: Ananth N Mavinakayanahalli --- Documentation/features/arch-support.txt |1 + 1 file changed, 1 insertion(+) di

Re: Re: [PATCH v6 0/6] arm64: Add kernel probes (kprobes) support

2015-05-13 Thread Ananth N Mavinakayanahalli
On Thu, May 14, 2015 at 09:01:03AM +0900, Masami Hiramatsu wrote: > On 2015/05/14 0:41, William Cohen wrote: > > On 05/13/2015 05:22 AM, Masami Hiramatsu wrote: > >> On 2015/05/12 21:48, William Cohen wrote: > > > >>> Hi Dave, > >>> > >>> In some of the previous diagnostic output it looked like th

[tip:perf/core] perf probe ppc64le: Fix ppc64 ABIv2 symbol decoding

2015-05-05 Thread tip-bot for Ananth N Mavinakayanahalli
Commit-ID: c50fc0a43e33a6c3257c5cbb954cd747d7b9a680 Gitweb: http://git.kernel.org/tip/c50fc0a43e33a6c3257c5cbb954cd747d7b9a680 Author: Ananth N Mavinakayanahalli AuthorDate: Tue, 28 Apr 2015 17:35:38 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 4 May 2015 12:43:45 -0300

Re: [PATCHv2 2/8] perf probe: Improve detection of file/function name in the probe pattern

2015-03-12 Thread Ananth N Mavinakayanahalli
lazy pattern. > > Error: Command Parse Error. > > > > Fix this by checking the probe pattern in more detail. > > Masami, can I have your Acked-by or Reviewed-by? Arnaldo, FWIW, I have reviewed this code... Reviewed-by: Ananth N Mavinakayanahalli > &

Re: [RFC PATCH 0/8] Fix perf probe issues on powerpc

2014-12-09 Thread Ananth N Mavinakayanahalli
| 57 -- > tools/perf/util/symbol-elf.c | 11 - > tools/perf/util/symbol.c | 6 +++ > 9 files changed, 170 insertions(+), 30 deletions(-) > create mode 100644 tools/perf/arch/powerpc/util/elf-sym-decode.c > create mode 10

Re: [RFC PATCH 8/8] perf probe powerpc: Fixup function entry if using kallsyms lookup

2014-12-09 Thread Ananth N Mavinakayanahalli
and applying it won't break other arch users, but having a/rev-by from > ppc developers should speed up this process. Hi Arnaldo, Yes, I have reviewed the patches. So, for all patches... Reviewed-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line &qu

Re: [PATCH] kprobes: add kprobe_is_function_probed()

2014-10-21 Thread Ananth N Mavinakayanahalli
On Tue, Oct 21, 2014 at 05:48:30PM +0200, Jiri Kosina wrote: > kernel/kprobes.c| 28 > 2 files changed, 33 insertions(+) > > diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h > index f7296e5..f760555 100644 > --- a/include/linux/kprobes.h > +++ b

Re: [PATCH -tip ] [BUGFIX] kprobes: Skip kretprobe hit in NMI context to avoid deadlock

2014-08-01 Thread Ananth N Mavinakayanahalli
e.lock again. > Normal interrupts have no problem because they are disabled > with the lock. > > Signed-off-by: Masami Hiramatsu Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [PATCH 0/1] (Was: cleanup DO_ERROR*() to prepare for uprobes fixes)

2014-05-12 Thread Ananth N Mavinakayanahalli
On Mon, May 12, 2014 at 07:08:22PM +0200, Oleg Nesterov wrote: > On 05/08, Oleg Nesterov wrote: > > > > But let me send the initial changes first for review. If they pass the > > review > > and if nobody objects, I'd like to route them along with the pending uprobes > > fixes. > > OK, nobody care

Re: [RFT PATCH -next ] [BUGFIX] kprobes: Fix "Failed to find blacklist" error on ia64 and ppc64

2014-05-07 Thread Ananth N Mavinakayanahalli
On Thu, May 08, 2014 at 02:40:00PM +0900, Masami Hiramatsu wrote: > (2014/05/08 13:47), Ananth N Mavinakayanahalli wrote: > > On Wed, May 07, 2014 at 08:55:51PM +0900, Masami Hiramatsu wrote: > > > > ... > > > >> +#if defined(CONFIG_PPC64) &

Re: [RFT PATCH -next ] [BUGFIX] kprobes: Fix "Failed to find blacklist" error on ia64 and ppc64

2014-05-07 Thread Ananth N Mavinakayanahalli
On Wed, May 07, 2014 at 08:55:51PM +0900, Masami Hiramatsu wrote: ... > +#if defined(CONFIG_PPC64) && (!defined(_CALL_ELF) || _CALL_ELF == 1) > +/* > + * On PPC64 ABIv1 the function pointer actually points to the > + * function's descriptor. The first entry in the descriptor is the > + * address

Re: [PATCH 0/2] uprobes: typeof(arch_uprobe->insn) cleanups

2013-11-11 Thread Ananth N Mavinakayanahalli
On Sat, Nov 09, 2013 at 06:53:50PM +0100, Oleg Nesterov wrote: > Hello. > > Ananth, could you please explicitly ack or nack 2/2 ? It is > really simple, but obviously I can't test it. And even if it > is correct it should be merged only if you like it, this is > the minor cleanup. The changes loo

Re: [PATCH 2/2] uprobes/powerpc: Kill arch_uprobe->ainsn

2013-11-11 Thread Ananth N Mavinakayanahalli
in hardware. >*/ > - ret = emulate_step(regs, auprobe->ainsn); > + ret = emulate_step(regs, auprobe->insn); > if (ret > 0) > return true; Acked-by: Ananth N Mavinakayanahalli Thanks Oleg. Ananth -- To unsubscribe from this list: send t

Re: [PATCH 3/3] kprobes: Use KSYM_NAME_LEN to size identifier buffers

2013-08-11 Thread Ananth N Mavinakayanahalli
On Sat, Aug 10, 2013 at 05:55:33PM -0700, Andi Kleen wrote: > From: Joe Mario > > Use KSYM_NAME_LEN to size identifier buffers, so that it can > be easier increased. > > Cc: ana...@in.ibm.com > Signed-off-by: Joe Mario > Signed-off-by: Andi Kleen Acked-by: An

Re: [PATCH -tip ] [BUGFIX] kprobes: Fix a double lock bug of kprobe_mutex

2013-04-18 Thread Ananth N Mavinakayanahalli
4db01c89af0f86f3e8920d354df > > Signed-off-by: Masami Hiramatsu > Cc: Ingo Molnar > Cc: Tejun Heo > Cc: Ananth N Mavinakayanahalli > Cc: "David S. Miller" Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-k

Re: [PATCH v1 0/9] uretprobes: Return uprobes implementation

2013-04-03 Thread Ananth N Mavinakayanahalli
On Wed, Apr 03, 2013 at 07:45:52PM +0200, Oleg Nesterov wrote: > On 04/03, Anton Arapov wrote: ... > Looks fine to me. I am going to add this to > git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc uprobes/core > > Ananth. "4/9 uretprobes/ppc" looks "obviously correct", but could you > plea

Re: [PATCH v1 4/9] uretprobes/ppc: Hijack return address

2013-04-03 Thread Ananth N Mavinakayanahalli
On Wed, Apr 03, 2013 at 06:00:34PM +0200, Anton Arapov wrote: > Hijack the return address and replace it with a trampoline address. > PowerPC implementation. > > Signed-off-by: Anton Arapov Acked-by: Ananth N Mavinakayanahalli > --- > arch/powerpc/include/asm/uprobes.h | 1

[PATCH v2 4/4] uprobes/powerpc: remove additional trap instruction check

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli prepare_uprobe() already checks if the underlying unstruction (on file) is a trap variant. We don't need to check this again. Signed-off-by: Ananth N Mavinakayanahalli --- arch/powerpc/kernel/uprobes.c |6 -- 1 file changed, 6 deletions(-)

[PATCH v2 3/4] uprobes/powerpc: teach uprobes to ignore gdb breakpoints

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Powerpc has many trap variants that could be used by entities like gdb. Currently, running gdb on a program being traced by uprobes causes an endless loop since uprobes doesn't understand that the trap was inserted by some other entity and a SIGTRAP needs

[PATCH v2 2/4] uprobes: refuse uprobe on trap variants

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Refuse to place a uprobe if a trap variant already exists in the file copy at the address. Signed-off-by: Ananth N Mavinakayanahalli --- kernel/events/uprobes.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-3.9-rc3/kernel/events

[PATCH v2 1/4] uprobes: add trap variant helper

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Some architectures like powerpc have multiple variants of the trap instruction. Introduce an additional helper is_trap_insn() for run-time handling of non-uprobe traps on such architectures. While there, change is_swbp_at_addr() to is_trap_at_addr() for reading

Re: [PATCH 1/3] uprobes: add trap variant helper

2013-03-22 Thread Ananth N Mavinakayanahalli
On Fri, Mar 22, 2013 at 03:54:06PM +0100, Oleg Nesterov wrote: > On 03/22, Ananth N Mavinakayanahalli wrote: > > > > +/** > > + * is_trap_insn - check if instruction is breakpoint instruction. > > + * @insn: instruction to be checked. > > + * Default implementatio

[PATCH 3/3] uprobes/powerpc: ignore trap variants during register

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli The current implementation of uprobes assumes that uprobes always wins even when a register request is at a location with a conditional breakpoint by some other entity. Refer to [1] for more details. Remove the breakpoint instruction check during registration on

[PATCH 2/3] uprobes/powerpc: teach uprobes to ignore gdb breakpoints

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Powerpc has many trap variants that could be used by entities like gdb. Currently, running gdb on a program being traced by uprobes causes an endless loop since uprobes doesn't understand that the trap was inserted by some other entity and a SIGTRAP needs

[PATCH 1/3] uprobes: add trap variant helper

2013-03-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Some architectures like powerpc have multiple variants of the trap instruction. Introduce an additional helper is_trap_insn() for run-time handling of non-uprobe traps on such architectures. While there, change is_swbp_at_addr() to is_trap_at_addr() for reading

[tip:perf/urgent] perf probe: Fix segfault

2013-03-18 Thread tip-bot for Ananth N Mavinakayanahalli
Commit-ID: 79146a69c8bc3f28e51c5267633abc6babf47a31 Gitweb: http://git.kernel.org/tip/79146a69c8bc3f28e51c5267633abc6babf47a31 Author: Ananth N Mavinakayanahalli AuthorDate: Tue, 12 Mar 2013 14:32:17 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 13 Mar 2013 17:00:33 -0300

Re: [PATCH -tip v2 2/2] [BUGFIX] kprobes/x86: Check Interrupt Flag modifier when registering probe

2013-03-14 Thread Ananth N Mavinakayanahalli
registering probe > and store the result on ainsn->if_modifier. > > Signed-off-by: Masami Hiramatsu > Reported-by: Timo Juhani Lindfors > Cc: "David S. Miller" > Cc: Ananth N Mavinakayanahalli > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H.

Re: [PATCH -tip v2 1/2] [BUGFIX] kprobes: make hash_64() as always inlined

2013-03-14 Thread Ananth N Mavinakayanahalli
f-by: Masami Hiramatsu > Reported-by: Timo Juhani Lindfors > Cc: "David S. Miller" > Cc: Nadia Yvette Chambers > Cc: Pavel Emelyanov > Cc: Jiri Kosina > Cc: Ananth N Mavinakayanahalli > Cc: Ingo Molnar > Cc: Linus Torvalds Acked-by: Ananth N Mavinakayanahalli

[PATCH] Fix segfault in perf probe

2013-03-12 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Fix segfault in perf probe due to a bug introduced by commit d8639f068 (perf tools: Stop using 'self' in strlist). Signed-off-by: Ananth N Mavinakayanahalli --- Index: linus/tools/perf/util

Re: [PATCH -tip ] [BUGFIX] kprobes: Move hash_64() into .text.kprobe section

2013-03-11 Thread Ananth N Mavinakayanahalli
_kprobes_text_end > > Signed-off-by: Masami Hiramatsu > Reported-by: Timo Juhani Lindfors > Cc: "David S. Miller" > Cc: Nadia Yvette Chambers > Cc: Pavel Emelyanov > Cc: Jiri Kosina > Cc: Ananth N Mavinakayanahalli Acked-by: Ananth N Mavinakayanahalli --

Re: [PATCH] delay blacklist symbol lookup until we actually need it

2013-03-07 Thread Ananth N Mavinakayanahalli
n Lekanovic > Signed-off-by: Toby Collett > Signed-off-by: Oskar Andero Sounds resonable. Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH] Kprobes blacklist: Conditionally add x86-specific symbols

2013-03-07 Thread Ananth N Mavinakayanahalli
On Fri, Mar 08, 2013 at 01:23:25PM +0900, Masami Hiramatsu wrote: > (2013/03/07 19:44), oskar.and...@sonymobile.com wrote: > > From: Bjorn Davidsson > > > > The kprobes blacklist contains x86-specific symbols. > > Looking for these in kallsyms takes unnecessary time > > during startup on non-X86

Re: [RFC PATCH v4 5/6] uretprobes: invoke return probe handlers

2013-03-04 Thread Ananth N Mavinakayanahalli
On Mon, Mar 04, 2013 at 03:38:12PM +0100, Anton Arapov wrote: > > diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h > index c353555..fa9d9de 100644 > --- a/arch/x86/include/asm/uprobes.h > +++ b/arch/x86/include/asm/uprobes.h > @@ -56,4 +56,9 @@ extern bool arch_uprobe_x

Re: [RFC PATCH v3 2/6] uretprobes/x86: hijack return address

2013-03-01 Thread Ananth N Mavinakayanahalli
On Fri, Mar 01, 2013 at 12:00:43PM +0100, Anton Arapov wrote: > On Fri, Mar 01, 2013 at 11:15:36AM +0530, Ananth N Mavinakayanahalli wrote: > > On Thu, Feb 28, 2013 at 12:00:11PM +0100, Anton Arapov wrote: ... > > > +extern unsigned long arch_uretprobe_hijack_return_

Re: [RFC PATCH v3 2/6] uretprobes/x86: hijack return address

2013-02-28 Thread Ananth N Mavinakayanahalli
On Thu, Feb 28, 2013 at 12:00:11PM +0100, Anton Arapov wrote: > hijack the return address and replace it with a "trampoline" > > v2: > - remove ->doomed flag, kill task immediately > > Signed-off-by: Anton Arapov > --- > arch/x86/include/asm/uprobes.h | 1 + > arch/x86/kernel/uprobes.c

Re: kprobing "hash_64.constprop.26" crashes the system, recursion through get_kprobe?

2013-02-28 Thread Ananth N Mavinakayanahalli
On Wed, Feb 27, 2013 at 11:42:41AM +0200, Timo Juhani Lindfors wrote: > > There is a long-standing problem in the systemtap community where > accidentally kprobing a delicate function causes the system to crash: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604453 > http://sourceware.org/b

Re: [PATCH 2/2] uprobes: Change handle_swbp() to expose bp_vaddr to handler_chain()

2012-12-31 Thread Ananth N Mavinakayanahalli
cross > the supported architectures. handle_swbp() becomes the only caller > of uprobe_get_swbp_addr(). The arch agnostic bits look fine to me. > Signed-off-by: Oleg Nesterov Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH v2 4/4] uprobes/powerpc: Make use of generic routines to enable single step

2012-12-18 Thread Ananth N Mavinakayanahalli
On Tue, Dec 18, 2012 at 08:10:13PM +0100, Oleg Nesterov wrote: > On 12/18, Ananth N Mavinakayanahalli wrote: > > > > On Fri, Dec 14, 2012 at 09:02:41PM +0100, Oleg Nesterov wrote: > > > > > > > > - uprobe_restore_context_sstep(&utask->autask)

Re: [PATCH v2 4/4] uprobes/powerpc: Make use of generic routines to enable single step

2012-12-17 Thread Ananth N Mavinakayanahalli
On Fri, Dec 14, 2012 at 09:02:41PM +0100, Oleg Nesterov wrote: > On 12/03, Suzuki K. Poulose wrote: > > > > Replace the ptrace helpers with the powerpc generic routines to > > enable/disable single step. We save/restore the MSR (and DCBR for BookE) > > across for the operation. We don't have to dis

Re: [PATCH v2 4/4] uprobes/powerpc: Make use of generic routines to enable single step

2012-12-10 Thread Ananth N Mavinakayanahalli
have to disable the single step, > as restoring the MSR/DBCR would restore the previous state. > > Signed-off-by: Suzuki K. Poulose Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [PATCH v2 3/4] uprobes/powerpc: Introduce routines for save/restore context

2012-12-10 Thread Ananth N Mavinakayanahalli
bout > the process once we replace the ptrace helpers. > > Signed-off-by: Suzuki K. Poulose Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [PATCH v2 2/4] powerpc: Move the single step enable code to a generic path

2012-12-10 Thread Ananth N Mavinakayanahalli
; > Signed-off-by: Suzuki K. Poulose > Cc: Ananth N Mavinakaynahalli > Cc: Kumar Gala > Cc: linuxppc-...@ozlabs.org Acked-by: Ananth N Mavinakayanahalli -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord..

Re: [PATCH v2 3/4] uprobes/powerpc: Introduce routines for save/restore context

2012-12-03 Thread Ananth N Mavinakayanahalli
On Mon, Dec 03, 2012 at 08:39:35PM +0530, Suzuki K. Poulose wrote: > From: Suzuki K. Poulose > > Introduce routines for saving and restoring the context > befre/after the single step. No functional changes involved. > > These will be extended later to save/restore more info about > the process o

Re: [PATCH 6/9] uprobes: flush cache after xol write

2012-11-04 Thread Ananth N Mavinakayanahalli
On Sat, Nov 03, 2012 at 05:33:01PM +0100, Oleg Nesterov wrote: > On 10/29, Ananth N Mavinakayanahalli wrote: > > > > On Fri, Oct 26, 2012 at 06:39:51PM +0200, Oleg Nesterov wrote: > > > > > > > > > OTOH, I do not understand this stuff, everything is

Re: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume()

2012-10-29 Thread Ananth N Mavinakayanahalli
On Mon, Oct 29, 2012 at 01:43:25PM +0100, Oleg Nesterov wrote: > On 10/29, Ananth N Mavinakayanahalli wrote: > > > > On Sun, Oct 28, 2012 at 06:39:25PM +0100, Oleg Nesterov wrote: > > > > Hi Oleg, > > > > > Cleanup. No need to clear TIF_UPROBE, do_notify_

Re: [PATCH 6/9] uprobes: flush cache after xol write

2012-10-28 Thread Ananth N Mavinakayanahalli
On Fri, Oct 26, 2012 at 06:39:51PM +0200, Oleg Nesterov wrote: > On 10/26, Ananth N Mavinakayanahalli wrote: > > > > On Thu, Oct 25, 2012 at 04:58:39PM +0200, Oleg Nesterov wrote: > > > On 10/16, Rabin Vincent wrote: > > > > > > > > >> --- a/

Re: [PATCH 2/4] uprobes/powerpc: Do not use arch_uprobe_*_step() helpers

2012-10-28 Thread Ananth N Mavinakayanahalli
eeds the arch-specific > fixes. Acked-by: Ananth N Mavinakayanahalli I will send a powerpc patch to directly use the MSR bits for stepping. Ananth -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordom

Re: [PATCH 1/4] uprobes/powerpc: Don't clear TIF_UPROBE in do_notify_resume()

2012-10-28 Thread Ananth N Mavinakayanahalli
On Sun, Oct 28, 2012 at 06:39:25PM +0100, Oleg Nesterov wrote: Hi Oleg, > Cleanup. No need to clear TIF_UPROBE, do_notify_resume() does this. > > Signed-off-by: Oleg Nesterov > --- > arch/powerpc/kernel/signal.c |4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > > diff --git a/

Re: [PATCH 6/9] uprobes: flush cache after xol write

2012-10-25 Thread Ananth N Mavinakayanahalli
On Thu, Oct 25, 2012 at 04:58:39PM +0200, Oleg Nesterov wrote: > On 10/16, Rabin Vincent wrote: > > > > 2012/10/15 Oleg Nesterov : > > > On 10/14, Rabin Vincent wrote: > > >> Flush the cache so that the instructions written to the XOL area are > > >> visible. > > >> > > >> Signed-off-by: Rabin Vinc

Re: [PATCH 1/4] uprobes: Kill set_swbp()->is_swbp_at_addr()

2012-09-24 Thread Ananth N Mavinakayanahalli
On Sun, Sep 23, 2012 at 10:19:45PM +0200, Oleg Nesterov wrote: > A separate patch for better documentation. > > set_swbp()->is_swbp_at_addr() is not needed for correctness, it is > harmless to do the unnecessary __replace_page(old_page, new_page) > when these 2 pages are identical. > > And it can

Re: [PATCH 3/5] uprobes: Fix UPROBE_SKIP_SSTEP checks in handle_swbp()

2012-09-15 Thread Ananth N Mavinakayanahalli
On Fri, Sep 14, 2012 at 07:15:57PM +0200, Oleg Nesterov wrote: > If handle_swbp()->add_utask() fails but UPROBE_SKIP_SSTEP is set, > cleanup_ret: path do not restart the insn, this is wrong. Remove > this check and add the additional label for can_skip_sstep() = T > case. > > Note also that UPROBE

Re: linux-next: build failure after merge of the final tree (powerpc tree related)

2012-09-06 Thread Ananth N Mavinakayanahalli
On Thu, Sep 06, 2012 at 05:11:53PM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the final tree, today's linux-next build (powerpc allyesconfig) > failed like this: > > In file included from drivers/atm/fore200e.c:70:0: > drivers/atm/fore200e.h:263:3: error: redefinition of typedef '

Re: [PATCH v5 3/3] powerpc: Uprobes port to powerpc

2012-09-04 Thread Ananth N Mavinakayanahalli
On Wed, Sep 05, 2012 at 03:26:59PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2012-08-24 at 13:01 +0530, Ananth N Mavinakayanahalli wrote: > > From: Ananth N Mavinakayanahalli > > > > This is the port of uprobes to powerpc. Usage is similar to x86. > > Guys, ca

Re: [PATCH v3] x86/uprobes: implement x86 specific arch_uprobe_*_step

2012-08-30 Thread Ananth N Mavinakayanahalli
On Thu, Aug 30, 2012 at 04:37:24PM +0200, Oleg Nesterov wrote: > On 08/30, Ananth N Mavinakayanahalli wrote: > > > > On Wed, Aug 29, 2012 at 07:37:48PM +0200, Oleg Nesterov wrote: > > > > > > Ananth, Sebastian, what if we start with the patch below? Then &g

Re: [PATCH v3] x86/uprobes: implement x86 specific arch_uprobe_*_step

2012-08-30 Thread Ananth N Mavinakayanahalli
On Wed, Aug 29, 2012 at 07:37:48PM +0200, Oleg Nesterov wrote: > On 08/22, Oleg Nesterov wrote: > > > > > Ehm. Is there anything I missed to do? Or are you speculating on > > > changes which will clash with these here? > > > > If we have task_set_blockstep(), then perhaps it mmakes sense to > > avo

Re: [PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-24 Thread Ananth N Mavinakayanahalli
On Fri, Aug 24, 2012 at 05:07:31PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2012-08-24 at 11:13 +1000, Michael Ellerman wrote: > > > > Yeah. A NULL regs here is a kernel bug, so I think it's actually > > preferable to crash than silently return. > > Or best, if you think there's a remote c

[PATCH v5 3/3] powerpc: Uprobes port to powerpc

2012-08-24 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli This is the port of uprobes to powerpc. Usage is similar to x86. [root@ ~]# ./bin/perf probe -x /lib64/libc.so.6 malloc Added new event: probe_libc:malloc(on 0xb4860) You can now use it in all perf tools, such as: perf record -e

[PATCH 2/3] powerpc: Add trap_nr to thread_struct

2012-08-24 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Add thread_struct.trap_nr and use it to store the last exception the thread experienced. In this patch, we populate the field at various places where we force_sig_info() to the process. This is also used in uprobes to determine if the probed instruction caused

[PATCH 1/3] powerpc: Consolidate *probe definitions

2012-08-24 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Move is_trap() and relatives to a common file to be shared between *probes. Code movement only; no change in functionality. Suggested by Michael Ellerman. Signed-off-by: Ananth N Mavinakayanahalli --- arch/powerpc/include/asm/kprobes.h | 15

Re: [PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Ananth N Mavinakayanahalli
On Thu, Aug 23, 2012 at 02:28:20PM +1000, Michael Ellerman wrote: > On Wed, 2012-08-22 at 13:57 +0530, Ananth N Mavinakayanahalli wrote: > > From: Ananth N Mavinakayanahalli > > > > This is the port of uprobes to powerpc. Usage is similar to x86. > > Hi Ananth,

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Ananth N Mavinakayanahalli
On Tue, Aug 21, 2012 at 03:09:30PM +0200, Oleg Nesterov wrote: ... > > This is true for Intel like architectures that have *one* swbp > > instruction. On Powerpc, gdb for instance, can insert a trap variant at > > the address. Therefore, is_swbp_insn() by definition should return true > > for all

[PATCH v4 2/2] powerpc: Uprobes port to powerpc

2012-08-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli This is the port of uprobes to powerpc. Usage is similar to x86. [root@ ~]# ./bin/perf probe -x /lib64/libc.so.6 malloc Added new event: probe_libc:malloc(on 0xb4860) You can now use it in all perf tools, such as: perf record -e

[PATCH 1/2] powerpc: Add trap_nr to thread_struct

2012-08-22 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Add thread_struct.trap_nr and use it to store the last exception the thread experienced. In this patch, we populate the field at various places where we force_sig_info() to the process. This is also used in uprobes to determine if the probed instruction caused

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-08-21 Thread Ananth N Mavinakayanahalli
On Fri, Aug 17, 2012 at 05:00:31PM +0200, Oleg Nesterov wrote: > On 08/17, Ananth N Mavinakayanahalli wrote: > > > > On Thu, Aug 16, 2012 at 05:21:12PM +0200, Oleg Nesterov wrote: > > > > > Hmm, I am not sure. is_swbp_insn(insn), as it is used in the arch agnostic

Re: [PATCH 71/74] lto, kprobes: Use KSYM_NAME_LEN to size identifier buffers

2012-08-20 Thread Ananth N Mavinakayanahalli
On Sat, Aug 18, 2012 at 07:57:07PM -0700, Andi Kleen wrote: > From: Joe Mario > > Use KSYM_NAME_LEN to size identifier buffers, so that it can > be easier increased. > > Cc: ana...@in.ibm.com > Signed-off-by: Joe Mario > Signed-off-by: Andi Kleen Acked-by: An

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-08-16 Thread Ananth N Mavinakayanahalli
On Thu, Aug 16, 2012 at 05:21:12PM +0200, Oleg Nesterov wrote: ... > > So, the arch agnostic code itself > > takes care of this case... > > Yes. I forgot about install_breakpoint()->is_swbp_insn() check which > returns -ENOTSUPP, somehow I thought arch_uprobe_analyze_insn() does > this. > > > o

Re: [PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-08-15 Thread Ananth N Mavinakayanahalli
On Thu, Aug 16, 2012 at 07:41:53AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-08-15 at 18:59 +0200, Oleg Nesterov wrote: > > On 07/26, Ananth N Mavinakayanahalli wrote: > > > > > > From: Ananth N Mavinakayanahalli > > > > > > This is the po

Re: [PATCH 2/5] x86/uprobes: implement x86 specific arch_uprobe_*_step

2012-08-08 Thread Ananth N Mavinakayanahalli
On Wed, Aug 08, 2012 at 04:53:45PM +0200, Oleg Nesterov wrote: > On 08/08, Sebastian Andrzej Siewior wrote: ... > >> ->insn[0] doesn't look right, we should skip the prefixes. insn_init() insn_get_opcode() if (OPCODE1() == 0x9d) is always the right way of doing it. ... > And in any case it wo

Re: [PATCH 2/2] x86/uprobes: implement x86 specific arch_uprobe_*_step

2012-08-01 Thread Ananth N Mavinakayanahalli
On Wed, Aug 01, 2012 at 03:43:37PM +0200, Oleg Nesterov wrote: ... > However, I am not sure we can trust it. We are in kernel mode, > DEBUGCTLMSR_BTF can be cleared by kprobes (Ananth, please correct me). > I think we need to check TIF_BLOCKSTEP. Kprobes resets DEBUGCTLMSR_BTF only if we have to

Re: [PATCH] uprobes: don't enable/disable signle step if the user did it

2012-07-30 Thread Ananth N Mavinakayanahalli
On Mon, Jul 30, 2012 at 04:16:38PM +0200, Oleg Nesterov wrote: > On 07/30, Ananth N Mavinakayanahalli wrote: > > > > On Thu, Jul 26, 2012 at 05:20:43PM +0200, Sebastian Andrzej Siewior wrote: > > > If someone is using single stepping over uprobe brackpoint then after

Re: [PATCH] uprobes: don't enable/disable signle step if the user did it

2012-07-30 Thread Ananth N Mavinakayanahalli
On Thu, Jul 26, 2012 at 05:20:43PM +0200, Sebastian Andrzej Siewior wrote: > If someone is using single stepping over uprobe brackpoint then after > we pass the uprobe single step, single stepping is disabled and the user > who enebaled them in the first place does not know anything about this. >

[PATCH v3 2/2] powerpc: Uprobes port to powerpc

2012-07-25 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli This is the port of uprobes to powerpc. Usage is similar to x86. [root@ ~]# ./bin/perf probe -x /lib64/libc.so.6 malloc Added new event: probe_libc:malloc(on 0xb4860) You can now use it in all perf tools, such as: perf record -e

[PATCH 1/2] powerpc: Add trap_nr to thread_struct

2012-07-25 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli Add thread_struct.trap_nr and use it to store the last exception the thread experienced. In this patch, we populate the field at various places where we force_sig_info() to the process. This is also used in uprobes to determine if the probed instruction caused

[PATCH 2/2] Kprobes: Move kprobe examples to samples/

2008-02-24 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli <[EMAIL PROTECTED]> Move kprobes examples from Documentation/kprobes.txt to under samples/. Patch originally by Randy Dunlap. o Updated the patch to apply on 2.6.25-rc3 o Modified examples code to build on multiple architectures. Currently, the kpro

[PATCH 1/2] Kprobes: Indicate kretprobe support in Kconfig

2008-02-24 Thread Ananth N Mavinakayanahalli
From: Ananth N Mavinakayanahalli <[EMAIL PROTECTED]> This patch adds CONFIG_HAVE_KRETPROBES to the arch//Kconfig file for relevant architectures with kprobes support. This facilitates easy handling of in-kernel modules (like samples/kprobes/kretprobe_example.c) that depend on kretprobes

Re: [GIT PULL?] Create and populate toplevel tests/ for kernel tests

2008-02-21 Thread Ananth N Mavinakayanahalli
On Fri, Feb 22, 2008 at 03:57:13PM +1100, Stephen Rothwell wrote: > Hi Ananth, > > On Fri, 22 Feb 2008 09:12:31 +0530 Ananth N Mavinakayanahalli <[EMAIL > PROTECTED]> wrote: > > > > The patchset in question is just a major code movement - basically to > > move

Re: [GIT PULL?] Create and populate toplevel tests/ for kernel tests

2008-02-21 Thread Ananth N Mavinakayanahalli
st-wlock-softirq.h |0 > > {lib => tests}/locking-selftest-wlock.h |0 > > {lib => tests}/locking-selftest-wsem.h |0 > > {lib => tests}/locking-selftest.c |0 > > {kernel => tests}/rcutorture.c |

Re: [GIT PULL?] Create and populate toplevel tests/ for kernel tests

2008-02-20 Thread Ananth N Mavinakayanahalli
{lib => tests}/locking-selftest-wlock-hardirq.h |0 > > {lib => tests}/locking-selftest-wlock-softirq.h |0 > > {lib => tests}/locking-selftest-wlock.h |0 > > {lib => tests}/locking-selftest-wsem.h |0 > > {lib => tests}

  1   2   >