Commit Graph

7140 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
24535be245 rtnl_link: add IFLA_MIN_MTU and IFLA_MAX_MTU attributes
Introduced by Linux commit v4.19-rc1~140^2~205^2~1.

* rtnl_link.c (ifinfomsg_nla_decoders) <[IFLA_MIN_MTU], [IFLA_MAX_MTU]>:
New decoder, calls decode_nla_u32.
* xlat/rtnl_link_attrs.in (IFLA_MIN_MTU, IFLA_MAX_MTU): New constant.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
4fa680e63f xlat: add IPV4_DEVCONF_BC_FORWARDING-1 to inet_devconf_indices.in
* xlat/inet_devconf_indices.in (IPV4_DEVCONF_BC_FORWARDING-1): New
constant, introduced by Linux commit v4.19-rc1~140^2~208^2~1.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
fb7c51690e rtnl_netconf: add NETCONFA_BC_FORWARDING attribute
Introduced by Linux commit v4.19-rc1~140^2~208^2~1.

* rtnl_netconf.c (netconfmsg_nla_decoders) <[NETCONFA_BC_FORWARDING]>:
New decoder, calls decode_nla_s32.
* xlat/rtnl_netconf_attrs.in (NETCONFA_BC_FORWARDING): New constant.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
df7dd5aa66 netlink_smc_diag: add SMC_DIAG_FALLBACK attribute support
Introduced by Linux commit v4.19-rc1~140^2~253^2~1.

* linux/smc_diag.h (SMC_DIAG_FALLBACK): New enumeration item.
(struct smc_diag_fallback): New type definition.
* netlink_smc_diag.c: Include "xlat/smc_decl_codes.h".
(decode_smc_diag_fallback): New function.
(smc_diag_msg_nla_decoders) <[SMC_DIAG_FALLBACK]>: New decoder, calls
decode_smc_diag_fallback.
* tests/nlattr_smc_diag_msg.c: Add checks for SMC_DIAG_FALLBACK
attribute decoding.
* xlat/smc_decl_codes.in: New file.
* xlat/smc_diag_attrs.in (SMC_DIAG_FALLBACK): New constant.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
e8d95392ad defs.h: add style argument to printxval_search_ex macro
It is identical to printxval_search otherwise.

* defs.h (printxval_search_ex): Add style argument.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
fe8861f6b4 xlat: update v4l2_pix_fmts.in
* xlat/v4l2_pix_fmts.in (V4L2_PIX_FMT_FWHT): New constant, introduced by
Linux commit v4.19-rc1~137^2~221.
(V4L2_PIX_FMT_SBGGR14P, V4L2_PIX_FMT_SGBRG14P, V4L2_PIX_FMT_SGRBG14P,
V4L2_PIX_FMT_SRGGB14P): New constants, introduced by Linux commit
v4.19-rc1~137^2~97.
(V4L2_PIX_FMT_Y10P): New constant, introduced by Linux commit
v4.19-rc1~137^2~95.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
f7d175b562 netlink_smc_diag: decode smc_diag_msg.diag_fallback constant names
Introduced by Linux commit v4.19-rc1~140^2~285^2~4.

* xlat/smc_diag_mode.in: New file.
* netlink_smc_diag.c: Include "xlat/smc_diag_mode.h".
(decode_smc_diag_msg): Print diag_fallback field using smc_diag_mode
xlat.
* tests/netlink_sock_diag.c (test_smc_diag_msg): Update expected output.
* tests/nlattr_smc_diag_msg.c (print_smc_diag_msg): Likewise.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
701fd04d8a rtnl_link: add IFLA_BRPORT_BACKUP_PORT attribute
Introduced by Linux commit v4.19-rc1~140^2~288^2.

