Commit Graph

124513 Commits

Author SHA1 Message Date
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
David Xu
40310f021d If parent thread never used FPU, the only work is to clear flag
PCB_NPXINITDONE for new thread and let trap code initialize it.
2006-05-28 04:40:45 +00:00
David Xu
38fd748725 When creating a new thread, inherit floating-point environment from
current thread, this is required by POSIX pthread_create document.
2006-05-28 02:03:13 +00:00
Ian Dowse
e97ba859b3 NULL out ii->stdstart and ii->stdend when they are invalid. This
is not necessary for correct operation but makes it clearer that
freed transfer descriptors cannot be accessed.
2006-05-28 01:17:13 +00:00
Ian Dowse
a7c15197cf Fix a harmless typo where the software pointer in the dummy QH for
control transfers did not match the hardware pointer.
2006-05-28 01:07:46 +00:00
Ian Dowse
203eec4b02 Defer axe_tick processing to a USB task, since axe miibus operations
need to sleep. This avoids an INVARIANTS panic. It looks like if_rue
and if_aue need a similar change, but I don't have hardware to test.
2006-05-27 23:46:13 +00:00
Sam Leffler
c824b333f6 avoid null ptr deref
Obtained from:	netbsd
2006-05-27 23:04:30 +00:00
Sam Leffler
2767a3d79c correct static array overrun
Obtained from:	netbsd
2006-05-27 23:03:08 +00:00
Kirill Ponomarev
85184b8b23 Fix using "P" command on empty pattern space. If the "P" command is
used once on a non-empty pattern space and then again on an empty
pattern space, the second usage restores the pattern space length to
the length that it had when the first "P" was used.

PR:		bin/96052
Submitted by:	Andrey Zholos <aaz@althenia.net>
MFC after:	7 days
2006-05-27 19:32:28 +00:00
Kirill Ponomarev
5a890aac57 Add the capability for a trailing scale indicator to cause the
specified size to be read in the more familiar units of kilobytes,
megabytes, gigabytes, terabytes and petabytes.

PR:		bin/50988
Submitted by:	Matthew Seaman <m.seaman@infracaninophile.co.uk>
MFC after:	7 days
2006-05-27 18:27:41 +00:00
Marcel Moolenaar
4f0289b073 Unbreak after previous commit. While here, improve function naming
consistency by s/ssc/ssc_/g.
2006-05-27 17:52:08 +00:00
Matt Jacob
1d79ca0e46 Work in progress toward fixing IM checked in after having
lost one set to a peninsula power failure last night. After
this, I can see both submembers and the raid volumes again,
but speed negotiation is still broken.

Add a mpt_raid_free_mem function to centralize the resource
reclaim and fixed a small memory leak.

Remove restriction on number of targets for systems with IM enabled-
you can have setups that have both IM volumes as well as other devices.

Fix target id selection for passthru and nonpastrhu cases.

Move complete command dumpt to MPT_PRT_DEBUG1 level so that just
setting debug level gets mostly informative albeit less verbose
dumping.
2006-05-27 17:26:57 +00:00
Alexander Leidinger
f510d240d3 Commit the new (old) midi framework. It's based in parts on the NetBSD code,
but large parts are rewritten by matk and tanimura.

This is old code, it's not maintained since 2003. We also don't have a
maintainer for this! Yuriy Tsibizov took it and uses it in his emu10kx
driver. Since the emu10kx driver will enter the tree "soon" (some bugs
have to be fixed after Yuriy return from his holidays), I add it here
already.

This also contains some changes to emu10k1 and cmi, so if you're lucky,
you can now make some kind of use of midi with those soundcards.

To all those poor souls which don't have such a card: feel free to send
patches, we don't have a maintainer for this.

To those which miss a specific feature in the midi code: feel free to
submit patches, we don't have a maintainer for this.

Oh, did I already told that it would be nice if someone would take care
of it? Maintainer with midi equipment wanted! :-)

