]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoReturn arc4_i = arc4_j = 0; line from previous backing out since
Andrey A. Chernov [Sat, 26 Jul 2008 16:42:45 +0000 (16:42 +0000)]
Return arc4_i = arc4_j = 0; line from previous backing out since
just found it in OpenBSD, see their sys/crypto/arc4.c, function
rc4_keysetup, line ctx->x = ctx->y = 0;

Obtained from:  OpenBSD

16 years agoChange arc4random to arc4random_uniform since modulo is not power of 2,
Andrey A. Chernov [Sat, 26 Jul 2008 15:46:39 +0000 (15:46 +0000)]
Change arc4random to arc4random_uniform since modulo is not power of 2,
as OpenBSD does.

Obtained from:  OpenBSD

16 years agoChange 2 arc4random modulo operations to arc4random_uniform() as
Andrey A. Chernov [Sat, 26 Jul 2008 15:39:32 +0000 (15:39 +0000)]
Change 2 arc4random modulo operations to arc4random_uniform() as
OpenBSD does, since modulo is not power of 2.

Obtained from:  OpenBSD

16 years agoNote that snapshots may cause a panic on the full UFS filesystem.
Konstantin Belousov [Sat, 26 Jul 2008 13:18:33 +0000 (13:18 +0000)]
Note that snapshots may cause a panic on the full UFS filesystem.

Submitted by: pho
MFC after: 3 days

16 years agoFill in a few sysctl descriptions.
Tom Rhodes [Sat, 26 Jul 2008 00:55:35 +0000 (00:55 +0000)]
Fill in a few sysctl descriptions.

Approved by: rwatson

16 years agoFill in sysctl descriptions.
Tom Rhodes [Sat, 26 Jul 2008 00:01:19 +0000 (00:01 +0000)]
Fill in sysctl descriptions.

Approved by: philip

16 years agoFill in BPF sysctl descriptions.
Tom Rhodes [Fri, 25 Jul 2008 23:58:09 +0000 (23:58 +0000)]
Fill in BPF sysctl descriptions.

Reviewed by: csjp

16 years agoBegin the sysctl descriptions with a capital letter.
Tom Rhodes [Fri, 25 Jul 2008 23:54:07 +0000 (23:54 +0000)]
Begin the sysctl descriptions with a capital letter.
Make some slight wording tweaks.

16 years agoAdd support for a new login capability, cpumask which allows login
Brooks Davis [Fri, 25 Jul 2008 19:58:14 +0000 (19:58 +0000)]
Add support for a new login capability, cpumask which allows login
sessions to be pinned to cpus by login class.

16 years ago- Connect ds1339 to the build infrastructure.
Stanislav Sedov [Fri, 25 Jul 2008 19:35:40 +0000 (19:35 +0000)]
- Connect ds1339 to the build infrastructure.

Reviewed by: raj
Approved by: imp

16 years ago- Add driver for Dallas Semiconductor DS1339 RTC sitting
Stanislav Sedov [Fri, 25 Jul 2008 19:34:44 +0000 (19:34 +0000)]
- Add driver for Dallas Semiconductor DS1339 RTC sitting
  on I2C bus.

Reviewed by: raj
Approved by: imp
MFC after: 2 week

16 years agoPer rwatson's request:
Andrey A. Chernov [Fri, 25 Jul 2008 15:53:32 +0000 (15:53 +0000)]
Per rwatson's request:
"If you don't get a review within a day or two, I would firmly recommend
backing out the changes"

back out all my changes as unreviewed by secteam@ yet.

16 years agoPer rwatson's request:
Andrey A. Chernov [Fri, 25 Jul 2008 15:42:22 +0000 (15:42 +0000)]
Per rwatson's request:
"If you don't get a review within a day or two, I would firmly recommend
backing out the changes"

back out all my changes, i.e. not comes from merging from OpenBSD as
unreviewed by secteam@ yet.
(OpenBSD changes stays in assumption they are reviewd by OpenBSD)

Yes, it means some old bugs returned, like not setted rs_stired = 1 in
arc4random_stir(3) causing double stirring.

