Commit Graph

57553 Commits

Author SHA1 Message Date
Warner Losh
85aa25ca8e Fix minor inconsistancy between kernel built modules and stand-alone
built buildes.  I believe this gives the same flags on the command
line for both.
2006-02-04 06:22:27 +00:00
Scott Long
04ab3022a9 Fix a possible memory leak in asr_attach. 2006-02-04 06:08:19 +00:00
Scott Long
4b2dc3c447 i386/PAE defines bus_size_t to be 32-bits when it likely should be 64-bits.
Fixing it is left for another day, so just hack around it for now.
2006-02-04 03:41:48 +00:00
Robert Watson
a02a1efa9f Cast pointers to (uintptr_t) before down-casting to (int). This avoids
an incompatible conversion from a 64-bit pointer to a 32-bit integer on
64-bit platforms.  We will investigate whether Solaris uses a 64-bit
token here, or a new record here, in order to avoid truncating user
pointers that are 64-bit.  However, in the mean time, truncation is fine
as these are rarely/never used fields in audit records.

Obtained from:	TrustedBSD Project
2006-02-04 00:14:06 +00:00
Robert Watson
fac3e318aa Fix INVARIANTS build on amd64; (unsigned unsigned long) != u_int64_t.
Submitted by:	mlaier
2006-02-03 23:50:26 +00:00
Oleg Bulyzhin
3ecf1851df Properly initialize args structure before passing it to ipfw_chk(): having
uninitialized args.inp is unhealthy for uid/gid/jail ipfw rules.

PR:		kern/92589
Approved by:	glebius (mentor)
MFC after:	1 week
2006-02-03 23:03:07 +00:00
John Baldwin
37f84a6018 Add a comment. 2006-02-03 21:09:40 +00:00
Ruslan Ermilov
bbe9814a5b Fix compilation with -Wundef (NBPF is undefined on FreeBSD >4). 2006-02-03 20:55:30 +00:00
John Baldwin
b0864d13ab Sort includes. 2006-02-03 16:37:55 +00:00
Robert Watson
fdcba197a8 Add AUDIT to NOTES, as it's probably ready to get regular build testing
by the tinderboxes.
2006-02-03 15:53:37 +00:00
Robert Watson
563267dae3 Remove user.h include in audit.h, it is unneeded, and also can cause
build problems for other components that include audit.h.
2006-02-03 15:49:07 +00:00
Robert Watson
59428b0bad In fchdir(), Giant must be separately acquired and dropped if the old
vnode is from a file system that is not MPSAFE, as vrele() expects
Giant to be held when it is called on a non-MPSAFE vnode.

Spotted by:	kris
Tested by:	glebius
2006-02-03 15:42:16 +00:00
Will Andrews
937a238777 Make UDF endian-safe.
Submitted by:	Pedro Martelletto <pedro@ambientworks.net> (via scottl)
Tested on:	sparc64
2006-02-03 15:25:52 +00:00
Marius Strobl
8d727356c6 - Don't shift the clock frequency in MHz left by 8 before assigning it
to sbus_mdvec.dv_clock as sbus_mdvec.dv_clock is meant to be specified
  in MHz. While this was a bug it shouldn't have affected FreeBSD/sparc64
  as sbus_mdvec.dv_clock is used to limit the clock rate of chips when
  a machine isn't able to support them at maximum speed which isn't the
  case for sun4u machines.
- Remove the code that checks whether the clock frequency returned by
  sbus_get_clockfreq() is 0 and falls back to 25MHz if it is as that's
  already done in sbus(4).

Approved by:	mjacob
MFC after:	3 days
2006-02-03 12:35:42 +00:00
Robert Watson
d7bd3313e2 Regenerate. 2006-02-03 11:51:19 +00:00
Robert Watson
62646c07f6 Assign audit event identifiers to many system calls.
Much work by:	wsalamon
Obtained from:	TrustedBSD Project
2006-02-03 11:48:37 +00:00
Gleb Smirnoff
a7908db153 Dropping the lock in the transmit_event() is not safe, because we
store some pipe pointers on stack. If user reconfigures dummynet
in the interlock gap, we can work with freed pipes after relock.

To fix this, we decided not to send packets in transmit_event(),
but fill a queue. At the end of dummynet() and dummynet_io(),
after the lock is dropped, if there is something in the queue
we run dummynet_send() to process the queue.

