dragonfly.git
11 years agoMerge from vendor branch OPENSSH:
Peter Avalos [Sat, 27 Sep 2008 22:32:45 +0000 (22:32 +0000)]
Merge from vendor branch OPENSSH:
Import OpenSSH-5.1p1.

11 years agoImport OpenSSH-5.1p1.
Peter Avalos [Sat, 27 Sep 2008 22:32:45 +0000 (22:32 +0000)]
Import OpenSSH-5.1p1.

11 years agoUpgrade to OpenSSL 0.9.8i.
Peter Avalos [Sat, 27 Sep 2008 21:04:49 +0000 (21:04 +0000)]
Upgrade to OpenSSL 0.9.8i.

11 years agoMerge from vendor branch OPENSSL:
Peter Avalos [Sat, 27 Sep 2008 20:51:29 +0000 (20:51 +0000)]
Merge from vendor branch OPENSSL:
Import OpenSSL-0.9.8i.

11 years agoImport OpenSSL-0.9.8i.
Peter Avalos [Sat, 27 Sep 2008 20:51:29 +0000 (20:51 +0000)]
Import OpenSSL-0.9.8i.

11 years agoDo not loop forever if narg becomes negative. This can happen when asked
Matthew Dillon [Sat, 27 Sep 2008 20:29:52 +0000 (20:29 +0000)]
Do not loop forever if narg becomes negative.  This can happen when asked
to kdump trace output created by emulated system calls.

11 years agoRevoke the INTR_MPSAFE flag; nata is not MPSAFE yet.
Sepherosa Ziehau [Sat, 27 Sep 2008 11:45:30 +0000 (11:45 +0000)]
Revoke the INTR_MPSAFE flag; nata is not MPSAFE yet.

11 years agoFor SMP kernel
Sepherosa Ziehau [Sat, 27 Sep 2008 11:29:47 +0000 (11:29 +0000)]
For SMP kernel
- Don't call arp_update_oncpu() again in in_arpinput()
- Pass dologging to arp_update_oncpu(), only if the current cpu is CPU0,
  remove the redundant cpu==0 checks

Reviewed-by: dillon@
11 years agoSchedule ipfw_tick() to IPFW_CFGPORT to run, this function is too time
Sepherosa Ziehau [Fri, 26 Sep 2008 12:12:36 +0000 (12:12 +0000)]
Schedule ipfw_tick() to IPFW_CFGPORT to run, this function is too time
consuming and complex to run in callout thread.

Use MPSAFE callout after above change.

11 years agoAttempt to fix the crash if accessing usb device(s) after unloading usb.ko.
Hasso Tepper [Fri, 26 Sep 2008 08:21:22 +0000 (08:21 +0000)]
Attempt to fix the crash if accessing usb device(s) after unloading usb.ko.

11 years ago- Minor style and white space changes
Sepherosa Ziehau [Thu, 25 Sep 2008 14:08:06 +0000 (14:08 +0000)]
- Minor style and white space changes
- Break long line

11 years agoIf not in debugger, output kernel debug information to both the console and
Sepherosa Ziehau [Thu, 25 Sep 2008 13:30:15 +0000 (13:30 +0000)]
If not in debugger, output kernel debug information to both the console and
kernel message buffer via printf.

Obtained-from: FreeBSD

11 years agoAdd NETISR_TO_MSGF() to convert netisr.ni_flags to lwkt_msg.ms_flags to
Sepherosa Ziehau [Thu, 25 Sep 2008 12:08:51 +0000 (12:08 +0000)]
Add NETISR_TO_MSGF() to convert netisr.ni_flags to lwkt_msg.ms_flags to
avoid potential tranlation bugs

Pointed-out-by: hsu@
11 years agoRemove the untrue example section of the man page. We have the -S option to
Matthias Schmidt [Thu, 25 Sep 2008 09:09:06 +0000 (09:09 +0000)]
Remove the untrue example section of the man page.  We have the -S option to
sort entries by size.

11 years agoFix function name.
Sascha Wildner [Wed, 24 Sep 2008 19:48:40 +0000 (19:48 +0000)]
Fix function name.

11 years agoIf the current thread is not a network thread then rejecting the packet back
Sepherosa Ziehau [Wed, 24 Sep 2008 15:06:45 +0000 (15:06 +0000)]
If the current thread is not a network thread then rejecting the packet back
into netisrX when it becomes eligible.  Add comment about possible situation
that the current thread is not a network thread.