16 years agoMove ttyinfo() into its own C file.
Ed Schouten [Fri, 25 Jul 2008 14:31:00 +0000 (14:31 +0000)]
Move ttyinfo() into its own C file.

The ttyinfo() routine generates the fancy output when pressing ^T. Right
now it is stored in tty.c. In the MPSAFE TTY code it is already stored
in tty_info.c. To make integration of the MPSAFE TTY code a little
easier, take the same approach.

This makes the TTY code a little bit more readable, because having the
proc_*/thread_* routines in tty.c is very distractful.

Approved by: philip (mentor)

16 years agoRemove <sgtty.h> now it has no practical usage.
Ed Schouten [Fri, 25 Jul 2008 12:37:46 +0000 (12:37 +0000)]
Remove <sgtty.h> now it has no practical usage.

When I turned sgtty into a binary-only interface (last month), I added
this explicit #error to the header file, to make sure nobody forgot to
remove the header file after updating world.

I think it is now a good moment to remove this header file.

Approved by: philip (mentor)

16 years agoCall pargs_drop() unconditionally in do_execve(), the function correctly
Konstantin Belousov [Fri, 25 Jul 2008 11:55:32 +0000 (11:55 +0000)]
Call pargs_drop() unconditionally in do_execve(), the function correctly
handles the NULL argument.
Make pargs_free() static.

MFC after: 1 week

16 years agos/alredy/already/ in the comments and the log message.
Konstantin Belousov [Fri, 25 Jul 2008 11:22:25 +0000 (11:22 +0000)]
s/alredy/already/ in the comments and the log message.

16 years agoo Trim whitespaces.
Maxim Konovalov [Fri, 25 Jul 2008 09:30:53 +0000 (09:30 +0000)]
o Trim whitespaces.

16 years agoo Fix grammar: see -> See.
Maxim Konovalov [Fri, 25 Jul 2008 09:13:18 +0000 (09:13 +0000)]
o Fix grammar: see -> See.

16 years ago - Provide kernelname as the name for process with P_KTHREAD set as
Jeff Roberson [Fri, 25 Jul 2008 05:49:48 +0000 (05:49 +0000)]
 - Provide kernelname as the name for process with P_KTHREAD set as
   otherwise their textvp is NULL.

Reviewed by: jkoshy
Sponsored by: Nokia

16 years agoFix cut-n-paste-o
Julian Elischer [Fri, 25 Jul 2008 01:09:36 +0000 (01:09 +0000)]
Fix cut-n-paste-o

Submitted by: Kostik Belousov

16 years agoAdd tweak for AMD Geode "companion" chip, AMD CS5536, which is apparently
Ivan Voras [Thu, 24 Jul 2008 23:22:19 +0000 (23:22 +0000)]
Add tweak for AMD Geode "companion" chip, AMD CS5536, which is apparently
USB 2.0 capable but is shy and doesn't adwertise it much.

PR: 120017
Reviewed by: imp
Approved by: gnn (mentor)
MFC after: 2 weeks

16 years agoFix spelling error in comment
Julian Elischer [Thu, 24 Jul 2008 19:05:58 +0000 (19:05 +0000)]
Fix spelling error in comment

16 years agoNote that setfib is not a terminal rule.
Julian Elischer [Thu, 24 Jul 2008 18:39:36 +0000 (18:39 +0000)]
Note that setfib is not a terminal rule.

16 years agoSwitch to using the setfib syscall instead of a syscall(175,...)
Julian Elischer [Thu, 24 Jul 2008 18:01:50 +0000 (18:01 +0000)]
Switch to using the setfib syscall instead of a syscall(175,...)

16 years agoPrefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
Marius Strobl [Thu, 24 Jul 2008 14:07:52 +0000 (14:07 +0000)]
Prefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
macros that might be relevant.

16 years agoTry again not to use a userspace pointer in the kernel when trying to record
Doug Rabson [Thu, 24 Jul 2008 14:02:03 +0000 (14:02 +0000)]
Try again not to use a userspace pointer in the kernel when trying to record
the hostname which we need for NLM requests. The previous patch was incomplete.

PR: 125849
Pointy hat: dfr

