Commit Graph

3356 Commits

Author SHA1 Message Date
christos
4e330f1fbc We don't have sigcode if we are not in COMPAT_16. 2005-06-14 22:35:20 +00:00
matt
e1245a3c46 Rework the coredump code to have no explicit knownledge of how coredump
i/o is done.  Instead, pass an opaque cookie which is then passed to a
new routine, coredump_write, which does the actual i/o.  This allows the
method of doing i/o to change without affecting any future MD code.
Also, make netbsd32_core.c [re]use core_netbsd.c (in a similar manner that
core_elf64.c uses core_elf32.c) and eliminate that code duplication.
cpu_coredump{,32} is now called twice, first with a NULL iocookie to fill
the core structure and a second to actually write md parts of the coredump.
All i/o is nolonger random access and is suitable for shipping over a stream.
2005-06-10 05:10:12 +00:00
tsutsui
e392fd287f Remove __P() and parameter names from a prototype declaration. 2005-06-03 23:05:46 +00:00
tsutsui
38825830c7 Appease gcc -Wcast-qual. 2005-06-03 23:03:59 +00:00
martin
12771d0723 Consistently constify 2005-06-03 18:53:50 +00:00
martin
75cc390f62 Avoid shadow warnings. 2005-06-03 18:52:52 +00:00
martin
a2a1dc8e7c Add extern declaration for "bufpages". 2005-06-02 20:14:55 +00:00
matt
25a0e29a75 When writing coredumps, don't write zero uninstantiated demand-zero pages.
Also, with ELF core dumps, trim trailing zeroes from sections.  These two
changes can shrink coredumps by over 50% in size.
2005-06-02 17:01:43 +00:00
tsutsui
bce385b9f7 Add a const. 2005-06-02 16:54:52 +00:00
tsutsui
189e121846 Fix shadow warnings. 2005-06-02 15:22:03 +00:00
drochner
c2a5fd0191 more cast-qual fallout 2005-06-02 13:03:27 +00:00
drochner
bce73c1519 in siginfo conversion functions, declare the source operand as "const" 2005-06-02 10:27:43 +00:00
drochner
093f3bf058 remove (caddr_t) casts on "const" pointers, and use __UNCONST()
where arguments are copied to the stackgap
2005-06-01 15:34:15 +00:00
drochner
8aa146cea7 avoid shadow warnings 2005-06-01 15:29:41 +00:00
drochner
5a09c73a94 fix const'ification fallout 2005-06-01 15:28:56 +00:00
christos
a7c4860a95 fix shadowed variable 2005-05-31 00:43:17 +00:00
christos
94984f467b - fix 32 -> 64 pointer casts properly.
- add const
- fix shadow
2005-05-31 00:42:37 +00:00
christos
805ebc54c2 - add const
- fix shadowed variables
2005-05-31 00:42:10 +00:00
christos
d2dc83130f - add const
- avoid shadowed variables.
2005-05-31 00:41:09 +00:00
chs
a38226d23a regen 2005-05-30 23:00:39 +00:00
chs
3f12eda6dc track change to swapctl args in kern/syscalls.master. 2005-05-30 22:59:55 +00:00
christos
fb4b40b7e8 - sprinkle const.
- add XXXUNCONST to the emul_find() pbuf argument free'ing. XXX: this needs
  an api change.
- avoid variable shadowing.
2005-05-29 22:08:16 +00:00
christos
1473b3a0a1 XXX: Remove fishy volatile. 2005-05-29 22:07:02 +00:00
jmc
36b625d324 Regen 2005-05-23 23:22:27 +00:00
jmc
55c161e3ff Add clock_* POSIX functions. 2005-05-23 23:21:49 +00:00
fvdl
57409f3466 sigreturn doesn't take arguments. Instead, find out where the signal
frame is from the stack pointer in the frame frame.

