Commit Graph

123488 Commits

Author SHA1 Message Date
Marcel Moolenaar
5991a4f811 In kdb_trap(), change the type of the local variable 'intr' from int
to register_t, as intr_disable() returns the latter and register_t
may be wider than int.

Pointed out by: marius@
2006-04-03 20:55:52 +00:00
Ceri Davies
bb0d5fd575 Bump .Dd for the birthtime options. 2006-04-03 20:53:34 +00:00
Ceri Davies
31d534254e Add -Btime, -Bnewer, -Bmin, -newerB[Bacmt], -newer[acmt]B options to
work with the st_birthtime field of struct stat.

'B' has been chosen to match the format specifier from stat(1).

Approved by:	jhb
MFC after:	2 weeks
2006-04-03 20:36:37 +00:00
Alexander Leidinger
95529bcb14 Milosz (sorry for not using the right 'l', it will not display corretly
in the commit log) submitted support for some NO_* knobs for delete-old*
and check-old. I converted it to the new WITHOUT_* knobs (more correctly:
MK_*) and added some dummy ones so that people can see what's missing.

Volunteers can have a look at http://phk.freebsd.dk/misc/build_options/
for a list of files.

The location looks a little bit odd to me, but I don't care about the
color of this bikeshed and follow the suggestion of our build
infrastructure guru to place it "somewhere under src/tools/ please". [1]
The build/mk/ directory looks more sane to me than the other ones there.

Submitted by:	milosz.galazka@gmail.com
Suggested by:	ru [1]
2006-04-03 18:42:44 +00:00
Sam Leffler
a585a9a1bc o add opt_ath.h enable tweaking various config parameters for the driver
without modifying the source code
o default debug msgs and diag support to off

MFC after:	3 days
2006-04-03 18:14:02 +00:00
Marcel Moolenaar
2fae8f5aed Replace critical_enter() and critical_exit() in kdb_trap() with
intr_disable() and intr_restore() resp. Previously, critical
regions would have interrupts disabled, but that was changed.
Consequently, the debugger could run with interrupts enabled.
This could cause problems for the low-level console code where
received characters would trigger an interrupt that causes
the interrupt handler to read the character instead of the
cngetc() function.
2006-04-03 17:48:09 +00:00
Ariff Abdullah
facebb04a5 Add device ID for nForce 410 MCP audio controller.
PR:		kern/95257
Submitted by:	cenix <cenixxx at gmail dot com>
MFC after:	3 days
2006-04-03 17:37:27 +00:00
Robert Watson
cb895fb9b0 In TCP notify routines, check inpcb for INP_TIMEWAIT and INP_DROPPED.
The INP_DROPPED check replaces the current NULL checks; the INP_TIMEWAIT
checks appear to have always been required, but not been there, which
is/was a bug.  This avoids unconditionally casting of in_ppcb to a tcpcb,
when it may be a twtcb, which may have resulted in obscure ICMP-related
panics in earlier releases.

MFC after:	3 months
2006-04-03 14:07:50 +00:00
Robert Watson
afa39e25c4 Change inp_ppcb from caddr_t to void *, fix/remove associated related
casts.

Consistently use intotw() to cast inp_ppcb pointers to struct tcptw *
pointers.

Consistently use intotcpcb() to cast inp_ppcb pointers to struct tcpcb *
pointers.

Don't assign tp to the results to intotcpcb() during variable declation
at the top of functions, as that is before the asserts relating to
locking have been performed.  Do this later in the function after
appropriate assertions have run to allow that operation to be conisdered
safe.

MFC after:	3 months
2006-04-03 13:33:55 +00:00
Robert Watson
43f56a32a0 Style tweaks: convert to ANSI from K&R function prototypes.
MFC after:	3 months
2006-04-03 12:59:27 +00:00
Robert Watson
2fc5ae87d0 Update comment on tcp_close() for new world order.
MFC after:	3 months
2006-04-03 12:52:13 +00:00
Robert Watson
e6e65783d6 Clarify comment on handling of non-timewait TCP states in
tcp_usr_detach().

