IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* defs.h (dumpiov_upto): Change data_size argument type
from unsigned long to kernel_ureg_t.
* util.c (dumpiov_upto): Change the type of data_size argument
and iov_len variable from unsigned long to kernel_ureg_t.
As the kernel does not accept control messages longer than the value
of int sysctl_optmem_max kernel variable exported as
/proc/sys/net/core/optmem_max, we do not print them either.
Since unsigned int has enough room to contain any valid control message
size, change all internal cmsghdr size types from size_t
to unsigned int.
* msghdr.c (print_scm_rights, print_scm_creds, print_scm_security,
print_cmsg_ip_pktinfo, print_cmsg_uint, print_cmsg_uint8_t,
print_cmsg_ip_opts, print_cmsg_ip_recverr, print_cmsg_ip_origdstaddr,
cmsg_printer, print_cmsg_type_data): Change data_len argument type
from size_t to unsigned int.
(cmsg_socket_printers): Change min_len type from size_t to unsigned int.
(decode_msg_control): Change the type of in_control_len argument,
cmsg_len, and len variables from size_t to kernel_ureg_t.
Change the type of cmsg_size, control_len, and buf_len variables
from size_t to unsigned int.
* defs.h (dumpiov_in_msghdr): Change data_size argument type
from unsigned long to kernel_ureg_t.
* msghdr.h (print_struct_msghdr): Likewise.
* msghdr.c (print_struct_msghdr): Likewise. Cast msghdr.msg_iovlen
and msghdr.msg_controllen to kernel_ureg_t instead of unsigned long.
(decode_msghdr, dumpiov_in_msghdr): Change data_size argument type
from unsigned long to kernel_ureg_t.
(SYS_FUNC(sendmsg)): Pass -1 instead of -1UL as data_size argument
to decode_msghdr.
* mmsghdr.c (print_struct_mmsghdr): Pass (kernel_ureg_t) -1 instead
of -1UL as data_size argument to print_struct_msghdr.
(dumpiov_in_mmsghdr): Cast msghdr.msg_iovlen to kernel_ureg_t instead
of unsigned long.
* syscall.c (dumpio): Pass -1 instead of -1UL as data_size argument
to dumpiov_in_msghdr
* defs.h (tprint_iov_upto): Change the type of len and data_size
arguments from unsigned long to kernel_ureg_t.
(tprint_iov): Change the type of len argument from unsigned long
to kernel_ureg_t.
* io.c (print_iovec_config): Change data_size type from unsigned long
to kernel_ureg_t.
(print_iovec): Change the type of *iov, iov_buf, and len variables
from unsigned long to kernel_ureg_t.
(tprint_iov_upto): Change the type of len and data_size arguments, and
the type of iov variable from unsigned long to kernel_ureg_t.
* mem.c (print_mmap): Change the type of len, prot, and flags
from unsigned long to kernel_ureg_t. Use printflags64 instead
of printflags_long. Use printxval64 instead of printxval_long.
(SYS_FUNC(old_mmap)): Check for current_klongsize instead
of [AARCH64 || X86_64] to take X32 into account.
(SYS_FUNC(mremap)): Use printflags64 instead of printflags_long.
(SYS_FUNC(remap_file_pages)): Change the type of size, prot, pgoff, and
flags from unsigned long to kernel_ureg_t. Use printflags64 instead
of printflags_long. Use printxval64 instead of printxval_long.
[POWERPC] (SYS_FUNC(subpage_prot)): Change the type of len and nmemb
from unsigned long to kernel_ureg_t.
* numa.c (print_node, print_addr): Add kernel_ureg_t support.
(print_nodemask): Change type of maxnodes argument from unsigned long
to kernel_ureg_t.
(SYS_FUNC(move_pages)): Change npages type from unsigned long
to kernel_ureg_t. Change buf type from long to kernel_ureg_t.
* defs.h (print_sigset_addr_len): Change len argument type from long
to kernel_ureg_t.
* signal.c (print_sigset_addr_len_limit, print_sigset_addr_len): Likewise.
* process_vm.c (SYS_FUNC(process_vm_readv),
SYS_FUNC(process_vm_writev)): Change the type of local_iovcnt,
remote_iovcnt, and flags from unsigned long to kernel_ureg_t.
* xattr.c (print_xattr_val): Change type of insize and size arguments
from unsigned long to kernel_ureg_t.
(print_xattr_list): Change type of size argument from unsigned long
to kernel_ureg_t.
Do not treat len == -1 in any special way. All users who need the
string to be handled as a NUL-terminated string set QUOTE_0_TERMINATED
bit in user_style flags already.
* util.c (printstr_ex): Remove (len == -1) check.
* tests/printstr.c: New file.
* tests/printstr.test: New test.
* tests/.gitignore: Add printstr.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add printstr.test.
The second argument of sethostname syscall is not an unsigned long but
unsigned int. The kernel does not look at the string argument when
the length argument is too long.
* hostname.c [HAVE_LINUX_UTSNAME_H]: Include <linux/utsname.h>.
[!__NEW_UTS_LEN] (__NEW_UTS_LEN): Define.
(SYS_FUNC(sethostname)): Treat the second argument as unsigned int.
Print the first argument as a pointer when the second argument exceeds
__NEW_UTS_LEN.
* tests/sethostname.c [HAVE_LINUX_UTSNAME_H]: Include <linux/utsname.h>.
[!__NEW_UTS_LEN] (__NEW_UTS_LEN): Define.
(main): Use it. Check that the second argument of sethostname
is handled as unsigned int. Check that the first argument is printed
as a pointer when the second argument exceeds __NEW_UTS_LEN.
As about half of all printstr uses cases are invocations with the last
argument set to -1, create a dedicated function for this use case.
* defs.h (printstr): Rename to printstrn. All callers updated.
(printstr): New static inline function. All callers updated.
* process.c (print_user_offset_addr): Change address argument type
from unsigned long to kernel_ureg_t.
(SYS_FUNC(ptrace)): Change addr variable type from unsigned long
to kernel_ureg_t.
* defs.h [ALPHA] (printrusage32): Change address argument type
from long to kernel_ureg_t.
* printrusage.c (printrusage): Likewise.
[ALPHA] (printrusage32): Likewise.
* wait.c (printwaitn): Change the type of tracee address argument
of print_rusage from long to kernel_ureg_t.
* defs.h [ALPHA] (sprint_timeval32, print_timeval32,
print_timeval32_pair, print_itimerval32): Change address argument type
from long to kernel_ureg_t.
* desc.c (decode_select): Change the type of tracee address argument
of print_tv_ts and sprint_tv_ts from long to kernel_ureg_t.
* print_timespec.c (print_timespec, sprint_timespec,
print_timespec_utime_pair, print_itimerspec): Change address argument
type from long to kernel_ureg_t.
* print_timeval.c (print_timeval, print_timeval_pair, sprint_timeval,
print_itimerval, print_timeval32, print_timeval32_pair,
print_itimerval32, sprint_timeval32): Likewise.
* rtc.c (decode_rtc_time, decode_rtc_wkalrm, decode_rtc_pll_info):
Change addr type from long to kernel_ureg_t.
(rtc_ioctl): Change arg type from long to kernel_ureg_t.
* mtd.c (decode_erase_info_user, decode_erase_info_user64,
decode_mtd_oob_buf, decode_mtd_oob_buf64, decode_otp_info,
decode_otp_select, decode_mtd_write_req, decode_mtd_info_user,
decode_nand_oobinfo, decode_nand_ecclayout_user, decode_mtd_ecc_stats):
Change addr type from long to kernel_ureg_t.
(mtd_ioctl): Change arg type from long to kernel_ureg_t.
* defs.h (DECL_IOCTL): Change arg type from long to kernel_ureg_t.
* dm.c (dm_known_ioctl, dm_ioctl): Likewise.
* file_ioctl.c (file_ioctl): Likewise.
* fs_x_ioctl.c (fs_x_ioctl): Likewise.
* ioctl.c (ioctl_decode): Likewise.
* loop.c (decode_loop_info, decode_loop_info64): Change addr type
from long to kernel_ureg_t.
(loop_ioctl): Change arg type from long to kernel_ureg_t.
* ptp.c (ptp_ioctl): Likewise.
* scsi.c (print_sg_io_v3_req, print_sg_io_v3_res, print_sg_io_v4_req,
print_sg_io_v4_res, scsi_ioctl): Likewise.
* sock.c (print_ifreq, sock_ioctl): Likewise.
(decode_ifconf): Change addr type from long to kernel_ureg_t.
* term.c (decode_termios, decode_termio, decode_winsize, decode_ttysize,
decode_modem_flags): Likewise.
(term_ioctl): Change arg type from long to kernel_ureg_t.
* ubi.c (ubi_ioctl): Likewise.
* userfaultfd.c (uffdio_ioctl): Likewise.
* defs.h [HAVE_STRUCT_USER_DESC] (print_user_desc): Change address
argument type from long to kernel_ureg_t.
* ldt.c [HAVE_STRUCT_USER_DESC] (print_user_desc): Likewise.
* bpf.c (bpf_map_create, bpf_map_update_elem, bpf_map_delete_elem,
bpf_map_io, bpf_prog_load, SYS_FUNC(bpf)): Change address argument
type from long to kernel_ureg_t.
* defs.h (print_sigset_addr_len) Change address argument type from long
to kernel_ureg_t.
* signal.c (print_sigset_addr_len_limit, print_sigset_addr_len,
decode_old_sigaction, decode_new_sigaction): Likewise.