If you get LOR's, submit a PR and notify multimedia@ please. If you get
panics, submit a PR with a backtrace (compile the sound system into your
kernel instead of using modules in this case) and notify multimedia@
please.

Written by:	matk, tanimura
Submitted by:	"Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
Based upon:	code from NetBSD
2006-05-27 16:51:37 +00:00
Alexander Leidinger
206b17d711 Commit the new (old) midi framework. It's based in parts on the NetBSD code,
but large parts are rewritten by matk and tanimura.

This is old code, it's not maintained since 2003. We also don't have a
maintainer for this! Yuriy Tsibizov took it and uses it in his emu10kx
driver. Since the emu10kx driver will enter the tree "soon" (some bugs
have to be fixed after Yuriy return from his holidays), I add it here
already.

This also contains some changes to emu10k1 and cmi, so if you're lucky,
you can now make some kind of use of midi with those soundcards.

To all those poor souls which don't have such a card: feel free to send
patches, we don't have a maintainer for this.

To those which miss a specific feature in the midi code: feel free to
submit patches, we don't have a maintainer for this.

Oh, did I already told that it would be nice if someone would take care
of it? Maintainer with midi equipment wanted! :-)

If you get LOR's, submit a PR and notify multimedia@ please. If you get
panics, submit a PR with a backtrace (compile the sound system into your
kernel instead of using modules in this case) and notify multimedia@
please.

Written by:	matk, tanimura
Submitted by:	"Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
Based upon:	code from NetBSD
2006-05-27 16:32:05 +00:00
Bruce A. Mah
c9642d72aa MFCs noted: Support for i386 systems with no AT-style keyboard
controller, jail(8) -s (+ fixed a minor grammo whil here), ls(1) -U,
ntp-4.2.0 manpages.
2006-05-27 14:26:49 +00:00
Poul-Henning Kamp
4e1252688c Remove mention of minor number construction. 2006-05-27 10:20:17 +00:00
Simon L. B. Nielsen
f6f4187202 Fix typo in printf string.
MFC after:	1 week
Approved by:	cperciva (mentor)
2006-05-27 09:28:59 +00:00
Xin LI
e38c7f3ef3 extlen and cpp is not used here in linker_search_kld(), so nuke them.
Reported by:	Mingyan Guo <guomingyan at gmail dot com>
MFC After:	2 weeks
2006-05-27 09:21:41 +00:00
Ruslan Ermilov
84c929db19 Fix the output.
Noticed by:	rodrigc
2006-05-27 09:04:43 +00:00
Yoshihiro Takahashi
b6e3627ecb typo. 2006-05-27 04:40:41 +00:00
Craig Rodrigues
e91db40c18 Move call to ignore SIGPIPE signals before calling fork(),
so that both parent and child processes ignore this signal.

PR:             bin/97768
Submitted by:   Gea-Suan Lin <gslin at csie dot nctu dot edu dot tw>
MFC after:      3 days
2006-05-27 02:37:37 +00:00
Mohan Srinivasan
1af6f471ca Fix for a potential attempt to sleep while holding nm_mtx. Caught and reported
by Witness (which forces the mbuf allocation flag to M_NOWAIT).

Reported by: "sekes".
2006-05-26 18:45:55 +00:00
Poul-Henning Kamp
05c3592e13 Update to new console api. 2006-05-26 18:25:34 +00:00
Ed Maste
af8d1678e1 Add sanity checking for QUEUE(3) TAILQs under INVARIANTS (similar to
the LIST checks).  Races may lead to list corruption, which can be
difficult to unravel in a post-mortem analysis.  These checks verify
that the prev and next pointers are consistent when inserting or
removing elements, thus catching any corruption earlier.
2006-05-26 18:17:53 +00:00
Alexander Leidinger
becc5c626d Connect the kernel subsystem API documentation generation framework to
the build infrastructure: "make doxygen"

Changes to the man pages will be made when some defaults are revisited.

