This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 03/21] nptl: x86_64: Fix Race conditions in pthread cancellation (BZ#12683)
* Adhemerval Zanella:
> diff --git a/sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S b/sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S
> new file mode 100644
> index 0000000000..c7364bfff8
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/x86_64/syscall_cancel.S
> +ENTRY (__syscall_cancel_arch)
> +
> + .globl __syscall_cancel_arch_start
> + .type __syscall_cancel_arch_start,@function
I don't think we should specify a type for this symbol. It's not a
function.
> +__syscall_cancel_arch_start:
> +
> + /* if (*cancelhandling & CANCELED_BITMASK)
> + __syscall_do_cancel() */
> + mov (%rdi),%eax
> + testb $4, (%rdi)
> + jne __syscall_do_cancel
I'm pretty sure 4 should be one of the _BITMASK constants.
> + /* Issue a 6 argument syscall, the nr [%rax] being the syscall
> + number. */
> + mov %rdi,%r11
> + mov %rsi,%rax
> + mov %rdx,%rdi
> + mov %rcx,%rsi
> + mov %r8,%rdx
> + mov %r9,%r10
> + mov 8(%rsp),%r8
> + mov 16(%rsp),%r9
> + mov %r11,8(%rsp)
> + syscall
> +
> + .globl __syscall_cancel_arch_end
> + .type __syscall_cancel_arch_end,@function
Again, no type here please. It will confuse the disassembler.
Thanks,
Florian