]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoFollowing rwatson's suggestion.
mita [Thu, 8 Mar 2007 13:09:55 +0000 (13:09 +0000)]
Following rwatson's suggestion.
 <20070307130635.M28276@fledge.watson.org>

17 years agoDocument SO_ACCEPTCONN.
bms [Thu, 8 Mar 2007 12:57:12 +0000 (12:57 +0000)]
Document SO_ACCEPTCONN.

Submitted by: Vlad GALU (with changes)
MFC after: 3 days

17 years agoAdd my birthday to the FreeBSD calendar.
tdb [Thu, 8 Mar 2007 12:17:01 +0000 (12:17 +0000)]
Add my birthday to the FreeBSD calendar.

Encouraged by: rwatson

17 years agoAdd myself to the FreeBSD calendar.
ticso [Thu, 8 Mar 2007 10:54:27 +0000 (10:54 +0000)]
Add myself to the FreeBSD calendar.

17 years agoImplement "Remaking Makefiles" feature:
fjoe [Thu, 8 Mar 2007 09:16:11 +0000 (09:16 +0000)]
Implement "Remaking Makefiles" feature:

After reading Makefile and all the files that are included using .include
or .sinclude directives (source Makefiles) make considers each source
Makefile as a target and tries to rebuild it.  Both explicit and implicit
rules are checked and all source Makefiles are updated if necessary. If
any of the source Makefiles were rebuilt, make restarts from clean state.

To prevent infinite loops the following source Makefile targets are
ignored:
- :: targets that have no prerequisites but have commands
- ! targets
- targets that have .PHONY or .EXEC attributes
- targets without prerequisites and without commands

When remaking a source Makefile options -t (touch target), -q (query
mode), and -n (no exec) do not take effect, unless source Makefile is
specified explicitly as a target in make command line.
Additionally, system makefiles and .depend are not considered as a
Makefiles that can be rebuilt.

Reviewed by: harti

17 years agoFix a bug where the standard input (fifoFd == 0) was confused with an
will [Thu, 8 Mar 2007 07:57:43 +0000 (07:57 +0000)]
Fix a bug where the standard input (fifoFd == 0) was confused with an
error return from open(2), leading to an erroneous value of maxJobs and
a hung make when -f is standard input and -j is used.

PR: bin/101232
Submitted by: Nate Eldredge <nge@cs.hmc.edu>

17 years agoFix a bug where HOME was not allowed to be overridden by an user's crontab
will [Thu, 8 Mar 2007 07:00:42 +0000 (07:00 +0000)]
Fix a bug where HOME was not allowed to be overridden by an user's crontab
as crontab(5) states it can be.  This is supported by all vixie-cron derived
implementations; not sure why FreeBSD was any different.

PR: bin/106442
MFC after: 2 weeks

17 years agoInstead of doing comparisons using the pcpu area to see if
julian [Thu, 8 Mar 2007 06:44:34 +0000 (06:44 +0000)]
Instead of doing comparisons using the pcpu area to see if
a thread is an idle thread, just see if it has the IDLETD
flag set. That flag will probably move to the pflags word
as it's permenent and never chenges for the life of the
system so it doesn't need locking.

17 years agoFix a bug where the mutual exclusivity of the -l and -t options is not
will [Thu, 8 Mar 2007 06:10:17 +0000 (06:10 +0000)]
Fix a bug where the mutual exclusivity of the -l and -t options is not
recognized properly if -l is specified first.

PR: bin/105721
MFC after: 1 week

17 years agoNew tests for system-independent ACL support.
kientzle [Thu, 8 Mar 2007 06:09:27 +0000 (06:09 +0000)]
New tests for system-independent ACL support.
These tests verify that archive_entry objects can store and return
ACL data and that pax format archives can read and write ACL
information.  These do not (yet) test that ACL data is read or
written to disk correctly.  (And hence would not have caught the
recent snafu about ACL read-from-disk being turned off.)

17 years agoDistinguish between the end of ACL data and an error in pulling
kientzle [Thu, 8 Mar 2007 06:07:07 +0000 (06:07 +0000)]
Distinguish between the end of ACL data and an error in pulling
ACL data from the archive entry.  This doesn't impact
archive_read_extract or archive_write_disk since they only
check for != ARCHIVE_OK when calling this function.  (Though
they should be more careful.)

17 years agoArgh. Support for reading ACLs off of disk was inadvertently disabled
kientzle [Thu, 8 Mar 2007 05:52:01 +0000 (05:52 +0000)]
Argh.  Support for reading ACLs off of disk was inadvertently disabled
as part of an old configuration shuffle.  As a result, although
ACL restore has been working, ACLs haven't been written into archives
for some time.  <sigh>

