Commit Graph

2440 Commits

Author SHA1 Message Date
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej 71404bb533 Don't include <sys/map.h>. 2002-09-25 22:21:01 +00:00
manu deca50b66c Fill BADVADDR and CAUSE in sigcontext. We still don't restore them, but
it actually fixes a problem:
When /bin/sh gets a SIGSEGV, its signal handler calls brk and the offending
instruction is retried. Usually it gets another SIGSEGV, and things loops
until it pases without the SIGSEGV. This is the normal mode of operation, and
it can be reproduced on IRIX by a 10kB shell script starting by echo /*

However... the signal handler checks for BADVADDR in the saved registers
in struct sigcontext. If it does not find it, it gives up and exit instead
of retrying. Filling the field enables us to carry on normal operation
(which is to get dozens of SIGSEGV) instead of getting a failure at the
first SIGSEGV.
2002-09-25 19:39:16 +00:00
manu 7216eba62a We now fill the struct siginfo when requested (SA_SIGINFO flag to sigaction) 2002-09-25 19:09:50 +00:00
simonb aae67f532c Remove a meaningless type qualifier on a cast. 2002-09-23 05:57:44 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
simonb 6ddc09dab1 Put storage class first in "static const" declaration. 2002-09-23 05:03:03 +00:00
simonb c8cb48355a Commit remaining part of PR1623 so the code in the PR actually gets
executed(!).
2002-09-23 04:55:09 +00:00
simonb 67f65715f9 ttspeedtab() is a function that returns an int, and returns -1 if
there's an error.  Store the result of this function in a signed
variable instead of an unsigned variable before checking if the return
value is greater than zero.
2002-09-23 04:49:32 +00:00
manu 80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
martin 062ee8dd14 p->p_sigacts -> p->p_sigctx 2002-09-16 03:41:40 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
christos fad54bde7f Make this match reality [not used yet] 2002-09-05 22:28:10 +00:00
christos 2043e8b0c4 remove XXX: 2002-09-05 22:27:36 +00:00
christos 6cc149625b check out EI_OSABI and EI_ABIVERSION for linux signatures. This is what
http://upx.sourceforge.net/ binaries are like.
2002-09-05 14:32:49 +00:00
martin 5eee9e2b47 Adapt to recent exec changes. 2002-08-29 14:02:50 +00:00
christos 9cf6437e8f Fix internal copyargs too. 2002-08-29 14:01:08 +00:00
christos ff79c1e140 adjust copyargs signature to pass struct proc. 2002-08-29 13:59:23 +00:00
christos f2d5bd5133 s/au_/a_/g noticed by martin 2002-08-29 13:48:42 +00:00
christos 830c5c171a Implement passing AT_{E,R}{U,G}ID in the elf aux vector, like solaris.
- pass struct proc to copyargs.
- eliminate svr4_copyargs, since it is the same as ours now.
2002-08-26 21:05:59 +00:00
thorpej cf013daeb3 Fix some signed/unsigned comparison warnings from GCC 3.3. 2002-08-25 21:18:15 +00:00
manu 652fe89179 - add locks to structures used by the /dev/usema driver and the
usync_cntl() system calls.

- when usync_cntl is used and the process is aborted (eg: by kill -9)
libc does not call usync_cntl() to unblock things. We have to cleanup
data allocated in the kernel. This is now done through the emulation
specific exit hook

- IRIX initialize some data in the system part of the PRDA: the pid and
a prid (PRDA ID?). We initialize both to pid.

- Move back struct irix_share_group from irix_exec.h to irix_prctl.h, it
is more revelant here.

- fix a few typos
2002-08-25 19:03:12 +00:00
enami bb4aeb0e05 Pull changes done in rev. 1.7 of sys/compat/linux/arch/powerpc/linux_exec.h
so that sysctl(8) compiles again.
2002-08-15 06:31:30 +00:00
manu 08b6896ef2 Added a sleep on the parent so that the parent cannot die while the child
needs to access information from it.
2002-08-12 20:11:38 +00:00
mrg 19ad2640ac don't need systm.h here 2002-08-12 07:59:31 +00:00
itojun f731d2b75a wrong semicolon at EOL. notified by wiz 2002-08-08 00:15:32 +00:00
itojun c1f124cb75 typo 2002-08-07 00:18:21 +00:00
itojun 8fc9db2b63 buffer len check. from silvio@qualys.com 2002-08-06 22:50:37 +00:00
itojun 8dd04cdcd7 correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls.  from openbsd
2002-08-03 00:12:48 +00:00
manu 652d91cab0 Introduce a shared group structure, and make the sproc implementation
more SMP friendly.
2002-08-02 23:02:51 +00:00
manu 2ce44de983 typo 2002-08-02 22:52:50 +00:00
manu 0e12143ef8 Missing P_ZERO in priority mask 2002-08-02 22:52:36 +00:00
gmcgarry cb7e814f6e Fix inverted pre-processor test. 2002-08-02 08:43:09 +00:00
jdolecek 4be499b52b Convert to use p_opptr rather than p_oppid. Part of fix for
security/14444 by David Sainty.
2002-07-28 18:42:41 +00:00
chs 0724ffc87a restructure the FPU and AltiVEC code so that it works for MP. 2002-07-28 07:38:34 +00:00
jdolecek 02eb342b57 Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.

Reviewed by Christos Zoulas.
2002-07-25 20:04:02 +00:00
matt c172e4d8e8 Make SVR4_32 work with the sparc32 version of setiathome. This required
fixing the socket syscall and the SIOGIFCONF ioctl code.
2002-07-22 05:31:18 +00:00
scw bef00d4895 m68k syscall rototill:
- Switch all m68k-based ports over to __HAVE_SYSCALL_INTERN.
 - Add systrace glue.
 - Define struct mdproc in <m68k/proc.h> instead of <machine/proc.h>.
   (They were all defined exactly the same anyway, other than a couple
   of the MDP_* flags.)
2002-07-13 08:28:40 +00:00
matt 66eaa16742 Change fpuproc to curcpu()->ci_fpuproc. 2002-07-09 17:41:27 +00:00
fvdl e877145e56 Move netbsd32_sysarch to netbsd32_machdep.c 2002-07-07 23:23:41 +00:00
oki 33e652ebfd Regen. 2002-07-07 18:07:43 +00:00
oki 52bdeef730 PECOFF version of stat13 and lstat13 couldn't look for
alternative path at first.  Fixed it.
2002-07-07 18:06:02 +00:00
thorpej 011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
manu 7d2ac48550 Fixed a typo that borke build with DEBUG_IRIX 2002-06-22 13:02:39 +00:00
gmcgarry d6e1e62162 sync to new ktrsyscall() interface. 2002-06-21 05:48:06 +00:00
enami af1c533269 Don't copy from destination to destination. 2002-06-20 04:01:43 +00:00
eeh 84c049f196 Match the Solaris siginfo layout for _LP64. 2002-06-19 17:33:01 +00:00
wrstuden 10d47b4dd3 Updated version of cscope/mkid support. Check libkern and compat lib
for source files. Also include header files in mkid run.
2002-06-18 23:46:52 +00:00
manu 758eb330b4 build without DEBUG_IRIX 2002-06-17 05:01:56 +00:00
manu 0e28620e0f Two forgotten files in last commit for get/setrlimit 2002-06-14 20:33:11 +00:00