In collaboration with:	ru
2006-02-03 11:38:19 +00:00
Gleb Smirnoff
ce62866023 Axe unused function. 2006-02-03 10:42:28 +00:00
Warner Losh
d0e50224e8 MFp4: Small cleanup of cpu messages at boot. 2006-02-03 06:39:57 +00:00
Warner Losh
f037afb7ea Merge from p4: minor formatting nits. 2006-02-03 06:27:51 +00:00
David Xu
6d7c1bdccd MFi386:
Clear carry flag in get_mconetxt so that setcontext does not
	return a bogus error.
2006-02-03 02:49:14 +00:00
David Xu
97794f4eb3 Clear carry flag in get_mcontext so that setcontext does not
return a bogus error.

PR: misc/92110
2006-02-03 02:33:01 +00:00
Matt Jacob
df7418f32f !$(*&!($!&$(!&$&(!$(&!&($!($
Forget to commit this.
2006-02-03 00:36:19 +00:00
Peter Wemm
e2a5e4efdb Make PV entries dynamic on amd64. i386 has a pre-reserved block of kva
dedicated to storing pv entries, originally so that kva didn't have to be
allocated at inconvenient times.  For amd64, we can get the same effect by
using the direct map area.  Allocating pages is the same as with the object
backed method, but now we can just lookup the page in the direct map area.
Thus, no more pageable kva is reserved.  This is the single largest
consumer of kva on our work machines and this change should help conserve
the fixed size 2GB pageable kva on the amd64 kernel.

There are a pair of sysctl nodes introduced, named the same as their
tunable counterparts.  vm.pmap.shpgperproc and vm.pmap.pv_entry_max
They work just like the tunables of the same path, except the values are
linked.  The pv entry cap is now dynamically changeable.

I didn't make them totally unlimited because we need some sort of safety
limit still.  One could consume all physical memory without a cap.
2006-02-03 00:16:36 +00:00
Warner Losh
6117d67f88 If the device has a PNPID, don't bother to attach. There were some
instances where the probe that was here would falsely grab a device.
2006-02-02 23:57:31 +00:00
Marcel Moolenaar
8c4f6925c4 Remove devices acpi & mem, as they are in defaults already. 2006-02-02 23:41:08 +00:00
Gleb Smirnoff
05a2398f32 In vlan_config() first call vlan_inithash(), then lock mutex, because
vlan_inithash() calls malloc(M_WAITOK).
2006-02-02 22:11:38 +00:00
Tor Egge
44ed341759 Adjust old comment (present in rev 1.1) to match changes in rev 1.82.
PR:	kern/92509
Submitted by:   "Bryan Venteicher" <bryanv@daemoninthecloset.org>
2006-02-02 21:55:38 +00:00
Tor Egge
c78226329a For low memory situations, non-VMIO buffers didnt't release pages back to
the system when brelse() was called with B_RELBUF set on the buffer.  This
could be a problem when the system was low on memory, had many buffers on
QUEUE_EMPTYKVA and started to traverse directories.  For each getnewbuf(),
pages were allocated from the system, driving the free reserve downwards.
For each brelse(), the system put the buffer on QUEUE_CLEAN, with B_INVAL
set.

This commit changes the semantics of B_RELBUF to also free pages from
non-VMIO buffers.

Reviewed by:	alc
2006-02-02 21:37:39 +00:00
Matt Jacob
53af7d226e Remove use of inlines and use the functions as a library.
Larger code space, possibly performance hit, but more portable.
Certainly less questionable use of inlining.

Suggested by: des
2006-02-02 21:31:34 +00:00
Olivier Houchard
56db7f4cc6 Don't destroy the slave /dev entry until someone figures out why devfs seems
to behave badly when we do so.
2006-02-02 20:35:45 +00:00
Christian S.J. Peron
fa918e1ef7 define lock.h before rwlock.h for DEBUG_LOCKS 2006-02-02 20:33:10 +00:00
John Baldwin
f6b457923d Whitespace fix.
Submitted by:	Wojciech A. Koszek <dunstan at zsno ids czest pl>
2006-02-02 20:14:52 +00:00
Paul Saab
19cf04981a Implement SIOCGIFCONF for 32bit binaries. 2006-02-02 19:58:37 +00:00
Paul Saab
0e74562fbc Enable 64bit SGL's on PERC 4/DC 2006-02-02 17:51:47 +00:00
Paul Saab
447c943f68 - Move the command setup from amr_start1 into the card specific submit
routines.
- Add or replace cpu_spinwait() with DELAY(1) to a few of the busy
  loops when reading from the controller to work around firmware bugs
  which can crash the controller.
2006-02-02 17:50:59 +00:00
Christian S.J. Peron
f5cdbcf14c Use PFIL_HOOKED macros in if_bridge and pass the right argument to
rw_assert. This un-breaks the build.

Submitted by:	Kostik Belousov
Pointy hat to:	csjp
2006-02-02 16:41:20 +00:00
David Xu
165ba65d7b Under verbose mode, correctly report L2 cache information
for CPU which supports CPUID function 8000_0006h.

Tested on: Pentum-M 750
2006-02-02 12:44:09 +00:00
David Xu
ec4275eefa Fix bug in L2 cache size detection code for CPU which supports CPUID
function 8000_0006h.

Tested on: Pentum-M 750
2006-02-02 11:54:40 +00:00
Hajimu UMEMOTO
92cb1c3210 make IPV6_V6ONLY socket option work for UDP as well.
PR:		ports/92620
Reported by:	Kurt Miller <kurt__at__intricatesoftware.com>
MFC after:	1 week
2006-02-02 11:46:05 +00:00
Yoshihiro Takahashi
df55e78b6f MFi386: Enable the ce(4). 2006-02-02 11:14:13 +00:00
Oleg Bulyzhin
ee7ef91c36 Enable 'complete' rx checksum offloading (i.e. let chip calculate checksums
with pseudo header for tcp/udp packets). This could save one in_pseudo() call
per incoming tcp/udp packet.

Approved by:	glebius (mentor)
MFC after:	3 weeks
2006-02-02 09:58:31 +00:00
Matt Jacob
b7918ba53a Make sure we don't pick up a loopid that's larger than our
current portdb max (MAX_FC_TARG == 256) now that we support
2K Login f/w.

MFC after:	3 days
2006-02-02 09:02:16 +00:00
Jeff Roberson
68ce4375c4 - textvp may have been from a different mountpoint than ndp->ni_vp and
we may need to acquire giant to vrele it.

Found by:	mjacob
MFC After:	3 days
2006-02-02 08:39:39 +00:00
David Xu
7aa9d01bf4 Correctly report L2 cache size according to its code comment.
Tested on my Dual PIII machine.
2006-02-02 06:35:50 +00:00
Christian S.J. Peron
604afec496 Somewhat re-factor the read/write locking mechanism associated with the packet
filtering mechanisms to use the new rwlock(9) locking API:

- Drop the variables stored in the phil_head structure which were specific to
  conditions and the home rolled read/write locking mechanism.
- Drop some includes which were used for condition variables
- Drop the inline functions, and convert them to macros. Also, move these
  macros into pfil.h
- Move pfil list locking macros intp phil.h as well
- Rename ph_busy_count to ph_nhooks. This variable will represent the number
  of IN/OUT hooks registered with the pfil head structure
- Define PFIL_HOOKED macro which evaluates to true if there are any
  hooks to be ran by pfil_run_hooks
- In the IP/IP6 stacks, change the ph_busy_count comparison to use the new
  PFIL_HOOKED macro.
- Drop optimization in pfil_run_hooks which checks to see if there are any
  hooks to be ran, and returns if not. This check is already performed by the
  IP stacks when they call:

        if (!PFIL_HOOKED(ph))
                goto skip_hooks;

- Drop in assertion which makes sure that the number of hooks never drops
  below 0 for good measure. This in theory should never happen, and if it
  does than there are problems somewhere
- Drop special logic around PFIL_WAITOK because rw_wlock(9) does not sleep
- Drop variables which support home rolled read/write locking mechanism from
  the IPFW firewall chain structure.
- Swap out the read/write firewall chain lock internal to use the rwlock(9)
  API instead of our home rolled version
- Convert the inlined functions to macros

Reviewed by:	mlaier, andre, glebius
Thanks to:	jhb for the new locking API
2006-02-02 03:13:16 +00:00
Robert Watson
06f2859f6d Regenerate. 2006-02-02 01:45:01 +00:00
Robert Watson
35d29f5091 Map audit-related system calls to audit event identifiers.
Much work by:	wsalamon
Obtained from:	TrustedBSD Project
2006-02-02 01:44:30 +00:00
Robert Watson
fcf7f27a36 Hook up audit to fork() and exit() events. These changes manage the
audit state on processes, not auditing of these events.

Much work by:	wsalamon
Obtained from:	TrustedBSD Project
2006-02-02 01:32:58 +00:00
Robert Watson
3683665bbd Hook up audit to the initial process creation events (proc0, proc1).
Much help from:	wsalamon
Obtained from:	TrustedBSD Project
2006-02-02 01:16:31 +00:00