11 years agoAdd NETISR_FLAG_NOTMPSAFE, which could be used as the last parameter to
Sepherosa Ziehau [Wed, 24 Sep 2008 14:26:39 +0000 (14:26 +0000)]
Add NETISR_FLAG_NOTMPSAFE, which could be used as the last parameter to
netisr_register(), more expressive and less error-prone than 0.

Suggested-by: hsu@
11 years agoMark all msgs used by polling(4) as MPSAFE ones
Sepherosa Ziehau [Wed, 24 Sep 2008 12:07:19 +0000 (12:07 +0000)]
Mark all msgs used by polling(4) as MPSAFE ones

11 years agoInclude necessary head file for {get,rel}_mplock() to unbreak UP kernel build
Sepherosa Ziehau [Wed, 24 Sep 2008 11:14:43 +0000 (11:14 +0000)]
Include necessary head file for {get,rel}_mplock() to unbreak UP kernel build

Pointed-out-by: y0netan1@
11 years agoAdditions to 'hammer pfs-*':
Matthew Dillon [Wed, 24 Sep 2008 01:42:50 +0000 (01:42 +0000)]
Additions to 'hammer pfs-*':

    * Add 'snapshots=dir' and 'snapshots-clear' options

      This allows you to specify the snapshots directory for any PFS, master
      or slave.  The option will override the default "snapshots"
      sub-directory used by the 'hammer cleanup' directive for PFS masters.

      This option is required for PFS slaves since the hammer cleanup
      directive cannot use a directory in the slave PFS as a working
      directory (because its a slave).

Additions to 'hammer cleanup':

    * Implement the snapshot limit found the config file.  e.g. if the
      <fs>/snapshots/config file contains: 'snapshots 1d 60d' then
      the filesystem is snapshotted once a day and snapshot softlinks over
      60 days old will be deleted.

    * This directive now checks the snapshots path configured in the PFS
      and uses it if it is not empty.  The snapshots path must be configured
      for slaves.

11 years agosleep for a shorter period of time when an excessive number of inodes are
Matthew Dillon [Wed, 24 Sep 2008 00:53:51 +0000 (00:53 +0000)]
sleep for a shorter period of time when an excessive number of inodes are
being recycled.

11 years agoRename the PFSD structure's prune_path[64] to snapshots[64].
Matthew Dillon [Wed, 24 Sep 2008 00:53:16 +0000 (00:53 +0000)]
Rename the PFSD structure's prune_path[64] to snapshots[64].

11 years agoFix a double-flush which was occuring for every unlinked inode, resulting
Matthew Dillon [Tue, 23 Sep 2008 22:28:56 +0000 (22:28 +0000)]
Fix a double-flush which was occuring for every unlinked inode, resulting
in very inefficient flushing operations which also prevented any inode from
being reclaimed until the entire flush batch (which could be upwards of 40,000
inodes) completed.

The double-flush was caused by the HAMMER_INODE_DELETING flag being
improperly set twice.

Clear the HAMMER_INODE_REFLUSH flag if a reflush was queued but the
modmask is cleared by the prior flush.

Adjust the directory mtime before flushing an underlying inode, avoiding
a double flush of the directory inode.

Reported-by: Hasso Tepper <hasso@estpak.ee>
11 years agoChange the autoflush code to autoflush when a flush group reaches a
Matthew Dillon [Tue, 23 Sep 2008 21:03:52 +0000 (21:03 +0000)]
Change the autoflush code to autoflush when a flush group reaches a
certain point rather then trying to do it from the reclaim code.  This
smooths out the flush sequences.  The default is 2000, adjustable via
the vfs.hammer.autoflush sysctl.

Move hammer_inode_waitreclaims() calls.  In particular, remove the calls
in the VOP_CLOSE() path.  The problem with waiting for excessive reclaims to
drop in these paths is that the inode/vnode operation in question is probably
cached.  Thus unrelated programs, even those just opening /dev/null (if /dev
is on a HAMMER filesystem), can wind up blocking in hmrrcm for no good reason.

Instead defer the hammer_inode_waitreclaims() call to the end of the
transaction code if a new inode had to be created during the transaction.
Thus we tend to block on operations that did not have previously cached
vnodes to work with instead of operations on cached vnodes.

