Commit Graph

3983 Commits

Author SHA1 Message Date
ad 3fc1741f68 <dsl> I suspect my set of test build kernels is longer than ad's :-)
tsk!
2007-07-14 17:11:28 +00:00
dsl 0bfa8b4ee7 Adapt for sys_mount() becoming compat_40_sys_mount(), 2007-07-14 15:47:26 +00:00
dsl df57a27c09 Change calls from sys_mount() to compat_40_sys_mount() 2007-07-14 15:45:48 +00:00
dsl 6b182ed9a7 Put the stackgap code under OPT_SYSTRACE. 2007-07-13 21:04:29 +00:00
dsl 12da34644a Update generated files. 2007-07-13 20:49:07 +00:00
dsl f02523fb6e Remove all the syscall stubs that were only there to get files lookup
up in the alternate path.
2007-07-13 20:48:39 +00:00
dsl cfc71184cd Make thsi compile again after the recent changes to select/poll.
It really should be doing things properly though.
2007-07-13 20:46:04 +00:00
dsl 758f9f5cde Change compat mount code to pass do_sys_mount() kernel resident buffers.
Possibly the standard nfs code needs teaching how to set the length and
address family in order to support non-netbsd sockaddr.
There are now no active stackgap() calls in the compat tree.
2007-07-12 19:41:57 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
pooka b6caa3be1b fix pasto: sigframe.sf_sc is of type linux_sigcontext 2007-07-08 09:41:00 +00:00
dsl 1cb4e9208d Rip out the support for /dev/ptmx, the netbsd ptm driver will now DTRT.
It probably ought to have minor 2 (ie do the chown/chmod/revoke on open)
because the SVR4 programs dont know anything about revoke.
2007-07-05 19:19:24 +00:00
dsl 513b927545 It seems that min(16,16) isn't a compile time constant.
So don't bother limiting the local arrays to NGROUPS, just use 16.
2007-07-04 21:59:16 +00:00
dsl 8d3eb2476f Comment out the code that uses the stackgap to issue the WSDISPLAYIO_PUTCMAP
ioctl in order to change the display colours.
Changing the code to not need the stackgap is rather pervasive, and it isn't
at all clear this is useful effort given the suspected bitrottedness
of compat darwin.
2007-07-01 20:14:17 +00:00
dsl 813e1c7584 Fix long-term breakage in the definition of 'control' data for linux.
cmsg->cmsg_len is 'size_t' not 'socklen_t' - so it is 8 bytes on 64bit
platforms instead of 4.  There is also never padding after the header.
Redo linux sendmsg() so that it stands a chance of getting it right.
Redo linux recvmsg() so that it process control data directly from the mbuf
  list.  Allowing it to hack the data without using the stackgap.
