Commit Graph

124552 Commits

Author SHA1 Message Date
Ruslan Ermilov
ad3cf350d3 Dike out WARNS from kernel module makefiles. Kernels and modules
use a different mechanism for setting warning flags, and using
WARNS here only has null or negative effects.

Submitted by:	bde (I think it means "submitted")
2006-05-30 09:38:54 +00:00
Poul-Henning Kamp
77dfeead45 Fix various typos and brainos in last commit.
Submmited by:	Andrew Turner <andrew@fubar.geek.nz>
2006-05-30 07:56:57 +00:00
Hartmut Brandt
1164383c76 This commit was generated by cvs2svn to compensate for changes in r159063,
which included commits to RCS files with non-trunk default branches.
2006-05-30 07:46:52 +00:00
Hartmut Brandt
6f557cf7be Vendor patch: add support for the BITS construct and enumerations in both
gensnmpdef and gensnmptree. Add include and typedef directives to gensnmptree.

Submitted by:	soc-sheryana (partly)
2006-05-30 07:46:52 +00:00
Colin Percival
2a569ec900 Use some features of sh(1) which I didn't know about until today ("read"
can read two variables at once; and suffix pattern deletion) to make the
extract command fork fewer processes.

With the portsnap snapshot and the ports tree in swap-backed memory
disks on my 1.4GHz laptop, this reduces 178800 processes and 195/56/126
seconds of real/user/sys time to 44600 processes and 103/34/60 seconds.
2006-05-30 07:08:41 +00:00
Paul Saab
f83695f5e9 Spin until a request structure is available in the ioctl path. 2006-05-30 06:42:02 +00:00
Greg Lehey
29ef275b38 Don't go past the end of the month with a repetitive entry of the
style "every Monday":

   mon *	Do Foo.

Previously, at the end of the month, this could cause a printout of
the following nature when invoked with -A 7:

   36 May* Do Foo

MFC after:	2 weeks
2006-05-30 04:00:23 +00:00
Brooks Davis
26e3bd3e37 Remove reference to no longer existant /etc/rc.d/pccard.
PR:		conf/98055
Submitted by:	thierry herbelot <thierry at herbelot dot com>
2006-05-30 02:10:01 +00:00
Tor Egge
57051fdc4b Close race between vmspace_exitfree() and exit1() and races between
vmspace_exitfree() and vmspace_free() which could result in the same
vmspace being freed twice.

Factor out part of exit1() into new function vmspace_exit().  Attach
to vmspace0 to allow old vmspace to be freed earlier.

Add new function, vmspace_acquire_ref(), for obtaining a vmspace
reference for a vmspace belonging to another process.  Avoid changing
vmspace refcount from 0 to 1 since that could also lead to the same
vmspace being freed twice.

Change vmtotal() and swapout_procs() to use vmspace_acquire_ref().

Reviewed by:	alc
2006-05-29 21:28:56 +00:00
Matt Jacob
ec5fe39d39 Add acknowledgements to LSI-Logic for support 2006-05-29 20:34:28 +00:00
Matt Jacob
800d362b5d + Change some debug messages to MPT_PRT_NEGOTIATE level (so we
can see the results of SPI negotiation w/o being overwhelmed
with other crap).

+ For U320 devices, check against both Settings *and* DV flags before
deciding whether we need to skip actual SPI settings for a device.

+ Go back to creating a 'physical disk' side of a raid/passthru bus that
is limited to the number of maximum physical disks. Actually, this isn't
probably *quite* right yet for one RAID volume, and if we ever end up
with finding a device that supports more than one RAID volume (not likely),
it probably won't quite be right either.

The problem here is that the creating of this 'physical' passthru sim is
just a cheap way to leverage off the CAM midlayer to do our negotiation
for us on the subentities that make up a RAID volume. It almost causes
more trouble than it is worth because we have to remember which side
we're talking to in terms of forming commands and which target ids are
real and so on. Bleah.

