Commit Graph

137360 Commits

Author SHA1 Message Date
John Baldwin
c55d7e868a File descriptors are an int, but our stdio FILE object uses a short to hold
them.  Thus, any fd whose value is greater than SHRT_MAX is handled
incorrectly (the short value is sign-extended when converted to an int).
An unpleasant side effect is that if fopen() opens a file and gets a
backing fd that is greater than SHRT_MAX, fclose() will fail and the file
descriptor will be leaked.  Better handle this by fixing fopen(), fdopen(),
and freopen() to fail attempts to use a fd greater than SHRT_MAX with
EMFILE.

At some point in the future we should look at expanding the file descriptor
in FILE to an int, but that is a bit complicated due to ABI issues.

MFC after:	1 week
Discussed on:	arch
Reviewed by:	wollman
2008-02-27 19:02:02 +00:00
Robert Watson
ae87be447c Replace somewhat awkward audit trail rotation scheme, which involved the
global audit mutex and condition variables, with an sx lock which protects
the trail vnode and credential while in use, and is acquired by the system
call code when rotating the trail.  Previously, a "message" would be sent
to the kernel audit worker, which did the rotation, but the new code is
simpler and (hopefully) less error-prone.

Obtained from:	TrustedBSD Project
MFC after:	1 month
2008-02-27 17:12:22 +00:00
David Malone
2b2c3b23d1 Dummynet has a limit of 100 slots queue size (or 1MB, if you give
the limit in bytes) hard coded into both the kernel and userland.
Make both these limits a sysctl, so it is easy to change the limit.
If the userland part of ipfw finds that the sysctls don't exist,
it will just fall back to the traditional limits.

(100 packets is quite a small limit these days. If you want to test
TCP at 100Mbps, 100 packets can only accommodate a DBP of 12ms.)

Note these sysctls in the man page and warn against increasing them
without thinking first.

MFC after:      3 weeks
2008-02-27 13:52:33 +00:00
Remko Lodder
64da64c3f7 Add the Epson - CX5400 to the supported lists of epson scanners.
Noticed by:	simon
Forgotten by:	me
2008-02-27 10:57:51 +00:00
Remko Lodder
dac631d53b Add support for the 965GM.
PR:		kern/120978
Submitted by:	Dominic Fandrey <kamikaze at bsdforen dot de>
Approved by:	imp (mentor, implicit), anholt (drm maintainer)
MFC after:	3 days
2008-02-27 10:14:57 +00:00
Scott Long
4b800c7df1 When probing a newly found device, don't automatically assume that the
device supports retrieving a serial number.  Instead, first query the
list of VPD pages it does support, and only query the serial number if
it's supported, else silently move on.  This eliminates a lot of noise
during verbose booting, and will likely eliminate the need for most
NOSERIAL quirks.
2008-02-27 08:47:13 +00:00
Ganbold Tsagaankhuu
6c1f51148a Add my birthday.
Approved by: keramida(mentor)
2008-02-27 07:39:31 +00:00
Ganbold Tsagaankhuu
f7bd8db484 Add myself to doc committers and to keramida's mentee list
Approved by: keramida(mentor)
2008-02-27 07:37:24 +00:00
Tim Kientzle
e29c664a4c Spelling correction, thanks to Joerg Sonnenberger. 2008-02-27 06:16:41 +00:00
Tim Kientzle
a26e9253f6 Optimize skipping over Zip entries.
Thanks to: Dan Nelson, who sent me the patch
MFC after: 7 days
2008-02-27 06:05:59 +00:00
Garrett Wollman
6ca61b39bb stdio is currently limited to file descriptors not greater than
{SHRT_MAX}, so {STREAM_MAX} should be no greater than that.  (This
does not exactly meet the letter of POSIX but comes reasonably close
to it in spirit.)

