babkin [Sun, 25 Jun 2006 18:37:44 +0000 (18:37 +0000)]
The common UID/GID space implementation. It has been discussed on -arch
in 1999, and there are changes to the sysctl names compared to PR,
according to that discussion. The description is in sys/conf/NOTES.
Lines in the GENERIC files are added in commented-out form.
I'll attach the test script I've used to PR.
anholt [Sun, 25 Jun 2006 14:44:43 +0000 (14:44 +0000)]
Replace the three copies of the list of pci ids with a single centralized list.
Add the i945 PCI IDs commented out -- I think it should just work, but it hasn't
been tested yet.
hrs [Sun, 25 Jun 2006 12:33:57 +0000 (12:33 +0000)]
New release notes:
apm(4) suspend/resume support improvement,
read(2) vn lock now protected by FOFFSET_LOCKED flag,
cardbus(4), pccard(4), pccbb(4), and exca(4) buildable as KLDs,
midi(4) driver added again,
ath(4) and related drivers included in GENERIC by default,
wi(4) builable as KLD,
wlan_*(4) crypto drivers included in GENERIC by default,
ipfw(4) tag/untag keyword support,
the default retransmit timer for NFS over TCP changed to 60s,
the default value of vfs.nfs.iodmin changed to 0,
numeric arguments for find(1) -user/-group now work as expected,
hccontrol(8) HCI node autodetection,
id(1) prints euid with gid,
kdump(1) can print syscall flags in symbol names,
"mount -u -o rw" on read-only mount now works as expected,
sed(1) incorrect calculation of pattern space length fixed,
time(1) SIGINFO support added,
rc.d/mdconfig added,
DRM updated to a snapshot as of 20060517,
/media directory for removable media mount points added,
pc98 release CDROMs now boolable, and
kernel subsystem API doc generating framework with doxygen added.
jhb [Fri, 23 Jun 2006 19:36:50 +0000 (19:36 +0000)]
Fix the name of the data set item for the SYSUNINIT in RW_SYSINIT to use
'rw' instead of 'mtx'. This should only be a cosmetic change rather than
a functional one.
Submitted by: Alex Lyashkov <shadow AT itt dot net dot ru>
netchild [Fri, 23 Jun 2006 18:49:38 +0000 (18:49 +0000)]
The linux times syscall can be called with a NULL pointer, so keep cool
and don't panic.
This fix is different from the patch submitted as it not only prevents
a NULL-pointer dereference, but also skips some work in this case.
Noticed by: Dmitry Ganenko <dima@apk-inform.com>
Reviewed by: rdivacky (the original version as in emulation@)
MFC after: 1 week
Security: This is a RELENG_x_y candidate (local DoS).
Go ahead by: secteam (cperciva)
jhb [Fri, 23 Jun 2006 16:44:24 +0000 (16:44 +0000)]
Move the code to handle the vm.blacklist tunable up a layer into
vm_page_startup(). As a result, we now only lookup the tunable once
instead of looking it up once for every physical page of memory in the
system. This cuts out about a 1 second or so delay in boot on x86
systems. The delay is much larger and more noticable on sun4v apparently.
keramida [Fri, 23 Jun 2006 13:36:33 +0000 (13:36 +0000)]
twalk() expects an `action' function not a comparison function.
The text is correct in the "DESCRIPTION" section, so fix "SYNOPSIS"
to use the correct name.
PR: docs/90498
Submitted by: Vasil Dimov
MFC after: 3 days
mohans [Fri, 23 Jun 2006 00:42:26 +0000 (00:42 +0000)]
Size the NFS server dupreq cache on the basis of nmbclusters. On servers
with low nmbclusters, we tie up too many mbclusters in the NFS duplicate
request cache. This change limits the size of the dupreq cache to 1/2
the nmbclusters (and flaots in a range of [64, 2048]).
MFC after 2 weeks.
Reported by: Steve Kargl, David O'Brien
Tested by: Steve Kargl
imp [Thu, 22 Jun 2006 16:52:53 +0000 (16:52 +0000)]
Per weak consensus on this topic, remove suggestion to set
HISTORICAL_MAKE_WORLD from the text that's output. This was committed
against the previous consensus. Leave the documentation in this file
as a compromose. The HISTORICAL_MAKE_WORLD knob is intentionally
obfuscated and we only trust people smart enough to read the Makefile
to use it. All others have no business using it due to its danger,
unless DESTDIR is set.
ume [Thu, 22 Jun 2006 13:22:54 +0000 (13:22 +0000)]
- Pullup even when the extention header is unknown, to prevent
infinite loop with net.inet6.ip6.fw.deny_unknown_exthdrs=0.
- Teach ipv6 and ipencap as they appear in an IPv4/IPv6 over IPv6
tunnel.
- Test the next extention header even when the routing header type
is unknown with net.inet6.ip6.fw.deny_unknown_exthdrs=0.
jhb [Wed, 21 Jun 2006 20:42:08 +0000 (20:42 +0000)]
Replace the kld_mtx mutex with a kld_sx sx lock and expand it's scope to
protect all linker-related data structures including the contents of
linker file objects and the any linker class data as well. Considering how
rarely the linker is used I just went with the simple solution of
single-threading the whole thing rather than expending a lot of effor on
something more fine-grained and complex. Giant is still explicitly
acquired while registering and deregistering sysctl's as well as in the
elf linker class while calling kmupetext(). The rest of the linker runs
without Giant unless it has to acquire Giant while loading files from a
non-MPSAFE filesystem.
yar [Wed, 21 Jun 2006 13:48:34 +0000 (13:48 +0000)]
Fix the VLAN_ARRAY case, mostly regarding improper use of atomic(9)
in place of conventional rw locking. Alas, atomic(9) can't buy us
lockless operation so easily.
flz [Wed, 21 Jun 2006 10:22:44 +0000 (10:22 +0000)]
Since INSTALLS_SHLIB has been superseded by USE_LDCONFIG in bsd.port.mk, I
expect to see quite a few files appearing in libdata/ldconfig directories.
This change avoids the screen to be filled with the names of those ldconfig
files and replace them by the actual non-default directories they contain.
Most of them will be ${PREFIX}/lib so, 'sort -u' will help reducing the
output.
yar [Wed, 21 Jun 2006 09:42:55 +0000 (09:42 +0000)]
Quite a number of rc.d scripts try to load kernel modules. Many
of them do that conditionally depending on kldstat. The code is
duplicated all over, but bugs can be uniqie.
To make the things more consistent, introduce a new rc.subr function,
load_kld, which takes care of loading a kernel module conditionally.
(Found this lying for a while in my p4 branch for various hacks.)
yar [Wed, 21 Jun 2006 07:29:44 +0000 (07:29 +0000)]
Track interface department events and detach vlans from
departing trunk so that we don't get into trouble later
by dereferencing a stale pointer to dead trunk's things.
ps [Tue, 20 Jun 2006 22:41:44 +0000 (22:41 +0000)]
Instead of using scsi probes to do device discovery, use the firmware
commands to grab the device listing. This resolves issues using
multiple volumes, where each volume was actually internally pointing
to target 0.
ps [Tue, 20 Jun 2006 21:06:05 +0000 (21:06 +0000)]
Cleanup dcmd firmware processing into a single function, mfi_dcmd_command
to avoid duplication and mistakes when setting up firmware commands
for submission.
jhb [Tue, 20 Jun 2006 20:59:55 +0000 (20:59 +0000)]
Add a new section in this file for functions that are only exported by the
linker for use in the linker class handlers. Move linker_add_class(),
linker_file_unload(), linker_load_dependencies(), and linker_make_file()
into this section.
jhb [Tue, 20 Jun 2006 20:54:13 +0000 (20:54 +0000)]
- Push Giant down into linker_reference_module().
- Add a new function linker_release_module() as a more intuitive complement
to linker_reference_module() that wraps linker_file_unload().
linker_release_module() can either take the module name and version info
passed to linker_reference_module() or it can accept the linker file
object returned by linker_reference_module().
alc [Tue, 20 Jun 2006 20:52:11 +0000 (20:52 +0000)]
Change get_pv_entry() such that the call to vm_page_alloc() specifies
VM_ALLOC_NORMAL instead of VM_ALLOC_SYSTEM when try is TRUE. In other
words, when get_pv_entry() is permitted to fail, it no longer tries as
hard to allocate a page.
Change pmap_enter_quick_locked() to fail rather than wait if it is
unable to allocate a page table page. This prevents a race between
pmap_enter_object() and the page daemon. Specifically, an inactive
page that is a successor to the page that was given to
pmap_enter_quick_locked() might become a cache page while
pmap_enter_quick_locked() waits and later pmap_enter_object() maps
the cache page violating the invariant that cache pages are never
mapped. Similarly, change
pmap_enter_quick_locked() to call pmap_try_insert_pv_entry() rather
than pmap_insert_entry(). Generally speaking,
pmap_enter_quick_locked() is used to create speculative mappings. So,
it should not try hard to allocate memory if free memory is scarce.
Add an assertion that the object containing m_start is locked in
pmap_enter_object(). Remove a similar assertion from
pmap_enter_quick_locked() because that function no longer accesses the
containing object.
jhb [Tue, 20 Jun 2006 20:41:15 +0000 (20:41 +0000)]
Make linker_find_file_by_name() and linker_find_file_by_id() static to
simplify linker locking. The only external consumers now use
linker_file_foreach().
netchild [Tue, 20 Jun 2006 20:38:44 +0000 (20:38 +0000)]
Switch to using the DUMMY infrastructure instead of UNIMPL for the new
syscalls. This way there will be a log message printed to the console
(this time for real).
Note: UNIMPL should be used for syscalls we do not implement ever, e.g.
syscalls to load linux kernel modules.
jhb [Tue, 20 Jun 2006 20:37:17 +0000 (20:37 +0000)]
- Add a new linker_file_foreach() function that walks the list of linker
file objects calling a user-specified predicate function on each object.
The iteration terminates either when the entire list has been iterated
over or the predicate function returns a non-zero value.
linker_file_foreach() returns the value returned by the last invocation
of the predicate function. It also accepts a void * context pointer that
is passed to the predicate function as well. Using an iterator function
avoids exposing linker internals to the rest of the kernel making locking
simpler.
- Use linker_file_foreach() instead of walking the list of linker files
manually to lookup ndis files in ndis(4).
- Use linker_file_foreach() to implement linker_hwpmc_list_objects().
imp [Tue, 20 Jun 2006 20:13:40 +0000 (20:13 +0000)]
Probe the memory size of the board better. Look at the bus width,
number of banks, rows and columns the SDRAMC is programmed to access
to determine the RAM size for the board, rather than hard-wiring it to
be 32MB. My company's board with 64MB now probes correctly, as does
the KB9202 with only 32MB. This means that to detect the right memory
size, our boot loader must correctly initialize these values. This is
a fairly safe assumption because the boot loader has to initialize
SDRAM already, and it isn't really possible to change this register
after we've accessed SDRAM.
yar [Tue, 20 Jun 2006 12:44:21 +0000 (12:44 +0000)]
We no longer need to disable interrupts in MD trap machinery
when we're about to call kdb_trap() because the latter MI
function can disable interrupts by itself now.
Pointed out by: bde
X-MFC remark: depends on kern/subr_kdb.c#1.18
Sponsored by: RiNet (Cronyx Plus LLC)
gnn [Tue, 20 Jun 2006 12:36:40 +0000 (12:36 +0000)]
Properly cast the values of valsize (the size of the value passed in)
in setsockopt so that they can be compared correctly against negative
values. Passing in a negative value had a rather negative effect
on our socket code, making it impossible to open new sockets.
andre [Tue, 20 Jun 2006 08:11:30 +0000 (08:11 +0000)]
Allocate a zero'ed syncache hashtable. mtx_init() tests the supplied
memory location for already existing/initialized mutexes. With random
data in the memory location this fails (ie. after a soft reboot).
davidxu [Mon, 19 Jun 2006 22:36:01 +0000 (22:36 +0000)]
MFi386:
Use the method described in IA-32 Intel Architecture Software
Developer's Manual chapter 11.6.6 to get valid mxcsr bits,
use the mxcsr mask to clear invalid bits passed by user code.
mlaier [Mon, 19 Jun 2006 22:20:45 +0000 (22:20 +0000)]
Import interface groups from OpenBSD. This allows to group interfaces in
order to - for example - apply firewall rules to a whole group of
interfaces. This is required for importing pf from OpenBSD 3.9
Obtained from: OpenBSD (with changes)
Discussed on: -net (back in April)
yar [Mon, 19 Jun 2006 17:12:25 +0000 (17:12 +0000)]
There is a plenty of arch's out there where sizeof(size_t) != sizeof(int).
A field width in printf(3) must be int, so cast return value from strlen()
to the type.
Noticed by: Andrzej Tobola <ato iem pw edu pl>; tinderbox
Pointy hat to: yar
X-MFC with: the rest of the new asf code
dwmalone [Mon, 19 Jun 2006 12:33:52 +0000 (12:33 +0000)]
When we receive an out-of-window SYN for an "ESTABLISHED" connection,
ACK the SYN as required by RFC793, rather than ignoring it. NetBSD
have had a similar change since 1999.