• Eric Paris's avatar
    audit: ia32entry.S sign extend error codes when calling 64 bit code · f031cd25
    Eric Paris authored
    In the ia32entry syscall exit audit fastpath we have assembly code which calls
    __audit_syscall_exit directly.  This code was, however, zeroes the upper 32
    bits of the return code.  It then proceeded to call code which expects longs
    to be 64bits long.  In order to handle code which expects longs to be 64bit we
    sign extend the return code if that code is an error.  Thus the
    __audit_syscall_exit function can correctly handle using the values in
    snprintf("%ld").  This fixes the regression introduced in 5cbf1565.
    
    Old record:
    type=SYSCALL msg=audit(1306197182.256:281): arch=40000003 syscall=192 success=no exit=4294967283
    New record:
    type=SYSCALL msg=audit(1306197182.256:281): arch=40000003 syscall=192 success=no exit=-13
    Signed-off-by: default avatarEric Paris <eparis@redhat.com>
    Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
    f031cd25
ia32entry.S 22.6 KB