x86, asm: Thin down SAVE/RESTORE_* asm macros

    Use dwarf2 cfi annotation macros, making SAVE/RESTORE_* marginally more
    readable.

    No functionality change.

    Signed-off-by: Borislav Petkov <bp@alien8.de>
    Link: http://lkml.kernel.org/r/1306873314-32523-2-git-send-email-bp@alien8.de
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
x86, asm: Flip SAVE_ARGS arguments logic

    This saves us the else part of the conditional statement in the macro.

    No functionality change.

    Signed-off-by: Borislav Petkov <bp@alien8.de>
    Link: http://lkml.kernel.org/r/1306873314-32523-3-git-send-email-bp@alien8.de
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
x86, asm: Flip RESTORE_ARGS arguments logic

    ... thus getting rid of the "else" part of the conditional statement in
    the macro.

    No functionality change.

    Signed-off-by: Borislav Petkov <bp@alien8.de>
    Link: http://lkml.kernel.org/r/1306873314-32523-4-git-send-email-bp@alien8.de
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
x86, asm: Cleanup thunk_64.S

    Drop thunk_ra macro in favor of an additional argument to the thunk
    macro since their bodies are almost identical. Do a whitespace scrubbing
    and use CFI-aware macros for full annotation.

    Signed-off-by: Borislav Petkov <bp@alien8.de>
    Link: http://lkml.kernel.org/r/1306873314-32523-5-git-send-email-bp@alien8.de
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
x86, asm: Fix binutils 2.16 issue with __USER32_CS

    While testing the patchset at

    http://lkml.kernel.org/r/1306873314-32523-1-git-send-email-bp@alien8.de

    with binutils 2.16.1 from hell, kernel build fails with the following
    error:

    arch/x86/ia32/ia32entry.S: Assembler messages:
    arch/x86/ia32/ia32entry.S:139: Error: too many positional arguments
    make[2]: *** [arch/x86/ia32/ia32entry.o] Error 1
    make[1]: *** [arch/x86/ia32] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [arch/x86] Error 2
    make: *** Waiting for unfinished jobs....

    due to spaces between the operators of the __USER32_CS define. Fix it so
    that gas 2.16 can swallow it too.

    Signed-off-by: Borislav Petkov <bp@alien8.de>
    Link: http://lkml.kernel.org/r/1307131642-32595-1-git-send-email-bp@alien8.de
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
ptrace: remove silly wait_trap variable from ptrace_attach()

    Remove local variable wait_trap which determines whether to wait for
    !TRAPPING or not and simply wait for it if attach was successful.

    -v2: Oleg pointed out wait should happen iff attach was successful.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
job control: rename signal->group_stop and flags to jobctl and update them

    signal->group_stop currently hosts mostly group stop related flags;
    however, it's gonna be used for wider purposes and the GROUP_STOP_
    flag prefix becomes confusing.  Rename signal->group_stop to
    signal->jobctl and rename all GROUP_STOP_* flags to JOBCTL_*.

    Bit position macros JOBCTL_*_BIT are defined and JOBCTL_* flags are
    defined in terms of them to allow using bitops later.

    While at it, reassign JOBCTL_TRAPPING to bit 22 to better accomodate
    future additions.

    This doesn't cause any functional change.

    -v2: JOBCTL_*_BIT macros added as suggested by Linus.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>