]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoBypass isa_probe_children(9) and directly call bus_generic_attach(9)
marius [Tue, 2 Sep 2008 21:06:28 +0000 (21:06 +0000)]
Bypass isa_probe_children(9) and directly call bus_generic_attach(9)
in order to avoid the invasive probes done by identify-routines of
ISA drivers, which may access unassigned addresses or those of
unrelated devices and thus in turn can trigger master/target aborts
as revealed by r182108 and ahc(4). I think that this is also the
cause of the hang previously seen on B100 blades during boot.
Bypassing isa_probe_children(9) also avoids adding ISA hints, which
just can be wrong for sparc64.

Reported by: gavin

16 years agoAdd support for RLIMIT_NPTS to limits(1).
ed [Tue, 2 Sep 2008 19:13:24 +0000 (19:13 +0000)]
Add support for RLIMIT_NPTS to limits(1).

After the MPSAFE TTY import we support an additional rlimit, called
RLIMIT_NPTS. This limit allows you to cap the amount of pseudo-terminals
allocated by one user.

We forgot to add support for this limit to limits(1), which means it
crashed. Add the proper bits to make it work like it should.
Unfortunately not all shells actually implement the RLIMIT, so
unfortunately I suspect it to be broken with certain shells.

Submitted by: Yuriy Tsibizov <yuriy tsibizov gfk ru>

16 years ago- When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386
kib [Tue, 2 Sep 2008 17:52:11 +0000 (17:52 +0000)]
- When executing FreeBSD/amd64 binaries from FreeBSD/i386 or Linux/i386
  processes, clear PCB_32BIT and PCB_GS32BIT bits [1].

- Reread the fs and gs bases from the msr unconditionally, not believing
  the values in pcb_fsbase and pcb_gsbase, since usermode may reload
  segment registers, invalidating the cache. [2].

Both problems resulted in the wrong fs base, causing wrong tls pointer
be dereferenced in the usermode.

Reported and tested by: Vyacheslav Bocharov <adeepv at gmail com> [1]
Reported by: Bernd Walter <ticsoat cicely7 cicely de>,
Artem Belevich <fbsdlist at src cx>[2]
Reviewed by: peter
MFC after: 3 days

16 years agoUse size_t to store the return value of ttydisc_getc().
ed [Tue, 2 Sep 2008 17:13:11 +0000 (17:13 +0000)]
Use size_t to store the return value of ttydisc_getc().

The ttydisc_getc() routine obtains a read length from ttyoutq_read().
For no valid reason, the current code stores this value in an int, and
returns a size_t. There is no need to perform this useless conversion.

Obtained from: //depot/projects/mpsafetty/...

16 years agoRemove XXXRW in soreceive_dgram that proves unnecessary.
rwatson [Tue, 2 Sep 2008 16:55:21 +0000 (16:55 +0000)]
Remove XXXRW in soreceive_dgram that proves unnecessary.

Remove unused orig_resid variable in soreceive_dgram.

Submitted by: alfred
X-MFC with: soreceive_dgram (r180198, r180211)

16 years agoAdd gprof MIPS MD header and enable building gprof.
obrien [Tue, 2 Sep 2008 15:35:47 +0000 (15:35 +0000)]
Add gprof MIPS MD header and enable building gprof.

Obtained from: Juniper Networks

16 years agoAllow again compilation w/o GNU readline. There are conditionals in
roberto [Tue, 2 Sep 2008 14:00:17 +0000 (14:00 +0000)]
Allow again compilation w/o GNU readline.  There are conditionals in
{ntpdc,ntpq}/Makefile.

Submitted by: Ben Kelly <bkelly@vadev.org>

16 years agoImport ioctl updates for latest rev of cxgbtool
kmacy [Tue, 2 Sep 2008 07:47:14 +0000 (07:47 +0000)]
Import ioctl updates for latest rev of cxgbtool

Obtained from: Chelsio Inc.
MFC after: 3 days

16 years agoFix an ABI breakage found after the import that will be part of the
gshapiro [Tue, 2 Sep 2008 04:53:24 +0000 (04:53 +0000)]
Fix an ABI breakage found after the import that will be part of the
next version of sendmail.  Putting it in now for the upcoming 7-BETA
and 6-BETA test releases.