Pointy hat: You know.
MFC after: 3 days

17 years agoAdd GELF_* accessor macros.
jkoshy [Thu, 8 Mar 2007 04:01:30 +0000 (04:01 +0000)]
Add GELF_* accessor macros.

Prodded by: Sam Arun Raj <samarunraj at gmail dot com>

17 years agoUse setresuid for simple privilege dropping.
kevlo [Thu, 8 Mar 2007 03:49:23 +0000 (03:49 +0000)]
Use setresuid for simple privilege dropping.

17 years agoUse correct bits to stop firmware when ASF mode is enabled.
jkim [Thu, 8 Mar 2007 00:49:26 +0000 (00:49 +0000)]
Use correct bits to stop firmware when ASF mode is enabled.

17 years agoFix more style(9) bugs.
jkim [Thu, 8 Mar 2007 00:29:18 +0000 (00:29 +0000)]
Fix more style(9) bugs.

- Remove some excessive parentheses around shift operators.
- Use macro instead of magic number where it is applicable.
- Change lower-case hexdecimals to upper cases to match wpaul's style.
- Revert some unnecessary line wraps and changes from the previous commit.

Pointed out by: bde

17 years agoThis patch is provided to fix a couple of deployment issues observed
qingli [Wed, 7 Mar 2007 23:21:59 +0000 (23:21 +0000)]
This patch is provided to fix a couple of deployment issues observed
in the field. In one situation, one end of the TCP connection sends
a back-to-back RST packet, with delayed ack, the last_ack_sent variable
has not been update yet. When tcp_insecure_rst is turned off, the code
treats the RST as invalid because last_ack_sent instead of rcv_nxt is
compared against th_seq. Apparently there is some kind of firewall that
sits in between the two ends and that RST packet is the only RST
packet received. With short lived HTTP connections, the symptom is
a large accumulation of connections over a short period of time .

The +/-(1) factor is to take care of implementations out there that
generate RST packets with these types of sequence numbers. This
behavior has also been observed in live environments.

Reviewed by: silby, Mike Karels
MFC after: 1 week

17 years agoWhite space nits.
pjd [Wed, 7 Mar 2007 21:24:51 +0000 (21:24 +0000)]
White space nits.

17 years agoRototill the sparc64 nexus(4) (actually this brings in the code the
marius [Wed, 7 Mar 2007 21:13:51 +0000 (21:13 +0000)]
Rototill the sparc64 nexus(4) (actually this brings in the code the
sun4v nexus(4) in turn is based on):
o Change nexus(4) to manage the resources of its children so the
  respective device drivers don't need to figure them out of OFW
  themselves.
o Change nexus(4) to provide the ofw_bus KOBJ interface instead of
  using IVARs for supplying the OFW node and the subset of standard
  properties of its children. Together with the previous change this
  also allows to fully take advantage of newbus in that drivers like
  fhc(4), which attach on multiple parent busses, no longer require
  different bus front-ends as obtaining the OFW node and properties
  as well as resource allocation works the same for all supported
  busses. As such this change also is part 4/4 of allowing creator(4)
  to work in USIII-based machines as it allows this driver to attach
  on both nexus(4) and upa(4). On the other hand removing these IVARs
  breaks API compatibility with the powerpc nexus(4) but which isn't
  that bad as a) sparc64 currently doesn't share any device driver
  hanging off of nexus(4) with powerpc and b) they were no longer
  compatible regarding OFW-related extensions at the pci(4) level
  since quite some time.
o Provide bus_get_dma_tag methods in nexus(4) and its children in
  order to handle DMA tags in a hierarchical way and get rid of the
  sparc64_root_dma_tag kludge. Together with the previous two items
  this changes also allows to completely get rid of the nexus(4)
  IVAR interface. It also includes:
  - pushing the constraints previously specified by the nexus_dmatag
    down into the DMA tags of psycho(4) and sbus(4) as it's their
    IOMMUs which induce these restrictions (and nothing at the
    nexus(4) or anything that would warrant specifying them there),
  - fixing some obviously wrong constraints of the psycho(4) and
    sbus(4) DMA tags, which happened to not actually be used with
    the sparc64_root_dma_tag kludge in place and therefore didn't
    cause problems so far,
  - replacing magic constants for constraints with macros as far
    as it is obvious as to where they come from.
  This doesn't include taking advantage of the newbus way to get
  the parent DMA tags implemented by this change in order to divorce
  the IOTSBs of the PCI and SBus IOMMUs or for implementing the
  workaround for the DMA sync bug in Sabre (and Tomatillo) bridges,
  yet, though.