16 years agoDon't use a userspace pointer in the kernel when trying to record the hostname
Doug Rabson [Thu, 24 Jul 2008 13:42:28 +0000 (13:42 +0000)]
Don't use a userspace pointer in the kernel when trying to record the hostname
which we need for NLM requests.

PR: 125849

16 years ago2020447 IPFilter's NAT can undo name server random port selection
Darren Reed [Thu, 24 Jul 2008 12:35:05 +0000 (12:35 +0000)]
2020447 IPFilter's NAT can undo name server random port selection

Approved by: darrenr
MFC after: 1 week
Security: CERT VU#521769

16 years agoDon't include <sys/tty.h> in non-TTY drivers.
Ed Schouten [Thu, 24 Jul 2008 09:54:10 +0000 (09:54 +0000)]
Don't include <sys/tty.h> in non-TTY drivers.

The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, because
they needed clists, which have been moved to <sys/clist.h> some time
ago. In the MPSAFE TTY branch, <sys/tty.h> does not include
<sys/clist.h>, which means we have to teach these drivers to include
this header file directly.

Approved by: philip (mentor, implicit)

16 years agoAdd TIOCPKT and TIOCSPTLCK to the Linuxolator.
Ed Schouten [Wed, 23 Jul 2008 17:47:44 +0000 (17:47 +0000)]
Add TIOCPKT and TIOCSPTLCK to the Linuxolator.

We're very lucky, because the flags used by our TIOCPKT implementation
are the same as flags used by Linux. We can safely enable TIOCPKT,
assuming EXTPROC is not used.

TIOCSPTLCK is used by unlockpt(). Because we don't need unlockpt() in
our implementation, make this ioctl a no-op.