Submitted by: Mike Tancsa

16 years agofree ifp allocated at ieee80211_vap_setup.
weongyo [Tue, 2 Sep 2008 04:49:35 +0000 (04:49 +0000)]
free ifp allocated at ieee80211_vap_setup.

Reviewed by: sam, thompsa

16 years agoUse RUSAGE_SELF for the current process instead of hardcoded value
kevlo [Tue, 2 Sep 2008 02:59:38 +0000 (02:59 +0000)]
Use RUSAGE_SELF for the current process instead of hardcoded value

16 years agoUse RUSAGE_SELF for the current process instead of hardcoded value
kevlo [Tue, 2 Sep 2008 02:59:13 +0000 (02:59 +0000)]
Use RUSAGE_SELF for the current process instead of hardcoded value

16 years agoAccomodate the fact that the number of l1 pages varies with the size of the initially
kmacy [Tue, 2 Sep 2008 02:55:45 +0000 (02:55 +0000)]
Accomodate the fact that the  number of l1 pages varies with the size of the initially
allocated memory - this lets us boot with 3GB

MFC after: 1 month

16 years agoFix a multiple locking bug in bm(4) that could cause panics on a WITNESS-enabled...
nwhitehorn [Tue, 2 Sep 2008 02:50:52 +0000 (02:50 +0000)]
Fix a multiple locking bug in bm(4) that could cause panics on a WITNESS-enabled kernel.

Approved by: marcel (mentor)
MFC after: 1 day

16 years agoFix problem with large memory configuration by ensuring that all NKPT
kmacy [Tue, 2 Sep 2008 01:32:52 +0000 (01:32 +0000)]
Fix problem with large memory configuration by ensuring that all NKPT
page table pages have been zeroed before entering them in the page
directory

MFC after: 1 month

16 years agoPer email to arch@ a little while ago (that was greeted with silence),
imp [Mon, 1 Sep 2008 23:59:00 +0000 (23:59 +0000)]
Per email to arch@ a little while ago (that was greeted with silence),
prefer the more common > ${.TARGET} over > opt_foo.h in modules
makefiles.

16 years agoBelatedly add a notice about the reversed order of preference for OpenSSH
des [Mon, 1 Sep 2008 23:50:56 +0000 (23:50 +0000)]
Belatedly add a notice about the reversed order of preference for OpenSSH
authentication keys.

16 years agoWe're not quite ready for the full %(endian_spec).
obrien [Mon, 1 Sep 2008 23:09:45 +0000 (23:09 +0000)]
We're not quite ready for the full %(endian_spec).

16 years agoUpdate for version 9.4.2-P2
dougb [Mon, 1 Sep 2008 22:55:23 +0000 (22:55 +0000)]
Update for version 9.4.2-P2

16 years agoMerge from vendor/bind9/dist as of the 9.4.2-P2 import
dougb [Mon, 1 Sep 2008 22:54:49 +0000 (22:54 +0000)]
Merge from vendor/bind9/dist as of the 9.4.2-P2 import

16 years agoAdd __unix__. Tweak __KPRINTF_ATTRIBUTE__ while I'm here.
obrien [Mon, 1 Sep 2008 22:22:44 +0000 (22:22 +0000)]
Add __unix__.  Tweak __KPRINTF_ATTRIBUTE__ while I'm here.

16 years agoWrap an 81 column SYSCTL_NODE decleration.
brooks [Mon, 1 Sep 2008 19:25:27 +0000 (19:25 +0000)]
Wrap an 81 column SYSCTL_NODE decleration.

Obtained from: //depot/projects/vimage-commit2/...

16 years agoRemove unneeded D_NEEDMINOR from cpuctl(4).
ed [Mon, 1 Sep 2008 18:56:01 +0000 (18:56 +0000)]
Remove unneeded D_NEEDMINOR from cpuctl(4).

The D_NEEDMINOR flag was introduced for drivers that do not actually
depend on storing a device unit/minor number, but require the ability to
address the cdevs by this number, which is used by clone_create().

The cpuctl(4) driver sets D_NEEDMINOR, even though it doesn't use the
clone_create() API. Remove the flag, because maybe we want to get rid of
it somewhere in the far future.