o Get rid of the notion that nexus(4) (mostly) reflects an UPA bus
  by replacing ofw_upa.h and with ofw_nexus.h (which was repo-copied
  from ofw_upa.h) and renaming its content, which actually applies to
  all of Fireplane/Safari, JBus and UPA (in the host bus case), as
  appropriate.
o Just use M_DEVBUF instead of a separate M_NEXUS malloc type for
  allocating the device info for the children of nexus(4). This is
  done in order to not need to export M_NEXUS when deriving drivers
  for subordinate busses from the nexus(4) class.
o Use the DEFINE_CLASS_0() macro to declare the nexus(4) driver so
  we can derive subclasses from it.
o Const'ify the nexus_excl_name and nexus_excl_type arrays as well
  as add 'associations' and 'rsc', which are pseudo-devices without
  resources and therefore of no real interest for nexus(4), to the
  former.
o Let the nexus(4) device memory rman manage the entire 64-bit address
  space instead of just the UPA_MEMSTART to UPA_MEMEND subregion as
  Fireplane/Safari- and JBus-based machines use multiple ranges,
  which can't be as easily divided as in the case of UPA (limiting
  the address space only served for sanity checking anyway).
o Use M_WAITOK instead of M_NOWAIT when allocating the device info
  for children of nexus(4) in order to give one less opportunity
  for adding devices to nexus(4) to fail.
o While adapting the drivers affected by the above nexus(4) changes,
  change them to take advantage of rman_get_rid() instead of caching
  the RIDs assigned to allocated resources, now that the RIDs of
  resources are correctly set.
o In iommu(4) and nexus(4) replace hard-coded functions names, which
  actually became outdated in several places, in panic strings and
  status massages with __func__. [1]
o Use driver_filter_t in prototypes where appropriate.
o Add my copyright to creator(4), fhc(4), nexus(4), psycho(4) and
  sbus(4) as I changed considerable amounts of these drivers as well
  as added a bunch of new features, workarounds for silicon bugs etc.
o Fix some white space nits.

Due to lack of access to Exx00 hardware, these changes, i.e. central(4)
and fhc(4), couldn't be runtime tested on such a machine. Exx00 are
currently reported to panic before trying to attach nexus(4) anyway
though.

PR: 76052 [1]
Approved by: re (kensmith)

17 years agoFix some nits in lock profiling for rwlocks:
jhb [Wed, 7 Mar 2007 20:48:48 +0000 (20:48 +0000)]
Fix some nits in lock profiling for rwlocks:
- Properly note when a read lock is released.
- Always note when we contest on a read lock.
- Only note success of obtaining read locks for the first reader to match
  the behavior of sx(9).

Reviewed by: kmacy

17 years agoWrap a few lines at 80 cols.
jhb [Wed, 7 Mar 2007 20:46:04 +0000 (20:46 +0000)]
Wrap a few lines at 80 cols.

17 years agoAfter the last change to KSE threading a bug was introduced where
julian [Wed, 7 Mar 2007 20:17:41 +0000 (20:17 +0000)]
After the last change to KSE threading a bug was introduced where
all threads were counted against the count of upcall capable threads.
this changes the way we do this accounting.

17 years agoJump on the calendar bandwagon and add myself.
bmah [Wed, 7 Mar 2007 19:15:18 +0000 (19:15 +0000)]
Jump on the calendar bandwagon and add myself.

17 years agoAdd my birthday to calendar.freebsd.
stefan [Wed, 7 Mar 2007 19:00:01 +0000 (19:00 +0000)]
Add my birthday to calendar.freebsd.

17 years ago- Add myself to calendar.freebsd
db [Wed, 7 Mar 2007 16:06:48 +0000 (16:06 +0000)]
- Add myself to calendar.freebsd

Encouraged by: rwatson, ehaupt
Approved by: ehaupt (mentor)

17 years agoCorrectly sort my entry to FreeBSD calendar first by date, then by year.
piso [Wed, 7 Mar 2007 16:02:32 +0000 (16:02 +0000)]
Correctly sort my entry to FreeBSD calendar first by date, then by year.

Pointed out by: ru

17 years agoAdd my bithdate to the FreeBSD calendar.
piso [Wed, 7 Mar 2007 15:08:51 +0000 (15:08 +0000)]
Add my bithdate to the FreeBSD calendar.

17 years agoAdd my birth date/location to the FreeBSD calendar.
ariff [Wed, 7 Mar 2007 14:48:42 +0000 (14:48 +0000)]
Add my birth date/location to the FreeBSD calendar.

17 years agoAdd myself to the FreeBSD calendar
rafan [Wed, 7 Mar 2007 13:45:39 +0000 (13:45 +0000)]
Add myself to the FreeBSD calendar