Approved by: philip (mentor, implicit), rdivacky
Obtained from: P4 (//depot/projects/mpsafetty/...)

16 years agoMerge from p4:
Warner Losh [Wed, 23 Jul 2008 17:38:33 +0000 (17:38 +0000)]
Merge from p4:

Implement openssl config needed for mips.

Submitted by: gonzo@
Reviewed by: simon@

16 years agoFix linux_alarm, the linux behaviour is to limit the
Roman Divacky [Wed, 23 Jul 2008 17:19:02 +0000 (17:19 +0000)]
Fix linux_alarm, the linux behaviour is to limit the
secs to INT_MAX when the passed in parameter is bigger
than INT_MAX.

Submitted by: Dmitry Chagin <chagin.dmitry gmail com>
Approved by: kib (mentor)

16 years agoRemove a bunch of files we don't need to build OpenSSH. They are still
Dag-Erling Smørgrav [Wed, 23 Jul 2008 17:02:25 +0000 (17:02 +0000)]
Remove a bunch of files we don't need to build OpenSSH.  They are still
available in base/vendor-crypto/openssh/dist/.

16 years agoRemove debugging cruft.
Dag-Erling Smørgrav [Wed, 23 Jul 2008 16:44:20 +0000 (16:44 +0000)]
Remove debugging cruft.

16 years agopjd@'s r180759 was intended to revert r180755 due to ipfilter breakage,
Dag-Erling Smørgrav [Wed, 23 Jul 2008 16:40:07 +0000 (16:40 +0000)]
pjd@'s r180759 was intended to revert r180755 due to ipfilter breakage,
but removed too much, breaking the build in other places instead.  Now
that the ipfilter issue has been fixed (or hacked around), address the
second issue by restoring r180755, with one small change.  I don't feel
comfortable using assert(3) in a header that will be included in userland
code that may or may not already have an assertion mechanism in place,
so KASSERT() evaluates to a no-op in the !_KERNEL case.

16 years agoFor unfathomable reasons, ipfilter abuses kernel data structures for its
Dag-Erling Smørgrav [Wed, 23 Jul 2008 16:34:53 +0000 (16:34 +0000)]
For unfathomable reasons, ipfilter abuses kernel data structures for its
own purposes.  To pull this off, it defines _KERNEL before including the
headers where these structures are defined.  This leads to no end of
trouble when some of these headers, or other headers that they include,
change, as demonstrated by r180755.

The quick fix in this particular case is to define _WANT_FILE instead of
_KERNEL, conditional on __FreeBSD__.  A better long-term fix is left as
an exercise to the reader.

16 years agoFurther refine the probe order of devices to more closely match the previous
John Baldwin [Wed, 23 Jul 2008 15:13:06 +0000 (15:13 +0000)]
Further refine the probe order of devices to more closely match the previous
behavior.  Specifically, probe Host-PCI bridges in the order they are
encountered in the tree.  For CPUs, just use an order of 100000 and assume
that no Host-PCI bridges will be more than 10000 levels deep in the
namespace.  This fixes an issue on some boxes where the HPET timer stopped
attaching.

16 years agoBack out this change, as it breaks the build and I don't have time for
Pawel Jakub Dawidek [Wed, 23 Jul 2008 15:12:45 +0000 (15:12 +0000)]
Back out this change, as it breaks the build and I don't have time for
a better fix today.

16 years agoThe ffs_balloc_ufs{1,2} functions call bdwrite() while having several
Konstantin Belousov [Wed, 23 Jul 2008 14:32:44 +0000 (14:32 +0000)]
The ffs_balloc_ufs{1,2} functions call bdwrite() while having several
vnode buffers locked at once. In particular, there are indirect buffers
among locked ones. The bdwrite() may start the flushing to keep dirty
buffer list at the bounds. If any buffer on the dirty list requires
translation from logical to physical block number, code may ends up
trying to lock an indirect buffer already locked in ffs_balloc_ufsX.

Prevent the bdflush() activity when several buffers are locked at once
by setting the TDP_INBDFUSH for the problematic code blocks.

Reported and tested by: pho, Josef Buchsteiner at Juniper
In collaboration with: kan
MFC after: 1 month

16 years agoo DragonFly BSD 2.0 added.
Maxim Konovalov [Wed, 23 Jul 2008 14:25:39 +0000 (14:25 +0000)]
o DragonFly BSD 2.0 added.

16 years agoUnbreak cc -pg support on i386. In gcc 4.2, %ecx is used as the arg pointer
Luoqi Chen [Wed, 23 Jul 2008 11:37:20 +0000 (11:37 +0000)]
Unbreak cc -pg support on i386. In gcc 4.2, %ecx is used as the arg pointer
when stack realignment is turned on (it is ALWAYS on for main), however
in a profiling build %ecx would be clobbered by mcount(), this would lead
to a segmentation fault when the code tries to reference any argument.
This fix changes mcount() to preserve %ecx.

PR: bin/119709
Reviewed by: bde
MFC after: 1 week

16 years agoCheck for negative reference count.
Pawel Jakub Dawidek [Wed, 23 Jul 2008 11:17:46 +0000 (11:17 +0000)]
Check for negative reference count.

Reviewed by: des

16 years agowhen NDIS framework try to query/set informations NDIS drivers can
Weongyo Jeong [Wed, 23 Jul 2008 10:49:27 +0000 (10:49 +0000)]
when NDIS framework try to query/set informations NDIS drivers can
return NDIS_STATUS_PENDING.  In this case, it's waiting for 5 secs to
get the response from drivers now.  However, some NDIS drivers can send
the response before NDIS framework gets ready to receive it so we might
always be blocked for 5 secs in current implementation.  NDIS framework
should reset the event before calling NDIS driver's callback not after.

MFC after: 1 month

16 years agoSATA device on some nForce based boards could get confused if MSI is not
Luoqi Chen [Wed, 23 Jul 2008 09:44:36 +0000 (09:44 +0000)]
SATA device on some nForce based boards could get confused if MSI is not
used but MSI to HyperTransport IRQ mapping is enabled, and would act as
if MSI is turned on, resulting in interrupt loss.

This commit will,
1. enable MSI mapping on a device only when MSI is enabled for that
   device and the MSI address matches the HT mapping window.
2. enable MSI mapping on a bridge only when a downstream device is
   allocated an MSI address in the mapping window

PR: kern/118842
Reviewed by: jhb
MFC after: 1 week

16 years agoRe-work the code slightly to avoid a possible livelock.
Doug Rabson [Wed, 23 Jul 2008 09:18:08 +0000 (09:18 +0000)]
Re-work the code slightly to avoid a possible livelock.

MFC after: 2 weeks

16 years agoDo the pargs_hold() on the copy of the pointer to the p_args of the
Konstantin Belousov [Wed, 23 Jul 2008 08:45:25 +0000 (08:45 +0000)]
Do the pargs_hold() on the copy of the pointer to the p_args of the
child process immediately after bulk bcopy() without dropping the
process lock.

Since process is not single-threaded when forking, dropping and
reacquiring the lock allows an other thread to change the process title
of the parent in between, and results in hold being done on the invalid
pointer. The problem manifested itself as the double free of the old
p_args.

Reported by: kris
Reviewed by: jhb
MFC after: 1 week

16 years agoMinor white space tweak.
Robert Watson [Wed, 23 Jul 2008 07:42:31 +0000 (07:42 +0000)]
Minor white space tweak.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoFirst cut at doing the kvm file needed for mips.
Warner Losh [Wed, 23 Jul 2008 07:24:55 +0000 (07:24 +0000)]
First cut at doing the kvm file needed for mips.

Obtained from: gonzo@

16 years agoOnly descend into the boot directory for the architecture if it
Warner Losh [Wed, 23 Jul 2008 07:23:33 +0000 (07:23 +0000)]
Only descend into the boot directory for the architecture if it
actually exists and is a directory or symlink to a directory.

16 years agoDisable SSP for mips until support is added to the base architecture.
Warner Losh [Wed, 23 Jul 2008 06:16:34 +0000 (06:16 +0000)]
Disable SSP for mips until support is added to the base architecture.

16 years agoTurn of SSP for mips for now until support is added to the base
Warner Losh [Wed, 23 Jul 2008 06:14:21 +0000 (06:14 +0000)]
Turn of SSP for mips for now until support is added to the base
architecture.

16 years agoremove reference for unexisting ndisapi(9)
Weongyo Jeong [Wed, 23 Jul 2008 05:50:17 +0000 (05:50 +0000)]
remove reference for unexisting ndisapi(9)

16 years agoAdding myself as a new ports committer
Philip M. Gollucci [Wed, 23 Jul 2008 01:37:04 +0000 (01:37 +0000)]
Adding myself as a new ports committer

Reviewed by:    gabor (mentor)
Approved by: araujo (mentor)

16 years agoRetroactively add my entry and link to garga. Forgot to do this when I
Wesley Shields [Wed, 23 Jul 2008 01:19:56 +0000 (01:19 +0000)]
Retroactively add my entry and link to garga.  Forgot to do this when I
got my commit bit.

16 years agoSync with NetBSD's license changes.
Xin LI [Wed, 23 Jul 2008 00:03:36 +0000 (00:03 +0000)]
Sync with NetBSD's license changes.

16 years agoMove the NFS/RPC code away from lbolt.
Ed Schouten [Tue, 22 Jul 2008 21:27:22 +0000 (21:27 +0000)]
Move the NFS/RPC code away from lbolt.

The kernel has a special wchan called `lbolt', which is triggered each
second. It doesn't seem to be used a lot and it seems pretty redundant,
because we can specify a timeout value to the *sleep() routines. In an
attempt to eventually remove lbolt, make the NFS/RPC code use a timeout
of `hz' when trying to reconnect.

Only the TTY code (not MPSAFE TTY) and the VFS syncer seem to use lbolt
now.

Reviewed by: attilio, jhb
Approved by: philip (mentor), alfred, dfr

16 years agoTrivial commit to attempt to diagnose a svn problem. Add
Peter Wemm [Tue, 22 Jul 2008 18:05:50 +0000 (18:05 +0000)]
Trivial commit to attempt to diagnose a svn problem.  Add
comment that Tivo disks are APM, but do not have a DDR record.

16 years agoIf an AUE_SYSCTL_NONADMIN audit event is selected, generate a record
Robert Watson [Tue, 22 Jul 2008 17:54:32 +0000 (17:54 +0000)]
If an AUE_SYSCTL_NONADMIN audit event is selected, generate a record
with equivilent content to AUE_SYSCTL.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoFurther minor style fixes to audit.
Robert Watson [Tue, 22 Jul 2008 17:49:30 +0000 (17:49 +0000)]
Further minor style fixes to audit.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoFixes based on bde's feedback.
Andrey A. Chernov [Tue, 22 Jul 2008 17:10:18 +0000 (17:10 +0000)]
Fixes based on bde's feedback.
1) Unindent and sort variables.
2) Indent struct members.
3) Remove _packed, use guaranteed >128 bytes size and only first 128
bytes from the structure.
4) Reword comment.

