Commit Graph

165227 Commits

Author SHA1 Message Date
hannken bdc290470e maxfiles is now an u_int. 2007-12-28 10:00:18 +00:00
jmmv 92f6ea962c Properly capture the output of the SSH server. Its -e flag is supposed to
be used alongside -D, but as this was not documented I thought it was a bug
and "fixed" -e's behavior locally (so I got the correct output before, but
nobody else).

Also, fix a race condition that could cause the SSH server to not be killed
if the pid file was not written before the kill, which might happen on very
fast machines.  There still may be a problem when trying to do the connection
if the server has not yet finished initialization...
2007-12-28 08:57:42 +00:00
dogcow 0a9401426e XEN only gets defined in opt_xen.h; move the ifndef check after the include. 2007-12-28 07:04:54 +00:00
garbled 0abe9cf449 Add one more convenience function to rtas, rtas_has_func, and add a
global int machine_has_rtas that can be used to decide if a machine has
rtas functionality or not.  Take a crack at power off support for the
pegasos, which doesn't work right, probably due to a firmware bug.
2007-12-28 05:12:41 +00:00
garbled f217f96524 Take advantage of the new rtas_call function and get rid of the uneeded
rtas_reboot() function.  Still reboots even.
2007-12-28 04:47:37 +00:00
garbled ae7424d959 Rewrite the rtas_call command, to allow ports to call rtas directly from
outside rtas.c, by simply issuing the right token.  This makes using the
rtas functionality much simpler.
2007-12-28 04:45:57 +00:00
dholland 1bbd65fe3f Extend size of entry buffer for partition type ids from 4 to 5, to allow
room for hex values. Fixes (my own) PR 34791, now that I've had a chance
to test it.
Reviewed-by: martin
2007-12-28 00:48:43 +00:00
martin 93310937f3 Avoid munmap(-1, ...) - doesn't make much sense. 2007-12-28 00:39:32 +00:00
dholland 9784aa9aba Regen. 2007-12-28 00:35:23 +00:00
dholland 45274b234f typo fix: brige -> bridge 2007-12-28 00:34:00 +00:00
dholland e94a5bc9f9 Comprehensive (or at least extensive) string handling cleanup for rogue.
This patch dates (mostly) back to 2002; the critical parts of it were
handled back then by security-officer. As far as I know, there's
nothing exploitable fixed herein.

A slightly earlier version of this patch was reviewed by Christian Biere
when I filed it as PR 34750.
2007-12-27 23:52:59 +00:00
ad 0ed5b8dd38 sched_pstats: need proclist_mutex to send signals. 2007-12-27 22:13:19 +00:00
joerg 53c1ce668c opt_physmem.h only exists for !Xen. 2007-12-27 21:31:35 +00:00
pooka 38a05cc07d Flesh this out a bit more. Unfortunately it's still unfinished,
and I don't know when I'll get a chance to finish it.
2007-12-27 18:50:42 +00:00
garbled 47b06f10ce change some printf's to aprint_normal. 2007-12-27 17:49:36 +00:00
garbled 28d432f9cc Add an infinate loop after the reboot call so we don't somehow drop past
it if it fails.
2007-12-27 17:25:02 +00:00
garbled 86909579bf Make the reboot function work when in single/multi user mode. I have no
idea why this makes it work, but apparently it needs to return status,
and if it doesn't, it won't reboot.  (unless you call it at the askroot
prompt, then it worked fine).  *boggle*.
2007-12-27 17:23:54 +00:00
christos c9a64311d7 make this compile again. 2007-12-27 17:18:11 +00:00
martin 6cc2e0f273 Remove now superflous (and wrong) extern declaration for maxfiles. 2007-12-27 17:05:28 +00:00
joerg df7753af9c Fix typo. 2007-12-27 16:50:43 +00:00
jmcneill bfa597bd9c Don't call pmf_check_system_drivers on shutdown. 2007-12-27 16:03:10 +00:00
ad fb0185d80e pipe_direct_write: kill a mutex_exit() that escaped. 2007-12-27 15:25:22 +00:00
elad d36f83120b PAX_ASLR_DELTA_PROG_LEN -> PAX_ASLR_DELTA_EXEC_LEN, and put it in pax.h.
Export randomized bits # for stack and exec base too via sysctl.

