dsl
2a54322c7b
If a multithreaded app closes an fd while another thread is blocked in
...
read/write/accept, then the expectation is that the blocked thread will
exit and the close complete.
Since only one fd is affected, but many fd can refer to the same file,
the close code can only request the fs code unblock with ERESTART.
Fixed for pipes and sockets, ERESTART will only be generated after such
a close - so there should be no change for other programs.
Also rename fo_abort() to fo_restart() (this used to be fo_drain()).
Fixes PR/26567
2009-12-20 09:36:05 +00:00
mrg
97c80e8ff0
replace mips:elf_check_itp() and ELFNAME2(netbsd32,probe_noteless) that
...
it's based upon with a common compat_elf_check_interp().
tested on MALTA64 and sparc64.
2009-12-14 04:09:38 +00:00
matt
15aa4c53c9
Regen (new makesyscalls.sh)
2009-12-14 00:53:32 +00:00
matt
e110dba586
Merge from matt-nb5-mips64
2009-12-14 00:47:10 +00:00
njoly
f6cb14208d
Remove semicolon from NETBSD32TOx_UAP macro definitions.
2009-12-12 10:32:26 +00:00
njoly
9e96206789
Add missing semicolons after NETBSD32TOx_UAP macro calls.
2009-12-12 10:30:09 +00:00
njoly
c3217052b6
In netbsd32_from_{ifreq,oifreq}(), use the compat structure size for
...
memcpy.
From mrg.
2009-12-11 11:14:34 +00:00
njoly
5e38c900e9
Add SIOCGIFMTU support.
2009-12-10 17:07:26 +00:00
njoly
ed22c0665f
Do not give native requests to netbsd32_ioctl(), use the compat
...
netbsd32 equivalent instead.
2009-12-10 16:55:17 +00:00
njoly
4f273f66ed
Kill debug printf.
2009-12-10 15:47:23 +00:00
njoly
86051746c6
Make netbsd32_from_{ifreq,oifreq}() copy the whole structure, not only
...
the interface name. Finally fix my own PR/39424.
ok by christos.
2009-12-10 14:58:28 +00:00
matt
6a9e4e8eeb
Change u_long to vaddr_t/vsize_t in exec code where appropriate (mostly
...
involves setregs and vmcmds). Should result in no code differences.
2009-12-10 14:13:48 +00:00
matt
a3e1558eec
Move saemul_netbsd32 to netbsd32_sa.c and allow the KERN_SA bits to be omitted.
2009-12-10 14:10:35 +00:00
dsl
7a42c833db
Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
...
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.
2009-12-09 21:32:58 +00:00
christos
67de10fc57
Add netbsd32_oifreq and fix issue in copying the interface name. With this
...
patch OSIOC{G,S}IFFLAGS is supposed to work, but unfortunately getifaddrs
seems to be the next problem getting the 4.99.x i386 ifconfig working on an
amd64 current machine.
2009-12-09 04:50:47 +00:00
pooka
70d4493c77
Remove the portalfs kernel file system driver. Replace mount_portal(8)
...
with a version based on puffs. User functionality remains the same.
2009-12-05 20:11:01 +00:00
dsl
ea4ea02d98
Add LINUX_SIOCGIFMTU and LINUX_IP_HDRINCL support.
...
Fixes part of PR/31358
The other parts are rather too intrusive to be fixed as in the PR.
2009-11-28 22:11:42 +00:00
dsl
ba620e0c2b
Set irm->bufmem = uvmexp.filepages;
...
as suggested in PR/30408
2009-11-28 20:09:56 +00:00
njoly
4898628cc1
Regen for personality(2) update.
2009-11-24 10:44:41 +00:00
njoly
675b20da1b
Update personality(2) to match Linux definition where the argument is an
...
unsigned long.
2009-11-24 10:42:43 +00:00
rmind
eaddd78061
Use lwp_getpcb() in compat code, clean from struct user.
2009-11-23 00:46:06 +00:00
mbalmer
0ae57f90dd
more s/the the/the/
2009-11-22 19:09:15 +00:00
njoly
db5a8f38f0
Kill redundant assignment.
2009-11-21 11:54:54 +00:00
njoly
6afff4b463
Make linux32_msqid_ds l_msg_[src]time members use the right type,
...
linux32_time_t.
2009-11-20 11:54:08 +00:00
njoly
87483a8bda
Make compat linux/linux32 msgrcv_msgarg type member of type
...
long/netbsd32_long to match linux definition.
2009-11-18 15:19:24 +00:00
njoly
bde1dd1459
Make linux32 msgsnd/msgrcv use the netbsd32 syscalls instead of native
...
ones, to ensure that msgbuf mtype member will be of the right type.
2009-11-18 12:27:58 +00:00
njoly
f08f03b58d
Kill noisy debug printf.
2009-11-18 12:01:25 +00:00
joerg
5685d06220
Follow up commit to fix breakage that somehow passed by the compiler.
2009-11-16 13:32:40 +00:00
joerg
cbdff4a667
Add SYSVMSG support for linux32.
2009-11-16 08:49:32 +00:00
joerg
bf54b26c0c
Make sure to never leak padding space before copyout or copyin
...
uninitialized fields by explicitly using memset in the conversion
routines.
2009-11-16 08:44:19 +00:00
joerg
e7123f329a
Return the result of copyout. Reminded by Niolas Joly.
2009-11-13 22:39:35 +00:00
joerg
8277e92195
Provide SIOCGIFNAME.
2009-11-13 21:45:03 +00:00
rmind
1283950019
- selcommon/pollcommon: drop redundant l argument.
...
- Use cached curlwp->l_fd, instead of p->p_fd.
- Inline selscan/pollscan.
2009-11-11 09:48:50 +00:00
rafal
0c8283fe12
Fix fallout from do_sys_wait changes (hi, rmind!)
2009-11-05 18:39:38 +00:00
pooka
93db2986fd
Fling portion of time.h dealing strictly with types to a separate
...
time_types.h file. Include latter from former.
2009-11-05 16:59:01 +00:00
rmind
4c1098f541
do_sys_wait(): fix previous by checking for ru != NULL. Noticed by
...
Onno van der Linden. Also, remove redundant arguments (seems that
was_zombie was not used since rev 1.177 ?).
2009-11-04 21:23:02 +00:00
njoly
a135bd0847
Regen for struct linux_stat64 fix.
2009-10-30 10:58:15 +00:00
njoly
e8df95dcb7
stat64 syscalls require struct linux_stat64.
2009-10-30 10:57:40 +00:00
rmind
554a0142dc
Initialise struct emul members by name (it is readable now and one can search
...
them in the tree).
2009-10-25 01:14:03 +00:00
rmind
40cf6f3659
Remove uarea swap-out functionality:
...
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.
Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).
Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
yamt
bb529e553e
compat_50_sys_aio_suspend:
...
- fix the buffer size.
- use kmem_alloc instead of kmem_zalloc for buffers which we will
overwrite soon.
2009-10-12 23:41:51 +00:00
rmind
c9a5a18df3
mq_timedsend/mq_timedreceive: timeout value is absolute, not relative.
...
While here, drop unecessary (since fdesc API changes) lwp_t arguments.
Bug reported by Stathis Kamperis, thanks!
2009-10-05 23:49:46 +00:00
taca
5a6dad0a4b
Trying to fix build problem. Thanks to joerg's advise.
2009-09-20 10:29:30 +00:00
pooka
fbd53556dc
Wipe out the last vestiges of POOL_INIT with one swift stroke. In
...
most cases, use a proper constructor. For proplib, give a local
equivalent of POOL_INIT for the kernel object implementation. This
way the code structure can be preserved, and a local link set is
not hazardous anyway (unless proplib is split to several modules,
but that'll be the day).
tested by booting a kernel in qemu and compile-testing i386/ALL
2009-09-13 18:45:10 +00:00
njoly
1e0366323b
Use correct sched_setscheduler syscall 3rd argument type.
2009-09-03 17:15:17 +00:00
dholland
869e0ec654
Use uintptr_t instead of uint32_t as an intermediate stage when
...
casting from off_t to a pointer. This way it compiles in a 64-bit
world. Dunno if it'll work though with 64-bit mips kernel addresses,
which are in the negative range of 64-bit off_t.
2009-08-31 05:36:23 +00:00
dholland
97d7a71b45
Use uintptr_t instead of int when munging fcntl flags, which are
...
pointer-sized integers. Now builds in a 64-bit world, might even work :-)
2009-08-31 05:34:16 +00:00
dholland
dbb9a41442
Another one that needs <sys/exec_aout.h>.
2009-08-28 01:39:03 +00:00
christos
84ec419140
add a lot more debugging and error checking. Alas, skype seems to be happy
...
getting back our values, but still does not work.
2009-08-22 23:31:16 +00:00
drochner
eec7391fde
remove some "inline" from functions which are defined in a .c file
...
but used elsewhere -- gcc-4.4.1 doesn't like it and I doubt it
had any effect
2009-08-18 11:22:09 +00:00
christos
f73ec80b69
more debugging for mmap
2009-08-18 02:04:14 +00:00
christos
fc0d883cc1
add the video ioctls so that the 32 bit skype works with video
...
more commits to come
2009-08-18 02:02:58 +00:00
cegger
ea28690bc6
buildfix: #include <sys/exec_aout.h>
2009-08-17 06:00:05 +00:00
martin
b507c43e16
Add missing include <sys/exec_aout.h>
2009-08-16 15:41:51 +00:00
martin
ff78bb583b
Include <sys/exec_aout.h> for a.out specific defines.
2009-08-16 15:39:30 +00:00
manu
a693f69b7e
Build COMPAT_DARWIN and COMPAT_MACH as a Xen domU too
2009-08-16 15:35:52 +00:00
matt
7bb407d6e3
Include <sys/exec_aout.h> explicitly instead of relying on <sys/exec.h> to
...
do it for you.
2009-08-15 23:39:35 +00:00
matt
69d946c278
Don't include EXEC_AOUT stuff by default.
2009-08-13 03:56:32 +00:00
matt
baf57f2df6
#include "opt_execfmt.h" and only compile innards if EXEC_AOUT is defined.
2009-08-13 03:53:13 +00:00
rjs
ff83e633bb
Add enum uio_seg argument to do_sys_mknod().
2009-08-10 17:36:00 +00:00
haad
5200b9b492
Add enum uio_seg argument to do_sys_mknod and do_sys_mkdir so these functions
...
can be called from kernel, too.
Change needed for zfs device node creation, until we have propoer devfs.
Oked by ad@.
2009-08-09 22:49:00 +00:00
njoly
9e069687a9
Make compat netbsd32 sendmsg follow the native version by allowing
...
empty messages. This let unfdpass regression test work as expected.
2009-07-22 17:19:44 +00:00
njoly
3d5d2c8f61
Make compat linux/linux32 getdents(2) fail with ENOTDIR instead of
...
EINVAL when file descriptor does not refer to a directory.
2009-07-22 15:49:29 +00:00
njoly
7d645a3ea4
Kill unreachable return statement.
2009-07-21 18:50:43 +00:00
njoly
dd5f408241
Do reject unknown/invalid linux clockid.
2009-07-21 18:42:56 +00:00
rmind
029f6c41a7
- Use #ifdef AIO, instead of #ifdef notyet. Not a solution, but at
...
least gets it working for MONOLITHIC kernel.
- Similarily add #ifdef MQUEUE for mqueue compat.
- Amend TNF license to be 2-clause. Approved by <christos>.
2009-07-19 02:41:27 +00:00
dholland
effcf1af5c
Convert 67 namei call sites to use namei_simple, in these functions:
...
check_console, veriexecclose, veriexec_delete, veriexec_file_add,
emul_find_root, coff_load_shlib (sh3 version), coff_load_shlib,
compat_20_sys_statfs, compat_20_netbsd32_statfs,
ELFNAME2(netbsd32,probe_noteless), darwin_sys_statfs,
ibcs2_sys_statfs, ibcs2_sys_statvfs, linux_sys_uselib,
osf1_sys_statfs, sunos_sys_statfs, sunos32_sys_statfs,
ultrix_sys_statfs, do_sys_mount, fss_create_files (3 of 4),
adosfs_mount, cd9660_mount, coda_ioctl, coda_mount, ext2fs_mount,
ffs_mount, filecore_mount, hfs_mount, lfs_mount, msdosfs_mount,
ntfs_mount, sysvbfs_mount, udf_mount, union_mount, sys_chflags,
sys_lchflags, sys_chmod, sys_lchmod, sys_chown, sys_lchown,
sys___posix_chown, sys___posix_lchown, sys_link, do_sys_pstatvfs,
sys_quotactl, sys_revoke, sys_truncate, do_sys_utimes, sys_extattrctl,
sys_extattr_set_file, sys_extattr_set_link, sys_extattr_get_file,
sys_extattr_get_link, sys_extattr_delete_file,
sys_extattr_delete_link, sys_extattr_list_file, sys_extattr_list_link,
sys_setxattr, sys_lsetxattr, sys_getxattr, sys_lgetxattr,
sys_listxattr, sys_llistxattr, sys_removexattr, sys_lremovexattr
All have been scrutinized (several times, in fact) and compile-tested,
but not all have been explicitly tested in action.
XXX: While I haven't (intentionally) changed the use or nonuse of
XXX: TRYEMULROOT in any of these places, I'm not convinced all the
XXX: uses are correct; an audit might be desirable.
2009-06-29 05:08:15 +00:00
tsutsui
296279ad74
pad -> PAD, to follow src/sys/kern/makesyscalls.sh rev 1.87.
2009-06-28 09:50:57 +00:00
njoly
de2e7a9c8e
sched_getaffinity(2) update:
...
- dynamically calculate the cpu mask size,
- return it upon success,
- fix generated cpu mask.
2009-06-23 13:18:59 +00:00
njoly
9edecd8c07
In linux_sys_sched_getaffinity(), do not leak memory on error.
2009-06-18 20:36:28 +00:00
njoly
3152f584bd
Regen for sendmsg/recvmsg definitions update.
2009-06-17 14:20:08 +00:00
njoly
f50c7f6eb2
Add a new linux_msghdr structure, as its size differs on 64bit archs.
...
Do the needed conversions in sendmsg/recvmsg syscalls, and adjust
their definitions accordingly.
2009-06-17 14:18:51 +00:00
njoly
cb90fdddc4
Add LINUX_CMSG_{SPACE,LEN} macros. Use then when calculating the
...
msg_controllen size, when converting the control message buffer from
native (previous version was missing the linux_cmsghdr size).
2009-06-16 23:17:02 +00:00
njoly
83618982c2
For linux cmsg header copyout, use the linux structure size, not the
...
native one.
2009-06-16 22:56:49 +00:00
njoly
405a83b592
Make compat linux sendmsg/recvmsg output msghdr and control messages
...
buffers with ktrace(1), just like the native functions.
2009-06-16 15:56:10 +00:00
njoly
21489570f0
Make netbsd32 sendmsg(2), do not use an uninitialised value for
...
fetching iovec structures.
While here, sync recvmsg(2) to avoid some unneeded casts.
2009-06-15 22:59:53 +00:00
njoly
198ddcca4b
In sendmsg(2), do copy the msghdr structure before trying to use it.
2009-06-11 19:57:58 +00:00
njoly
add168f4d8
Fix defines against multiple inclusion protection (s/I386/AMD64).
2009-06-08 14:42:10 +00:00
njoly
e1a778e452
Regen for rt_queueinfo addition.
2009-06-08 13:41:17 +00:00
njoly
9c8407cd8f
Add rt_queueinfo(2) support.
2009-06-08 13:34:23 +00:00
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
b0b09eac89
Regen for fstatfs.
2009-06-05 16:46:52 +00:00
njoly
ca080002aa
Add fstatfs syscall.
2009-06-05 16:45:33 +00:00
njoly
4c8893bb2f
Regen for stat/lstat/fstat syscalls.
2009-06-04 18:01:02 +00:00
njoly
33fdfb68ef
Add stat/lstat/fstat syscalls.
2009-06-04 17:59:30 +00:00
njoly
ad76703a87
Cleanup (no functional changes).
...
Kill some unneeded variables and return stattement.
Rename linux32_from_stat() to better bsd_to_linux32_stat64().
Fix some types.
2009-06-03 15:13:26 +00:00
njoly
5a5f8e093f
Fix inverted lst_ino/__lst_ino assignment in linux32_from_stat().
2009-06-03 14:17:18 +00:00
pooka
b89c189be7
Declare extern syscallnames in a header.
2009-06-02 23:21:37 +00:00
njoly
49c8536f1f
Regen for siggetmask/sigsetmask.
2009-06-02 16:55:16 +00:00
njoly
9a0f18cccc
Add siggetmask/sigsetmask syscalls.
2009-06-02 16:54:39 +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
05d61dcbbd
Make getdirentries set a correct block read position for basep
...
argument.
2009-05-29 09:32:41 +00:00
njoly
c2d83ad5c5
Redo previous, by simply updating basep earlier, before label.
2009-05-28 15:21:26 +00:00
njoly
2a614502ab
Make getdirentries(2) correctly fail with EINVAL for an invalid file
...
descriptor (not for a directory), by not updating basep syscall
argument on error.
2009-05-28 14:48:20 +00:00
njoly
a88fd78513
Use correct linux_clock_t type for _stime, not native clock_t.
2009-05-27 12:20:37 +00:00
ad
d991fcb3b6
More changes to improve kern_descrip.c.
...
- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
It was only being used to synchronize close, and in any case we needed
to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
that we can eliminate the membar_consumer() call in fd_getfile(). This is
mostly syntactic sugar; the main functional change is that fd_nfiles now
lives alongside the open file array.
Some measurements with libmicro:
- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.
2009-05-24 21:41:25 +00:00
njoly
eb51be4e79
Adjust compat osf1 to recent pad -> PAD change.
2009-05-18 12:39:02 +00:00
pooka
bb7d994504
pad -> PAD. Fixes build problem reported by Paul Goyette in private email.
2009-05-17 05:57:01 +00:00
pooka
ed09069bac
regen: pad -> PAD
2009-05-17 05:55:42 +00:00
pooka
5b4deca5cb
pad -> PAD
2009-05-17 05:54:22 +00:00
nakayama
a7ae1082e0
Follow pad to PAD change.
2009-05-16 17:45:23 +00:00
pooka
dfb36ab4e4
pad -> PAD
2009-05-15 16:59:07 +00:00
cegger
cb0f831638
use device_xname()
2009-05-11 21:34:55 +00:00
cegger
2dc0e43978
use device_xname()
2009-05-11 20:53:47 +00:00
ad
6977231a34
G/C reference to LK_CANRECURSE.
2009-05-06 22:38:31 +00:00
njoly
692b478fd5
Add IPC_64 support to all semctl(2) commands, following corresponding
...
compat linux change.
2009-04-27 13:24:18 +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
ad
4d8f47ae2f
cpuctl:
...
- Add interrupt shielding (direct hardware interrupts away from the
specified CPUs). Not documented just yet but will be soon.
- Redo /dev/cpu time_t compat so no kernel changes are needed.
x86:
- Make intr_establish, intr_disestablish safe to use when !cold.
- Distribute hardware interrupts among the CPUs, instead of directing
everything to the boot CPU.
- Add MD code for interrupt sheilding. This works in most cases but there is
a bug where delivery is not accepted by an LAPIC after redistribution. It
also needs re-balancing to make things fair after interrupts are turned
back on for a CPU.
2009-04-19 14:11:36 +00:00
skrll
66aaa2e514
Typo in comment.
2009-04-16 07:42:28 +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
ad
c6367674d6
Add fileops::fo_drain(), to be called from fd_close() when there is more
...
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.
Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.
thr0 accept(fd, ...)
thr1 close(fd)
2009-04-04 10:12:51 +00:00
christos
802d07dbca
cast segsz to int.
2009-04-01 21:15:23 +00:00
dogcow
36ffab86d9
fix what looks like a mechanical stuffup in the timeval -> timespec conversion.
2009-04-01 03:06:06 +00:00
cegger
456f7ba595
buildfix: NEW_VMCMD(2 -> NEW_VMCMD2(
2009-03-31 06:03:31 +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
gmcgarry
65b9855fd5
Replace gcc initialisers with c99 designated initialisers.
2009-03-26 22:22:14 +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
35fb64746b
bcmp -> memcmp
2009-03-18 15:14:29 +00:00
cegger
df7f595ecd
Ansify function definitions w/o arguments. Generated with sed.
2009-03-18 10:22:21 +00:00
dyoung
a3bde60951
#include "opt_compat_netbsd.h" for COMPAT_20.
2009-03-17 00:08:10 +00:00
dyoung
1290eea0cb
Add #include "opt_compat_netbsd.h" for COMPAT_09.
2009-03-17 00:01:54 +00:00
dsl
7cc9af7d64
ANSIfy functions with function-pointer arguments
2009-03-16 23:11:09 +00:00
njoly
fd24f7c917
Regen for netbsd32_dev_t.
2009-03-16 20:49:16 +00:00
njoly
0f21bb4a22
Fix dev_t alignment, by not using the new 64bit value directly but
...
rather a 32bit aligned version (netbsd32_dev_t = netbsd32_uint64).
ok by cube@.
2009-03-16 20:48:13 +00:00
cegger
9fca5da616
ansify function definitions
2009-03-15 15:55:51 +00:00
cegger
7038d1e471
ansify function definition
2009-03-15 15:54:43 +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
dsl
454af1c0e8
Change about 4500 of the K&R function definitions to ANSI ones.
...
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
christos
7ef7e1b997
disable PTHREAD_CONCURRENCY until the bugs are fixed.
2009-03-06 14:00:40 +00:00
msaitoh
16ed711ed3
fix typo (s/stucture/structure/)
2009-03-05 01:21:57 +00:00
skrll
5ccc095a3e
Fix the posix_fadvise return value... finally.
...
Tested martin on sparc64/m68k and me on hppa.
2009-03-04 18:11:24 +00:00
ad
dd1969c253
PR kern/40730 any user can crash the system with KERN_SA
...
Disable SA. It can be re-enabled with sysctl -w kern.no_sa_support=0.
2009-03-02 22:11:28 +00:00
christos
4538aa34ee
Regen
2009-02-26 21:09:00 +00:00
christos
6d029d549a
fix kernel build with no options NTP
2009-02-26 21:08:48 +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
nakayama
c99ea852e4
- fix copyout size in CLOCKCTL_O?ADJTIME.
...
- add missing break in CLOCKCTL_NTP_ADJTIME.
2009-02-22 13:06: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
65488d267e
Add IPC_64 support for all shmctl(2) commands, and reduce diffs with
...
compat linux version.
2009-02-18 14:40:14 +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
apb
0cc72e51ac
Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
...
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
njoly
bc0bccb487
Regen for mincore(2).
2009-01-30 13:57:39 +00:00
njoly
8bbb521068
Add mincore syscall.
2009-01-30 13:55:51 +00:00
njoly
b5ae97a41a
Cleanup. Kill a few netbsd32_caddr_t in syscalls argument types.
2009-01-30 13:01:36 +00:00
njoly
73abc6838e
Revert the previous packed attribute fix. Instead make netbsd32_time_t
...
of type netbsd32_int64 which provides a 64-bit value with a 32-bit
alignment.
Suggested by dsl.
2009-01-28 00:43:04 +00:00
njoly
f01722c17f
Make netbsd32_timespec/netbsd32_timeval structures packed. This fix an
...
alignment problem between 64-bit kernel and 32-bit userland versions,
which ended in different structure sizes.
2009-01-28 00:02:39 +00:00
njoly
3e5b27ff8e
Make all fstat(2) compat syscalls consistently use do_sys_fstat(),
...
instead of fd_getfile()/fd_putfile() dance.
ok by christos.
2009-01-26 13:00:04 +00:00
christos
f7636e0eb3
fix casts.
2009-01-25 01:22:42 +00:00
cegger
e6ae80b89d
buildfix: re-adapt to minor() returning a 32bit value again.
2009-01-22 16:10:19 +00:00
christos
d3baa5ffd2
compile into nothing if not compat 50.
2009-01-21 16:12:20 +00:00
tron
1c6c1db2da
Revert accidental of some rogue changes which broke the build.
2009-01-21 10:01:42 +00:00
tron
31faff7381
Include "bsd.own.mk" to get the definition of "NETBSDSRCDIR" via
...
"/etc/mk.conf". This fixes manual use of "make cleandir".
2009-01-20 22:49:29 +00:00
christos
5bd9ba9f86
add some debugging.
2009-01-20 20:47:33 +00:00
njoly
8ed9e9eb51
Regen for personality(2) addition.
2009-01-20 12:02:09 +00:00
njoly
b22c955a54
Add basic support for linux32 personality(2) syscall.
2009-01-20 12:00:58 +00:00
njoly
31357439c7
Fix typo in compat ioctl name.
2009-01-19 23:01:42 +00:00
christos
143e6033a9
Provide compatibility for pre-christos-time_t sysv sysctls.
2009-01-19 19:39:41 +00:00
christos
d610baec20
provide compat_50
2009-01-19 17:39:02 +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
christos
14ba6c67a5
Provide compatibility to the old timeval SCM_TIMESTAMP messages.
2009-01-19 02:27:57 +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
he
994737a3f6
Regenerate files after updating syscalls.master for compat_ultrix:
...
Adapt to the state after the recent time_t change.
Type changes:
timeval -> timeval50
itimerval -> itimerval50
rusage -> rusage50
and use of the compat_50 calls where appropriate.
Untested, but at least it builds.
Discussed with christos@
2009-01-17 15:50:12 +00:00
he
92c667768c
Adapt to the state after the recent time_t change.
...
Type changes:
timeval -> timeval50
itimerval -> itimerval50
rusage -> rusage50
and use of the compat_50 calls where appropriate.
Untested, but at least it builds.
Discussed with christos@
2009-01-17 15:48:06 +00:00
njoly
8ff5603c09
Regen for compat 50 update.
2009-01-16 13:12:35 +00:00
njoly
9554a2932f
Update some syscalls that now needs compat50 timeval structure.
2009-01-16 13:10:47 +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
christos
5a4537eb47
Emulate a couple more ioctls. Thanks to Matthias Drochner for pointing them out.
2009-01-15 20:32:59 +00:00
christos
ff90a0090a
compat glue.
2009-01-15 18:19:23 +00:00
njoly
39f5db2b54
In rusage_to_rusage50() function, fix memcpy size to include last
...
struct member (ru_nivcsw) which was missing.
ok by christos.
2009-01-14 22:50:12 +00:00
pooka
09ba2d6689
Regen to prove I didn't screw up the conversion: purely RCSID changes.
2009-01-13 22:33:11 +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
21eb48bd8e
regen
2009-01-13 22:16:11 +00:00
pooka
b9e6895bec
UNIMPL police (two mount syscalls with the same signature?!?)
2009-01-13 22:15:42 +00:00
pooka
5514331a78
regen after unimpl police to get comments right
2009-01-13 22:11:32 +00:00
pooka
7e02aa9486
UNIMPL
2009-01-13 22:10:58 +00:00
pooka
ef4e11410c
regen
2009-01-13 22:08:59 +00:00
pooka
4180a41378
UNIMPL police
2009-01-13 22:08:30 +00:00
pooka
c2f114970c
regen
2009-01-13 22:03:39 +00:00
pooka
70917e36da
UNIMPL police
2009-01-13 22:03:12 +00:00
pooka
c3c68d936d
regen: unimpl police
2009-01-13 22:00:48 +00:00
pooka
41d2f63e9a
UNIMPL police
2009-01-13 21:57:55 +00:00
pooka
0b40ab56ee
regen: UNIMPL police
2009-01-13 21:49:16 +00:00
pooka
c3a8bfb54e
UNIMPL police: remove pseudo-prototypes
2009-01-13 21:48:35 +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
0033abb5fc
regen
2009-01-13 21:07:33 +00:00
pooka
a0ece03c2d
Make one UNIMPL consistent with the rest: remove signature.
2009-01-13 21:06:47 +00:00
martin
90daabb504
Add a few missing includes, so the ifdefs work as expected.
2009-01-13 20:47:47 +00:00
pooka
bb5f9edebf
regen for #include "opt_compat_netbsd.h"
2009-01-13 19:45:38 +00:00
rtr
f0916c9e83
use do_sys_mknod() instead of sys_mknod() to make this compile again.
...
ok'd by martin@
2009-01-13 11:35:24 +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
mhitch
6ebe2c3a6d
Compat a.out stat structures also need to use u_int32_t dev_t.
2009-01-11 22:54:16 +00:00
christos
91306aae6f
fix lutimes.
2009-01-11 21:23:22 +00:00
tsutsui
9d90ca88ae
Compat a.out stat structures should use compat struct timespec50.
...
Noticed by mhitch@.
2009-01-11 21:12:04 +00:00
christos
52ef6203ff
*utimes should allow NULL tvp.
2009-01-11 20:46:53 +00:00
rumble
40019d9470
regen.
2009-01-11 20:00:14 +00:00
rumble
5e7d8a6495
Fix time_t change fallout.
2009-01-11 20:00:06 +00:00
nakayama
b964c01bff
Regen for following christos-time_t merge.
2009-01-11 13:16:34 +00:00
nakayama
60d7add52e
Follow christos-time_t merge.
2009-01-11 13:14:14 +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
tsutsui
a37c14b49c
Regen from syscalls.master rev 1.72:
...
> Update for compat_50 stuff. (compile test only)
2009-01-11 12:45:46 +00:00
tsutsui
f318c9b526
Update for compat_50 stuff. (compile test only)
2009-01-11 12:44:47 +00:00
tsutsui
41e9d73c06
Regen from syscalls.master rev 1.31:
...
> Update for compat_50 stuff. (compile test only)
2009-01-11 12:27:23 +00:00
tsutsui
2f67cbfacc
Update for compat_50 stuff. (compile test only)
2009-01-11 12:25:03 +00:00
tsutsui
348730301a
<sys/syscallargs.h> requires <sys/sched.h> for cpuset_t.
2009-01-11 12:19:14 +00:00
cegger
378bd0b618
make this compile
2009-01-11 10:47:37 +00:00
christos
50728e7823
merge christos-time_t
2009-01-11 02:57:17 +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
njoly
f22af7d53f
s/syscallcarg/syscallarg/ in comments.
2008-12-29 14:33:40 +00:00
cegger
9b87d582bd
kill MALLOC and FREE macros.
2008-12-17 20:51:31 +00:00
njoly
6b9fe0233d
Regen for clock_nanosleep.
2008-12-12 23:38:13 +00:00
njoly
99688b74d2
Add clock_nanosleep syscall.
2008-12-12 23:36:18 +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
njoly
bd398db254
Remove unused timeval_to_clock_t function, superseeded by CONVTCK
...
macro.
2008-12-08 11:52:35 +00:00
njoly
adf5b0a542
Regen for netbsd32_caddr_t removal.
2008-12-06 23:15:09 +00:00
njoly
e7377ec502
Cleanup; kill netbsd32_caddr_t use.
2008-12-06 23:14:03 +00:00
njoly
9321a67e19
Small setres{uid,gid} cleanup; there is no need to use a specific
...
handling for -1 uid values.
2008-12-06 23:01:32 +00:00
njoly
14e966b9e0
Regen for getres{uid,gid} syscalls.
2008-12-05 23:31:54 +00:00
njoly
533a52241a
Add getres{uid,gid} syscalls.
2008-12-05 23:30:19 +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
96d7b57e0f
Regen for getdirentries fix.
2008-12-02 13:45:40 +00:00
njoly
488fb8373c
Fix getdirentries(2) by not calling compat_43_sys_getdirentries, but
...
letting do its own job instead (native and osf1 dirent structure have
different member number and types).
2008-12-02 13:45:02 +00:00
njoly
d42a74a9ba
Regen for sched_get_priority_{min,max}.
2008-12-01 14:19:45 +00:00
njoly
aba771042c
Add sched_get_priority_{min,max} syscalls.
2008-12-01 14:18:44 +00:00
ad
1a85128fea
COMPAT_ULTRIX does not work on vax because there are no hooks, but make
...
it compile anyway.
2008-11-24 11:19:53 +00:00
njoly
6d6fb02ffd
Regen for getpgid.
2008-11-24 00:26:34 +00:00
njoly
010c8bc9c7
Add getpgid, needed for Tru64 4.0g ksh.
2008-11-24 00:25:30 +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
mrg
3b1d48844e
regenerate
2008-11-22 23:14:01 +00:00
mrg
672c98ee5a
implement netbsd32__sched_setparam(), netbsd32__sched_getparam(),
...
netbsd32__sched_setaffinity() and netbsd32__sched_getaffinity().
2008-11-22 23:13:38 +00:00
cegger
53d5928d58
make this compile
2008-11-21 20:53:28 +00:00