linux/arch
Mathieu Desnoyers 303cd1535f [PATCH] Fix atomicity of TIF update in flush_thread() for x86_64
Fix atomicity of TIF update in flush_thread() for x86_64

Race :

parent process executing :
sys_ptrace()
 (lock_kernel())
 (ptrace_get_task_struct(pid))
 arch_ptrace()
   ptrace_detach()
     ptrace_disable(child);
       clear_singlestep(child);
         clear_tsk_thread_flag(child, TIF_SINGLESTEP);
         (which clears the TIF_SINGLESTEP flag atomically from a different
	  process)
 (put_task_struct(child))
 (unlock_kernel())

And at the same time, in the child process :
sys_execve()
 do_execve()
   search_binary_handler()
     load_elf_binary()
       flush_old_exec()
         flush_thread()
           doing a non-atomic thread flag update

Signed-off-by: Rebecca Schultz <rschultz@google.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18 11:35:08 -07:00
..
alpha [PATCH] Dynamic kernel command-line: alpha 2007-02-12 09:48:37 -08:00
arm [PATCH] gpio_direction_output() needs an initial value 2007-03-16 19:25:04 -07:00
arm26 [PATCH] arch/arm26/kernel/entry.S: remove dead code 2007-03-01 14:53:35 -08:00
avr32 [PATCH] gpio_direction_output() needs an initial value 2007-03-16 19:25:04 -07:00
cris [PATCH] fix memory leak in dma_declare_coherent_memory() 2007-03-01 14:53:39 -08:00
frv [PATCH] FRV: No ZONE_DMA 2007-03-01 14:53:36 -08:00
h8300 [PATCH] Declare init_irq_proc before we use it. 2007-02-19 14:21:50 -08:00
i386 [PATCH] x86: Export _proxy_pda for gcc 4.2 2007-03-16 21:07:36 +01:00
ia64 [PATCH] Fix wrong /proc/iomem on SGI Altix 2007-03-18 11:35:07 -07:00
m32r Various typo fixes. 2007-02-17 19:07:33 +01:00
m68k [PATCH] Declare init_irq_proc before we use it. 2007-02-19 14:21:50 -08:00
m68knommu [PATCH] m68knommu: remove local_bh_count 2007-03-06 18:08:38 -08:00
mips [MIPS] Kconfig: Move missplaced NR_CPUS default from SMTC to VSMP. 2007-03-17 01:03:29 +00:00
parisc [PARISC] clocksource: Move update_cr16_clocksource later in boot 2007-02-26 22:21:22 -05:00
powerpc [PATCH] pasemi trivial iomem annotations 2007-03-14 15:27:50 -07:00
ppc mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data 2007-03-06 06:14:54 -05:00
s390 [PATCH] appldata build fix 2007-03-14 15:27:48 -07:00
sh sh: Kill off I/O cruft for R7780RP. 2007-03-05 20:19:57 +09:00
sh64 [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
sparc [PATCH] sparc: nr_free_pages() is unsigned long 2007-03-14 15:27:50 -07:00
sparc64 [SPARC64]: Use Kconfig.preempt 2007-03-17 15:23:22 -07:00
um [PATCH] stacktrace doesn't work on uml 2007-03-14 15:27:49 -07:00
v850 kbuild: Replace remaining "depends" with "depends on" 2007-02-17 19:05:24 +01:00
x86_64 [PATCH] Fix atomicity of TIF update in flush_thread() for x86_64 2007-03-18 11:35:08 -07:00
xtensa [PATCH] Dynamic kernel command-line: xtensa 2007-02-12 09:48:39 -08:00