Commit Graph

183647 Commits

Author SHA1 Message Date
tron 59c9daa5b3 Avoid using alloca(3) to unbreak SSP builds. 2009-09-11 10:41:42 +00:00
tron 71b58bd028 Don't allocate block buffers on the stack. This can cause stack overflows
in the kernel and breaks SSP builds.
2009-09-11 09:28:34 +00:00
skrll b7d7171c7c Allow this to build while link sets and rump are broken. 2009-09-11 06:48:50 +00:00
christos b2b9799d39 Add support for the 5100 and newer firmware. Tested also with the 4900.
Thanks to everyone for helping and testing.
2009-09-11 01:28:20 +00:00
mhitch 7b90090350 Alpha will size the mutex structure in pmap_tlb_shootdown_q to 16 bytes.
Change the command and pad accordingly;  now pmap_tlb_shootdown_q entries
really are cache-aligned.
2009-09-10 22:27:11 +00:00
dsl 1310aa04b4 Save length of key instead of relying of the weight of the record sep.
This frees a byte value to use for 'end of key' (to correctly sort
short keys) while still having a weight assigned to the field sep.
(Unless -t is given, the field sep is in the field data.)
Do reverse sorts by writing the output file in reverse order (rather
than reversing the sort - apart from merges).
All key compares are now unweighted.
For 'sort -u' mark duplicates keys during the sort and don't write
to the output.
Use -S to mean a posix sort - where equal keys are sorted using the
raw record (rather than being kept in the original order).
For 'sort -f' (no keys) generate a key of the folded data (as for -n
-i and -d), simplifies the code and allows a 'posix' sort.
2009-09-10 22:02:40 +00:00
mhitch 8c83d5056c Now that secondary cpus are added the cpu_info list earlier, attempt to
send pmap tlb shootdowns to them cause the shootdown job queue to fill up,
but since the cpus aren't running yet, no IPIs get sent.  When the job
queue is full, the bit mask of cpus to send the IPI to is not set and no
shootdown IPI ever gets sent after the cpu is marked running.  Always
set the cpumask even when the queue is full.  Now I get shootdown ipis
on all the secondary cpus.
2009-09-10 21:36:39 +00:00
christos 5a2044242f PR/42041: Jasper Wallace: Stopgap fix for kernel assert
("(boundary & (boundary - 1)) == 0") triggers with i915drm in recent -5 kernel

Read the comment in the code for a detailed explanation. This should be fixed
properly in the i386 bus code, but it is too intrusive to do for -5.
XXX: pullup for 5.x
2009-09-10 18:11:21 +00:00
wiz 136eb7e035 We install this as tcpdump(8), so the internal name should be (8) as well.
Fix it. From Jukka Ruohonen.
2009-09-10 15:02:49 +00:00
tsutsui d519f74ad6 Make sure to initialize cpus[0] which will also be used as cpuinfo
for sun4 and sun4c, not only for sun4m. Okay'ed by mrg@.
2009-09-10 14:12:02 +00:00
wiz 177b015b5d Remove references to securelevel(7) and ssl(8), which don't exist.
From Jukka Ruohonen.
2009-09-10 13:17:39 +00:00
pooka 14e70b7ba7 fix LP64 builds. yay, C type system.
patch from Joachim Kuebart
2009-09-10 09:10:29 +00:00
darran ddd44491c6 Make tcp msl (max segment life) tunable via sysctl net.inet.tcp.msl.
Okayed by tls@.
2009-09-09 22:41:28 +00:00
haad 76a0c0e7d2 Fix bug in kmem_alloc/kmem_free of params string. Params string was
allocated with length DM_MAX_PARAMS_SIZE and released with strlen + 1 size.

Disable KM_NOSLEEP allocation because we do not need them here there is
nothing critical in ioctl part of dm driver.