MFC after:	14 days
2008-02-27 05:56:57 +00:00
Marcel Moolenaar
8678a43066 Avoid hardcoding the kernel link address in the linker script.
Use KERNBASE instead. While here, move the text sections
forward to the beginning of the text segment.
2008-02-27 00:03:23 +00:00
Christian Brueffer
4c2d7071c5 Spell out the name of the month, normalize copyright layout. 2008-02-26 23:16:23 +00:00
Kip Macy
dc50741adc Parameterize for module name 2008-02-26 23:12:55 +00:00
Kip Macy
a8badc1997 Remove unused files 2008-02-26 23:06:22 +00:00
Kip Macy
64a3713337 move remaining binaries in to blob headers 2008-02-26 23:05:05 +00:00
Chad David
6e8ded9f82 Add vfs_mountedfrom.9 to the build. 2008-02-26 21:40:30 +00:00
Chad David
0835bcde34 Add new man page. 2008-02-26 21:39:59 +00:00
Chad David
60c6be61db Add insmntque.9 to the build. 2008-02-26 21:11:05 +00:00
Chad David
19589ea1b1 Add new man page. 2008-02-26 21:09:54 +00:00
Chad David
1f5679e7f0 Link vholdl.9 to vhold.9 2008-02-26 21:03:20 +00:00
Ruslan Ermilov
a059c409c2 Added the "restrict" type-qualifier to the readlink() prototype. 2008-02-26 20:33:52 +00:00
Chad David
b03ee585b4 Document vholdl(9)
No longer refer to vbusy(9) or vfree(9)
2008-02-26 20:25:01 +00:00
Chad David
96872be38c Refer to vrefcnt(9) 2008-02-26 20:13:08 +00:00
Chad David
07fbcd3aac Minor grammar fixup. 2008-02-26 20:11:37 +00:00
Chad David
40f7fef0d0 Add vrefcnt.9 to the build. 2008-02-26 20:10:32 +00:00
Chad David
b299ca2dc3 Add new man page. 2008-02-26 20:10:05 +00:00
Remko Lodder
185cd0fd95 Add support for the EPSON CX5400 scanner
PR:		usb/120980
Submitted by:	Christophe Etcheverry <cetcheve at gmail dot com>
MFC after:	3 days
Approved by:	imp (mentor, implicit for trivial changes)
2008-02-26 18:19:39 +00:00
Pav Lucistnik
677736aa9c - Add support for Axesstel MV100H, as used on CDMA network operated by O2 CZ 2008-02-26 18:12:32 +00:00
Alan Cox
688559667f Correct a long-standing error in vm_object_page_remove(). Specifically,
pmap_remove_all() must not be called on fictitious pages.  To date,
fictitious pages have been allocated from zeroed memory, effectively
hiding this problem because the fictitious pages appear to have an empty
pv list.  Submitted by: Kostik Belousov

Rewrite the comments describing vm_object_page_remove() to better
describe what it does.  Add an assertion.  Reviewed by: Kostik Belousov

MFC after: 1 week
2008-02-26 17:16:48 +00:00
Pietro Cerutti
253d42b75f - Add myself to ports committers and to miwi's mentee list
Approved by:	miwi (mentor)
2008-02-26 15:38:46 +00:00
Pietro Cerutti
c93cf57f3d - Add my birthday
Approved by:	miwi (mentor)
2008-02-26 15:31:30 +00:00
Ken Smith
ecdaaa7050 Sync list of directories to look for packages in to current releases
available.

MFC after:	3 days
2008-02-26 14:35:01 +00:00
Konstantin Belousov
e30cf87ba1 Do not assert any locks for VOP_PRINT. In particular, do not assert that
the vnode interlock is not held. vn_printf() already correctly handles
locked and unlocked vnode interlocks, and all the in-tree vop_print
methods are interlock-agnostic.

Some code calls vprintf() with the vnode interlock held, that causes
unjustified panics with INVARIANTS (ffs_syncvnode() as example).

Reported by:	Peter Holm
2008-02-26 12:16:35 +00:00
Robert Watson
1fb18eea38 Remove errant % in license comment.
MFC after:	3 days
2008-02-26 11:45:32 +00:00
Robert Watson
18d59070d6 On the ixp425, when we fail to initialize the memory rman instance, the
panic message should read "memory", not "IRQ".

