android_kernel_xiaomi_sm8350/arch/x86_64/kernel
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
..
acpi [PATCH] x86-64: Remove fastcall references in x86_64 code 2007-02-13 13:26:22 +01:00
cpufreq [PATCH] X86_P4_CLOCKMOD must select CPU_FREQ_TABLE 2007-03-18 11:35:07 -07:00
aperture.c
apic.c [PATCH] time: x86_64: convert x86_64 to use GENERIC_TIME 2007-02-16 08:14:00 -08:00
asm-offsets.c
audit.c
crash_dump.c
crash.c
e820.c [PATCH] x86-64: fix section mismatch warnings 2007-03-16 21:07:36 +01:00
early_printk.c
early-quirks.c [PATCH] x86-64: fix section mismatch warnings 2007-03-16 21:07:36 +01:00
entry.S [PATCH] x86_64 irq: Safely cleanup an irq after moving it. 2007-02-26 10:34:08 -08:00
functionlist
genapic_cluster.c
genapic_flat.c
genapic.c
head64.c [PATCH] Dynamic kernel command-line: fixups 2007-02-12 09:48:39 -08:00
head.S [PATCH] x86-64: x86_64 - Fix FS/GS registers for VT execution 2007-02-13 13:26:24 +01:00
hpet.c [PATCH] clocksource init adjustments (fix bug #7426) 2007-03-05 07:57:53 -08:00
i387.c
i8259.c [PATCH] x86_64 irq: Safely cleanup an irq after moving it. 2007-02-26 10:34:08 -08:00
init_task.c
io_apic.c [PATCH] x86_64: remove unusued 'flags' variable 2007-03-05 07:57:53 -08:00
ioport.c [PATCH] x86-64: Use constant instead of raw number in x86_64 ioperm.c 2007-02-13 13:26:22 +01:00
irq.c [PATCH] x86-64: survive having no irq mapping for a vector 2007-02-13 13:26:25 +01:00
k8.c
kprobes.c
ldt.c
machine_kexec.c
Makefile [PATCH] time: x86_64: split x86_64/kernel/time.c up 2007-02-16 08:14:00 -08:00
mce_amd.c [PATCH] x86-64: Allow to run a program when a machine check event is detected 2007-02-13 13:26:23 +01:00
mce_intel.c
mce.c [PATCH] x86-64: Allow to run a program when a machine check event is detected 2007-02-13 13:26:23 +01:00
module.c
mpparse.c [PATCH] x86-64: fix section mismatch warnings 2007-03-16 21:07:36 +01:00
nmi.c Disable NMI watchdog by default properly 2007-03-14 17:53:43 -07:00
pci-calgary.c [PATCH] x86-64: robustify bad_dma_address handling 2007-02-13 13:26:24 +01:00
pci-dma.c [PATCH] x86-64: improved iommu documentation 2007-02-13 13:26:21 +01:00
pci-gart.c [PATCH] x86-64: fix section mismatch warnings 2007-03-16 21:07:36 +01:00
pci-nommu.c
pci-swiotlb.c
pmtimer.c [PATCH] time: x86_64: convert x86_64 to use GENERIC_TIME 2007-02-16 08:14:00 -08:00
process.c [PATCH] Fix atomicity of TIF update in flush_thread() for x86_64 2007-03-18 11:35:08 -07:00
ptrace.c [PATCH] x86-64: Check return value of putreg in PTRACE_SETREGS 2007-02-13 13:26:24 +01:00
reboot.c
relocate_kernel.S
setup64.c [PATCH] x86-64: Unexport __supported_pte_mask 2007-02-13 13:26:24 +01:00
setup.c [PATCH] x86: Unify pcspeaker platform device code between i386/x86-64 2007-02-13 13:26:26 +01:00
signal.c
smp.c
smpboot.c [PATCH] CPU hotplug: call check_tsc_sync_source() with irqs off 2007-03-07 10:07:24 -08:00
stacktrace.c [PATCH] x86-64: do not always end the stack trace with ULONG_MAX 2007-02-13 13:26:21 +01:00
suspend_asm.S
suspend.c
sys_x86_64.c
syscall.c
tce.c
time.c [PATCH] clocksource init adjustments (fix bug #7426) 2007-03-05 07:57:53 -08:00
trampoline.S
traps.c
tsc_sync.c [PATCH] x86: rewrite SMP TSC sync code 2007-02-16 08:13:57 -08:00
tsc.c [PATCH] clocksource init adjustments (fix bug #7426) 2007-03-05 07:57:53 -08:00
vmlinux.lds.S [PATCH] time: x86_64: re-enable vsyscall support for x86_64 2007-02-16 08:14:00 -08:00
vsmp.c
vsyscall.c [PATCH] misc NULL noise 2007-03-14 15:27:49 -07:00
x8664_ksyms.c [PATCH] x86: Export _proxy_pda for gcc 4.2 2007-03-16 21:07:36 +01:00