Reported-by: Hasso Tepper <hasso@estpak.ee>
11 years agoMake two more changes to the ata request queue sorting code.
Matthew Dillon [Tue, 23 Sep 2008 17:43:41 +0000 (17:43 +0000)]
Make two more changes to the ata request queue sorting code.

* Do not try to sort write requests.  There's no point, the hard drive
  has a write cache and a much better understanding of the media topology
  and will sort the requests for us.

* Move the freeze point every 16 requests instead of every 128 to further
  reduce the amount of reordering we allow to prevent older requests from
  being delayed indefinitely by newer requests.

  Note: the original ata code didn't code any limits at all, causing insanely
  long latencies during heavy disk I/O for no good reason.

Reported-by: Hasso Tepper <hasso@estpak.ee>
11 years agopolling(4)'s poll/pollmore netmsg handler will not be changed, so initialize
Sepherosa Ziehau [Tue, 23 Sep 2008 14:14:20 +0000 (14:14 +0000)]
polling(4)'s poll/pollmore netmsg handler will not be changed, so initialize
them once.

11 years agoOn ethernet input path:
Sepherosa Ziehau [Tue, 23 Sep 2008 13:12:06 +0000 (13:12 +0000)]
On ethernet input path:
- Put netgraph(4), carp(4) and IPX (mainly ef_inputp) under BGL explicitly
- Set MSGF_MPSAFE on the msg sent to the network protocols threads

11 years agoUse netmsg_service_sync() to protect vlan_input_p
Sepherosa Ziehau [Tue, 23 Sep 2008 11:50:11 +0000 (11:50 +0000)]
Use netmsg_service_sync() to protect vlan_input_p

11 years agoAdd following three network protocol threads running mode:
Sepherosa Ziehau [Tue, 23 Sep 2008 11:28:50 +0000 (11:28 +0000)]
Add following three network protocol threads running mode:
1) BGL (default)
2) Adaptive BGL.  Protocol threads run without BGL by default.  BGL will be
   held if the received msg does not have MSGF_MPSAFE turned on the ms_flags
   field
3) No BGL (experimental)

The code on the main path is done by dillon@

Following three sysctls and tunables are added to adjust the "mode":
net.netisr.mpsafe_thread
net.inet.tcp.mpsafe_thread
net.inet.udp.mpsafe_thread

They have same set of values,
0 (default) -- BGL
1      -- Adaptive BGL
2      -- No BGL

NETISR_FLAG_MPSAFE is added (netisr.ni_flags), so that:
- netisr_queue() and schednetisr() could set MSGF_MPSAFE during msg
  initialization
- netisr_run() (called by ether_input_oncpu()) could hold BGL based on this flag
  before calling netisr's handler

PR_MPSAFE is added (protosw.pr_flags), so that tranport_processing_oncpu() could
hold BGL before calling protocol's input handler

Kernel API changes:
- The thread parameter to netmsg_service_loop() must be supplied (running mode)
  and it must have the type of "int *"
- netisr_register() takes additional flags parameter to indicate whether its
  handler is MPSAFE (NETISR_FLAG_MPSAFE) or not

Reviewed-by: dillon@
11 years agoAdd _SC_PAGE_SIZE as alias to _SC_PAGESIZE to make modern software pieces
Hasso Tepper [Mon, 22 Sep 2008 09:13:21 +0000 (09:13 +0000)]
Add _SC_PAGE_SIZE as alias to _SC_PAGESIZE to make modern software pieces
happy.

11 years agoHAMMER: Fix a couple of minor non-corrupting bugs in HAMMER.
Matthew Dillon [Sun, 21 Sep 2008 02:58:31 +0000 (02:58 +0000)]
HAMMER: Fix a couple of minor non-corrupting bugs in HAMMER.

* Fix a few cases where the kmalloc space for hammer inodes can become
  exhausted.  Add calls to hammer_inode_waitreclaims() in several places
  where modified inodes can build up without the related vnodes
  necessarily being VOP_OPEN()'d or VOP_CLOSE()'d.

* Fix a deadlock which can occur in fsync().  fsync() was holding the vnode
  lock while waiting for the inode to sync.  The inode sync can be held up
  indefinitely by dependancies on other vnodes, so holding the lock can
  result in a deadlock.

