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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Do not pass sizeof(struct cmsghdr) to every cmsg printer.
* net.c (printcmsghdr): Pass pointer to cmsg_data and length
of cmsg_data to print_cmsg_type_data.
(print_cmsg_type_data): Update prototype. Pass pointer to cmsg_data
and length of cmsg_data to cmsg printers.
(print_scm_rights, print_scm_creds, print_scm_security): Update.
Avoid duplicate definitions of xlat structures in files
compiled in mpers mode.
Each xlat file defines the corresponding xlat struct with
either global or local visibility using the following rules:
- if xlat struct declaration is available in defs.h,
a global definition is provided in regular mode,
and nothing is provided in mpers mode;
- otherwise, if xlat file is included by a mpers source file,
a global definition is provided in regular mode
(unless no mpers mode is supported on this architecture,
in that case, a local definition is provided instead),
and a declaration is provided in mpers mode;
- otherwise, a local definition is provided in regular mode,
and an error message is printed in mpers mode.
Fallback definitions of constants provided by xlat files
remain available in all modes.
* bootstrap: Invoke generate_mpers_am.sh before xlat/gen.sh.
* defs.h (adjtimex_modes, adjtimex_status, sigev_value): Remove.
* generate_mpers_am.sh: Generate mpers_xlat.h.
* Makefile.am (EXTRA_DIST): Add mpers_xlat.h.
* print_sigevent.c: Include "xlat/sigev_value.h" unconditionally.
* print_timex.c: Include "xlat/adjtimex_modes.h" and
"xlat/adjtimex_status.h" unconditionally.
* xlat/gen.sh (cond_xlat): Move printing of fallback definitions ...
(cond_def): ... here.
(gen_header): Check also mpers_xlat.h for global declarations
of xlat structures.
Process input file twice, first time print directives
only, second time print everything.
Wrap struct xlat into #ifdef IN_MPERS ... #else ... #endif.
* xlat/getrandom_flags.in: Cleanup.
* defs.h (dirent_types): New xlat prototype.
* dirent.c: Stop including "xlat/direnttypes.h".
(kernel_dirent): New typedef. Mpersify it.
(print_old_dirent): Use it instead of old_dirent_t.
(SYS_FUNC(getdents)): Use it instead of struct kernel_dirent.
Rename direnttypes to dirent_types.
(SYS_FUNC(getdents64)): Move ...
* dirent64.c: ... here. Rename direnttypes to dirent_types.
Include "xlat/dirent_types.h".
* Makefile.am (strace_SOURCES): Add dirent64.c.
* xlat/direnttypes.in: Rename to xlat/dirent_types.in.
Array should be enclosed by square brakets, and elements should be
separated by commas.
* dirent.c (SYS_FUNC(getdents), SYS_FUNC(getdents64)): Fix typos
in array output.
* tests/getdents.awk: Update regexps to match fixed output.
* tests/getdents.out: Update output.
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
* net.c (print_scm_rights, print_scm_creds, print_scm_security): Change
to return void. Move printing of struct cmsghdr closing '}' ...
(printcmsghdr): ... here. Move type and data decoders to ...
(print_cmsg_type_data): ... new function.
Starting with commit v4.6-281-g7af9f35, we implicitly assume that
HAVE_SENDMSG is always defined. Therefore, the check for sendmsg
availability is redundant and could be safely removed.
* configure.ac (AC_CHECK_FUNCS): Remove sendmsg.
* linux/dummy.h [!HAVE_SENDMSG] (sys_recvmsg, sys_sendmsg): Remove
stub aliases.
* net.c [HAVE_SENDMSG]: Define unconditionally.
* syscall.c (dumpio) [HAVE_SENDMSG]: Likewise.
Starting with linux commit v4.3-rc3-33-ga342361, powerpc has
direct sysv ipc syscalls in addition to traditional ipc syscall.
* linux/powerpc/syscallent.h (semop, semget, semctl, semtimedop, msgsnd,
msgrcv, msgget, msgctl, shmat, shmdt, shmget, shmctl): New entries.
If the set of headers are unable to produce a valid list, printflags
will try to pass NULL to tprints which crashes. Add a sanity check
for this edge case.
* util.c (printflags): Check xlat->str is not NULL.
mpers_DEFS has to be forwarded to mpers.sh so that config.h would be
properly included by defs.h at preprocessor stage.
* Makefile.am (mpers-m%.stamp): Add the whole $(mpers_sh_opts) set of
options to mpers.sh's CPPFLAGS.
Starting with linux commit v4.3-rc3-1-g5b3f33e, m68k has direct
socket syscalls in addition to traditional socketcall syscall.
* linux/m68k/syscallent.h (socket, socketpair, bind, connect, listen,
accept4, getsockopt, setsockopt, getsockname, getpeername, sendto,
sendmsg, recvfrom, recvmsg, shutdown, recvmmsg, sendmmsg): New entries.
Starting with linux commit v4.2-rc1-64-g9dea5dc, x86 has direct
socket syscalls in addition to traditional socketcall syscall.
* linux/i386/syscallent.h (socket, socketpair, bind, connect, listen,
accept4, getsockopt, setsockopt, getsockname, getpeername, sendto,
sendmsg, recvfrom, recvmsg, shutdown): New entries.
There is an ambiguousness in *_printer_defs.h rules definition:
$ grep '^[^ ]*_defs\.h: ' Makefile.am
m%_defs.h: $(srcdir_mpers_source_files)
%_printer_defs.h: $(srcdir_mpers_source_files)
While it appears to work with GNU make, it has to be fixed nevertheless.
* Makefile.am (m%_defs.h): Rename to m%_type_defs.h.
(mpers_m32_targets): Rename m32_defs.h to m32_type_defs.h.
(mpers_mx32_targets): Rename mx32_defs.h to mx32_type_defs.h.
* mpers_type.h: Rename m32_defs.h to m32_type_defs.h,
mx32_defs.h to mx32_type_defs.h.
* .gitignore: Likewise.
Reported-by: Elliott Hughes <enh@google.com>
* tests/uio.c (main): Use descriptor number 0 in pread/pwrite
and preadv/pwritev syscalls.
* tests/uio.expected: Update regexps.
Reported-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
In files generated by mpers scripts, includes directives are taken from
original files where the type definition was done. This causes to
include defs.h in multiple files. defs.h includes printers.h header,
which is a generated header.
This patch add an explicit dependency to printers.h for the mpers
scripts.
* Makefile.am (mpers-m%.stamp): Add printers.h to order-only
prerequisites.
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
When a command number was decoded through ioctl_decode_command_number(),
there was no check for conflicts with other potential ioctls numbers.
For example:
ioctl(fd, MCE_GET_RECORD_LEN, &i);
output:
ioctl(3, MIXER_READ(1), 0x7ffddce74a58) = 0
instead of:
ioctl(3, MIXER_READ(1) or MCE_GET_RECORD_LEN, 0x7ffee435ce08) = 0
* ioctl.c (SYS_FUNC(ioctl)): Fix ioctl command number decoding
in case of conflicts.
* tests/ioctl.c (main): Add a case for command number conflicts.
Signed-off-by: Gabriel Laskar <gabriel@lse.epita.fr>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* seccomp_fprog.h: New file.
* fetch_seccomp_fprog.c: New file.
* Makefile.am (strace_SOURCES): Add them.
* seccomp.c: Include "seccomp_fprog.h".
(print_seccomp_filter): Use fetch_seccomp_fprog.
* tests/select.c Do not include <string.h>.
Include <sys/syscall.h>.
[!__NR_select]: Skip the test.
(main): Remove pselect6 support, test just select syscall.
* tests/select.test: Remove all pselect6 checks, test just
select syscall.
* tests/pselect6.c: Do not include <assert.h> and <string.h>.
Include <sys/syscall.h>.
[!__NR_pselect6]: Skip the test.
(main): Skip the test instead of assertions.
Add some padding to the timespec structure.
* print_time.c (sprint_timeval): New mpers printer.
[ALPHA] (sprint_timeval32): New function.
* defs.h [ALPHA] (sprint_timeval32): New prototype.
(bitness_t, TIMEVAL_TEXT_BUFSIZE, printtv_bitness, sprinttv): Remove.
* desc.c (decode_select): Replace bitness parameter with two printers.
Use them instead of printtv_bitness and sprinttv.
(sys_oldselect, sys_select): Pass print_timeval and sprint_timeval
to decode_select.
[ALPHA] (sys_osf_select): Pass print_timeval32 and sprint_timeval32
to decode_select.
(pselect6): Pass print_timespec and sprint_timespec to decode_select.
* time.c (UTIME_NOW, UTIME_OMIT, current_time_t_is_compat,
struct timeval32, printtv_bitness, do_sprinttv, sprinttv): Remove.
* time.c (print_timezone): new function.
(sys_gettimeofday, sys_settimeofday): Use it instead of print_timeval
to print struct timezone.
[ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday): Use it
instead of print_timeval32 to print struct timezone.
* tests/xettimeofday.c: New file.
* tests/xettimeofday.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add xettimeofday.
(TESTS): Add xettimeofday.
* tests/.gitignore: Add xettimeofday.