]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoUse getsock() and fput() instead of fgetsock() and fputsock() in
Robert Watson [Thu, 25 May 2006 15:10:13 +0000 (15:10 +0000)]
Use getsock() and fput() instead of fgetsock() and fputsock() in
sendfile().  This causes sendfile() to use the file descriptor
reference to the socket instead of bumping the socket reference
count, which avoids an additional refcount operation, as well as a
potential expensive socket refcount drop, which can lead to
contention on the accept mutex.  This change also has the side
effect of further reducing the number of cases where an in-progress
I/O operation can occur on a socket after close, as using the file
descriptor refcount prevents the socket from closing while in use.

MFC after: 3 months

18 years agoClarify that G_F_DISKIOCTL is unused, and remove G_T_DETAILS altogether,
Ceri Davies [Thu, 25 May 2006 13:39:27 +0000 (13:39 +0000)]
Clarify that G_F_DISKIOCTL is unused, and remove G_T_DETAILS altogether,
since it isn't actually #defined.

Discussed with: phk

18 years ago In our system there's no intermediate step between a definitive Supreme
Poul-Henning Kamp [Thu, 25 May 2006 11:21:40 +0000 (11:21 +0000)]
 In our system there's no intermediate step between a definitive Supreme
 Court decision and violent revolution.
                -- Al Gore (New York Magazine, May 29 2006)

18 years agoUse WARNS and rely on rules rather than an explicit target for the
Robert Watson [Thu, 25 May 2006 10:46:43 +0000 (10:46 +0000)]
Use WARNS and rely on rules rather than an explicit target for the
test binary.

Reported by: maxim

18 years agoAdd a basic regression test for sendfile() over TCP, which sends varying
Robert Watson [Thu, 25 May 2006 09:50:14 +0000 (09:50 +0000)]
Add a basic regression test for sendfile() over TCP, which sends varying
lengths of headers and data and makes sure it receives about the right
number of bytes.

18 years agos/on a crt//
Brad Davis [Thu, 25 May 2006 06:05:04 +0000 (06:05 +0000)]
s/on a crt//
systat is working great on this LCD ;)

Submitted by: Ben Haga <tuximus AT absoludicrous DOT com>
MFC after: 3 days

18 years ago - Add include for libutil.h and string.h for prototype.
Xin LI [Thu, 25 May 2006 04:01:04 +0000 (04:01 +0000)]
 - Add include for libutil.h and string.h for prototype.
 - Cast the rvalue to be compared with the result of
   strlen() to size_t.

18 years agoDo not set B_NOCACHE on buffers when releasing them in flushbuflist().
Stephan Uphoff [Thu, 25 May 2006 01:00:35 +0000 (01:00 +0000)]
Do not set B_NOCACHE on buffers when releasing them in flushbuflist().
If B_NOCACHE is set the pages of vm backed buffers will be invalidated.
However clean buffers can be backed by dirty VM pages so invalidating them
can lead to data loss.
Add support for flush dirty page in the data invalidation function
of some network file systems.

This fixes data losses during vnode recycling (and other code paths
using invalbuf(*,V_SAVE,*,*)) for data written using an mmaped file.

Collaborative effort by: jhb@,mohans@,peter@,ps@,ups@
Reviewed by: tegge@
MFC after: 7 days

18 years agoSince NFSv4 is not SMP safe, nfsiod needs to acquire Giant for NFSv4 mounts
Mohan Srinivasan [Wed, 24 May 2006 23:06:50 +0000 (23:06 +0000)]
Since NFSv4 is not SMP safe, nfsiod needs to acquire Giant for NFSv4 mounts
before doing the read/write.

Reported by: Chuck Lever.

18 years agoWhen starting up threads in taskqueue_start_threads create them
Sam Leffler [Wed, 24 May 2006 22:11:07 +0000 (22:11 +0000)]
When starting up threads in taskqueue_start_threads create them
stopped before adjusting their priority and setting them on the run
q so they cannot race for resources (pointed out by njl).

While here add a console printf on thread create fails; otherwise
noone may notice (e.g. return value is always 0 and caller has no
way to verify).

Reviewed by: jhb, scottl
MFC after: 2 weeks

18 years agoAdjust minimum iod threads from 4 to 0 -- since we compile the NFS
Robert Watson [Wed, 24 May 2006 21:04:46 +0000 (21:04 +0000)]
Adjust minimum iod threads from 4 to 0 -- since we compile the NFS
client into the kernel by default, and many users won't use NFS,
don't start an extra 4 kernel threads that are unused.  Once NFS
becomes active, it will start nfsiod's as it needs them.