* Fix a bug where ap->a_ctllen test results were being ignored.  This
  path is only used by mountd.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>,
Damian Lubosch <dl@pless.xiqit.de>

11 years ago- Add KTR of ethernet operations
Sepherosa Ziehau [Sat, 20 Sep 2008 10:53:16 +0000 (10:53 +0000)]
- Add KTR of ethernet operations
- Measure the cost of ether_input_chain
- Measure the cost of ether_input_dispatch

11 years ago* Fix a bug in runcmd() - the argv[] list was not NULL terminated.
Matthew Dillon [Sat, 20 Sep 2008 07:08:06 +0000 (07:08 +0000)]
* Fix a bug in runcmd() - the argv[] list was not NULL terminated.

* Record PFS's by their unique_uuid instead of their pfs_id, allowing
  the clean operation to cover multiple PFSs on multiple HAMMER mounts.

11 years agoIf snapshots are disabled and the snapshots directory contains no
Matthew Dillon [Sat, 20 Sep 2008 06:46:22 +0000 (06:46 +0000)]
If snapshots are disabled and the snapshots directory contains no
snapshot softlinks, prune using 'prune-everything' instead of 'prune'.

11 years agoAdd PFIL_MPSAFE flag to give hint to pfil(9) that the underlying firewall
Sepherosa Ziehau [Sat, 20 Sep 2008 06:08:13 +0000 (06:08 +0000)]
Add PFIL_MPSAFE flag to give hint to pfil(9) that the underlying firewall
code is MPSAFE.  Set this flag for ipfw(4).

11 years agoInstead of rejecting the eligible packet back into the correct cpu,
Sepherosa Ziehau [Sat, 20 Sep 2008 04:36:51 +0000 (04:36 +0000)]
Instead of rejecting the eligible packet back into the correct cpu,
dummynet(4) now reinjects the eligible packet back into correct
network thread.

11 years agoAdd TDF_NETWORK lwkt flag, so various assertion could be performed to make sure
Sepherosa Ziehau [Sat, 20 Sep 2008 04:31:02 +0000 (04:31 +0000)]
Add TDF_NETWORK lwkt flag, so various assertion could be performed to make sure
that packets are processed in network threads (i.e. controlled enviroment)

11 years agoAdd the 'hammer cleanup' command. This is a meta-command which will
Matthew Dillon [Sat, 20 Sep 2008 04:23:21 +0000 (04:23 +0000)]
Add the 'hammer cleanup' command.  This is a meta-command which will
process specified HAMMER filesystem or, if none specified, locate all
mounted HAMMER filesystems and run snapshot, pruning, and reblocking
commands a appropriate.

If the <fs>/snapshots directory or <fs>/snapshots/config file does not
exist, they will be created.

11 years agoRemove dereference of uninitialized 'i'.
Sascha Wildner [Fri, 19 Sep 2008 18:48:33 +0000 (18:48 +0000)]
Remove dereference of uninitialized 'i'.

Found-by: LLVM/Clang Static Analyzer
11 years agoRemove dereference of 'i' which is never set. getopt() will take care of
Sascha Wildner [Fri, 19 Sep 2008 17:49:31 +0000 (17:49 +0000)]
Remove dereference of 'i' which is never set. getopt() will take care of
printing an "illegal option" message anyway.

Found-by: LLVM/Clang Static Analyzer
11 years agoUpdate comment
Sepherosa Ziehau [Fri, 19 Sep 2008 12:23:56 +0000 (12:23 +0000)]
Update comment

11 years agoCheck ipfw static rules generation after get the BGL
Sepherosa Ziehau [Fri, 19 Sep 2008 12:04:09 +0000 (12:04 +0000)]
Check ipfw static rules generation after get the BGL

11 years agoAdd workaround for JMC250A2 under 10/100 hdx mode.
Sepherosa Ziehau [Fri, 19 Sep 2008 11:36:40 +0000 (11:36 +0000)]
Add workaround for JMC250A2 under 10/100 hdx mode.

Information provided by Ethen <ethanhsiao@jmicron.com>

11 years ago- Add workaround field in softc
Sepherosa Ziehau [Fri, 19 Sep 2008 11:12:33 +0000 (11:12 +0000)]
- Add workaround field in softc
- Move "use extended fifo depth" from caps to workaround

