43 Commits

Author SHA1 Message Date
817b708fcb 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.
2007-01-16 15:10:07 +00:00
5c7ad8c915 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.
2007-01-13 11:15:48 +00:00
Roland McGrath
5eb1aa539c 2007-01-11 Roland McGrath <roland@redhat.com>
* system.c [LINUX] (CTL_CPU): Define in case header is missing it.
2007-01-11 22:48:39 +00:00
35a55785ea 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.
2006-12-04 13:48:10 +00:00
Roland McGrath
6af374811b 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.
2006-01-12 21:21:06 +00:00
Roland McGrath
8e4a3e61ef 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.
2006-01-12 11:03:46 +00:00
Roland McGrath
aa524c88c4 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.
2005-06-01 19:22:06 +00:00
Roland McGrath
b2dee13345 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.
2005-06-01 19:02:36 +00:00
Roland McGrath
46100d0725 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.
2005-06-01 18:55:42 +00:00
Roland McGrath
2cbe44e441 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.
2005-05-26 23:21:09 +00:00
Roland McGrath
cbd3358a62 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.
2005-02-02 04:36:11 +00:00
Roland McGrath
d9f816f604 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.
2004-09-04 03:39:20 +00:00
Roland McGrath
ced50da46b 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.
2004-08-31 06:48:46 +00:00
Roland McGrath
a796fd0ec7 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>.
2004-03-01 22:10:54 +00:00
Roland McGrath
5ef24abf00 Revert jhughes commits. 2004-02-20 02:22:35 +00:00
John Hughes
ae25933773 port SSI clustering mods to OpenSSI on Linux 2004-01-29 11:17:50 +00:00
Michal Ludvig
39c0e94935 Merged patch fixing MIPS build. 2002-11-06 14:00:12 +00:00
John Hughes
2d8b2c5871 handle return values for ssisys on NSC 2001-10-18 14:52:24 +00:00
John Hughes
0aadba4590 Decode some ssisys args on NSC 2001-10-16 18:19:52 +00:00
John Hughes
4e36a8151b Handle fork1/forkall on uw, handle rfork1,rforkall,rexecve and ssisys on uw non-stop-clusters 2001-04-18 15:11:51 +00:00
Wichert Akkerman
3472dd562c improve formating for sys_sysmips 2001-04-10 10:27:52 +00:00
Wichert Akkerman
3c935437d5 fix small display error for sys_sysmips 2001-04-07 21:45:30 +00:00
Wichert Akkerman
3f389c49db Fix another typo 2001-04-07 21:41:26 +00:00
Wichert Akkerman
d6b9249370 use asm/sysmips.h and linux/utsname.h if they exist
fix some silly typos in mips sections
2001-04-07 21:37:12 +00:00
Wichert Akkerman
0cbfb324b5 Add sys_sysmips decoding 2001-02-19 13:35:53 +00:00
Wichert Akkerman
bf79f2e16b Add FreeBSD support 2000-09-01 21:03:06 +00:00
Wichert Akkerman
16a03d2e97 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
2000-08-10 02:14:04 +00:00
Wichert Akkerman
5ae21ead9f The `too much stuff, just check the ChangeLog' update 2000-05-01 01:53:59 +00:00
Wichert Akkerman
c792698a99 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
2000-04-10 22:22:31 +00:00
Wichert Akkerman
8b1b40cd8b Merge Trillian patches (Linux ia64) 2000-02-03 21:58:30 +00:00
Wichert Akkerman
4dc8a2aec6 Bunch of stuff 1999-12-23 14:20:14 +00:00
Wichert Akkerman
ea78f0f771 Add UnixWare support to configure 1999-11-29 15:34:02 +00:00
Wichert Akkerman
3377df7418 Parse UnixWare mount options 1999-11-26 13:14:41 +00:00
Wichert Akkerman
2f473da12b Fix duplicate for sys_create_module
Include linux/in6.h only for Linux MIPS
1999-11-01 19:53:31 +00:00
Wichert Akkerman
9ce1a63eb2 Catching up on my mail-backlog, see ChangeLog for details 1999-08-29 23:15:07 +00:00
Wichert Akkerman
527a80589d Update sys_createmodule and sys_initmodule 1999-07-15 21:11:37 +00:00
Wichert Akkerman
14cd9f06e5 Tell system.c not to include linux/fs.h 1999-07-09 18:56:34 +00:00
Nate Sammons
8d5860c8d8 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.
1999-07-03 18:53:05 +00:00
Wichert Akkerman
8829a55dc2 Various fixes, see ChangeLog for details 1999-06-11 13:18:40 +00:00
Wichert Akkerman
dacfb6ebd6 Add sparc patches from Jakub Jelinek 1999-06-03 14:21:07 +00:00
Wichert Akkerman
22fe9d2b99 added `a bit of sysctl support', patch from Ulrich Drepper 1999-05-27 12:00:57 +00:00
Wichert Akkerman
2e2553a534 Merged in a bunch of patches that I got as reaction to the 3.99 release.
See the ChangeLog for details
1999-05-09 00:29:58 +00:00
Wichert Akkerman
76baf7c9f6 Initial revision 1999-02-19 00:21:36 +00:00