History log of /external/strace/system.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6dbbe0737a76c1bae5b0995025a9b0843781a393 26-Apr-2014 Dmitry V. Levin <ldv@altlinux.org> sysctl: update CTL_*, KERN_*, NET_*, and VM_* constants

* configure.ac (AC_CHECK_DECLS): Add CTL_*, KERN_*, NET_*, and
VM_* constants.
* system.c (CTL_PROC, CTL_CPU): Remove definitions.
* xlat/sysctl_*.in: Update.
/external/strace/system.c
d35bdcad13caac3e167735e1f0fc50355b2f9523 26-Apr-2014 Dmitry V. Levin <ldv@altlinux.org> Compress blank lines

Suppress empty lines left after automated xlat conversion.
/external/strace/system.c
0ed617bd66624cec6138102545d73b2e2346f1f6 26-Apr-2014 Dmitry V. Levin <ldv@altlinux.org> Generate xlat/*.in files

Automatically convert xlat structures from *.c files to xlat/*.in files
using "./generate_xlat_in.sh *.c" command.
/external/strace/system.c
9aaf88c0004f0d9856947aad7d618fb84d5dba40 05-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Enhance reboot decoding

* linux/reboot.h: New file.
* system.c (bootflags1, bootflags2, bootflags3, sys_reboot): Move...
* reboot.c: ... here.
(bootflags2, bootflags3): Update constants.
* Makefile.am (strace_SOURCES): Add reboot.c.
(EXTRA_DIST): Add linux/reboot.h.
/external/strace/system.c
594527353359d9a6aad516992e09c393e11f3bd2 05-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Use XLAT_END macro

Automatically update all xlat structures using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/
/external/strace/system.c
2a32eaa157b2da63f181c37c37ecead405740d68 05-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Convert personality_options to XLAT form

* linux/personality.h: New file.
* Makefile.am (EXTRA_DIST): Add it.
* system.c: Include <linux/personality.h>.
(personality_options): Update PER_* constants, convert to XLAT form.
/external/strace/system.c
bce0cc6a2d103e1da4c15a4c5396fdc5676294f7 05-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Use XLAT macro

Automatically convert all xlat structures to XLAT form
using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/
/external/strace/system.c
149d7de7e7ab53dd8c5bd63147c704988e65ce35 03-Apr-2013 Mike Frysinger <vapier@gentoo.org> Blackfin: tweak sram_alloc syscall decode

* system.c (sys_sram_alloc): The 2nd argument of sram_alloc syscall
is a bit field, not a specific value, so decode it as such.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/system.c
492f81f14cc86c13b0f67ac66a3d5ea9f6ccb673 14-Feb-2013 Christian Svensson <blue@cmd.nu> Add support for the OpenRISC 1000 platform

* configure.ac: Added or1k architecture..
* defs.h: Added or1k to use register reading system.
* linux/or1k/ioctlent.h.in: Use i386 ioctls.
* linux/or1k/syscallent.h: New file.
* process.c: Added or1k register defs to struct_user_offsets[].
* syscall.c: Added or1k_io iovec for or1k GETREGSET,
  regset structure for or1k.
  (printcall): Added handling for or1k.
  (get_regs): Likewise.
  (get_scno): Likewise.
  (get_syscall_args): Likewise.
  (get_syscall_result): Likewise.
(get_error): Likewise.
* util.c (change_syscall): Added dummy handling for or1k.
* system.c (sys_or1k_atomic): New function (or1k specific syscall).

Signed-off-by: Christian Svensson <blue@cmd.nu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
0cf04b6595a951df7671eafef5f9e7a114a6c691 09-Feb-2013 Mike Frysinger <vapier@gentoo.org> Fix decoding of sysctl() when oldval fields are NULL

If you call glibc's syscall wrapper like so:
static int name[] = { CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE };
int buffer[2] = { 32768, 61000 };
size_t size = sizeof(buffer);
sysctl(name, 3, 0, 0, buffer, size);
(note that oldval/oldlenp are NULL).

The current strace code complains like so:
_sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, process_vm_readv: Bad address
(nil), 0, 0x7fffe23c3960, 8}) = -1 EACCES (Permission denied)

Since passing NULL for the old values is valid, handle that explicitly.
This also simplifies the code a bit by splitting up the handling of the
new and old args so that we only handle the new args once.

Now the output looks like:
_sysctl({{CTL_NET, NET_IPV4, NET_IPV4_LOCAL_PORT_RANGE, 38}, 3, NULL, 0, 0x7fff8c0c91b0, 8) = -1 EACCES (Permission denied)

* system.c (sys_sysctl): Check if info.oldval is NULL first. Move the
processing of oldlen/info.newval/info.newlen out so they always get
executed. Fix the format strings so we use %lu for unsigned long rather
than a mix of %ld and %lu.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/system.c
9e1a7d818a04d62f097a74b1ff525468c36b0e7c 05-Feb-2013 Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> mount: decode MS_NOSEC

* system.c (MS_NOSEC): Define.
(mount_flags): Add MS_NOSEC.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
/external/strace/system.c
8560ef291ca06948e5f49bccf4bf1e714654b718 16-May-2012 Denys Vlasenko <vda.linux@googlemail.com> Fix a few goofs in sys_sysctl()

* system.c (sys_sysctl): Cast pointer to long, not size_t,
when we intend to use it as an address. Set oldlen to 0 prior
to reading into it - we want to have deterministic result
if read fails.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
048cc42f08ac64a04d14e6de17611a5e7ec3b400 16-May-2012 Denys Vlasenko <vda.linux@googlemail.com> Stop using non-standard %Zu and %Zd formats for size_t printing

The documented formats are %zu and %zd, but since our (normally disabled)
"fast" printf code doesn't support those too, I convert them to %lu and %ld.

* bjm.c (sys_query_module): Convert %Zd usages to %lu.
* system.c (sys_sysctl): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
a6d91ded3f2d5401e09a9c2fa442aabfbfe593a8 16-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Tidy up includes and copyright notices, fix indentation

The files not mentioned in changelog below had only
copyright notices fixes and indentation fixes.

* defs.h: Include <stdint.h> and <inttypes.h>.
* file.c: Do not include <inttypes.h>.
Move struct kernel_dirent declaration below top include block.
* block.c: Do not include <stdint.h> and <inttypes.h>.
* quota.c: Likewise.
* desc.c: Likewise.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
4a0ffeaf85f2f042d39ec1925f4aa2e5e4b9164c 15-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> Enhance capget and capset syscalls decoding

* system.c (cap_version): New xlat structure.
(print_cap_header, print_cap_data): New functions.
(sys_capget, sys_capset): Use them.
/external/strace/system.c
bcde70adbcff01af4a0675d2fd9d9522807d573e 15-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Remove extra include directives. No code changes.

* defs.h: Include <signal.h> unconditionally.
Other files were doing it unconditionally, so no harm done.
* bjm.c: Remove system includes which are already included by defs.h.
* pathtrace.c: Likewise.
* process.c: Likewise.
* signal.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
b859e14d20b7892d369ea9d185ac0891fbb11f80 15-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> Fix compiler warnings about breaking strict-aliasing rules

* system.c (sys_capget, sys_capset): Use proxy unions to cast long*
pointers to cap_user_header_t and cap_user_data_t pointers without
breaking strict-aliasing rules.

Reported-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/system.c
ee3c22ce55bdca3c4a96ffaeddb0f67c4e4ee6d3 13-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> Implement syslog syscall decoder

* linux/dummy.h (sys_syslog): Remove.
* linux/syscall.h (sys_syslog): New prototype.
* system.c (syslog_action_type): New xlat structure.
(sys_syslog): New function.
/external/strace/system.c
e83e157021177930b64ec4aa4983bbe13b39e91b 25-Feb-2012 Dmitry V. Levin <ldv@altlinux.org> Compress blank lines

Suppress repeated empty lines left after automated code removal.
This change was made by filtering every source code file through
"cat -s".
/external/strace/system.c
ed720fda5d515f1359fcd3242223e553d1216789 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Automated removal of non-Linux code

This change is generated by running every source through the following command:

unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD
-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS
-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
a17e55ca8f6f3d9897d891215405715b1bee5131 20-Jan-2012 Denys Vlasenko <vda.linux@googlemail.com> umovestr result may have no NUL, use "%.*s" instead of "%s" to print it

* system.c (sys_mount): Be careful when printing umovestr result,
it may have no terminating NUL.
(sys_sysmips): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/system.c
60fe8c139c6f2febefe595781812ddf0864a6ab8 01-Sep-2011 Denys Vlasenko <dvlasenk@redhat.com> Use tprints with literal strings, it may be faster than tprintf

* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/system.c
1c706b38097183a17d35dc05aade7f8d439d104d 23-Jun-2011 Dmitry V. Levin <ldv@altlinux.org> * system.c (sys_capget, sys_capset): Fix pointer arithmetics
/external/strace/system.c
b0bafbb5d106d7dcaebbf76c97fc8e1daaa2e718 23-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Do not allocate tiny cap_user_header/data structures, place them on stack.

This allows us to avoid having code to malloc them, and code to check
for malloc failure. Resulting code decrease:
text data bss dec hex filename
10175 0 16 10191 27cf system.o.old
9797 0 0 9797 2645 system.o

* system.c (sys_capget): Put cap_user_header_t and cap_user_data_t
on stack, rather than allocating them in heap. These structures
are very small (a few integer fields), stack is a better place
for them.
(sys_capset): Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/system.c
b63256e69bf3f1a74aadb0e14556490bc8f4ef95 07-Jun-2011 Denys Vlasenko <dvlasenk@redhat.com> Whitespace cleanups. no code changes.

* bjm.c: Fix tabulation (such as extra spaces before tabs),
convert punctuation where it deviates from prevalent form
elsewhere in strace code, convert sizeof and offsetof where
it deviates from from prevalent form, remove space between
function/macro/array names and (parameters) or [index],
add space between "if" and (condition), correct non-standard
or wrong indentaion.
* defs.h: Likewise
* desc.c: Likewise
* file.c: Likewise
* ipc.c: Likewise
* linux/arm/syscallent.h: Likewise
* linux/avr32/syscallent.h: Likewise
* linux/hppa/syscallent.h: Likewise
* linux/i386/syscallent.h: Likewise
* linux/ioctlsort.c: Likewise
* linux/m68k/syscallent.h: Likewise
* linux/microblaze/syscallent.h: Likewise
* linux/powerpc/syscallent.h: Likewise
* linux/s390/syscallent.h: Likewise
* linux/s390x/syscallent.h: Likewise
* linux/sh/syscallent.h: Likewise
* linux/sh64/syscallent.h: Likewise
* linux/tile/syscallent.h: Likewise
* linux/x86_64/syscallent.h: Likewise
* mem.c: Likewise
* net.c: Likewise
* pathtrace.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* sunos4/syscall.h: Likewise
* sunos4/syscallent.h: Likewise
* svr4/syscall.h: Likewise
* svr4/syscallent.h: Likewise
* syscall.c: Likewise
* system.c: Likewise
* test/childthread.c: Likewise
* test/leaderkill.c: Likewise
* test/skodic.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/system.c
1201426dd43f5b4e12dfe520e2a9c5027d33dc11 30-May-2011 Denys Vlasenko <dvlasenk@redhat.com> "Modernize" all old-style function parameter declarations

* bjm.c: Convert all remaining old-style C function definitions
to a "modern" form. This does not change any actual code.
* io.c: Likewise
* ioctl.c: Likewise
* net.c: Likewise
* proc.c: Likewise
* process.c: Likewise
* signal.c: Likewise
* sock.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* syscall.c: Likewise
* system.c: Likewise
* time.c: Likewise
* util.c: Likewise

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/system.c
22485b702b4fc7c66520896b67b9cda2a4cb2486 22-Feb-2011 Mike Frysinger <vapier@gentoo.org> Update mount flags to latest linux

* system.c (MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
MS_STRICTATIME, MS_BORN): Define.
(mount_flags): Add MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
MS_STRICTATIME, MS_BORN.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/system.c
f8e56504749a4a5a79d40d115ae46718b4c949a4 01-Dec-2010 Carmelo AMOROSO <carmelo.amoroso@st.com> sh: Add support for tracing sys_cacheflush system call

* linux/sh/syscallent.h: Update sys_cacheflush entry.
* linux/syscall.h [SH] (sys_cacheflush): New function declaration.
* system.c [SH] (cacheflush_flags): New xlat structure.
[SH] (sys_cacheflush): New function.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Reviewed-by: Angelo Castello <angelo.castello@st.com>
/external/strace/system.c
260e571343b12221ad848a9c972fc5518d66ef2c 11-Sep-2010 Mike Frysinger <vapier@gentoo.org> Blackfin: decode new syscalls

* linux/bfin/syscallent.h: Add fanotify/prlimit/cacheflush syscalls.
* linux/syscall.h: Add sys_cacheflush() decl.
* system.c: Decode Blackfin's cacheflush syscall.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
/external/strace/system.c
f48df6ce298672621718d3921d3f357fc68c4433 01-Jun-2009 Dmitry V. Levin <ldv@altlinux.org> Clean up header checks

* configure.ac: Reformat AC_CHECK_HEADERS to keep it sorted and
easily updated, and reduce merging errors in the future.
* system.c: Convert all non-standard #ifdef checks for specific
headers to regular #ifdef HAVE_*_H checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/system.c
132c52a5ccf7b12a44a617f06c97d3f4344a4421 23-Mar-2009 Denys Vlasenko <dvlasenk@redhat.com> * system.c (sram_alloc_flag): Add L2_SRAM constant.
by Mike Frysinger (vapier AT gentoo.org).
(sys_sram_alloc): Fix improperly used %zu:
tcp->u_arg is not a size_t, it is a long.
* net.c (printcmsghdr): Fix improperly used %zu:
struct cmsghdr::cmsg_len is not a size_t.
/external/strace/system.c
949f451bfa2956218af8ce827332df2f55f78bc8 11-Nov-2008 Dmitry V. Levin <ldv@altlinux.org> 2008-11-09 Dmitry V. Levin <ldv@altlinux.org>

* system.c (capabilities): Add more capability values.
/external/strace/system.c
87ea1f4fe68c6110a96a76f8601b3e204200082d 10-Nov-2008 Dmitry V. Levin <ldv@altlinux.org> 2008-10-23 Mike Frysinger <vapier@gentoo.org>

Port strace to the Blackfin architecture.
* configure.ac: Add bfin to supported architectures.
* process.c: Skip u_fpvalid/u_fpstate for Blackfin architecture.
(change_syscall): Support Blackfin architecture.
* syscall.c: Declare r0 for Blackfin architecture.
(get_scno): Decode Blackfin syscall number.
(syscall_fixup): Extract Blackfin return value.
(get_error): Decode Blackfin return value.
(force_result): Poke Blackfin return value.
(syscall_enter): Extract Blackfin syscall arguments.
* defs.h: Define TCB_WAITEXECVE for Blackfin architecture.
* linux/syscall.h (sys_sram_alloc): Declare for Blackfin
architecture.
* system.c (sys_sram_alloc): Decode Blackfin sram_alloc() syscall.
* util.c (getpc): Handle PC on Blackfin architecture.
(printcall): Likewise.
* linux/bfin/ioctlent.h, linux/bfin/syscallent.h: New Blackfin
headers.
* Makefile.am (EXTRA_DIST): Add linux/bfin/ioctlent.h and
linux/bfin/syscallent.h.
/external/strace/system.c
817b708fcb7fb95dee484df2b95ecc2967877419 16-Jan-2007 Dmitry V. Levin <ldv@altlinux.org> 2007-01-16 Dmitry V. Levin <ldv@altlinux.org>

Update mount parser to match kernel behaviour.
* system.c [LINUX] (MS_VERBOSE): Rename to MS_SILENT.
[LINUX] (MS_UNBINDABLE, MS_PRIVATE, MS_SLAVE, MS_SHARED):
New macros.
[LINUX] (mount_flags): Add them.
[LINUX] (MS_MGC_MSK): New macro.
[LINUX] (sys_mount): Update parser to match kernel behaviour:
discard MS_MGC_VAL magic, do not decode type and/or data
strings when specified flags do not imply valid strings.
/external/strace/system.c
5c7ad8c9155271b3c7b8fc9f08da43d3d9138b71 13-Jan-2007 Dmitry V. Levin <ldv@altlinux.org> 2007-01-11 Dmitry V. Levin <ldv@altlinux.org>

Update umount parser.
* system.c [LINUX] (MNT_FORCE, MNT_DETACH, MNT_EXPIRE): New macros.
[LINUX] (umount_flags): New xlat structure with MNT_* entries.
[LINUX] (sys_umount2): Use umount_flags.
/external/strace/system.c
5eb1aa539cdfe5be4a462f983c16cafdd94023e6 11-Jan-2007 Roland McGrath <roland@redhat.com> 2007-01-11 Roland McGrath <roland@redhat.com>

* system.c [LINUX] (CTL_CPU): Define in case header is missing it.
/external/strace/system.c
35a55785ea8ff44d214af52085e3a5ea624730aa 04-Dec-2006 Dmitry V. Levin <ldv@altlinux.org> 2006-11-27 Dmitry V. Levin <ldv@altlinux.org>

* system.c [LINUX]: Define CTL_PROC, since Linux 2.6.18+ headers
removed CTL_PROC enum. Patch from Jakub Jelinek.
[LINUX] (sysctl_root): Add CTL_BUS, CTL_ABI and CTL_CPU.
/external/strace/system.c
6af374811ba26950c2ac3e7f9bfd69cb986e0f27 12-Jan-2006 Roland McGrath <roland@redhat.com> 2005-08-08 Dmitry V. Levin <ldv@altlinux.org>

* system.c [LINUX] (MS_MGC_VAL): New macro.
[LINUX] (mount_flags): Add it.
[LINUX] (sys_mount): If neither MS_BIND nor MS_MOVE bits are
set in the flags argument, try to fetch data string.
Fixes RH#165377.
/external/strace/system.c
8e4a3e61ef9034308d273fd10cb2cf256c9f068d 12-Jan-2006 Roland McGrath <roland@redhat.com> 2006-01-12 Roland McGrath <roland@redhat.com>

* system.c (sys_sysctl): Don't read off end of NAME when max_strlen
exceeds INFO.nlen.
From Timo Lindfors <timo.lindfors@iki.fi>.
Fixes Debian#339117.
/external/strace/system.c
aa524c88c49814863cb7f19e5c8a8eeca6ce22fe 01-Jun-2005 Roland McGrath <roland@redhat.com> 2005-05-31 Dmitry V. Levin <ldv@altlinux.org>

Deal with memory management issues.
* defs.h (tprint_iov): Update prototype.
* desc.c (sys_epoll_wait) [HAVE_SYS_EPOLL_H]: Do not allocate
epoll_event array of arbitrary size on the stack, to avoid
stack overflow.
* file.c (print_xattr_val): Check for integer overflow during
malloc size calculation, to avoid heap corruption.
* io.c (tprint_iov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Change iovec array handling to avoid heap memory allocation.
* mem.c (get_nodes) [LINUX]: Check for integer overflow during
size calculation and do not allocate array of arbitrary size on
the stack, to avoid stack overflow.
* net.c (printcmsghdr) [HAVE_SENDMSG]: Do not allocate array of
arbitrary size on the stack, to avoid stack overflow. Do not
trust cmsg.cmsg_len to avoid read beyond the end of allocated
object.
(printmsghdr) [HAVE_SENDMSG]: Update tprint_iov() usage.
* process.c (sys_setgroups): Check for integer overflow during
malloc size calculation, to avoid heap corruption. Change gid_t
array handling to avoid heap memory allocation.
(sys_getgroups): Likewise.
(sys_setgroups32) [LINUX]: Likewise.
(sys_getgroups32) [LINUX]: Likewise.
* stream.c (sys_poll) [HAVE_SYS_POLL_H]: Check for integer
overflow during malloc size calculation, to avoid heap corruption.
Change pollfd array handling to avoid heap memory allocation.
* system.c (sys_sysctl) [LINUX]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
* util.c (dumpiov) [HAVE_SYS_UIO_H]: Check for integer overflow
during malloc size calculation, to avoid heap corruption.
Fixes RH#159196.
/external/strace/system.c
b2dee13345a62c80a677f3342cd525d611fbc632 01-Jun-2005 Roland McGrath <roland@redhat.com> 2005-05-31 Dmitry V. Levin <ldv@altlinux.org>

* util.c (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument, "const char *", with similar
meaning to the third argument of printxval().
* defs.h (printxval): Change third argument from "char *" to
"const char *".
(printflags): Add third argument.
* bjm.c (sys_query_module) [LINUX]: Pass third argument to
printflags().
* desc.c (sys_fcntl): Likewise.
(sys_flock) [LOCK_SH]: Likewise.
(print_epoll_event) [HAVE_SYS_EPOLL_H]: Likewise.
* file.c (sys_open): Likewise.
(solaris_open) [LINUXSPARC]: Likewise.
(sys_access): Likewise.
(sys_chflags, sys_fchflags) [FREEBSD]: Likewise.
(realprintstat) [HAVE_LONG_LONG_OFF_T &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(printstat64) [HAVE_STAT64 &&
HAVE_STRUCT_STAT_ST_FLAGS]: Likewise.
(sys_setxattr, sys_fsetxattr): Likewise.
* ipc.c (sys_msgget, sys_msgsnd, sys_msgrcv, sys_semget,
sys_shmget, sys_shmat) [LINUX || SUNOS4 || FREEBSD]: Likewise.
(sys_mq_open) [LINUX]: Likewise.
(printmqattr) [HAVE_MQUEUE_H]: Likewise.
* mem.c (print_mmap) [!HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mmap64) [_LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T]: Likewise.
(sys_mprotect): Likewise.
(sys_mremap, sys_madvise, sys_mlockall) [LINUX]: Likewise.
(sys_msync) [MS_ASYNC]: Likewise.
(sys_mctl) [MC_SYNC]: Likewise.
(sys_remap_file_pages, sys_mbind, sys_get_mempolicy) [LINUX]:
Likewise.
* net.c (printmsghdr) [HAVE_STRUCT_MSGHDR_MSG_CONTROL]: Likewise.
(sys_send, sys_sendto): Likewise.
(sys_sendmsg) [HAVE_SENDMSG]: Likewise.
(sys_recv, sys_recvfrom): Likewise.
(sys_recvmsg) [HAVE_SENDMSG]: Likewise.
(printicmpfilter) [ICMP_FILTER]: Likewise.
* proc.c (proc_ioctl) [SVR4 && !HAVE_MP_PROCFS || FREEBSD]: Likewise.
* process.c (sys_clone) [LINUX]: Likewise.
(printwaitn): Likewise.
(sys_waitid) [SVR4 || LINUX]: Likewise.
* signal.c (sys_sigvec) [SUNOS4 || FREEBSD]: Likewise.
(sys_sigaction): Likewise.
(printcontext) [SVR4]: Likewise.
(print_stack_t) [LINUX) || FREEBSD]: Likewise.
(sys_rt_sigaction) [LINUX]: Likewise.
* sock.c (sock_ioctl) [LINUX]: Likewise.
* stream.c (sys_putmsg, sys_getmsg): Likewise.
(sys_putpmsg) [SYS_putpmsg]: Likewise.
(sys_getpmsg) [SYS_getpmsg]: Likewise.
(sys_poll): Likewise.
(print_transport_message) [TI_BIND]: Likewise.
(stream_ioctl): Likewise.
* system.c (sys_mount, sys_reboot): Likewise.
(sys_cacheflush) [LINUX && M68K]: Likewise.
(sys_capget, sys_capset) [SYS_capget]: Likewise.
* term.c (term_ioctl) [TIOCMGET]: Likewise.
* time.c (sys_clock_nanosleep, sys_timer_settime) [LINUX]:
Likewise.
Fixes RH#159310.
/external/strace/system.c
46100d07257824da2ae1147da0324b5788c95501 01-Jun-2005 Roland McGrath <roland@redhat.com> 2005-05-31 Dmitry V. Levin <ldv@altlinux.org>

* bjm.c (sys_query_module) [LINUX]: Unitize "out of memory"
errors reporting style.
* strace.c (rebuild_pollv) [USE_PROCFS]: Likewise.
* system.c (sys_capget, sys_capset) [SYS_capget]: Likewise.
* util.c (printstr): Likewise.
(dumpiov) [HAVE_SYS_UIO_H]: Likewise.
(fixvfork) [SUNOS4]: Likewise.
* desc.c (decode_select): Continue to decode syscall arguments
in case of OOM condition.
* file.c (sys_getdents): Likewise.
(sys_getdents64) [_LFS64_LARGEFILE]: Likewise.
(sys_getdirentries) [FREEBSD]: Likewise.
* mem.c (sys_mincore): Changed type of variables which deal with
malloc size from int to unsigned long.
Fixes RH#159308.
/external/strace/system.c
2cbe44e441726abf568fbc4ca3cb5ab157ae7684 27-May-2005 Roland McGrath <roland@redhat.com> 2005-05-26 Roland McGrath <roland@redhat.com>

* system.c (sys_sysctl): Check for errors accessing user pointers.
Use malloc instead of alloca in case size is insane.
/external/strace/system.c
cbd3358a62fad460923d1626a220b6396e1fdd9f 02-Feb-2005 Roland McGrath <roland@redhat.com> 2005-02-01 Roland McGrath <roland@redhat.com>

* system.c [LINUX] (MS_MANDLOCK, MS_NOATIME, MS_NODIRATIME, MS_BIND,
MS_MOVE, MS_REC, MS_VERBOSE, MS_POSIXACL, MS_ACTIVE, MS_NOUSER):
New macros.
[LINUX] (mount_flags): Add them.
[LINUX] (sys_mount): If any of (MS_BIND|MS_MOVE|MS_REMOUNT) bits are
set in the flags argument, don't try to fetch the filesystem string.
Fixes RH#141932.
/external/strace/system.c
d9f816f60457930af27349fac3d23b3b78338036 04-Sep-2004 Roland McGrath <roland@redhat.com> 2004-09-03 Roland McGrath <roland@redhat.com>

* util.c (xlookup, printxval, addflags, printflags): Use const for
struct xlat * argument.
* defs.h (xlookup, printxval, addflags, printflags): Update decls.
* bjm.c: Add const to all struct xlat defns.
* desc.c: Likewise.
* file.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* resource.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* stream.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
/external/strace/system.c
ced50da46b600af578f2c341ba0db31c72880eb2 31-Aug-2004 Roland McGrath <roland@redhat.com> 2004-08-30 Roland McGrath <roland@redhat.com>

* system.c (personality_options): Hard-code values here.
Don't #include <linux/personality.h> at all.
Fixes RH#130965.
/external/strace/system.c
a796fd0ec7515d9a5ddea02964be3fda05d4ac11 01-Mar-2004 Roland McGrath <roland@redhat.com> 2004-03-01 Roland McGrath <roland@redhat.com>

* system.c (sysctl_vm): Conditionalize VM_* macro uses, add some more.
From Tim Yamin <plasmaroo@gentoo.org>.
/external/strace/system.c
5ef24abf005145b7e30e475e23c0fa2e8b0f4e13 20-Feb-2004 Roland McGrath <roland@redhat.com> Revert jhughes commits.
/external/strace/system.c
ae259337730f2d7a2b47bfbfb33aad1db0b65fba 29-Jan-2004 John Hughes <john@Calva.COM> port SSI clustering mods to OpenSSI on Linux
/external/strace/system.c
39c0e94935e8c332b0c51ef904fb08c6700f13b4 06-Nov-2002 Michal Ludvig <mludvig@suse.cz> Merged patch fixing MIPS build.
/external/strace/system.c
2d8b2c587152bfa3408d4920f07cbb865fd36dff 18-Oct-2001 John Hughes <john@Calva.COM> handle return values for ssisys on NSC
/external/strace/system.c
0aadba459035fba110f77f44d0ea9f2b9f447baa 16-Oct-2001 John Hughes <john@Calva.COM> Decode some ssisys args on NSC
/external/strace/system.c
4e36a8151bccaba338bf8513a367d287d193f524 18-Apr-2001 John Hughes <john@Calva.COM> Handle fork1/forkall on uw, handle rfork1,rforkall,rexecve and ssisys on uw non-stop-clusters
/external/strace/system.c
3472dd562cdd6ce04fa1c26e2ef8bf2d2b29f95e 10-Apr-2001 Wichert Akkerman <wichert@deephackmode.org> improve formating for sys_sysmips
/external/strace/system.c
3c935437d5af373eb6f05b4780c2e08840e55b29 07-Apr-2001 Wichert Akkerman <wichert@deephackmode.org> fix small display error for sys_sysmips
/external/strace/system.c
3f389c49dbec6f115bf1f43902965d0836dea1ac 07-Apr-2001 Wichert Akkerman <wichert@deephackmode.org> Fix another typo
/external/strace/system.c
d6b924937038457f83b47b26b9163bdfbdc230f2 07-Apr-2001 Wichert Akkerman <wichert@deephackmode.org> use asm/sysmips.h and linux/utsname.h if they exist
fix some silly typos in mips sections
/external/strace/system.c
0cbfb324b54e4c5859c76dd132a7ad942c0f5e77 19-Feb-2001 Wichert Akkerman <wichert@deephackmode.org> Add sys_sysmips decoding
/external/strace/system.c
bf79f2e16b090ffe59cd1e1820935680a2da7b78 01-Sep-2000 Wichert Akkerman <wichert@deephackmode.org> Add FreeBSD support
/external/strace/system.c
16a03d2e97415afe6cf34172a0aea97a95a0b160 10-Aug-2000 Wichert Akkerman <wichert@deephackmode.org> test/clone.c: minor fixup
Another bunch of patches from John Hughes merged:
signal.c:
+ SVR4 printcontext(): sigset_t != sigset_t*
+ getcontext returns a value, so print on exit of syscall
+ add UC_FP to ucontext_flags for OS writers that can't spell
+ sys_signal(): special case SIG_{ERR,DFL,IGN}
+ decode_subcall(): only do subcall range checking when needed
bunch of UnixWare updates
aclocal.m4, acconfig.h, configure.in: add test for long long type
/external/strace/system.c
5ae21ead9f83597452f9a0517e8a51fa4823f921 01-May-2000 Wichert Akkerman <wichert@deephackmode.org> The `too much stuff, just check the ChangeLog' update
/external/strace/system.c
c792698a99b640e7d256e8692c992bd967f0c5b2 11-Apr-2000 Wichert Akkerman <wichert@deephackmode.org> README-linux: updated to note that strace might not compile
with development kernels
bjm.c: sys_query_module: check if malloc succeeds
system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
linux/syscallent.h: updated for 2.3.99pre3
linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
syscall.c: add global variables for MIPS registers as well
syscall.c: move global variables to before get_scno since that uses them
util.c: oops, misspelled defined
process.c: fix ptrace calls in change_syscall
mem.c: decode sys_madvise
Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
/external/strace/system.c
8b1b40cd8b49151374d0ac2a5b1a4b459f9e0ae5 03-Feb-2000 Wichert Akkerman <wichert@deephackmode.org> Merge Trillian patches (Linux ia64)
/external/strace/system.c
4dc8a2aec63e4fb5ee2688544c4de323ed5de3ef 23-Dec-1999 Wichert Akkerman <wichert@deephackmode.org> Bunch of stuff
/external/strace/system.c
ea78f0f77185f7d6d0b2055805139d96e1be816c 29-Nov-1999 Wichert Akkerman <wichert@deephackmode.org> Add UnixWare support to configure
/external/strace/system.c
3377df74182174b4b69185fa00fe80f03a15ec0b 26-Nov-1999 Wichert Akkerman <wichert@deephackmode.org> Parse UnixWare mount options
/external/strace/system.c
2f473da12babff710bbe37c7f95be01fd00118f9 01-Nov-1999 Wichert Akkerman <wichert@deephackmode.org> Fix duplicate for sys_create_module
Include linux/in6.h only for Linux MIPS
/external/strace/system.c
9ce1a63eb20b069607c06f9645ac5a17b418a5f3 30-Aug-1999 Wichert Akkerman <wichert@deephackmode.org> Catching up on my mail-backlog, see ChangeLog for details
/external/strace/system.c
527a80589d5df0bca150eed9e9748151acddc533 15-Jul-1999 Wichert Akkerman <wichert@deephackmode.org> Update sys_createmodule and sys_initmodule
/external/strace/system.c
14cd9f06e5420b15ff1ba8bbd3077bdedc708a8f 09-Jul-1999 Wichert Akkerman <wichert@deephackmode.org> Tell system.c not to include linux/fs.h
/external/strace/system.c
8d5860c8d807440c28e838fa82f2ad7e83bade17 03-Jul-1999 Nate Sammons <nate@users.sourceforge.net> system.c was using __NR_* style syscall number defines, which don't
get defined now. Use SYS_* instead, and also make the previously dead
include hack work.

sys_personality didn't work right before.
/external/strace/system.c
8829a55dc2b13a00be7402f4bf644178a12e9f74 11-Jun-1999 Wichert Akkerman <wichert@deephackmode.org> Various fixes, see ChangeLog for details
/external/strace/system.c
dacfb6ebd630641d851b6df94c3b4587969a6cfb 03-Jun-1999 Wichert Akkerman <wichert@deephackmode.org> Add sparc patches from Jakub Jelinek
/external/strace/system.c
22fe9d2b99a12e1b778ce0481473ed67aa53f628 27-May-1999 Wichert Akkerman <wichert@deephackmode.org> added `a bit of sysctl support', patch from Ulrich Drepper
/external/strace/system.c
2e2553a534f532a1546ea2b2f3dc3cd2276d020d 09-May-1999 Wichert Akkerman <wichert@deephackmode.org> Merged in a bunch of patches that I got as reaction to the 3.99 release.
See the ChangeLog for details
/external/strace/system.c
76baf7c9f6dd61a15524ad43c1b690c252cf5b7c 19-Feb-1999 Wichert Akkerman <wichert@deephackmode.org> Initial revision
/external/strace/system.c