16 years agoAdd FreeBSD/MIPS support to GCC.
obrien [Mon, 1 Sep 2008 18:46:03 +0000 (18:46 +0000)]
Add FreeBSD/MIPS support to GCC.

16 years agoGDB isn't building on MIPS. Temporarily disable, to revisit soon.
obrien [Mon, 1 Sep 2008 18:18:19 +0000 (18:18 +0000)]
GDB isn't building on MIPS.  Temporarily disable, to revisit soon.

16 years agoTruss and gprof doesn't build for MIPS.
obrien [Mon, 1 Sep 2008 18:03:09 +0000 (18:03 +0000)]
Truss and gprof doesn't build for MIPS.

16 years agoCorrect a silly typo I introduced: withing -> within.
yar [Mon, 1 Sep 2008 17:48:40 +0000 (17:48 +0000)]
Correct a silly typo I introduced: withing -> within.

Noticed by: das

16 years agoWrap a line that became too long with the addition of V_.
brooks [Mon, 1 Sep 2008 17:15:29 +0000 (17:15 +0000)]
Wrap a line that became too long with the addition of V_.

(This file contains many more unwrapped or badly wrapped lines.)

16 years agoRemove some unused files.
des [Mon, 1 Sep 2008 16:34:02 +0000 (16:34 +0000)]
Remove some unused files.

16 years agoRemove extraneous NULL pointer check - the pointer is guaranteed to be non-NULL.
obrien [Mon, 1 Sep 2008 15:10:03 +0000 (15:10 +0000)]
Remove extraneous NULL pointer check - the pointer is guaranteed to be non-NULL.

16 years agoMinimize changes CURRENT<->releng7.
obrien [Mon, 1 Sep 2008 15:04:38 +0000 (15:04 +0000)]
Minimize changes CURRENT<->releng7.

16 years agoSet SIZEOF_LONG_INT and SIZEOF_LONG_LONG_INT to plausible values. They
des [Mon, 1 Sep 2008 14:15:57 +0000 (14:15 +0000)]
Set SIZEOF_LONG_INT and SIZEOF_LONG_LONG_INT to plausible values.  They
aren't used for anything, but that's no excuse for being silly.

16 years agoIn rev. 1.17 (r33548) of msdosfs_fat.c, relative cluster numbers were
kib [Mon, 1 Sep 2008 13:18:16 +0000 (13:18 +0000)]
In rev. 1.17 (r33548) of msdosfs_fat.c, relative cluster numbers were
replaced by file relative sector numbers as the buffer block number when
zero-padding a file during extension. Revert the change, it causes wrong
blocks filled with zeroes on seeking beyond end of file.

PR: kern/47628
Submitted by: tegge
MFC after: 3 days

16 years agouse bigger local variable to calculate free space
ticso [Mon, 1 Sep 2008 12:32:40 +0000 (12:32 +0000)]
use bigger local variable to calculate free space
int overflows at 1T free space

16 years agoWhen setting error to EINVAL in 'fvp == tdvp' case, jump to out label,
pjd [Mon, 1 Sep 2008 10:11:39 +0000 (10:11 +0000)]
When setting error to EINVAL in 'fvp == tdvp' case, jump to out label,
because if not, the error will be later overwritten by
mac_vnode_check_rename_to() call.

Reviewed by: rwatson

16 years agoBring cxgbtool up to date with version 1.5
kmacy [Mon, 1 Sep 2008 07:50:04 +0000 (07:50 +0000)]
Bring cxgbtool up to date with version 1.5

Obtained from: Chelsio Inc.
MFC after: 3 days

16 years agoStyle: Use ARCHIVE_VERSION_NUMBER to conditionalize tests on
kientzle [Mon, 1 Sep 2008 05:38:33 +0000 (05:38 +0000)]
Style:  Use ARCHIVE_VERSION_NUMBER to conditionalize tests on
the particular libarchive version being tested instead of the
deprecated ARCHIVE_API_VERSION and ARCHIVE_VERSION_STAMP macros.

16 years agoDon't check if an interface can do tcp offload if there are no offload devices regist...
kmacy [Mon, 1 Sep 2008 05:30:22 +0000 (05:30 +0000)]
Don't check if an interface can do tcp offload if there are no offload devices registered on the system.