+ Skip trying to actually do SPI settings for the RAID volumes on the
real side of the raid/passthru bus pair- this just confuses the issue.
The underlying real physical devices will have the negotiation performed
and the Raid volume will inherit the resultant settings. At the sime time,
non-RAID devices can be on the same real bus, so *do* perform negotiations
with them.

+ At the end of doing all of the settings twiddling, *ahem*, remember to
go update the settings on the card itself (dunno how this got nuked).

At this point, negotiations *seem* to be being done (again) correctly for
both RAID volumes and their subentities. And they seem to be *mostly*
now right for other non-RAID entities on the same bus (I ended up with
3 out of 8 other disks still at narror/async- haven't the slightest
idea why yes).

Finally, negotiations on a normal bus seem to work (again).

There's still more work coming into this area, but we're in the
final stretch.
2006-05-29 20:30:40 +00:00
Matt Jacob
a0e4c26aae Add a mpt_is_raid_volume function which will tell you whether
the passed target id is one of the RAID VolumeID. This result
is used to decide whether to try and do actual SPI negotiations
on the real side of the raid/passthru bus pair. The reason we
check this is that we can have both RAID volumes and real devices
on the same bus.
2006-05-29 20:20:45 +00:00
Matt Jacob
ac219b98bd Add a MPT_PRT_NEGOTIATION print level. 2006-05-29 20:15:29 +00:00
Olivier Houchard
e1f01b09a6 Nuke sa11x0_attach_args. It's a NetBSDIsm, and we have no use for it.
Submitted by:	kevlo
2006-05-29 19:32:32 +00:00
Maxim Konovalov
8e5b68bcc6 o Add net80211/ to cscope dir list. 2006-05-29 19:29:41 +00:00
Maxim Konovalov
5368db2726 o Add a collection of regression tests for ancillary (control)
data passing for unix domain sockets, stream and datagram.

There are 15 tests:

Test/Type of socket					STREAM	DGRAM
----------------------------------------------------------------------
Sending, receiving cmsgcred				   1      6
Receiving sockcred (listening socket has LOCAL_CREDS)	   2      n/a
Receiving sockcred (accepted socket has LOCAL_CREDS)	   3      n/a
Receiving sockcred					   n/a    7
Sending cmsgcred, receiving sockcred			   4      8
Sending, receiving timestamp				   5      9
Sending, receiving cmsgcred (no control data)		   10     13
Sending cmsgcred, receiving sockcred (no control data)	   11     14
Sending, receiving timestamp (no control data)		   12     15

Currently we pass 8 tests.  All the rest marked as TODO.

PR:		kern/90800
Submitted by:	Andrey Simonenko
2006-05-29 18:40:55 +00:00
Scott Long
4251ecea13 Remove cruft. 2006-05-29 18:05:26 +00:00
Ruslan Ermilov
2916c293b6 Fix build with -Wundef. 2006-05-29 17:37:41 +00:00
Matt Jacob
38a56edbe3 When setting verbose, *set* it, don't *add* it. 2006-05-29 16:59:38 +00:00
Dag-Erling Smørgrav
618b1eec71 Add RELENG_5_5 to the 5.x lineup. 2006-05-29 14:51:52 +00:00
Yoshihiro Takahashi
d803ef6c1d Remove the telnet command because of filesystem full. 2006-05-29 12:55:36 +00:00
John-Mark Gurney
50866a5cf3 remove comment about systems, I got confused which arch one of my systems
was...

Pointed out by:	ru
2006-05-29 10:57:13 +00:00
Maxim Konovalov
f1746dbc9c o Test truncate(2) on fifo: it should ignore the request and
return success.

PR:		kern/98064
Submitted by:	Kirk Russell
2006-05-29 10:56:27 +00:00
Alan Cox
63ad764514 MFalpha/amd64/arm/ia64
Retire pmap_track_modified().  We no longer need it because we do not
 create managed mappings within the clean submap.  To prevent regressions,
 add assertions blocking the creation of managed mappings within the clean
 submap.