Requested by:	gnn
2006-05-26 18:10:06 +00:00
Alexander Leidinger
ff4b8cb7bd This is the kernel subsystem API documentation generation framework.
It uses doxygen to generate the API documentation. For each subsystem
a very small (about 20 lines with comments) subsystem specific Doxyfile
has to be written (have a look at the README for more). All common doxygen
options are specified in a separate file.

The framework is configured to not only generate the HTML version, but also
a PDF version (the paper size is hardcoded to DIN A4 currently and depending
on the subsystem you have to increase some limits in the latex configuration
of your system, the README tells more about this).

It also allows cross-references between the subsystems (it generates doxygen
tag files).

Currently the docs are generated in OBJDIR, but this may change after
coordination with doc@. The makefile is prepared to generate/move various
parts of the generated docs to different destinations.

TARGET_ARCH is respected and some env-vars are set for architecture specific
handling of the source (the README tells more).

Subsystems for which docs are generated:
 - cam                  - crypto                - dev_pci
 - dev_sound            - dev_usb               - geom
 - i4b                  - kern                  - libkern
 - linux                - net80211              - netgraph
 - netinet              - netinet6              - netipsec
 - opencrypto           - vm

Requested by:	gnn
2006-05-26 18:06:07 +00:00
Poul-Henning Kamp
7672c95932 Convert to new console api 2006-05-26 13:54:27 +00:00
Poul-Henning Kamp
a58a1ea03d Convert to new console interface. 2006-05-26 13:51:38 +00:00
Poul-Henning Kamp
a67173a28a Aling to new console and gdb_port semantics 2006-05-26 13:33:28 +00:00
Maxim Konovalov
cc042607e3 s/2005/2006/ for FreeBSD 6.1 and 5.5. 2006-05-26 13:19:46 +00:00
Craig Rodrigues
4df2902f3b Add support for "export" option, to allow NFS exporting
of XFS filesystems.
2006-05-26 13:01:53 +00:00
Craig Rodrigues
ee98eb825b Remove "update" from ffs_opts. It has been moved to global_opts
in vfs_mount.c.
2006-05-26 12:44:12 +00:00
Craig Rodrigues
4ca073e86c Remove calls to vfs_export() for exporting a filesystem for NFS mounting
from individual filesystems.  Call it instead in vfs_mount.c,
after we call VFS_MOUNT() for a specific filesystem.

Approved by:	dumbbell
2006-05-26 11:58:30 +00:00
Poul-Henning Kamp
9b188af13c Eliminate gdb_checkc member from GDB_DBGPORT(), it is never used.
Use polling behaviour for gdb_getc() where convenient, this edges us
closer to the console code.
2006-05-26 11:54:32 +00:00
Poul-Henning Kamp
e8d86c0e50 Don't use GDB_DBGPORT() macro to fill in dummy element in gdb_dbgport_set. 2006-05-26 11:52:59 +00:00
Poul-Henning Kamp
f346afc439 Wrap our drivers gdb_getc() function so that if it returns -1 we
try again.  This way it matches the console behaviour and allows us
to share more code.
2006-05-26 11:52:20 +00:00
Poul-Henning Kamp
3fc7129ed1 Convert to use CONSOLE_DRIVER() macro:
Remove cngetc, rename cncheckc to cngetc (fix GDB console accordingly)
2006-05-26 11:21:52 +00:00
Poul-Henning Kamp
9dd2370db6 If the console has no cncheckc method, use cngetc instead. 2006-05-26 11:00:20 +00:00
Poul-Henning Kamp
56de0c9a17 Add new CONSOLE_DRIVER macro which takes just the name of the console
and constructs the member function names with CPPs' ##.

Do not include the checkc entry as it is going away.
2006-05-26 10:58:39 +00:00
Poul-Henning Kamp
8aed7613bd Don't use CONS_DRIVER() macro to insert dummy element in cons_set 2006-05-26 10:46:38 +00:00