Suggested by: rwatson
MFC after: 3 days

16 years agoMfP4: set/unset tracking for atime, ctime, mtime, and size fields.
kientzle [Mon, 1 Sep 2008 04:54:29 +0000 (04:54 +0000)]
MfP4: set/unset tracking for atime, ctime, mtime, and size fields.
This generalizes the existing set/unset tracking for hardlink/symlink
fields and extends it to cover non-string fields.  Eventually, this
will be further extended to cover most fields.

In particular, this is needed to correctly detect when time fields
are missing (for example, reading ustar archives doesn't set atime or
ctime) for proper time restore and is helpful when trying to determine
whether to overwrite data when restoring hardlinks.

This commit updates the tests but not the docs.

16 years agoSort the list of format names.
kientzle [Mon, 1 Sep 2008 02:50:53 +0000 (02:50 +0000)]
Sort the list of format names.

16 years agoUse the "start_time" (time at which the restore process began)
kientzle [Mon, 1 Sep 2008 02:50:24 +0000 (02:50 +0000)]
Use the "start_time" (time at which the restore process began)
to fill in a missing atime instead of substituting mtime.

PR: bin/124915

16 years agoTrace interrupts with KTR_INTR.
marcel [Sun, 31 Aug 2008 23:54:22 +0000 (23:54 +0000)]
Trace interrupts with KTR_INTR.

16 years agoTurn cc_tools/Makefile and Makefile.tgt into a "linear" read. Shared
obrien [Sun, 31 Aug 2008 23:38:28 +0000 (23:38 +0000)]
Turn cc_tools/Makefile and Makefile.tgt into a "linear" read.  Shared
parts of the configuration aren't duplicated, and arch-specific exceptions
are made "in-place".  Also clean up the FreeBSD/amd64 config a little.

16 years agoAdd simple cd to dvd conversion script.
rik [Sun, 31 Aug 2008 22:08:39 +0000 (22:08 +0000)]
Add simple cd to dvd conversion script.

16 years agoRemove redundant KTR statements.
marcel [Sun, 31 Aug 2008 20:55:31 +0000 (20:55 +0000)]
Remove redundant KTR statements.

16 years agoTrace all PMAP calls using KTR_PMAP.
marcel [Sun, 31 Aug 2008 20:08:13 +0000 (20:08 +0000)]
Trace all PMAP calls using KTR_PMAP.

16 years agoDon't return always 0. Return what we get from exec_mountprog or
matteo [Sun, 31 Aug 2008 20:08:05 +0000 (20:08 +0000)]
Don't return always 0. Return what we get from exec_mountprog or
mount_fs.

PR: bin/125154
MFC after: 1 day

16 years agofix tiny nti in comment
julian [Sun, 31 Aug 2008 18:54:35 +0000 (18:54 +0000)]
fix tiny nti in comment

16 years agoA no-op commit to simulate the effect of a forced commit so the file
gshapiro [Sun, 31 Aug 2008 18:21:15 +0000 (18:21 +0000)]
A no-op commit to simulate the effect of a forced commit so the file
has a new timestamp as needed for mergemaster.  A more long term
solution to this is needed since svn doesn't support forced commits.

16 years agoUse a locally assigned address rather than stealing Atmel's which
imp [Sun, 31 Aug 2008 18:20:01 +0000 (18:20 +0000)]
Use a locally assigned address rather than stealing Atmel's which
might cause a conflict...

16 years agopkill(1) first appeared in /usr/bin, but later it was moved to /bin
yar [Sun, 31 Aug 2008 14:27:59 +0000 (14:27 +0000)]
pkill(1) first appeared in /usr/bin, but later it was moved to /bin
for the convenience of rc.d.  Now it has happily lived there for quite
a while.  So move the pkill(1) source files from usr.bin to bin, too.

Approved by: gad

16 years agoDecontextualize vfs_busy(), vfs_unbusy() and vfs_mount_alloc() functions.
attilio [Sun, 31 Aug 2008 14:26:08 +0000 (14:26 +0000)]
Decontextualize vfs_busy(), vfs_unbusy() and vfs_mount_alloc() functions.