Obtained from:  bde

16 years agoRemove unneeded \ at the end of a macro.
Robert Watson [Tue, 22 Jul 2008 17:08:27 +0000 (17:08 +0000)]
Remove unneeded \ at the end of a macro.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoFurther minor white space tweaks.
Robert Watson [Tue, 22 Jul 2008 17:06:49 +0000 (17:06 +0000)]
Further minor white space tweaks.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoGenerally avoid <space><tab> as a white space anomoly.
Robert Watson [Tue, 22 Jul 2008 16:44:48 +0000 (16:44 +0000)]
Generally avoid <space><tab> as a white space anomoly.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoUse #define<tab> rather than #define<space>.
Robert Watson [Tue, 22 Jul 2008 16:21:59 +0000 (16:21 +0000)]
Use #define<tab> rather than #define<space>.

Obtained from: Apple Inc.
MFC after: 3 days

16 years ago1) Initialize arc4_i and arc4_j to 0 after key mixing as recommended in
Andrey A. Chernov [Tue, 22 Jul 2008 16:16:51 +0000 (16:16 +0000)]
1) Initialize arc4_i and arc4_j to 0 after key mixing as recommended in
draft-kaukonen-cipher-arcfour-03.txt (3.1.5)

2) Drop first 768 bytes as standard RC4-drop(768)

