IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
For some reason, struct stat and struct stat64 are different on sparc64.
This change fixes decoding of struct stat64 related syscalls for sparc64
personality, sparc32 personality on sparc64 needs more work.
* file.c (printstat64) [SPARC64]: Do not use printstat.
(SYS_FUNC(newfstatat)): Likewise.
This is needed in order to differentiate it from the value returned
by the call. As a consequence, it enables revealing possible bugs
in syscall parsers, for example, when the value read on syscall
entering and not on syscall exiting, as it was the case with
timerfd_settime parser.
* tests/timer_xettime.c (main): Fill old.its field with value different
from the expected one upon call return.
* tests/timerfd_xettime.c: Likewise.
This is done similar to timer_settime syscall parser.
* time.c (SYS_FUNC(timerfd_settime)): Retrieve old_value argument
on exiting and not on entering. Return 0 instead of RVAL_DECODED
since the call hasn't been decoded in full on entering.
This change prevents scattering of ll-related hacks and simplifies
pread/pwrite syscalls parsers' logic a bit.
* util.c (getllval): Add fixup for arg_no for SuperH when argument
number is equal to 3.
* io.c (PREAD_OFFSET_ARG): Remove.
(SYS_FUNC(pread)): Always use argument number 3 for "count" argument
printing.
(SYS_FUNC(pwrite)): Likewise.
* linux/sparc/arch_sigreturn.c (arch_sigreturn): Parametrize
member types of struct signal_frame.
* linux/sparc64/arch_sigreturn.c (sparc64_arch_sigreturn,
sparc32_arch_sigreturn): New functions.
(arch_sigreturn): Use them.
On sparc64, unlike all other architectures where semctl is an indirect
ipc subcall, the forth argument is passed directly.
* ipc_sem.c (SYS_FUNC(semctl)) [SPARC64]: Print 4th argument without
indirection in case of native personality.
The structures defined in asm/termbits.h have the same size
on sparc and sparc64.
* linux/sparc64/ioctls_arch0.h (TCGETS, TCGETS2, TCSETS, TCSETS2,
TCSETSF, TCSETSF2, TCSETSW, TCSETSW2): Sync with
linux/sparc/ioctls_arch0.h
As st_flags, st_fstype, and st_gen members of struct stat are not filled
by the kernel, there is no use supporting them.
* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_flags,
struct stat.st_fstype, and struct stat.st_gen.
* file.c [STAT32_PERSONALITY, HAVE_STRUCT_STAT64]: Do not undefine
HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE,
and HAVE_STRUCT_STAT_ST_GEN.
* printstat.h (DO_PRINTSTAT): Do not check for
HAVE_STRUCT_STAT_ST_FLAGS, HAVE_STRUCT_STAT_ST_FSTYPE,
and HAVE_STRUCT_STAT_ST_GEN.
Our test suite already assumes that struct stat contains st_blksize,
st_blocks, and st_rdev members, and there haven't been any complaints.
* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_blksize,
struct stat.st_blocks, and struct stat.st_rdev.
* printstat.h (DO_PRINTSTAT): Do not check for
HAVE_STRUCT_STAT_ST_BLKSIZE, HAVE_STRUCT_STAT_ST_BLOCKS,
and HAVE_STRUCT_STAT_ST_RDEV.
This fixes compilation warning that ARCH_PC_REG is redefined.
* linux/powerpc64/arch_regs.c (ARCH_PC_REG): Undefine before
the new definition.
* linux/sparc64/arch_regs.c (ARCH_PC_REG): Likewise.
* linux/s390x/arch_regs.c (ARCH_PC_REG): Remove, it is already defined
in just included linux/s390/arch_regs.c.
* linux/x32/arch_regs.c (ARCH_PC_REG): Remove, it is already defined
in just included linux/x86_64/arch_regs.c.
* init.sh (run_prog, run_prog_skip_if_failed): When the program fails,
add its exit code to the diagnostic message.
(run_strace): When strace fails, add its exit code to the diagnostic
message.
(run_strace_merge): When strace-log-merge fails, add its exit code
to the diagnostic message.
As a side effect of commit v4.11-211-g0736d4e, strace used to leak
placeholders for standard descriptors to tracees thus affecting their
behaviour. Fix this by setting close-on-exec flag on placeholder
descriptors.
* strace.c (open_dummy_desc): Set close-on-exec flag on the descriptor
that is going to be returned to the caller.
(fd_is_placeholder): New array.
(ensure_standard_fds_opened, redirect_standard_fds): New functions.
(startup_child): Use redirect_standard_fds.
(init): Use ensure_standard_fds_opened.
On some architectures including alpha, <asm/stat.h> provides a
definition of struct stat that has no st_atime_nsec, st_mtime_nsec, and
st_ctime_nsec fields. At the same time, struct stat64 always has these
fields. Fix tests to take this difference into account.
* tests/fstat64.c (STRUCT_STAT_IS_STAT64): New macro, defined to 1.
* tests/lstat64.c (STRUCT_STAT_IS_STAT64): Likewise.
* tests/stat64.c (STRUCT_STAT_IS_STAT64): Likewise.
* tests/xstatx.c [!STRUCT_STAT] (STRUCT_STAT_IS_STAT64): New macro,
defined to 0.
[USE_ASM_STAT && STRUCT_STAT_IS_STAT64]:
(HAVE_STRUCT_STAT_ST_ATIME_NSEC, HAVE_STRUCT_STAT_ST_CTIME_NSEC,
HAVE_STRUCT_STAT_ST_MTIME_NSEC): Redefine to 1.
On mips64 the F_GETLK and F_SETLKW64 constants have identical values which
causes the "wrong" constant to be printed by strace.
tests/fcntl.c (test_flock64): Do not test F_SETLKW64 on mips64.
The "syscall" syscall only exists on o32 and causes strace to error out on
64-bit mips ABIs. Pass MIPS_ABI from the configure script through to
nsyscalls.test so the MIPS ABI can be checked.
* configure.ac (MIPS_ABI): Substitute into output files.
* tests/Makefile.am (MIPS_ABI): Export via AM_TEST_LOG_FLAGS.
* tests/nsyscalls.test: Restrict special mips handling to mips o32.
For historical reasons the kernel struct stat represents times as unsigned
32-bit integers on mips64. Therefore, while it's possible to give a file a
timestamp before 1970 with futimens, reading the same timestamp through
struct stat will give a positive time (around 2106).
Workaround by using positive timestamps for testing on mips64.
* tests/xstatx.c (create_sample): Use positive timestamps on mips64.
* tests/mlock2.c (main): Pass unsigned long arguments to mlock2 syscall
explicitly, to avoid unwanted sign extension issues.
Based on patch by James Cowgill <james410@cowgill.org.uk>
Migrate to __NR_* the last user of SYS_* macros provided
by <sys/syscall.h>.
* clone.c [IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Replace
SYS_clone2 with __NR_clone2.
Remove remains of solaris personality support.
This complements commit v4.10-45-gdf4dd8b.
* file.c [SPARC || SPARC64]: Remove the code related to struct solstat.
(printstat, printoldstat) [SPARC || SPARC64]: Remove.
When the syscall number returned by arch_get_scno is a mapped indirect
subcall (i.e. mapped subcall of socketcall or ipc syscall), do not
mistakenly treat it as a valid indirect subcall.
* defs.h (SCNO_IS_VALID): Treat scno with TRACE_INDIRECT_SUBCALL flag
as invalid.
* syscall.c (syscall_name): Do no shuffle scno.
(trace_syscall_entering, trace_syscall_exiting): Use
tcp->s_ent->sys_name instead of syscall_name.
(get_scno): In case of invalid syscall, allocate a dynamic struct sysent
containing an appropriate .sys_name.
* tests/nsyscalls.c (main) [SYS_socket_subcall]: Check decoding
of direct syscall number SYS_socket_subcall+1.
(main) [SYS_ipc_subcall]: Check decoding of direct syscall number
SYS_ipc_subcall+1.
Fix inconsistency between syscall and ioctl entries on sparc64.
Make layout of personalities on sparc64 the same as on other
architectures that support two personalities.
* defs.h [SPARC64] (PERSONALITY0_WORDSIZE): Change to 8.
[SPARC64] (PERSONALITY1_WORDSIZE): Change to 4.
* linux/sparc64/get_scno.c (arch_get_scno): Swap personality numbers.
* linux/sparc64/ioctls_arch1.h: Rename to ioctls_arch0.h.
* linux/sparc64/ioctls_arch0.h: Rename to ioctls_arch1.h.
* linux/sparc64/ioctls_inc0.h: Rename to ioctls_inc1.h.
* linux/sparc64/ioctls_inc1.h: Rename to ioctls_inc0.h.
This commit is an attempt to unify usage of include guards (in top-level
headers, at least). As a side note, different files with *.h extension
have different semantics: for example, printargs.h is included multiple
times in order to generate slightly varying code depending on values of
macro definitions - maybe it's better to change extension of such files
to something like *.inc.
* defs.h: Add #include guard.
* flock.h: Likewise.
* ipc_defs.h: Likewise.
* mpers_type.h: Likewise.
* printsiginfo.h: Likewise.
* ptrace.h: Likewise.
* regs.h: Likewise.
* seccomp_fprog.h: Likewise.
* gcc_compat.h: Rename the macro used for #include guard.
* msghdr.h: Likewise.
* sigevent.h: Likewise.
* kernel_types.h: Comment the trailing part of #include guard.
* xlat.h: Add missing macro definition for #include guard.