17 years agoFix license. Clause 4 is still required (UCB materiel).
bms [Wed, 7 Mar 2007 13:38:11 +0000 (13:38 +0000)]
Fix license. Clause 4 is still required (UCB materiel).

Submitted by: rwatson
Pointy hat to: bms

17 years agoAdd my birthday to the freebsd calendar
kib [Wed, 7 Mar 2007 13:21:55 +0000 (13:21 +0000)]
Add my birthday to the freebsd calendar

17 years agoAdd Ethertype for 802.3ad LACP.
bms [Wed, 7 Mar 2007 12:51:52 +0000 (12:51 +0000)]
Add Ethertype for 802.3ad LACP.

17 years agoUpdate openpic to support the new bus_setup_intr() syntax.
piso [Wed, 7 Mar 2007 11:42:14 +0000 (11:42 +0000)]
Update openpic to support the new bus_setup_intr() syntax.

Reviewed by: marcel

17 years agouse 2-clause BSD license as per hoskins strike-off july 22 1999.
bms [Wed, 7 Mar 2007 11:06:46 +0000 (11:06 +0000)]
use 2-clause BSD license as per hoskins strike-off july 22 1999.
use wording of FreeBSD License.

17 years agoDon't leave a NULL value in mdsuffix when a particular md
yar [Wed, 7 Mar 2007 07:45:38 +0000 (07:45 +0000)]
Don't leave a NULL value in mdsuffix when a particular md
unit w/o suffix is specified.  It had better be an empty
string as it will be passed to a printf-like function that
builds the command line to run.

PR: kern/109863
MFC after: 1 week

17 years agoUse M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL.
kevlo [Wed, 7 Mar 2007 05:28:42 +0000 (05:28 +0000)]
Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL.

17 years agoWhen dispatching frames saved on the power save queue to a
sam [Wed, 7 Mar 2007 04:42:22 +0000 (04:42 +0000)]
When dispatching frames saved on the power save queue to a
station exiting power save mode prepend them to the driver's
send q instead of appending them.  This insures the packets
are not misordered wrt any packets already q'd for the station.

This corrects a problem noticed when using a VoIP phone talking
to an ath card in ap mode; the misordered packets caused noise.

Submitted by: "J.R. Oldroyd" <jr@opal.com>
MFC after: 2 weeks

17 years agoadd ieee80211_opmode_name array for mapping the opmode to a string
sam [Wed, 7 Mar 2007 04:35:07 +0000 (04:35 +0000)]
add ieee80211_opmode_name array for mapping the opmode to a string
for printing diagnostic msgs

MFC after: 2 weeks

17 years agowhen starting up an ibss master use a random address for
sam [Wed, 7 Mar 2007 04:31:49 +0000 (04:31 +0000)]
when starting up an ibss master use a random address for
the bssid; this is required for wifi alliance compliance

Obtained from: Atheros
MFC after: 2 weeks

17 years agoRemove zs(4). Its functionality has been superseded by uart(4) for
marcel [Wed, 7 Mar 2007 00:39:13 +0000 (00:39 +0000)]
Remove zs(4). Its functionality has been superseded by uart(4) for
a while now; including on PowerPC.

17 years agoFix style(9) and consistency.
jkim [Tue, 6 Mar 2007 20:14:48 +0000 (20:14 +0000)]
Fix style(9) and consistency.

17 years agoPollute bge(4) with #if's and #ifdef's to make MFC easier.
jkim [Tue, 6 Mar 2007 19:15:16 +0000 (19:15 +0000)]
Pollute bge(4) with #if's and #ifdef's to make MFC easier.

MFC after: 3 days

17 years agoDon't increment total_bounced when doing no-op dmamap_sync ops.
scottl [Tue, 6 Mar 2007 18:28:43 +0000 (18:28 +0000)]
Don't increment total_bounced when doing no-op dmamap_sync ops.

17 years agoSome minor tweaks and updates to bus_dma(9) including some additional notes
jhb [Tue, 6 Mar 2007 17:32:49 +0000 (17:32 +0000)]
Some minor tweaks and updates to bus_dma(9) including some additional notes
on the address filter and locking callback.

Reviewed by: ru, scottl

17 years agoChange the x86 interrupt code to use FreeBSD CPU IDs (i.e. PCPU_GET(cpuid))
jhb [Tue, 6 Mar 2007 17:16:47 +0000 (17:16 +0000)]
Change the x86 interrupt code to use FreeBSD CPU IDs (i.e. PCPU_GET(cpuid))
rather than local APIC IDs to keep track of CPUs which can handle
interrupts.