16 years agoComment fix.
Robert Watson [Tue, 22 Jul 2008 16:02:21 +0000 (16:02 +0000)]
Comment fix.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoAdded me as a commiter
VANHULLEBUS Yvan [Tue, 22 Jul 2008 16:01:57 +0000 (16:01 +0000)]
Added me as a commiter

Approved by: gnn (mentor)

16 years agoComment typo fix.
Robert Watson [Tue, 22 Jul 2008 15:54:10 +0000 (15:54 +0000)]
Comment typo fix.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoMinor white space synchronization to Apple version of security audit.
Robert Watson [Tue, 22 Jul 2008 15:49:19 +0000 (15:49 +0000)]
Minor white space synchronization to Apple version of security audit.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoIn preparation to sync Apple and FreeBSD versions of security audit,
Robert Watson [Tue, 22 Jul 2008 15:29:48 +0000 (15:29 +0000)]
In preparation to sync Apple and FreeBSD versions of security audit,
pick up the Apple Computer -> Apple change in their copyright and
license templates.

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoChange /dev/urandom to /dev/random since urandom marked as
Andrey A. Chernov [Tue, 22 Jul 2008 15:25:35 +0000 (15:25 +0000)]
Change /dev/urandom to /dev/random since urandom marked as
XXX Deprecated
alias in /sys/dev/random/randomdev.c

16 years agoUse unsigned int when iterating over groupsets in audit_arg_groupset().
Robert Watson [Tue, 22 Jul 2008 15:17:21 +0000 (15:17 +0000)]
Use unsigned int when iterating over groupsets in audit_arg_groupset().

Obtained from: Apple Inc.
MFC after: 3 days

16 years agoUse arc4random_uniform(3) since modulo size is not power of 2
Andrey A. Chernov [Tue, 22 Jul 2008 15:08:50 +0000 (15:08 +0000)]
Use arc4random_uniform(3) since modulo size is not power of 2

16 years agoo Alan Shepard was first American in the space; fix attribution.
Maxim Konovalov [Tue, 22 Jul 2008 14:21:56 +0000 (14:21 +0000)]
o Alan Shepard was first American in the space; fix attribution.
o Correct Alan's surname.

PR: bin/125812
Submitted by: Derek Taylor [1], gavin [2]
MFC after: 1 week

16 years ago- Whitespace fixes.
Stanislav Sedov [Tue, 22 Jul 2008 14:04:06 +0000 (14:04 +0000)]
- Whitespace fixes.