MFC after:	3 months
2006-04-03 12:43:56 +00:00
Robert Watson
fc19db6c7b Add a second pass to the close-before-accept test using a call to the
tcp drop sysctl.  This should exercise the ECONNABORTED accept case.
2006-04-03 11:57:41 +00:00
Robert Watson
fa38deac65 Fix up locking surrounding tcp_drop sysctl: in the new world order, we
don't free inpcbs until after the socket is closed, so we always need
to unlock an inpcb after calling tcp_drop() on it.

MFC after:	3 months
2006-04-03 11:57:12 +00:00
Robert Watson
1b2c980983 Add regression test for tcpdrop sysctl. 2006-04-03 11:34:36 +00:00
Robert Watson
4f29da19bd Add a regression test to exercise the case where accept() is called and
the next waiting socket has had a close on the remote endpoint already.
2006-04-03 10:08:35 +00:00
Robert Watson
3d2d3ef434 After checking for SO_ISDISCONNECTED in tcp_usr_accept(), return
immediately rather than jumping to the normal output handling, which
assumes we've pulled out the inpcb, which hasn't happened at this
point (and isn't necessary).

Return ECONNABORTED instead of EINVAL when the inpcb has entered
INP_TIMEWAIT or INP_DROPPED, as this is the documented error value.

This may correct the panic seen by Ganbold.

MFC after:	1 month
Reported by:	Ganbold <ganbold at micom dot mng dot net>
2006-04-03 09:52:55 +00:00
Robert Watson
a34f6c1e1d Correct incorrect assertion in div_bind(): inp must not be NULL here.
Reported by:	tegge
MFC after:	3 months
2006-04-03 09:01:17 +00:00
Marcel Moolenaar
4437e2615f Remove unused variable 'error'. Forgotten in previous commit. 2006-04-02 21:58:09 +00:00
Marcel Moolenaar
5418a8aead Don't claim a SAB82532. We have scc(4) for that. 2006-04-02 21:50:45 +00:00
Marcel Moolenaar
8d1289fe6d Eliminate the sc_hasfifo flag from the softc. It was only used by
the NS8250 class driver. The UART has FIFOs if sc_rxfifosz>1, so
test for that instead.
While here properly initialize sc_rxfifosz and sc_txfifosz in the
case the UART doesn't have FIFOs.
2006-04-02 21:45:54 +00:00
Marcel Moolenaar
81eb3f0f5f Add scc(4). 2006-04-02 21:00:17 +00:00
Marcel Moolenaar
a1010c8d03 Remove uart(4) as it's supported on all architectures and that is the
default.
2006-04-02 20:59:40 +00:00
Stefan Farfeleder
b333fbe98d Add test cases that check utility syntax errors and redirection errors. For
special built-in utilities they must terminate the shell, for other
utilities only a error message shall be written.  We currently fail both
tests.
2006-04-02 19:02:49 +00:00
Stefan Farfeleder
e5f1cf0838 Issue an error when . (dot) is invoked without a filename. The synopsis
is just ". file" according to POSIX, however many other shells allow
arguments to be passed after the file.  For compatibility (we even use that
feature in buildworld) additional arguments are not considered to be an
error, even though this shell does not do anything with the arguments at all.
2006-04-02 18:51:32 +00:00
Stefan Farfeleder
905330ab78 Use -s to flag POSIX's "special built-in" utilities in builtins.def. Add a
new member to struct builtincmd and set it to 1 if -s was specified.  This
is done because there are cases where special builtins must be treated
differently from other builtins.

Obtained from:	NetBSD (builtins.def part)
2006-04-02 18:43:33 +00:00
Hiroki Sato
52f4680611 Fix a typo: s/&man.rfcomm.pppd.8;/&man.rfcomm.sppd.1;/. 2006-04-02 18:26:48 +00:00
Robert Watson
953b5606df During reformulation of tcp_usr_detach(), the call to initiate TCP
disconnect for fully connected sockets was dropped, meaning that if
the socket was closed while the connection was alive, it would be
leaked.  Structure tcp_usr_detach() so that there are two clear
parts: initiating disconnect, and reclaiming state, and reintroduce
the tcp_disconnect() call in the first part.

MFC after:	3 months
2006-04-02 16:42:51 +00:00
Hiroki Sato
7d5bf96f77 New release notes:
hwpmc(4) and pmcstat(8) profiling support for dynamically-loaded
	objects, and pmcstat(8) network logging support added[1].

Fix incorrect entries:
	gmirror/graid3 uses parallel I/O request for synchronization now.
	The parallel I/O request itself has been already supported[2].

Spotted by:	jkoshy[1] and pjd[2]
2006-04-02 14:53:28 +00:00
Hiroki Sato
d2af7d9ce0 Fix typos and the following incorrect entries:
kbdmux(4) GENERIC support currently in amd64 and i386 only[1],
	uart(4) GENERIC support currently not in pc98[1],
	speaker(4) on amd64 entry needs arch="amd64"[2],
	hptmv(4) update entry needs arch="amd64,i386"[2], and
	OpenSSH 4.3p1 import has not been merged yet[2].

Spotted by:	nyan[1] and delphij[2]
2006-04-02 14:25:12 +00:00
Xin LI
0a70855254 MFen 1.903 -> 1.907
Obtained from:	FreeBSD Simplified Chinese Project
2006-04-02 14:14:37 +00:00
Joseph Koshy
302cbb9054 - Teach pmcstat(8) to log over the network; the -O option now
takes a host:port specification.
- Update the manual page and add an example showing how log
  over the network using pmcstat(8) and nc(1).  Document the
  current inability to process logs in cross-platform manner.
- Have pmcstat_open_log() call err(3) directly in case
  of an error; this simplifies error handling in its caller.

MFC after:	1 week
2006-04-02 12:52:16 +00:00
Robert Watson
876f7f842a When running the second part of the test, kill off the server process from
the first part before starting, or the TCP port we want to bind may be in
use still.  Sleep for a short period between tests.

Use SIGTERM instead of SIGKILL.
2006-04-02 11:09:37 +00:00
Robert Watson
dfe0ec64aa Pass the right pid into the parent and child tasks so that when a test
fails, we kill the right partner process.
2006-04-02 11:03:05 +00:00
Robert Watson
8c4d74c408 Add makefile for tcpsocktimewait missed in previous commit. 2006-04-02 10:50:46 +00:00
Hiroki Sato
3221c33333 Update release notes (round 2, until Mar 2006):
file descriptor handling bug fixed,
	support for copying console messages to remote gdb(1),
	kbdmux(4) now in GENERIC by default,
	scc(4) for generic serial devices added,
	net.inet.ip.portrange.reserved[high|low] for IPv6,
	ata(4) USB mass storage class support,
	gmirror kernel crash dump support,
	gmirror and graid3 parallel I/O request support,
	mfi(4) for LSI MegaRAID SAS controller family added,
	getfacl(1) -q option added,
	gvinum(8) resetconfig sub-command support,
	libarchive(3) tp format support removed,
	libarchive(3) POSIX.1e EA support added,
	libc symbol map added,
	libm symbol map added,
	ls(1) -U option added,
	mdconfig(8) XML device listing support,
	mdconfig(8) -u option now supports comma-separated multiple devices,
	BIND9 DNS resolver library imported,
	strtonum(3) from OpenBSD,
	rc.d/ike removed,
	GNU Readline library updated to 5.1,
	OpenSSH updated to 4.3p1,
	hostapd updated to 0.4.8,
	WPA supplicant updated to 0.4.8,
	zlib updated to 1.2.3,
	pkg_add(1) -F option added,
	portsnap(1) HTTP_PROXY_AUTH handling bug fixed,
	"make showconfig" in src/Makefile added, and
	/etc/src.conf added.
2006-04-02 07:56:48 +00:00
Tim Kientzle
b8c95d3fe1 If you see a broken symlink, don't try to follow it,
just archive it as a symlink, even if -h was specified.

Thanks to: Jin Guojun
PR: bin/95175
MFC After: 1 week
2006-04-02 07:13:11 +00:00
Alan Cox
9c6a71e4ca Introduce pmap_try_insert_pv_entry(), a function that conditionally creates
a pv entry if the number of entries is below the high water mark for pv
entries.

Use pmap_try_insert_pv_entry() in pmap_copy() instead of
pmap_insert_entry().  This avoids possible recursion on a pmap lock in
get_pv_entry().

Eliminate the explicit low-memory checks in pmap_copy().  The check that
the number of pv entries was below the high water mark was largely
ineffective because it was located in the outer loop rather than the
inner loop where pv entries were allocated.  Instead of checking, we
attempt the allocation and handle the failure.

Reviewed by: tegge
Reported by: kris
MFC after: 5 days
2006-04-02 05:45:05 +00:00
Chuck Lever
7d8a7e19c7 rick says:
The following bug was just identified in OpenBSD and it looks like the same
bug exists in the other BSDen NFS servers.

A Linux client (don't know which version, but you can look at
	http://bugzilla.kernel.org/show_bug.cgi?id=6256)
does a Setattr of mtime to the server's time, where the file is mode 0664 and
the client user has group access (ie. caller is not the file owner).

The BSD servers fail the Setattr with EPERM, since the VA_UTIMES_NULL flag
isn't set before doing the VOP_SETATTR.

It seems to me that this should be allowed, since it is allowed for a local
utimes(2). If so, the fix is to set VA_UTIMES_NULL for the
"set-time-to-server-time" cases of setting atime and/or mtime.

Submitted by:	rick@snowhite.cis.uoguelph.ca
Reviewed by:	cel
Approved by:	silby
MFC after:	1 week
2006-04-02 04:24:57 +00:00
Robert Watson
b4c2aeb1c4 Add a short regression test that triggers a TCP socket to enter time wait
while the socket is still open; one variant closes the socket while in
time wait, and a second lets time wait expire while the socket is open.
2006-04-02 00:07:38 +00:00
Robert Watson
34af7bae80 Properly handle an edge case previously not handled correctly: a
socket can have a tcp connection that has entered time wait
attached to it, in the event that shutdown() is called on the
socket and the FINs properly exchange before close().  In this
case we don't detach or free the inpcb, just leave the tcptw
detached and freed, but we must release the inpcb lock (which we
didn't previously).

MFC after:	3 months
2006-04-01 23:53:25 +00:00
Scott Long
05603d9017 Saying that asr(4) has a maintainer is like saying that a politician has
integrity.
2006-04-01 21:19:15 +00:00
Hiroki Sato
b664d549da Massive update of the -HEAD release notes (round 1, until Feb 2006):
acpi(4) HPET time counter support,
	acpi_ibm(4) fan control support,
	ddb(4) show lock,
	ddb(4) show sleepq,
	firmware(9) added,
	random(4) MPSAFE,
	new sysctl kern.sigqueue.queue_sigchild,
	brandinfo BI_CAN_EXEC_DYN flag,
	new sysctl kern.forcesigexit,
	RedZone, a buffer corruption protection for kernel's malloc(9),
	security.mac.biba.interfaces_equal for mac_biba,
	POSIX_TIMERS support updated to 200112L,
	initial support for POSIX message queue,
	Xbox support,
	DEFAULTS kernel configuration files for each arch,
	cardbus(4) /dev/cardbus%d.cis device node added,
	ce(4) for Cronyx Tau-PCI/32 added,
	ipmi(4), OpenIPMI (Intelligent Platform Management Interface)
		driver added,
	kbdmux(4) integrated into syscons(4) and kbd,
	uart(4) now in GENERIC kernel,
	uart(4) LOM and RSC support,
	snd_atiixp(4) added and suspend/resume support,
	snd_solo(4) MPSAFE,
	speaker(4) amd64 support,
	uaudio(4) 24/32 bit audio support,
	ath(4) updated to version 0.9.16.16,
	bge(4) Jumbo frame support, big-endian arch support, MPSAFE,
	em(4) updated to version 3.2.18, big-endian arch support,
		performance improvement, suspend/resume support,
	iwi(4) big-endian arch support,
	le(4) for AMD Am7900 LANCE added,
	myri10ge(4) for Myricom Myri10GE adapter added,
	nve(4) updated to version 1.0-0310,
	ti(4) big-endian arch support,
	ufoma(4) for FOMA 3G mobile phone in Japan added,
	vgapci(4) stub driver added,
	arp(8) retransmission algorithm revised,
		new sysctl net.link.ether.inet.log_arp_permanent_modify,
		support for -i <if> with -d -a,
	an experimental BPF Just-In-Time compiler added,
	if_bridge(4) span ports support added,
	if_bridge(4) RFC 3378 EtherIP support,
	ipfw(4) now supports action argument substitution from table lookup,
	ng_bpf(4) BPF Just-In-Time compiler support,
	bug related to NFS over TCP reconnection fixed,
	IPV6_V6ONLY now works for UDP,
	amr(4) performance improvement, ioctl support for MegaRaid Tools,
	ata(4) DMA for kernel dump and dumping to ataraid(4) devices,
	ataraid(4) now supports JMicron ATA RAID metadata,
	gmirror and graid3 disconnect_on_failure sysctls added,
	g_md.ko renamed to geom_md.ko,
	mpt(4) SAS HBA and 64-bit PCI support,
	twa(4) updated to 9.3.0.1,
	geli(8) now allows loading keyfiles before root file system is mounted,
	initial support for SGI's XFS added,
	ACPI-CA updated to 20051021,
	DRM updated to 20051202,
	TrustedBSD OpenBSM version 1.0 alpha 5 imported,
	bsnmpd(1) Host Resources MIB in RFC 2790 support,
	config(8) "nocpu" directive added,
	config(8) now reads DEFAULT if any before the specified config file,
	csh(1) NLS catalog support,
	csup(1), CVSup-compatible client written in C imported,
	devd(8) -f option,
	ftpd(8) change related to PID file creation,
	gbde(8) -k and -K option,
	gpt(8) GPT partition label setting support,
	gvinum(8) now supports to move a subdisk between drives,
	GSS-API version 2 (RFC2743 and RFC2744) implemented,
	jail(8) -J option,
	kdump(1) -H and -s option,
	kgdb(1) -w option,
	libarchive(3) tp format support,
	ln(1) -F option,
	locate(1) -I option,
	mdmfs(8) -P and -E option,
	mergemaster(8) -A option,
	mount(8) "nodev" option removed,
	netstat(1) IPsec protocol stats support,
	periodic(8) daily gmirror, graid3, gstripe, gconcat support,
	pkill(1) -I option,
	rfcomm_pppd(8) -c servicename support,
	rtld(1) ELF symbol versioning support,
	sh(1) "times" built-in command support,
	truss(1) -s option,
	truss(1) now works on FreeBSD/ppc,
	usbd(8) removed in favor of devd(8),
	xargs(1) -r option,
	rc.d/auditd added,
	rc.d/bluetooth, rc.d/hcsecd, rc.d/sdpd added,
	rc.d/ftpd added,
	rc.d/hostapd added,
	rc.d/netif ipv4_addrs_<ifn> support,
	rc.d/rcconf.sh removed and early_late_divider variable added,
	rc.initdiskless now uses tar(1) instead of pax(1),
	rc.d/pccard removed,
	rc.d/ppp-user added (renamed from ppp),
	removable_interfaces variable removed,
	bsnmpd updated from 1.11 to 1.12,
	pkg_add(1) -P option,
	pkg_add(1) and pkg_create(1) -K option,
	pkg_create(1) -x, -E, and -G options,
	local_startup directory now evaluated by rcorder(8) with
		scripts in the base system,
	suffix of startup scripts removed,
	variables "ldconfig_local_dirs" and "ldconfig_local32_dirs" added,
	@cwd in pkg-plist now allows no directory argument, and
	CHECKSUM.MD5's checksum in CHECKSUM.MD5 problem fixed.
2006-04-01 20:55:21 +00:00
John-Mark Gurney
5e6125891f mask out any action when copying the flags from the event to the knote..
Pointed out by:	Václav Haisman
Submitted by:	Dan Nelson (slightly modifed patch)
MFC after:	3 days
2006-04-01 20:15:39 +00:00
Matt Jacob
33f3184660 Fix fat-fingered version define. 2006-04-01 19:49:55 +00:00
Poul-Henning Kamp
75239a017f Add missing #if's for NO_FLOATING_POINT 2006-04-01 19:06:54 +00:00
Marcel Moolenaar
634e63c986 Don't hold the hardware mutex across getc(). It can wait indefinitely
for a character to be received. Instead let getc() do any necesary
locking.
2006-04-01 19:04:54 +00:00
Poul-Henning Kamp
3586fcede9 Overlooked that src.conf was built from here. 2006-04-01 18:34:30 +00:00
Poul-Henning Kamp
c82053233c Have WITHOUT_BIND_MTREE imply WITHOUT_BIND_ETC 2006-04-01 18:11:42 +00:00
Robert Watson
76666abc12 White space consistency with kasserts. Minor style tweaks.
MFC after:	3 months
2006-04-01 16:54:37 +00:00