Commit Graph

4270 Commits

Author SHA1 Message Date
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
njoly
659effb31a Remove a duplicate mutex_enter call in linux32_e_proc_init().
Fix a kernel panic for processes created with FORK_SHAREVM.
2008-04-26 22:55:10 +00:00
ad
284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
njoly
436fa0ef05 Add IPC_64 support for semctl IPC_STAT/IPC_SET. 2008-04-24 16:42:54 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad
026542bb25 Regen. 2008-04-24 11:51:47 +00:00
ad
30abe39468 - Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
2008-04-24 11:51:18 +00:00
ad
15e29e981b Merge the socket locking patch:
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.
2008-04-24 11:38:36 +00:00
christos
f6889916d7 Make this compile again, from Jan-Benedict Glaw jbglaw at lug-owl dot de 2008-04-23 23:34:11 +00:00
ad
bfb6f31431 Disable bitrotted linux ptrace interfaces, which are likely now a
security hole. Can be re-enabled at runtime. If you want to repair
them please look at the native implementation.
2008-04-23 14:18:50 +00:00
ad
dd55791531 Regen. 2008-04-23 14:10:03 +00:00
ad
7cb840338e -SYCALL_MPSAFE 2008-04-23 14:07:49 +00:00
ad
1265474f26 sys_kill -> sys__lwp_kill 2008-04-23 14:01:09 +00:00
ad
f1b58cdc9b Sprinkle locks. 2008-04-23 13:58:06 +00:00
ad
98c2709959 Sprinkle locking. 2008-04-23 13:51:48 +00:00
ad
dc31d7f7e9 sys_kill -> sys__lwp_kill 2008-04-23 13:49:21 +00:00
ad
494c1ad8d6 Fix locking. 2008-04-23 13:44:46 +00:00
ad
8d0205c623 Grab kernel_lock for cpu_reboot(). 2008-04-23 13:40:17 +00:00
ad
e0b56ca8f5 Fix locking. 2008-04-23 13:34:44 +00:00
ad
6bf00a454d Catch up with linux. 2008-04-23 13:30:41 +00:00
ad
ce69e3e9c8 Fix locking. 2008-04-23 13:13:25 +00:00
ad
d0466d413e Tweak locking. 2008-04-23 13:11:42 +00:00
ad
bb0c94d223 Tweak previous. 2008-04-23 13:09:40 +00:00
ad
14f88acc9b Fix locking. 2008-04-23 13:02:32 +00:00
ad
1e216688e1 - Use cdev_tty().
- Tweak locking.
2008-04-23 12:55:16 +00:00
ad
a87ccd221c Sprinkle locking. 2008-04-23 12:50:53 +00:00
ad
624dcd9102 Sprinkle locking. 2008-04-22 21:33:13 +00:00
ad
dce30353aa Add a comment. 2008-04-22 21:29:21 +00:00
ad
be60f17289 Repair copyright. 2008-04-22 21:26:48 +00:00
ad
9e0517c26f Grab proclist_lock for p->p_pgrp. 2008-04-22 21:23:17 +00:00
njoly
d8f896655c Add LINUX_IPC_64 support for LINUX_IPC_SET in shmctl. Required, at
least, for amd64 which use LINUX_IPC_FORCE64.
2008-04-21 22:57:06 +00:00
njoly
f1bd64daf3 Rename LINUX_SHMCTL_FORCEIPC64 define to LINUX_IPC_FORCE64. 2008-04-21 22:38:18 +00:00
ad
08b44dd8b9 timer fixes for PR 37093:
- Fix serious concurrency problems, making the code MT and MP safe in
  the process.
- Don't allocate memory or inspect process state from hardclock().
2008-04-21 00:13:46 +00:00
njoly
3dadb2a2df Regen for sys_clock_{getres,gettime,settime} syscalls. 2008-04-17 17:48:40 +00:00
njoly
c007e33a3a Add compat linux32 sys_clock_{getres,gettime,settime} syscalls. 2008-04-17 17:47:23 +00:00
njoly
69614dfece Remove an obsolete comment about SHM_LOCK/SHM_UNLOCK being no-op. 2008-04-16 14:47:31 +00:00
njoly
14183438ed Kill a few other unused linux syscall arguments/prototypes
definitions.
2008-04-16 10:03:31 +00:00
njoly
a73122f64e Make linux32_sys_nice call sys_setpriority directly instead of
netbsd32_setpriority.
2008-04-15 21:13:34 +00:00
njoly
8529e0b201 Remove syscall prototypes forgotten in previous commit. 2008-04-15 21:10:06 +00:00
njoly
80b21f4457 Remove unused linux_sys_setresgid16_args/linux_sys_setresuid16_args
definitions.
2008-04-15 19:10:19 +00:00
njoly
3ce80f6407 Remove unneeded amd64 ifdef/endif. 2008-04-15 11:08:05 +00:00
njoly
26457ccc1d Under NPTL emulation, do not reparent all members of a thread group,
but only the processes that emulate threads (with LINUX_CLONE_THREAD
set).

This fix a problem for child processes that share address space with
the parent. At exit, the child will die silently, leaving the parent
waiting indefinitely for its end ...
2008-04-11 16:47:50 +00:00
njoly
112605d50a Cleanup unneeded LINUX_NPTL ifdef/endif. 2008-04-08 20:25:00 +00:00
yamt
3426b80b5e - l_wmesg is not always valid. check l_wchan when using l_wmesg.
should fix a crash reported by Juan RP on current-users@.
- ttyinfo: lock lwp when accessing l_wmesg.
- fill_lwp: add an assertion.
2008-04-05 14:03:16 +00:00
njoly
8c5bd726ed Regen for msync(2) support. 2008-04-04 12:59:15 +00:00
njoly
dc80a00302 Add msync(2) syscall. 2008-04-04 12:57:55 +00:00
njoly
2b6f0cc5e4 Regen for linux_sys_msync removal. 2008-04-04 12:43:00 +00:00
njoly
dcde97da0e Cleanup. Kill linux_sys_msync and use sys___msync13 instead.
No functional changes expected.
2008-04-04 12:38:52 +00:00
christos
c2126f5e21 print size_t with %zu. 2008-03-30 20:58:08 +00:00
ad
be04ac4896 Make rusage collection per-LWP and collate in the appropriate places.
cloned threads need a little bit more work but the locking needs to
be fixed first.
2008-03-27 19:06:51 +00:00