* xlat/rtnl_ifla_brport_attrs.in (IFLA_BRPORT_BACKUP_PORT): New
constant.
* rtnl_link.c (ifla_brport_nla_decoders) <[IFLA_BRPORT_BACKUP_PORT]>:
New decoder.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
cde23ff80c xlat: update nt_descriptor_types.in
* xlat/nt_descriptor_types.in (NT_VMCOREDD): New named constant,
introduced by Linux commit v4.18-rc1~114^2~252^2~2.
(NT_MIPS_DSP): New named constant, introduced by Linux commit
v4.19-rc1~42^2~63.
(NT_MIPS_FP_MODE): New named constant, introduced by Linux commit
v4.19-rc1~42^2~62.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
6b141f643a xlat: add AUDIT_INTEGRITY_POLICY_RULE to nl_audit_types.in
* xlat/nl_audit_types.in (AUDIT_INTEGRITY_POLICY_RULE): New constant,
introduced by Linux commit v4.19-rc1~124^2~5.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
d029a5efd1 rtnl_link: decode named constants for IFLA_XDP_ATTACHED attribute value
* xlat/rtnl_ifla_xdp_attached_mode.in: New file.
* rtnl_link.c: Include "xlat/rtnl_ifla_xdp_attached_mode.h".
(decode_ifla_xdp_attached): New function.
(ifla_xdp_nla_decoders) <[IFLA_XDP_ATTACHED]>: Use
decode_ifla_xdp_attached instead of decode_nla_u8.
* tests/nlattr_ifla_xdp.c: Add checks for IFLA_XDP_ATTACHED decoding.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
eded21f5c0 rtnl_link: add new IFLA_XDP_* attributes
Introduced by Linux commit v4.19-rc1~140^2~364^2~6^2~6.

* xlat/rtnl_ifla_xdp_attrs.in (IFLA_XDP_DRV_PROG_ID,
IFLA_XDP_SKB_PROG_ID, IFLA_XDP_HW_PROG_ID): New constants.
* rtnl_link.c (ifla_xdp_nla_decoders): Add decoders for
IFLA_XDP_DRV_PROG_ID, IFLA_XDP_SKB_PROG_ID, and IFLA_XDP_HW_PROG_ID.
* tests/nlattr_ifla_xdp.c: Add checks for new attributes.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
9624d9f09d xlat: update v4l2_control_ids.in
* xlat/v4l2_control_ids.in (V4L2_CID_MPEG_VIDEO_VP8_PROFILE): Renamed
from V4L2_CID_MPEG_VIDEO_VPX_PROFILE (the latter is now a synonym),
by Linux commit v4.19-rc1~137^2~270.
(V4L2_CID_MPEG_VIDEO_VP9_PROFILE): New constant, introduced by Linux
commit v4.19-rc1~137^2~269.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
db5235d0e9 xlat: add SO_TXTIME to sock_options.in
* xlat/sock_options.in (SO_TXTIME): New constant, introduced by Linux
commit v4.19-rc1~140^2~465^2~12.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
cf174ac87a netlink_smc_diag: implement SMC_DIAG_DMBINFO decoding
The message has been added by Linux commit v4.19-rc1~140^2~507^2~1.

* linux/smc_diag.h: Include "gcc_compat.h".
(enum): Add SMC_DIAG_DMBINFO.
(struct smcd_diag_dmbinfo): New type definition.
* xlat/smc_diag_attrs.in (SMC_DIAG_DMBINFO): New constant.
* netlink_smc_diag.c (decode_smc_diag_dmbinfo): New function.
(smc_diag_msg_nla_decoders) [SMC_DIAG_DMBINFO]: New decoder, calls
decode_smc_diag_dmbinfo.
* tests/nlattr_smc_diag_msg.c: Add SMC_DIAG_DMBINFO check.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
f9578731fc xlat: add SCTP_REUSE_PORT to sock_sctp_options.in
* xlat/sock_sctp_options.in (SCTP_REUSE_PORT): New constant, introduced
by Linux commit v4.19-rc1~140^2~518.
2018-08-27 23:41:41 +00:00
Eugene Syromyatnikov
9aa1efde58 xlat: add IN_MASK_CREATE to inotify_flags.in
* xlat/inotify_flags.in (IN_MASK_CREATE): New constant, introduced by
Linux commit v4.19-rc1~115^2.
* tests/inotify.c (main): Update expected output.
2018-08-27 23:41:41 +00:00
44e21ae30d tests: workaround systemd-nspawn habit of disabling unimplemented syscalls
* tests/nsyscalls.c (test_syscall): Do not assume that unimplemented
syscalls always fail with ENOSYS.
2018-08-22 20:38:27 +00:00
ccee090b78 tests: workaround systemd-nspawn habit of disabling mlockall syscall
* tests/mmap.c (main): Do not assume that mlockall syscall always
succeeds.
2018-08-22 20:38:27 +00:00
1df0986c75 tests: workaround systemd-nspawn habit of disabling munlockall syscall
* tests/munlockall.c (main): Do not assume that munlockall syscall
always succeeds.
2018-08-22 20:38:27 +00:00
Eugene Syromyatnikov
9d2848e517 Decode AF_SMC netlink messages unconditionally
As smc_diag.h is bundled, there is little sense to build AF_SMC support
conditionally.

