Commit Graph

236 Commits

Author SHA1 Message Date
perry
77f2a006d0 regen 2005-02-26 23:58:19 +00:00
perry
fa91538c32 make this rebuild generated files by default 2005-02-26 23:35:00 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
david
090b8be8f9 Bounds check syscall arguments where appropriate 2004-10-27 19:29:56 +00:00
christos
7e7288c064 Bounds check signal number. 2004-10-13 23:21:41 +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
christos
6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
drochner
4f4ec7e627 regen after __HAVE_SIGINFO removal 2004-03-26 15:29:28 +00:00
drochner
9fd8e8983b all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 15:18:54 +00:00
drochner
4f5b1431f9 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 15:01:16 +00:00
atatat
c2309bcca6 *Don't* call sys___sysctl() from within the kernel. Use old_sysctl()
instead.
2004-03-09 03:18:03 +00:00
junyoung
9a410f9ed0 Rename es_check in struct execsw to es_makecmds. 2004-02-06 08:02:58 +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
christos
42e971bfba Previous fix was incomplete; did not handle negative values.
It is best to use size_t's when dealing with sizes, so that
testing for negative ones, is not needed.
2003-11-19 15:46:16 +00:00
itojun
7db67502f8 avoid integer type truncation. be picky about integer computation overflow.
inspired by ftp://ftp.openbsd.org/pub/OpenBSD/patches/3.3/i386/011_ibcs2.patch
2003-11-18 19:46:37 +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
christos
82812c7677 remove malloc.h (we don't need it) 2003-11-05 04:03:43 +00:00
christos
293ab5b508 limit malloc so that corrupted executables don't allocate a lot of memory. 2003-11-05 04:03:21 +00:00
drochner
714de0452f adapt for changes to kern/exec_elf32.c 2003-10-31 14:04:35 +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
itojun
f8641ea112 avoid out-of-bound memory access. found by openbsd "bound" C attribute. 2003-10-01 08:03:48 +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
christos
cfba45c856 constify sendsig/trapsignal 2003-09-25 22:00:02 +00:00
christos
0c73068f06 regen 2003-09-13 18:44:49 +00:00
christos
2cfe0b047e add __HAVE_SIGINFO 2003-09-13 18:44:30 +00:00
christos
9a680b9da0 regen 2003-09-10 19:47:49 +00:00
christos
df9305fe0c sys__sigreturn14 -> compat_16_sys___sigreturn14 2003-09-10 19:47:40 +00:00
christos
e2c278d8c0 SA_SIGINFO changes 2003-09-06 22:09:20 +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
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
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
jdolecek
853290d652 remove local idea of ELF_AUX_ARGSIZ - since this emul uses elf32_copyargs(),
it shouldn't override the size
2003-02-19 09:45:48 +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
simonb
2eaedc2774 Remove variables that are only assigned too but not referenced. 2003-01-20 01:35:11 +00:00
thorpej
a03cb2b851 Regen to get correct RCS ID. 2003-01-18 23:28:15 +00:00
thorpej
062c115a84 Regen: Merge the nathanw_sa branch. 2003-01-18 07:41:34 +00:00
thorpej
a9d45e7ce9 Merge the nathanw_sa branch. 2003-01-18 07:40:44 +00:00
kristerw
084ae1f838 ibcs2_debug is used only for IBCS2_DEBUG, so no need to define it otherwise. 2002-12-21 15:48:57 +00:00
jdolecek
47cd9b85d6 Get the dynamic interpreter location using emul_find_interp(), so that
it checks both the alternative/emul tree, and the non-emul tree.
This makes it possible to run chrooted emulated binaries without need
to setup shadow /emul tree within the chroot hierarchy.
Only tested for COMPAT_LINUX, changes to other compat modules were
mechanical.
Fixes kern/19161 by Christian Groessler.
2002-11-29 19:13:14 +00:00
christos
116bcb05d0 rename: s/sa_/<compat>sa/g 2002-11-26 18:43:20 +00:00
jdolecek
1524c4bf08 set struct emul's nsysent to compat SYS_NSYSENT, not SYS_MAXSYSCALL 2002-11-01 19:26:21 +00:00