Compare commits
35 Commits
v4.26
...
esyr/loopi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cff0b9e5ca | ||
|
|
5cf7f16bad | ||
|
|
762abe0ce3 | ||
|
|
8c015ef905 | ||
|
|
fc6c6578dc | ||
|
|
756ccfa00b | ||
|
|
1bff0fadad | ||
| c1838de552 | |||
| 2c8b6de913 | |||
|
|
f414d9e3ba | ||
|
|
04512207ac | ||
|
|
3798b04eab | ||
| b9a262af78 | |||
| bc87159e49 | |||
| 77265f5d49 | |||
| 88d842435e | |||
| 9c529cda68 | |||
| 3ef1efa2d1 | |||
| 17a1b88f8e | |||
| be27e07c97 | |||
| 48f74df7d3 | |||
| 63de2e2055 | |||
| 2b31eeb6c1 | |||
| 4ba813df47 | |||
| d0d79b4b7e | |||
| 536d2af968 | |||
| bfff2ebaa6 | |||
| 25a73fb12f | |||
| cf36cc7c78 | |||
|
|
91cdd32f65 | ||
| 3e93457d5f | |||
| cd5b418320 | |||
| cab745b842 | |||
| d6c71dd061 | |||
| 51bd6db1ef |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -12,6 +12,8 @@
|
|||||||
/.version
|
/.version
|
||||||
/CREDITS
|
/CREDITS
|
||||||
/ChangeLog
|
/ChangeLog
|
||||||
|
/INSTALL
|
||||||
|
/README
|
||||||
/aclocal.m4
|
/aclocal.m4
|
||||||
/autom4te.cache
|
/autom4te.cache
|
||||||
/bpf_attr_check.c
|
/bpf_attr_check.c
|
||||||
@@ -25,7 +27,6 @@
|
|||||||
/configure
|
/configure
|
||||||
/depcomp
|
/depcomp
|
||||||
/gnu
|
/gnu
|
||||||
/INSTALL
|
|
||||||
/install-sh
|
/install-sh
|
||||||
/ioctl_iocdef.[ih]
|
/ioctl_iocdef.[ih]
|
||||||
/ioctl_redefs[12].h
|
/ioctl_redefs[12].h
|
||||||
@@ -54,15 +55,14 @@
|
|||||||
/native_printer_decls.h
|
/native_printer_decls.h
|
||||||
/native_printer_defs.h
|
/native_printer_defs.h
|
||||||
/printers.h
|
/printers.h
|
||||||
/README
|
|
||||||
/scno.h
|
/scno.h
|
||||||
/sen.h
|
/sen.h
|
||||||
/stamp-h1
|
/stamp-h1
|
||||||
/strace
|
/strace
|
||||||
/strace-*.tar.gz
|
/strace-*.tar.gz
|
||||||
/strace-*.tar.xz
|
/strace-*.tar.xz
|
||||||
/strace.1
|
|
||||||
/strace-log-merge.1
|
/strace-log-merge.1
|
||||||
|
/strace.1
|
||||||
/strace.dsc
|
/strace.dsc
|
||||||
/strace.spec
|
/strace.spec
|
||||||
/sys_func.h
|
/sys_func.h
|
||||||
|
|||||||
11
Makefile.am
11
Makefile.am
@@ -127,8 +127,8 @@ strace_SOURCES = \
|
|||||||
fetch_struct_xfs_quotastat.c \
|
fetch_struct_xfs_quotastat.c \
|
||||||
file_handle.c \
|
file_handle.c \
|
||||||
file_ioctl.c \
|
file_ioctl.c \
|
||||||
filter_qualify.c \
|
|
||||||
filter.h \
|
filter.h \
|
||||||
|
filter_qualify.c \
|
||||||
flock.c \
|
flock.c \
|
||||||
flock.h \
|
flock.h \
|
||||||
fs_x_ioctl.c \
|
fs_x_ioctl.c \
|
||||||
@@ -168,6 +168,7 @@ strace_SOURCES = \
|
|||||||
linux/asm_stat.h \
|
linux/asm_stat.h \
|
||||||
linux/x32/asm_stat.h \
|
linux/x32/asm_stat.h \
|
||||||
linux/x86_64/asm_stat.h \
|
linux/x86_64/asm_stat.h \
|
||||||
|
list.h \
|
||||||
listen.c \
|
listen.c \
|
||||||
lookup_dcookie.c \
|
lookup_dcookie.c \
|
||||||
loop.c \
|
loop.c \
|
||||||
@@ -193,10 +194,9 @@ strace_SOURCES = \
|
|||||||
netlink.c \
|
netlink.c \
|
||||||
netlink.h \
|
netlink.h \
|
||||||
netlink_crypto.c \
|
netlink_crypto.c \
|
||||||
|
netlink_inet_diag.c \
|
||||||
netlink_kobject_uevent.c \
|
netlink_kobject_uevent.c \
|
||||||
netlink_kobject_uevent.h \
|
netlink_kobject_uevent.h \
|
||||||
netlink_sock_diag.h \
|
|
||||||
netlink_inet_diag.c \
|
|
||||||
netlink_netfilter.c \
|
netlink_netfilter.c \
|
||||||
netlink_netlink_diag.c \
|
netlink_netlink_diag.c \
|
||||||
netlink_packet_diag.c \
|
netlink_packet_diag.c \
|
||||||
@@ -205,6 +205,7 @@ strace_SOURCES = \
|
|||||||
netlink_selinux.c \
|
netlink_selinux.c \
|
||||||
netlink_smc_diag.c \
|
netlink_smc_diag.c \
|
||||||
netlink_sock_diag.c \
|
netlink_sock_diag.c \
|
||||||
|
netlink_sock_diag.h \
|
||||||
netlink_unix_diag.c \
|
netlink_unix_diag.c \
|
||||||
nlattr.c \
|
nlattr.c \
|
||||||
nlattr.h \
|
nlattr.h \
|
||||||
@@ -227,8 +228,8 @@ strace_SOURCES = \
|
|||||||
prctl.c \
|
prctl.c \
|
||||||
print_aio_sigset.c \
|
print_aio_sigset.c \
|
||||||
print_dev_t.c \
|
print_dev_t.c \
|
||||||
print_group_req.c \
|
|
||||||
print_fields.h \
|
print_fields.h \
|
||||||
|
print_group_req.c \
|
||||||
print_ifindex.c \
|
print_ifindex.c \
|
||||||
print_instruction_pointer.c \
|
print_instruction_pointer.c \
|
||||||
print_kernel_version.c \
|
print_kernel_version.c \
|
||||||
@@ -307,8 +308,8 @@ strace_SOURCES = \
|
|||||||
statx.c \
|
statx.c \
|
||||||
statx.h \
|
statx.h \
|
||||||
strace.c \
|
strace.c \
|
||||||
string_to_uint.h \
|
|
||||||
string_to_uint.c \
|
string_to_uint.c \
|
||||||
|
string_to_uint.h \
|
||||||
swapon.c \
|
swapon.c \
|
||||||
syscall.c \
|
syscall.c \
|
||||||
sysctl.c \
|
sysctl.c \
|
||||||
|
|||||||
14
NEWS
14
NEWS
@@ -1,3 +1,17 @@
|
|||||||
|
Noteworthy changes in release ?.?? (????-??-??)
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
* Improvements
|
||||||
|
* Enhanced xlat styles support configured by -X option.
|
||||||
|
* Updated lists of BPF_*, BTRFS_*, FAN_*, IFLA_*, KERN_*, KVM_CAP_*, NDA_*,
|
||||||
|
NETNSA_*, NT_*, PR_*, REL_*, SECCOMP_*, SCTP_*, UDP_*, V4L2_*, and *_MAGIC
|
||||||
|
constants.
|
||||||
|
|
||||||
|
* Bug fixes
|
||||||
|
* Fixed strace-k test on alpha.
|
||||||
|
* Fixed build on mips o32.
|
||||||
|
* Fixed build on NOMMU architectures.
|
||||||
|
|
||||||
Noteworthy changes in release 4.26 (2018-12-26)
|
Noteworthy changes in release 4.26 (2018-12-26)
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
/* Architecture-specific definitions. */
|
/* Architecture-specific definitions. */
|
||||||
#ifndef STRACE_ARCH_DEFS_H
|
#ifndef STRACE_ARCH_DEFS_H
|
||||||
#define STRACE_ARCH_DEFS_H
|
# define STRACE_ARCH_DEFS_H
|
||||||
|
|
||||||
#include "arch_defs_.h"
|
# include "arch_defs_.h"
|
||||||
#include "linux/arch_defs_.h"
|
# include "linux/arch_defs_.h"
|
||||||
|
|
||||||
#endif /* !STRACE_ARCH_DEFS_H */
|
#endif /* !STRACE_ARCH_DEFS_H */
|
||||||
|
|||||||
2
block.c
2
block.c
@@ -47,7 +47,7 @@ typedef struct blk_user_trace_setup {
|
|||||||
|
|
||||||
/* Provide fall-back definitions for BLK* ioctls */
|
/* Provide fall-back definitions for BLK* ioctls */
|
||||||
#define XLAT_MACROS_ONLY
|
#define XLAT_MACROS_ONLY
|
||||||
# include "xlat/block_ioctl_cmds.h"
|
#include "xlat/block_ioctl_cmds.h"
|
||||||
#undef XLAT_MACROS_ONLY
|
#undef XLAT_MACROS_ONLY
|
||||||
|
|
||||||
#include MPERS_DEFS
|
#include MPERS_DEFS
|
||||||
|
|||||||
106
bpf_attr.h
106
bpf_attr.h
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_BPF_ATTR_H
|
#ifndef STRACE_BPF_ATTR_H
|
||||||
#define STRACE_BPF_ATTR_H
|
# define STRACE_BPF_ATTR_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The policy is that all fields of type uint64_t in this header file
|
* The policy is that all fields of type uint64_t in this header file
|
||||||
@@ -19,21 +19,21 @@
|
|||||||
* v4.16-rc1~123^2~109^2~5^2~4.
|
* v4.16-rc1~123^2~109^2~5^2~4.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef BPF_OBJ_NAME_LEN
|
# ifndef BPF_OBJ_NAME_LEN
|
||||||
# define BPF_OBJ_NAME_LEN 16U
|
# define BPF_OBJ_NAME_LEN 16U
|
||||||
#else
|
# else
|
||||||
# if BPF_OBJ_NAME_LEN != 16U
|
# if BPF_OBJ_NAME_LEN != 16U
|
||||||
# error "Unexpected value of BPF_OBJ_NAME_LEN"
|
# error "Unexpected value of BPF_OBJ_NAME_LEN"
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef BPF_TAG_SIZE
|
# ifndef BPF_TAG_SIZE
|
||||||
# define BPF_TAG_SIZE 8
|
# define BPF_TAG_SIZE 8
|
||||||
#else
|
# else
|
||||||
# if BPF_TAG_SIZE != 8
|
# if BPF_TAG_SIZE != 8
|
||||||
# error "Unexpected value of BPF_TAG_SIZE"
|
# error "Unexpected value of BPF_TAG_SIZE"
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
|
||||||
|
|
||||||
struct BPF_MAP_CREATE_struct {
|
struct BPF_MAP_CREATE_struct {
|
||||||
uint32_t map_type;
|
uint32_t map_type;
|
||||||
@@ -47,9 +47,9 @@ struct BPF_MAP_CREATE_struct {
|
|||||||
uint32_t map_ifindex;
|
uint32_t map_ifindex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_MAP_CREATE_struct_size \
|
# define BPF_MAP_CREATE_struct_size \
|
||||||
sizeof(struct BPF_MAP_CREATE_struct)
|
sizeof(struct BPF_MAP_CREATE_struct)
|
||||||
#define expected_BPF_MAP_CREATE_struct_size 48
|
# define expected_BPF_MAP_CREATE_struct_size 48
|
||||||
|
|
||||||
struct BPF_MAP_LOOKUP_ELEM_struct {
|
struct BPF_MAP_LOOKUP_ELEM_struct {
|
||||||
uint32_t map_fd;
|
uint32_t map_fd;
|
||||||
@@ -57,9 +57,9 @@ struct BPF_MAP_LOOKUP_ELEM_struct {
|
|||||||
uint64_t ATTRIBUTE_ALIGNED(8) value;
|
uint64_t ATTRIBUTE_ALIGNED(8) value;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_MAP_LOOKUP_ELEM_struct_size \
|
# define BPF_MAP_LOOKUP_ELEM_struct_size \
|
||||||
sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
|
sizeof(struct BPF_MAP_LOOKUP_ELEM_struct)
|
||||||
#define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
|
# define expected_BPF_MAP_LOOKUP_ELEM_struct_size 24
|
||||||
|
|
||||||
struct BPF_MAP_UPDATE_ELEM_struct {
|
struct BPF_MAP_UPDATE_ELEM_struct {
|
||||||
uint32_t map_fd;
|
uint32_t map_fd;
|
||||||
@@ -68,18 +68,18 @@ struct BPF_MAP_UPDATE_ELEM_struct {
|
|||||||
uint64_t ATTRIBUTE_ALIGNED(8) flags;
|
uint64_t ATTRIBUTE_ALIGNED(8) flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_MAP_UPDATE_ELEM_struct_size \
|
# define BPF_MAP_UPDATE_ELEM_struct_size \
|
||||||
sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
|
sizeof(struct BPF_MAP_UPDATE_ELEM_struct)
|
||||||
#define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
|
# define expected_BPF_MAP_UPDATE_ELEM_struct_size 32
|
||||||
|
|
||||||
struct BPF_MAP_DELETE_ELEM_struct {
|
struct BPF_MAP_DELETE_ELEM_struct {
|
||||||
uint32_t map_fd;
|
uint32_t map_fd;
|
||||||
uint64_t ATTRIBUTE_ALIGNED(8) key;
|
uint64_t ATTRIBUTE_ALIGNED(8) key;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_MAP_DELETE_ELEM_struct_size \
|
# define BPF_MAP_DELETE_ELEM_struct_size \
|
||||||
sizeof(struct BPF_MAP_DELETE_ELEM_struct)
|
sizeof(struct BPF_MAP_DELETE_ELEM_struct)
|
||||||
#define expected_BPF_MAP_DELETE_ELEM_struct_size 16
|
# define expected_BPF_MAP_DELETE_ELEM_struct_size 16
|
||||||
|
|
||||||
struct BPF_MAP_GET_NEXT_KEY_struct {
|
struct BPF_MAP_GET_NEXT_KEY_struct {
|
||||||
uint32_t map_fd;
|
uint32_t map_fd;
|
||||||
@@ -87,9 +87,9 @@ struct BPF_MAP_GET_NEXT_KEY_struct {
|
|||||||
uint64_t ATTRIBUTE_ALIGNED(8) next_key;
|
uint64_t ATTRIBUTE_ALIGNED(8) next_key;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_MAP_GET_NEXT_KEY_struct_size \
|
# define BPF_MAP_GET_NEXT_KEY_struct_size \
|
||||||
sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
|
sizeof(struct BPF_MAP_GET_NEXT_KEY_struct)
|
||||||
#define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
|
# define expected_BPF_MAP_GET_NEXT_KEY_struct_size 24
|
||||||
|
|
||||||
struct BPF_PROG_LOAD_struct {
|
struct BPF_PROG_LOAD_struct {
|
||||||
uint32_t prog_type;
|
uint32_t prog_type;
|
||||||
@@ -106,9 +106,9 @@ struct BPF_PROG_LOAD_struct {
|
|||||||
uint32_t expected_attach_type;
|
uint32_t expected_attach_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_LOAD_struct_size \
|
# define BPF_PROG_LOAD_struct_size \
|
||||||
offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
|
offsetofend(struct BPF_PROG_LOAD_struct, expected_attach_type)
|
||||||
#define expected_BPF_PROG_LOAD_struct_size 72
|
# define expected_BPF_PROG_LOAD_struct_size 72
|
||||||
|
|
||||||
struct BPF_OBJ_PIN_struct {
|
struct BPF_OBJ_PIN_struct {
|
||||||
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
|
uint64_t ATTRIBUTE_ALIGNED(8) pathname;
|
||||||
@@ -116,12 +116,12 @@ struct BPF_OBJ_PIN_struct {
|
|||||||
uint32_t file_flags;
|
uint32_t file_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_OBJ_PIN_struct_size \
|
# define BPF_OBJ_PIN_struct_size \
|
||||||
sizeof(struct BPF_OBJ_PIN_struct)
|
sizeof(struct BPF_OBJ_PIN_struct)
|
||||||
#define expected_BPF_OBJ_PIN_struct_size 16
|
# define expected_BPF_OBJ_PIN_struct_size 16
|
||||||
|
|
||||||
#define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
|
# define BPF_OBJ_GET_struct BPF_OBJ_PIN_struct
|
||||||
#define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
|
# define BPF_OBJ_GET_struct_size BPF_OBJ_PIN_struct_size
|
||||||
|
|
||||||
struct BPF_PROG_ATTACH_struct {
|
struct BPF_PROG_ATTACH_struct {
|
||||||
uint32_t target_fd;
|
uint32_t target_fd;
|
||||||
@@ -130,9 +130,9 @@ struct BPF_PROG_ATTACH_struct {
|
|||||||
uint32_t attach_flags;
|
uint32_t attach_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_ATTACH_struct_size \
|
# define BPF_PROG_ATTACH_struct_size \
|
||||||
sizeof(struct BPF_PROG_ATTACH_struct)
|
sizeof(struct BPF_PROG_ATTACH_struct)
|
||||||
#define expected_BPF_PROG_ATTACH_struct_size 16
|
# define expected_BPF_PROG_ATTACH_struct_size 16
|
||||||
|
|
||||||
struct BPF_PROG_DETACH_struct {
|
struct BPF_PROG_DETACH_struct {
|
||||||
uint32_t target_fd;
|
uint32_t target_fd;
|
||||||
@@ -140,9 +140,9 @@ struct BPF_PROG_DETACH_struct {
|
|||||||
uint32_t attach_type;
|
uint32_t attach_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_DETACH_struct_size \
|
# define BPF_PROG_DETACH_struct_size \
|
||||||
sizeof(struct BPF_PROG_DETACH_struct)
|
sizeof(struct BPF_PROG_DETACH_struct)
|
||||||
#define expected_BPF_PROG_DETACH_struct_size 12
|
# define expected_BPF_PROG_DETACH_struct_size 12
|
||||||
|
|
||||||
struct BPF_PROG_TEST_RUN_struct /* test */ {
|
struct BPF_PROG_TEST_RUN_struct /* test */ {
|
||||||
uint32_t prog_fd;
|
uint32_t prog_fd;
|
||||||
@@ -155,9 +155,9 @@ struct BPF_PROG_TEST_RUN_struct /* test */ {
|
|||||||
uint32_t duration;
|
uint32_t duration;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_TEST_RUN_struct_size \
|
# define BPF_PROG_TEST_RUN_struct_size \
|
||||||
sizeof(struct BPF_PROG_TEST_RUN_struct)
|
sizeof(struct BPF_PROG_TEST_RUN_struct)
|
||||||
#define expected_BPF_PROG_TEST_RUN_struct_size 40
|
# define expected_BPF_PROG_TEST_RUN_struct_size 40
|
||||||
|
|
||||||
struct BPF_PROG_GET_NEXT_ID_struct {
|
struct BPF_PROG_GET_NEXT_ID_struct {
|
||||||
uint32_t start_id;
|
uint32_t start_id;
|
||||||
@@ -165,12 +165,12 @@ struct BPF_PROG_GET_NEXT_ID_struct {
|
|||||||
uint32_t open_flags;
|
uint32_t open_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_GET_NEXT_ID_struct_size \
|
# define BPF_PROG_GET_NEXT_ID_struct_size \
|
||||||
sizeof(struct BPF_PROG_GET_NEXT_ID_struct)
|
sizeof(struct BPF_PROG_GET_NEXT_ID_struct)
|
||||||
#define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
|
# define expected_BPF_PROG_GET_NEXT_ID_struct_size 12
|
||||||
|
|
||||||
#define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
|
# define BPF_MAP_GET_NEXT_ID_struct BPF_PROG_GET_NEXT_ID_struct
|
||||||
#define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
|
# define BPF_MAP_GET_NEXT_ID_struct_size BPF_PROG_GET_NEXT_ID_struct_size
|
||||||
|
|
||||||
struct BPF_PROG_GET_FD_BY_ID_struct {
|
struct BPF_PROG_GET_FD_BY_ID_struct {
|
||||||
uint32_t prog_id;
|
uint32_t prog_id;
|
||||||
@@ -178,9 +178,9 @@ struct BPF_PROG_GET_FD_BY_ID_struct {
|
|||||||
uint32_t open_flags;
|
uint32_t open_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_GET_FD_BY_ID_struct_size \
|
# define BPF_PROG_GET_FD_BY_ID_struct_size \
|
||||||
sizeof(struct BPF_PROG_GET_FD_BY_ID_struct)
|
sizeof(struct BPF_PROG_GET_FD_BY_ID_struct)
|
||||||
#define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
|
# define expected_BPF_PROG_GET_FD_BY_ID_struct_size 12
|
||||||
|
|
||||||
struct BPF_MAP_GET_FD_BY_ID_struct {
|
struct BPF_MAP_GET_FD_BY_ID_struct {
|
||||||
uint32_t map_id;
|
uint32_t map_id;
|
||||||
@@ -188,9 +188,9 @@ struct BPF_MAP_GET_FD_BY_ID_struct {
|
|||||||
uint32_t open_flags;
|
uint32_t open_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_MAP_GET_FD_BY_ID_struct_size \
|
# define BPF_MAP_GET_FD_BY_ID_struct_size \
|
||||||
sizeof(struct BPF_MAP_GET_FD_BY_ID_struct)
|
sizeof(struct BPF_MAP_GET_FD_BY_ID_struct)
|
||||||
#define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
|
# define expected_BPF_MAP_GET_FD_BY_ID_struct_size 12
|
||||||
|
|
||||||
struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
|
struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
|
||||||
uint32_t bpf_fd;
|
uint32_t bpf_fd;
|
||||||
@@ -198,9 +198,9 @@ struct BPF_OBJ_GET_INFO_BY_FD_struct /* info */ {
|
|||||||
uint64_t ATTRIBUTE_ALIGNED(8) info;
|
uint64_t ATTRIBUTE_ALIGNED(8) info;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_OBJ_GET_INFO_BY_FD_struct_size \
|
# define BPF_OBJ_GET_INFO_BY_FD_struct_size \
|
||||||
sizeof(struct BPF_OBJ_GET_INFO_BY_FD_struct)
|
sizeof(struct BPF_OBJ_GET_INFO_BY_FD_struct)
|
||||||
#define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
|
# define expected_BPF_OBJ_GET_INFO_BY_FD_struct_size 16
|
||||||
|
|
||||||
struct BPF_PROG_QUERY_struct /* query */ {
|
struct BPF_PROG_QUERY_struct /* query */ {
|
||||||
uint32_t target_fd;
|
uint32_t target_fd;
|
||||||
@@ -211,18 +211,18 @@ struct BPF_PROG_QUERY_struct /* query */ {
|
|||||||
uint32_t prog_cnt;
|
uint32_t prog_cnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_PROG_QUERY_struct_size \
|
# define BPF_PROG_QUERY_struct_size \
|
||||||
offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
|
offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt)
|
||||||
#define expected_BPF_PROG_QUERY_struct_size 28
|
# define expected_BPF_PROG_QUERY_struct_size 28
|
||||||
|
|
||||||
struct BPF_RAW_TRACEPOINT_OPEN_struct /* raw_tracepoint */ {
|
struct BPF_RAW_TRACEPOINT_OPEN_struct /* raw_tracepoint */ {
|
||||||
uint64_t ATTRIBUTE_ALIGNED(8) name;
|
uint64_t ATTRIBUTE_ALIGNED(8) name;
|
||||||
uint32_t prog_fd;
|
uint32_t prog_fd;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BPF_RAW_TRACEPOINT_OPEN_struct_size \
|
# define BPF_RAW_TRACEPOINT_OPEN_struct_size \
|
||||||
offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
|
offsetofend(struct BPF_RAW_TRACEPOINT_OPEN_struct, prog_fd)
|
||||||
#define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
|
# define expected_BPF_RAW_TRACEPOINT_OPEN_struct_size 12
|
||||||
|
|
||||||
struct bpf_map_info_struct {
|
struct bpf_map_info_struct {
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
@@ -241,9 +241,9 @@ struct bpf_map_info_struct {
|
|||||||
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
|
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define bpf_map_info_struct_size \
|
# define bpf_map_info_struct_size \
|
||||||
sizeof(struct bpf_map_info_struct)
|
sizeof(struct bpf_map_info_struct)
|
||||||
#define expected_bpf_map_info_struct_size 64
|
# define expected_bpf_map_info_struct_size 64
|
||||||
|
|
||||||
struct bpf_prog_info_struct {
|
struct bpf_prog_info_struct {
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
@@ -267,8 +267,8 @@ struct bpf_prog_info_struct {
|
|||||||
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
|
uint64_t ATTRIBUTE_ALIGNED(8) netns_ino; /* skip check */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define bpf_prog_info_struct_size \
|
# define bpf_prog_info_struct_size \
|
||||||
sizeof(struct bpf_prog_info_struct)
|
sizeof(struct bpf_prog_info_struct)
|
||||||
#define expected_bpf_prog_info_struct_size 104
|
# define expected_bpf_prog_info_struct_size 104
|
||||||
|
|
||||||
#endif /* !STRACE_BPF_ATTR_H */
|
#endif /* !STRACE_BPF_ATTR_H */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_BPF_FILTER_H
|
#ifndef STRACE_BPF_FILTER_H
|
||||||
#define STRACE_BPF_FILTER_H
|
# define STRACE_BPF_FILTER_H
|
||||||
|
|
||||||
struct bpf_filter_block {
|
struct bpf_filter_block {
|
||||||
uint16_t code;
|
uint16_t code;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_BPF_FPROG_H
|
#ifndef STRACE_BPF_FPROG_H
|
||||||
#define STRACE_BPF_FPROG_H
|
# define STRACE_BPF_FPROG_H
|
||||||
|
|
||||||
struct bpf_fprog {
|
struct bpf_fprog {
|
||||||
unsigned short len;
|
unsigned short len;
|
||||||
|
|||||||
134
btrfs.c
134
btrfs.c
@@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
#ifdef HAVE_LINUX_BTRFS_H
|
#ifdef HAVE_LINUX_BTRFS_H
|
||||||
|
|
||||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
|
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_dev_replace_args)
|
||||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
|
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_send_args)
|
||||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
|
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_received_subvol_args)
|
||||||
#include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
|
# include DEF_MPERS_TYPE(struct_btrfs_ioctl_vol_args_v2)
|
||||||
|
|
||||||
# include <linux/btrfs.h>
|
# include <linux/btrfs.h>
|
||||||
|
|
||||||
@@ -32,8 +32,8 @@ typedef struct btrfs_ioctl_vol_args_v2
|
|||||||
|
|
||||||
#ifdef HAVE_LINUX_BTRFS_H
|
#ifdef HAVE_LINUX_BTRFS_H
|
||||||
|
|
||||||
#include "print_fields.h"
|
# include "print_fields.h"
|
||||||
#include <linux/fs.h>
|
# include <linux/fs.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
|
* Prior to Linux 3.12, the BTRFS_IOC_DEFAULT_SUBVOL used u64 in
|
||||||
@@ -41,15 +41,15 @@ typedef struct btrfs_ioctl_vol_args_v2
|
|||||||
*/
|
*/
|
||||||
typedef __u64 u64;
|
typedef __u64 u64;
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
|
# ifndef HAVE_STRUCT_BTRFS_IOCTL_FEATURE_FLAGS_COMPAT_FLAGS
|
||||||
struct btrfs_ioctl_feature_flags {
|
struct btrfs_ioctl_feature_flags {
|
||||||
uint64_t compat_flags;
|
uint64_t compat_flags;
|
||||||
uint64_t compat_ro_flags;
|
uint64_t compat_ro_flags;
|
||||||
uint64_t incompat_flags;
|
uint64_t incompat_flags;
|
||||||
};
|
};
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
|
# ifndef HAVE_STRUCT_BTRFS_IOCTL_DEFRAG_RANGE_ARGS_START
|
||||||
struct btrfs_ioctl_defrag_range_args {
|
struct btrfs_ioctl_defrag_range_args {
|
||||||
uint64_t start;
|
uint64_t start;
|
||||||
uint64_t len;
|
uint64_t len;
|
||||||
@@ -58,37 +58,37 @@ struct btrfs_ioctl_defrag_range_args {
|
|||||||
uint32_t compress_type;
|
uint32_t compress_type;
|
||||||
uint32_t unused[4];
|
uint32_t unused[4];
|
||||||
};
|
};
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef BTRFS_LABEL_SIZE
|
# ifndef BTRFS_LABEL_SIZE
|
||||||
# define BTRFS_LABEL_SIZE 256
|
# define BTRFS_LABEL_SIZE 256
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef BTRFS_IOC_QUOTA_RESCAN
|
# ifndef BTRFS_IOC_QUOTA_RESCAN
|
||||||
struct btrfs_ioctl_quota_rescan_args {
|
struct btrfs_ioctl_quota_rescan_args {
|
||||||
uint64_t flags, progress, reserved[6];
|
uint64_t flags, progress, reserved[6];
|
||||||
};
|
};
|
||||||
# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
|
# define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \
|
||||||
struct btrfs_ioctl_quota_rescan_args)
|
struct btrfs_ioctl_quota_rescan_args)
|
||||||
# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
|
# define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
|
||||||
struct btrfs_ioctl_quota_rescan_args)
|
struct btrfs_ioctl_quota_rescan_args)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
|
# ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT
|
||||||
# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
|
# define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef BTRFS_IOC_GET_FEATURES
|
# ifndef BTRFS_IOC_GET_FEATURES
|
||||||
# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
# define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
||||||
struct btrfs_ioctl_feature_flags)
|
struct btrfs_ioctl_feature_flags)
|
||||||
# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
|
# define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
|
||||||
struct btrfs_ioctl_feature_flags[2])
|
struct btrfs_ioctl_feature_flags[2])
|
||||||
# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
# define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
|
||||||
struct btrfs_ioctl_feature_flags[3])
|
struct btrfs_ioctl_feature_flags[3])
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef BTRFS_IOC_TREE_SEARCH_V2
|
# ifndef BTRFS_IOC_TREE_SEARCH_V2
|
||||||
# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
|
# define BTRFS_IOC_TREE_SEARCH_V2 _IOWR(BTRFS_IOCTL_MAGIC, 17, \
|
||||||
struct btrfs_ioctl_search_args_v2)
|
struct btrfs_ioctl_search_args_v2)
|
||||||
struct btrfs_ioctl_search_args_v2 {
|
struct btrfs_ioctl_search_args_v2 {
|
||||||
struct btrfs_ioctl_search_key key; /* in/out - search parameters */
|
struct btrfs_ioctl_search_key key; /* in/out - search parameters */
|
||||||
@@ -97,34 +97,34 @@ struct btrfs_ioctl_search_args_v2 {
|
|||||||
* to store item */
|
* to store item */
|
||||||
uint64_t buf[0]; /* out - found items */
|
uint64_t buf[0]; /* out - found items */
|
||||||
};
|
};
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#include "xlat/btrfs_balance_args.h"
|
# include "xlat/btrfs_balance_args.h"
|
||||||
#include "xlat/btrfs_balance_ctl_cmds.h"
|
# include "xlat/btrfs_balance_ctl_cmds.h"
|
||||||
#include "xlat/btrfs_balance_flags.h"
|
# include "xlat/btrfs_balance_flags.h"
|
||||||
#include "xlat/btrfs_balance_state.h"
|
# include "xlat/btrfs_balance_state.h"
|
||||||
#include "xlat/btrfs_compress_types.h"
|
# include "xlat/btrfs_compress_types.h"
|
||||||
#include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
|
# include "xlat/btrfs_cont_reading_from_srcdev_mode.h"
|
||||||
#include "xlat/btrfs_defrag_flags.h"
|
# include "xlat/btrfs_defrag_flags.h"
|
||||||
#include "xlat/btrfs_dev_replace_cmds.h"
|
# include "xlat/btrfs_dev_replace_cmds.h"
|
||||||
#include "xlat/btrfs_dev_replace_results.h"
|
# include "xlat/btrfs_dev_replace_results.h"
|
||||||
#include "xlat/btrfs_dev_replace_state.h"
|
# include "xlat/btrfs_dev_replace_state.h"
|
||||||
#include "xlat/btrfs_dev_stats_flags.h"
|
# include "xlat/btrfs_dev_stats_flags.h"
|
||||||
#include "xlat/btrfs_dev_stats_values.h"
|
# include "xlat/btrfs_dev_stats_values.h"
|
||||||
#include "xlat/btrfs_features_compat.h"
|
# include "xlat/btrfs_features_compat.h"
|
||||||
#include "xlat/btrfs_features_compat_ro.h"
|
# include "xlat/btrfs_features_compat_ro.h"
|
||||||
#include "xlat/btrfs_features_incompat.h"
|
# include "xlat/btrfs_features_incompat.h"
|
||||||
#include "xlat/btrfs_key_types.h"
|
# include "xlat/btrfs_key_types.h"
|
||||||
#include "xlat/btrfs_logical_ino_args_flags.h"
|
# include "xlat/btrfs_logical_ino_args_flags.h"
|
||||||
#include "xlat/btrfs_qgroup_ctl_cmds.h"
|
# include "xlat/btrfs_qgroup_ctl_cmds.h"
|
||||||
#include "xlat/btrfs_qgroup_inherit_flags.h"
|
# include "xlat/btrfs_qgroup_inherit_flags.h"
|
||||||
#include "xlat/btrfs_qgroup_limit_flags.h"
|
# include "xlat/btrfs_qgroup_limit_flags.h"
|
||||||
#include "xlat/btrfs_qgroup_status_flags.h"
|
# include "xlat/btrfs_qgroup_status_flags.h"
|
||||||
#include "xlat/btrfs_scrub_flags.h"
|
# include "xlat/btrfs_scrub_flags.h"
|
||||||
#include "xlat/btrfs_send_flags.h"
|
# include "xlat/btrfs_send_flags.h"
|
||||||
#include "xlat/btrfs_snap_flags_v2.h"
|
# include "xlat/btrfs_snap_flags_v2.h"
|
||||||
#include "xlat/btrfs_space_info_flags.h"
|
# include "xlat/btrfs_space_info_flags.h"
|
||||||
#include "xlat/btrfs_tree_objectids.h"
|
# include "xlat/btrfs_tree_objectids.h"
|
||||||
|
|
||||||
static inline char
|
static inline char
|
||||||
prnibble(char v)
|
prnibble(char v)
|
||||||
@@ -135,7 +135,7 @@ prnibble(char v)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 8-4-4-4-12 = 36 characters */
|
/* 8-4-4-4-12 = 36 characters */
|
||||||
#define UUID_STRING_SIZE 36
|
# define UUID_STRING_SIZE 36
|
||||||
|
|
||||||
/* Formats uuid, returns 0 if it's all zeroes */
|
/* Formats uuid, returns 0 if it's all zeroes */
|
||||||
static int
|
static int
|
||||||
@@ -222,9 +222,9 @@ btrfs_print_qgroup_limit(const struct btrfs_qgroup_limit *lim)
|
|||||||
tprints("}");
|
tprints("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define btrfs_print_key_type(prefix_, where_, field_) \
|
# define btrfs_print_key_type(prefix_, where_, field_) \
|
||||||
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_key_types, NULL)
|
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_key_types, NULL)
|
||||||
#define btrfs_print_objectid(prefix_, where_, field_) \
|
# define btrfs_print_objectid(prefix_, where_, field_) \
|
||||||
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
|
PRINT_FIELD_XVAL_U((prefix_), (where_), field_, btrfs_tree_objectids, \
|
||||||
NULL)
|
NULL)
|
||||||
|
|
||||||
@@ -718,9 +718,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
|||||||
struct btrfs_ioctl_fs_info_args args;
|
struct btrfs_ioctl_fs_info_args args;
|
||||||
char uuid[UUID_STRING_SIZE+1];
|
char uuid[UUID_STRING_SIZE+1];
|
||||||
uint32_t nodesize, sectorsize, clone_alignment;
|
uint32_t nodesize, sectorsize, clone_alignment;
|
||||||
#ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
# ifndef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
||||||
uint32_t *reserved32;
|
uint32_t *reserved32;
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
if (entering(tcp))
|
if (entering(tcp))
|
||||||
return 0;
|
return 0;
|
||||||
@@ -729,16 +729,16 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
|||||||
if (umove_or_printaddr(tcp, arg, &args))
|
if (umove_or_printaddr(tcp, arg, &args))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
# ifdef HAVE_STRUCT_BTRFS_IOCTL_FS_INFO_ARGS_NODESIZE
|
||||||
nodesize = args.nodesize,
|
nodesize = args.nodesize,
|
||||||
sectorsize = args.sectorsize,
|
sectorsize = args.sectorsize,
|
||||||
clone_alignment = args.clone_alignment;
|
clone_alignment = args.clone_alignment;
|
||||||
#else
|
# else
|
||||||
reserved32 = (void *) args.reserved;
|
reserved32 = (void *) args.reserved;
|
||||||
nodesize = reserved32[0];
|
nodesize = reserved32[0];
|
||||||
sectorsize = reserved32[1];
|
sectorsize = reserved32[1];
|
||||||
clone_alignment = reserved32[2];
|
clone_alignment = reserved32[2];
|
||||||
#endif
|
# endif
|
||||||
btrfs_unparse_uuid(args.fsid, uuid);
|
btrfs_unparse_uuid(args.fsid, uuid);
|
||||||
|
|
||||||
PRINT_FIELD_U("{", args, max_id);
|
PRINT_FIELD_U("{", args, max_id);
|
||||||
@@ -892,11 +892,11 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
|||||||
|
|
||||||
tprintf(", flags=");
|
tprintf(", flags=");
|
||||||
printflags64(btrfs_logical_ino_args_flags,
|
printflags64(btrfs_logical_ino_args_flags,
|
||||||
#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
|
# ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
|
||||||
args.flags
|
args.flags
|
||||||
#else
|
# else
|
||||||
args.reserved[3]
|
args.reserved[3]
|
||||||
#endif
|
# endif
|
||||||
, "BTRFS_LOGICAL_INO_ARGS_???");
|
, "BTRFS_LOGICAL_INO_ARGS_???");
|
||||||
PRINT_FIELD_ADDR64(", ", args, inodes);
|
PRINT_FIELD_ADDR64(", ", args, inodes);
|
||||||
tprints("}");
|
tprints("}");
|
||||||
@@ -1262,9 +1262,9 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
|
|||||||
|
|
||||||
case BTRFS_IOC_CLONE: /* FICLONE */
|
case BTRFS_IOC_CLONE: /* FICLONE */
|
||||||
case BTRFS_IOC_CLONE_RANGE: /* FICLONERANGE */
|
case BTRFS_IOC_CLONE_RANGE: /* FICLONERANGE */
|
||||||
#ifdef BTRFS_IOC_FILE_EXTENT_SAME
|
# ifdef BTRFS_IOC_FILE_EXTENT_SAME
|
||||||
case BTRFS_IOC_FILE_EXTENT_SAME: /* FIDEDUPERANGE */
|
case BTRFS_IOC_FILE_EXTENT_SAME: /* FIDEDUPERANGE */
|
||||||
#endif
|
# endif
|
||||||
/*
|
/*
|
||||||
* FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
|
* FICLONE, FICLONERANGE, and FIDEDUPERANGE started out as
|
||||||
* btrfs ioctls and the code was kept for the generic
|
* btrfs ioctls and the code was kept for the generic
|
||||||
|
|||||||
28
cacheflush.c
28
cacheflush.c
@@ -20,15 +20,15 @@
|
|||||||
# include "xlat/cacheflush_scope.h"
|
# include "xlat/cacheflush_scope.h"
|
||||||
|
|
||||||
static const struct xlat cacheflush_flags[] = {
|
static const struct xlat cacheflush_flags[] = {
|
||||||
#ifdef FLUSH_CACHE_BOTH
|
# ifdef FLUSH_CACHE_BOTH
|
||||||
XLAT(FLUSH_CACHE_BOTH),
|
XLAT(FLUSH_CACHE_BOTH),
|
||||||
#endif
|
# endif
|
||||||
#ifdef FLUSH_CACHE_DATA
|
# ifdef FLUSH_CACHE_DATA
|
||||||
XLAT(FLUSH_CACHE_DATA),
|
XLAT(FLUSH_CACHE_DATA),
|
||||||
#endif
|
# endif
|
||||||
#ifdef FLUSH_CACHE_INSN
|
# ifdef FLUSH_CACHE_INSN
|
||||||
XLAT(FLUSH_CACHE_INSN),
|
XLAT(FLUSH_CACHE_INSN),
|
||||||
#endif
|
# endif
|
||||||
XLAT_END
|
XLAT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -72,18 +72,18 @@ SYS_FUNC(cacheflush)
|
|||||||
|
|
||||||
#ifdef SH
|
#ifdef SH
|
||||||
static const struct xlat cacheflush_flags[] = {
|
static const struct xlat cacheflush_flags[] = {
|
||||||
#ifdef CACHEFLUSH_D_INVAL
|
# ifdef CACHEFLUSH_D_INVAL
|
||||||
XLAT(CACHEFLUSH_D_INVAL),
|
XLAT(CACHEFLUSH_D_INVAL),
|
||||||
#endif
|
# endif
|
||||||
#ifdef CACHEFLUSH_D_WB
|
# ifdef CACHEFLUSH_D_WB
|
||||||
XLAT(CACHEFLUSH_D_WB),
|
XLAT(CACHEFLUSH_D_WB),
|
||||||
#endif
|
# endif
|
||||||
#ifdef CACHEFLUSH_D_PURGE
|
# ifdef CACHEFLUSH_D_PURGE
|
||||||
XLAT(CACHEFLUSH_D_PURGE),
|
XLAT(CACHEFLUSH_D_PURGE),
|
||||||
#endif
|
# endif
|
||||||
#ifdef CACHEFLUSH_I
|
# ifdef CACHEFLUSH_I
|
||||||
XLAT(CACHEFLUSH_I),
|
XLAT(CACHEFLUSH_I),
|
||||||
#endif
|
# endif
|
||||||
XLAT_END
|
XLAT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -645,6 +645,8 @@ AC_CHECK_DECLS(m4_normalize([
|
|||||||
KERN_MAX_LOCK_DEPTH,
|
KERN_MAX_LOCK_DEPTH,
|
||||||
KERN_NMI_WATCHDOG,
|
KERN_NMI_WATCHDOG,
|
||||||
KERN_PANIC_ON_NMI,
|
KERN_PANIC_ON_NMI,
|
||||||
|
KERN_PANIC_ON_WARN,
|
||||||
|
KERN_PANIC_PRINT,
|
||||||
NET_LLC,
|
NET_LLC,
|
||||||
NET_NETFILTER,
|
NET_NETFILTER,
|
||||||
NET_DCCP,
|
NET_DCCP,
|
||||||
|
|||||||
6
debian/changelog.in
vendored
6
debian/changelog.in
vendored
@@ -4,6 +4,12 @@ strace (@PACKAGE_VERSION@-1) experimental; urgency=low
|
|||||||
|
|
||||||
-- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@
|
-- Strace <@PACKAGE_BUGREPORT@> @DEB_CHANGELOGTIME@
|
||||||
|
|
||||||
|
strace (4.26-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version.
|
||||||
|
|
||||||
|
-- Dmitry V. Levin <ldv@altlinux.org> Wed, 26 Dec 2018 18:25:10 +0000
|
||||||
|
|
||||||
strace (4.25-1) unstable; urgency=medium
|
strace (4.25-1) unstable; urgency=medium
|
||||||
|
|
||||||
* New upstream version.
|
* New upstream version.
|
||||||
|
|||||||
2
delay.h
2
delay.h
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_DELAY_H
|
#ifndef STRACE_DELAY_H
|
||||||
#define STRACE_DELAY_H
|
# define STRACE_DELAY_H
|
||||||
|
|
||||||
uint16_t alloc_delay_data(void);
|
uint16_t alloc_delay_data(void);
|
||||||
void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);
|
void fill_delay_data(uint16_t delay_idx, int intval, bool isenter);
|
||||||
|
|||||||
2
dm.c
2
dm.c
@@ -98,7 +98,7 @@ dm_decode_values(struct tcb *tcp, const unsigned int code,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "xlat/dm_flags.h"
|
# include "xlat/dm_flags.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dm_decode_flags(const struct dm_ioctl *ioc)
|
dm_decode_flags(const struct dm_ioctl *ioc)
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_ERROR_PRINTS_H
|
#ifndef STRACE_ERROR_PRINTS_H
|
||||||
#define STRACE_ERROR_PRINTS_H
|
# define STRACE_ERROR_PRINTS_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
# include <stdbool.h>
|
||||||
|
|
||||||
#include "gcc_compat.h"
|
# include "gcc_compat.h"
|
||||||
|
|
||||||
extern bool debug_flag;
|
extern bool debug_flag;
|
||||||
|
|
||||||
@@ -31,29 +31,29 @@ void error_msg_and_die(const char *fmt, ...)
|
|||||||
ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
|
ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
|
||||||
|
|
||||||
/* Wrappers for if (debug_flag) error_msg(...) */
|
/* Wrappers for if (debug_flag) error_msg(...) */
|
||||||
#define debug_msg(...) \
|
# define debug_msg(...) \
|
||||||
do { \
|
do { \
|
||||||
if (debug_flag) \
|
if (debug_flag) \
|
||||||
error_msg(__VA_ARGS__); \
|
error_msg(__VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define debug_perror_msg(...) \
|
# define debug_perror_msg(...) \
|
||||||
do { \
|
do { \
|
||||||
if (debug_flag) \
|
if (debug_flag) \
|
||||||
perror_msg(__VA_ARGS__); \
|
perror_msg(__VA_ARGS__); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
/* Simple wrappers for providing function name in error messages */
|
/* Simple wrappers for providing function name in error messages */
|
||||||
#define error_func_msg(fmt_, ...) \
|
# define error_func_msg(fmt_, ...) \
|
||||||
error_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
error_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||||
#define perror_func_msg(fmt_, ...) \
|
# define perror_func_msg(fmt_, ...) \
|
||||||
perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||||
#define debug_func_msg(fmt_, ...) \
|
# define debug_func_msg(fmt_, ...) \
|
||||||
debug_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
debug_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||||
#define debug_func_perror_msg(fmt_, ...) \
|
# define debug_func_perror_msg(fmt_, ...) \
|
||||||
debug_perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
debug_perror_msg("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||||
#define error_func_msg_and_die(fmt_, ...) \
|
# define error_func_msg_and_die(fmt_, ...) \
|
||||||
error_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
|
error_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||||
#define perror_func_msg_and_die(fmt_, ...) \
|
# define perror_func_msg_and_die(fmt_, ...) \
|
||||||
perror_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
|
perror_msg_and_die("%s: " fmt_, __func__, ##__VA_ARGS__)
|
||||||
|
|
||||||
#endif /* !STRACE_ERROR_PRINTS_H */
|
#endif /* !STRACE_ERROR_PRINTS_H */
|
||||||
|
|||||||
2
evdev.c
2
evdev.c
@@ -186,7 +186,7 @@ decode_bitset_(struct tcb *const tcp, const kernel_ulong_t arg,
|
|||||||
return RVAL_IOCTL_DECODED;
|
return RVAL_IOCTL_DECODED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
|
# define decode_bitset(tcp_, arg_, decode_nr_, max_nr_, dflt_, xt_) \
|
||||||
decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
|
decode_bitset_((tcp_), (arg_), (decode_nr_), (max_nr_), \
|
||||||
(dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))
|
(dflt_), ARRAY_SIZE(decode_nr_) - 1, (xt_))
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#ifdef HAVE_LINUX_INPUT_H
|
#ifdef HAVE_LINUX_INPUT_H
|
||||||
|
|
||||||
#include DEF_MPERS_TYPE(struct_ff_effect)
|
# include DEF_MPERS_TYPE(struct_ff_effect)
|
||||||
|
|
||||||
# include <linux/ioctl.h>
|
# include <linux/ioctl.h>
|
||||||
# include <linux/input.h>
|
# include <linux/input.h>
|
||||||
|
|||||||
14
f_owner_ex.h
14
f_owner_ex.h
@@ -6,16 +6,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_F_OWNER_EX_H
|
#ifndef STRACE_F_OWNER_EX_H
|
||||||
#define STRACE_F_OWNER_EX_H
|
# define STRACE_F_OWNER_EX_H
|
||||||
|
|
||||||
#include <linux/fcntl.h>
|
# include <linux/fcntl.h>
|
||||||
|
|
||||||
#if defined HAVE_STRUCT_F_OWNER_EX
|
# if defined HAVE_STRUCT_F_OWNER_EX
|
||||||
typedef struct f_owner_ex struct_kernel_f_owner_ex;
|
typedef struct f_owner_ex struct_kernel_f_owner_ex;
|
||||||
#elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
|
# elif defined HAVE_STRUCT___KERNEL_F_OWNER_EX
|
||||||
typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
|
typedef struct __kernel_f_owner_ex struct_kernel_f_owner_ex;
|
||||||
#else
|
# else
|
||||||
# error struct f_owner_ex definition not found in <linux/fcntl.h>
|
# error struct f_owner_ex definition not found in <linux/fcntl.h>
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#endif /* !STRACE_F_OWNER_EX_H */
|
#endif /* !STRACE_F_OWNER_EX_H */
|
||||||
|
|||||||
2
filter.h
2
filter.h
@@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_FILTER_H
|
#ifndef STRACE_FILTER_H
|
||||||
#define STRACE_FILTER_H
|
# define STRACE_FILTER_H
|
||||||
|
|
||||||
struct number_set;
|
struct number_set;
|
||||||
typedef int (*string_to_uint_func)(const char *);
|
typedef int (*string_to_uint_func)(const char *);
|
||||||
|
|||||||
24
flock.h
24
flock.h
@@ -7,24 +7,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_FLOCK_H
|
#ifndef STRACE_FLOCK_H
|
||||||
#define STRACE_FLOCK_H
|
# define STRACE_FLOCK_H
|
||||||
|
|
||||||
#include <linux/fcntl.h>
|
# include <linux/fcntl.h>
|
||||||
|
|
||||||
#if defined HAVE_STRUCT_FLOCK
|
# if defined HAVE_STRUCT_FLOCK
|
||||||
typedef struct flock struct_kernel_flock;
|
typedef struct flock struct_kernel_flock;
|
||||||
#elif defined HAVE_STRUCT___KERNEL_FLOCK
|
# elif defined HAVE_STRUCT___KERNEL_FLOCK
|
||||||
typedef struct __kernel_flock struct_kernel_flock;
|
typedef struct __kernel_flock struct_kernel_flock;
|
||||||
#else
|
# else
|
||||||
# error struct flock definition not found in <linux/fcntl.h>
|
# error struct flock definition not found in <linux/fcntl.h>
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if defined HAVE_STRUCT_FLOCK64
|
# if defined HAVE_STRUCT_FLOCK64
|
||||||
typedef struct flock64 struct_kernel_flock64;
|
typedef struct flock64 struct_kernel_flock64;
|
||||||
#elif defined HAVE_STRUCT___KERNEL_FLOCK64
|
# elif defined HAVE_STRUCT___KERNEL_FLOCK64
|
||||||
typedef struct __kernel_flock64 struct_kernel_flock64;
|
typedef struct __kernel_flock64 struct_kernel_flock64;
|
||||||
#else
|
# else
|
||||||
# error struct flock64 definition not found in <linux/fcntl.h>
|
# error struct flock64 definition not found in <linux/fcntl.h>
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#endif /* !STRACE_FLOCK_H */
|
#endif /* !STRACE_FLOCK_H */
|
||||||
|
|||||||
166
gcc_compat.h
166
gcc_compat.h
@@ -7,114 +7,114 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_GCC_COMPAT_H
|
#ifndef STRACE_GCC_COMPAT_H
|
||||||
#define STRACE_GCC_COMPAT_H
|
# define STRACE_GCC_COMPAT_H
|
||||||
|
|
||||||
#if defined __GNUC__ && defined __GNUC_MINOR__
|
# if defined __GNUC__ && defined __GNUC_MINOR__
|
||||||
# define GNUC_PREREQ(maj, min) \
|
# define GNUC_PREREQ(maj, min) \
|
||||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||||
#else
|
# else
|
||||||
# define GNUC_PREREQ(maj, min) 0
|
# define GNUC_PREREQ(maj, min) 0
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if defined __clang__ && defined __clang_major__ && defined __clang_minor__
|
# if defined __clang__ && defined __clang_major__ && defined __clang_minor__
|
||||||
# define CLANG_PREREQ(maj, min) \
|
# define CLANG_PREREQ(maj, min) \
|
||||||
((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
|
((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
|
||||||
#else
|
# else
|
||||||
# define CLANG_PREREQ(maj, min) 0
|
# define CLANG_PREREQ(maj, min) 0
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
|
# if !(GNUC_PREREQ(2, 0) || CLANG_PREREQ(1, 0))
|
||||||
# define __attribute__(x) /* empty */
|
# define __attribute__(x) /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(2, 5)
|
# if GNUC_PREREQ(2, 5)
|
||||||
# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
|
# define ATTRIBUTE_NORETURN __attribute__((__noreturn__))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_NORETURN /* empty */
|
# define ATTRIBUTE_NORETURN /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(2, 7)
|
# if GNUC_PREREQ(2, 7)
|
||||||
# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
|
# define ATTRIBUTE_FORMAT(args) __attribute__((__format__ args))
|
||||||
# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
|
# define ATTRIBUTE_ALIGNED(arg) __attribute__((__aligned__(arg)))
|
||||||
# define ATTRIBUTE_PACKED __attribute__((__packed__))
|
# define ATTRIBUTE_PACKED __attribute__((__packed__))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_FORMAT(args) /* empty */
|
# define ATTRIBUTE_FORMAT(args) /* empty */
|
||||||
# define ATTRIBUTE_ALIGNED(arg) /* empty */
|
# define ATTRIBUTE_ALIGNED(arg) /* empty */
|
||||||
# define ATTRIBUTE_PACKED /* empty */
|
# define ATTRIBUTE_PACKED /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(3, 0)
|
# if GNUC_PREREQ(3, 0)
|
||||||
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
|
# define SAME_TYPE(x, y) __builtin_types_compatible_p(typeof(x), typeof(y))
|
||||||
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
|
# define FAIL_BUILD_ON_ZERO(expr) (sizeof(int[-1 + 2 * !!(expr)]) * 0)
|
||||||
/* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
|
/* &(a)[0] is a pointer and not an array, shouldn't be treated as the same */
|
||||||
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
|
# define MUST_BE_ARRAY(a) FAIL_BUILD_ON_ZERO(!SAME_TYPE((a), &(a)[0]))
|
||||||
#else
|
# else
|
||||||
# define SAME_TYPE(x, y) 0
|
# define SAME_TYPE(x, y) 0
|
||||||
# define MUST_BE_ARRAY(a) 0
|
# define MUST_BE_ARRAY(a) 0
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(3, 0)
|
# if GNUC_PREREQ(3, 0)
|
||||||
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
|
# define ATTRIBUTE_MALLOC __attribute__((__malloc__))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_MALLOC /* empty */
|
# define ATTRIBUTE_MALLOC /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(3, 1)
|
# if GNUC_PREREQ(3, 1)
|
||||||
# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
|
# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_NOINLINE /* empty */
|
# define ATTRIBUTE_NOINLINE /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(4, 0)
|
# if GNUC_PREREQ(4, 0)
|
||||||
# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__))
|
# define ATTRIBUTE_SENTINEL __attribute__((__sentinel__))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_SENTINEL /* empty */
|
# define ATTRIBUTE_SENTINEL /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(4, 1)
|
# if GNUC_PREREQ(4, 1)
|
||||||
# define ALIGNOF(t_) __alignof__(t_)
|
# define ALIGNOF(t_) __alignof__(t_)
|
||||||
#else
|
# else
|
||||||
# define ALIGNOF(t_) (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
|
# define ALIGNOF(t_) (sizeof(struct { char x_; t_ y_; }) - sizeof(t_))
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(4, 3)
|
# if GNUC_PREREQ(4, 3)
|
||||||
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
|
# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__((__alloc_size__ args))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
|
# define ATTRIBUTE_ALLOC_SIZE(args) /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(7, 0)
|
# if GNUC_PREREQ(7, 0)
|
||||||
# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
|
# define ATTRIBUTE_FALLTHROUGH __attribute__((__fallthrough__))
|
||||||
#else
|
# else
|
||||||
# define ATTRIBUTE_FALLTHROUGH ((void) 0)
|
# define ATTRIBUTE_FALLTHROUGH ((void) 0)
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if CLANG_PREREQ(2, 8)
|
# if CLANG_PREREQ(2, 8)
|
||||||
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
|
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
|
||||||
_Pragma("clang diagnostic push"); \
|
_Pragma("clang diagnostic push"); \
|
||||||
_Pragma("clang diagnostic ignored \"-Winitializer-overrides\"");
|
_Pragma("clang diagnostic ignored \"-Winitializer-overrides\"");
|
||||||
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
|
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
|
||||||
_Pragma("clang diagnostic pop");
|
_Pragma("clang diagnostic pop");
|
||||||
#elif GNUC_PREREQ(4, 2)
|
# elif GNUC_PREREQ(4, 2)
|
||||||
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
|
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT \
|
||||||
_Pragma("GCC diagnostic push"); \
|
_Pragma("GCC diagnostic push"); \
|
||||||
_Pragma("GCC diagnostic ignored \"-Woverride-init\"");
|
_Pragma("GCC diagnostic ignored \"-Woverride-init\"");
|
||||||
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
|
# define DIAG_POP_IGNORE_OVERRIDE_INIT \
|
||||||
_Pragma("GCC diagnostic pop");
|
_Pragma("GCC diagnostic pop");
|
||||||
#else
|
# else
|
||||||
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT /* empty */
|
# define DIAG_PUSH_IGNORE_OVERRIDE_INIT /* empty */
|
||||||
# define DIAG_POP_IGNORE_OVERRIDE_INIT /* empty */
|
# define DIAG_POP_IGNORE_OVERRIDE_INIT /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if GNUC_PREREQ(6, 0)
|
# if GNUC_PREREQ(6, 0)
|
||||||
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
|
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE \
|
||||||
_Pragma("GCC diagnostic push"); \
|
_Pragma("GCC diagnostic push"); \
|
||||||
_Pragma("GCC diagnostic ignored \"-Wtautological-compare\"");
|
_Pragma("GCC diagnostic ignored \"-Wtautological-compare\"");
|
||||||
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE \
|
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE \
|
||||||
_Pragma("GCC diagnostic pop");
|
_Pragma("GCC diagnostic pop");
|
||||||
#else
|
# else
|
||||||
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
# define DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
||||||
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
# define DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE /* empty */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#endif /* !STRACE_GCC_COMPAT_H */
|
#endif /* !STRACE_GCC_COMPAT_H */
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_GET_PERSONALITY_H
|
#ifndef STRACE_GET_PERSONALITY_H
|
||||||
#define STRACE_GET_PERSONALITY_H
|
# define STRACE_GET_PERSONALITY_H
|
||||||
|
|
||||||
#include "ptrace.h"
|
# include "ptrace.h"
|
||||||
|
|
||||||
extern int
|
extern int
|
||||||
get_personality_from_syscall_info(const struct ptrace_syscall_info *);
|
get_personality_from_syscall_info(const struct ptrace_syscall_info *);
|
||||||
|
|||||||
2
ipc.c
2
ipc.c
@@ -21,7 +21,7 @@ SYS_FUNC(ipc)
|
|||||||
printxval_u(ipccalls, call, NULL);
|
printxval_u(ipccalls, call, NULL);
|
||||||
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
for (i = 1; i < tcp->s_ent->nargs; ++i)
|
for (i = 1; i < n_args(tcp); ++i)
|
||||||
tprintf(", %#" PRI_klx, tcp->u_arg[i]);
|
tprintf(", %#" PRI_klx, tcp->u_arg[i]);
|
||||||
|
|
||||||
return RVAL_DECODED;
|
return RVAL_DECODED;
|
||||||
|
|||||||
22
ipc_defs.h
22
ipc_defs.h
@@ -7,21 +7,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_IPC_DEFS_H
|
#ifndef STRACE_IPC_DEFS_H
|
||||||
#define STRACE_IPC_DEFS_H
|
# define STRACE_IPC_DEFS_H
|
||||||
|
|
||||||
#ifdef HAVE_SYS_IPC_H
|
# ifdef HAVE_SYS_IPC_H
|
||||||
# include <sys/ipc.h>
|
# include <sys/ipc.h>
|
||||||
#elif defined HAVE_LINUX_IPC_H
|
# elif defined HAVE_LINUX_IPC_H
|
||||||
# include <linux/ipc.h>
|
# include <linux/ipc.h>
|
||||||
/* While glibc uses __key, the kernel uses key. */
|
/* While glibc uses __key, the kernel uses key. */
|
||||||
# define __key key
|
# define __key key
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if !defined IPC_64
|
# if !defined IPC_64
|
||||||
# define IPC_64 0x100
|
# define IPC_64 0x100
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#define PRINTCTL(flagset, arg, dflt) \
|
# define PRINTCTL(flagset, arg, dflt) \
|
||||||
do { \
|
do { \
|
||||||
if ((arg) & IPC_64) { \
|
if ((arg) & IPC_64) { \
|
||||||
print_xlat(IPC_64); \
|
print_xlat(IPC_64); \
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_KERNEL_TYPES_H
|
#ifndef STRACE_KERNEL_TYPES_H
|
||||||
#define STRACE_KERNEL_TYPES_H
|
# define STRACE_KERNEL_TYPES_H
|
||||||
|
|
||||||
# if defined HAVE___KERNEL_LONG_T && defined HAVE___KERNEL_ULONG_T
|
# if defined HAVE___KERNEL_LONG_T && defined HAVE___KERNEL_ULONG_T
|
||||||
|
|
||||||
# include <asm/posix_types.h>
|
# include <asm/posix_types.h>
|
||||||
|
|
||||||
typedef __kernel_long_t kernel_long_t;
|
typedef __kernel_long_t kernel_long_t;
|
||||||
typedef __kernel_ulong_t kernel_ulong_t;
|
typedef __kernel_ulong_t kernel_ulong_t;
|
||||||
@@ -35,15 +35,15 @@ typedef struct {
|
|||||||
char d_name[1];
|
char d_name[1];
|
||||||
} kernel_dirent;
|
} kernel_dirent;
|
||||||
|
|
||||||
#if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
|
# if SIZEOF_KERNEL_LONG_T > SIZEOF_LONG
|
||||||
# define PRI_kl "ll"
|
# define PRI_kl "ll"
|
||||||
#else
|
# else
|
||||||
# define PRI_kl "l"
|
# define PRI_kl "l"
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#define PRI_kld PRI_kl"d"
|
# define PRI_kld PRI_kl"d"
|
||||||
#define PRI_klu PRI_kl"u"
|
# define PRI_klu PRI_kl"u"
|
||||||
#define PRI_klx PRI_kl"x"
|
# define PRI_klx PRI_kl"x"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The kernel used to define 64-bit types on 64-bit systems on a per-arch
|
* The kernel used to define 64-bit types on 64-bit systems on a per-arch
|
||||||
@@ -54,17 +54,17 @@ typedef struct {
|
|||||||
* every printing of __u64 or __s64 to stdint types.
|
* every printing of __u64 or __s64 to stdint types.
|
||||||
* The exception is Android, where for MIPS64 unsigned long long is used.
|
* The exception is Android, where for MIPS64 unsigned long long is used.
|
||||||
*/
|
*/
|
||||||
#if SIZEOF_LONG == 4
|
# if SIZEOF_LONG == 4
|
||||||
# define PRI__64 "ll"
|
# define PRI__64 "ll"
|
||||||
#elif defined ALPHA || defined IA64 || defined __powerpc64__ \
|
# elif defined ALPHA || defined IA64 || defined __powerpc64__ \
|
||||||
|| (defined MIPS && !defined __ANDROID__)
|
|| (defined MIPS && !defined __ANDROID__)
|
||||||
# define PRI__64 "l"
|
# define PRI__64 "l"
|
||||||
#else
|
# else
|
||||||
# define PRI__64 "ll"
|
# define PRI__64 "ll"
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#define PRI__d64 PRI__64"d"
|
# define PRI__d64 PRI__64"d"
|
||||||
#define PRI__u64 PRI__64"u"
|
# define PRI__u64 PRI__64"u"
|
||||||
#define PRI__x64 PRI__64"x"
|
# define PRI__x64 PRI__64"x"
|
||||||
|
|
||||||
#endif /* !STRACE_KERNEL_TYPES_H */
|
#endif /* !STRACE_KERNEL_TYPES_H */
|
||||||
|
|||||||
@@ -6,16 +6,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_KEYCTL_KDF_PARAMS_H
|
#ifndef STRACE_KEYCTL_KDF_PARAMS_H
|
||||||
#define STRACE_KEYCTL_KDF_PARAMS_H
|
# define STRACE_KEYCTL_KDF_PARAMS_H
|
||||||
|
|
||||||
#include <stdint.h>
|
# include <stdint.h>
|
||||||
#include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
/* from include/linux/crypto.h */
|
/* from include/linux/crypto.h */
|
||||||
#define CRYPTO_MAX_ALG_NAME 128
|
# define CRYPTO_MAX_ALG_NAME 128
|
||||||
|
|
||||||
/* from security/keys/internal.h */
|
/* from security/keys/internal.h */
|
||||||
#define KEYCTL_KDF_MAX_OI_LEN 64 /* max length of otherinfo */
|
# define KEYCTL_KDF_MAX_OI_LEN 64 /* max length of otherinfo */
|
||||||
|
|
||||||
struct keyctl_kdf_params {
|
struct keyctl_kdf_params {
|
||||||
char *hashname;
|
char *hashname;
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_KILL_SAVE_ERRNO_H
|
#ifndef STRACE_KILL_SAVE_ERRNO_H
|
||||||
#define STRACE_KILL_SAVE_ERRNO_H
|
# define STRACE_KILL_SAVE_ERRNO_H
|
||||||
|
|
||||||
#include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
#include <errno.h>
|
# include <errno.h>
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
kill_save_errno(pid_t pid, int sig)
|
kill_save_errno(pid_t pid, int sig)
|
||||||
|
|||||||
2
kvm.c
2
kvm.c
@@ -107,7 +107,7 @@ map_len(struct mmap_cache_entry_t *map_info)
|
|||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
|
# define VCPU_DENTRY_PREFIX "anon_inode:kvm-vcpu:"
|
||||||
|
|
||||||
static struct vcpu_info*
|
static struct vcpu_info*
|
||||||
vcpu_get_info(struct tcb *const tcp, int fd)
|
vcpu_get_info(struct tcb *const tcp, int fd)
|
||||||
|
|||||||
@@ -9,30 +9,30 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LARGEFILE_WRAPPERS_H
|
#ifndef STRACE_LARGEFILE_WRAPPERS_H
|
||||||
#define STRACE_LARGEFILE_WRAPPERS_H
|
# define STRACE_LARGEFILE_WRAPPERS_H
|
||||||
|
|
||||||
#include "defs.h"
|
# include "defs.h"
|
||||||
|
|
||||||
#ifdef _LARGEFILE64_SOURCE
|
# ifdef _LARGEFILE64_SOURCE
|
||||||
# ifdef HAVE_FOPEN64
|
# ifdef HAVE_FOPEN64
|
||||||
# define fopen_stream fopen64
|
# define fopen_stream fopen64
|
||||||
|
# else
|
||||||
|
# define fopen_stream fopen
|
||||||
|
# endif
|
||||||
|
# define struct_stat struct stat64
|
||||||
|
# define stat_file stat64
|
||||||
|
# define struct_dirent struct dirent64
|
||||||
|
# define read_dir readdir64
|
||||||
|
# define struct_rlimit struct rlimit64
|
||||||
|
# define set_rlimit setrlimit64
|
||||||
# else
|
# else
|
||||||
# define fopen_stream fopen
|
# define fopen_stream fopen
|
||||||
|
# define struct_stat struct stat
|
||||||
|
# define stat_file stat
|
||||||
|
# define struct_dirent struct dirent
|
||||||
|
# define read_dir readdir
|
||||||
|
# define struct_rlimit struct rlimit
|
||||||
|
# define set_rlimit setrlimit
|
||||||
# endif
|
# endif
|
||||||
# define struct_stat struct stat64
|
|
||||||
# define stat_file stat64
|
|
||||||
# define struct_dirent struct dirent64
|
|
||||||
# define read_dir readdir64
|
|
||||||
# define struct_rlimit struct rlimit64
|
|
||||||
# define set_rlimit setrlimit64
|
|
||||||
#else
|
|
||||||
# define fopen_stream fopen
|
|
||||||
# define struct_stat struct stat
|
|
||||||
# define stat_file stat
|
|
||||||
# define struct_dirent struct dirent
|
|
||||||
# define read_dir readdir
|
|
||||||
# define struct_rlimit struct rlimit
|
|
||||||
# define set_rlimit setrlimit
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* STRACE_LARGEFILE_WRAPPERS_H */
|
#endif /* STRACE_LARGEFILE_WRAPPERS_H */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0)
|
if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
|
|||||||
{
|
{
|
||||||
*err = 0;
|
*err = 0;
|
||||||
|
|
||||||
#ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
|
# ifdef __thumb__ /* && FRAME_POINTERS_ENABLED */
|
||||||
|
|
||||||
register kernel_ulong_t rt;
|
register kernel_ulong_t rt;
|
||||||
register kernel_ulong_t r0 __asm__("r0");
|
register kernel_ulong_t r0 __asm__("r0");
|
||||||
@@ -26,7 +26,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
|
|||||||
: "r"(nr)
|
: "r"(nr)
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
#else
|
# else
|
||||||
|
|
||||||
register kernel_ulong_t r7 __asm__("r7") = nr;
|
register kernel_ulong_t r7 __asm__("r7") = nr;
|
||||||
register kernel_ulong_t r0 __asm__("r0");
|
register kernel_ulong_t r0 __asm__("r0");
|
||||||
@@ -35,7 +35,7 @@ raw_syscall_0(const kernel_ulong_t nr, kernel_ulong_t *err)
|
|||||||
: "r"(r7)
|
: "r"(r7)
|
||||||
: "memory");
|
: "memory");
|
||||||
|
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
return r0;
|
return r0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_ASM_STAT_H
|
#ifndef STRACE_ASM_STAT_H
|
||||||
#define STRACE_ASM_STAT_H
|
# define STRACE_ASM_STAT_H
|
||||||
|
|
||||||
# undef dev_t
|
# undef dev_t
|
||||||
# undef gid_t
|
# undef gid_t
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
};
|
};
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
|
if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int sig;
|
int sig;
|
||||||
|
|||||||
230
linux/dummy.h
230
linux/dummy.h
@@ -8,140 +8,140 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_DUMMY_H
|
#ifndef STRACE_LINUX_DUMMY_H
|
||||||
#define STRACE_LINUX_DUMMY_H
|
# define STRACE_LINUX_DUMMY_H
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT___OLD_KERNEL_STAT
|
# ifndef HAVE_STRUCT___OLD_KERNEL_STAT
|
||||||
#define sys_oldfstat printargs
|
# define sys_oldfstat printargs
|
||||||
#define sys_oldstat printargs
|
# define sys_oldstat printargs
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* still unfinished */
|
/* still unfinished */
|
||||||
#define sys_rseq printargs
|
# define sys_rseq printargs
|
||||||
#define sys_vm86 printargs
|
# define sys_vm86 printargs
|
||||||
#define sys_vm86old printargs
|
# define sys_vm86old printargs
|
||||||
|
|
||||||
/* machine-specific */
|
/* machine-specific */
|
||||||
#ifndef HAVE_STRUCT_USER_DESC
|
# ifndef HAVE_STRUCT_USER_DESC
|
||||||
# define sys_modify_ldt printargs
|
# define sys_modify_ldt printargs
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
|
# if !(defined HAVE_STRUCT_USER_DESC || defined M68K || defined MIPS)
|
||||||
# define sys_set_thread_area printargs
|
# define sys_set_thread_area printargs
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
|
# if !(defined HAVE_STRUCT_USER_DESC || defined M68K)
|
||||||
# define sys_get_thread_area printargs
|
# define sys_get_thread_area printargs
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifdef ALPHA
|
# ifdef ALPHA
|
||||||
# define sys_getdtablesize printargs
|
# define sys_getdtablesize printargs
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* like another call */
|
/* like another call */
|
||||||
#define sys_acct sys_chdir
|
# define sys_acct sys_chdir
|
||||||
#define sys_chroot sys_chdir
|
# define sys_chroot sys_chdir
|
||||||
#define sys_clock_getres sys_clock_gettime
|
# define sys_clock_getres sys_clock_gettime
|
||||||
#define sys_connect sys_bind
|
# define sys_connect sys_bind
|
||||||
#define sys_fchdir sys_close
|
# define sys_fchdir sys_close
|
||||||
#define sys_fdatasync sys_close
|
# define sys_fdatasync sys_close
|
||||||
#define sys_fsync sys_close
|
# define sys_fsync sys_close
|
||||||
#define sys_getegid sys_getuid
|
# define sys_getegid sys_getuid
|
||||||
#define sys_getegid16 sys_geteuid16
|
# define sys_getegid16 sys_geteuid16
|
||||||
#define sys_geteuid sys_getuid
|
# define sys_geteuid sys_getuid
|
||||||
#define sys_geteuid16 sys_getuid16
|
# define sys_geteuid16 sys_getuid16
|
||||||
#define sys_getgid sys_getuid
|
# define sys_getgid sys_getuid
|
||||||
#define sys_getgid16 sys_getuid16
|
# define sys_getgid16 sys_getuid16
|
||||||
#define sys_getpeername sys_getsockname
|
# define sys_getpeername sys_getsockname
|
||||||
#define sys_getresgid sys_getresuid
|
# define sys_getresgid sys_getresuid
|
||||||
#define sys_getresgid16 sys_getresuid16
|
# define sys_getresgid16 sys_getresuid16
|
||||||
#define sys_lstat sys_stat
|
# define sys_lstat sys_stat
|
||||||
#define sys_lstat64 sys_stat64
|
# define sys_lstat64 sys_stat64
|
||||||
#define sys_mkdir sys_chmod
|
# define sys_mkdir sys_chmod
|
||||||
#define sys_mkdirat sys_fchmodat
|
# define sys_mkdirat sys_fchmodat
|
||||||
#define sys_mlock sys_munmap
|
# define sys_mlock sys_munmap
|
||||||
#define sys_mq_unlink sys_chdir
|
# define sys_mq_unlink sys_chdir
|
||||||
#define sys_munlock sys_munmap
|
# define sys_munlock sys_munmap
|
||||||
#define sys_oldlstat sys_oldstat
|
# define sys_oldlstat sys_oldstat
|
||||||
#define sys_pivotroot sys_link
|
# define sys_pivotroot sys_link
|
||||||
#define sys_rename sys_link
|
# define sys_rename sys_link
|
||||||
#define sys_rmdir sys_chdir
|
# define sys_rmdir sys_chdir
|
||||||
#define sys_sched_get_priority_max sys_sched_get_priority_min
|
# define sys_sched_get_priority_max sys_sched_get_priority_min
|
||||||
#define sys_set_robust_list sys_munmap
|
# define sys_set_robust_list sys_munmap
|
||||||
#define sys_setdomainname sys_sethostname
|
# define sys_setdomainname sys_sethostname
|
||||||
#define sys_setfsgid sys_setfsuid
|
# define sys_setfsgid sys_setfsuid
|
||||||
#define sys_setfsgid16 sys_setfsuid16
|
# define sys_setfsgid16 sys_setfsuid16
|
||||||
#define sys_setgid sys_setuid
|
# define sys_setgid sys_setuid
|
||||||
#define sys_setgid16 sys_setuid16
|
# define sys_setgid16 sys_setuid16
|
||||||
#define sys_setregid sys_setreuid
|
# define sys_setregid sys_setreuid
|
||||||
#define sys_setregid16 sys_setreuid16
|
# define sys_setregid16 sys_setreuid16
|
||||||
#define sys_setresgid sys_setresuid
|
# define sys_setresgid sys_setresuid
|
||||||
#define sys_setresgid16 sys_setresuid16
|
# define sys_setresgid16 sys_setresuid16
|
||||||
#define sys_stime sys_time
|
# define sys_stime sys_time
|
||||||
#define sys_swapoff sys_chdir
|
# define sys_swapoff sys_chdir
|
||||||
#define sys_symlink sys_link
|
# define sys_symlink sys_link
|
||||||
#define sys_syncfs sys_close
|
# define sys_syncfs sys_close
|
||||||
#define sys_umount sys_chdir
|
# define sys_umount sys_chdir
|
||||||
#define sys_unlink sys_chdir
|
# define sys_unlink sys_chdir
|
||||||
#define sys_uselib sys_chdir
|
# define sys_uselib sys_chdir
|
||||||
#define sys_vfork sys_fork
|
# define sys_vfork sys_fork
|
||||||
|
|
||||||
/* printargs does the right thing */
|
/* printargs does the right thing */
|
||||||
#define sys_getpgrp printargs
|
# define sys_getpgrp printargs
|
||||||
#define sys_getpid printargs
|
# define sys_getpid printargs
|
||||||
#define sys_getppid printargs
|
# define sys_getppid printargs
|
||||||
#define sys_gettid printargs
|
# define sys_gettid printargs
|
||||||
#define sys_idle printargs
|
# define sys_idle printargs
|
||||||
#define sys_inotify_init printargs
|
# define sys_inotify_init printargs
|
||||||
#define sys_munlockall printargs
|
# define sys_munlockall printargs
|
||||||
#define sys_pause printargs
|
# define sys_pause printargs
|
||||||
#define sys_printargs printargs
|
# define sys_printargs printargs
|
||||||
#define sys_sched_yield printargs
|
# define sys_sched_yield printargs
|
||||||
#define sys_setsid printargs
|
# define sys_setsid printargs
|
||||||
#define sys_set_tid_address printargs
|
# define sys_set_tid_address printargs
|
||||||
#define sys_setup printargs
|
# define sys_setup printargs
|
||||||
#define sys_sync printargs
|
# define sys_sync printargs
|
||||||
#define sys_syscall printargs
|
# define sys_syscall printargs
|
||||||
#define sys_vhangup printargs
|
# define sys_vhangup printargs
|
||||||
|
|
||||||
/* printargs_u does the right thing */
|
/* printargs_u does the right thing */
|
||||||
#define sys_alarm printargs_u
|
# define sys_alarm printargs_u
|
||||||
|
|
||||||
/* printargs_d does the right thing */
|
/* printargs_d does the right thing */
|
||||||
#define sys_exit printargs_d
|
# define sys_exit printargs_d
|
||||||
#define sys_getpgid printargs_d
|
# define sys_getpgid printargs_d
|
||||||
#define sys_getsid printargs_d
|
# define sys_getsid printargs_d
|
||||||
#define sys_nice printargs_d
|
# define sys_nice printargs_d
|
||||||
#define sys_setpgid printargs_d
|
# define sys_setpgid printargs_d
|
||||||
#define sys_setpgrp printargs_d
|
# define sys_setpgrp printargs_d
|
||||||
#define sys_timer_delete printargs_d
|
# define sys_timer_delete printargs_d
|
||||||
#define sys_timer_getoverrun printargs_d
|
# define sys_timer_getoverrun printargs_d
|
||||||
|
|
||||||
/* unimplemented */
|
/* unimplemented */
|
||||||
#define sys_afs_syscall printargs
|
# define sys_afs_syscall printargs
|
||||||
#define sys_break printargs
|
# define sys_break printargs
|
||||||
#define sys_create_module printargs
|
# define sys_create_module printargs
|
||||||
#define sys_ftime printargs
|
# define sys_ftime printargs
|
||||||
#define sys_get_kernel_syms printargs
|
# define sys_get_kernel_syms printargs
|
||||||
#define sys_getpmsg printargs
|
# define sys_getpmsg printargs
|
||||||
#define sys_gtty printargs
|
# define sys_gtty printargs
|
||||||
#define sys_lock printargs
|
# define sys_lock printargs
|
||||||
#define sys_mpx printargs
|
# define sys_mpx printargs
|
||||||
#define sys_nfsservctl printargs
|
# define sys_nfsservctl printargs
|
||||||
#define sys_prof printargs
|
# define sys_prof printargs
|
||||||
#define sys_profil printargs
|
# define sys_profil printargs
|
||||||
#define sys_putpmsg printargs
|
# define sys_putpmsg printargs
|
||||||
#define sys_query_module printargs
|
# define sys_query_module printargs
|
||||||
#define sys_security printargs
|
# define sys_security printargs
|
||||||
#define sys_stty printargs
|
# define sys_stty printargs
|
||||||
#define sys_timerfd printargs
|
# define sys_timerfd printargs
|
||||||
#define sys_tuxcall printargs
|
# define sys_tuxcall printargs
|
||||||
#define sys_ulimit printargs
|
# define sys_ulimit printargs
|
||||||
#define sys_vserver printargs
|
# define sys_vserver printargs
|
||||||
|
|
||||||
/* deprecated */
|
/* deprecated */
|
||||||
#define sys_bdflush printargs
|
# define sys_bdflush printargs
|
||||||
#define sys_oldolduname printargs
|
# define sys_oldolduname printargs
|
||||||
#define sys_olduname printargs
|
# define sys_olduname printargs
|
||||||
#define sys_sysfs printargs
|
# define sys_sysfs printargs
|
||||||
|
|
||||||
#endif /* !STRACE_LINUX_DUMMY_H */
|
#endif /* !STRACE_LINUX_DUMMY_H */
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
|
if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned int tramp[9];
|
unsigned int tramp[9];
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t pretcode;
|
uint32_t pretcode;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
unsigned long *out0 = ia64_rse_skip_regs(rbs_end, -sof + sol);
|
unsigned long *out0 = ia64_rse_skip_regs(rbs_end, -sof + sol);
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i) {
|
for (i = 0; i < n_args(tcp); ++i) {
|
||||||
if (umove(tcp,
|
if (umove(tcp,
|
||||||
(unsigned long) ia64_rse_skip_regs(out0, i),
|
(unsigned long) ia64_rse_skip_regs(out0, i),
|
||||||
&tcp->u_arg[i]) < 0) {
|
&tcp->u_arg[i]) < 0) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned long arg0;
|
unsigned long arg0;
|
||||||
@@ -19,7 +19,7 @@ typedef struct {
|
|||||||
struct sigcontext sc;
|
struct sigcontext sc;
|
||||||
} struct_rt_sigframe;
|
} struct_rt_sigframe;
|
||||||
|
|
||||||
#define OFFSETOF_SIGMASK_IN_RT_SIGFRAME \
|
# define OFFSETOF_SIGMASK_IN_RT_SIGFRAME \
|
||||||
offsetof(struct_rt_sigframe, sc.sc_mask)
|
offsetof(struct_rt_sigframe, sc.sc_mask)
|
||||||
|
|
||||||
#endif /* !STRACE_RT_SIGFRAME_H */
|
#endif /* !STRACE_RT_SIGFRAME_H */
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_INET_DIAG_H
|
#ifndef STRACE_LINUX_INET_DIAG_H
|
||||||
#define STRACE_LINUX_INET_DIAG_H
|
# define STRACE_LINUX_INET_DIAG_H
|
||||||
|
|
||||||
#define TCPDIAG_GETSOCK 18
|
# define TCPDIAG_GETSOCK 18
|
||||||
#define DCCPDIAG_GETSOCK 19
|
# define DCCPDIAG_GETSOCK 19
|
||||||
|
|
||||||
/* Socket identity */
|
/* Socket identity */
|
||||||
struct inet_diag_sockid {
|
struct inet_diag_sockid {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *pretcode;
|
char *pretcode;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, (5 + i) * 4, &tcp->u_arg[i]) < 0)
|
if (upeek(tcp, (5 + i) * 4, &tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
7
linux/mips/.gitignore
vendored
7
linux/mips/.gitignore
vendored
@@ -1,10 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2015-2018 The strace developers.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
syscallent-n32-stub.h
|
syscallent-n32-stub.h
|
||||||
syscallent-n64-stub.h
|
syscallent-n64-stub.h
|
||||||
syscallent-o32-stub.h
|
syscallent-o32-stub.h
|
||||||
|
|||||||
@@ -21,19 +21,45 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
tcp->u_arg[1] = mips_REG_A1;
|
tcp->u_arg[1] = mips_REG_A1;
|
||||||
tcp->u_arg[2] = mips_REG_A2;
|
tcp->u_arg[2] = mips_REG_A2;
|
||||||
tcp->u_arg[3] = mips_REG_A3;
|
tcp->u_arg[3] = mips_REG_A3;
|
||||||
if (tcp->s_ent->nargs > 4
|
if (n_args(tcp) > 4
|
||||||
&& umoven(tcp, mips_REG_SP + 4 * sizeof(tcp->u_arg[0]),
|
&& umoven(tcp, mips_REG_SP + 4 * sizeof(tcp->u_arg[0]),
|
||||||
(tcp->s_ent->nargs - 4) * sizeof(tcp->u_arg[0]),
|
(n_args(tcp) - 4) * sizeof(tcp->u_arg[0]),
|
||||||
&tcp->u_arg[4]) < 0) {
|
&tcp->u_arg[4]) < 0) {
|
||||||
/*
|
/*
|
||||||
* Let's proceed with the first 4 arguments
|
* Let's proceed with the first 4 arguments
|
||||||
* instead of reporting the failure.
|
* instead of reporting the failure.
|
||||||
*/
|
*/
|
||||||
memset(&tcp->u_arg[4], 0,
|
memset(&tcp->u_arg[4], 0,
|
||||||
(tcp->s_ent->nargs - 4) * sizeof(tcp->u_arg[0]));
|
(n_args(tcp) - 4) * sizeof(tcp->u_arg[0]));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# error unsupported mips abi
|
# error unsupported mips abi
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SYS_syscall_subcall
|
||||||
|
static void
|
||||||
|
decode_syscall_subcall(struct tcb *tcp)
|
||||||
|
{
|
||||||
|
if (!scno_is_valid(tcp->u_arg[0]))
|
||||||
|
return;
|
||||||
|
tcp->scno = tcp->u_arg[0];
|
||||||
|
tcp->qual_flg = qual_flags(tcp->scno);
|
||||||
|
tcp->s_ent = &sysent[tcp->scno];
|
||||||
|
memmove(&tcp->u_arg[0], &tcp->u_arg[1],
|
||||||
|
sizeof(tcp->u_arg) - sizeof(tcp->u_arg[0]));
|
||||||
|
/*
|
||||||
|
* Fetching the last arg of 7-arg syscalls (fadvise64_64
|
||||||
|
* and sync_file_range) requires additional code,
|
||||||
|
* see linux/mips/get_syscall_args.c
|
||||||
|
*/
|
||||||
|
if (n_args(tcp) == MAX_ARGS) {
|
||||||
|
if (umoven(tcp,
|
||||||
|
mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]),
|
||||||
|
sizeof(tcp->u_arg[0]),
|
||||||
|
&tcp->u_arg[MAX_ARGS - 1]) < 0)
|
||||||
|
tcp->u_arg[MAX_ARGS - 1] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* SYS_syscall_subcall */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t pad[6];
|
uint32_t pad[6];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_NETLINK_DIAG_H
|
#ifndef STRACE_LINUX_NETLINK_DIAG_H
|
||||||
#define STRACE_LINUX_NETLINK_DIAG_H
|
# define STRACE_LINUX_NETLINK_DIAG_H
|
||||||
|
|
||||||
struct netlink_diag_req {
|
struct netlink_diag_req {
|
||||||
uint8_t sdiag_family;
|
uint8_t sdiag_family;
|
||||||
@@ -45,18 +45,18 @@ enum {
|
|||||||
NETLINK_DIAG_FLAGS,
|
NETLINK_DIAG_FLAGS,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NDIAG_SHOW_MEMINFO 0x00000001
|
# define NDIAG_SHOW_MEMINFO 0x00000001
|
||||||
#define NDIAG_SHOW_GROUPS 0x00000002
|
# define NDIAG_SHOW_GROUPS 0x00000002
|
||||||
#define NDIAG_SHOW_RING_CFG 0x00000004 /* deprecated since 4.6 */
|
# define NDIAG_SHOW_RING_CFG 0x00000004 /* deprecated since 4.6 */
|
||||||
#define NDIAG_SHOW_FLAGS 0x00000008
|
# define NDIAG_SHOW_FLAGS 0x00000008
|
||||||
#define NDIAG_PROTO_ALL ((uint8_t) ~0)
|
# define NDIAG_PROTO_ALL ((uint8_t) ~0)
|
||||||
|
|
||||||
/* flags */
|
/* flags */
|
||||||
#define NDIAG_FLAG_CB_RUNNING 0x00000001
|
# define NDIAG_FLAG_CB_RUNNING 0x00000001
|
||||||
#define NDIAG_FLAG_PKTINFO 0x00000002
|
# define NDIAG_FLAG_PKTINFO 0x00000002
|
||||||
#define NDIAG_FLAG_BROADCAST_ERROR 0x00000004
|
# define NDIAG_FLAG_BROADCAST_ERROR 0x00000004
|
||||||
#define NDIAG_FLAG_NO_ENOBUFS 0x00000008
|
# define NDIAG_FLAG_NO_ENOBUFS 0x00000008
|
||||||
#define NDIAG_FLAG_LISTEN_ALL_NSID 0x00000010
|
# define NDIAG_FLAG_LISTEN_ALL_NSID 0x00000010
|
||||||
#define NDIAG_FLAG_CAP_ACK 0x00000020
|
# define NDIAG_FLAG_CAP_ACK 0x00000020
|
||||||
|
|
||||||
#endif /* !STRACE_LINUX_NETLINK_DIAG_H */
|
#endif /* !STRACE_LINUX_NETLINK_DIAG_H */
|
||||||
|
|||||||
@@ -6,6 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static struct user_pt_regs nios2_regs;
|
static struct user_pt_regs nios2_regs;
|
||||||
# define ARCH_REGS_FOR_GETREGSET nios2_regs
|
#define ARCH_REGS_FOR_GETREGSET nios2_regs
|
||||||
#define ARCH_PC_REG nios2_regs.regs[PTR_EA]
|
#define ARCH_PC_REG nios2_regs.regs[PTR_EA]
|
||||||
#define ARCH_SP_REG nios2_regs.regs[PTR_SP]
|
#define ARCH_SP_REG nios2_regs.regs[PTR_SP]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_PACKET_DIAG_H
|
#ifndef STRACE_LINUX_PACKET_DIAG_H
|
||||||
#define STRACE_LINUX_PACKET_DIAG_H
|
# define STRACE_LINUX_PACKET_DIAG_H
|
||||||
|
|
||||||
struct packet_diag_req {
|
struct packet_diag_req {
|
||||||
uint8_t sdiag_family;
|
uint8_t sdiag_family;
|
||||||
@@ -17,12 +17,12 @@ struct packet_diag_req {
|
|||||||
uint32_t pdiag_cookie[2];
|
uint32_t pdiag_cookie[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PACKET_SHOW_INFO 0x00000001
|
# define PACKET_SHOW_INFO 0x00000001
|
||||||
#define PACKET_SHOW_MCLIST 0x00000002
|
# define PACKET_SHOW_MCLIST 0x00000002
|
||||||
#define PACKET_SHOW_RING_CFG 0x00000004
|
# define PACKET_SHOW_RING_CFG 0x00000004
|
||||||
#define PACKET_SHOW_FANOUT 0x00000008
|
# define PACKET_SHOW_FANOUT 0x00000008
|
||||||
#define PACKET_SHOW_MEMINFO 0x00000010
|
# define PACKET_SHOW_MEMINFO 0x00000010
|
||||||
#define PACKET_SHOW_FILTER 0x00000020
|
# define PACKET_SHOW_FILTER 0x00000020
|
||||||
|
|
||||||
struct packet_diag_msg {
|
struct packet_diag_msg {
|
||||||
uint8_t pdiag_family;
|
uint8_t pdiag_family;
|
||||||
@@ -52,11 +52,11 @@ struct packet_diag_info {
|
|||||||
uint32_t pdi_tstamp;
|
uint32_t pdi_tstamp;
|
||||||
uint32_t pdi_flags;
|
uint32_t pdi_flags;
|
||||||
|
|
||||||
#define PDI_RUNNING 0x1
|
# define PDI_RUNNING 0x1
|
||||||
#define PDI_AUXDATA 0x2
|
# define PDI_AUXDATA 0x2
|
||||||
#define PDI_ORIGDEV 0x4
|
# define PDI_ORIGDEV 0x4
|
||||||
#define PDI_VNETHDR 0x8
|
# define PDI_VNETHDR 0x8
|
||||||
#define PDI_LOSS 0x10
|
# define PDI_LOSS 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
struct packet_diag_mclist {
|
struct packet_diag_mclist {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SIGNAL_FRAMESIZE32 64
|
#define SIGNAL_FRAMESIZE32 64
|
||||||
|
|
||||||
FUNC_GET_RT_SIGFRAME_ADDR
|
FUNC_GET_RT_SIGFRAME_ADDR
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#undef FUNC_GET_RT_SIGFRAME_ADDR
|
#undef FUNC_GET_RT_SIGFRAME_ADDR
|
||||||
#define FUNC_GET_RT_SIGFRAME_ADDR \
|
#define FUNC_GET_RT_SIGFRAME_ADDR \
|
||||||
static kernel_ulong_t ppc_get_rt_sigframe_addr(struct tcb *tcp)
|
static kernel_ulong_t ppc_get_rt_sigframe_addr(struct tcb *tcp)
|
||||||
|
|
||||||
#include "powerpc/arch_rt_sigframe.c"
|
#include "powerpc/arch_rt_sigframe.c"
|
||||||
|
|
||||||
#undef FUNC_GET_RT_SIGFRAME_ADDR
|
#undef FUNC_GET_RT_SIGFRAME_ADDR
|
||||||
#define FUNC_GET_RT_SIGFRAME_ADDR DEF_FUNC_GET_RT_SIGFRAME_ADDR
|
#define FUNC_GET_RT_SIGFRAME_ADDR DEF_FUNC_GET_RT_SIGFRAME_ADDR
|
||||||
|
|
||||||
FUNC_GET_RT_SIGFRAME_ADDR
|
FUNC_GET_RT_SIGFRAME_ADDR
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
/* This is a generic definition for compatible architectures. */
|
/* This is a generic definition for compatible architectures. */
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t callee_used_stack[__SIGNAL_FRAMESIZE];
|
uint8_t callee_used_stack[__SIGNAL_FRAMESIZE];
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
};
|
};
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, syscall_regs[i], &tcp->u_arg[i]) < 0)
|
if (upeek(tcp, syscall_regs[i], &tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
static const int syscall_regs[MAX_ARGS] = { 2, 3, 4, 5, 6, 7 };
|
static const int syscall_regs[MAX_ARGS] = { 2, 3, 4, 5, 6, 7 };
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, REG_GENERAL(syscall_regs[i]),
|
if (upeek(tcp, REG_GENERAL(syscall_regs[i]),
|
||||||
&tcp->u_arg[i]) < 0)
|
&tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
siginfo_t *pinfo;
|
siginfo_t *pinfo;
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_SMC_DIAG_H
|
#ifndef STRACE_LINUX_SMC_DIAG_H
|
||||||
#define STRACE_LINUX_SMC_DIAG_H
|
# define STRACE_LINUX_SMC_DIAG_H
|
||||||
|
|
||||||
#include <linux/inet_diag.h>
|
# include <linux/inet_diag.h>
|
||||||
|
|
||||||
#include "gcc_compat.h"
|
# include "gcc_compat.h"
|
||||||
|
|
||||||
/* Request structure */
|
/* Request structure */
|
||||||
struct smc_diag_req {
|
struct smc_diag_req {
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_SOCK_DIAG_H
|
#ifndef STRACE_LINUX_SOCK_DIAG_H
|
||||||
#define STRACE_LINUX_SOCK_DIAG_H
|
# define STRACE_LINUX_SOCK_DIAG_H
|
||||||
|
|
||||||
#define SOCK_DIAG_BY_FAMILY 20
|
# define SOCK_DIAG_BY_FAMILY 20
|
||||||
#define SOCK_DESTROY 21
|
# define SOCK_DESTROY 21
|
||||||
|
|
||||||
#define SK_MEMINFO_VARS 9
|
# define SK_MEMINFO_VARS 9
|
||||||
|
|
||||||
struct sock_diag_req {
|
struct sock_diag_req {
|
||||||
uint8_t sdiag_family;
|
uint8_t sdiag_family;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include "ptrace.h"
|
# include "ptrace.h"
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct sparc_stackf ss;
|
struct sparc_stackf ss;
|
||||||
@@ -19,7 +19,7 @@ typedef struct {
|
|||||||
/* more data follows */
|
/* more data follows */
|
||||||
} struct_rt_sigframe;
|
} struct_rt_sigframe;
|
||||||
|
|
||||||
#define OFFSETOF_SIGMASK_IN_RT_SIGFRAME \
|
# define OFFSETOF_SIGMASK_IN_RT_SIGFRAME \
|
||||||
offsetof(struct_rt_sigframe, mask)
|
offsetof(struct_rt_sigframe, mask)
|
||||||
|
|
||||||
#endif /* !STRACE_RT_SIGFRAME_H */
|
#endif /* !STRACE_RT_SIGFRAME_H */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define STACK_BIAS 2047
|
#define STACK_BIAS 2047
|
||||||
|
|
||||||
FUNC_GET_RT_SIGFRAME_ADDR
|
FUNC_GET_RT_SIGFRAME_ADDR
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_SYSCALL_H
|
#ifndef STRACE_LINUX_SYSCALL_H
|
||||||
#define STRACE_LINUX_SYSCALL_H
|
# define STRACE_LINUX_SYSCALL_H
|
||||||
|
|
||||||
#include "dummy.h"
|
# include "dummy.h"
|
||||||
#include "sys_func.h"
|
# include "sys_func.h"
|
||||||
#include "sen.h"
|
# include "sen.h"
|
||||||
|
|
||||||
#if HAVE_ARCH_UID16_SYSCALLS
|
# if HAVE_ARCH_UID16_SYSCALLS
|
||||||
extern SYS_FUNC(chown16);
|
extern SYS_FUNC(chown16);
|
||||||
extern SYS_FUNC(fchown16);
|
extern SYS_FUNC(fchown16);
|
||||||
extern SYS_FUNC(getgroups16);
|
extern SYS_FUNC(getgroups16);
|
||||||
@@ -25,6 +25,6 @@ extern SYS_FUNC(setgroups16);
|
|||||||
extern SYS_FUNC(setresuid16);
|
extern SYS_FUNC(setresuid16);
|
||||||
extern SYS_FUNC(setreuid16);
|
extern SYS_FUNC(setreuid16);
|
||||||
extern SYS_FUNC(setuid16);
|
extern SYS_FUNC(setuid16);
|
||||||
#endif /* HAVE_ARCH_UID16_SYSCALLS */
|
# endif /* HAVE_ARCH_UID16_SYSCALLS */
|
||||||
|
|
||||||
#endif /* !STRACE_LINUX_SYSCALL_H */
|
#endif /* !STRACE_LINUX_SYSCALL_H */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RT_SIGFRAME_H
|
#ifndef STRACE_RT_SIGFRAME_H
|
||||||
#define STRACE_RT_SIGFRAME_H
|
# define STRACE_RT_SIGFRAME_H
|
||||||
|
|
||||||
#include <signal.h>
|
# include <signal.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
|
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_LINUX_UNIX_DIAG_H
|
#ifndef STRACE_LINUX_UNIX_DIAG_H
|
||||||
#define STRACE_LINUX_UNIX_DIAG_H
|
# define STRACE_LINUX_UNIX_DIAG_H
|
||||||
|
|
||||||
struct unix_diag_req {
|
struct unix_diag_req {
|
||||||
uint8_t sdiag_family;
|
uint8_t sdiag_family;
|
||||||
@@ -18,12 +18,12 @@ struct unix_diag_req {
|
|||||||
uint32_t udiag_cookie[2];
|
uint32_t udiag_cookie[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define UDIAG_SHOW_NAME 0x01
|
# define UDIAG_SHOW_NAME 0x01
|
||||||
#define UDIAG_SHOW_VFS 0x02
|
# define UDIAG_SHOW_VFS 0x02
|
||||||
#define UDIAG_SHOW_PEER 0x04
|
# define UDIAG_SHOW_PEER 0x04
|
||||||
#define UDIAG_SHOW_ICONS 0x08
|
# define UDIAG_SHOW_ICONS 0x08
|
||||||
#define UDIAG_SHOW_RQLEN 0x10
|
# define UDIAG_SHOW_RQLEN 0x10
|
||||||
#define UDIAG_SHOW_MEMINFO 0x20
|
# define UDIAG_SHOW_MEMINFO 0x20
|
||||||
|
|
||||||
struct unix_diag_msg {
|
struct unix_diag_msg {
|
||||||
uint8_t udiag_family;
|
uint8_t udiag_family;
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ get_personality_from_syscall_info(const struct ptrace_syscall_info *sci)
|
|||||||
|
|
||||||
kernel_ulong_t scno = sci->entry.nr;
|
kernel_ulong_t scno = sci->entry.nr;
|
||||||
|
|
||||||
#ifndef __X32_SYSCALL_BIT
|
# ifndef __X32_SYSCALL_BIT
|
||||||
# define __X32_SYSCALL_BIT 0x40000000
|
# define __X32_SYSCALL_BIT 0x40000000
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
if (pers == 0 && (scno & __X32_SYSCALL_BIT)) {
|
if (pers == 0 && (scno & __X32_SYSCALL_BIT)) {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_X86_64_ASM_STAT_H
|
#ifndef STRACE_X86_64_ASM_STAT_H
|
||||||
#define STRACE_X86_64_ASM_STAT_H
|
# define STRACE_X86_64_ASM_STAT_H
|
||||||
|
|
||||||
# if defined __x86_64__ && defined __ILP32__
|
# if defined __x86_64__ && defined __ILP32__
|
||||||
# define stat redirect_kernel_stat
|
# define stat redirect_kernel_stat
|
||||||
|
|||||||
@@ -50,9 +50,9 @@ arch_get_scno(struct tcb *tcp)
|
|||||||
if ((long long) x86_64_regs.orig_rax != -1) {
|
if ((long long) x86_64_regs.orig_rax != -1) {
|
||||||
currpers = 2;
|
currpers = 2;
|
||||||
} else {
|
} else {
|
||||||
# ifdef X32
|
#ifdef X32
|
||||||
currpers = 2;
|
currpers = 2;
|
||||||
# endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
{
|
{
|
||||||
if (x86_io.iov_len != sizeof(i386_regs)) {
|
if (x86_io.iov_len != sizeof(i386_regs)) {
|
||||||
/* x86-64 or x32 ABI */
|
/* x86-64 or x32 ABI */
|
||||||
if (tcp->s_ent->sys_flags & COMPAT_SYSCALL_TYPES) {
|
if (tcp_sysent(tcp)->sys_flags & COMPAT_SYSCALL_TYPES) {
|
||||||
/*
|
/*
|
||||||
* X32 compat syscall: zero-extend from 32 bits.
|
* X32 compat syscall: zero-extend from 32 bits.
|
||||||
* Use truncate_klong_to_current_wordsize(tcp->u_arg[N])
|
* Use truncate_klong_to_current_wordsize(tcp->u_arg[N])
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ arch_get_syscall_args(struct tcb *tcp)
|
|||||||
};
|
};
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < tcp->s_ent->nargs; ++i)
|
for (i = 0; i < n_args(tcp); ++i)
|
||||||
if (upeek(tcp, xtensaregs[i], &tcp->u_arg[i]) < 0)
|
if (upeek(tcp, xtensaregs[i], &tcp->u_arg[i]) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_RAW_SYSCALL_H
|
#ifndef STRACE_RAW_SYSCALL_H
|
||||||
#define STRACE_RAW_SYSCALL_H
|
# define STRACE_RAW_SYSCALL_H
|
||||||
|
|
||||||
# include "kernel_types.h"
|
# include "kernel_types.h"
|
||||||
|
|
||||||
|
|||||||
295
list.h
Normal file
295
list.h
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
/*
|
||||||
|
* Some simple implementation of lists similar to the one used in the kernel.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2016-2018 The strace developers.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* 3. The name of the author may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef STRACE_LIST_H
|
||||||
|
#define STRACE_LIST_H
|
||||||
|
|
||||||
|
/*
|
||||||
|
* struct list_item and related macros and functions provide an interface
|
||||||
|
* for manipulating and iterating linked lists. In order to have list
|
||||||
|
* associated with its payload, struct list_item has to be embedded into
|
||||||
|
* a structure type representing payload, and (optionally) an additional
|
||||||
|
* struct list_item should be added somewhere as a starting point for list
|
||||||
|
* iteration (creating a list with a designated head). A situation where
|
||||||
|
* no designated head exists, and each embedded struct list_head is considered
|
||||||
|
* a head (i.e. starting point for list iteration), is also possible.
|
||||||
|
*
|
||||||
|
* List head has to be initialised with list_init() call. Statically allocated
|
||||||
|
* list heads can also be defined with an EMPTY_LIST() macro.
|
||||||
|
*
|
||||||
|
* In order to get a pointer to list item from a struct list_item, list_elem
|
||||||
|
* macro is used.
|
||||||
|
*
|
||||||
|
* When a designated head is used, list_head() and list_tail() can be used
|
||||||
|
* for getting pointer to the first and the last list item, respectively.
|
||||||
|
*
|
||||||
|
* list_next() and list_prev() macros can be used for obtaining pointers
|
||||||
|
* to the next and the previous items in the list, respectively. Note that
|
||||||
|
* they do not perform additional checks for the validity of these pointers,
|
||||||
|
* so they have to be guarded with respective list_head/list_tail checks in case
|
||||||
|
* of lists with designated heads (where the list's head is not embedded withing
|
||||||
|
* a list item.
|
||||||
|
*
|
||||||
|
* list_{insert,append,remove,remove_tail,remove_head,replace} provide some
|
||||||
|
* basic means of list manipulation.
|
||||||
|
*
|
||||||
|
* list_foreach() and list_foreach_safe() are wrapper macros for simplifying
|
||||||
|
* iteration over a list, with the latter having an additional argument
|
||||||
|
* for storing temporary pointer, thus allowing list manipulations during
|
||||||
|
* its iteration.
|
||||||
|
*
|
||||||
|
* A simple example:
|
||||||
|
*
|
||||||
|
* struct my_struct {
|
||||||
|
* int a;
|
||||||
|
* struct list_item l1;
|
||||||
|
* struct list_item l2;
|
||||||
|
* };
|
||||||
|
*
|
||||||
|
* EMPTY_LIST(list_1); <--- Defining a designated head for list
|
||||||
|
*
|
||||||
|
* struct my_struct *item =
|
||||||
|
* calloc(1, sizeof(*item));
|
||||||
|
* list_init(&item->l2); <--- Initialising structure field that
|
||||||
|
* is used for lists without designated
|
||||||
|
* head.
|
||||||
|
* list_insert(&list_1, &item->l1); <--- Inserting an item into the list
|
||||||
|
*
|
||||||
|
* item = calloc(1, sizeof(*item));
|
||||||
|
* list_init(&item->l2);
|
||||||
|
*
|
||||||
|
* list_append(&(list_head(list_1, struct my_struct, l1)->l2), &item->l2);
|
||||||
|
*
|
||||||
|
* struct my_struct *cur = item; <--- Iteration over a headless list
|
||||||
|
* do {
|
||||||
|
* printf("%d\n", cur->a);
|
||||||
|
* } while ((cur = list_next(&cur, l2)) != item);
|
||||||
|
*
|
||||||
|
* struct my_struct *i;
|
||||||
|
* list_foreach(i, list_1, l1) { <--- Iteration over list_1 without list
|
||||||
|
* printf("%d\n", i->a); modification
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* struct my_struct *tmp; <--- Iteration with modification
|
||||||
|
* list_foreach_safe(i, list_1, l1, tmp) {
|
||||||
|
* list_remove(&i->l1);
|
||||||
|
* free(i);
|
||||||
|
* }
|
||||||
|
*
|
||||||
|
* See also:
|
||||||
|
* "Linux kernel design patterns - part 2", section "Linked Lists"
|
||||||
|
* https://lwn.net/Articles/336255/
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "macros.h"
|
||||||
|
|
||||||
|
struct list_item {
|
||||||
|
struct list_item *prev;
|
||||||
|
struct list_item *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define an empty list head.
|
||||||
|
*
|
||||||
|
* @param l_ List head variable name.
|
||||||
|
*/
|
||||||
|
#define EMPTY_LIST(l_) struct list_item l_ = { &l_, &l_ }
|
||||||
|
|
||||||
|
/** Initialise an empty list. */
|
||||||
|
static inline void
|
||||||
|
list_init(struct list_item *l)
|
||||||
|
{
|
||||||
|
l->prev = l;
|
||||||
|
l->next = l;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Check whether list is empty. */
|
||||||
|
static inline bool
|
||||||
|
list_is_empty(struct list_item *l)
|
||||||
|
{
|
||||||
|
return (l->next == l) && (l->prev == l);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert a pointer to a struct list_item to a pointer to a list item.
|
||||||
|
*
|
||||||
|
* @param var Pointer to struct list_item.
|
||||||
|
* @param type Type of the list's item.
|
||||||
|
* @param field Name of the field that holds the respective struct list_item.
|
||||||
|
*/
|
||||||
|
#define list_elem(var, type, field) containerof((var), type, field)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the first element in a list.
|
||||||
|
*
|
||||||
|
* @param head Pointer to the list's head.
|
||||||
|
* @param type Type of the list's item.
|
||||||
|
* @param field Name of the field that holds the respective struct list_item.
|
||||||
|
*/
|
||||||
|
#define list_head(head, type, field) \
|
||||||
|
(list_is_empty(head) ? NULL : list_elem((head)->next, type, field))
|
||||||
|
/**
|
||||||
|
* Get the last element in a list.
|
||||||
|
*
|
||||||
|
* @param head Pointer to the list's head.
|
||||||
|
* @param type Type of the list's item.
|
||||||
|
* @param field Name of the field that holds the respective struct list_item.
|
||||||
|
*/
|
||||||
|
#define list_tail(head, type, field) \
|
||||||
|
(list_is_empty(head) ? NULL : list_elem((head)->prev, type, field))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the next element in a list.
|
||||||
|
*
|
||||||
|
* @param var Pointer to a list item.
|
||||||
|
* @param field Name of the field that holds the respective struct list_item.
|
||||||
|
*/
|
||||||
|
#define list_next(var, field) \
|
||||||
|
list_elem((var)->field.next, typeof(*(var)), field)
|
||||||
|
/**
|
||||||
|
* Get the previous element in a list.
|
||||||
|
*
|
||||||
|
* @param var Pointer to a list item.
|
||||||
|
* @param field Name of the field that holds the respective struct list_item.
|
||||||
|
*/
|
||||||
|
#define list_prev(var, field) \
|
||||||
|
list_elem((var)->field.prev, typeof(*(var)), field)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert an item into a list. The item is placed as a next list item
|
||||||
|
* to the head.
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
list_insert(struct list_item *head, struct list_item *item)
|
||||||
|
{
|
||||||
|
item->next = head->next;
|
||||||
|
item->prev = head;
|
||||||
|
head->next->prev = item;
|
||||||
|
head->next = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Insert an item into a list. The item is placed as a previous list item
|
||||||
|
* to the head.
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
list_append(struct list_item *head, struct list_item *item)
|
||||||
|
{
|
||||||
|
item->next = head;
|
||||||
|
item->prev = head->prev;
|
||||||
|
head->prev->next = item;
|
||||||
|
head->prev = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Remove an item from a list. */
|
||||||
|
static inline void
|
||||||
|
list_remove(struct list_item *item)
|
||||||
|
{
|
||||||
|
if (!item->next || !item->prev)
|
||||||
|
return;
|
||||||
|
|
||||||
|
item->prev->next = item->next;
|
||||||
|
item->next->prev = item->prev;
|
||||||
|
item->next = item->prev = item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the last element of a list.
|
||||||
|
*
|
||||||
|
* @param head Pointer to the list's head.
|
||||||
|
* @return Pointer to struct list_item removed from the list;
|
||||||
|
* or NULL, if the list is empty.
|
||||||
|
*/
|
||||||
|
static inline struct list_item *
|
||||||
|
list_remove_tail(struct list_item *head)
|
||||||
|
{
|
||||||
|
struct list_item *t = list_is_empty(head) ? NULL : head->prev;
|
||||||
|
|
||||||
|
if (t)
|
||||||
|
list_remove(t);
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the first element of a list.
|
||||||
|
*
|
||||||
|
* @param head Pointer to the list's head.
|
||||||
|
* @return Pointer to struct list_item removed from the list;
|
||||||
|
* or NULL, if the list is empty.
|
||||||
|
*/
|
||||||
|
static inline struct list_item *
|
||||||
|
list_remove_head(struct list_item *head)
|
||||||
|
{
|
||||||
|
struct list_item *h = list_is_empty(head) ? NULL : head->next;
|
||||||
|
|
||||||
|
if (h)
|
||||||
|
list_remove(h);
|
||||||
|
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Replace an old struct list_item in a list with the new one. */
|
||||||
|
static inline void
|
||||||
|
list_replace(struct list_item *old, struct list_item *new)
|
||||||
|
{
|
||||||
|
new->next = old->next;
|
||||||
|
new->prev = old->prev;
|
||||||
|
old->prev->next = new;
|
||||||
|
old->next->prev = new;
|
||||||
|
old->next = old->prev = old;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List iteration wrapper for non-destructive operations.
|
||||||
|
*
|
||||||
|
* @param var_ Variable holding pointer to a current list item.
|
||||||
|
* @param head_ Pointer to the list's head.
|
||||||
|
* @param field_ Name of the field containing the respective struct list_item
|
||||||
|
* inside list items.
|
||||||
|
*/
|
||||||
|
#define list_foreach(var_, head_, field_) \
|
||||||
|
for (var_ = list_elem((head_)->next, typeof(*var_), field_); \
|
||||||
|
&(var_->field_) != (head_); var_ = list_next(var_, field_))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List iteration wrapper for destructive operations.
|
||||||
|
*
|
||||||
|
* @param var_ Variable holding pointer to a current list item.
|
||||||
|
* @param head_ Pointer to the list's head.
|
||||||
|
* @param field_ Name of the field containing the respective struct list_item
|
||||||
|
* inside list items.
|
||||||
|
* @param _tmp Temporary variable for storing pointer to the next item.
|
||||||
|
*/
|
||||||
|
#define list_foreach_safe(var_, head_, field_, _tmp) \
|
||||||
|
for (var_ = list_elem((head_)->next, typeof(*var_), field_), \
|
||||||
|
_tmp = list_elem((var_)->field_.next, typeof(*var_), field_); \
|
||||||
|
&var_->field_ != head_; var_ = _tmp, _tmp = list_next(_tmp, field_))
|
||||||
|
|
||||||
|
#endif /* !STRACE_LIST_H */
|
||||||
2
loop.c
2
loop.c
@@ -19,7 +19,7 @@ typedef struct loop_info struct_loop_info;
|
|||||||
#include "print_fields.h"
|
#include "print_fields.h"
|
||||||
|
|
||||||
#define XLAT_MACROS_ONLY
|
#define XLAT_MACROS_ONLY
|
||||||
# include "xlat/loop_cmds.h"
|
#include "xlat/loop_cmds.h"
|
||||||
#undef XLAT_MACROS_ONLY
|
#undef XLAT_MACROS_ONLY
|
||||||
|
|
||||||
#include "xlat/loop_flags_options.h"
|
#include "xlat/loop_flags_options.h"
|
||||||
|
|||||||
4
lseek.c
4
lseek.c
@@ -30,11 +30,11 @@ SYS_FUNC(lseek)
|
|||||||
|
|
||||||
kernel_long_t offset;
|
kernel_long_t offset;
|
||||||
|
|
||||||
# ifndef current_klongsize
|
#ifndef current_klongsize
|
||||||
if (current_klongsize < sizeof(kernel_long_t)) {
|
if (current_klongsize < sizeof(kernel_long_t)) {
|
||||||
offset = (int) tcp->u_arg[1];
|
offset = (int) tcp->u_arg[1];
|
||||||
} else
|
} else
|
||||||
# endif /* !current_klongsize */
|
#endif /* !current_klongsize */
|
||||||
{
|
{
|
||||||
offset = tcp->u_arg[1];
|
offset = tcp->u_arg[1];
|
||||||
}
|
}
|
||||||
|
|||||||
51
macros.h
51
macros.h
@@ -6,35 +6,44 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_MACROS_H
|
#ifndef STRACE_MACROS_H
|
||||||
#define STRACE_MACROS_H
|
# define STRACE_MACROS_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
# include <stdbool.h>
|
||||||
#include <sys/types.h>
|
# include <sys/types.h>
|
||||||
|
|
||||||
#include "gcc_compat.h"
|
# include "gcc_compat.h"
|
||||||
|
|
||||||
#define ARRAY_SIZE(a_) (sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
|
# define ARRAY_SIZE(a_) (sizeof(a_) / sizeof((a_)[0]) + MUST_BE_ARRAY(a_))
|
||||||
|
|
||||||
#define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
|
# define ARRSZ_PAIR(a_) a_, ARRAY_SIZE(a_)
|
||||||
|
|
||||||
#define STRINGIFY(...) #__VA_ARGS__
|
# define STRINGIFY(...) #__VA_ARGS__
|
||||||
#define STRINGIFY_VAL(...) STRINGIFY(__VA_ARGS__)
|
# define STRINGIFY_VAL(...) STRINGIFY(__VA_ARGS__)
|
||||||
|
|
||||||
#ifndef MAX
|
# ifndef MAX
|
||||||
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||||
#endif
|
# endif
|
||||||
#ifndef MIN
|
# ifndef MIN
|
||||||
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||||
#endif
|
# endif
|
||||||
#define CLAMP(val, min, max) MIN(MAX(min, val), max)
|
# define CLAMP(val, min, max) MIN(MAX(min, val), max)
|
||||||
|
|
||||||
#ifndef ROUNDUP
|
# ifndef ROUNDUP
|
||||||
# define ROUNDUP(val_, div_) ((((val_) + (div_) - 1) / (div_)) * (div_))
|
# define ROUNDUP(val_, div_) ((((val_) + (div_) - 1) / (div_)) * (div_))
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#ifndef offsetofend
|
# ifndef offsetofend
|
||||||
# define offsetofend(type_, member_) \
|
# define offsetofend(type_, member_) \
|
||||||
(offsetof(type_, member_) + sizeof(((type_ *)0)->member_))
|
(offsetof(type_, member_) + sizeof(((type_ *)0)->member_))
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#ifndef cast_ptr
|
||||||
|
# define cast_ptr(type, var) ((type) (uintptr_t) (const volatile void *) (var))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef containerof
|
||||||
|
# define containerof(x, s, m) \
|
||||||
|
cast_ptr(s *, (const volatile char *) (x) - offsetof(s, m))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
@@ -47,7 +56,7 @@ is_filled(const char *ptr, char fill, size_t size)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IS_ARRAY_ZERO(arr_) \
|
# define IS_ARRAY_ZERO(arr_) \
|
||||||
is_filled((const char *) (arr_), 0, sizeof(arr_) + MUST_BE_ARRAY(arr_))
|
is_filled((const char *) (arr_), 0, sizeof(arr_) + MUST_BE_ARRAY(arr_))
|
||||||
|
|
||||||
#endif /* !STRACE_MACROS_H */
|
#endif /* !STRACE_MACROS_H */
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_MMAP_CACHE_H
|
#ifndef STRACE_MMAP_CACHE_H
|
||||||
#define STRACE_MMAP_CACHE_H
|
# define STRACE_MMAP_CACHE_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Keep a sorted array of cache entries,
|
* Keep a sorted array of cache entries,
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_MMAP_NOTIFY_H
|
#ifndef STRACE_MMAP_NOTIFY_H
|
||||||
#define STRACE_MMAP_NOTIFY_H
|
# define STRACE_MMAP_NOTIFY_H
|
||||||
|
|
||||||
#include "defs.h"
|
# include "defs.h"
|
||||||
|
|
||||||
typedef void (*mmap_notify_fn)(struct tcb *, void *);
|
typedef void (*mmap_notify_fn)(struct tcb *, void *);
|
||||||
|
|
||||||
|
|||||||
38
mpers_type.h
38
mpers_type.h
@@ -8,28 +8,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef STRACE_MPERS_TYPE_H
|
#ifndef STRACE_MPERS_TYPE_H
|
||||||
#define STRACE_MPERS_TYPE_H
|
# define STRACE_MPERS_TYPE_H
|
||||||
|
|
||||||
#include "macros.h"
|
# include "macros.h"
|
||||||
|
|
||||||
#ifdef IN_MPERS
|
# ifdef IN_MPERS
|
||||||
# define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
|
# define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
|
||||||
# ifdef MPERS_IS_m32
|
# ifdef MPERS_IS_m32
|
||||||
# define MPERS_PREFIX m32_
|
# define MPERS_PREFIX m32_
|
||||||
# define MPERS_DEFS "m32_type_defs.h"
|
# define MPERS_DEFS "m32_type_defs.h"
|
||||||
# elif defined MPERS_IS_mx32
|
# elif defined MPERS_IS_mx32
|
||||||
# define MPERS_PREFIX mx32_
|
# define MPERS_PREFIX mx32_
|
||||||
# define MPERS_DEFS "mx32_type_defs.h"
|
# define MPERS_DEFS "mx32_type_defs.h"
|
||||||
# endif
|
# endif
|
||||||
#else
|
|
||||||
# define MPERS_PREFIX
|
|
||||||
# define DEF_MPERS_TYPE(args) "empty.h"
|
|
||||||
# if IN_MPERS_BOOTSTRAP
|
|
||||||
# define MPERS_DEFS "empty.h"
|
|
||||||
# else
|
# else
|
||||||
# define MPERS_DEFS "native_defs.h"
|
# define MPERS_PREFIX
|
||||||
# endif
|
# define DEF_MPERS_TYPE(args) "empty.h"
|
||||||
|
# if IN_MPERS_BOOTSTRAP
|
||||||
|
# define MPERS_DEFS "empty.h"
|
||||||
|
# else
|
||||||
|
# define MPERS_DEFS "native_defs.h"
|
||||||
|
# endif
|
||||||
typedef unsigned long mpers_ptr_t;
|
typedef unsigned long mpers_ptr_t;
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#endif /* !STRACE_MPERS_TYPE_H */
|
#endif /* !STRACE_MPERS_TYPE_H */
|
||||||
|
|||||||
4
msghdr.c
4
msghdr.c
@@ -107,8 +107,8 @@ print_cmsg_ip_pktinfo(struct tcb *tcp, const void *cmsg_data,
|
|||||||
const struct in_pktinfo *info = cmsg_data;
|
const struct in_pktinfo *info = cmsg_data;
|
||||||
|
|
||||||
PRINT_FIELD_IFINDEX("{", *info, ipi_ifindex);
|
PRINT_FIELD_IFINDEX("{", *info, ipi_ifindex);
|
||||||
PRINT_FIELD_INET4_ADDR(", ", *info, ipi_spec_dst);
|
PRINT_FIELD_INET_ADDR(", ", *info, ipi_spec_dst, AF_INET);
|
||||||
PRINT_FIELD_INET4_ADDR(", ", *info, ipi_addr);
|
PRINT_FIELD_INET_ADDR(", ", *info, ipi_addr, AF_INET);
|
||||||
tprints("}");
|
tprints("}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user