Commit graph

94977 commits

Author SHA1 Message Date
Christian Weisgerber c698f34f6c reference ntpd(8) 2003-10-04 15:07:27 +00:00
Yaroslav Tykhiy 1530954057 Don't dump core from the time(1) process itself
if the child process has exited on a signal
whose default action is to dump core.
2003-10-04 14:42:03 +00:00
Jeff Roberson 1de1f935f2 - If we are called with LK_NOWAIT in vn_lock() we may be holding a mutex
and should not sleep while waiting for XLOCK to clear.  Care needs to be
   taken in functions that use this capability to avoid spinning.
2003-10-04 14:35:22 +00:00
Jeff Roberson c31e93450f - Document more of the vnode locking strategy. 2003-10-04 14:32:55 +00:00
Jeff Roberson 04a17687ea - Increase the scope of the interlock in ffs_reload(). Acquire it before
we release the mntvnode_mtx.
 - Call vgonel() directly instead of going through vrecycle() since we own
   the interlock now.
 - Remove a few cases where we locked the interlock just so that we could
   call VOP_UNLOCK with interlock held.
2003-10-04 14:27:49 +00:00
Jeff Roberson 934914d2ef - Fix an unlocked call to GETATTR by slightly shuffling the code in
ffs_snapshot() around.
 - Acquire the interlock before releasing the mntvnode_mtx.  Use the
   interlock to protect v_usecount access.
2003-10-04 14:25:45 +00:00
Jeff Roberson f3c625e47a - Use the UMA_ZONE_VM flag on the fakepg and object zones to prevent
vm recursion and LORs.  This may be necessary for other zones created in
   the vm but this needs to be verified.
2003-10-04 14:21:53 +00:00
Jeff Roberson 90e1659e41 - Use the VI_LOCK macro in two places where we directly called mtx_lock()
before.  Direct calls indicated places that needed review and these have
   now been reviewed.
2003-10-04 14:03:28 +00:00
Jeff Roberson 8f2e9e4388 - Properly acquire the vnode interlock before releasing the
mntvnode_mtx.
 - Use a local variable to store the results of the test to see if the
   next vnode on the mount list has changed.  This is so that we no longer
   acess the vnode after we vput() it.
2003-10-04 14:02:32 +00:00
Jeff Roberson bb33b5fabf - Acquire the vnode interlock prior to dropping the mntvnode_mtx.
- Make a note of the lack of XLOCK protection in this code.  We would access
   a vnode while it is changing identities without Giant.
2003-10-04 13:44:51 +00:00
Jeff Roberson 0c31ea3b2d - Make proper use of the mntvnode_mtx. We do not need the loop label
because we do not drop the mntvnode_mtx.  If this code had ever executed
   and hit the loop condition it would have spun forever.
2003-10-04 13:16:54 +00:00
Jeff Roberson 478042909d - The proper test is CPU_ENABLE_SSE and not CPU_ENABLED_SSE. This
effectively disabled the sse2_pagezero() code.

Spotted by:	bde
2003-10-04 13:07:53 +00:00
Jeff Roberson c13c04a426 - Acquire the vnode interlock prior to droping the mntvnode_mtx. This does
not eliminate races where the vnode could be reclaimed and end up with
   a NULL v_data pointer but Giant is protecting us from that at the moment.
2003-10-04 12:52:37 +00:00
Jeff Roberson 04c81ad83c - Remove a mp_fixme() and some locks that weren't necessary. I now
understand how this works.
2003-10-04 11:06:43 +00:00
Alan Cox 10e9e2d1b9 Synchronize access to a page's valid field by using the lock from its
containing object.
2003-10-04 09:20:00 +00:00
Jeff Roberson 8b5905a47d - Remove the backtrace() call from the *_vinvalbuf() functions. Thanks to a
stack trace supplied by phk, I now understand what's going on here.  The
   check for VI_XLOCK stops us from calling vinvalbuf once the vnode has been
   partially torn down in vclean().  It is not clear that this would cause
   a problem.  Document this in nfs_bio.c, which is where the other two
   filesystems copied this code from.
2003-10-04 08:51:50 +00:00
Diomidis Spinellis 4566e7a433 Check for write errors; report and exit with error value. 2003-10-04 07:16:40 +00:00
Peter Wemm 708b44ba6f Emulate bugs in the old PSE code so that apm works again.
I do not yet understand why, but apm *depended* on the fact that the old
PSE code caused the first 1MB of ram to be mapped read/write because it
was in the same 4MB page as the kernel text+data+bss blob.

If anybody ever tried DISABLE_PSE before, apm would not work.

If your cpu did not have PSE, apm would not work there either (eg: 486).

This bug has been around for a Very Long Time.

The Pentium-4-fix commits did not emulate this unintended side effect of
the PSE post-early-boot fixup, and thus apm blew up.  I've added a hack to
emulate the bug until either apm is fixed or we set fire to our bridges.

