Roland McGrath [Thu, 5 Jul 2007 18:59:11 +0000 (18:59 +0000)]
2007-07-05 Roland McGrath <roland@frob.com>
* process.c [LINUX] (futexops): Add many new values.
[LINUX] (futexwakeops, futexwakecmps): New tables.
[LINUX] (sys_futex): Use them.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#241467.
Roland McGrath [Thu, 5 Jul 2007 18:43:16 +0000 (18:43 +0000)]
2007-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c (detach): New prototype. Extended the function comment.
[LINUX] (detach): Call droptcb() instead of the wrongly parametrized
detach() call.
(handle_group_exit): Call droptcb() instead of the wrongly parametrized
detach() call. Always call detach() only once from the group leader.
Comment the leader killing known bug tested by `test/leaderkill.c'.
Code advisory: Roland McGrath
Fixes RH#240961.
Roland McGrath [Mon, 11 Jun 2007 22:06:31 +0000 (22:06 +0000)]
2007-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
Never interrupt when the attached traced process would be left stopped.
* strace.c (main): `-p' attaching moved to ...
(startup_attach): ... a new function, renamed a variable C to TCBI.
Block interrupting signals since the first tracee has been attached.
New comment about INTERRUPTED in the nonthreaded case.
[LINUX] (startup_attach): Check INTERRUPTED after each attached thread.
(main): Command spawning moved to ...
(startup_child): ... a new function, replaced RETURN with EXIT.
[LINUX] (detach): New variable CATCH_SIGSTOP, do not signal
new SIGSTOP for processes still in TCB_STARTUP.
(main): Move signals and BLOCKED_SET init before the tracees attaching,
[SUNOS4] (trace): Removed fixvfork () call as a dead code, SIGSTOP must
have been already caught before clearing TCB_STARTUP.
(trace): Removed the `!WIFSTOPPED(status)' dead code.
Clear TCB_STARTUP only in the case the received signal was SIGSTOP.
New comment when `TCB_BPTSET && TCB_STARTUP' combination can be set.
Code advisory: Roland McGrath
Fixes RH#240986.
Dmitry V. Levin [Tue, 16 Jan 2007 15:10:07 +0000 (15:10 +0000)]
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.
Dmitry V. Levin [Thu, 11 Jan 2007 23:19:55 +0000 (23:19 +0000)]
2007-01-11 Dmitry V. Levin <ldv@altlinux.org>
Fix open(2) flags parser.
* defs.h (tprint_open_modes): New function.
* desc.c (sprint_open_modes): New function.
(sys_fcntl): Use tprint_open_modes() and sprint_open_modes().
* file.c (openmodes): Split xlat into open_access_modes and
open_mode_flags.
(tprint_open_modes): New function.
(decode_open): Use it.
* ipc.c (sys_mq_open, printmqattr): Likewise.
Fixes RH#222385.
Dmitry V. Levin [Thu, 21 Dec 2006 11:44:28 +0000 (11:44 +0000)]
2006-12-20 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (internal_syscall): Change conditions for internal_exit,
internal_fork, internal_clone, internal_exec and internal_wait
calls from switching on known scno values to switching on known
sysent[tcp->scno].sys_func values.
Fixes RH#179740.
Dmitry V. Levin [Wed, 20 Dec 2006 22:37:21 +0000 (22:37 +0000)]
2006-12-20 Dmitry V. Levin <ldv@altlinux.org>
Show system call summary for each personality.
* syscall.c (countv): New call_counts pointers array.
(counts): Convert to macro wrapper around countv.
(call_summary_pers): New function.
(call_summary): Use it for each personality.
Fixes RH#192193.
Dmitry V. Levin [Wed, 13 Dec 2006 17:43:45 +0000 (17:43 +0000)]
2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Add biarch support for "struct timex".
* time.c [LINUX && SUPPORTED_PERSONALITIES > 1] (tprint_timex32):
New function.
[LINUX] (tprint_timex): New function.
[LINUX] (sys_adjtimex): Use it.
Dmitry V. Levin [Wed, 13 Dec 2006 16:59:44 +0000 (16:59 +0000)]
2006-12-10 Dmitry V. Levin <ldv@altlinux.org>
Make several global variables static.
#ifdef definitions of rarely unused functions.
* defs.h (rflag, tflag, outfname): Remove.
* strace.c (iflag, interactive, pflag_seen, rflag, tflag,
outfname, username): Make static.
* desc.c (sys_getdtablesize): Define only for
ALPHA || FREEBSD || SUNOS4.
* file.c (sys_fchroot): Define only for SUNOS4 || SVR4.
(sys_mkfifo): Define only for FREEBSD.
* mem.c (sys_sbrk): Define only for FREEBSD || SUNOS4.
(sys_getpagesize): Define only for
ALPHA || FREEBSD || IA64 || SUNOS4 || SVR4.
* net.c (sys_so_socket): Define only for SVR4.
* process.c (sys_gethostid): Define only for
FREEBSD || SUNOS4 || SVR4.
(sys_gethostname): Define only for
ALPHA || FREEBSD || SUNOS4 || SVR4.
(sys_setpgrp): Define only for ALPHA || SUNOS4 || SVR4.
(sys_execv): Define only for SPARC || SPARC64 || SUNOS4.
* signal.c (sys_sigblock): Define only for FREEBSD || SUNOS4.
(sys_sighold, sys_sigwait): Define only for SVR4.
(sys_killpg): Define only for FREEBSD || SUNOS4.
* stream.c (sys_getmsg): Define only for
SPARC || SPARC64 || SUNOS4 || SVR4.
* syscall.c (sys_indir): Define only for SUNOS4.
Dmitry V. Levin [Mon, 4 Dec 2006 13:48:10 +0000 (13:48 +0000)]
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.
Dmitry V. Levin [Wed, 11 Oct 2006 23:11:43 +0000 (23:11 +0000)]
2006-10-06 Dmitry V. Levin <ldv@altlinux.org>
* strace.c [!USE_PROCFS] (trace): Presence of PT_GETSIGINFO
macro does not mean that PT_CR_IPSR and PT_CR_IIP macros are
also defined, so check them along with PT_GETSIGINFO.
Fixes RH#209856.
Dmitry V. Levin [Wed, 11 Oct 2006 22:55:25 +0000 (22:55 +0000)]
2006-03-29 Dmitry V. Levin <ldv@altlinux.org>
Fix race conditions in tcb allocation.
* process.c (fork_tcb): Return error code as documented. Do not
print "tcb table full" error message.
[USE_PROCFS] (internal_fork): Do not print "tcb table full"
error message.
[SYS_clone || SYS_clone2] (internal_clone, internal_fork): Call
fork_tcb() before alloctcb(). Do not print "tcb table full"
error message.
* strace.c (main): Do not print "tcb table full" error message.
(expand_tcbtab): Print error message in case of memory allocation
failure.
(alloctcb): Print error message when tcb table is full.
(trace): Expand tcb table if necessary prior to allocating
entry there. Do not print "tcb table full" error message.
Fixes RH#180293.