17 years agoSupport character device as input file.
fjoe [Tue, 6 Mar 2007 17:04:15 +0000 (17:04 +0000)]
Support character device as input file.

PR:             103500

17 years agoInvoke tar(1) with the -p option when installing a package
ru [Tue, 6 Mar 2007 14:54:45 +0000 (14:54 +0000)]
Invoke tar(1) with the -p option when installing a package
from an URL (i.e., do it the same way as when installing
from a file).  This fixes the lossage of the setuid bits.
It wasn't a problem before because GNU tar(1) implied the
-p option for root, but BSD tar(1) doesn't do that.

Discussed with: tobez and some advanced users :)

17 years agoThe firmware images must be loaded as modules at the moment.
brueffer [Tue, 6 Mar 2007 13:17:05 +0000 (13:17 +0000)]
The firmware images must be loaded as modules at the moment.

17 years agoAs suggested more than once in the lists, drop -M from flags to mfs
yar [Tue, 6 Mar 2007 13:13:53 +0000 (13:13 +0000)]
As suggested more than once in the lists, drop -M from flags to mfs
for /tmp and /var.  This makes the memory discs swap-backed instead
of malloc-backed.  A swap-backed memory disc should not be worse
than a malloc-backed one in any scenario because it will start
touching swap only when needed.  OTOH, a malloc-backed disc can
starve limited kernel resources and evenually crash the system.

Reflect the change in the rc.conf(5) manpage.  Also stop telling
lies there about softupdates: it does not waste disc space, it
just can delay its freeing.

Suggested by: many
PR: kern/87255
MFC after: 1 week

17 years agoWrap at 80 bus_setup_intr() in upa_setup_intr().
piso [Tue, 6 Mar 2007 12:19:37 +0000 (12:19 +0000)]
Wrap at 80 bus_setup_intr() in upa_setup_intr().

17 years agoBackout rev 1.17, msleep() can't be used with a spinlock.
cognet [Tue, 6 Mar 2007 12:08:38 +0000 (12:08 +0000)]
Backout rev 1.17, msleep() can't be used with a spinlock.

Pointy hat to: cognet

17 years agoRemove a useless cast from void * to struct ppb_device *.
piso [Tue, 6 Mar 2007 11:44:11 +0000 (11:44 +0000)]
Remove a useless cast from void * to struct ppb_device *.

17 years agoo Wrap ppc_setup_intr() at 80.
piso [Tue, 6 Mar 2007 11:36:33 +0000 (11:36 +0000)]
o Wrap ppc_setup_intr() at 80.
o Fix a bit the indentation.

17 years agoWrap ixppcib_setup_intr() at 80.
piso [Tue, 6 Mar 2007 10:58:22 +0000 (10:58 +0000)]
Wrap ixppcib_setup_intr() at 80.

17 years agoWrap a BUS_SETUP_INTR() line at 80.
piso [Tue, 6 Mar 2007 10:56:54 +0000 (10:56 +0000)]
Wrap a BUS_SETUP_INTR() line at 80.

17 years agoo substitute INTR_FAST with FILTER in a panic message.
piso [Tue, 6 Mar 2007 10:55:57 +0000 (10:55 +0000)]
o substitute INTR_FAST with FILTER in a panic message.
o wrap a BUS_SETUP_INTR() line at 80.

17 years agoUse sizeof() for calculating the buffer size instead of hard-coded values.
kevlo [Tue, 6 Mar 2007 09:32:41 +0000 (09:32 +0000)]
Use sizeof() for calculating the buffer size instead of hard-coded values.

17 years agoMove macros describing extended attributes in UFS from
mckusick [Tue, 6 Mar 2007 08:13:21 +0000 (08:13 +0000)]
Move macros describing extended attributes in UFS from
<sys/extattr.h> to <ufs/ufs/extattr.h>. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until <sys/extattr.h>
and <ufs/ufs/extattr.h> have been updated.

Suggested by: Robert Watson

17 years agoIn translate_path_major_minor(), do not calculate otherwise unused 'fp'
rwatson [Tue, 6 Mar 2007 07:39:12 +0000 (07:39 +0000)]
In translate_path_major_minor(), do not calculate otherwise unused 'fp'
variable, avoiding an extra locking of the file descriptor array.

17 years agoEnable tone / 3D controls for YAMAHA YMF743, 753 and 752 (partially).
ariff [Tue, 6 Mar 2007 02:36:54 +0000 (02:36 +0000)]
Enable tone / 3D controls for YAMAHA YMF743, 753 and 752 (partially).

PR: kern/109599
Submitted by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>