Manpages are updated accordingly.

Tested by: Diego Sardina <siarodx at gmail dot com>

16 years agoIn UDPv6, reduce scope of global udbinfo lock during append to last
rwatson [Sun, 31 Aug 2008 13:16:45 +0000 (13:16 +0000)]
In UDPv6, reduce scope of global udbinfo lock during append to last
matching socket by dropping it before udp6_append(), and remove
duplicate unlocks of udbinfo and inpcb in sysctl return path.

MFC after: 3 days

16 years agoUpdate README to reflect removal of netatm/harp test parts some time ago.
rwatson [Sun, 31 Aug 2008 11:41:31 +0000 (11:41 +0000)]
Update README to reflect removal of netatm/harp test parts some time ago.

MFC after: 3 days

16 years agoDisable processing of output data after disabling scroll lock by force.
ed [Sun, 31 Aug 2008 10:17:40 +0000 (10:17 +0000)]
Disable processing of output data after disabling scroll lock by force.

The syscons code disabled scroll lock inside sc_cnputs() if it's going
to print a system message. The code currently wants to process any TTY
output data as well, but we cannot do this, because the TTY lock is a
sleep mutex, while cnputs() picks up a spin mutex.

Disable the code for now. It solves a panic when a console message is
printed while scroll lock is enabled. One solution would be to
initialize a task structure here.

Reported by: Paul B. Mahol <onemda gmail com>

16 years ago- Fix comment.
stas [Sun, 31 Aug 2008 09:28:49 +0000 (09:28 +0000)]
- Fix comment.
- Set U/L bit of generated ethernet address to 1 to not
  clash with Atmel assigned addresses.

Suggested by: yar
Approved by: kib (mentor)

16 years agoEnable EFI target.
rpaulo [Sun, 31 Aug 2008 09:17:27 +0000 (09:17 +0000)]
Enable EFI target.
While there, make use of the DEFAULT_VECTOR variable.

16 years agoAdd more obsolete files.
antoine [Sun, 31 Aug 2008 08:33:41 +0000 (08:33 +0000)]
Add more obsolete files.

16 years agoNew mtree writer, thanks to Joerg Sonnenberger.
kientzle [Sun, 31 Aug 2008 07:21:46 +0000 (07:21 +0000)]
New mtree writer, thanks to Joerg Sonnenberger.

Obtained from: Joerg Sonnenberger

16 years agoJoerg Sonnenberger's improvements to the shar writer.
kientzle [Sun, 31 Aug 2008 07:10:40 +0000 (07:10 +0000)]
Joerg Sonnenberger's improvements to the shar writer.
Significant performance improvements, better quoting of file names, etc.

16 years agoMake libarchive_test a little smarter about trying to find
kientzle [Sun, 31 Aug 2008 07:06:02 +0000 (07:06 +0000)]
Make libarchive_test a little smarter about trying to find
its reference files when you don't specify -r.  It now checks
a couple of likely nearby directories to see if any of them
have a particular known file.

16 years agoMake uipaq's ucom callbacks easier to read while I'm hear looking for
imp [Sun, 31 Aug 2008 03:39:59 +0000 (03:39 +0000)]
Make uipaq's ucom callbacks easier to read while I'm hear looking for
other why this seems to be broken with my phone...

16 years agoAll the other routines returned EIO from the param routine. Return it
imp [Sun, 31 Aug 2008 03:22:19 +0000 (03:22 +0000)]
All the other routines returned EIO from the param routine.  Return it
from umodem and ufoma.

With these changes, umodem kinda works for me now.  It certainly gets
past the "tip" bug that I found earlier where 115200 wasn't a valid
baud rate.  This was "broken" in the mpsafetty commit, but in reality,
umodem was always broken.

16 years agoIoctls that aren't handled by this layer need to return ENOIOCTL, not
imp [Sun, 31 Aug 2008 03:16:31 +0000 (03:16 +0000)]
Ioctls that aren't handled by this layer need to return ENOIOCTL, not
ENOTTY.  Also, make the ucom callback structure easier to read while
I'm here.

