[Patch 00/11] Hardware Breakpoint interfaces

From: K.Prasad
Date: Tue Apr 07 2009 - 02:35:17 EST


Hi Alan,
I am sending you the patches with the changes mentioned in the
Changelog below. Please read the patches in conjunction with my replies
sent to your previous comments.

Let me know your thoughts on this.

Changelog
-----------
- Introduce (un)register_user_hw_breakpoint() which would take two parameters -
pointer to 'struct task_struct' and 'struct hw_breakpoint'.
- Change the return value behaviour in ptrace(). Return '0' for write in DR0 -
DR3 (with the exception being when the registered address is not in
user-space), while restricting error returns for write in DR7. Move memory
(de)allocation behaviour for 'struct hw_breakpoint' to ptrace related code and
flush_thread_hw_breakpoint() from unregister_user_hw_breakpoint() code.
- Addition of arch_flush_thread_hw_breakpoint() to zero-out thread->debugreg[n]
registers.
- Consolidate arch-specific kernel/thread update routines into
arch_update_kernel_hw_breakpoints() and arch_update_user_hw_breakpoint()
routines.
- Re-arrange the patchset to enable compilation after application of every
patch in the patchset.
- hw_breakpoint_handler() modified to:
- Unconditionally invoke (*trigger) function call
- Return NOTIFY_DONE only when other bits in DR6 are set or when
breakpoint originates due to an address in user-space
- Do an early return if trap bits are not set and we have entered the handler
because of BT, BS or BD bits in dr6 being set.
- samples/hw_breakpoint/data_breakpoint.c modified to accept module
parameters

The patchset is based on commit f0e36dc28173b65df2216dfae7109645d97a1bd9 of -tip
tree.

Thanks,
K.Prasad


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/