Commit Graph

6337 Commits

Author SHA1 Message Date
daaf8ab7fe Update copyright headers
Headers updated automatically using maint/update_copyright_years.sh
script.
2018-02-13 22:00:00 +00:00
Eugene Syromyatnikov
3e97bf63fc Remove old and unused maintenance scripts
Firewell, last witnesses of bygone era.

* linux/sparc/gen.pl: Remove.
* linux/x86_64/gentab.pl: Likewise.
* xlate.el: Likewise.
* Makefile.am (EXTRA_DIST): Remove them.

Suggested-by: Elvira Khabirova <lineprinter@altlinux.org>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-02-13 21:36:08 +00:00
ae8c1d5cc7 Consistently use MAX_ERRNO_VALUE
* filter_qualify.c (parse_inject_token): Replace 4095
with MAX_ERRNO_VALUE.
* negated_errno.h (is_negated_errno): Likewise.  Remove redundant
comment.
2018-02-13 05:05:13 +00:00
4b36fd69f7 Export SIZEOF_LONG and SIZEOF_KERNEL_LONG_T to tests
* configure.ac (AC_SUBST): Add SIZEOF_LONG and SIZEOF_KERNEL_LONG_T.
* tests/Makefile.am (SIZEOF_LONG, SIZEOF_KERNEL_LONG_T): New variables.
(AM_TEST_LOG_FLAGS): Pass them.
* bootstrap: Substitute them.
2018-02-13 04:17:08 +00:00
Eugene Syromyatnikov
101621d4c7 tests: avoid ioctl_kvm_run test failure when built with gcc -O0
When built with -O0, gcc (rightfully) generates function prologue, which
results in writing %rbp to the stack, causing premature KVM_EXIT_MMIO.
It could be possible to avoid such problems by "naked" attribute but,
unfortunately, the latter is not available on x86 with older GCC.
A trick suggested in [1] is used instead: assembly is moved
to the global scope.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50242#c3

* tests/ioctl_kvm_run.c (code): Remove function.
Add globally scoped __asm__ with the function code and its size.
(code, code_size): New extern symbols declarations.
(run_kvm): Remove code_size definition and initialization.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-02-13 03:12:29 +00:00
Eugene Syromyatnikov
9730e10317 tests/ioctl_kvm_run.c: add KVM_EXIT_MMIO diagnostics
As it has proven itself useful.

* tests/ioctl_kvm_run.c (run_kvm) <case KVM_EXIT_MMIO:>: Fail
on unexpected KVM_EXIT_MMIO, providing relevant diagnostics.
2018-02-13 03:12:29 +00:00
Eugene Syromyatnikov
46c6c7d776 tests: add compatibility layer for accept call
Recent glibc (since version 2.26) uses accept4 syscall for implementing
accept call on sparc.  Unfortunately, it's impossible to simply fall
back on raw syscall as it had not been wired up until linux commit
v4.4-rc8~4^2~1.

* tests/accept_compat.h: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/net-y-unix.c: Include accept_compat.h, use do_accept()
instead of accept() calls.
* tests/net-yy-inet.c: Likewise.
* tests/net-yy-unix.c: Likewise.
* tests/net.expected: Allow accept4.
2018-02-13 03:12:29 +00:00
66c1739d86 debian: build strace-udeb separately
* debian/rules (extra_build_targets): Add build-udeb-stamp.
(build-udeb/Makefile): New rule.
(clean): Remove build-udeb.
* debian/strace-udeb.install: Update.

Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=826223
2018-02-12 19:54:18 +00:00
2cf88b2646 Enable symbol demangling in deb- and rpm-driven builds
* debian/control (Build-Depends) [amd64]: Add libiberty-dev.
* strace.spec.in (buildrequires_libunwind_devel): Add binutils-devel.
2018-02-12 19:54:18 +00:00
3c77491654 debian: re-enable -k option on x86_64
This partially reverts commit v4.13~177.

