Commit Graph

4008 Commits

Author SHA1 Message Date
dyoung f59a11881a Constify: LLADDR() -> CLLADDR(). 2007-08-29 22:33:42 +00:00
dyoung f004b71d98 Constify. 2007-08-26 22:36:35 +00:00
dyoung e6fc91327f Use satosdl(). 2007-08-26 22:33:25 +00:00
martin 4418b58c3f Remove all ioctls from the conversion list that are explicitly defined
to use struct oifreq - the magic size changing makes them fail.
2007-08-20 19:19:33 +00:00
martin 2adca4d368 Sigh - revert previous. Seems we can't avoid the big list, so fill it.
Now both "ifconfig ... create" and "pppoectl -d" work again with old
userland.
2007-08-20 17:48:17 +00:00
martin 1bcc2150d3 Put back the previous hack to make compat_cvtcmd() work for all the ioctls
that use struct ifreq which have not been explicitly versioned.
If someone feels like fixing it with a list aproach, I think below is
a complete list - the one used in the previous version missed a lot of them.

BIOCGETIF
BIOCSETIF
GREDSOCK
GREGADDRD
GREGADDRS
GREGPROTO
GRESADDRD
GRESADDRS
GRESPROTO
GRESSOCK
SIOCADDMULTI
SIOCDELMULTI
SIOCDIFADDR
SIOCDIFADDR_IN6
SIOCDIFPHYADDR
SIOCGDEFIFACE_IN6
SIOCGIFADDR
SIOCGIFADDR_IN6
SIOCGIFAFLAG_IN6
SIOCGIFALIFETIME_IN6
SIOCGIFBRDADDR
SIOCGIFDLT
SIOCGIFDSTADDR
SIOCGIFDSTADDR_IN6
SIOCGIFFLAGS
SIOCGIFGENERIC
SIOCGIFMETRIC
SIOCGIFMTU
SIOCGIFNETMASK
SIOCGIFNETMASK_IN6
SIOCGIFPDSTADDR
SIOCGIFPDSTADDR_IN6
SIOCGIFPSRCADDR
SIOCGIFPSRCADDR_IN6
SIOCGIFSTAT_ICMP6
SIOCGIFSTAT_IN6
SIOCGPVCSIF
SIOCGVH
SIOCIFCREATE
SIOCIFDESTROY
SIOCSDEFIFACE_IN6
SIOCSIFADDR
SIOCSIFADDR_IN6
SIOCSIFALIFETIME_IN6
SIOCSIFBRDADDR
SIOCSIFDSTADDR
SIOCSIFDSTADDR_IN6
SIOCSIFFLAGS
SIOCSIFGENERIC
SIOCSIFMEDIA
SIOCSIFMETRIC
SIOCSIFMTU
SIOCSIFNETMASK
SIOCSIFNETMASK_IN6
SIOCSNDFLUSH_IN6
SIOCSPFXFLUSH_IN6
SIOCSPVCSIF
SIOCSRTRFLUSH_IN6
SIOCSVH
TAPGIFNAME
2007-08-20 16:52:59 +00:00
skd d4509b0376 Clean up net compat ioctls, and clean up handling of wireless ioctls. 2007-08-20 04:49:40 +00:00
ad d3675885a8 Regen. 2007-08-15 12:09:12 +00:00
ad 63c4506184 Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
2007-08-15 12:07:23 +00:00
ad 06f7ccf01d Regen. 2007-08-07 19:01:23 +00:00
ad 830ab6bb3c - Fix a bug with _lwp_park() where if the computed wakeup time was under
1 microsecond into the future, the thread could enter an untimed sleep.
- Change the signature of _lwp_park() to accept an lwpid_t and second
  hint pointer, but do so in a way that remains compatible with older
  pthread libraries. This can be used to wake another thread before the
  calling thread goes asleep, saving at least one syscall + involuntary
  context switch. This turns out to be a fairly large win on the condvar
  benchmarks that I have tried.
- Mark some more syscalls MP safe.
2007-08-07 19:00:42 +00:00
xtraeme bd0460e614 <sys/proc.h> is needed to get nprocs... fixes the build on amd64. 2007-07-21 23:39:46 +00:00
he 2eb0397ad6 Fix three identical typos in the previous (fs_fstypename -> f_fstypename). 2007-07-20 13:48:24 +00:00
dsl f3ade04dc0 include sys/cdefs.h 2007-07-19 22:17:23 +00:00
briggs 883152ac0b Fix typo: mnfromname -> mntfromname. 2007-07-18 13:53:34 +00:00
christos f25f73fe50 include <compat/sys/mount.h> for MFSNAMELEN 2007-07-17 20:54:45 +00:00
christos 9558d8b2f1 include <compat/sys/mount.h> for MFSNAMELEN. 2007-07-17 20:53:49 +00:00
christos 289334c878 include <compat/sys/mount.h> for MFSNAMELEN 2007-07-17 20:51:15 +00:00
christos 35cb28e6eb kill MFSNAMELEN 2007-07-17 20:41:23 +00:00
christos 18754a7640 kill silly constants. 2007-07-17 20:39:42 +00:00
christos ecb7144e3a include <compat/sys/mount.h> MFSNAMELEN 2007-07-17 20:36:11 +00:00
christos 66c05241ca include compat/sys/mount.h for MFSNAMELEN, although not used yet. 2007-07-17 20:34:40 +00:00
christos 1b3668b8ef use the compat MFSNAMELEN 2007-07-17 20:33:17 +00:00
christos 515c243672 MFSNAMELEN only belongs in compat. 2007-07-17 20:31:03 +00:00
joerg e4fc1154a4 Add native mremap system call based on the UVM implementation for
Linux compat. Add code to enforce alignment of the new location.
Special thanks to wizd for helping with the man page.
2007-07-17 17:42:07 +00:00
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