Commit Graph

126 Commits

Author SHA1 Message Date
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
cube
632ece3eaf Introduce a new member to struct emul, e_startlwp, to be used by
sys__lwp_create.  It allows using the said syscall under COMPAT_NETBSD32.

The libpthread regression tests now pass on amd64 and sparc64.
2007-02-19 15:10:02 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf
eda05c6413 Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
2007-01-29 01:52:43 +00:00
elad
b31e9c44cf Consistent usage of KAUTH_GENERIC_ISSUSER. 2007-01-04 18:27:36 +00:00
martin
dda2fa3e76 Make it compile with -Wextra 2006-10-16 20:18:55 +00:00
martin
14e2e5cf6a Missing initializer 2006-10-16 20:12:38 +00:00
yamt
90cb722c5c svr4_32_sys_sysconfig: fix a compilation failure after yamt-pdpolicy merge.
reported by Kurt Schreiner on current-users@.
2006-09-17 08:41:31 +00:00
hannken
5bc42a01ba Fix typo: slim -> &slim. 2006-07-28 13:02:56 +00:00
hannken
055db86c86 Remove 'unused variable p'. 2006-07-28 13:02:21 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
pavel
a78062784c Use the new socket call for Linux and SVR4, because those systems (at
least Linux 2.4.31, Irix 6.5.20 and Solaris 10) use EAFNOSUPPORT.

Only the Linux emulation has been tested.

XXX somebody should audit the other emulations...
2006-06-27 09:09:40 +00:00
mrg
e2eb31d3a3 version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
2006-06-26 21:23:56 +00:00
he
ab1ad64ac0 Make this file compile again by using the appropriate types, casts
and functions.
2006-06-14 14:18:44 +00:00
christos
d5ba7564d8 stack police: don't allocate statvfs on the stack. 2006-06-09 23:24:24 +00:00
drochner
21166bafa5 regen 2006-05-29 09:46:54 +00:00
drochner
9575ca7cfd Remove emulation of ntp_gettime. In preparation for "timecounters" we
will change "struct ntptimeval", so some translation would be necessary.
ntp_gettine is considered dispensable, the only userland program known
to use it is "ntptime".
2006-05-29 09:44:51 +00:00
christos
57f1eb7d75 XXX: GCC uninitialized 2006-05-20 22:15:20 +00:00
elad
874fef3711 integrate kauth. 2006-05-14 21:19:33 +00:00
mrg
43463a5acc cast to (socklen_t *) where appropriate. 2006-05-11 01:01:13 +00:00
christos
0185b5a197 remove dup decl 2006-04-02 06:45:16 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
perry
0f0296d88a Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:45:08 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos
ca3a193432 factor out some of the osockaddr, omsghdr code. 2005-09-24 15:51:03 +00:00
christos
758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
christos
c0ee8a4184 Fix systeminfo.
1. return length is the string length even if the string would not fit.
2. add SI_ISALIST
3. on 32 bit emulation, don't return sparc64 as the arch!
2005-07-28 03:50:52 +00:00
christos
4d0656f353 include the _32 flavor of the machdep file too. 2005-07-10 00:56:19 +00:00
christos
a7c4860a95 fix shadowed variable 2005-05-31 00:43:17 +00:00
christos
a5fb891bb9 PR/29696: Joel Carnat: NetBSD freezes when accessing smbfs mounted FS with
firefox/linux due to compat getdents() call assumption that all filesystems
support cookies.
2005-04-19 19:00:25 +00:00
fvdl
c487efe4a7 Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.
2005-03-26 05:12:34 +00:00
perry
77f2a006d0 regen 2005-02-26 23:58:19 +00:00
perry
ed10d3c508 make this rebuild generated files by default 2005-02-26 23:50:14 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
christos
31c81b28f5 Cloning cleanup:
1. make fileops const
2. add 2 new negative errno's to `officially' support the cloning hack:
    - EDUPFD (used to overload ENODEV)
    - EMOVEFD (used to overload ENXIO)
3. Created an fdclone() function to encapsulate the operations needed for
   EMOVEFD, and made all cloners use it.
4. Centralize the local noop/badop fileops functions to:
   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat
2004-11-30 04:25:43 +00:00
david
d7d15131bb Bounds check syscall arguments where appropriate 2004-10-27 19:29:57 +00:00
skrll
f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
jdolecek
f83c14f534 only include emulation syscallnames with SYSCALL_DEBUG, it's not used otherwise 2004-09-12 10:38:25 +00:00
hannken
fcd7f3df90 Fix statfs->statvfs fallout. 2004-04-22 14:32:09 +00:00
christos
924e775ac7 fix statvfs->statvfs1 fallout 2004-04-22 14:06:31 +00:00
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
dmcmahill
888e67edcc Fix the sysinfo(SI_HW_SERIAL, emulation so that we actually get the
hostid of the machine rather than always getting "0".  Tested with
hostid(1) from solaris-2.8 and with lmhostid (part of FlexLM) for solaris.
Approved by atatat@.
2004-04-19 02:55:40 +00:00
drochner
4f5b1431f9 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 15:01:16 +00:00
fvdl
d99705e941 Put back Emmanuel's sigfilter hooks, as decided by Core. 2003-12-20 19:01:29 +00:00
manu
b23b73b953 Introduce lwp_emuldata and the associated hooks. No hook is provided for the
exec case, as the emulation already has the ability to intercept that
with the e_proc_exec hook. It is the responsability of the emulation to
take appropriaye action about lwp_emuldata in e_proc_exec.

Patch reviewed by Christos.
2003-12-20 18:22:16 +00:00
dmcmahill
3bff1bb631 fix style. Thanks Simon! 2003-12-07 02:01:25 +00:00
dmcmahill
a243add09b regen after schedctl addition. 2003-12-07 01:50:10 +00:00
dmcmahill
82d69cf8b8 Add a dummy entry for syscall #206, schedctl, that simply returns zero.
This lets FlexLM clients run under compat_svr4_32 on sparc64.  Patch
checked by Matt Green.
2003-12-07 01:36:58 +00:00
jdolecek
0e253cf5f5 back the sigfilter emulation hook change off 2003-12-05 21:12:42 +00:00
atatat
13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00