Commit Graph

140352 Commits

Author SHA1 Message Date
julian
563c4bfc08 Switch to using the setfib syscall instead of a syscall(175,...) 2008-07-24 18:01:50 +00:00
marius
a1ffd780f3 Prefer the opt_global.h from KERNBUILDDIR if existent so we obtain all
macros that might be relevant.
2008-07-24 14:07:52 +00:00
dfr
424364633e 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
2008-07-24 14:02:03 +00:00
dfr
1c54b514dd Don't use a userspace pointer in the kernel when trying to record the hostname
which we need for NLM requests.

PR:		125849
2008-07-24 13:42:28 +00:00
darrenr
49ad2adb91 2020447 IPFilter's NAT can undo name server random port selection
Approved by:	darrenr
MFC after:	1 week
Security:	CERT VU#521769
2008-07-24 12:35:05 +00:00
ed
308672b005 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)
2008-07-24 09:54:10 +00:00
ed
6b178cd86d 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/...)
2008-07-23 17:47:44 +00:00
imp
fea35767dd Merge from p4:
Implement openssl config needed for mips.

Submitted by:	gonzo@
Reviewed by:	simon@
2008-07-23 17:38:33 +00:00
rdivacky
32f23bcf55 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)
2008-07-23 17:19:02 +00:00
des
01d1a97b94 Remove a bunch of files we don't need to build OpenSSH. They are still
available in base/vendor-crypto/openssh/dist/.
2008-07-23 17:02:25 +00:00
des
12804626aa Remove debugging cruft. 2008-07-23 16:44:20 +00:00
des
3bf9afd822 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.
2008-07-23 16:40:07 +00:00
des
4cb5c18630 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.
2008-07-23 16:34:53 +00:00
jhb
8f8e4f1bbb 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.
2008-07-23 15:13:06 +00:00
pjd
c83fb5aada Back out this change, as it breaks the build and I don't have time for
a better fix today.
2008-07-23 15:12:45 +00:00
kib
167593c766 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
2008-07-23 14:32:44 +00:00
maxim
4f882c5332 o DragonFly BSD 2.0 added. 2008-07-23 14:25:39 +00:00
luoqi
c9306f6f14 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
2008-07-23 11:37:20 +00:00
pjd
183560b822 Check for negative reference count.
Reviewed by:	des
2008-07-23 11:17:46 +00:00
weongyo
0293d4a27f 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
2008-07-23 10:49:27 +00:00
luoqi
2620286140 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
2008-07-23 09:44:36 +00:00
dfr
d27f65928a Re-work the code slightly to avoid a possible livelock.
MFC after:	2 weeks
2008-07-23 09:18:08 +00:00
kib
42aeaf36b0 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
2008-07-23 08:45:25 +00:00
rwatson
5a7f32b6bb Minor white space tweak.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-23 07:42:31 +00:00
imp
125cb1d713 First cut at doing the kvm file needed for mips.
Obtained from:	gonzo@
2008-07-23 07:24:55 +00:00
imp
33e1957f1b Only descend into the boot directory for the architecture if it
actually exists and is a directory or symlink to a directory.
2008-07-23 07:23:33 +00:00
imp
89fba4c0a9 Disable SSP for mips until support is added to the base architecture. 2008-07-23 06:16:34 +00:00
imp
d2f1100583 Turn of SSP for mips for now until support is added to the base
architecture.
2008-07-23 06:14:21 +00:00
weongyo
dd99ad9101 remove reference for unexisting ndisapi(9) 2008-07-23 05:50:17 +00:00
pgollucci
861df0f077 Adding myself as a new ports committer
Reviewed by:    gabor (mentor)
Approved by:	araujo (mentor)
2008-07-23 01:37:04 +00:00
wxs
3485fc0291 Retroactively add my entry and link to garga. Forgot to do this when I
got my commit bit.
2008-07-23 01:19:56 +00:00
delphij
56a762a726 Sync with NetBSD's license changes. 2008-07-23 00:03:36 +00:00
ed
1e4302f67a 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
2008-07-22 21:27:22 +00:00
peter
dfa80a42e2 Trivial commit to attempt to diagnose a svn problem. Add
comment that Tivo disks are APM, but do not have a DDR record.
2008-07-22 18:05:50 +00:00
rwatson
cd2c5f1658 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
2008-07-22 17:54:32 +00:00
rwatson
08b4415065 Further minor style fixes to audit.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 17:49:30 +00:00
ache
9ead8ff088 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
2008-07-22 17:10:18 +00:00
rwatson
127019df41 Remove unneeded \ at the end of a macro.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 17:08:27 +00:00
rwatson
50a48758fb Further minor white space tweaks.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 17:06:49 +00:00
rwatson
979e045da6 Generally avoid <space><tab> as a white space anomoly.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 16:44:48 +00:00
rwatson
e116c89c78 Use #define<tab> rather than #define<space>.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 16:21:59 +00:00
ache
d7f1be43be 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)
2008-07-22 16:16:51 +00:00
rwatson
91cafa1d13 Comment fix.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 16:02:21 +00:00
vanhu
bee865addd Added me as a commiter
Approved by:	gnn (mentor)
2008-07-22 16:01:57 +00:00
rwatson
1c685378bd Comment typo fix.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:54:10 +00:00
rwatson
01de8b976c Minor white space synchronization to Apple version of security audit.
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:49:19 +00:00
rwatson
6a481435b2 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
2008-07-22 15:29:48 +00:00
ache
639d7e6fa8 Change /dev/urandom to /dev/random since urandom marked as
XXX Deprecated
alias in /sys/dev/random/randomdev.c
2008-07-22 15:25:35 +00:00
rwatson
c3ca4b7705 Use unsigned int when iterating over groupsets in audit_arg_groupset().
Obtained from:	Apple Inc.
MFC after:	3 days
2008-07-22 15:17:21 +00:00
ache
e3afb9ef3c Use arc4random_uniform(3) since modulo size is not power of 2 2008-07-22 15:08:50 +00:00