16 years agoKill dead code. This has been a 'todo' item for a long time and the
imp [Sun, 31 Aug 2008 03:08:26 +0000 (03:08 +0000)]
Kill dead code.  This has been a 'todo' item for a long time and the
skelton ioctl handler has decayed beyond usefulness in both of these
drivers.

16 years agoRemove restore_intr(). We have intr_restore()...
marcel [Sun, 31 Aug 2008 02:25:20 +0000 (02:25 +0000)]
Remove restore_intr(). We have intr_restore()...

16 years agoDocument the ulimit -p option in the sh(1) manual page.
ed [Sat, 30 Aug 2008 22:35:21 +0000 (22:35 +0000)]
Document the ulimit -p option in the sh(1) manual page.

When I imported the MPSAFE TTY code, I added the -p flag to sh(1)'s
ulimit, but I forgot to document it in the appropriate manual page.

Requested by: stefanf

16 years agoImprove the entropy of the source port randomization for network address
csjp [Sat, 30 Aug 2008 20:58:34 +0000 (20:58 +0000)]
Improve the entropy of the source port randomization for network address
translation.  It turns out this is useful for applications which require
source port randomization for security (i.e. dns servers).

Discussed with: secteam
Requested by: mlaier
MFC after: 2 weeks

16 years agoIn db_show_mdpcpu(), print MD fields.
marcel [Sat, 30 Aug 2008 18:50:11 +0000 (18:50 +0000)]
In db_show_mdpcpu(), print MD fields.

16 years agoWhitespace fixes.
marcel [Sat, 30 Aug 2008 18:48:17 +0000 (18:48 +0000)]
Whitespace fixes.

16 years agoCall powerpc_sync() instead of using an asm statement.
marcel [Sat, 30 Aug 2008 18:39:29 +0000 (18:39 +0000)]
Call powerpc_sync() instead of using an asm statement.

16 years agoAdd powerpc_sync() as an inline function.
marcel [Sat, 30 Aug 2008 18:38:37 +0000 (18:38 +0000)]
Add powerpc_sync() as an inline function.

16 years agoDon't clear PSL_RI. Disabling external interrupts
marcel [Sat, 30 Aug 2008 18:37:55 +0000 (18:37 +0000)]
Don't clear PSL_RI. Disabling external interrupts
doesn't make exceptions unrecoverable.

16 years agoopt_bus.h isn't needed here anymore. It never was really needed,
imp [Sat, 30 Aug 2008 16:24:01 +0000 (16:24 +0000)]
opt_bus.h isn't needed here anymore.  It never was really needed,
since usb has no business including it like it did...

16 years agoopt_bus.h isn't needed here. It is supposed to be for subr_bus.c only.
imp [Sat, 30 Aug 2008 16:23:04 +0000 (16:23 +0000)]
opt_bus.h isn't needed here.  It is supposed to be for subr_bus.c only.

16 years agoopt_bus.h is supposed to be for subr_bus.c only. There's no need for
imp [Sat, 30 Aug 2008 16:21:16 +0000 (16:21 +0000)]
opt_bus.h is supposed to be for subr_bus.c only.  There's no need for
it in the usb code.