okay christos@.
2007-12-27 15:21:52 +00:00
elad 72be971020 Mention security(8) for ASLR, requested by hubertf@. 2007-12-27 15:19:05 +00:00
ws 92c079bdac Change cacheline fixup for 3114's second set of channels, too.
Fix provided by Masanori Kanaoka in PR 37519.
Fixed differently to avoid code duplication.
2007-12-27 15:14:23 +00:00
elad cb6146bcbd Call pax_init() for PAX_ASLR. 2007-12-27 13:34:43 +00:00
wiz ac14332299 Fix argument confusion, noted by drochner. 2007-12-27 12:59:56 +00:00
wiz 665cd277c5 Comment out xref to makemap(8), which does not exist. 2007-12-27 12:56:49 +00:00
rjs fa579d4ec4 Change to new softint API. 2007-12-27 12:29:16 +00:00
pooka cb36cc5493 Uncommit accidentally committed PUFFS_FLAG_OPDUMP.
overextensive library verbosity noticed by riz
2007-12-27 11:39:06 +00:00
garbled cbd61cd9a6 Enable l2 cache on the pegasos 2007-12-27 05:41:51 +00:00
garbled 07cb4134b6 Lots and lots of fixes to the cpu identification code, and dealing with
L2 and L3 cache initialization.  Mostly to get the L2 enabled on the
pegasos, but since I had the manual, I fixed a few other things I saw
while I was there.
2007-12-27 05:40:49 +00:00
xtraeme b7d6181694 Fixup some comments. 2007-12-27 01:23:55 +00:00
xtraeme b9fa8c12a2 Add configuration properties for the Gigabyte P35C-DS3R, that uses
an IT8718F Super I/O.
2007-12-27 00:52:40 +00:00
elad d0431ebd34 Document PaX ASLR.
Also requested by xtraeme@.
2007-12-27 00:40:54 +00:00
elad cc43e61ef3 Update for PaX ASLR. 2007-12-27 00:20:11 +00:00
elad b1111e85d4 Compile in by default (disabled) PaX ASLR for amd64 and i386. 2007-12-26 23:00:50 +00:00
jmmv 0287baacad Make the clean target work when OBJS is set but PROG is not, as happens
for example in gnu/lib/crtstuff4.  Reported by drochner@.
2007-12-26 22:52:10 +00:00
xtraeme 64ee7cfdb7 Fix build without debug enabled:
/usr/src/sys/kern/kern_exec.c: In function 'execve1':
/usr/src/sys/kern/kern_exec.c:505: warning: empty body in an if-statement
2007-12-26 22:49:19 +00:00
christos 908844df6c add PAX_ASLR 2007-12-26 22:35:33 +00:00
jmmv c14077091f Install the data files. 2007-12-26 22:33:54 +00:00
christos 6a838fb09a Add missing PAX defines 2007-12-26 22:32:44 +00:00
jmmv 7b84aa1ff1 Fix name of t_psshfs. 2007-12-26 22:31:51 +00:00
christos 3f7baafe42 mention PaX ASLR 2007-12-26 22:18:46 +00:00
christos 7b06b28ff8 Document ASLR 2007-12-26 22:17:02 +00:00
christos 4e65b015fb Allow turning ASLR on and off. 2007-12-26 22:16:31 +00:00
christos 65c680cad7 Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]
For regular (non PIE) executables randomization is enabled for:
    1. The data segment
    2. The stack

For PIE executables(*) randomization is enabled for:
    1. The program itself
    2. All shared libraries
    3. The data segment
    4. The stack

(*) To generate a PIE executable:
    - compile everything with -fPIC
    - link with -shared-libgcc -Wl,-pie

This feature is experimental, and might change. To use selectively add
    options PAX_ASLR=0
in your kernel.

Currently we are using 12 bits for the stack, program, and data segment and
16 or 24 bits for mmap, depending on __LP64__.
2007-12-26 22:11:47 +00:00
christos 8636ab52f6 Deal with ASLR PIE executables, by recognizing that phdr != phdr->v_addr
for PT_PHDR headers when the program has been loader to a vaddr other than
then one specified (a randomized one), and modifying the relocation base
address appropriately (idea from elad)
2007-12-26 21:14:41 +00:00
christos 8b0637156f No need for stack_protector.o if USE_FORT is no.
XXX: compiling a binary with -Wl,--dynamic-linker,${NETBSDSRCDIR}/libexec/...
results in stack overflow. Investigate!
2007-12-26 21:11:52 +00:00
christos 5ad1b72097 print the symbol we are seaching for [when debugging] 2007-12-26 21:10:03 +00:00