* netlink_smc_diag.c [!AF_SMC]: Include xlat/addrfams.h under
XLAT_MACROS_ONLY, enable the rest of file.
* netlink_sock_diag.c: Include xlat/addrfams.h under XLAT_MACROS_ONLY.
(diag_decoders): Remove "ifdef AF_SMC" condition for [AF_SMC], reorder
in accordance with address family values.
* tests/nlattr_smc_diag_msg.c [!AF_SMC]: Define AF_SMC to 43, enable
the rest of test.
2018-08-21 11:28:14 +00:00
14ae61f37b strace.c: introduce struct tcb_wait_data
Introduce a new structure to pass information between next_event(),
restart_delayed_tcb(), and dispatch_event().

This is going to be used by a subsequent change of next_event().

* strace.c (struct tcb_wait_data): New type.
(next_event): Remove parameters, return a pointer
to const struct tcb_wait_data.  Return NULL instead of TE_BREAK.
(dispatch_event): Replace all parameters with a pointer
to const struct tcb_wait_data, obtain the trace event, siginfo,
and status from its fields.
(restart_delayed_tcb): Add local struct tcb_wait_data variable
with te field set to TE_RESTART, pass it to dispatch_event().
(main): Remove status and si variables, update next_event()
and dispatch_event() invocations.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-19 10:26:18 +00:00
Eugene Syromyatnikov
2d88ec9e39 xlat: fix typo in smc_protocols.in
* xlat/smc_protocols.in: s/^MCPROTO_SMC/SMCPROTO_SMC/.
2018-08-19 10:26:18 +00:00
538cf68f12 ci: add a test with the latest gcc and mainline headers
* .gitlab-ci.yml (gcc-x86_64-libdw-mainline): New entry.
* .travis.yml (CC=gcc-8, KHEADERS=torvalds/linux): Likewise.
2018-08-19 10:26:18 +00:00
9725de9c22 ci: update gitlab ubuntu image
* .gitlab-ci.yml (image): Replace "ubuntu:17.10" with "ubuntu:18.04".
2018-08-19 10:26:18 +00:00
7b0d371b3f ci: install kernel headers after compiler dependencies
* ci/install-dependencies.sh: Install kernel headers after compiler
dependencies to avoid a needless attempt to install $common_packages.
2018-08-19 10:26:18 +00:00
f0ec4e696c ci: fix kernel headers version diagnostics
* ci/run-build-and-tests.sh: Honor $CPPFLAGS when printing
kernel headers version.
2018-08-19 10:26:18 +00:00
Zhibin Li
ed29ac33bb tests: enhance test coverage of evdev ioctl
* tests/ioctl_evdev.c (main): Test EVIOCGMTSLOTS(8) command.
2018-08-19 10:26:18 +00:00
Zhibin Li
e286b9cbc0 tests: check decoding of successful evdev ioctl
* tests/ioctl_evdev-success.c: New file.
* tests/ioctl_evdev-success-v.c: Likewise.
* tests/ioctl_evdev-success.test: New test.
* tests/ioctl_evdev-success-v.test: Likewise.
* tests/.gitignore: Add ioctl_evdev-success and ioctl_evdev-success-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add the two tests mentioned above.
2018-08-19 10:26:18 +00:00
Zhibin Li
5ee385e2eb evdev: fix decoding of EVIOCGBIT(0, ...)
There is a comment in drivers/input/evdev.c which says:
/* EV_SYN==0 is EV_CNT, _not_ SYN_CNT, see EVIOCGBIT */

That is, EVIOCGBIT(0, ...) should return a bit mask with supported
event types instead of SYN_* event codes.