2006-05-29 06:12:01 +00:00
Xin LI
56e26c3e7e Unexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY(foo). 2006-05-29 05:43:26 +00:00
David Xu
5d84379dd6 Backout changes trying to inherit floating-point environment, although
POSIX (susv3) requires this, but it is unclear what should be inherited,
duplicating whole 387 stack for new thread seems to be unnecessary and
dangerous. Revert to previous code, force a new thread to be started with
clean FP state.
2006-05-29 02:58:37 +00:00
Ian Dowse
46f1e0d36c If a zero-length bulk or interrupt transfer is requested then assume
USBD_FORCE_SHORT_XFER to ensure that we actually build and execute
a transfer. This means that the various alloc_sqtd_chain functions
will always construct a transfer, so it is safe to modify the
allocated descriptors on return. Previously there were cases where
a zero length transfer would cause a NULL dereference.

Reported by:	bp
2006-05-28 23:37:04 +00:00
Craig Rodrigues
05c0f5c1e2 Remove incorrect null_checkexp() routine. This
will allow the NFS server to call vfs_stdcheckexp() on the exported nullfs
filesystem, not the underlying filesystem being nullfs mounted.
If the lower filesystem was not NFS exported, then the NFS exported
null filesystem would not work.

Pointed out by:	scottl
PR:		kern/87906
MFC after:	1 week
2006-05-28 22:45:52 +00:00
Kris Kennaway
80a8e5da94 Correct typos
MFC after:	2 weeks
2006-05-28 22:15:28 +00:00
Mike Silbersack
3981b687c0 Back out the BUS_DMA_ALLOCNOW change from rev 1.39. Scottl informed me that
it's unnecessary, as the TX/RX lists are static allocations.
2006-05-28 20:35:39 +00:00
Craig Rodrigues
ebbf93fd4c Modify MNT_UPDATE behavior for nullfs so that it does not
return EOPNOTSUPP if an "export" parameter was passed in.
This should allow nullfs mounts to be NFS exported.

PR:		kern/87906
MFC after:	1 week
2006-05-28 20:09:18 +00:00
David Malone
a58327bd09 Avoid unwanted sign extension of indexed byte load in bpf code.
PR:		89748
Submitted by:	Guy Harris <guy@alum.mit.edu>
Obtained from:	NetBSD via OpenBSD
MFC after:	2 weeks
2006-05-28 20:00:02 +00:00
Craig Rodrigues
8f716f89cf Do not log "can't delete export" messages if nmount() returns ENOTSUP.
This eliminates spurious log entries for trying to delete exports
for filesystems like devfs and procfs.
2006-05-28 18:59:28 +00:00
Mike Silbersack
f99da8e0d8 Re-revert back to rev 1.8:
- Reduce the number of RX and TX buffers bfe uses so that it does not use more
  bounce buffers than busdma is willing to allow it to use

See if_bfe.c for comments on why this is now safe to do.
2006-05-28 18:44:39 +00:00
John-Mark Gurney
07691dc0e4 document that I'm still maintaining kqueue and want to review commits to
it before they hit the tree...
2006-05-28 18:42:59 +00:00
Mike Silbersack
678d2a9a8c 1. Make sure that the TX and RX descriptor rings are 4096 byte aligned.
Also use BUS_DMA_ALLOCNOW to be on the safe side.

2.  Look for the Descriptor Error, and Descriptor Protocol Error flags from
    the card, and down the interface if we detect either.

#1 (along with fixes to busdma) makes sure that this card works in all
memory situations.  Prior to this change, it was just luck that 512 count
RX/TX lists were properly aligned.  Now we can use any size of RX/TX lists
and still have them properly aligned.

#2 ensures that we don't get into an endless interrupt storm if busdma fails
us.  Descriptor Protocol Error would occur if we misaligned the TX/RX rings,
and Descriptor Error would occur if we tried to give the card descriptors
or rings with addresses > 1G.  Trying to reinitialize the card isn't going
to fix these errors, hence we don't try.
2006-05-28 18:41:47 +00:00
Mike Silbersack
3d31890277 MFi386 rev 1.78:
Add a quick hack to ensure that bus_dmamem_alloc properly aligns
small allocations with large alignment requirements.