* debian/control (Build-Depends) [amd64]: Add libunwind-dev.
2018-02-12 19:54:18 +00:00
7d7667629d Add "strace -V" output to build log
* strace.spec.in (%check): Print "strace -V" output before
running the test suite.
* debian/rules (%-stamp): Likewise.
2018-02-12 19:54:18 +00:00
Eugene Syromyatnikov
adf272d7ce xlat: update NT_* constants
* xlat/nt_descriptor_types.in (NT_PPC_PKEY): New constant introduced
by linux kernel commit v4.16-rc1~93^2~72.
2018-02-12 19:54:18 +00:00
Eugene Syromyatnikov
31e1025264 Update the list of PKEY_* constants
* xlat/pkey_access.in (PKEY_DISABLE_EXECUTE): New constant introduced
by linux kernel commit v4.16-rc1~93^2~85.
* tests/pkey_alloc.c: Update expected output.
* NEWS: Mention it.
2018-02-12 18:28:16 +00:00
Eugene Syromyatnikov
850bb4124f powerpc, powerpc64: wire up pkey_* syscalls
* linux/powerpc/syscallent.h [384..386]: Add pkey_alloc,
pkey_free, and pkey_mprotect syscalls introduced by linux kernel
commits v4.16-rc1~93^2~70 and v4.16-rc1~93^2~69, respectively.
* linux/powerpc64/syscallent.h: Likewise.
* NEWS: Mention it.
2018-02-12 18:28:16 +00:00
Eugene Syromyatnikov
2a368bd36f Update NEWS 2018-02-12 18:08:07 +00:00
Eugene Syromyatnikov
e26e9dacda linux/ia64: remove IA-32 mode support
There is no compat support in strace and there are no systems
within reach that would allow to test it.

* linux/ia64/arch_regs.c (IA64_PSR_IS, ia64_ia32mode): Remove.
* linux/ia64/get_error.c (get_error): Remove ia64_ia32mode branch.
* linux/ia64/get_scno.c (arch_get_scno): Likewise.
* linux/ia64/get_syscall_args.c (get_syscall_args): Likewise.
* linux/ia64/set_error.c (arch_set_error, arch_set_success): Likewise.
* linux/ia64/set_scno.c (arch_set_scno): Likewise.
2018-02-12 11:42:04 +00:00
Eugene Syromyatnikov
08794465cb syscall.c: parse return code second time after injecting
In order to have the same view as tracee has, with regards to
"never fail" syscalls.

* syscall.c (tamper_with_syscall_exiting): Call get_error after the
return value tampering to re-initialise u_rval and u_error fields
of struct tcb.
2018-02-12 11:42:04 +00:00
Eugene Syromyatnikov
c32a2ad625 sparc: mark as an architecture that has a dedicated error register
* linux/sparc/arch_defs_.h (HAVE_ARCH_DEDICATED_ERR_REG): New macro,
define to 1.
2018-02-11 23:55:43 +00:00
Eugene Syromyatnikov
1b7b17645c strace.1.in: ffix 2018-02-11 23:55:43 +00:00
5a6dff3fe8 Include <sys/ptrace.h> early
Include "ptrace.h" before any header that can include <signal.h>
because on some architectures the latter may include <asm/sigcontext.h>
which in turn may include <asm/ptrace.h> with potentially devastating
effect on <sys/ptrace.h>.

* process.c: Include "ptrace.h" before "regs.h".
* rt_sigframe.c: Likewise.
* sigreturn.c: Include "ptrace.h" before "nsig.h".
* syscall.c: Likewise.
* wait.c: Include "ptrace.h" before <sys/wait.h>.
* strace.c: Include "ptrace.h" before <signal.h>.
* tests/ptrace.c: Likewise.
* tests/test_ucopy.c: Include <sys/ptrace.h> before <signal.h>.
2018-02-11 00:26:09 +00:00
f2bb704a92 Include <limits.h> instead of <sys/param.h>
Do not include <sys/param.h> unnecessarily as it includes <signal.h>.