* defs.h (evdev_ev): New prototype.
* evdev.c: Include "xlat/evdev_ev.h" and remove "xlat/evdev_sync.h".
(bit_ioctl) <case EV_SYN>: Replace EV_SYN with 0, use evdev_ev
with XT_SORTED in decode_bitset invocation instead.
* ioctl.c: Do not include "xlat/evdev_ev.h".
(evdev_decode_number): Print nr == 0x20 as "0" instead of "EV_SYN".
* tests/ioctl_evdev.c (main): Use 0 instead of EV_SYN in EVIOCGBIT
output.
* xlat/evdev_sync.in: Remove.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Fixes: v4.10~89 "Add decoding for evdev ioctls"
2018-08-19 10:26:18 +00:00
Zhibin Li
99300f217b evdev: fix decoding of bit sets
According to drivers/input/evdev.c:bits_to_user(),
the Linux kernel returns the number of bytes, not bits.

* evdev.c (decode_bitset_): Treat syscall return value as the number
of bytes.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Fixes: v4.10~89 "Add decoding for evdev ioctls"
2018-08-19 10:26:18 +00:00
Pierre Marsais
e38143b00e kvm: decode the argument of KVM_CHECK_EXTENSION
xlat/kvm_cap.in has been generated using the following command line:

grep '#define\s\+KVM_CAP' $linux/include/uapi/linux/kvm.h |
sed -E -e 's/^#define\s+([^ \t]+)\s*([0-9]+).*$/printf "%-40s%s\n" \1 \2/e' \
       -e 's/ {8}/\t/g; s/ +/\t/g'

* xlat/kvm_cap.in: New file.
* kvm.c: Include "xlat/kvm_cap.h".
(kvm_ioctl_decode_check_extension): New function.
(kvm_ioctl): Use it.
* tests/ioctl_kvm_run_common.c (main): Check decoding
of KVM_CHECK_EXTENSION command.

Signed-off-by: Pierre Marsais <pierre.marsais@lse.epita.fr>
2018-08-19 10:26:18 +00:00
0f09267db0 xlat: update V4L2_CID_USER_*_BASE constants
* xlat/v4l2_control_id_bases.in (V4L2_CID_USER_S2255_BASE,
V4L2_CID_USER_SI476X_BASE, V4L2_CID_USER_SAA7134_BASE,
V4L2_CID_USER_ADV7180_BASE, V4L2_CID_USER_TC358743_BASE,
V4L2_CID_USER_MAX217X_BASE): New constants.
2018-08-19 10:26:18 +00:00
b89a69dec2 xlat: workaround V4L2_CID_USER_IMX_BASE Linux kernel ABI breakage
Linux kernel commit v4.18-rc2-106-g421860b9d47053badce4b247576fa48df9ab4c48
has changed the value of V4L2_CID_USER_IMX_BASE constant introduced
by commit v4.13-rc1~141^2~121 because the old value was already used
by V4L2_CID_USER_MAX217X_BASE.

This is of course an ABI breakage that affects Linux kernels starting
with 4.13 and up to 4.18, as well as their LTS derivatives.

Since the imx driver didn't provide any public control ID definitions,
it looks like the best way to handle this situation is to pretend that
the old value of V4L2_CID_USER_IMX_BASE didn't exist.

* xlat/v4l2_control_id_bases.in (V4L2_CID_USER_IMX_BASE): Redefine.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-19 10:26:18 +00:00
a264eb3b65 Post-release administrivia
* NEWS: Add a header line for the next release.
* debian/changelog.in: Add a changelog entry for 4.24-1.
* strace.spec.in: Likewise.
2018-08-14 10:11:12 +00:00
150655ca3e Prepare for 4.24 release
* NEWS: Update for 4.24 release.
2018-08-14 00:01:02 +00:00
c1154d21a6 Update copyright headers
Headers updated automatically using maint/update_copyright_years.sh
script.
2018-08-12 22:22:32 +00:00
Gleb Fotengauer-Malinovskiy
33e8748587 Update ioctl entries from linux v4.18
* linux/32/ioctls_inc_align16.h: Update from linux v4.18-rc8
using ioctls_gen.sh.
* linux/32/ioctls_inc_align32.h: Likewise.
* linux/32/ioctls_inc_align64.h: Likewise.
* linux/64/ioctls_inc.h: Likewise.
* linux/x32/ioctls_inc0.h: Likewise.
* linux/s390x/ioctls_arch0.h: Likewise.
* NEWS: Mention this.
2018-08-12 09:50:33 +00:00
Gleb Fotengauer-Malinovskiy
5f3b52cd32 maint: update for linux v4.18
* maint/ioctls_sym.sh: Add workaround for linux/omap3isp.h file.
2018-08-12 09:50:33 +00:00
95cf8b343f Replace BTRFS_IOC_[GS]ET_FSLABEL with FS_IOC_[GS]ETFSLABEL
Linux kernel commit v4.18-rc1~37^2~66 introduced FS_IOC_[GS]ETFSLABEL
ioctl constants as generalized copies of BTRFS_IOC_[GS]ET_FSLABEL.