11 years agoAs a safety measure, don't install dma with setuid bit until it has undergone
Simon Schubert [Fri, 19 Sep 2008 00:36:57 +0000 (00:36 +0000)]
As a safety measure, don't install dma with setuid bit until it has undergone
a thorough review.

11 years agoUnbreak buildworld a slightly different way. Adjust null.h to not
Matthew Dillon [Thu, 18 Sep 2008 16:08:32 +0000 (16:08 +0000)]
Unbreak buildworld a slightly different way.  Adjust null.h to not
include internal structures when being included from userland.

11 years agoIn bridge(4), if the packet is tagged for dummynet or is tagged for tranparent
Sepherosa Ziehau [Thu, 18 Sep 2008 11:55:20 +0000 (11:55 +0000)]
In bridge(4), if the packet is tagged for dummynet or is tagged for tranparent
forwarding, we simply drop it; tranparent forwarding probably will never work,
and dummynet support is not yet ready.

11 years agoUnbreak buildworld: define _KERNEL_STRUCTURES for struct netexport.
Sascha Wildner [Thu, 18 Sep 2008 11:54:25 +0000 (11:54 +0000)]
Unbreak buildworld: define _KERNEL_STRUCTURES for struct netexport.

11 years agoIf there are no pfil hooks, just remove the dummynet tag (for packets that
Sepherosa Ziehau [Thu, 18 Sep 2008 11:19:42 +0000 (11:19 +0000)]
If there are no pfil hooks, just remove the dummynet tag (for packets that
were trapped in pipes/queues before pfil hooks were deleted) and skip all
firwall related operation.

11 years ago* Implement the ability to export NULLFS mounts via NFS.
Matthew Dillon [Wed, 17 Sep 2008 21:44:25 +0000 (21:44 +0000)]
* Implement the ability to export NULLFS mounts via NFS.

* Enforce PFS isolation when exporting a HAMMER PFS via a NULLFS mount.

NOTE: Exporting anything other then HAMMER PFS root's via nullfs does
NOT protect the parent of the exported directory from being accessed via NFS.

Generally speaking this feature is implemented by giving each nullfs mount
a synthesized fsid based on what is being mounted and implementing the
NFS export infrastructure in the nullfs code instead of just bypassing those
functions to the underyling VFS.

11 years agoCall ifnet.if_output() in netisr0, so it executes in a controlled enviroment.
Sepherosa Ziehau [Wed, 17 Sep 2008 13:38:28 +0000 (13:38 +0000)]
Call ifnet.if_output() in netisr0, so it executes in a controlled enviroment.

11 years ago'dst' does not need to be static
Sepherosa Ziehau [Wed, 17 Sep 2008 11:46:43 +0000 (11:46 +0000)]
'dst' does not need to be static

11 years agoEmbed a netmsg in ifaddr_container, so IFAFREE could be non-blocking
Sepherosa Ziehau [Wed, 17 Sep 2008 11:25:16 +0000 (11:25 +0000)]
Embed a netmsg in ifaddr_container, so IFAFREE could be non-blocking

11 years agoMake net/netmsg.h userspace friendly
Sepherosa Ziehau [Wed, 17 Sep 2008 11:22:13 +0000 (11:22 +0000)]
Make net/netmsg.h userspace friendly

11 years agoUse absolute inclusion path
Sepherosa Ziehau [Wed, 17 Sep 2008 09:56:49 +0000 (09:56 +0000)]
Use absolute inclusion path

11 years ago'func' has the type of pfil_func_t
Sepherosa Ziehau [Wed, 17 Sep 2008 08:58:33 +0000 (08:58 +0000)]
'func' has the type of pfil_func_t

11 years agoAlways enable ETHER_INPUT_CHAIN support
Sepherosa Ziehau [Wed, 17 Sep 2008 08:51:30 +0000 (08:51 +0000)]
Always enable ETHER_INPUT_CHAIN support

11 years agoRemove the '2' suffix from ether_input_chain and vlan_input; their counterparts
Sepherosa Ziehau [Wed, 17 Sep 2008 07:51:59 +0000 (07:51 +0000)]
Remove the '2' suffix from ether_input_chain and vlan_input; their counterparts
have gone for a long time.

11 years agoNuke unused function
Sepherosa Ziehau [Wed, 17 Sep 2008 07:24:18 +0000 (07:24 +0000)]
Nuke unused function

11 years ago- Remove unnecessary crit sections
Sepherosa Ziehau [Wed, 17 Sep 2008 03:08:27 +0000 (03:08 +0000)]
- Remove unnecessary crit sections
- Remove no longer applied comment

11 years agoFactor out ipfw_match_uid(), put it under BGL explicitly
Sepherosa Ziehau [Wed, 17 Sep 2008 02:53:51 +0000 (02:53 +0000)]
Factor out ipfw_match_uid(), put it under BGL explicitly

11 years ago * fix markup of `auto' argument
Thomas Nikolajsen [Tue, 16 Sep 2008 20:45:36 +0000 (20:45 +0000)]
 * fix markup of `auto' argument
 * add `auto' where missing
 * delete extra synopsis
 * fix wrong single character quoting

11 years agoCommit the remainder of Max's dma work (with minor modifications).
Matthias Schmidt [Tue, 16 Sep 2008 17:57:23 +0000 (17:57 +0000)]
Commit the remainder of Max's dma work (with minor modifications).
See Max mail on kernel@ [1] for further details.

* Support of .forward files (Note: dma is now setuid root)
* Send multiple mails at once
* Fix some style(9) issues (mostly return())

Some style(9) issues are still in the code.  I take care if I have some
spare time :)  Please test!

Submitted-by: Max Lindner <gisanka@gmail.com>
Sponsored-by: Google Summer of Code 2008
[1] http://leaf.dragonflybsd.org/mailarchive/kernel/2008-08/msg00045.html

11 years agoAdd note that NFS exporting PFSs isn't supported yet.
Thomas Nikolajsen [Tue, 16 Sep 2008 15:26:17 +0000 (15:26 +0000)]
Add note that NFS exporting PFSs isn't supported yet.

11 years agoSilence warnings about unhandled enum values.
Sascha Wildner [Tue, 16 Sep 2008 14:08:48 +0000 (14:08 +0000)]
Silence warnings about unhandled enum values.

11 years agoFix stack variable names inheritted from ip_{input,output}()
Sepherosa Ziehau [Tue, 16 Sep 2008 13:36:12 +0000 (13:36 +0000)]
Fix stack variable names inheritted from ip_{input,output}()

11 years agoIf ae is NULL, just print that the controller is unsupported and return,
Sascha Wildner [Tue, 16 Sep 2008 12:39:15 +0000 (12:39 +0000)]
If ae is NULL, just print that the controller is unsupported and return,
instead of continuing and dereferencing it later.

Found-by: LLVM/Clang Static Analyzer
11 years agoAdd DUMMYNET_DEBUG option
Sepherosa Ziehau [Tue, 16 Sep 2008 12:30:57 +0000 (12:30 +0000)]
Add DUMMYNET_DEBUG option

11 years ago- Rework ipfw(4) debug print macro
Sepherosa Ziehau [Tue, 16 Sep 2008 12:16:08 +0000 (12:16 +0000)]
- Rework ipfw(4) debug print macro
- Add IPFIREWALL_DEBUG option

11 years agoSave flags pass by caller
Sepherosa Ziehau [Tue, 16 Sep 2008 11:57:30 +0000 (11:57 +0000)]
Save flags pass by caller

11 years agostruct packet_filter_hook is actually implementation detail; hide it
Sepherosa Ziehau [Tue, 16 Sep 2008 11:53:33 +0000 (11:53 +0000)]
struct packet_filter_hook is actually implementation detail; hide it

11 years agoip_dn_stop() and ip_dn_stop_dispatch() is used only if dummynet(4) is compiled
Sepherosa Ziehau [Tue, 16 Sep 2008 11:48:01 +0000 (11:48 +0000)]
ip_dn_stop() and ip_dn_stop_dispatch() is used only if dummynet(4) is compiled
as module.

11 years agoHeader inclusion
Sepherosa Ziehau [Tue, 16 Sep 2008 11:40:38 +0000 (11:40 +0000)]
Header inclusion

11 years agomycpu->gd_cpuid -> mycpuid
Sepherosa Ziehau [Tue, 16 Sep 2008 11:32:02 +0000 (11:32 +0000)]
mycpu->gd_cpuid -> mycpuid

11 years agoSYSCTL_NODE is always defined
Sepherosa Ziehau [Tue, 16 Sep 2008 11:28:31 +0000 (11:28 +0000)]
SYSCTL_NODE is always defined

11 years agoBump ipfw static rules generation when set/clear IPFW_FULE_F_STATE to avoid
Sepherosa Ziehau [Tue, 16 Sep 2008 11:24:57 +0000 (11:24 +0000)]
Bump ipfw static rules generation when set/clear IPFW_FULE_F_STATE to avoid
possible races if network thread slept on dyn_lock (e.g. to install state)

11 years agoRemove the -1 option from the installer.
Matthias Schmidt [Tue, 16 Sep 2008 11:16:36 +0000 (11:16 +0000)]
Remove the -1 option from the installer.

This option is specific to the old, now removed, ISC dhcp client.  The new
OpenBSD dhcp client does not support this option.  If a user wants to set an
IP address with the installer prior to this commit, it fails and the user sees
an error message.

The meaning of the -1 option was: "Try to get a lease only once.  If it fails,
quit."  Due to this commit, this behaviour changes.  I think its better to have
an installer which tries to get a lease more than once that having an installer
which does not try to get a lease at all.

11 years agoIf a NULL pointer was passed, panic like everywhere else.
Sascha Wildner [Tue, 16 Sep 2008 09:25:45 +0000 (09:25 +0000)]
If a NULL pointer was passed, panic like everywhere else.

Found-by: LLVM/Clang Static Analyzer
11 years ago * Move description of hw.usb.hack_defer_exploration
Thomas Nikolajsen [Mon, 15 Sep 2008 21:23:44 +0000 (21:23 +0000)]
 * Move description of hw.usb.hack_defer_exploration
and vfs.root.mountfrom from loader.conf.5 to loader.8,
as this is where other tunables are described.

11 years ago * Break line at end of sentence
Thomas Nikolajsen [Mon, 15 Sep 2008 20:41:59 +0000 (20:41 +0000)]
 * Break line at end of sentence
 * Add mark up
 * Use <module> instead of `*' for module operations

11 years agoFix old ATA driver name.
Thomas Nikolajsen [Mon, 15 Sep 2008 20:32:53 +0000 (20:32 +0000)]
Fix old ATA driver name.

11 years ago * /loader is loaded if /boot/loader fails
Thomas Nikolajsen [Mon, 15 Sep 2008 20:28:56 +0000 (20:28 +0000)]
 * /loader is loaded if /boot/loader fails
 * fix out of sync occurence of flags

11 years agoFix markup:
Thomas Nikolajsen [Mon, 15 Sep 2008 20:24:41 +0000 (20:24 +0000)]
Fix markup:
 * Add missing escape (\&) to mdoc(7) punctuation characters
 * Consistently use single (vs double) quotes for one character strings

11 years agoWhite space fix: wrong TAB in usage.
Thomas Nikolajsen [Mon, 15 Sep 2008 20:13:16 +0000 (20:13 +0000)]
White space fix: wrong TAB in usage.

11 years agoChange how DESTKERNNAME is handled:
Thomas Nikolajsen [Mon, 15 Sep 2008 20:09:03 +0000 (20:09 +0000)]
Change how DESTKERNNAME is handled:
don't prepend `boot/' to DESTKERNNAME definition,
but prepend it on use.

11 years agoAdd note on move of kernel and modules to boot directory.
Thomas Nikolajsen [Mon, 15 Sep 2008 20:03:36 +0000 (20:03 +0000)]
Add note on move of kernel and modules to boot directory.

11 years agoSmall fix.
Sascha Wildner [Mon, 15 Sep 2008 18:22:48 +0000 (18:22 +0000)]
Small fix.

11 years agoSync zoneinfo database with tzdata2008f from elsie.
Sascha Wildner [Mon, 15 Sep 2008 17:25:39 +0000 (17:25 +0000)]
Sync zoneinfo database with tzdata2008f from elsie.

africa:         8.15 -> 8.16
asia:           8.22 -> 8.23
europe:         8.17 -> 8.18
southamerica:   8.26 -> 8.27

From Arthur David Olson's comments:

* africa
        - Mauritius
                DST 2008 ff. from last Sun Oct to last Sun Mar
                (per Riad M. Hossen Ally)
        - Morocco
                End of DST 2008 ff. changed from Sep 28 to Sep 1
                (per Steffen Thorsen)

* asia
        - Gaza
                End of DST 2008 ff. changed from second Thu in Sep to
                last Thu in Aug (per Alexander Krivenyshev)
        - Pakistan
                End of DST 2008 only changed from Sep 1 to Nov 1
                (per Alexander Krivenyshev)

* europe
        - Turkey
                Add comments about proposed changes in 2011
                (per Sue Williams)

* southamerica
        - Argentina
                Start of DST 2008 ff. changed from first to third Sun
                (per Alexander Krivenyshev)
        - Brazil
                Start of DST 2008 ff. changed from second to third Sun
                (per Steffen Thorsen)

11 years agoFix an invalidation case that tends to occur under load on NFS servers or
Matthew Dillon [Mon, 15 Sep 2008 17:02:49 +0000 (17:02 +0000)]
Fix an invalidation case that tends to occur under load on NFS servers or
on machines with low amounts of main memory.  The buf was being recursively
locked and a ref count assertion was wrong.

The code-path was previously untested and would dependably panic the
machine every time prior to the fix.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
11 years agoUpdate pfil manpage:
Sepherosa Ziehau [Mon, 15 Sep 2008 05:12:56 +0000 (05:12 +0000)]
Update pfil manpage:
- MPSAFE
- PFIL_WAITOK is gone
- Addition of pfil_func_t
- pfil(4) is standard part of kernel

11 years agoWe always wait during pfil hook's adding and removing; we could not afford
Sepherosa Ziehau [Mon, 15 Sep 2008 05:11:02 +0000 (05:11 +0000)]
We always wait during pfil hook's adding and removing; we could not afford
to fail upon these operations.

11 years agoAvoid conflict with <paths.h>.
Sascha Wildner [Sun, 14 Sep 2008 22:04:36 +0000 (22:04 +0000)]
Avoid conflict with <paths.h>.

11 years agoFix bug in normalization.
Sascha Wildner [Sun, 14 Sep 2008 21:08:29 +0000 (21:08 +0000)]
Fix bug in normalization.

Found-by: LLVM/Clang Static Analyzer
11 years agoAdd MLINK for dehumanize_number(3).
Sascha Wildner [Sun, 14 Sep 2008 20:18:17 +0000 (20:18 +0000)]
Add MLINK for dehumanize_number(3).

11 years agoAdd dehumanize_number(3).
Sascha Wildner [Sun, 14 Sep 2008 20:04:59 +0000 (20:04 +0000)]
Add dehumanize_number(3).

Taken-from: NetBSD

11 years agoAdd NetBSD 5.0
Sascha Wildner [Sun, 14 Sep 2008 20:03:06 +0000 (20:03 +0000)]
Add NetBSD 5.0

11 years agoCount only partitions where the size was specified and use 1M as
Sascha Wildner [Sun, 14 Sep 2008 19:15:04 +0000 (19:15 +0000)]
Count only partitions where the size was specified and use 1M as
the theoretical low limit for the '*' partition.

This simplifies the last commit and catches the case where a '*'
partition was specified but the rest of the partitions already
exceeded the slice size.

11 years agoFix calculation of total_capacity in case the user requested a partition
Sascha Wildner [Sun, 14 Sep 2008 13:49:41 +0000 (13:49 +0000)]
Fix calculation of total_capacity in case the user requested a partition
to span the remainder of the disk. This makes creating only a single '/'
partition with size '*' work.

11 years agoMake pfil(4) MPSAFE using following way:
Sepherosa Ziehau [Sun, 14 Sep 2008 11:13:00 +0000 (11:13 +0000)]
Make pfil(4) MPSAFE using following way:
- The pfil hook lists alteration is serialized by netisr0 (rev 1.10)
- Duplicate the pfil hook lists to be altered.
- Alter the pfil hook lists' duplication
- Save the original pfil hook lists, install the altered pfil hook lists
- Sync all network msgports to make sure that no one sees the original
  lists after this syncing
- Free the original pfil hook lists

11 years agoSerialize pfil hooks' adding/removing by netisr0
Sepherosa Ziehau [Sun, 14 Sep 2008 08:58:55 +0000 (08:58 +0000)]
Serialize pfil hooks' adding/removing by netisr0