We might consider mandating a minimum iod's equal to the number of
active NFS mounts (truncated to some value), which would force some
to remain available without having to create a new one if the file
system is mostly inactive.

PR: 70880
MFC after: 2 weeks
Prodded by: cel
Head nod: peter
Pointed out by: Joe <fbsd_user at a1poweruser dot com>

18 years agoExport the pribus, secbus and subbus as sysctls for information
Warner Losh [Wed, 24 May 2006 17:27:55 +0000 (17:27 +0000)]
Export the pribus, secbus and subbus as sysctls for information
purposes only.  Additional information may be exported in the future.

18 years agoSuspend the children before we turn off card events in hardware. This
Warner Losh [Wed, 24 May 2006 17:26:16 +0000 (17:26 +0000)]
Suspend the children before we turn off card events in hardware.  This
was done, I believe, to work around some cards having issues in the
suspend case.  I think that this helped my Sony VAIO TS505 work better
when it had certain wireless cards in it and I did a apm -z.  I've not
tested suspend/resume on other laptops in a long time, so I hope this
doesn't cause greif.  Please let me know if it does.

18 years agoFix a race when detaching the cbb worker thread. There were a couple
Warner Losh [Wed, 24 May 2006 17:22:53 +0000 (17:22 +0000)]
Fix a race when detaching the cbb worker thread.  There were a couple
of cases where we didn't take out the lock before setting or clearing
a bit.  This apparently can lead to a race at kldunload time (at least
on my Turion64 laptop, never saw it on my Sony Vaio).

18 years agoAdd cbb, cardbus, pccard and exca to the list of modules. The appear
Warner Losh [Wed, 24 May 2006 16:26:29 +0000 (16:26 +0000)]
Add cbb, cardbus, pccard and exca to the list of modules.  The appear
to work on the Turion64 laptop I have.

18 years agoVinod has passed the maintainership for the twa/twe drivers to
Wilko Bulte [Wed, 24 May 2006 16:01:34 +0000 (16:01 +0000)]
Vinod has passed the maintainership for the twa/twe drivers to
Adam Radford as follows:

twe             aradford@amcc.com       Pre-commit review requested
twa             aradford@amcc.com       Pre-commit review requested

With hat: core-secretary
Requested by: vkashyap

18 years agoWhile reviewing NFS client for another PR, noticed this omission in the
Chuck Lever [Wed, 24 May 2006 15:56:36 +0000 (15:56 +0000)]
While reviewing NFS client for another PR, noticed this omission in the
NFSv4 client READDIR logic.  This change matches the logic in the version
2 and 3 code.

Sponsored by: Network Appliance, Incorporated

18 years agomake cryptotest compile after the latest changes to cryptodev.h
Michael Reifenberger [Wed, 24 May 2006 15:40:46 +0000 (15:40 +0000)]
make cryptotest compile after the latest changes to cryptodev.h

18 years agoForced commit - last checkin got away from me.
Matt Jacob [Wed, 24 May 2006 15:26:07 +0000 (15:26 +0000)]
Forced commit - last checkin got away from me.

This version of scsi_target.c removes all SMP locking until
we have a lock-aware CAM stack. This allows us to use KNOTE
without a panic at least.

It's not yet clear whether target mode is working yet or not.

Discussed with: Scott, Ken, Nate, Justin

18 years agoSorry- last delta was checked in by mistake.
Matt Jacob [Wed, 24 May 2006 15:23:27 +0000 (15:23 +0000)]
Sorry- last delta was checked in by mistake.

18 years agoMake physical buffers in cam_periph_mapmem owned by the kernel in case we
Matt Jacob [Wed, 24 May 2006 15:22:21 +0000 (15:22 +0000)]
Make physical buffers in cam_periph_mapmem owned by the kernel in case we
return to user space w/o waiting for I/O to complete.