* linux/32/ioctls_inc_align16.h: Replace BTRFS_IOC_[GS]ET_FSLABEL
with FS_IOC_[GS]ETFSLABEL.
* linux/32/ioctls_inc_align32.h: Likewise.
* linux/32/ioctls_inc_align64.h: Likewise.
* linux/64/ioctls_inc.h: Likewise.
* linux/x32/ioctls_inc0.h: Likewise.
* maint/ioctls_sym.sh: Remove BTRFS_IOC_[GS]ET_FSLABEL.
* tests/btrfs.c (FS_IOC_GETFSLABEL, FS_IOC_SETFSLABEL): Add fallback
definitions.
(btrfs_test_label_ioctls, btrfs_test_read_ioctls): Replace
BTRFS_IOC_[GS]ET_FSLABEL with FS_IOC_[GS]ETFSLABEL.
2018-08-12 09:50:33 +00:00
Eugene Syromyatnikov
11e24ca2a4 open.c: use __O_TMPFILE
As it is the flag kernel actually checks against,
and it is now guaranteed to have a fallback definition.

* open.c (STRACE_O_TMPFILE): Remove.
(decode_open): Use __O_TMPFILE instead of STRACE_O_TMPFILE.
2018-08-08 23:27:06 +00:00
f22adb0c7c xlat: regenerate sock_options.in
* xlat/sock_options.in: Regenerate using maint/gen_xlat_defs.sh script.
* xlat/sock_options.sh: Remove.
2018-08-05 18:57:25 +00:00
a6ab0251f0 xlat: add fallback definitions to open_mode_flags
* xlat/open_mode_flags.in: Regenerate using maint/gen_xlat_defs.sh script
to provide fallback definitions.  Implement a workaround for O_NDELAY.

Co-Authored-by: Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-05 18:57:25 +00:00
Eugene Syromyatnikov
c20a515b6d xlat: remove non-Linux flags from open_mode_flags
* xlat/open_mode_flags.in (O_PRIV, FNDELAY, FAPPEND, FMARK, FDEFER,
FSHLOCK, FEXLOCK, FCREAT, FTRUNC, FEXCL, FNBIO, FSYNC, FNOCTTY,
O_SHLOCK, O_EXLOCK): Remove flags that are not present in Linux.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-08-05 18:57:25 +00:00
22f0253f33 xlat: add fallback definitions to madvise_cmds
* xlat/madvise_cmds.in: Regenerate using maint/gen_xlat_defs.sh script
to provide fallback definitions.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-05 18:57:25 +00:00
d7da491c34 xlat: add fallback definitions to mmap_flags
* xlat/mmap_flags.in: Regenerate using maint/gen_xlat_defs.sh script
to provide fallback definitions.  Implement a workaround for MAP_RENAME.

Co-Authored-by: Eugene Syromyatnikov <evgsyr@gmail.com>
2018-08-05 18:57:25 +00:00
Eugene Syromyatnikov
769946f50a maint: add a Linux UAPI headers crawler
This script is going to be used to generate xlat fallback values.

* maint/gen_xlat_defs.sh: New file.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-08-05 18:57:25 +00:00
6757946d39 strace.spec.in: use $RPM_OPT_FLAGS when building auxiliary programs
* strace.spec.in: Set CFLAGS_FOR_BUILD to "$RPM_OPT_FLAGS" so that
$RPM_OPT_FLAGS is honored when building auxiliary programs like
ioctlsort.
2018-08-05 11:49:04 +00:00
090bd651d3 strace.spec.in: compress changelog files
Some say uncompressed changelog files are too big.

* strace.spec.in: Compress ChangeLog and ChangeLog-CVS using gzip -9n.
2018-08-05 11:49:04 +00:00
6215963cde strace.spec.in: use a SUSE-specific group name for SUSE
Since, apparently, it isn't quite happy with a simple group name
"Development/Debuggers".

* strace.spec.in (Group): Add %{?suse_version:/Tools}.
2018-08-05 11:49:04 +00:00