This is bad though because it gives kernel mode code the opportunity
to accidently write to the first few megs of the general page pool
which is remapped at KERNBASE.  It needs to be fixed properly.
2003-10-04 06:30:56 +00:00
Sam Leffler d1dd20be6e Locking for updates to routing table entries. Each rtentry gets a mutex
that covers updates to the contents.  Note this is separate from holding
a reference and/or locking the routing table itself.

Other/related changes:

o rtredirect loses the final parameter by which an rtentry reference
  may be returned; this was never used and added unwarranted complexity
  for locking.
o minor style cleanups to routing code (e.g. ansi-fy function decls)
o remove the logic to bump the refcnt on the parent of cloned routes,
  we assume the parent will remain as long as the clone; doing this avoids
  a circularity in locking during delete
o convert some timeouts to MPSAFE callouts

Notes:

1. rt_mtx in struct rtentry is guarded by #ifdef _KERNEL as user-level
   applications cannot/do-no know about mutex's.  Doing this requires
   that the mutex be the last element in the structure.  A better solution
   is to introduce an externalized version of struct rtentry but this is
   a major task because of the intertwining of rtentry and other data
   structures that are visible to user applications.
2. There are known LOR's that are expected to go away with forthcoming
   work to eliminate many held references.  If not these will be resolved
   prior to release.
3. ATM changes are untested.

Sponsored by:	FreeBSD Foundation
Obtained from:	BSD/OS (partly)
2003-10-04 03:44:50 +00:00
Garance A Drosehn c303328741 Handle a 'const' parameter without using __DECONST().
MFC after:	14 days
2003-10-04 02:24:47 +00:00
Sam Leffler 5f7a7923ea add a stub for bpfattach2 so bpf is not required with the 802.11
module or related drivers

Spotted by:	Dan Lukes <dan@obluda.cz>
2003-10-04 01:32:28 +00:00
Bruce M Simpson b0b35125f0 Remove the pmap_prefault(9) page as it is no longer required. 2003-10-04 01:32:25 +00:00
Bruce M Simpson cdf9f3771e Update the pmap(9) documentation to reflect the movement of pmap_prefault()
to the machine-independent VM layer, as per alc's recent commit.
Add a definition for the new pmap_is_prefaultable() helper function.
2003-10-04 01:30:01 +00:00
Alan Cox 566526a957 Migrate pmap_prefault() into the machine-independent virtual memory layer.
A small helper function pmap_is_prefaultable() is added.  This function
encapsulate the few lines of pmap_prefault() that actually vary from
machine to machine.  Note: pmap_is_prefaultable() and pmap_mincore() have
much in common.  Going forward, it's worth considering their merger.
2003-10-03 22:46:53 +00:00
Sam Leffler 87002f0dc1 hookup ctlinput for fast ipsec versions of esp+ah protocols
Supported by:	FreeBSD Foundation
2003-10-03 22:06:36 +00:00
Warner Losh eefb5d68b2 While make has been fixed to grok this construct, the new make hasn't
been widely deploy and that's causing us a lot of pain.  Back out the
last commit for a few weeks so that we can lessen the support load in
current@ asking why they can't build kernels anymore.  Instructions in
UPDATING have been updated, but this should be more effective.

Revert the reverting: November 1st, 2003
2003-10-03 22:00:06 +00:00
Poul-Henning Kamp 77e8ad5714 Default ntpd to write a "driftfile" in /var/db/ntpd.drift.
A "driftfile" caches the oscillator offset estimate from boot to boot,
having this means faster and less bumpy time synchronization.  Will
be overridden by any value in the config file.
2003-10-03 21:33:40 +00:00
Ruslan Ermilov 277a49999a Make the -q option DTRT in the compat mode.
PR:	48210
2003-10-03 21:33:39 +00:00
Sam Leffler d6bb3ab6ff remove unused variable
Supported by:	FreeBSD Foundation
2003-10-03 21:06:17 +00:00
Sam Leffler 8145952fa5 remove unneeded include of route.h
Supported by:	FreeBSD Foundation
2003-10-03 21:05:08 +00:00
Sam Leffler 2091a3fbaf remove include of route.h now that ip_dummynet.h no longer exposes
data structures that have an embedded struct route

Sponsored by:	FreeBSD Foundation
2003-10-03 21:01:48 +00:00
Sam Leffler 12394d06d8 place some kernel-specific data structures under #ifdef _KERNEL
Sponsored by:	FreeBSD Foundation
2003-10-03 20:58:56 +00:00
Ruslan Ermilov 64ba14f2c7 Removed the ancient .LIBS setting that causes non-existent
libraries to be reported as up-to-date.

Before:

