Commit Graph

332 Commits

Author SHA1 Message Date
he 70fe9e01e8 This now needs <compat/sys/signal.h> to build. 2005-09-14 13:49:50 +00:00
christos 758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
christos 00a78ed413 Delete define for sunos_syscall_intern. 2005-07-12 22:45:11 +00:00
christos 25e2fae9e9 Add a sunos_machdep include file to deal with MD implementations of
sunos_syscall_intern.
2005-07-11 13:14:49 +00:00
christos dac018add9 More syscall_intern lossage. 2005-07-10 16:45:33 +00:00
christos 24d0f10c0f define sunos_syscall_intern now that sparc needs it. 2005-07-10 16:40:49 +00:00
tsutsui 189e121846 Fix shadow warnings. 2005-06-02 15:22:03 +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 84f4fbb117 make this rebuild generated files by default 2005-02-26 23:46:50 +00:00
perry a7f74206ba regen 2005-02-26 23:20:00 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
christos 0b71a2d5de Don't try to map a 0 size bss. 2005-01-30 23:59: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
pk c6c77837c9 sunos_ioctl(): acquire a reference to the file.
This also fixes a locking botch reported in PR#25738.
2004-06-01 10:27:39 +00:00
matt b1fee09f27 Constify sreq2breq 2004-04-25 06:25:52 +00:00
matt 22120ad628 Constify the speedtab arrays 2004-04-25 06:23:40 +00:00
matt 48011c94e7 Constify a few read-only arrays/variables. 2004-04-25 06:02:20 +00:00
hannken 754675a0e1 Make it compile again after statvfs import. 2004-04-22 10:18:03 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +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
jdolecek 0e253cf5f5 back the sigfilter emulation hook change off 2003-12-05 21:12:42 +00:00
manu 18e13eee35 Add a sigfilter emulation hook. It is used at the beginning of kpsignal2()
so that a specific emulation has the oportunity to filter out some signals.

if sigfilter returns 0, then no signal is sent by kpsignal2().

There is another place where signals can be generated: trapsignal. Since this
function is already an emulation hook, no call to the sigfilter hook was
introduced in trapsignal.

This is needed to emulate the softsignal feature in COMPAT_DARWIN (signals
sent as Mach exception messages)
2003-12-03 20:24:51 +00:00
thorpej 052ba0ec50 We have CVS; there is no reason to make .bak files when generating the
syscall tables.
2003-11-15 20:30:59 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
cl 944c9c43ab catch up with const sigset_t and const ksiginfo_t 2003-09-28 00:04:52 +00:00
simonb 550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
cl bf9728e0db SA_SIGINFO support for m68k (compat sunos) 2003-09-22 14:34:57 +00:00
chs 939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
christos 3b9c3c5aab - GC all the setup_stack functions
- add one for linux/i386
2003-08-08 18:57:01 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 9dc96360bb More changes for providing lwpid for ktrace (sparc GENERIC built) 2003-06-29 09:56:27 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
itojun 51110d0c20 use strlcpy
[compat/svr4_32 should have bound check for SVR4_32_AUX_ARGSIZ]
2003-05-16 14:36:30 +00:00
thorpej 24ab4adb9c Use PAGE_SIZE rather than NBPG. 2003-04-01 01:53:40 +00:00
dsl 60418b39b7 Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
2003-03-21 21:13:50 +00:00
pk 2931081a79 Make updating a file's reference and use count MP-safe. 2003-02-23 14:37:32 +00:00
atatat bede65472d Cull unused variables. Sigh.
PS - Cross compilers are cool.
2003-01-29 07:00:35 +00:00
atatat 59b8237f5e No need to pick a "default address" for mmap in compat code, since we
merely call sys_mmap() at the end anyway, and that will pick the
address for us, if it's needed.

Likewise for checking if /dev/zero is being mapped.
2003-01-28 21:57:42 +00:00
fvdl a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
thorpej d88bc9c3a2 Regen for correct RCS ID. 2003-01-18 23:36:48 +00:00
thorpej afdb47f3fb Regen: Merge the nathanw_sa branch. 2003-01-18 08:36:45 +00:00
thorpej fc54d21534 Merge the nathanw_sa branch. 2003-01-18 08:36:15 +00:00
wiz 617b132aac Spell output with two ts. 2003-01-04 23:43:02 +00:00
jdolecek f50246965e handle __HAVE_MINIMAL_EMUL 2002-11-10 20:59:03 +00:00
jdolecek 2cfacee0a0 set nsysent to 256 2002-11-01 20:44:43 +00:00