Approved by: gonzo
MFC after: 1 week

16 years agoo Fix style(9) bugs and similar nits.
Marius Strobl [Tue, 22 Jul 2008 13:51:21 +0000 (13:51 +0000)]
o Fix style(9) bugs and similar nits.
o Merge ncr53c9x.c from NetBSD:
  1.115: fix variable shadowing
  1.118: __inline -> inline
  1.121: fix empty if

16 years agoBump __FreeBSD_version for arc4random_buf() and arc4random_uniform()
Andrey A. Chernov [Tue, 22 Jul 2008 13:38:17 +0000 (13:38 +0000)]
Bump __FreeBSD_version for arc4random_buf() and arc4random_uniform()
added.

16 years agoIn arc4random_uniform() detect simple "power of two" case and
Andrey A. Chernov [Tue, 22 Jul 2008 12:43:09 +0000 (12:43 +0000)]
In arc4random_uniform() detect simple "power of two" case and
return just (arc4random() % upper_bound)

16 years agoAdd arc4random_uniform()
Andrey A. Chernov [Tue, 22 Jul 2008 11:40:42 +0000 (11:40 +0000)]
Add arc4random_uniform()

Obtained from:  OpenBSD

16 years agoAdd arc4random_uniform() function (to avoid "modulo bias")
Andrey A. Chernov [Tue, 22 Jul 2008 11:33:49 +0000 (11:33 +0000)]
Add arc4random_uniform() function (to avoid "modulo bias")

Obtained from:  OpenBSD

16 years agoIncrease initially dropped bytes from 512 to 768 (768 is also
Andrey A. Chernov [Tue, 22 Jul 2008 10:31:29 +0000 (10:31 +0000)]
Increase initially dropped bytes from 512 to 768 (768 is also
suggested in the Ilya Mironov's article). 768 taken from another
research where it treats as default for RC4-drop(768):
http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4-drop

Minor style tweak.

16 years agoFor sun4v ensure there is an opt_global.h with SUN4V defined included,
Marius Strobl [Tue, 22 Jul 2008 09:56:45 +0000 (09:56 +0000)]
For sun4v ensure there is an opt_global.h with SUN4V defined included,
even for the stand-alone build.

16 years agoDisable SSP for the kernel on arm as well (see rev 180605).
Olivier Houchard [Tue, 22 Jul 2008 09:38:12 +0000 (09:38 +0000)]
Disable SSP for the kernel on arm as well (see rev 180605).
I overlooked this because a SSP kernel booted for me.

Apologises to: ticso

16 years agoAdd a sentence of credits to the KSE removal note.
Bruce A. Mah [Tue, 22 Jul 2008 05:02:46 +0000 (05:02 +0000)]
Add a sentence of credits to the KSE removal note.

Requested by: brooks

16 years agoTrying to fix compilation bustage:
Tai-hwa Liang [Tue, 22 Jul 2008 04:23:57 +0000 (04:23 +0000)]
Trying to fix compilation bustage:
- removing 'const' qualifier from an input parameter to conform to the type
  required by rw_assert();
- using in_addr->s_addr to retrive 32 bits address value.

Observed by: tinderbox

16 years ago- Disallow XFS mounting in write mode. The write support never worked really
Attilio Rao [Mon, 21 Jul 2008 23:01:09 +0000 (23:01 +0000)]
- Disallow XFS mounting in write mode.  The write support never worked really
  and there is no need to maintain it.
- Fix vn_get() in order to let it call vget(9) with a valid locking
  request.  vget(9) returns the vnode locked in order to prevent recycling,
  but in this case internal XFS locks alredy prevent it from happening, so
  it is safe to drop the vnode lock before to return by vn_get().
- Add a VNASSERT() in vget(9) in order to catch malformed locking requests.

Discussed with: kan, kib
Tested by: Lothar Braun <lothar at lobraun dot de>

16 years agoChange the module example to kldload since this is the resume side.
Andrew Thompson [Mon, 21 Jul 2008 22:55:40 +0000 (22:55 +0000)]
Change the module example to kldload since this is the resume side.

16 years agoRemove sioX as an alias for uartX. It is believed to be
Marcel Moolenaar [Mon, 21 Jul 2008 22:38:00 +0000 (22:38 +0000)]
Remove sioX as an alias for uartX. It is believed to be
more confusing than helpful.

Suggested by: jhb

16 years agomake new accessor functions consistent with existing style
Kip Macy [Mon, 21 Jul 2008 22:11:39 +0000 (22:11 +0000)]
make new accessor functions consistent with existing style

16 years agoAdd feature_present(3) to the FBSD 1.1 symbol map.
John Baldwin [Mon, 21 Jul 2008 22:07:59 +0000 (22:07 +0000)]
Add feature_present(3) to the FBSD 1.1 symbol map.

16 years ago1) Use __packed attr on rdat structure to make it exact 128 bytes.
Andrey A. Chernov [Mon, 21 Jul 2008 21:57:30 +0000 (21:57 +0000)]
1) Use __packed attr on rdat structure to make it exact 128 bytes.
2) Use gettimeofday() and getpid() only if reading from /dev/urandom
fails or impossible.
3) Discard N bytes on very first initialization only (i.e. don't
discard on re-stir).
4) Reduce N from 1024 to 512 as really suggested in the
"(Not So) Random Shuffles of RC4" paper:
http://research.microsoft.com/users/mironov/papers/rc4full.pdf