# make -f /dev/null nonexistent.a
`nonexistent.a' is up to date.

After:

# make -f /dev/null nonexistent.a
make: don't know how to make nonexistent.a. Stop

PR:		bin/44137 (part of)
2003-10-03 20:47:37 +00:00
Poul-Henning Kamp e0f8a7e7af Fix typo.
Spotted by:	"Bjoern A. Zeeb" <bzeeb@zabbadoz.net>
2003-10-03 19:57:58 +00:00
Alan Cox 1b2d9f0653 Make PAGE_SIZE and related quantities signed on sparc64. (They are signed
quantities on every other architecture.)  This change is required in order
to move pmap_prefault() out of the pmap and into the machine-independent
layer.
2003-10-03 19:49:08 +00:00
Poul-Henning Kamp 99d38d6c23 Only install .k5login if people have not set NO_KERBEROS. 2003-10-03 19:38:21 +00:00
Diomidis Spinellis e4dcc1fd98 Style fixes: shell script indentation, if/then style, plus a lot
of comments in C code (capitalized, end with full stop).

Submitted by:	schweikh
2003-10-03 19:31:55 +00:00
Diomidis Spinellis ff7cd805df Create a driver that will compile without warnings on -CURRENT
More changes are probably needed to create a correct driver.

Reviewed by:	markm
Approved by:	schweikh (mentor)
2003-10-03 19:15:07 +00:00
Poul-Henning Kamp 027ec595a1 More checking if kenv actually know something.
Guard against test(1)-unfriendly outputs from kenv.
2003-10-03 19:07:31 +00:00
Ruslan Ermilov 282e0f015b Fixed the "To build a kernel" section to mention -DALWAYS_CHECK_MAKE
as the new sys/conf/kmod.mk depends on a make(1) bugfix now.

Reported by:	current
2003-10-03 18:29:06 +00:00
Robert Watson 5fd04e380f When direct dispatching an netisr (net.isr.enable=1), if there are already
any queued packets for the isr, process those packets before the newly
submitted packet, maintaining ordering of all packets being delivered
to the netisr.  Remove the bypass counter since we don't bypass anymore.
Leave the comment about possible problems and options since later
performance optimization may change the strategy for addressing ordering
problems here.

Specifically, this maintains the strong isr ordering guarantee; additional
parallelism and lower latency may be possible by moving to weaker
guarantees (per-interface, for example).  We will probably at some point
also want to remove the one instance netisr dispatch limit currently
enforced by a mutex, but it's not clear that's 100% safe yet, even in
the netperf branch.

Reviewed by:	sam, others
2003-10-03 18:27:24 +00:00
Sam Leffler aea8b30f12 trivial locking rtsock_cb
Sponsored by:	FreeBSD Foundation
2003-10-03 18:27:02 +00:00
Poul-Henning Kamp 91c1935fe5 In case we have no /etc/resolv.conf, don't try to make it out of
thin blue air if the kenv doesn't have any info.

This improves the truth value of the comment above significantly and
reduces the bogous output on the console considerably.
2003-10-03 18:26:33 +00:00
Sam Leffler becc44d76c cleanups prior to adding locking (and in some cases to eliminate locking):
o move route_cb to be private to rtsock.c
o replace global static route_proto by locals
o eliminate global #define shorthands for info references
o remove some register decls
o ansi-fy function decls
o move items to be close in scope to their usage
o add rt_dispatch function for dispatching the actual message
o cleanup tangled logic for doing all-but-me msg send

Support by:	FreeBSD Foundation
2003-10-03 18:15:54 +00:00
Bruce M Simpson c3b52d6499 Shorten 'bad gateway' AF_LINK message.
Submitted by:	green
2003-10-03 17:22:14 +00:00
Bruce M Simpson beb2ced8ac Make arp_rtrequest()'s 'bad gateway' messages slightly more informative,
to aid me in tracking down LLINFO inconsistencies in the routing table.

Discussed with:	fenner
2003-10-03 17:21:17 +00:00
Joe Marcus Clarke d87866b1e2 Export PARALLEL_PACAKGE_BUILD to the environment as well to catch more
packages that should/should not be included on the first CD.  This is needed
for the recent KDE space-saving change.

Approved by:	re (bmah)
2003-10-03 16:48:36 +00:00
Bruce A. Mah 87f4183704 New release notes: LIBICONV, CD9660_ICONV/MSDOSFS_ICONV/NTFS/ICONV,
libkiconv, mount_cd9660(8)/mount_ntfs(8) -C, mount_msdos(8) -M,
mount_msdos(8) -D/-L.

While here, note that OpenSSL 0.9.7c was MFC-ed.

Submitted by:	"R. Imura" <imura@ryu16.org>
2003-10-03 16:28:26 +00:00
Bruce A. Mah 28e8ab68e0 New release note: OpenSSL 0.9.7c. 2003-10-03 16:14:54 +00:00
Hiroki Sato 0708b127ae Remove SA-03:16. 2003-10-03 14:53:06 +00:00