* pathtrace.c: Include <limits.h> instead of <sys/param.h>.
* strace.c: Likewise.
* syscall.c: Likewise.
* util.c: Likewise.
* tests/getcwd.c: Likewise.
* tests/group_req.c: Likewise.
* tests/inode_of_sockfd.c: Likewise.
* tests/ip_mreq.c: Likewise.
* tests/printpath-umovestr.c: Likewise.
* tests/qual_fault.c: Likewise.
* tests/test_printpath.c: Likewise.
* tests/umovestr3.c: Likewise.
* tests/net-y-unix.c: Do not include <sys/param.h>.
* tests/net-yy-unix.c: Likewise.
2018-02-11 00:26:09 +00:00
Eugene Syromyatnikov
971df259c6 basic_filters.c: introduce scno_by_name
As it will be used elsewhere.

* basic_filters.c (scno_by_name): New function.
(qualify_syscall_name): Use it.
* defs.h (scno_by_name): New declaration.
2018-02-10 13:52:42 +00:00
Eugene Syromyatnikov
04b836f024 xstring.h: rephrase xappendstr description a bit 2018-02-10 13:52:42 +00:00
Eugene Syromyatnikov
0863915a0a xlat.c: return NULL in sprintflags if there are no flags
Otherwise the auxstr is rather ugly at times.

* xlat.c (sprintflags): Return NULL if no flags were printed.
2018-02-10 13:52:42 +00:00
Eugene Syromyatnikov
b21d81db04 Change type of injected rval to kernel_long_t
* defs.h (struct inject_data): Change type of rval field to
kernel_ulong_t.
* filter_qualify.c (parse_inject_token): Use string_to_kulong instead of
string_to_uint for rval parsing.  Warn if retval is clipped in compat
personality.
2018-02-10 02:15:35 +00:00
Eugene Syromyatnikov
b06199a8b9 Mark architectures that indicate syscall error in a dedicated register
* linux/alpha/arch_defs_.h (HAVE_ARCH_DEDICATED_ERR_REG): New macro,
define to 1.
* linux/ia64/arch_defs_.h: Likewise.
* linux/mips/arch_defs_.h: Likewise.
* linux/powerpc/arch_defs_.h: Likewise.
* linux/powerpc64/arch_defs_.h: Likewise.
* linux/sparc64/arch_defs_.h: Likewise.
* linux/arch_defs_.h [!HAVE_ARCH_DEDICATED_ERR_REG]
(HAVE_ARCH_DEDICATED_ERR_REG): New macro, define to 0.
* linux/nios2/arch_defs_.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
2018-02-10 02:15:35 +00:00
Eugene Syromyatnikov
83454d741f Make string_to_uint_ex more universal
And add support for reading of various types.