Add a panic to detect cases where we've still failed to properly align.
2006-05-28 18:31:32 +00:00
Mike Silbersack
0d65566db8 Add a quick hack to ensure that bus_dmamem_alloc properly aligns
small allocations with large alignment requirements.

Add a panic to detect cases where we've still failed to properly align.
2006-05-28 18:30:36 +00:00
Alexander Leidinger
39e2bd0bdb Add a disclaimer regarding public/internal functions to every subsystem for
now.

Discussed on:			cvs-all
Helped with the wording:	"Ben Kaduk" <minimarmot@gmail.com>
2006-05-28 15:25:18 +00:00
Alexander Leidinger
451651c72e Use a more appropriate printf format for size_t.
This should unbreak the tinderbox build (64bit architectures).
2006-05-28 14:07:47 +00:00
Stefan Farfeleder
311e80b148 Print the euid after the gid as demanded by POSIX.
Submitted by:	Martin Nagy <nagy.martin@gmail.com>
PR:		96239
MFC after:	2 weeks
2006-05-28 12:32:30 +00:00
Simon L. B. Nielsen
0f9fc191de Revert 1.73, since mounting devfs without a devfs ruleset inside a
jail is a very bad idea security wise.

Approved by:	trhodes (jcamou mentor)
No response:	jcamou
2006-05-28 09:44:13 +00:00
Matteo Riondato
fdf1353cec Mention ruleset #4 (devfsrules_jail) in jail's man page.
MFC after:	3
2006-05-28 08:29:49 +00:00
Robert Watson
4bb260ad78 In execve(), audit the path name being executed. In the future, it
would also be good to audit the interpreter pathname, if any.

Obtained from:	TrustedBSD Project
2006-05-28 08:28:47 +00:00
Diomidis Spinellis
0e1c7fb8ea Add missing % signs in the lock annotations of the functions:
lookup, rename, strategy, islocked
The missing % sign meant that the lines were processed as plain
comments and the corresponding assertions were never generated.
2006-05-28 07:24:12 +00:00
John-Mark Gurney
2f25c9bd65 document that even if magic is newer than magic.mgc, it isn't used
compiling mgc on a big endian system (specificly tested sparc64) breaks,
using one from a little endian system works
2006-05-28 07:15:35 +00:00
David Xu
4f56cbcbd5 Clear high 16 bits of mxcsr register, according to Intel document, if
the high 16 bits is non-zero, fxrstor instruction will generate GP fault,
resulting kernel crash, this bug can be triggered by setcontext and
ptrace(PT_SETXMMREGS).
2006-05-28 06:51:57 +00:00
Diomidis Spinellis
fd6f84b1df Layers are for cakes, not for software.
-- Bart Smaalders

From Performance Anti-patterns. ACM Queue 4(1):44-50. February 2006.
(Author confirmed via email that the quote is his own).
2006-05-28 06:16:15 +00:00
Ian Dowse
368030a87a Use the limited scatter-gather capabilities of ehci, ohci and uhci
host controllers to avoid the need to allocate any multi-page
physically contiguous memory blocks. This makes it possible to use
USB devices reliably on low-memory systems or when memory is too
fragmented for contiguous allocations to succeed.

The USB subsystem now uses bus_dmamap_load() directly on the buffers
supplied by USB peripheral drivers, so this also avoids having to
copy data back and forth before and after transfers. The ehci and
ohci controllers support scatter/gather as long as the buffer is
contiguous in the virtual address space. For uhci the hardware
cannot handle a physical address discontinuity within a USB packet,
so it is necessary to copy small memory fragments at times.
2006-05-28 05:27:09 +00:00
David Xu
1db0da9e2b PCB_NPXINITDONE is cleared by npx_fork_thread. 2006-05-28 04:47:56 +00:00