Also, don't forget to copy %rip back in.
2005-05-22 19:31:15 +00:00
fvdl
e83accc0f6 Regen after sigreturn argument change. 2005-05-22 19:29:40 +00:00
fvdl
8251c0b501 Change sigreturn to have no arguments. 2005-05-22 19:29:15 +00:00
fvdl
beae305307 Use a modified buildcontext function for Linux signals. It doesn't set
the unused segment registers, it just uses the already used values.
2005-05-22 14:52:12 +00:00
fvdl
33e2d79f47 Define linux_usertrap function, and set it in struct emul. For all
but amd64, it just returns 0, doing nothing.

For amd64, it implements vsyscalls through cheating: if the faulting
address is in the vsyscall area (which is statically known on Linux/amd64),
and the intruction pointer is too, it must have been a vsyscall. In that
case, retrieve the return address from the user stack, fix up %rip and
%rsp, and just execute the normal system call. It will return as if
the vsyscall has been executed.
2005-05-20 12:48:26 +00:00
mrg
f56c2db8b9 tramp and vers are used unconditionally, make them visible everywhere. 2005-05-20 01:06:50 +00:00
manu
53fb6703e5 Add support for Linux SA_RESTORER on amd64. 2005-05-19 21:16:29 +00:00
elad
5888b16eef Some changes in veriexec.
New features:

  - Add a veriexec_report() routine to make most reporting consistent and
    remove some common code.
  - Add 'strict' mode that controls how veriexec behaves.
  - Add sysctl knobs:
     o kern.veriexec.verbose controls verbosity levels. Value: 0, 1.
     o kern.veriexec.strict controls strict level. Values: 0, 1, 2. See
       documentation in sysctl(3) for details.
     o kern.veriexec.algorithms returns a string with a space separated
       list of supported hashing algorithms in veriexec.
  - Updated documentation in man pages for sysctl(3) and sysctl(8).

Bug fixes:

  - veriexec_removechk(): Code cleanup + handle FINGERPRINT_NOTEVAL
    correctly.
  - exec_script(): Don't pass 0 as flag when executing a script; use the
    defined VERIEXEC_INDIRECT - which is 1. Makes indirect execution
    enforcement work.
  - Fix some printing formats and types..
2005-05-19 20:16:19 +00:00
christos
362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
fvdl
046b9a57dc Implement clock_* POSIX functions. 2005-05-16 21:18:34 +00:00
fvdl
5acb6d8367 Regen. 2005-05-16 21:18:18 +00:00
fvdl
fe3dd48a91 Add clock_* POSIX functions. 2005-05-16 21:17:11 +00:00
fvdl
e18d1a8ee1 Regen. 2005-05-16 16:03:58 +00:00
fvdl
711b0df630 Add *xattr functions (they all return EOPNOTSUPP). 2005-05-16 16:02:19 +00:00
fvdl
2d668e070c Include linux_sigevent.h (to be used later). 2005-05-16 16:00:31 +00:00
fvdl
33e6ca90d5 Add Linux sigevent definitions. 2005-05-16 15:56:41 +00:00
fvdl
7d91366682 Fix up COMPAT_LINUX support for amd64. Still a work in progress, not
usable yet ("Hello World" runs, but many other things do not work).
2005-05-15 21:44:41 +00:00
fvdl
49395ac65e Make the arch_prctl system call use the saved %gs and %fs mechanism. 2005-05-15 21:43:08 +00:00
jmc
9962871387 #endif for LINUX_SS_ONSTACK needs to go after linux_sys_sigaltstack or builds
break on platforms that don't define it (alpha, sparc)
2005-05-09 19:04:50 +00:00
manu
89647c7ca6 First work on COMPAT_LINUX/amd64
Process startup and dynamiclinking work, but processes hang due to
Linux arch_prctl(2) not being really supported yet.
2005-05-03 16:26:27 +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
yamt
6b2d8b66a4 merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.
2005-04-01 11:59:21 +00:00
drochner
b3d10c788a regen 2005-03-31 16:36:03 +00:00
drochner
014fa21e82 emulate setreuid()/setregid(), from Eric Schnoebelen per PR
port-alpha/21870
2005-03-31 16:34:54 +00:00
christos
14685cd241 s/uvm_map_defaultaddr/uvm_default_mapaddr/ HI FRANK! 2005-03-26 17:10:43 +00:00