17 years agoReverse this change. malloc() with M_WAITOK never fails.
kevlo [Tue, 6 Mar 2007 01:15:28 +0000 (01:15 +0000)]
Reverse this change. malloc() with M_WAITOK never fails.

Noted by: cognet, brian and thompsa

17 years agoBetter fix for the errors under high load. Returning CAM_SCSI_BUSY is almost
scottl [Tue, 6 Mar 2007 01:12:15 +0000 (01:12 +0000)]
Better fix for the errors under high load.  Returning CAM_SCSI_BUSY is almost
never correct as CAM has no real understanding of it, and will just immediately
retry the command.  This leads to undesirable cycling of the camisr as well as
a high possibility for the command to exhaust its retries before the driver
can get around to servicing it.

The better fix, as demonstrated here, is to freeze the simq and mark the
command as needing to be tried.  Then when driver can service the command,
the simq gets unfrozen.  This is correct, and documented here to help reduce
the mystery.  However, it also points out a shortcoming in CAM error handling
that makes writing drivers harder.

Submitted by: Erich Chen

17 years agoTrim trailing whitespace.
jhb [Mon, 5 Mar 2007 22:27:55 +0000 (22:27 +0000)]
Trim trailing whitespace.

17 years agoChange mtx's to use the formulated name as type so witness does not
sam [Mon, 5 Mar 2007 21:56:33 +0000 (21:56 +0000)]
Change mtx's to use the formulated name as type so witness does not
complain on nested tx q lock acquisitions when processing the cab q.

MFC after: 2 weeks

17 years agoKick tx after processing rx'd frames; this fixes latency issues
sam [Mon, 5 Mar 2007 21:53:49 +0000 (21:53 +0000)]
Kick tx after processing rx'd frames; this fixes latency issues
for processing frames from the power save queue when operating
in ap mode.  This is especially noticeable for realtime data going
to devices like voip phones.

Submitted by: "J.R. Oldroyd" <jr@opal.com>
MFC after: 2 weeks

17 years agoAcquiring smp_ipi_mtx on every call to pmap_invalidate_*() is wasteful.
alc [Mon, 5 Mar 2007 21:40:10 +0000 (21:40 +0000)]
Acquiring smp_ipi_mtx on every call to pmap_invalidate_*() is wasteful.
For example, during a buildworld more than half of the calls do not
generate an IPI because the only TLB entry invalidated is on the calling
processor.  This revision pushes down the acquisition and release of
smp_ipi_mtx into smp_tlb_shootdown() and smp_targeted_tlb_shootdown() and
instead uses sched_pin() and sched_unpin() in pmap_invalidate_*() so that
thread migration doesn't lead to a missed TLB invalidation.

Reviewed by: jhb
MFC after: 3 weeks

17 years agoCheck the _TMP value for sanity also. On some systems (HP NX laptops), the
njl [Mon, 5 Mar 2007 21:39:53 +0000 (21:39 +0000)]
Check the _TMP value for sanity also.  On some systems (HP NX laptops), the
EC occasionally times out and provides bogus values (3000C).  This change
prevents those systems from prematurely shutting down while we work on the
underlying problem.  Also, bump the sanity value to 0...200C from 0...150C.

17 years agoFix typo in comment.
thomas [Mon, 5 Mar 2007 21:21:03 +0000 (21:21 +0000)]
Fix typo in comment.

17 years agoUse vm_paddr_t rather than uintptr_t when passing the physical address of
jhb [Mon, 5 Mar 2007 20:35:17 +0000 (20:35 +0000)]
Use vm_paddr_t rather than uintptr_t when passing the physical address of
APICs to lapic_init() and ioapic_create().

17 years agoOnly reject file descriptors higher than FD_SETSIZE if we are not using
jhb [Mon, 5 Mar 2007 19:39:51 +0000 (19:39 +0000)]
Only reject file descriptors higher than FD_SETSIZE if we are not using
poll(2) or kqueue(2).  Previously we rejected fd's higher than FD_SETSIZE
for kevent(2), and larger than sysconf(_SC_OPEN_MAX) for poll(2).  However,
the check for poll(2) wasn't really needed.  open(2) and socket(2) won't
return an fd you can't pass to either poll(2) or kevent(2).  This fixes
a but where gethostbyname() would fail if you had more than 1023 files
open in a process.

MFC after: 1 week
Reviewed by: ume
Found by: ps