Bug reported by jak@.
2009-09-09 22:38:49 +00:00
sjg d86fd0848e We must delay setting .CURDIR and .OBJDIR until after MainParseArgs()
in case -C is used - in which case we should also ignore $PWD.
2009-09-09 17:09:49 +00:00
drochner 730cc75489 catch the case where a mixer's "step" value is 0 (read from the hardware),
while such a mixer is likely not very useful it should not cause
a division by 0
(should fix the crash reported by Tobias Nygren)
2009-09-09 11:47:24 +00:00
skrll 3c21953b90 Switch i386 to binutils 2.19. 2009-09-09 10:38:35 +00:00
jmcneill 5a521ed705 Switch on input monitor support. 2009-09-09 01:39:51 +00:00
pooka 8b0a183ce8 Remember to add cgdconfig.h too. 2009-09-08 22:16:56 +00:00
pooka d6331b9a6e * fix error print
* adjust resulting image minsize
2009-09-08 21:51:33 +00:00
pooka 676351e4c4 Add a simple proof-of-concept program which shows how to use the
kernel cgd driver in an application which encrypts and decrypts
files.  The cgd driver is running completely in userspace and
requires no special access privileges.

For example:

golem> dmesg > dmesg.txt

# write encrypted dmesg.txt to encrypted.img
golem> ./img2cgd write encrypted.img dmesg.txt
/cryptfile's passphrase:

# read encrypted.img and output decrypted contents to decrypted.txt
golem> ./img2cgd read encrypted.img decypted.txt
/cryptfile's passphrase:
golem> diff dmesg.txt decypted.txt

# but when entering a different password:
golem> ./img2cgd read encrypted.img decypted.txt
/cryptfile's passphrase:
golem> diff dmesg.txt decypted.txt
Binary files dmesg.txt and decypted.txt differ

Currently the utility writes the data length in a proprietary
format, but I'll convert it to use a real disklabel RSN.  Then it
can be used to create cgd-encrypted disk images.