* string_to_uint.c (string_to_uint_ex): Change to work with long long.
(string_to_uint): Move it...
* string_to_uint.h (string_to_uint): ...here.
(string_to_uint_upto): Accept long long as max_val, return long long.
(string_to_ulong, string_to_kulong, string_to_ulonglong): New functions,
for completeness.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-02-10 02:15:35 +00:00
Eugene Syromyatnikov
eb45473d7f Add pure syscall flag
* basic_filters.c (lookup_class) <syscall_class>: Add "%pure" for
TRACE_PURE.
* sysent.h (TRACE_PURE): New syscall flag.
* sysent_shorthand_defs.h (PU): New shorthand macro.
* linux/32/syscallent.h ([172], [173], [174], [175], [176], [177],
[178]): Add PU flag to getpid, getppid, getuid, geteuid, getgid,
getegid, gettid syscalls.
* linux/64/syscallent.h ([172], [173], [174], [175], [176], [177],
[178]): Add PU flag to getpid, getppid, getuid, geteuid, getgid,
getegid, gettid syscalls.
* linux/aarch64/syscallent.h ([1060]): Add PU flag to getpgrp syscalls.
* linux/alpha/syscallent.h ([20], [24], [47], [63], [64], [89],
[378]): Add PU flag to getxpid, getxuid, getxgid, getpgrp, getpagesize,
getdtablesize, gettid syscalls.
* linux/arc/syscallent.h ([246]): Add PU flag to arc_gettls syscalls.
* linux/arm/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[199], [200], [201], [202], [224], [ARM_FIRST_SHUFFLED_SYSCALL+1+6]):
Add PU flag to getpid, getuid, getgid, geteuid, getegid, getppid,
getpgrp, getuid32, getgid32, geteuid32, getegid32, gettid, get_tls
syscalls.
* linux/avr32/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[176]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
getppid, getpgrp, gettid syscalls.
* linux/bfin/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[199], [200], [201], [202], [224]): Add PU flag to getpid, getuid,
getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
geteuid32, getegid32, gettid syscalls.
* linux/hppa/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[206]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
getppid, getpgrp, gettid syscalls.
* linux/i386/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[199], [200], [201], [202], [224]): Add PU flag to getpid, getuid,
getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
geteuid32, getegid32, gettid syscalls.
* linux/ia64/syscallent.h ([1041], [1042], [1046], [1047], [1062],
[1063], [1105], [1171]): Add PU flag to getpid, getppid, getuid,
geteuid, getgid, getegid, gettid, getpagesize syscalls.
* linux/m68k/syscallent.h ([20], [24], [47], [49], [50], [64],
[65], [166], [199], [200], [201], [202], [221], [333]): Add PU flag
to getpid, getuid, getgid, geteuid, getegid, getppid, getpgrp,
getpagesize, getuid32, getgid32, geteuid32, getegid32, gettid,
get_thread_area syscalls.
* linux/metag/syscallent.h ([248]): Add PU flag to metag_get_tls
syscalls.
* linux/microblaze/syscallent.h ([20], [24], [47], [49], [50], [64],
[65], [199], [200], [201], [202], [224]): Add PU flag to getpid,
getuid, getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
geteuid32, getegid32, gettid syscalls.
* linux/powerpc64/syscallent.h ([20], [24], [47], [49], [50], [64],
[65], [207]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
getppid, getpgrp, gettid syscalls.
* linux/powerpc/syscallent.h ([20], [24], [47], [49], [50], [64],
[65], [207]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
getppid, getpgrp, gettid syscalls.
* linux/s390/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[199], [200], [201], [202], [236]): Add PU flag to getpid, getuid,
getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
geteuid32, getegid32, gettid syscalls.
* linux/s390x/syscallent.h ([20], [64], [65], [199], [200], [201],
[202], [236]): Add PU flag to getpid, getppid, getpgrp, getuid,
getgid, geteuid, getegid, gettid syscalls.
* linux/sh64/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[199], [200], [201], [202], [252]): Add PU flag to getpid, getuid,
getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
geteuid32, getegid32, gettid syscalls.
* linux/sh/syscallent.h ([20], [24], [47], [49], [50], [64], [65],
[199], [200], [201], [202], [224]): Add PU flag to getpid, getuid,
getgid, geteuid, getegid, getppid, getpgrp, getuid32, getgid32,
geteuid32, getegid32, gettid syscalls.
* linux/sparc64/syscallent.h ([20], [24], [47], [49], [50], [64], [81],
[143], [197], [340]): Add PU flag to getpid, getuid, getgid, geteuid,
getegid, getpagesize, getpgrp, gettid, getppid, kern_features syscalls.
* linux/sparc/syscallent.h ([20], [24], [44], [47], [49], [50], [53],
[64], [69], [70], [81], [143], [197], [340]): Add PU flag to getpid,
getuid, getuid32, getgid, geteuid, getegid, getgid32, getpagesize,
geteuid32, getegid32, getpgrp, gettid, getppid, kern_features syscalls.
* linux/x32/syscallent.h ([39], [102], [104], [107], [108], [110],
[111], [186]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
getppid, getpgrp, gettid syscalls.
* linux/x86_64/syscallent.h ([39], [102], [104], [107], [108], [110],
[111], [186]): Add PU flag to getpid, getuid, getgid, geteuid, getegid,
getppid, getpgrp, gettid syscalls.
* linux/xtensa/syscallent.h ([120], [127], [137], [139], [140], [141],
[150], [151]): Add PU flag to getpid, gettid, getuid, getgid, geteuid,
getegid, getppid, getpgrp syscalls.
* strace.1.in (.SS Filtering): Document it.
* NEWS: Mention it.
2018-02-10 01:33:49 +00:00
Eugene Syromyatnikov
a59e41e121 syscall.c: warn if tampering failed 2018-02-10 01:33:49 +00:00
Eugene Syromyatnikov
34c644b485 syscall.c: set errno if syscall is tampered 2018-02-10 01:33:48 +00:00
Eugene Syromyatnikov
bbc29521f7 tests/nsyscall-d.test: swap exp and log in diff calls
In line with the rest of the tests.

* tests/nsyscalls-d.test: swap arguments of match_diff calls.
2018-02-10 00:01:01 +00:00
Eugene Syromyatnikov
c7b168165f linux/arm/get_scno.c: use debug_msg
* linux/arm/get_scno.c (arch_get_scno): replace if (debug_flag) {
error_msg() } with debug_msg() call.
2018-02-10 00:01:01 +00:00
Eugene Syromyatnikov
61f156c08e Do not shuffle scno inside syscall_name
This makes interface a bit irregular otherwise.

* defs.h (syscall_name): Clarify description.
* syscall.c (syscall_name): Do not call shuffle_scno.
* printsiginfo.c (print_si_info) <case SIGSYS>: Use shuffle_scno.
2018-02-10 00:01:01 +00:00
Eugene Syromyatnikov
7b6e926641 Handle very special __ARM_NR_-prefixed syscalls
* linux/aarch64/nr_prefix.c: New file.
* linux/arm/nr_prefix.c: Likewise.
* linux/nr_prefix.c: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* printsiginfo.c: Include nr_prefix.c
(print_si_info): Use nr_prefix.
2018-02-10 00:01:01 +00:00
Eugene Syromyatnikov
f729ab68dd Make shuffle_scno globally available
* syscall.c (shuffle_scno): Move the declaration...
* defs.h (shuffle_scno): ...here. Remove static qualifier.
* linux/aarch64/shuffle_scno.c (shuffle_scno): Remove static qualifier.
* linux/arm/shuffle_scno.c: Likewise.
* linux/shuffle_scno.c: Likewise.
* linux/x32/shuffle_scno.c: Likewise.
* linux/x86_64/shuffle_scno.c: Likewise.
2018-02-10 00:01:01 +00:00
Eugene Syromyatnikov
c3e8a9ebb4 syscall.c: use shuffle_scno in syscall_name
syscall_name() is used only in printsiginfo.c:print_si_info currently,
and is supplied with raw syscall number (that's why it has this ugly
__X32_SYSCALL_BIT hack). But since it handled only __X32_SYSCALL_BIT and
not shuffle_scno(), it was broken on ARM.  Let's replace it with shuffle_scno
call, as it handles both the case of shuffled ARM syscalls and the
__X32_SYSCALL_BIT.

* syscall.c (syscall_name): Call shuffle_scno instead of custom
__X32_SYSCALL_BIT handling.
2018-02-10 00:01:01 +00:00
Eugene Syromyatnikov
0f60aba412 Use shuffle_scno for x32 syscall numbers
This changes behaviour of printing of unknown syscall.

* linux/x32/shuffle_scno.c: New file.
* linux/x86_64/shuffle_scno.c: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* linux/x86_64/get_scno.c (arch_get_scno): Do not clear
__X32_SYSCALL_BIT.
* tests/nsyscalls.c: Update expected output.
2018-02-09 22:11:50 +00:00
Eugene Syromyatnikov
128413b850 Move shuffle_scno() invocation to get_scno
* linux/aarch64/get_scno.c (arch_get_scno): Remove shuffle_scno call.
* linux/arm/get_scno.c (arch_get_scno): Remove shuffle_scno calls.
* syscall.c (get_scno): Call shuffle_scno after arch_get_scno.
2018-02-09 22:11:50 +00:00
Eugene Syromyatnikov
c2c35ae227 Move shuffle_scno to arch-specific file
While we are here, let's fix AArch64 by limiting scno shuffling
to compat personality only.

* syscall.c: Include shuffle_scno.c.
(shuffle_scno): Move it to a...
* linux/arm/shuffle_scno.c: New file.
* linux/aarch64/shuffle_scno.c: New file, define arm's shuffle_scno
as arm_shuffle_scno and call it only for personality 1.
* linux/shuffle_scno.c: New file, fallback trivial shuffle_scno
definition.
* Makefile.am (EXTRA_DIST): Add them.
2018-02-09 22:11:50 +00:00
Eugene Syromyatnikov
dbaa7a5b06 Print unknown syscall number in hexadecimal
* syscall.c (struct sysent_buf): Update buf field size.
(get_scno): Print unknown syscall number in hexadecimal form.
* tests/nsyscalls.c: Update expected output.
* strace.1.in: Document it.
* NEWS: Mention it.
2018-02-09 22:11:50 +00:00
Eugene Syromyatnikov
a9512e5779 tests/accept.c: call accept syscall directly, if available
* tests/accept.c [__NR_accept && !TEST_SYSCALL_NAME]: Define a wrapper that
calls accept directly.
* tests/sockname.c [TEST_SYSCALL_STR]: Do not define TEST_SYSCALL_STR.
2018-02-09 20:11:53 +00:00
Eugene Syromyatnikov
9fcaf3bd88 printsiginfo.c: add a comment about personality detection for SIGSYS
Looks like it is not necessary, after all.
2018-02-09 20:11:53 +00:00
Eugene Syromyatnikov
eb9db58362 linux/x86_64/set_error.c: update eax for compat personality
Since this is where get_error gets the return value from in the compat case.

linux/x86_64/set_error.c (set_error, set_success): Update i386_regs.eax
if tracee is in compat personality.
2018-02-09 15:40:50 +00:00
Eugene Syromyatnikov
1a5c89d4ed Mark various arch-specific syscalls with SYSCALL_NEVER_FAILS
* linux/alpha/syscallent.h (getpagesize, getdtablesize): Add NF flag.
* linux/arc/syscallent.h (arc_gettls): Likewise.
* linux/arm/syscallent.h (get_tls): Likewise.
* linux/ia64/syscallent.h (getpagesize): Likewise.
* linux/m68k/syscallent.h (getpagesize, get_thread_area): Likewise.
* linux/sparc/syscallent.h (getpagesize): Likewise.
* linux/sparc64/syscallent.h (getpagesize): Likewise.
2018-02-09 04:41:55 +00:00
Eugene Syromyatnikov
8048b48881 Add SYSCALL_NEVER_FAILS flag to getpgrp
As glibc, at least, treats it this way.

* linux/aarch64/syscallent.h (getpgrp): Add NF flag.
* linux/alpha/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
2018-02-09 04:41:55 +00:00
Eugene Syromyatnikov
8e4b24701a linux/x86_64/get_error.c: do not sign-extend if no error happened 2018-02-09 01:16:13 +00:00
Eugene Syromyatnikov
c2bacdd427 tests/membarrier.c: fix expected output on nohz_full systems
If nohz_full is enabled, MEMBARRIER_CMD_GLOBAL is not available.

* tests/membarrier.c: check availability of MEMBARRIER_CMD_GLOBAL
separately.
2018-02-09 01:16:13 +00:00
Eugene Syromyatnikov
e87c073ecc Update MEMBARRIER_CMD_* constants
* xlat/membarrier_cmds.in: Add new constants, rename
MEMBARRIER_CMD_SHARED to MEMBARRIER_CMD_GLOBAL.
* NEWS: Mention this.
* tests/membarrier.c (main): Update expected output.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-02-09 01:16:13 +00:00
Eugene Syromyatnikov
67b7c125ba perf.c: print group_fd argument of perf_event_open syscall as fd
* perf.c (SYS_FUNC(perf_event_open)): Print 4th argument using printfd.
2018-02-07 22:03:48 +00:00
Eugene Syromyatnikov
b0a26b9403 syscall.c: print higher bits of syscall return value on x32 personality
* syscall.c (syscall_exiting_trace): Check for current_klongsize instead
of current_wordsize to determine the size of tcp->u_rval.
2018-02-07 22:03:48 +00:00