17 years agocorrect inital bounds check on returning scan results; this does not
sam [Mon, 5 Mar 2007 19:12:25 +0000 (19:12 +0000)]
correct inital bounds check on returning scan results; this does not
paper over catching an error as the case was already handled, albeit
in a somewhat surprising way (the caller received zero'd data)

Submitted by: sephe
MFC after: 2 weeks

17 years agoOops, fix a typo in the last commit :-/
brian [Mon, 5 Mar 2007 19:00:49 +0000 (19:00 +0000)]
Oops, fix a typo in the last commit :-/

17 years agoUse PCPU_LAZY_INC() to update page fault statistics.
alc [Mon, 5 Mar 2007 18:55:14 +0000 (18:55 +0000)]
Use PCPU_LAZY_INC() to update page fault statistics.

17 years agocorrect conversions between TU and ms/ticks; these are not used
sam [Mon, 5 Mar 2007 18:52:35 +0000 (18:52 +0000)]
correct conversions between TU and ms/ticks; these are not used
by any code in the tree[1] and are close enough for common values
that this change is a noop

[1] ath uses one macro to calculate a value that is not used
Submitted by: sephe
MFC after: 1 week

17 years agoIn the NOTYET code path when a process forks, the remaining
brian [Mon, 5 Mar 2007 17:47:27 +0000 (17:47 +0000)]
In the NOTYET code path when a process forks, the remaining
child thread goes back to system scope rather than process
scope.  This allows an ensuing exec() to actually work.

This change was made a year ago here, but I "forgot" to
commit it :(

Approved by: deischen
MFC after: 3 weeks

17 years agoAdd a simple device driver to "eat" any I/O APICs that show up as PCI
jhb [Mon, 5 Mar 2007 16:22:49 +0000 (16:22 +0000)]
Add a simple device driver to "eat" any I/O APICs that show up as PCI
devices.

MFC after: 1 week

17 years ago- Use constants for VPD capability register offsets.
jhb [Mon, 5 Mar 2007 16:21:59 +0000 (16:21 +0000)]
- Use constants for VPD capability register offsets.
- Add missing ()'s around return values.

17 years ago- Flesh out list of UART simple comms programming interfaces.
jhb [Mon, 5 Mar 2007 16:18:31 +0000 (16:18 +0000)]
- Flesh out list of UART simple comms programming interfaces.
- Add list of PIC base peripheral programming interfaces.
- Add VPD capability register offsets.

MFC after: 3 days

17 years agoApply my patch properly.
ru [Mon, 5 Mar 2007 15:44:00 +0000 (15:44 +0000)]
Apply my patch properly.

17 years agoAdd "fg" option as antonym to "bg"; add "hard" option as antonym to "soft".
thomas [Mon, 5 Mar 2007 14:47:54 +0000 (14:47 +0000)]
Add "fg" option as antonym to "bg"; add "hard" option as antonym to "soft".
This is for better compatibility with other environments (Linux, Solaris,
HP-UX, AIX and Tru64 support these options).

PR: bin/109924
MFC after: 1 week

17 years agoFix markup.
bms [Mon, 5 Mar 2007 13:52:01 +0000 (13:52 +0000)]
Fix markup.

Submitted by: ru
MFC after: 2 days

17 years agoReplay minor system call comment cleanup applied to kern_acl.c in a race
rwatson [Mon, 5 Mar 2007 13:26:07 +0000 (13:26 +0000)]
Replay minor system call comment cleanup applied to kern_acl.c in a race
with repo-copy of kern_acl.c to vfs_acl.c.

17 years agoRecognize repo-copy of kern_acl.c to vfs_acl.c, remove kern_acl.c,
rwatson [Mon, 5 Mar 2007 13:24:01 +0000 (13:24 +0000)]
Recognize repo-copy of kern_acl.c to vfs_acl.c, remove kern_acl.c,
remove kern_acl.c from the build, connect vfs_acl.c to the build.

Thanks to: joe

17 years agoFurther system call comment cleanup:
rwatson [Mon, 5 Mar 2007 13:10:58 +0000 (13:10 +0000)]
Further system call comment cleanup:

- Remove also "MP SAFE" after prior "MPSAFE" pass. (suggested by bde)
- Remove extra blank lines in some cases.
- Add extra blank lines in some cases.
- Remove no-op comments consisting solely of the function name, the word
  "syscall", or the system call name.
- Add punctuation.
- Re-wrap some comments.

17 years ago.Xr nit.
bms [Mon, 5 Mar 2007 12:54:03 +0000 (12:54 +0000)]
.Xr nit.

Submitted by: brueffer

17 years agoWarn when user use sectorsize bigger than the page size, which will lead
pjd [Mon, 5 Mar 2007 12:41:44 +0000 (12:41 +0000)]
Warn when user use sectorsize bigger than the page size, which will lead
to problems when the geli device is used with file system or as a swap.

Hopefully will prevent problems like kern/98742 in the future.

MFC after: 1 week

17 years agoUpdate shutdown() manual page to reflect actual behaviour of code.
bms [Mon, 5 Mar 2007 12:39:53 +0000 (12:39 +0000)]
Update shutdown() manual page to reflect actual behaviour of code.

Add IMPLEMENTATION NOTES section explaining in detail the effect this
system call has in common use cases involving PF_INET and PF_INET6 sockets.

PR: kern/84761
MFC after: 2 days

17 years agoFix incorrect comment. Geli will protect against data modification, of
pjd [Mon, 5 Mar 2007 12:39:49 +0000 (12:39 +0000)]
Fix incorrect comment. Geli will protect against data modification, of
course! It won't protect against reply attacks - try harder to explain
them correctly.

MFC after: 1 week

17 years agoThe firmware files are included in the base system now, reflect this here..
brueffer [Mon, 5 Mar 2007 11:52:17 +0000 (11:52 +0000)]
The firmware files are included in the base system now, reflect this here..

While here, remove Xrefs to all other wlan drivers except the Intel ones,
these often get confused.  Also remove pointers to the old ipw and iwi webpages,
they don't include any useful information that's not in the manpages yet.

Reviewed by: flz, ru

17 years agoTest cases for back references.
delphij [Mon, 5 Mar 2007 09:44:41 +0000 (09:44 +0000)]
Test cases for back references.

Obtained from: OpenBSD

17 years agoOnly stop evaluation of a back reference if the match length is
delphij [Mon, 5 Mar 2007 09:43:55 +0000 (09:43 +0000)]
Only stop evaluation of a back reference if the match length is
zero and the recursion level is too deep.

Obtained from: OpenBSD

17 years agoPartial fix for a bug in rev.1.231. If suspend/resume clobbers the
bde [Mon, 5 Mar 2007 09:10:17 +0000 (09:10 +0000)]
Partial fix for a bug in rev.1.231.  If suspend/resume clobbers the
RTC state, then it may clobber the RTC index register, so the index
register must be restored before using it to restore control registers
in rtc_restore().

The following problems remain:
- rtc_restore() is only called if pmtimer is configured.  Buggy
  suspend/resumes are more likely to clobber the index register than
  a control register, so pmtimer is more needed than it used to be.
- pmtimer doesn't exist for amd64.
- Restoring of the RTC state may race with rtcintr().  If an RTC
  interrupt is handled before the state is restored, then rtcin(RTC_INTR)
  in rtcintr() may read from the wrong register, so rtcintr() may spin
  forever.  This may be mitigated by the most common state clobbering
  being to turn off RTC interrupts.

17 years agoQuick bandaid for possible broken multiple playback channels implementation.
ariff [Mon, 5 Mar 2007 07:45:38 +0000 (07:45 +0000)]
Quick bandaid for possible broken multiple playback channels implementation.

Reported/Tested by: Oliver Iberien <odilist@sonic.net>

17 years agoCheck for malloc return value
kevlo [Mon, 5 Mar 2007 06:33:08 +0000 (06:33 +0000)]
Check for malloc return value

17 years agoAnother typo.
grog [Mon, 5 Mar 2007 05:59:49 +0000 (05:59 +0000)]
Another typo.

Spotted by:             ru
Another pointy hat to:  grog

17 years agoUse different wait channel name for second of two sleeps. Minor commentary
imp [Mon, 5 Mar 2007 05:40:24 +0000 (05:40 +0000)]
Use different wait channel name for second of two sleeps.  Minor commentary
addition.

17 years agoAvoid infinite recursion on:
delphij [Mon, 5 Mar 2007 03:07:36 +0000 (03:07 +0000)]
Avoid infinite recursion on:

  echo "foo foo bar bar bar baz" | sed 's/\([^ ]*\)\( *\1\)*/\1/g'

Obtained from: OpenBSD via NetBSD (rev. 1.18)

17 years agoCosmetics: remove trailing white space, wrap over-long lines.
grog [Mon, 5 Mar 2007 00:27:30 +0000 (00:27 +0000)]
Cosmetics: remove trailing white space, wrap over-long lines.

Pointy hat to:  grog

17 years agoChange these descriptions of memory types used in malloc(9), as their
wkoszek [Mon, 5 Mar 2007 00:21:40 +0000 (00:21 +0000)]
Change these descriptions of memory types used in malloc(9), as their
current, rather long strings make output from vmstat -m look unpleasant.

Approved by: cognet (mentor)

17 years agoRearrange function descriptions in more logical order.
grog [Sun, 4 Mar 2007 23:42:58 +0000 (23:42 +0000)]
Rearrange function descriptions in more logical order.
Be less alarmist about the dangers of abusing wakeup_one().

Requested by: kris, imp