This program can later be used as a base for a utility to create
cgd-encrypted images of a standard NetBSD build.  Idea for such a
tool and hence the inspiration for this simple example program from
Roland Dowdeswell.
2009-09-08 21:48:25 +00:00
pooka 7ae6c0a6f6 * allow specification of kernel operations vector
* make it possible to build cgdconfig as a library
2009-09-08 21:36:35 +00:00
pooka aaaf93f1d4 Add opendisk1(), which functions like opendisk(), but takes a function
pointer to the routine to be used for open().
2009-09-08 21:34:57 +00:00
pooka 3446f432fa dkwedge_list() is currently called only from ioctl routines where
l == curlwp.  Since there is no perceived case where we'd ever want
to copy the list to non-curlwp, simplify the code a bit.
(the struct lwp * argument could probably be dropped too, but
that's another commit)
2009-09-08 21:14:33 +00:00
pooka 3c5c932b98 rnd_wakeup_readers() uses rndpool_mtx for its own consistency
management, so it cannot be called with the mutex held.  There is
no consistency requirement to synchronize over the whole add-and-wakeup
operation, as if data is consumed in the window the mutex is unlocked,
wakeups will simply be skipped.
fix from Juho Salminen in PR kern/42020.
2009-09-08 20:57:59 +00:00
pooka 1b05a6d80a Add test case for PR kern/42020:
t_rnd (1/1): 1 test cases
    RNDADDDATA: Failed: Test case did not exit cleanly: Abort trap (core dumped)

Failed test cases:
    t_rnd:RNDADDDATA
2009-09-08 20:37:45 +00:00
pooka c7ef14e487 Build and install cgd, disk and rnd rump device components. 2009-09-08 20:34:47 +00:00
pooka 725cff3f33 kernel code needs -Wno-format-zero-length 2009-09-08 20:24:08 +00:00
pooka 9367779abf initialize rnd if present 2009-09-08 20:15:51 +00:00
pooka 293b1ff86d add rump rnd device component 2009-09-08 20:12:52 +00:00
pooka 3939408d61 Add a few weak symbols for places where the kernel module boundaries
are not as perfect as theory.
2009-09-08 20:10:44 +00:00
pooka 0aea2d987e Be naughty and avoid #ifdef __HAVE_CPU_COUNTER in rump -- it's a
massively MD can of purpleworms.
2009-09-08 20:07:35 +00:00
pooka 795229a9f5 Use PTHREAD_MUTEX_ERRORCHECK. This enables rump deadlock detection
once again:
panic: rumpuser fatal failure 11 (Resource deadlock avoided)
2009-09-08 20:04:03 +00:00
tsutsui 0b4006b755 Make local functions static and remove a declaration that is also in hmevar.h.
Also comment out or remove declarations for #if 0'ed or nonexistent functions.
2009-09-08 18:35:42 +00:00
drochner 9edfc4c4ef fix scaling of mixer gain values: the register can be smaller than 7 bits,
this is told by some "step" parameter read from the hardware
(fixes problems with a 5-bit register observed by Nicolas Joly and me)
approved by Jared D. McNeill
2009-09-08 18:33:24 +00:00
tsutsui 32fba42272 sbus_establish() should take device_t self for the device itself,
not device_t parent even if sbus is grandparent of the device,
otherwise (*sd_reset)() callbacks will be called with an wrong device_t.
Even in such case, sbus_establish() looks for an sbus though device tree.
XXX: (*sd_reset)() isn't called anyway, and these stuff seems really bogus.
2009-09-08 18:31:36 +00:00
tsutsui 26a7078461 Fix botch on device_t/softc split caused by awful casts around
registration of (*sd_reset)(device_t) in struct sbusdev via sbus_establish().

XXX: (*sd_reset)() in struct sbusdev seems called from only sbusreset(),
XXX: but there is no function which calls sbusreset()???
2009-09-08 18:15:17 +00:00
dyoung 3d4351e682 Delete whitespace at ends of lines. 2009-09-08 18:01:34 +00:00
sjg 44c6580dd0 Reviewed by: apb
Use .MAKE.LEVEL to track recursion.
The first instance of make will have .MAKE.LEVEL 0, which
can be handy for excluding rules which should not apply
in a sub-make.
gmake and freebsd's make have a similar mechanism, but each
uses a different variable to track it.  Since we cannot be
compatible with both, we allow the makefiles to cope if they want
by handling the export of .MAKE.LEVEL+1 in Var_Set().
2009-09-08 17:29:20 +00:00
tsutsui 2b11b477b3 - split out chip reset ops from hme_stop() into a new function
hme_chipreset() to make hme_stop() match struct ifnet API
- set ifp->if_timer in hme_start() if any TX packets are queued
- also clear ifp->if_timer and ifp->if_flags in hme_stop()
- replace shutdownhook_establish(9) with pmf_device_reigster1(9)
Briefly checked hme at pci.
2009-09-08 17:16:33 +00:00
dholland 6a214fad9e Disable writing scores when built for /rescue. PR 42009 2009-09-08 13:38:01 +00:00
he 3da5eccbbc Allow builds without X11 to succeed. The previous change when used
in this situation caused the contents of ${.CURDIR} to be cat'ed
into the generated NetBSD.dist mtree spec file, resulting in
${DESTDIR}/var/yp/binding/<garbage> being created, causing set list
check failure at the end of the build.
2009-09-08 09:57:32 +00:00
jmcneill 79090dc96a PR# kern/42007: hdaudio panics on P5W DH Deluxe (amd64)
Make sure hdafg pulls in auconv mulaw support.
2009-09-08 09:50:56 +00:00
jmcneill e875bf360e PR# kern/39899: audio attach with pad(4) segfaults
Make sure pad pulls in auconv mulaw support.
2009-09-08 09:47:42 +00:00
cegger eb4ebcd11a Do not flush routes if root file system is nfs mounted.
Fixes boot problem when the nfs server is in a different subnet.
2009-09-08 08:56:33 +00:00
wiz 5946cee966 Fix Dd string, remove trailing whitespace. 2009-09-08 07:54:49 +00:00
skrll d5bd20ae03 Bump date for previous. 2009-09-08 07:48:14 +00:00
skrll 8a770313a3 Rename MKBFD to MKBINUTILS and support HAVE_BINUTILS for set lists. This
makes {MK,HAVE_}BINUTILS consistent with {MK,HAVE_}{GCC,GDB}.

Allow MKBFD to defines MKBINUTILS as a backwards compatibility hook.

Update the sets lists and add conditionals for lib{bfd,opcodes}.
2009-09-08 07:08:00 +00:00
jmcneill 68aba25e22 Switch on hdaudio(4) 2009-09-07 22:59:09 +00:00
christos ea3813ed2f apply apple patches from:
http://opensource.apple.com/source/libedit/libedit-11/patches/
2009-09-07 21:24:33 +00:00