16 years agoremove call to unsafe tcp_twstart function
Kip Macy [Mon, 21 Jul 2008 21:23:43 +0000 (21:23 +0000)]
remove call to unsafe tcp_twstart function

16 years ago- Switch to INP_WLOCK macro from inp_wlock
Kip Macy [Mon, 21 Jul 2008 21:22:56 +0000 (21:22 +0000)]
- Switch to INP_WLOCK macro from inp_wlock
- calling sodisconnect after tcp_twstart is both gratuitous and unsafe - remove

Submitted by: rwatson

16 years agoIf run_interrupt_driven_config_hooks() waits 360 seconds and INVARIANTS
Robert Watson [Mon, 21 Jul 2008 20:50:49 +0000 (20:50 +0000)]
If run_interrupt_driven_config_hooks() waits 360 seconds and INVARIANTS
is compiled into the kernel, then panic.

MFC after: 3 days
Discussed with: scottl

16 years ago1) Update copyright notice.
Andrey A. Chernov [Mon, 21 Jul 2008 20:04:32 +0000 (20:04 +0000)]
1) Update copyright notice.
2) Eliminate "struct arc4_stream *as" arg since only single arg is
possible.
3) Set rs.j = rs.i after arc4random key schedule to be more like arc4
stream cipher.

Obtained from:  OpenBSD

16 years agoAllocate a single CCB at the start of the main loop of the RAID monitoring
John Baldwin [Mon, 21 Jul 2008 18:43:02 +0000 (18:43 +0000)]
Allocate a single CCB at the start of the main loop of the RAID monitoring
kthread of the mpt(4) driver that hangs around for the entire lifetime of
the thread.  Previously the driver would allocate a new CCB using M_WAITOK
with a lock held each time it updated its state.  While here, use the
CAM API for allocating a CCB rather than raw malloc(9).

Reviewed by: scottl
MFC after: 1 week

16 years agoAdd arc4random_buf to FBSD_1.1 space
Andrey A. Chernov [Mon, 21 Jul 2008 18:03:31 +0000 (18:03 +0000)]
Add arc4random_buf to FBSD_1.1 space

16 years ago- Remove redundant inclusion of opt_global.h.
Marius Strobl [Mon, 21 Jul 2008 17:15:51 +0000 (17:15 +0000)]
- Remove redundant inclusion of opt_global.h.
- Use __FBSDID in autoconf.c.

MFC after: 3 days

16 years agoImplement the following macros for completeness:
Pawel Jakub Dawidek [Mon, 21 Jul 2008 15:05:25 +0000 (15:05 +0000)]
Implement the following macros for completeness:

SYSCTL_QUAD()
SYSCTL_ADD_QUAD()
TUNABLE_QUAD()
TUNABLE_QUAD_FETCH()

Now we can use 64bit tunables on 32bit systems.