public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-05-21 14:00 K.Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: K.Prasad @ 2009-05-21 14:00 UTC (permalink / raw)
  To: Ingo Molnar, Frederic Weisbecker; +Cc: Linux Kernel Mailing List, Alan Stern

Hi Ingo,
	Please find the patchset that introduces generic Hardware Breakpoint
interfaces and an implementation for x86/x86_64 architecture.

In this iteration, the patches for HW Breakpoint interfaces sent here:
http://lkml.org/lkml/2009/5/15/139 have been combined with patches containing
improvements and minor fixes (posted here: http://lkml.org/lkml/2009/5/19/264)
for easy integration into -tip tree.

Kindly accept the same.

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-06-01 18:12 K.Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: K.Prasad @ 2009-06-01 18:12 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: Linux Kernel Mailing List, Ingo Molnar, Alan Stern

Hi Frederic,
	Please find a new patchset that contains a slight re-arrangement in the
patchset as suggested by you here: http://lkml.org/lkml/2009/5/30/165.

The 'struct thread_struct' is modified to contain an array-based storage for
debug register in Patch 01/12 and all users of debugreg<n> are also modified in
the same patch.

Kindly integrate them to be a part of -tip tree.

Thanks,
K.Prasad



^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-05-30 10:47 K.Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: K.Prasad @ 2009-05-30 10:47 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: Linux Kernel Mailing List, Ingo Molnar, Alan Stern

Hi Frederic,
	Please find a new iteration of the patchset that includes the following
changes over the previous version posted here: http://lkml.org/lkml/2009/5/21/143.

Changelog
----------

- Includes a minor change in Patch 8/12 that renames a variable from 'temp'
  to 'bp_info'.

- Updated comment in __switch_to() function to reflect the new method used
  to detect lazy debug register switching (Patch 6/12).

- Moved the patch that removes 'debugreg<n>' members from 'struct thread_struct'
  to Patch 8/12 in order to enable compilation of the kernel tree after
  application of every patch in the patchset.

Kindly integrate the patchset into -tip tree. They are based on commit
0a834a9c61bb279327c50300e43ebb6de7e1e0d7 of the same tree.

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-05-16  0:23 K.Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: K.Prasad @ 2009-05-16  0:23 UTC (permalink / raw)
  To: Ingo Molnar, Linux Kernel Mailing List
  Cc: Alan Stern, Frederic Weisbecker, Steven Rostedt, Andrew Morton,
	Benjamin Herrenschmidt, maneesh, Roland McGrath, Masami Hiramatsu

Hi Ingo,
	Please find the patchset that introduce generic Hardware Breakpoint
interfaces and an implementation for x86/x86_64 arch. The
"Original-patch-by:" and "Reviewed-by:" fields have been added as
appropriate.

The patches are based on commit cab667c10f6b4a86787a57184f6e18459bbab7b0
of -tip tree. Kindly accept them to be a part of the tree.

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-05-15 10:53 K.Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: K.Prasad @ 2009-05-15 10:53 UTC (permalink / raw)
  To: Ingo Molnar, Linux Kernel Mailing List
  Cc: Alan Stern, Frederic Weisbecker, Steven Rostedt, Andrew Morton,
	Benjamin Herrenschmidt, maneesh, Roland McGrath, Masami Hiramatsu

Hi Ingo,
        Please find a new patchset that implements generic Hardware Breakpoint
interfaces and an implementation for x86/x86_64 architecture. The patches have
undergone several changes since their last submission to you and is more refined
now.

Kindly accept them to be a part of -tip tree.

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-05-13 16:12 K.Prasad
  2009-05-14 20:02 ` Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: K.Prasad @ 2009-05-13 16:12 UTC (permalink / raw)
  To: Alan Stern, Frederic Weisbecker
  Cc: Steven Rostedt, Ingo Molnar, Linux Kernel Mailing List,
	Andrew Morton, Benjamin Herrenschmidt, maneesh, Roland McGrath,
	Masami Hiramatsu

Hi Alan,
	Please find a new set of patches with the following changes.
I am eager to know if you think that they are ready for submission towards
upstream acceptance.

Hi Frederic,
	Please find the changes in ftrace plugin code that moves the 
startup selftest code completely into trace_selftest_startup_ksym() as
per your suggestion.

Changelog
---------

- A new interface modify_user_hw_breakpoint() to change the characteristics
  (such as type/length) of a pre-registered user-space breakpoint is introduced.

- The startup selftest portion of code from ksym_trace_init() is moved
  completely to trace_selftest_startup_ksym(). process_new_ksym_entry() is
  required during the selftest and is no longer marked static.

- HB_NUM is renamed to HBP_NUM (given that the short naming convention for
  hw_breakpoint is hbp).

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint interfaces
@ 2009-05-11 11:51 K.Prasad
  0 siblings, 0 replies; 20+ messages in thread
From: K.Prasad @ 2009-05-11 11:51 UTC (permalink / raw)
  To: Alan Stern, Steven Rostedt, Frederic Weisbecker
  Cc: Ingo Molnar, Linux Kernel Mailing List, Andrew Morton,
	Benjamin Herrenschmidt, maneesh, Roland McGrath, Masami Hiramatsu

Hi Alan,
	Please find the new set of patches with the changes mentioned below.
Kindly let me know your comments with respect to the same.

Hi Frederic/Steven,
	Please find a few changes in the ftrace plugin code w.r.t.
synchronisation primitives (prefixed in the changelog with FTRACE). Kindly let
me know your comments.

Changelog
-----------

- on_each_cpu() call will now return only after all functions calls made through
  IPI have finished (@wait parameter is set to 1). This is required since
  changes made in code following on_each_cpu() [such as incrementing
  hbp_kernel_pos] have side-effects on the execution of the functions invoked
  through IPIs. It is also safe to make them wait inside spin_lock() context as
  it does a busy wait using cpu_relax().

- Introduced a new per-cpu array of pointers to 'struct hw_breakpoint'
  called 'this_hbp_kernel'. This per-cpu variable helps overcome any
  side-effects in  hbp_handler() due to parallel execution of
  (un)register_kernel_hw_breakpoint()  on other CPUs causing 'hbp_kernel' value
  to change.

- Hardware Breakpoint exceptions due to lazy debug register switching is
  now identified through the absence of TIF_DEBUG task flag in the current
  process. This eliminates the  need to store the process that last set the
  debug register in  'last_debugged_task'.

- Converted spin_lock() in kernel/hw_breakpoint.c to spin_lock_bh(). This is
  to ward-off potential circular dependancy over 'hw_breakpoint_lock' when
  flush_thread_hw_breakpoint() is invoked in softIRQ context.

- Ptrace code now directly uses the exported interfaces
  (un)register_user_hw_breakpoint() thereby addressing some of the issues
  pointed out in code-review here:http://lkml.org/lkml/2009/5/4/367.

- An optimisation in arch_update_kernel_hw_breakpoints() code resulting in a
  few modifications to the function and removal of kdr7_masks[] global array (as
  pointed out by Alan Stern).

- [FTRACE] Implementation of RCU based locking mechanism in the ftrace plugin
  code (kernel/trace/trace_ksym.c), specially to avoid the potential circular
  dependancy through ksym_collect_stats() invoked in exception context (while
  attempting to acquite a spin_lock() already used in control-plane). All
  add/delete operations to the hlist pointed by 'ksym_filter_head' are now
  protected by RCU.

- [FTRACE] Revert the spin_lock() based implementation in kernel/trace/trace_ksym.c
  to mutex based one, as a result of the above change. These locks are no longer
  required in preempt_disable() code due to RCU implementation in
  ksym_collect_stats() and hence the change.

- The patches are now based on commit 5863f0756c57cc0ce23701138bfc88ab3d1f3721
  of -tip tree.

Thanks,
K.Prasad


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [Patch 00/12] Hardware Breakpoint Interfaces
@ 2009-04-24  6:13 K.Prasad
  2009-05-04 20:55 ` Alan Stern
  0 siblings, 1 reply; 20+ messages in thread
From: K.Prasad @ 2009-04-24  6:13 UTC (permalink / raw)
  To: Alan Stern, Steven Rostedt, Frederic Weisbecker
  Cc: Ingo Molnar, Linux Kernel Mailing List, Andrew Morton,
	Benjamin Herrenschmidt, maneesh, Roland McGrath

Hi Alan,
	The following patches contain the changes mentioned below and is based
on commit 335a1e07e2281795064b909aa75e3071609abd0e of -tip tree.

The changes to passing of DR6 register value in traps.c is separated into
[Patch 12/12]. kprobes and HW breakpoints have been found to work fine after 
the changes on an x86 box.

Kindly let me know what you think of the changes.

Hi Steven/Frederick,
		The changes to the ftrace plugin that converts all mutex locks
into spinlocks are done now and have been tested to work fine. The patch can be 
found in Patch 11/12. Kindly acknowledge the same.

Changelog
-----------
- Convert hw_breakpoint_mutex into a spinlock() based implementation (will now
  be called as hw_breakpoint_lock). This is to avoid a call to a mutex (which
  can potentially sleep) in the context of a softIRQ through which
  flush_thread_hw_breakpoint() is invoked at the time of process exit.
- Call put_cpu_no_resched() unconditionally in hw_breakpoint_handler() code (the
  previous code erroneously invoked it inside an "if" condition)
- Use PTR_ERR and ERR_PTR macros for passing dr6 register value in do_debug()
- Reset bits in local copy of DR6 register in do_debug() function to indicate
  that the exception corresponding to the bit has been handled.
- Convert all synchronisation primitives into spinlocks in trace_ksym.c to
  prevent the potential interference between statistics collection code in
  ksym_collect_stats() with other ksym filter file's read/write routines.
- A few changes in comments and code following comments from Alan Stern.

Thanks,
K.Prasad



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2009-06-01 18:12 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 14:00 [Patch 00/12] Hardware Breakpoint interfaces K.Prasad
  -- strict thread matches above, loose matches on Subject: below --
2009-06-01 18:12 K.Prasad
2009-05-30 10:47 K.Prasad
2009-05-16  0:23 K.Prasad
2009-05-15 10:53 K.Prasad
2009-05-13 16:12 K.Prasad
2009-05-14 20:02 ` Alan Stern
2009-05-14 20:08   ` K.Prasad
2009-05-14 20:45     ` K.Prasad
2009-05-11 11:51 K.Prasad
2009-04-24  6:13 [Patch 00/12] Hardware Breakpoint Interfaces K.Prasad
2009-05-04 20:55 ` Alan Stern
2009-05-11 11:36   ` K.Prasad
2009-05-11 14:50     ` Alan Stern
2009-05-11 17:20       ` K.Prasad
2009-05-11 18:09         ` Alan Stern
2009-05-12 14:05           ` K.Prasad
2009-05-12 14:55             ` Alan Stern
2009-05-12 17:12               ` K.Prasad
2009-05-12 20:39                 ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox