Commit Graph

1478 Commits

Author SHA1 Message Date
njoly
d5203d274e Regen for rt_queueinfo(2) update. 2009-06-08 13:29:00 +00:00
njoly
5bf0ee73ce Update rt_queueinfo(2) definition, and kill a corresponding comment. 2009-06-08 13:26:57 +00:00
njoly
a9b9e78076 Small rt_queueinfo(2) update, to require a linux_siginfo structure.
While here, cleanup ifdef out argument types.
2009-06-08 13:23:16 +00:00
njoly
55d5cc9d0d Various compat linux siginfo fixes.
- alpha: add missing _uid member to SIGCHLD structure.
- amd64: add missing typedef, and fix padding size.
- arm: add missing linux_siginfo definition.
2009-06-08 11:46:06 +00:00
njoly
5932e6a6cd Add the mask value returned by siggetmask. 2009-06-02 16:53:07 +00:00
njoly
7c47c56d95 Make nice(2) return EPERM on error, not EACCES (from sys_setpriority). 2009-06-02 13:00:23 +00:00
njoly
d22e6f64ab Add native to linux siginfo si_status translation, used on i386 and
amd64.
2009-05-29 14:19:12 +00:00
njoly
a88fd78513 Use correct linux_clock_t type for _stime, not native clock_t. 2009-05-27 12:20:37 +00:00
pooka
dfb36ab4e4 pad -> PAD 2009-05-15 16:59:07 +00:00
njoly
d3dabe1260 Add IPC_64 support for all semctl(2)/msgctl(2). Needed, at least on
i386 for Linux 2.6 emulation.
2009-04-23 17:40:57 +00:00
njoly
c4fb0248d2 Convert si_code value from native to linux. 2009-04-23 17:37:51 +00:00
elad
2d1c968399 Remove a few KAUTH_GENERIC_ISSUSER in favor of more descriptive
alternatives.

Discussed on tech-kern:

	http://mail-index.netbsd.org/tech-kern/2009/04/11/msg004798.html

Input from ad@, christos@, dyoung@, tsutsui@.

Okay ad@.
2009-04-15 20:44:24 +00:00
christos
2b1b4bc6ef Move the internal poll/select related API's to use timespec instead
of timeval (rides the uvm bump).
2009-03-29 19:21:19 +00:00
mrg
fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
address space available to processes.  this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.

- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.

- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)

- patch sh, and csh to notice RLIMIT_AS.  (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)

- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.

- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information.  (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)


this addresses PR 7897.  it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.

tested on i386 and sparc64, build tested on several other platforms.

thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
2009-03-29 01:02:48 +00:00
ad
d16d704d62 PR port-i386/40143 Viewing an mpeg transport stream with mplayer causes crash
Fix numerous problems:

1. LDT updates are not atomic.

2. Number of processes running with private LDTs and/or I/O bitmaps
   is not capped. System with high maxprocs can be paniced.

3. LDTR can be leaked over context switch.

4. GDT slot allocations can race, giving the same LDT slot to two procs.

5. Incomplete interrupt/trap frames can be stacked.

6. In some rare cases segment faults are not handled correctly.
2009-03-21 14:41:29 +00:00
cegger
e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
9fca5da616 ansify function definitions 2009-03-15 15:55:51 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
christos
7fd1fc871c fix robust_list pointer mess! 2009-03-14 20:18:27 +00:00
rmind
f54234d142 Switch Linux futex emulation to native ucas_int(), remove unecessary
futex-specific assembler routines.

Fixes PR/40490.  Reviewed by <ad>.
2009-02-23 20:28:58 +00:00
njoly
dc871322e1 Do not protect native_to_linux_si_code() under LINUX_NPTL anymore, now
that linux si_code definitions are MI.
2009-02-18 14:43:22 +00:00
njoly
a1cf1f2eab Add IPC_64 support for all shmctl(2) commands, not only for STAT/SET.
This make it work on i386 under 2.6 emulation.
2009-02-18 14:30:43 +00:00
njoly
0ebed1143f Small personality(2) update.
- Allow querying current personality.
- Use symbolic names instead of magic values.
2009-01-19 13:31:40 +00:00
njoly
77237e1c08 Regen for wait4 update. 2009-01-17 22:34:02 +00:00
njoly
25a76c08aa Convert linux/linux32 wait(4) to use a compat50 rusage structure. 2009-01-17 22:28:52 +00:00
njoly
b615dfc4d8 Rengen for compat50 update. 2009-01-15 23:50:35 +00:00
njoly
7345858afe Update some syscalls/arguments to use the new compat50 equivalents. 2009-01-15 23:48:50 +00:00
pooka
5d19acad62 Regen to prove I didn't screw up the conversion: purely RCSID changes. 2009-01-13 22:33:08 +00:00
pooka
a9a2ce837b Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat).  Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().
2009-01-13 22:27:43 +00:00
pooka
e0330adb61 regen 2009-01-13 21:20:29 +00:00
pooka
33883e2a6d Somehow i doubt linux_sys_recvmsg() returns size_t. Make it ssize_t.
(XXX: the actual implementation returns int)
2009-01-13 21:19:51 +00:00
pooka
bb5f9edebf regen for #include "opt_compat_netbsd.h" 2009-01-13 19:45:38 +00:00
rtr
21e966491f actually commit syscalls.master this time
add back blank line between #include <sys/.. and #include <sys/compat/..
regen
2009-01-13 04:31:12 +00:00
rtr
b198a0fd79 regen for christos_time_t merge 2009-01-12 11:53:23 +00:00
tsutsui
8a2b8ba767 Regen from syscalls.master rev 1.64:
> Update for compat_50 stuff. (compile test only)
2009-01-11 13:00:25 +00:00
tsutsui
4f0ae35127 Update for compat_50 stuff. (compile test only) 2009-01-11 12:59:34 +00:00
christos
461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
njoly
16cef148ad Restore expected FUTEX_WAIT behaviour with NULL timeout argument,
which was broken in my recent timespec cleanup/fix.
2009-01-08 12:46:23 +00:00
njoly
5affb2e50a Make sysctl(2) fails with ENOTDIR (instead of EINVAL) for invalid mib
vector length.
2009-01-05 09:33:19 +00:00
njoly
4f6a64a639 Restore struct sysctl padding member name, which was damaged during
__unused removal on arguments.
2009-01-05 09:18:27 +00:00
njoly
e85166daa8 Fix stime(2) inverted copyin arguments. 2008-12-29 22:21:49 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
njoly
26a5edd122 Add some padding members to linux_msqid64_ds for 32-bit archs. This
fix msgctl(2) IPC_STAT|IPC_64 calls, at least, on i386.
2008-12-09 11:09:11 +00:00
ad
dc5f414733 PR port-amd64/40091 compat_linux32 module loading = panic due to missing syms 2008-12-03 12:51:11 +00:00
njoly
6709281d18 Move si_code definitions from MD to MI linux_siginfo.h, all archs
(except mips for 3 values) are identical.
While here, remove unused/unneeded LINUX__SI_CODE macro. Only the
lower 16-bits are used for userland si_code.
2008-11-23 23:48:48 +00:00
mrg
56585a9fd3 initialise a variable to avoid a GCC warning. 2008-11-23 00:15:13 +00:00
ad
1ab7ca8fdc PR port-amd64/39964 modules/compat_linux: missing symbols on amd64 2008-11-20 09:26:06 +00:00
ad
e157b99c7c Regen. 2008-11-19 18:39:43 +00:00
ad
92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00