MFC after:	3 days
2008-02-26 11:44:41 +00:00
Konstantin Belousov
e6591b84ff Rename fdescfs vnode from "fdesc" to "fdescfs" to avoid name collision
of the vnode lock with the fdesc_mtx mutex. Having different kinds of
locks with the same name confuses witness.
2008-02-26 10:10:55 +00:00
Robert Watson
18ff731caa Add "Make MPSAFE" to the Coda todo list.
MFC after:	3 days
2008-02-26 09:27:47 +00:00
Scott Long
2ca9ba94ba Add a missing unlock to an error path fro XPT_DEBUG handling. 2008-02-26 08:09:29 +00:00
Tim Kientzle
35f4ae0981 Rename the archive_endian.h functions to avoid name clashes
with NetBSD's sys/endian.h file.

Pointed out by: Joerg Sonnenberger
2008-02-26 07:17:47 +00:00
Xin LI
1aaf5f440f In pass1(), cap inosused to fs_ipg rather than allowing arbitrary
number read from cylinder group.  Chances that we read a smarshed
cylinder group, and we can not 100% trust information it has
supplied.  fsck_ffs(8) will crash otherwise for some cases.
2008-02-26 03:08:22 +00:00
Xin LI
33663c7246 In pass2check(): Be more strict with the inode information before further
processing the information.  chk1 is more prone to crash when insane
information is provided by the on-disk inode, and does not even work
if the inode is being smarshed badly.
2008-02-26 03:05:48 +00:00
Xin LI
8f0931174a Be more careful when checking superblock. We have already checked
whether fs_bsize is larger than MINBSIZE, which is larger than the
value that is used to compared with fs_bsize, the sizeof fs, so the
check followed, will be always true.

By inspecting the code and some old commit log, I believe that the
check must be that *fs_sbsize* is larger than sizeof fs.  We round
up the size to nearest dev_bsize, as the smallest accepted fs_sbsize,
personally, I think this can be even changed to equal, because this
number is mostly an invariant in file systems.

With this check, fsck_ffs(8) will be more picky and has better
chance rejecting bad first superblock rather than referring to bad
value it supplied, thus gives better chance for it to check the
filesystem carefully.
2008-02-26 03:03:17 +00:00
Kip Macy
404825a72b Move firmware in to separate module that can be compiled statically in to the kernel
Add utility for converting future firmware revs to a C header file
2008-02-26 03:02:20 +00:00
John Baldwin
23e30a506b Support the VIA C7 Eden CPU and treat it just like a C7 Esther. We may
want to adjust this code to just assume that all CPUs >= Esther should
be checked for the extended cpuid flags register.

MFC after:	3 days
PR:		i386/119491
2008-02-25 22:42:33 +00:00
Bruce Evans
e822ea5b2a Inline __ieee754__rem_pio2f(). On amd64 (A64) and i386 (A64), this
gives an average speedup of about 12 cycles or 17% for
9pi/4 < |x| <= 2**19pi/2 and a smaller speedup for larger x, and a
small speeddown for |x| <= 9pi/4 (only 1-2 cycles average, but that
is 4%).

Inlining this is less likely to bust caches than inlining the float
version since it is much smaller (about 220 bytes text and rodata) and
has many fewer branches.  However, the float version was already large
due to its manual inlining of the branches and also the polynomial
evaluations.
2008-02-25 22:19:17 +00:00
John Baldwin
af6e49e963 Remove a stale prototype I missed when converting the kld support over to
hooking into gdb's shared library infrastructure.
2008-02-25 22:04:07 +00:00
Alexander Motin
db3408aed0 Fix incorrect constant used in rev. 1.146 that broke node writer locking. 2008-02-25 21:24:53 +00:00
Attilio Rao
100a4abc46 Remove a spourious Giant acquisition.
The code seems pretty MPSAFE and Giant is held over kproc_exit() which
at lowel calls exit1(). exit1() requires Giant to be unowned so this
opens a window for races.

Reported by:	Bryan Venteicher <bryanv at daemoninthecloset dot org>
Tested by:	Bryan Venteicher <bryanv at daemoninthecloset dot org>
2008-02-25 21:09:16 +00:00
Robert Watson
303d3f35fb Rename several audit functions in the global kernel symbol namespace to
have audit_ on the front:

- canon_path -> audit_canon_path
- msgctl_to_event -> audit_msgctl_to_event
- semctl_to_event -> audit_semctl_to_event

MFC after:	1 month
2008-02-25 20:28:00 +00:00