2007-07-01 18:45:36 +00:00
dsl bf215415ab Fix LINUX_HDIO_GET_IDENTITY so that it returns the entire 512 byte buffer.
Rely on the code in dev/ata/wd.c doing a relay for the short read needed
for LINUX_HDIO_OBSOLETE_IDENTITY.
2007-07-01 09:54:16 +00:00
dsl 168c1071b4 Call fp->f_ops->fo_ioctl() directly (not by sys_ioctl() for LINUX_VT_GETMODE
and LINUX_VT_SETMODE.  One fewer use of the stackgap.
2007-06-30 22:54:33 +00:00
dsl a1188737bf Use the new CDIOCREADSUBCHANNEL_BUF and CDIOREADTOCENTRIES_BUF ioctls to
avoid copying into the stackgap.
2007-06-30 22:18:17 +00:00
dsl 53e0243f27 Changes to sompat socket function to avoid the dreaded stackgap. 2007-06-30 15:31:49 +00:00
dsl 4be2514b94 Match updates to kauth_cred_set/getgroups. 2007-06-30 13:34:19 +00:00
dsl a9e905f23c Refactor this to use the new do_sys_xxx() functions from uipc_syscalls.c
so that it isn't necessary to copy data to/from the stackgap.
Given the nature of the code in this file, it is now probably slightly
  more broken than previously. but nothing serious should be worse!
2007-06-24 18:09:52 +00:00
dsl a150e6e4f5 Use do_sys_recvmsg(), so_sys_accept(), do_sys_getsockname() and do_sys_senmsg()
in order to avoid the stackgap (etc).
Note that since changing the darwin socket address is simply a matter of
  translating the address family and adding sa_len, it can easily be done
  on the mbuf resident address before/after copying to/from userspace.
Simplify the convertion of AF_LOCAL addresses by usingthe user-supplied
  buffer length instead of dowing an unbounded strlen().
Untested - did this work before?
2007-06-24 18:07:34 +00:00
dsl 0bb6928543 Update to call do_sys_recv() instead of recvit(). 2007-06-24 18:01:48 +00:00
dsl 6d0a5fcf1a Simplify code to get/set 16bit group lists.
Cloned from ibcs2 copy (maybe I should have worked out somewhere to put this
as common code...)
2007-06-23 15:27:23 +00:00
dsl a5b4569076 Read and write the ldt without using the stackgap. 2007-06-23 15:26:16 +00:00
dsl e773713d08 Comment out support for FREEBSD_PT_READ_U and FREEBSD_PT_WRITE_U.
It all looks like a rather broken hack.
If nothing else it accesses userspace without copyin/out.
2007-06-23 15:24:26 +00:00
dsl 23ec3e8012 Use the functions in kern_auth.c for setting/getting group lists.
All we have to do here is copy the 16bit to 32bit group numbers across.
2007-06-23 09:11:12 +00:00
dsl 049a22a9db These now need sys/prot.h 2007-06-23 09:09:56 +00:00
dsl 4147586696 There is no need for the stackgap in sys_bind() and sys_connect().
If sa_len is zero, believing the size passed to bind/connect seems
better than trying to strlen somthing that might run off the mapped kma.
Verify the address family against the array size before indexing.
2007-06-17 21:30:11 +00:00
dsl cf80941288 Kill that stackgap...
Use vn_stat() and dostatvfs() on the vnode the code always has got - even
though it used compat versions of the other syscalls.
2007-06-17 20:43:10 +00:00
dsl 95206f19b1 No need for stackgap for darwin_sys_sigaction and sigprocmask.
XXX: it doesn't look right that the new and old 'sigaction' parameters
have different types.
2007-06-17 20:15:19 +00:00
dsl 6111df536a Remove stackgap use:
osf1_sys_select() calls selcommon().
osf1_sys_readv() and writev() read the iov into kernel memory then call
  do_filereadv/writev().
KNF.
2007-06-17 19:50:01 +00:00
dsl 4f7a91fae3 Do the sysv ipc calls without the stackgap.
Only the SET and STAT operations have a buffer arg - so don't xlat
the buffer for the other commands.
2007-06-17 18:54:20 +00:00
dsl c99470165c Do the sysv ipc calls without the stackgap.
Only the SET and STAT operations have a buffer arg - so don't xlat
onbe for teh other commands.
2007-06-17 18:32:14 +00:00
dsl c271f319e5 Do the sysv ipc calls without the stackgap. 2007-06-17 18:17:46 +00:00
dsl 8ef23ff995 Directly call the relevant system support routines instead of going via
the compat_10 and compat_14 functions - makes the code neater and, removes
many data copies and also removes the stackgap use.
Also (indirectly) fixes some code paths that fotgot to do copyin/out.
2007-06-17 16:32:51 +00:00
dsl 353f1bdbac Call semctl1() directly, not via stackgap and compat_14_sys___semctl(). 2007-06-17 10:24:21 +00:00
dsl 82cfad02f8 Expose semid_ds14_to_native() to otherparts of the system.
Don't leak kernel stack back to userspace.
2007-06-17 10:23:27 +00:00
dsl 879c84a74d The code to directly call sigaction1() and sigaltstack1() is much shorter
than the mess required to call the compat_43_xxx functions.
2007-06-16 22:31:08 +00:00
dsl ec918d6dc6 Modify the (recently added) compat_sigaltstack() #define to take the
values of the SS_ONSTACK and SS_DISABLE constants.
Use it to shorten the source files when this action is replicated.
Actually, given the monstrous complexity of sigaltstack1() there is
probably a much better way to do this...
2007-06-16 20:04:27 +00:00
dsl 5977ce1bd5 Remove a spare 'timeval' structure - makes this version of this function
match some of the other copies lurking in the world of compat.
2007-06-16 19:55:26 +00:00
dsl 8e418a4b13 Delete stuff in comment about use of stackgap. 2007-06-16 19:54:02 +00:00
christos 46502fd059 regen 2007-06-13 20:57:56 +00:00
christos 89e2b251a2 Get ready for NPTL but don't turn it on as of yet. 2007-06-13 20:57:33 +00:00
christos 344a5bd80c regen. 2007-06-13 14:31:30 +00:00
christos 76af51a354 Add futex. 2007-06-13 14:31:07 +00:00
christos 564f9b3b2f cleanup some bitrot; from Matthew Orgass 2007-06-13 02:11:40 +00:00
joerg 5ccf1c578a Add a new ioctl AUDIO_GETBUFINFO. It works like AUDIO_GETINFO, but
doesn't obtain the ports, gain and balance related parameters.
Those generally require reading from the hardware and therefore are much
more expensive to obtain. Modify OSS emulation to use the new ioctl
where possible.

This reduces CPU usage of mplayer during mp3 playback with my Thinkpad
from 20% to < 1% and from 50% to 20% during Xvid playback.

Review and comments from jmcneill@
2007-06-11 13:05:46 +00:00
ad c741f88d56 Acquire proclist_mutex before sending signals. XXX irix emul needs a bit
of work.
2007-06-09 21:25:49 +00:00
rjs ef2a6ab865 Wrap ktrace calls with #ifdef KTRACE. 2007-06-06 17:08:27 +00:00
dsl 3e4175ccc9 Fix select() without a timeout parameter. 2007-06-04 21:02:22 +00:00