I tried to get several folks who know this code better than me to review it
with no luck. I *do* know that w/o this code, using the SCSI target driver
panics in userret (if it doesn't panic in knote first).

18 years agoUnnest includes before forthcoming editing.
Gleb Smirnoff [Wed, 24 May 2006 14:46:55 +0000 (14:46 +0000)]
Unnest includes before forthcoming editing.

18 years agoWorkaround a hang on some nForce2 systems that can happen if the CPU goes
John Baldwin [Wed, 24 May 2006 14:08:31 +0000 (14:08 +0000)]
Workaround a hang on some nForce2 systems that can happen if the CPU goes
into and out of the halt state very quickly.

Submitted by: Andriy Gapon <avg at icyb dot net dot ua>
MFC after: 1 week

18 years agoRevision 1.4 set access for all sensitive files in /proc/<PID> to mode 0
Guy Helmer [Wed, 24 May 2006 14:03:51 +0000 (14:03 +0000)]
Revision 1.4 set access for all sensitive files in /proc/<PID> to mode 0
if a process's uid or gid has changed, but the /proc/<PID> directory
itself was also set to mode 0.  Assuming this doesn't open any
security holes, open access to the /proc/<PID> directory for users
other than root to read or search the directory.

Reviewed by: des (back in February)
MFC after: 3 weeks

18 years agoImplement internal (i.e. inside kernel) packet tagging using mbuf_tags(9).
Oleg Bulyzhin [Wed, 24 May 2006 13:09:55 +0000 (13:09 +0000)]
Implement internal (i.e. inside kernel) packet tagging using mbuf_tags(9).
Since tags are kept while packet resides in kernelspace, it's possible to
use other kernel facilities (like netgraph nodes) for altering those tags.

Submitted by: Andrey Elsukov <bu7cher at yandex dot ru>
Submitted by: Vadim Goncharov <vadimnuclight at tpu dot ru>
Approved by: glebius (mentor)
Idea from: OpenBSD PF
MFC after: 1 month

18 years agoRename device name in the last commit. According to PR, the ID is
Gleb Smirnoff [Wed, 24 May 2006 11:55:25 +0000 (11:55 +0000)]
Rename device name in the last commit. According to PR, the ID is
more likely to belong to chips of 8168 family.

PR: kern/96734
Submitted by: Sven Petai <hadara bsd.ee>

18 years agoConvert to nmount() and remove hardcoded checks for ufs, msdosfs, ntfs,
Craig Rodrigues [Wed, 24 May 2006 11:49:39 +0000 (11:49 +0000)]
Convert to nmount() and remove hardcoded checks for ufs, msdosfs, ntfs,
and cd9660.

PR: bin/97642

18 years agoQuote the parameter to sysctl(1), allowing to use whitespaces in
Gleb Smirnoff [Wed, 24 May 2006 11:36:48 +0000 (11:36 +0000)]
Quote the parameter to sysctl(1), allowing to use whitespaces in
sysctl values.

PR: conf/96509
Submitted by: Gregory Bond <gnb itga.com.au>

18 years agoRemove the trailing half of a sentence which was clearly superceded
Ceri Davies [Wed, 24 May 2006 11:02:32 +0000 (11:02 +0000)]
Remove the trailing half of a sentence which was clearly superceded
by the preceding one some time during editing.

18 years agoClean up the grammar in here some.
Ceri Davies [Wed, 24 May 2006 11:01:16 +0000 (11:01 +0000)]
Clean up the grammar in here some.

18 years agoGC long unused hostnamelen and domainnamelen.
Ruslan Ermilov [Wed, 24 May 2006 07:54:42 +0000 (07:54 +0000)]
GC long unused hostnamelen and domainnamelen.

Submitted by: Alex Lyashkov <shadow@psoft.net>

18 years agoIf the user asks for "kernel sources" to be installed, extract the
Colin Percival [Wed, 24 May 2006 03:34:57 +0000 (03:34 +0000)]
If the user asks for "kernel sources" to be installed, extract the
SRC_BASE package (src/[A-Z]*) as well as SRC_SYS (src/sys/*).  This
allows users who only install the kernel source code to use the
modern "make buildkernel" approach.

Discussed with: re (scottl, kensmith)
MFC after: 3 days

18 years agoAttempt to follow the procedure described in section 4.10 of the
Ian Dowse [Wed, 24 May 2006 03:04:11 +0000 (03:04 +0000)]
Attempt to follow the procedure described in section 4.10 of the
EHCI spec for linking in new qTDs into an asynchronous QH. This
requires that there is a qTD marked as not active and not halted
at the start of the QH's list, and the hardware will know to re-fetch
the qTD on each pass rather than just looking at the overlay qTD:

  "The host controller must be able to advance the queue from the
  Fetch QH state in order to avoid all hardware/software race
  conditions. This simple mechanism allows software to simply link
  qTDs to the queue head and activate them, then the host controller
  will always find them if/when they are reachable."

This is achieved by keeping an "inactivesqtd" entry on the QH list,
and re-using it each time as the start of the next transfer, and
allocating a new qTD to become the next inactivesqtd. Then a new
transfer can be activated by just setting its "active" flag, which
avoids all the previous messing with overlay qTD state in
ehci_set_qh_qtd().

18 years agoTake errmsg out of ffs_opts. It is already part of global_opts
Craig Rodrigues [Wed, 24 May 2006 00:12:21 +0000 (00:12 +0000)]
Take errmsg out of ffs_opts.  It is already part of global_opts
in vfs_mount.c.

18 years agoIncrease the nfs access cache timeout from 2 to 60. The latter is a
Kris Kennaway [Wed, 24 May 2006 00:06:14 +0000 (00:06 +0000)]
Increase the nfs access cache timeout from 2 to 60.  The latter is a
more appropriate value and is also the default set by the kernel.  I
could not find a justification of why rc.conf began overriding it back
in 1998.

This dramatically cuts NFS traffic on e.g. a busy system with NFS root.

Reviewed by: mohans
MFC After: 2 weeks

18 years agoWhitespace nits
Warner Losh [Tue, 23 May 2006 23:33:57 +0000 (23:33 +0000)]
Whitespace nits

18 years agoThe (British) Crown Dependencies now have their own codes.
Garrett Wollman [Tue, 23 May 2006 23:20:25 +0000 (23:20 +0000)]
The (British) Crown Dependencies now have their own codes.

18 years agoRemove definitions of uart_[gs]etdreg. They are not used anymore and
Marcel Moolenaar [Tue, 23 May 2006 22:33:44 +0000 (22:33 +0000)]
Remove definitions of uart_[gs]etdreg. They are not used anymore and
were in fact wrong.

18 years agoAdd a stub man page for device_get_sysctl{_ctx,tree}. Needs some
Warner Losh [Tue, 23 May 2006 22:11:20 +0000 (22:11 +0000)]
Add a stub man page for device_get_sysctl{_ctx,tree}.  Needs some
work, but is better than nothing.  Any help appreciated.

18 years agoNFS over TCP retransmit behavior should default to a 60 second time out,
Chuck Lever [Tue, 23 May 2006 18:48:07 +0000 (18:48 +0000)]
NFS over TCP retransmit behavior should default to a 60 second time out,
mimicing the NFS reference implementation.

NFS over TCP does not need fast retransmit timeouts, since network loss
and congestion are managed by the transport (TCP), unlike with NFS over
UDP.  A long timeout prevents the unnecessary retransmission of non-
idempotent NFS requests.

Reviewed by: mohans, silby, rees?
Sponsored by: Network Appliance, Incorporated

18 years agoRefactor the NFS over UDP retransmit timeout estimation logic to allow
Chuck Lever [Tue, 23 May 2006 18:33:58 +0000 (18:33 +0000)]
Refactor the NFS over UDP retransmit timeout estimation logic to allow
the estimator to be more easily tuned and maintained.

There should be no functional change except there is now a lower limit
on the retransmit timeout to prevent the client from retransmitting
faster than the server's disks can fill requests, and an upper limit
to prevent the estimator from taking to long to retransmit during a
server outage.

Reviewed by: mohan, kris, silby
Sponsored by: Network Appliance, Incorporated

18 years agoConvert mountd to nmount(). Remove some hardcoded dependencies
Craig Rodrigues [Tue, 23 May 2006 17:10:17 +0000 (17:10 +0000)]
Convert mountd to nmount().  Remove some hardcoded dependencies
on ufs, cd9660, msdosfs, and ntfs, but not all dependencies.

18 years agoRemove 'n' from the getopt string. There's no -n option that is
Warner Losh [Tue, 23 May 2006 16:57:47 +0000 (16:57 +0000)]
Remove 'n' from the getopt string.  There's no -n option that is
parsed, so it winds up at usage anyway.

Add 'b' to the usage summary.  Noticed by Ben Mesander.

18 years agoVnode locks are recursive and the NFS client support shared vnode locks.
Mohan Srinivasan [Tue, 23 May 2006 16:07:23 +0000 (16:07 +0000)]
Vnode locks are recursive and the NFS client support shared vnode locks.

Found by: Kris Kennaway.

18 years agoUse pmap_devmap_bootstrap(), instead of mapping the SACOM1 registers
Olivier Houchard [Tue, 23 May 2006 12:14:14 +0000 (12:14 +0000)]
Use pmap_devmap_bootstrap(), instead of mapping the SACOM1 registers
with pmap_map_entry.
More use of macros instead of hardcoding the addr.

Submitted by: kevlo

18 years agoForgot to remove the line.
Pawel Jakub Dawidek [Tue, 23 May 2006 09:02:14 +0000 (09:02 +0000)]
Forgot to remove the line.

18 years agoDocument missing CRYPTO_F_ flags.
Pawel Jakub Dawidek [Tue, 23 May 2006 08:43:28 +0000 (08:43 +0000)]
Document missing CRYPTO_F_ flags.

18 years agoThe lcr variable in ns8250_probe is now unused. Remove it.
Benno Rice [Tue, 23 May 2006 06:04:45 +0000 (06:04 +0000)]
The lcr variable in ns8250_probe is now unused.  Remove it.

Missed by: benno

18 years agoGC old a.out and K&R support.
Warner Losh [Tue, 23 May 2006 02:52:14 +0000 (02:52 +0000)]
GC old a.out and K&R support.

18 years agoWhen usb_event_thread() first starts, wait significantly longer
Ian Dowse [Tue, 23 May 2006 01:27:23 +0000 (01:27 +0000)]
When usb_event_thread() first starts, wait significantly longer
before starting exploring (4 seconds), and extend the wait period
if new USB buses are attached while waiting.

This works around a problem seen when there is more than one EHCI
controller in the system and you kldload usb.ko after the system
has booted. The problem is that usb.ko contains 3 separate PCI
drivers which get initialised one by one (uhci, ohci, ehci), and
when each driver is initialised, all PCI buses are re-probed after
just the addition of that driver. This means that there can be a
significant delay between the attaching of a companion controller
and the subsequent EHCI attach, so it is possible for the companion
controller's USB 1.x bus to be scanned before the EHCI driver gets
a chance to check if there is really a USB 2.x device connected.

18 years agoAllow uart(4)'s ns8250 driver to work with devices whose regshift is > 0.
Benno Rice [Tue, 23 May 2006 00:41:12 +0000 (00:41 +0000)]
Allow uart(4)'s ns8250 driver to work with devices whose regshift is > 0.

- Rename REG_DL to REG_DLL and REG_DLH.
- Always treat DLL and DLH as two separate 8-bit registers instead of one
  16-bit register.

Additionally, remove the probe for the high 4 bits of IER being 0 and don't
assume we can always read/write 0 to/from those bits.

These changes allow uart(4) to drive the UARTs on the Intel XScale PXA255.

Reviewed by: marcel

18 years agoAvoid spurious release of an rtentry.
Seigo Tanimura [Tue, 23 May 2006 00:32:22 +0000 (00:32 +0000)]
Avoid spurious release of an rtentry.

18 years agoUse macros instead of hardcoding the address for SACOM1. Also don't
Olivier Houchard [Mon, 22 May 2006 23:25:34 +0000 (23:25 +0000)]
Use macros instead of hardcoding the address for SACOM1. Also don't
pretend we're working with SACOM3, as we're really mapping SACOM1.

Submitted by:   kevlo

18 years agoNew release notes: ipfwpcap(8), jemalloc.
Bruce A. Mah [Mon, 22 May 2006 20:18:04 +0000 (20:18 +0000)]
New release notes:  ipfwpcap(8), jemalloc.

Modified release note:  Add a missing word in mdmfs(8) -P note.

18 years agoGC these crt{begin,end}.c, which are unused since the last FreeBSD platform
Marius Strobl [Mon, 22 May 2006 19:30:02 +0000 (19:30 +0000)]
GC these crt{begin,end}.c, which are unused since the last FreeBSD platform
switched to those created from GCC's crtstuff.c 4 years ago.

18 years ago- Document the new Read_Node_List command, autodetection of HCI nodes and
Markus Brueffer [Mon, 22 May 2006 17:58:19 +0000 (17:58 +0000)]
- Document the new Read_Node_List command, autodetection of HCI nodes and
  that the '-n' parameter is now optional
- Grammar fixes

Reviewed by: emax
Approved by: emax
MFC after: 1 week

18 years ago- Add HCI node autodetection. As a consequence of this, make the '-n'
Markus Brueffer [Mon, 22 May 2006 17:58:09 +0000 (17:58 +0000)]
- Add HCI node autodetection. As a consequence of this, make the '-n'
  parameter optional.
- Add Read_Node_List command which prints a list of available HCI nodes,
  their Netgraph IDs and connected hooks

Reviewed by: emax
Approved by: emax
MFC after: 1 week

18 years agoRemove (now unused) crp_mac field.
Pawel Jakub Dawidek [Mon, 22 May 2006 16:27:27 +0000 (16:27 +0000)]
Remove (now unused) crp_mac field.

18 years agoFix usage of HMAC algorithms via /dev/crypto.
Pawel Jakub Dawidek [Mon, 22 May 2006 16:24:11 +0000 (16:24 +0000)]
Fix usage of HMAC algorithms via /dev/crypto.

18 years agoFix HMACs handling with uio's by not using crp_mac for storing calculated
Pawel Jakub Dawidek [Mon, 22 May 2006 16:18:21 +0000 (16:18 +0000)]
Fix HMACs handling with uio's by not using crp_mac for storing calculated
HMAC. crp_mac is going to be removed.

18 years ago- Fix the busname in the DRIVER_MODULE.
Yoshihiro Takahashi [Mon, 22 May 2006 13:43:36 +0000 (13:43 +0000)]
- Fix the busname in the DRIVER_MODULE.
- Skip PnP devices as some wedge when trying to probe them as C-NET(98)S.

This fix makes le(4) actually work with the C-NET(98)S.

Reviewed by: marius
Tested by: Watanabe Kazuhiro < CQG00620 at nifty dot ne dot jp >

18 years agoProtect the sc_needwakeup field with the sc_freeqlock mutex.
Pawel Jakub Dawidek [Mon, 22 May 2006 10:11:18 +0000 (10:11 +0000)]
Protect the sc_needwakeup field with the sc_freeqlock mutex.

18 years agoImprove the code responsible for waking up the crypto_proc thread.
Pawel Jakub Dawidek [Mon, 22 May 2006 10:05:23 +0000 (10:05 +0000)]
Improve the code responsible for waking up the crypto_proc thread.
Checking if the queues are empty is not enough for the crypto_proc thread
(it is enough for the crypto_ret_thread), because drivers can be marked
as blocked. In a situation where we have operations related to different
crypto drivers in the queue, it is possible that one driver is marked as
blocked. In this case, the queue will not be empty and we won't wakeup
the crypto_proc thread to execute operations for the others drivers.

Simply setting a global variable to 1 when we goes to sleep and setting
it back to 0 when we wake up is sufficient. The variable is protected
with the queue lock.

18 years agoDon't wakeup the crypto_ret_proc thread if it is running already.
Pawel Jakub Dawidek [Mon, 22 May 2006 09:58:34 +0000 (09:58 +0000)]
Don't wakeup the crypto_ret_proc thread if it is running already.
Before the change if the thread was working on symmetric operation, we
would send unnecessary wakeup after adding asymmetric operation (when
asym queue was empty) and vice versa.

18 years agoDon't set cc_kqblocked twice and don't increment cryptostats.cs_kblocks
Pawel Jakub Dawidek [Mon, 22 May 2006 09:37:28 +0000 (09:37 +0000)]
Don't set cc_kqblocked twice and don't increment cryptostats.cs_kblocks
twice if we call crypto_kinvoke() from crypto_proc thread.
This change also removes unprotected access to cc_kqblocked field
(CRYPTO_Q_LOCK() should be used for protection).

18 years agoDocument how we synchronize access to the fields in the cryptocap
Pawel Jakub Dawidek [Mon, 22 May 2006 07:49:42 +0000 (07:49 +0000)]
Document how we synchronize access to the fields in the cryptocap
structure.

18 years agoWe must synchronize access to cc_qblocked, because there could be a race
Pawel Jakub Dawidek [Mon, 22 May 2006 07:48:45 +0000 (07:48 +0000)]
We must synchronize access to cc_qblocked, because there could be a race
where crypto_invoke() returns ERESTART and before we set cc_qblocked to 1,
crypto_unblock() is called and sets it to 0. This way we mark device as
blocked forever.

Fix it by not setting cc_qblocked in the fast path and by protecting
crypto_invoke() in the crypto_proc thread with CRYPTO_Q_LOCK().
This won't slow things down, because there is no contention - we have
only one crypto thread. Actually it can be slightly faster, because we
save two atomic ops per crypto request.
The fast code path remains lock-less.

18 years agos/packages/packets/
Joel Dahl [Mon, 22 May 2006 07:36:45 +0000 (07:36 +0000)]
s/packages/packets/

Noticed by: maxim

18 years agoAdd manual page for ipfwpcap(8).
Joel Dahl [Mon, 22 May 2006 07:14:54 +0000 (07:14 +0000)]
Add manual page for ipfwpcap(8).

Reviewed by: phk, brueffer
Submitted by: Niclas Zeising <lothrandil@n00b.apagnu.se>

18 years agoo Correct comments: remove a reference to non-existent gdbinit.9 man page;
Maxim Konovalov [Mon, 22 May 2006 07:12:25 +0000 (07:12 +0000)]
o Correct comments: remove a reference to non-existent gdbinit.9 man page;
correct a path to the kernel build directory; gdb lost -k key.

Reviewed by: grog
MFC after: 1 week

18 years agoAdd missing case for RQSTYPE_CTIO3- neede for 64 bit target mode.
Matt Jacob [Mon, 22 May 2006 07:07:30 +0000 (07:07 +0000)]
Add missing case for RQSTYPE_CTIO3- neede for 64 bit target mode.

18 years agoReflect int -> size_t changes in glob.h
Andrey A. Chernov [Mon, 22 May 2006 06:53:35 +0000 (06:53 +0000)]
Reflect int -> size_t changes in glob.h

18 years agoRemove bzero/bcopy vestiges
Matt Jacob [Mon, 22 May 2006 06:51:48 +0000 (06:51 +0000)]
Remove bzero/bcopy vestiges

Be cognizant as to whether we're running 2KLogin f/w in target mode and
do the appropriate loopid load based upon that.

Do a first cut (seems to work, at least for amd64) at 64 bit target
mode for fibre channel cards. We could probably also do it for SPI
cards, but that's not supported right now.

18 years agoRemove bzero/bcopy vestiges.
Matt Jacob [Mon, 22 May 2006 06:49:49 +0000 (06:49 +0000)]
Remove bzero/bcopy vestiges.

Be cognizant as to whether we're running 2KLogin f/w in target mode and
do the appropriate loopid load based upon that.

18 years agoremove bzero/bcopy vestiges
Matt Jacob [Mon, 22 May 2006 06:48:40 +0000 (06:48 +0000)]
remove bzero/bcopy vestiges

18 years agoadd TGT_ANY define
Matt Jacob [Mon, 22 May 2006 06:47:42 +0000 (06:47 +0000)]
add TGT_ANY define

18 years agoFix longstanding bug where exec throttle is 16 bits- not 8.
Matt Jacob [Mon, 22 May 2006 06:47:20 +0000 (06:47 +0000)]
Fix longstanding bug where exec throttle is 16 bits- not 8.

18 years agoReflect size_t changes in glob.h
Andrey A. Chernov [Mon, 22 May 2006 06:33:19 +0000 (06:33 +0000)]
Reflect size_t changes in glob.h

Obtained from: NetBSD (mostly)

18 years agoAdd size_t declaration
Andrey A. Chernov [Mon, 22 May 2006 05:57:39 +0000 (05:57 +0000)]
Add size_t declaration

18 years agoMake gl_offs size_t too, as required by POSIX
Andrey A. Chernov [Mon, 22 May 2006 05:39:57 +0000 (05:39 +0000)]
Make gl_offs size_t too, as required by POSIX

Make non-standard gl_matchc in the similar fashion as gl_pathc size_t too,
like done in NetBSD & others

18 years agoRemove pending actions asked in comments for SHLIB_MAJOR bump, done.
Andrey A. Chernov [Mon, 22 May 2006 05:12:44 +0000 (05:12 +0000)]
Remove pending actions asked in comments for SHLIB_MAJOR bump, done.

Reviewed by:    ume

18 years agoUse size_t for gl_pathc as asked in the libc's Makefile:
Andrey A. Chernov [Mon, 22 May 2006 05:10:17 +0000 (05:10 +0000)]
Use size_t for gl_pathc as asked in the libc's Makefile:
# If you bump SHLIB_MAJOR, see standards/55112.

PR:             55112
Reviewed by:    ume

18 years agoRemove the kludge, as asked in the Makefile:
Andrey A. Chernov [Mon, 22 May 2006 05:04:53 +0000 (05:04 +0000)]
Remove the kludge, as asked in the Makefile:
# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c.

Reviewed by:    ume

18 years agoNew release notes: acpi_dock(4), netcat from OpenBSD 3.9.
Bruce A. Mah [Mon, 22 May 2006 00:59:57 +0000 (00:59 +0000)]
New release notes:  acpi_dock(4), netcat from OpenBSD 3.9.

Modified release notes:  nve(4) update for altq(4) support.

18 years agoWhen allocating a bucket to hold a free'd item in UMA fails, don't
Robert Watson [Sun, 21 May 2006 23:25:32 +0000 (23:25 +0000)]
When allocating a bucket to hold a free'd item in UMA fails, don't
report this as an allocation failure for the item type.  The failure
will be separately recorded with the bucket type.  This my eliminate
high mbuf allocation failure counts under some circumstances, which
can be alarming in appearance, but not actually a problem in
practice.

MFC after: 2 weeks
Reported by: ps, Peter J. Blok <pblok at bsd4all dot org>,
OxY <oxy at field dot hu>,
Gabor MICSKO <gmicskoa at szintezis dot hu>

18 years agoo Fix a comment: ufs2_dinode.di_blocks counts blocks not bytes actually held.
Maxim Konovalov [Sun, 21 May 2006 21:55:29 +0000 (21:55 +0000)]
o Fix a comment: ufs2_dinode.di_blocks counts blocks not bytes actually held.

18 years agoo Fix a comment: directory whiteout type is DT_WHT not DT_W.
Maxim Konovalov [Sun, 21 May 2006 21:28:34 +0000 (21:28 +0000)]
o Fix a comment: directory whiteout type is DT_WHT not DT_W.

18 years agoo In udp|rip_disconnect() acquire a socket lock before the socket
Maxim Konovalov [Sun, 21 May 2006 19:28:46 +0000 (19:28 +0000)]
o In udp|rip_disconnect() acquire a socket lock before the socket
state modification.  To prevent races do that while holding inpcb
lock.

Reviewed by: rwatson

18 years agoo Add missed error check: in ip_ctloutput() sooptcopyin() returns a
Maxim Konovalov [Sun, 21 May 2006 17:52:08 +0000 (17:52 +0000)]
o Add missed error check: in ip_ctloutput() sooptcopyin() returns a
result but we never examine it.

Reviewed by: rwatson
MFC after: 2 weeks

18 years agoResolve conflicts.
Xin LI [Sun, 21 May 2006 15:52:24 +0000 (15:52 +0000)]
Resolve conflicts.

18 years agoThis commit was generated by cvs2svn to compensate for changes in r158795,
Xin LI [Sun, 21 May 2006 15:49:27 +0000 (15:49 +0000)]
This commit was generated by cvs2svn to compensate for changes in r158795,
which included commits to RCS files with non-trunk default branches.

18 years agoImport netcat from OpenBSD 3.9-RELEASE.
Xin LI [Sun, 21 May 2006 15:49:27 +0000 (15:49 +0000)]
Import netcat from OpenBSD 3.9-RELEASE.

18 years agoBump library majro version for gethostbyaddr(3).
Hajimu UMEMOTO [Sun, 21 May 2006 15:15:21 +0000 (15:15 +0000)]
Bump library majro version for gethostbyaddr(3).

18 years agoNuke some compatibility crufts of resolver for 6.X and earlier.
Hajimu UMEMOTO [Sun, 21 May 2006 11:29:26 +0000 (11:29 +0000)]
Nuke some compatibility crufts of resolver for 6.X and earlier.

X-MFC after: never

18 years agoFix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
Hajimu UMEMOTO [Sun, 21 May 2006 11:27:28 +0000 (11:27 +0000)]
Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
arch.

X-MFC after: never

18 years agoReturn EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
Hajimu UMEMOTO [Sun, 21 May 2006 11:22:31 +0000 (11:22 +0000)]
Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short.  This conforms to RFC3493, POSIX and XPG6.

Obtained from: NetBSD

18 years agoUpgrade res_update(3) and the friends to BIND9's one excluding TSIG
Hajimu UMEMOTO [Sun, 21 May 2006 11:19:36 +0000 (11:19 +0000)]
Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.

X-MFC after: never

18 years agoThis commit was generated by cvs2svn to compensate for changes in r158782,
Hajimu UMEMOTO [Sun, 21 May 2006 11:10:07 +0000 (11:10 +0000)]
This commit was generated by cvs2svn to compensate for changes in r158782,
which included commits to RCS files with non-trunk default branches.

18 years agoVendor import of BIND 9.3.2
Hajimu UMEMOTO [Sun, 21 May 2006 11:10:07 +0000 (11:10 +0000)]
Vendor import of BIND 9.3.2

18 years agoDon't allow non-root user to set a scheduler policy, otherwise this could
David Xu [Sun, 21 May 2006 00:40:38 +0000 (00:40 +0000)]
Don't allow non-root user to set a scheduler policy, otherwise this could
be a local DOS.

Submitted by: Diane Bruce at db at db.net