android_kernel_xiaomi_sm8350/arch/ia64
Cliff Wickman 4ac0068f44 [IA64] ptrace - find memory sharers on children list
In arch/ia64/kernel/ptrace.c there is a test for a peek or poke of a
register image (in register backing storage).
The test can be unnecessarily long (and occurs while holding the tasklist_lock).
Especially long on a large system with thousands of active tasks.

The ptrace caller (presumably a debugger) specifies the pid of
its target and an address to peek or poke.  But the debugger could be
attached to several tasks.
The idea of find_thread_for_addr() is to find whether the target address
is in the RBS for any of those tasks.

Currently it searches the thread-list of the target pid.  If that search
does not find a match, and the shared mm-struct's user count indicates
that there are other tasks sharing this address space (a rare occurrence),
a search is made of all the tasks in the system.

Another approach can drastically shorten this procedure.
It depends upon the fact that in order to peek or poke from/to any task,
the debugger must first attach to that task.  And when it does, the
attached task is made a child of the debugger (is chained to its children list).

Therefore we can search just the debugger's children list.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-27 16:15:03 -07:00
..
configs [IA64] Manual merge fix for 3 files 2005-09-08 14:27:13 -07:00
dig Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hp [IA64] Fix simscsi for new SCSI midlayer 2005-09-22 10:42:39 -07:00
ia32 [PATCH] error path in setup_arg_pages() misses vm_unacct_memory() 2005-09-14 11:18:13 -07:00
kernel [IA64] ptrace - find memory sharers on children list 2005-10-27 16:15:03 -07:00
lib [PATCH] swiotlb: make sure initial DMA allocations really are in DMA memory 2005-10-19 23:11:33 -07:00
mm Pull sim-fixes into release branch 2005-09-11 14:27:15 -07:00
oprofile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pci [IA64] Minor cleanups - remove CONFIG_ACPI_DEALLOCATE_IRQ 2005-09-07 14:00:08 -07:00
scripts Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sn Pull sn-features into release branch 2005-09-11 14:34:23 -07:00
defconfig [IA64] Manual merge fix for 3 files 2005-09-08 14:27:13 -07:00
install.sh Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Kconfig [LIB]: Consolidate _atomic_dec_and_lock() 2005-09-14 21:47:01 -07:00
Kconfig.debug [PATCH] Kprobes/IA64: arch specific handling 2005-06-23 09:45:22 -07:00
Makefile [IA64] fix circular dependency on generation of asm-offsets.h 2005-09-13 08:50:39 -07:00
module.lds Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00