16 years ago- Read ASI_{D,I}TLB_DATA_ACCESS_REG twice in order to work around
marius [Sat, 30 Aug 2008 16:03:22 +0000 (16:03 +0000)]
- Read ASI_{D,I}TLB_DATA_ACCESS_REG twice in order to work around
  errata of USIII and beyond (USIII erratum #19, USIII+ erratum #1,
  USIIIi erratum #1).
- Use the cheetah PA mask in {d,i}tlb_va_to_pa_sun4u() for USIII
  and beyond. This is done so that these functions will still mask
  the debug bits of spitfire-class CPUs once we increase TD_PA_BITS
  to match the number of bits used for the PA by cheetah-class CPUs.
- Change {d,i}tlb_enter_sun4u() to also set TLB_CTX_KERNEL as the
  context of the mappings entered. This is more or less cosmetic as
  TLB_CTX_KERNEL is 0.
- Now that we have to distinguish between different sun4u CPUs in
  the loader anyway, no longer do trial and error when reading the
  portid property.

16 years ago- Try to look for MAC address in all SA registers, not only in the
stas [Sat, 30 Aug 2008 15:16:40 +0000 (15:16 +0000)]
- Try to look for MAC address in all SA registers, not only in the
  first one. U-boot, for example, uses the second register to store
  MAC.[1]
- Use random MAC address if none configured instead of failing.

Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de> [1]
Reviewed by: imp
Approved by: kib (mentor)
MFC after: 1 week

16 years ago- Style fix.
stas [Sat, 30 Aug 2008 15:04:53 +0000 (15:04 +0000)]
- Style fix.

Approved by: kib (mentor)
MFC after: 1 week

16 years agoReflect recent changes to the sysctl debug.witness.watch moving into a
attilio [Sat, 30 Aug 2008 13:37:28 +0000 (13:37 +0000)]
Reflect recent changes to the sysctl debug.witness.watch moving into a
tri-state variable.

16 years ago- Improve some witness_watch operability in code which does perform both
attilio [Sat, 30 Aug 2008 13:20:35 +0000 (13:20 +0000)]
- Improve some witness_watch operability in code which does perform both
  lock tracking and checks, doing just the former ones.
- Fix a bug where sysctl utility was printing crazy values when setting a
  new value for debug.witness.watch [0]

[0] Reported by: yongari

16 years agoFix some edge cases in the TTY queues:
ed [Sat, 30 Aug 2008 09:18:27 +0000 (09:18 +0000)]
Fix some edge cases in the TTY queues:

- In the current design, when a TTY decreases its baud rate, it tries to
  shrink the queues. This may not always be possible, because it will
  not free any blocks that are still filled with data.

  Change the TTY queues to store a `quota' value as well, which means it
  will not free any blocks when changing the baud rate, but when placing
  blocks back into the queue. When the amount of blocks exceeds the
  quota, they get freed.

  It also fixes some edge cases, where TIOCSETA during read()/
  write()-calls could actually make the queue a tiny bit bigger than in
  normal cases.

- Don't leak blocks of memory when calling TIOCSETA when the device
  driver abandons the TTY while allocating memory.

- Create ttyoutq_init() and ttyinq_init() to initialize the queues,
  instead of initializing them by hand. The new TTY snoop driver also
  creates an outq, so it's good to have a proper interface to do this.

Obtained from: //depot/projects/mpsafetty/...

16 years agoWhen atime wasn't specified, it should get set == mtime.
kientzle [Sat, 30 Aug 2008 05:31:23 +0000 (05:31 +0000)]
When atime wasn't specified, it should get set == mtime.
This is much stronger than just asserting that it's not zero.

16 years agoDon't return EINVAL when trying to unlock.
rnoland [Sat, 30 Aug 2008 01:00:18 +0000 (01:00 +0000)]
Don't return EINVAL when trying to unlock.

anholt thinks that he added this check as part of some regression testing,
but it is failing at least some of the time.  I don't want to remove it
just yet.  I added a bit of debugging to help identify the issue.

Approved by: kib

16 years agoWe need to lock around driver unload now.
rnoland [Sat, 30 Aug 2008 00:53:30 +0000 (00:53 +0000)]
We need to lock around driver unload now.

The i915 driver installs it's register map at load time now.  We can't
remove the map during unload without holding the lock.

Approved by: kib

16 years agoFree the device lock around the call to drm_drawable_free_all()
rnoland [Sat, 30 Aug 2008 00:47:52 +0000 (00:47 +0000)]
Free the device lock around the call to drm_drawable_free_all()

This function manipulates a spin lock and we can't hold a mutex over it.

Approved by: kib

16 years agoConnect a forgotten test case to Makefile.
jkim [Fri, 29 Aug 2008 20:58:01 +0000 (20:58 +0000)]
Connect a forgotten test case to Makefile.

16 years agoFix a bug whereby multicast packets that are looped back locally
gnn [Fri, 29 Aug 2008 20:42:58 +0000 (20:42 +0000)]
Fix a bug whereby multicast packets that are looped back locally
wind up with the incorrect checksum on the wire when transmitted via
devices that do checksum offloading.

PR: kern/119635
Reviewed by: rwatson
MFC after: 5 days

16 years agoMake bpf_maxinsns visible from ng_bpf.c.
jkim [Fri, 29 Aug 2008 20:34:06 +0000 (20:34 +0000)]
Make bpf_maxinsns visible from ng_bpf.c.
Pass me the pointyhat, please.

16 years agoFor chips with a broken DC_ISR_RX_STATE which f.e. never signals
marius [Fri, 29 Aug 2008 20:31:41 +0000 (20:31 +0000)]
For chips with a broken DC_ISR_RX_STATE which f.e. never signals
stopped nor the waiting state and also no other means to check
whether the receiver is idle (see also r163774), we have no choice
than to call mii_tick(9) unconditionally even in the case of the
DC_REDUCED_MII_POLL handling as far as the RX side is concerned.
This isn't necessarily worse than checking whether RX is idle
though because unlike as with TX we're racing with the hardware,
which might receive packets any time while we poll the MII, anyway.

Reported and tested by: Jacob Owens
Reviewed by: yongari
MFC after: 3 days

16 years agoAdd the ability to run /usr/sbin/crashinfo on a new core dump automatically
jhb [Fri, 29 Aug 2008 20:30:30 +0000 (20:30 +0000)]
Add the ability to run /usr/sbin/crashinfo on a new core dump automatically
during boot.  Right now this is disabled by default, but it can be enabled
by setting 'crashinfo_enable=YES' in rc.conf.

MFC after: 2 weeks

16 years agoDo not pass validatation level since all issues are fixed now.
jkim [Fri, 29 Aug 2008 20:20:30 +0000 (20:20 +0000)]
Do not pass validatation level since all issues are fixed now.

16 years agoMerge local copy of bpf_validate() with bpf_filter.c.
jkim [Fri, 29 Aug 2008 20:07:02 +0000 (20:07 +0000)]
Merge local copy of bpf_validate() with bpf_filter.c.

16 years agoFix the last missing parentheses for a return statement in bpf_filter.c.
jkim [Fri, 29 Aug 2008 20:00:55 +0000 (20:00 +0000)]
Fix the last missing parentheses for a return statement in bpf_filter.c.

16 years agoMore convergence towards style(9).
jkim [Fri, 29 Aug 2008 19:32:04 +0000 (19:32 +0000)]
More convergence towards style(9).

16 years ago- Directly match code wherever possible instead of using macros.
jkim [Fri, 29 Aug 2008 19:10:51 +0000 (19:10 +0000)]
- Directly match code wherever possible instead of using macros.
- Macrofy bitmap table lookup.  Constify the table while I am here.
- Add missing continue statements in the for loop.

Functionally it should be the last remaining fix from:

PR: kern/89752
MFC after: 1 month

16 years agoBy default backup geli metadata to a file. It is quite critical 512 bytes,
pjd [Fri, 29 Aug 2008 18:10:18 +0000 (18:10 +0000)]
By default backup geli metadata to a file. It is quite critical 512 bytes,
once it is lost, all data is gone.

Option '-B none' can by used to prevent backup. Option '-B path' can be
used to backup metadata to a different file than the default, which is
/var/backups/<prov>.eli.

The 'geli init' command also prints backup file location and gives short
procedure how to restore metadata.

The 'geli setkey' command now warns that even after passphrase change or keys
update there could be version of the master key encrypted with old
keys/passphrase in the backup file.

Add regression tests to verify that new functionality works as expected.

Update other regression tests so they don't create backup files.

Reviewed by: keramida, rink
Dedicated to: a friend who lost 400GB of his live by accidentally overwritting geli metadata
MFC after: 2 weeks

16 years ago- Give algorithms recommendation.
pjd [Fri, 29 Aug 2008 17:13:07 +0000 (17:13 +0000)]
- Give algorithms recommendation.
- Keep options in alphabetical order.

16 years agoEnsure that the padding calcualtion doesn't return a negative value.
scottl [Fri, 29 Aug 2008 15:55:49 +0000 (15:55 +0000)]
Ensure that the padding calcualtion doesn't return a negative value.

Submitted by: kib
Approved by: jb

16 years agoMake sure BPF program is not bigger than set maximum (net.bpf.maxinsns).
jkim [Fri, 29 Aug 2008 15:49:40 +0000 (15:49 +0000)]
Make sure BPF program is not bigger than set maximum (net.bpf.maxinsns).