]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoAtheros EEPROM version 4K. This version is mostly based on version 1.4.
Rui Paulo [Sat, 10 Oct 2009 22:29:34 +0000 (22:29 +0000)]
Atheros EEPROM version 4K. This version is mostly based on version 1.4.
This is needed by the upcoming AR9285 support.
Information on the layout gathered from Linux ath9k.

Not yet connected to the build.

Tested by: Eugeny Dzhurinsky

14 years agoIn regards to the "Starting foo:" type messages at boot time, create and
Doug Barton [Sat, 10 Oct 2009 22:17:03 +0000 (22:17 +0000)]
In regards to the "Starting foo:" type messages at boot time, create and
employ a more generic solution, and use it in the individual rc.d scripts
that also have an $rc_quiet test:

1. Add check_startmsgs() to rc.subr.
2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute
variations of [ -z "$rc_quiet" ] with check_startmsgs
3. In savecore add a trailing '.' to the end of the message to make it
more consistent with other scripts.
4. In newsyslog remove a : before the terminal '.' since we do not expect
there to be anything printed out in between to make it more consistent.
5. In the following scripts change "quotes" to 'quotes' where no variables
exist in the message: savecore pf newsyslog
6. In the following scripts substitute if/then/fi for the simpler (and
more consistent) check_startmsgs &&: faith stf
7. In the following scripts separate the "Starting foo:" from the terminal
'.' to make them more consistent: moused hostname pf
8. In nfsclient move the message to its own line to avoid a style bug
9. In pf rc_quiet does not apply to the _stop method, so remove the
test there.
10. In motd add 'quotes' around the terminal '.' for consistency

14 years agoOrphaning provider with EXDEV seems weird; perhaps the author meant
Edward Tomasz Napierala [Sat, 10 Oct 2009 21:49:04 +0000 (21:49 +0000)]
Orphaning provider with EXDEV seems weird; perhaps the author meant
ENXIO here?

14 years agoRefine r195509, instead of checking that vnode type is VBAD, that is
Konstantin Belousov [Sat, 10 Oct 2009 21:17:30 +0000 (21:17 +0000)]
Refine r195509, instead of checking that vnode type is VBAD, that is
set quite late in the revocation path, properly verify that vnode is
not doomed before calling VOP.

Reported and tested by: Harald Schmalzbauer <h.schmalzbauer omnilan de>
MFC after: 3 days

14 years agoMap PIE binaries at non-zero base address.
Konstantin Belousov [Sat, 10 Oct 2009 15:33:01 +0000 (15:33 +0000)]
Map PIE binaries at non-zero base address.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoDefine architectural load bases for PIE binaries. Addresses were selected
Konstantin Belousov [Sat, 10 Oct 2009 15:31:24 +0000 (15:31 +0000)]
Define architectural load bases for PIE binaries. Addresses were selected
by looking at the bases used for non-relocatable executables by gnu ld(1),
and adjusting it slightly.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoDo not map segments of zero length.
Konstantin Belousov [Sat, 10 Oct 2009 15:28:52 +0000 (15:28 +0000)]
Do not map segments of zero length.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoCalculate relocation base for the main object, and apply the relocation
Konstantin Belousov [Sat, 10 Oct 2009 15:27:10 +0000 (15:27 +0000)]
Calculate relocation base for the main object, and apply the relocation
adjustment for all virtual addresses encoded into the ELF structures of
it. PIE binary could and should be loaded at non-zero mapbase.

For sym_zero pseudosymbol used as a return value from find_symdef()
for undefined weak symbols, st_value also should be adjusted, since
_rtld_bind corrects symbol values by relocbase.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time

14 years agoPostpone dropping fp till both kq_global and kqueue mutexes are
Konstantin Belousov [Sat, 10 Oct 2009 14:56:34 +0000 (14:56 +0000)]
Postpone dropping fp till both kq_global and kqueue mutexes are
unlocked. fdrop() closes file descriptor when reference count goes to
zero. Close method for vnodes locks the vnode, resulting in "sleepable
after non-sleepable". For pipes, pipe mutex is before kqueue lock,
causing LOR.

Reported and tested by: pho
MFC after: 2 weeks

14 years agoCorrect include order as indicated by bz.
Michael Tuexen [Sat, 10 Oct 2009 13:59:18 +0000 (13:59 +0000)]
Correct include order as indicated by bz.

Approved by: re (mentor)
MFC after: 3 days

14 years agoFix typo which has survived amazingly long!
Ermal Luçi [Sat, 10 Oct 2009 03:32:46 +0000 (03:32 +0000)]
Fix typo which has survived amazingly long!

Approved by: mlaier(mentor)
MFC after: 3 days

14 years agoDo not include vnet.h twice.
Michael Tuexen [Fri, 9 Oct 2009 19:30:23 +0000 (19:30 +0000)]
Do not include vnet.h twice.

Approved by: rrs (mentor)
MFC after: 3 days

14 years agoatomic_cmpset_barr_* was added in order to cope with compilers willing to
Attilio Rao [Fri, 9 Oct 2009 15:51:40 +0000 (15:51 +0000)]
atomic_cmpset_barr_* was added in order to cope with compilers willing to
specify their own version of atomic_cmpset_* which could have been
different than the membar version.

Right now, however, FreeBSD is bound mostly to GCC-like compilers and
it is desired to add new support and compat shim mostly when there is
a real necessity, in order to avoid too much compatibility bloats.

In this optic, bring back atomic_cmpset_{acq, rel}_* to be the same as
atomic_cmpset_* and unwind the atomic_cmpset_barr_* introduction.

Requested by: jhb
Reviewed by: jhb
Tested by: Giovanni Trematerra <giovanni dot trematerra at
gmail dot com>

14 years agoImproved one-line description of this module (taken from NOTES).
Christian Brueffer [Fri, 9 Oct 2009 10:03:41 +0000 (10:03 +0000)]
Improved one-line description of this module (taken from NOTES).

14 years agoMerge upstream r421: grammar nit in pam.conf(5).
Dag-Erling Smørgrav [Fri, 9 Oct 2009 09:42:58 +0000 (09:42 +0000)]
Merge upstream r421: grammar nit in pam.conf(5).

14 years agoIf provider is open for writing when we taste it, skip it for classes that
Pawel Jakub Dawidek [Fri, 9 Oct 2009 09:42:22 +0000 (09:42 +0000)]
If provider is open for writing when we taste it, skip it for classes that
depend on on-disk metadata. This was we won't attach to providers that are used
by other classes. For example we don't want to configure partitions on da0 if
it is part of gmirror, what we really want is partitions on mirror/foo.

During regular work it works like this: if provider is open for writing a class
receives the spoiled event from GEOM and detaches, once provider is closed the
taste event is send again and class can rediscover its metadata if it is still
there.  This doesn't work that way when new class arrives, because GEOM gives
all existing providers for it to taste, also those open for writing. Classes
have to decided on their own if they want to deal with such providers (eg.
geom_dev) or not (classes modified by this commit).

Reported by: des, Oliver Lehmann <lehmann@ans-netz.de>
Tested by: des, Oliver Lehmann <lehmann@ans-netz.de>
Discussed with: phk, marcel
Reviewed by: marcel
MFC after: 3 days

14 years agoMerge upstream r421: grammar nit in pam.conf(5).
Dag-Erling Smørgrav [Fri, 9 Oct 2009 09:38:57 +0000 (09:38 +0000)]
Merge upstream r421: grammar nit in pam.conf(5).

14 years agoExport disk serial numbers for adaX disks.
Pawel Jakub Dawidek [Fri, 9 Oct 2009 09:29:59 +0000 (09:29 +0000)]
Export disk serial numbers for adaX disks.

Reviewed by: mav
MFC after: 3 days

14 years agoUse correct arguments when calling SCTP_RTALLOC().
Michael Tuexen [Thu, 8 Oct 2009 20:33:12 +0000 (20:33 +0000)]
Use correct arguments when calling SCTP_RTALLOC().

Approved by: rrs (mentor)
MFC after: 0 days

14 years agoProperly mark ZFS properties which are not changeable under FreeBSD.
Edward Tomasz Napierala [Thu, 8 Oct 2009 19:45:37 +0000 (19:45 +0000)]
Properly mark ZFS properties which are not changeable under FreeBSD.

Reviewed by: pjd

14 years agoClean up amd64 suspend/resume code.
Jung-uk Kim [Thu, 8 Oct 2009 17:41:53 +0000 (17:41 +0000)]
Clean up amd64 suspend/resume code.

- Allocate memory for wakeup code after ACPI bus is attached.  The early
memory allocation hack was inherited from i386 but amd64 does not need it.
- Exclude real mode IVT and BDA explicitly.  Improve comments about memory
allocation and reason for the exclusions.  It is a no-op in reality, though.
- Remove an unnecessary CLD from wakeup code and re-align.

14 years agoAllow file system owner to modify system flags if securelevel permits.
Pawel Jakub Dawidek [Thu, 8 Oct 2009 16:05:17 +0000 (16:05 +0000)]
Allow file system owner to modify system flags if securelevel permits.

MFC after: 3 days

14 years agoFile system owner is when uid matches and jail matches.
Pawel Jakub Dawidek [Thu, 8 Oct 2009 16:03:19 +0000 (16:03 +0000)]
File system owner is when uid matches and jail matches.

MFC after: 3 days

14 years ago'aclmode' and 'aclinherit' properties should work as advertised; don't
Edward Tomasz Napierala [Thu, 8 Oct 2009 15:34:01 +0000 (15:34 +0000)]
'aclmode' and 'aclinherit' properties should work as advertised; don't
refuse to set them.

14 years agoFix so that round robing stream scheduling works as advertised
Randall Stewart [Thu, 8 Oct 2009 11:36:06 +0000 (11:36 +0000)]
Fix so that round robing stream scheduling works as advertised

MFC after: 0 days

14 years agoDiscard Device Control Strings and Operating System Commands.
Ed Schouten [Thu, 8 Oct 2009 10:26:49 +0000 (10:26 +0000)]
Discard Device Control Strings and Operating System Commands.

These strings often contain things like:

- Window titles.
- Extended key map functionality.
- Color palette switching.

We could look at these features in the future (if people consider them
to be important enough), but we'd better discard them now. This fixes
some artifacts people reported when using TERM=xterm.

Reported by: des@, Paul B. Mahol

14 years agoAdd a special workaround to handle UIO_NOCOPY case. This fixes data
Xin LI [Wed, 7 Oct 2009 23:17:15 +0000 (23:17 +0000)]
Add a special workaround to handle UIO_NOCOPY case.  This fixes data
corruption observed when sendfile() is being used.

PR: kern/127213
Submitted by: gk
MFC after: 2 weeks

14 years agoFix build on amd64.
Xin LI [Wed, 7 Oct 2009 23:01:31 +0000 (23:01 +0000)]
Fix build on amd64.

PR: misc/139409
Submitted by: gk

14 years agoClarify quoting of word in ${v=word} in sh(1).
Jilles Tjoelker [Wed, 7 Oct 2009 22:21:53 +0000 (22:21 +0000)]
Clarify quoting of word in ${v=word} in sh(1).

14 years agoAdd the comment "(FreeBSD only)" to the altmonth_x keywords
Edwin Groothuis [Wed, 7 Oct 2009 21:14:45 +0000 (21:14 +0000)]
Add the comment "(FreeBSD only)" to the altmonth_x keywords

MFC after: 1 week

14 years agoOn FreeBSD it is enough to report provider removal when orphan event is
Pawel Jakub Dawidek [Wed, 7 Oct 2009 20:56:15 +0000 (20:56 +0000)]
On FreeBSD it is enough to report provider removal when orphan event is
received, we don't have to do it on every ENXIO error in I/O path.
Solaris has no GEOM so they have to handle it in a less clean way.

MFC after: 3 days

14 years agoFix white-spaces.
Pawel Jakub Dawidek [Wed, 7 Oct 2009 20:54:07 +0000 (20:54 +0000)]
Fix white-spaces.

MFC after: 3 days

14 years agoAdd a new errno, ENOTCAPABLE, to be returned when a process requests an
Robert Watson [Wed, 7 Oct 2009 20:20:51 +0000 (20:20 +0000)]
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
operation on a file descriptor that is not authorized by the descriptor's
capability flags.

MFC after: 1 month
Sponsored by: Google

14 years agoHandle GRANTED_RES messages more gracefully: Send along a grant cookie
Zachary Loafman [Wed, 7 Oct 2009 19:50:14 +0000 (19:50 +0000)]
Handle GRANTED_RES messages more gracefully: Send along a grant cookie
to reference the lock, look up the grant cookie when the GRANTED_RES
comes back. Properly handle the case of an error on the grant. Add a
short expiration window so that granted locks are not freed immediately.

Approved by:        dfr (mentor)
MFC after:          2 weeks

14 years agoOn command timeout handle frozen command first, to not run it inside
Alexander Motin [Wed, 7 Oct 2009 15:40:04 +0000 (15:40 +0000)]
On command timeout handle frozen command first, to not run it inside
XXX_end_transaction().

Submitted by: avg

14 years ago- Give a name to the host coalescing bug fix WDMA mode register bit instead
Stanislav Sedov [Wed, 7 Oct 2009 14:29:48 +0000 (14:29 +0000)]
- Give a name to the host coalescing bug fix WDMA mode register bit instead
  of using hardcoded value in the code.
Obtained from: OpenBSD

14 years ago- Document that 'Dell PowerEdge R710' has bce(4) supported NIC.
Simon L. B. Nielsen [Wed, 7 Oct 2009 13:45:12 +0000 (13:45 +0000)]
- Document that 'Dell PowerEdge R710' has bce(4) supported NIC.
- Bump document date.

MFC after: 3 days

14 years ago- Document new revisions of chips supported.
Stanislav Sedov [Wed, 7 Oct 2009 13:25:24 +0000 (13:25 +0000)]
- Document new revisions of chips supported.

14 years agoWhen run() returns an error, print the error message also in
Jaakko Heinonen [Wed, 7 Oct 2009 13:25:22 +0000 (13:25 +0000)]
When run() returns an error, print the error message also in
non-interactive mode. Previously error messages were printed only in
interactive mode.

PR: bin/124517
Approved by: trasz (mentor)
MFC after: 1 month

14 years ago- Add support for new BGE chips (5761, 5784 and 57780). These chips uses new
Stanislav Sedov [Wed, 7 Oct 2009 13:12:43 +0000 (13:12 +0000)]
- Add support for new BGE chips (5761, 5784 and 57780).  These chips uses new
  BGE_PCI_PRODID_ASICREV register to store the chip identifier and its revision.
- Add new grouping macro for 7575+ chips (BGE_IS_5755_PLUS).
- Add IDs for Fujitsu-branded Broadcom adapters.

PR:             kern/127587
Tested by:      Thomas Quinot <thomas@quinot.org> (BCM7561 A0)
MFC after: 2 weeks
Obtained from:  OpenBSD

14 years agoFix situation where Mac OS X NFS client creates a file and when it tries
Pawel Jakub Dawidek [Wed, 7 Oct 2009 12:38:19 +0000 (12:38 +0000)]
Fix situation where Mac OS X NFS client creates a file and when it tries
to set ownership and mode in the same setattr operation, the mode was
overwritten by secpolicy_vnode_setattr().

PR: kern/118320
Submitted by: Mark Thompson <info-gentoo@mark.thompson.bz>
MFC after: 3 days

14 years agoAdd parsing code for TCP UTO (User Timeout Option).
Rui Paulo [Wed, 7 Oct 2009 09:07:06 +0000 (09:07 +0000)]
Add parsing code for TCP UTO (User Timeout Option).

Submitted by: fangwang@
Obtained from: //depot/projects/soc2009/tcputo/

14 years ago- All the functions in atomic.h needs to be in "physical" form (like
Attilio Rao [Tue, 6 Oct 2009 23:48:28 +0000 (23:48 +0000)]
- All the functions in atomic.h needs to be in "physical" form (like
  not defined through macros or similar) in order to be later compiled in
  the kernel and offer this way the support for modules (and
  compatibility among the UP case and SMP case).
  Fix this for the newly introduced atomic_cmpset_barr_* cases by defining
  and specifying a template.  Note that the new DEFINE_CMPSET_GEN()
  template save more typing on amd64 than the current code. [1]
- Fix the style for memory barriers on amd64.

[1] Reported by: Paul B. Mahol <onemda at gmail dot com>

14 years agosh: Send the "xyz: not found" message to redirected fd 2.
Jilles Tjoelker [Tue, 6 Oct 2009 22:00:14 +0000 (22:00 +0000)]
sh: Send the "xyz: not found" message to redirected fd 2.
This also fixes that trying to execute a non-regular file with a command
name without '/' returns 127 instead of 126.
The fix is rather simplistic: treat CMDUNKNOWN as if the command were found
as an external program. The resulting fork is a bit wasteful but executing
unknown commands should not be very frequent.

PR: bin/137659

14 years agoPrevent paging pressure from draining arc too much
Kip Macy [Tue, 6 Oct 2009 21:40:50 +0000 (21:40 +0000)]
Prevent paging pressure from draining arc too much
- always drain arc if above arc_c_max - never drain arc if arc is below arc_c_max

MFC after: 3 days

14 years agoRemove tcp_input lock statistics; these are intended for debugging only
Robert Watson [Tue, 6 Oct 2009 20:35:41 +0000 (20:35 +0000)]
Remove tcp_input lock statistics; these are intended for debugging only
and are not intended to ship in 8.0 as they dirty additional cache
lines in a performance-critical per-packet path.

MFC after: 3 days

14 years agoFix tcsh losing history when tcsh terminates because the pty beneath it
Roman Divacky [Tue, 6 Oct 2009 20:19:16 +0000 (20:19 +0000)]
Fix tcsh losing history when tcsh terminates because the pty beneath it
is closed.

Diagnosed by Ted Anderson:

New signal queuing logic was introduced in 6.15 and allows the signal handlers
to be run explicitly by calling handle_pending_signals, instead of
immediately when the signal is delivered.  This function is called at
various places, typically when receiving a EINTR from a slow system call
such as read or write.  In the pty exit case, it was called from xwrite,
called from flush, while printing the "exit" message after receiving EOF
when reading from the pty (note that the read did not return EINTR but
zero bytes, indicating EOF).  The SIGHUP handler, phup(), called
rechist, which opened the history file and began writing the merged
history to it.  This process invoked flush recursively to actually write
the data.  In this case, however, the flush noticed it was being called
recursively and decided fail by calling stderror.

My conclusion was that the signal was being handled at a bad time.  But
whether to fix flush not to care about the recursive call, or to handle
the signal some other time and when to handle it, was unclear to me.
However, by adding an extra call to handle_pending_signals, just after
process() returns to main(), I was able to avoid the truncated history
after network outages and similar failures.  I verified this fix in
version 6.17.

Approved by: ed (mentor)
MFC after: 1 week

14 years agoIn rtld's map_object(), use pread(..., 0) rather than read() to read the
Robert Watson [Tue, 6 Oct 2009 17:14:39 +0000 (17:14 +0000)]
In rtld's map_object(), use pread(..., 0) rather than read() to read the
ELF header from the front of the file.  As all other I/O on the binary
is done using mmap(), this avoids the need for seek privileges on the
file descriptor during run-time linking.

MFC after: 1 month
Sponsored by: Google

14 years agoAdd basename_r(3) to complement basename(3). basename_r(3) which accepts
Robert Watson [Tue, 6 Oct 2009 14:05:57 +0000 (14:05 +0000)]
Add basename_r(3) to complement basename(3).  basename_r(3) which accepts
a caller-allocated buffer of at least MAXPATHLEN, rather than using a
global buffer.

MFC after: 1 month
Sponsored by: Google

14 years agoPer their definition, atomic instructions used in conjuction with
Attilio Rao [Tue, 6 Oct 2009 13:45:49 +0000 (13:45 +0000)]
Per their definition, atomic instructions used in conjuction with
memory barriers should also ensure that the compiler doesn't reorder paths
where they are used.  GCC, however, does that aggressively, even in
presence of volatile operands.  The most reliable way GCC offers for avoid
instructions reordering is clobbering "memory" even if that is
theoretically an heavy-weight operation, flushing the content of all
the registers and forcing reload of them (We could rely, however, on
gcc DTRT by just understanding the purpose as this is a well-known
pattern for many modern operating-systems).

Not all our memory barriers, right now, clobber memory for GCC-like
compilers. The most notable cases are IA32 and amd64 where the memory
barrier are treacted the same as normal atomic instructions.
Fix this by offering the possibility to implement atomic instructions
with memory barriers separately from the normal version and implement
the GCC-like specific one using memory clobbering.
Thanks to Chris Lattner (@apple) for his discussion on llvm specifics.

Reported by: jhb
Reviewed by: jhb
Tested by: rdivacky, Giovanni Trematerra
<giovanni dot trematerra at gmail dot com>

14 years agoExpand $FreeBSD$
Dag-Erling Smørgrav [Tue, 6 Oct 2009 10:19:20 +0000 (10:19 +0000)]
Expand $FreeBSD$

14 years agoo Fix typo: "an in particular" -> "and in particular".
Maxim Konovalov [Tue, 6 Oct 2009 04:57:18 +0000 (04:57 +0000)]
o Fix typo: "an in particular" -> "and in particular".

PR: docs/139370
Submitted by: Kenyon Ralph
MFC after: 1 week

14 years ago"Potluck Pogo" was a collection of Walt Kelly's "Pogo" cartoons
Doug Barton [Tue, 6 Oct 2009 02:13:32 +0000 (02:13 +0000)]
"Potluck Pogo" was a collection of Walt Kelly's "Pogo" cartoons
first published in 1955. "Putluck Pogo" seems to be a typo.

14 years agoIn tcp_input(), we acquire a global write lock at first only if a
Robert Watson [Mon, 5 Oct 2009 22:24:13 +0000 (22:24 +0000)]
In tcp_input(), we acquire a global write lock at first only if a
segment is likely to trigger a TCP state change (i.e., FIN/RST/SYN).
If we later have to upgrade the lock, we acquire an inpcb reference
and drop both global/inpcb locks before reacquiring in-order.  In
that gap, the connection may transition into TIMEWAIT, so we need
to loop back and reevaluate the inpcb after relocking.

MFC after: 3 days
Reported by: Kamigishi Rei <spambox at haruhiism.net>
Reviewed by: bz

14 years agoFix build on amd64, where sysctl arg1 is a pointer.
Robert Watson [Mon, 5 Oct 2009 22:23:12 +0000 (22:23 +0000)]
Fix build on amd64, where sysctl arg1 is a pointer.

Reported by: Mr Tinderbox
MFC after: 3 months

14 years agofts_open() requires that the list passed as argument to contain at least
Xin LI [Mon, 5 Oct 2009 21:11:04 +0000 (21:11 +0000)]
fts_open() requires that the list passed as argument to contain at least
one path.  When the list is empty (contain only a NULL pointer), return
EINVAL instead of pretending to succeed, which will cause a NULL pointer
deference in a later fts_read() call.

Noticed by: Christoph Mallon (via rdivacky@)
MFC after: 2 weeks

14 years agocxgb(4) updates, including:
Navdeep Parhar [Mon, 5 Oct 2009 20:21:41 +0000 (20:21 +0000)]
cxgb(4) updates, including:
- support for the new Gen-2, BT, and LP-CR cards.
- T3 firmware 7.7.0
- shared "common code" updates.

Approved by: gnn (mentor)
Obtained from: Chelsio
MFC after: 1 month

14 years agoFix a case when both ${name}_program and ${command} are defined.
Hiroki Sato [Mon, 5 Oct 2009 20:11:33 +0000 (20:11 +0000)]
Fix a case when both ${name}_program and ${command} are defined.

Spotted by: Michio "Karl" Jinbo

14 years agoFix NFSv4 ACLs on sparc64. Turns out that fuword(9) fetches 64 bits
Edward Tomasz Napierala [Mon, 5 Oct 2009 19:56:56 +0000 (19:56 +0000)]
Fix NFSv4 ACLs on sparc64.  Turns out that fuword(9) fetches 64 bits
instead of sizeof(int), and on sparc64 that resulted in fetching wrong
value for acl_maxcnt, which in turn caused __acl_get_link(2) to fail
with EINVAL.

PR: sparc64/139304
Submitted by: Dmitry Afanasiev <KOT at MATPOCKuH.Ru>

14 years agoBelatedly add my calendar entry.
Benedict Reuschling [Mon, 5 Oct 2009 19:29:49 +0000 (19:29 +0000)]
Belatedly add my calendar entry.

Discussed with:     remko
Approved by:        remko, jkois (mentor)

14 years agopam_ssh needs roaming_dummy to link correctly against libssh.
Dag-Erling Smørgrav [Mon, 5 Oct 2009 18:56:18 +0000 (18:56 +0000)]
pam_ssh needs roaming_dummy to link correctly against libssh.

14 years agoAdd more symbols that need to be masked:
Dag-Erling Smørgrav [Mon, 5 Oct 2009 18:55:13 +0000 (18:55 +0000)]
Add more symbols that need to be masked:

 - initialized and uninitialized data
 - symbols from roaming_dummy.c which end up in pam_ssh

Update the command line used to generate the #defines.

14 years ago- Revert r191568 partially. Forcing AHCI mode by changing device subclass
Jung-uk Kim [Mon, 5 Oct 2009 16:26:54 +0000 (16:26 +0000)]
- Revert r191568 partially.  Forcing AHCI mode by changing device subclass
and progif is evil.  It doesn't work reliably[1] and we should honor BIOS
configuration by the user.
- If the SATA controller is enbled but combined mode is disabled, mask off
the emulated IDE channel on the legacy IDE controller.

Pointed out by: mav[1]

14 years agoA few regression tests for SOCK_SEQPACKET UNIX domain sockets.
Robert Watson [Mon, 5 Oct 2009 15:27:01 +0000 (15:27 +0000)]
A few regression tests for SOCK_SEQPACKET UNIX domain sockets.

Sponsored by: Google

14 years agoMake fetch(9) and store(9) manual pages closer to reality.
Edward Tomasz Napierala [Mon, 5 Oct 2009 15:16:28 +0000 (15:16 +0000)]
Make fetch(9) and store(9) manual pages closer to reality.

14 years agoBump unix(4) man page date for SOCK_SEQPACKET.
Robert Watson [Mon, 5 Oct 2009 15:15:13 +0000 (15:15 +0000)]
Bump unix(4) man page date for SOCK_SEQPACKET.

Suggested by: bz
MFC after: 3 months

14 years agoSOCK_SEQPACKET is now supported on UNIX domain sockets.
Robert Watson [Mon, 5 Oct 2009 15:07:44 +0000 (15:07 +0000)]
SOCK_SEQPACKET is now supported on UNIX domain sockets.

Sponsored by: Google
MFC after: 3 months

14 years agonetstat(1) support for UNIX SOCK_SEQPACKET sockets -- changes were required
Robert Watson [Mon, 5 Oct 2009 15:06:14 +0000 (15:06 +0000)]
netstat(1) support for UNIX SOCK_SEQPACKET sockets -- changes were required
only for the kvm case, as we supported SOCK_SEQPACKET via sysctl already.

Sponsored by: Google
MFC after: 3 months

14 years agoAdd myself.
Jaakko Heinonen [Mon, 5 Oct 2009 15:05:43 +0000 (15:05 +0000)]
Add myself.

Approved by: trasz (mentor)

14 years agoFirst cut at implementing SOCK_SEQPACKET support for UNIX (local) domain
Robert Watson [Mon, 5 Oct 2009 14:49:16 +0000 (14:49 +0000)]
First cut at implementing SOCK_SEQPACKET support for UNIX (local) domain
sockets.  This allows for reliable bi-directional datagram communication
over UNIX domain sockets, in contrast to SOCK_DGRAM (M:N, unreliable) or
SOCK_STERAM (bi-directional bytestream).  Largely, this reuses existing
UNIX domain socket code.  This allows applications requiring record-
oriented semantics to do so reliably via local IPC.

Some implementation notes (also present in XXX comments):

- Currently we lack an sbappend variant able to do datagrams and control
  data without doing addresses, so we mark SOCK_SEQPACKET as PR_ADDR.
  Adding a new variant will solve this problem.

- UNIX domain sockets on FreeBSD provide back-pressure/flow control
  notification for stream sockets by manipulating the send socket
  buffer's size during pru_send and pru_rcvd.  This trick works less well
  for SOCK_SEQPACKET as sosend_generic() uses sb_hiwat not just to
  manage blocking, but also to determine maximum datagram size.  Fixing
  this requires rethinking how back-pressure is done for SOCK_SEQPACKET;
  in the mean time, it's possible to get EMSGSIZE when buffers fill,
  instead of blocking.

Discussed with: benl
Reviewed by: bz, rpaulo
MFC after: 3 months
Sponsored by: Google

14 years agoWhen the timeout backoff hits the maximum value, leave it capped at the
John Baldwin [Mon, 5 Oct 2009 14:13:16 +0000 (14:13 +0000)]
When the timeout backoff hits the maximum value, leave it capped at the
maximum value rather than setting it to the result of a boolean expression
that is always true.

Submitted by: Joseph Kong
MFC after: 1 month

14 years ago- Drop unused pmap_use_l1 function and comment out currently unused
Stanislav Sedov [Mon, 5 Oct 2009 10:08:58 +0000 (10:08 +0000)]
- Drop unused pmap_use_l1 function and comment out currently unused
  pmap_dcache_wbinv_all/pmap_copy_page functions which we might want
  to take advatage of later.  This fixes the build with PMAP_DEBUG
  defined.

Discussed with: cognet

14 years agotabify
Dag-Erling Smørgrav [Mon, 5 Oct 2009 09:28:54 +0000 (09:28 +0000)]
tabify

MFC after: 3 weeks

14 years agoChange the pam_ssh examples: if you use it, you probably want want_agent.
Dag-Erling Smørgrav [Mon, 5 Oct 2009 09:26:22 +0000 (09:26 +0000)]
Change the pam_ssh examples: if you use it, you probably want want_agent.

MFC after: 3 weeks

14 years ago- Improve error message consistency and wording.
Ulf Lilleengen [Mon, 5 Oct 2009 08:44:31 +0000 (08:44 +0000)]
- Improve error message consistency and wording.

14 years agoBackout changes for c_fmt, x_fmt and X_fmt, they were coming from
Edwin Groothuis [Mon, 5 Oct 2009 07:21:21 +0000 (07:21 +0000)]
Backout changes for c_fmt, x_fmt and X_fmt, they were coming from
the wrong patches. Apologies.

14 years agoModified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.
Edwin Groothuis [Mon, 5 Oct 2009 07:13:15 +0000 (07:13 +0000)]
Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.
Also modify the "-k list" option to display only fields with a certain prefix.

MFC after:      1 week

14 years agoModified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.
Edwin Groothuis [Mon, 5 Oct 2009 07:11:19 +0000 (07:11 +0000)]
Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's.
Also modify the "-k list" option to display only fields with a certain prefix.

MFC after: 1 week

14 years agoThe cylinder group tag cg_initediblk needs to match the number of inodes
Matt Jacob [Mon, 5 Oct 2009 01:31:16 +0000 (01:31 +0000)]
The cylinder group tag cg_initediblk needs to match the number of inodes
actually initialized. In the growfs case for UFS2, no inodes were actually
being initialized and the number of inodes noted as initialized was the
number of inodes per group. This created a filesystem that was deemed
corrupted because the inodes thus added were full of garbage.

MFC after: 1 month

14 years agoupdates device entries supported with the product name not magic numbers
Weongyo Jeong [Sun, 4 Oct 2009 23:30:08 +0000 (23:30 +0000)]
updates device entries supported with the product name not magic numbers
and sorts entries.  WUSB54GCV2 is added.

Obtained from: OpenBSD

14 years agoRegression tests for r197752 (handling of empty/NULL buffers).
David Schultz [Sun, 4 Oct 2009 19:44:41 +0000 (19:44 +0000)]
Regression tests for r197752 (handling of empty/NULL buffers).

14 years agoBetter glibc compatibility for getline/getdelim:
David Schultz [Sun, 4 Oct 2009 19:43:36 +0000 (19:43 +0000)]
Better glibc compatibility for getline/getdelim:

- Tolerate applications that pass a NULL pointer for the buffer and
  claim that the capacity of the buffer is nonzero.

- If an application passes in a non-NULL buffer pointer and claims the
  buffer has zero capacity, we should free (well, realloc) it
  anyway. It could have been obtained from malloc(0), so failing to
  free it would be a small memory leak.

MFC After: 2 weeks
Reported by: naddy
PR: ports/138320

14 years agoAlign and pad the page queue and free page queue locks so that the linker
Alan Cox [Sun, 4 Oct 2009 18:53:10 +0000 (18:53 +0000)]
Align and pad the page queue and free page queue locks so that the linker
can't possibly place them together within the same cache line.

MFC after: 3 weeks

14 years agoIn lists, if there is a Li command remove it. This fixes markup for
Simon L. B. Nielsen [Sun, 4 Oct 2009 16:30:33 +0000 (16:30 +0000)]
In lists, if there is a Li command remove it.  This fixes markup for
uath(4).

MFC after: 3 days
Reported by: Warren Block <wblock at wonkity.com>

14 years agoInstall x86 related man pages on x86 systems only.
Rui Paulo [Sun, 4 Oct 2009 10:54:20 +0000 (10:54 +0000)]
Install x86 related man pages on x86 systems only.

Reviewed by: jkoshy

14 years agoFix a bug that causes the fsx test case of mmap'ed page being out of sync
Xin LI [Sun, 4 Oct 2009 10:38:04 +0000 (10:38 +0000)]
Fix a bug that causes the fsx test case of mmap'ed page being out of sync
of read/write, inspired by ZFS's counterpart.

PR: kern/139312
Submitted by: gk@
MFC after: 1 week

14 years agoWhen releasing a lockmgr held in shared way we need to use a write memory
Attilio Rao [Sat, 3 Oct 2009 15:02:55 +0000 (15:02 +0000)]
When releasing a lockmgr held in shared way we need to use a write memory
barrier in order to avoid, on architectures which doesn't have strong
ordered writes, CPU instructions reordering.

Diagnosed by: fabio

14 years agoRemove remaining bits of performance counter support.
Rui Paulo [Sat, 3 Oct 2009 13:59:15 +0000 (13:59 +0000)]
Remove remaining bits of performance counter support.

Submitted by: Tom Judge <tom at tomjudge.com>

14 years agounifdef NFSCLIENT because the nlm depends on the nfsclient even if NFSCLIENT
Yoshihiro Takahashi [Sat, 3 Oct 2009 12:22:12 +0000 (12:22 +0000)]
unifdef NFSCLIENT because the nlm depends on the nfsclient even if NFSCLIENT
is not defined.

Now the nfslockd module works with the nfsclient module.

Reviewed by: kib
MFC after: 3 days

14 years agoMake sure that the primary native brandinfo always gets added
Bjoern A. Zeeb [Sat, 3 Oct 2009 11:57:21 +0000 (11:57 +0000)]
Make sure that the primary native brandinfo always gets added
first and the native ia32 compat as middle (before other things).
o(ld)brandinfo as well as third party like linux, kfreebsd, etc.
stays on SI_ORDER_ANY coming last.

The reason for this is only to make sure that even in case we would
overflow the MAX_BRANDS sized array, the native FreeBSD brandinfo
would still be there and the system would be operational.

Reviewed by: kib
MFC after: 1 month

14 years agoAdd OpenVPN IANA assigned port number.
Rui Paulo [Sat, 3 Oct 2009 11:02:36 +0000 (11:02 +0000)]
Add OpenVPN IANA assigned port number.

14 years agoPut #ifdef INET around parts of the FLOWTABLE code, to unbreak
Bjoern A. Zeeb [Sat, 3 Oct 2009 10:56:03 +0000 (10:56 +0000)]
Put #ifdef INET around parts of the FLOWTABLE code, to unbreak
nooptions INET kernel builds.

MFC after: 3 days
X-MFC: with r197687

14 years agoPrint a warning in case we cannot add more brandinfo because
Bjoern A. Zeeb [Sat, 3 Oct 2009 10:50:00 +0000 (10:50 +0000)]
Print a warning in case we cannot add more brandinfo because
we would overflow the MAX_BRANDS sized array.

Reviewed by: kib
MFC After: 1 month

14 years agoThe 6bone was decommissioned on 6/6/06, so remove references to it.
Doug Barton [Sat, 3 Oct 2009 02:37:21 +0000 (02:37 +0000)]
The 6bone was decommissioned on 6/6/06, so remove references to it.

14 years agoTRENDnet TEW-424UB has multiple revisions so clarify zyd(4) man page and
Weongyo Jeong [Sat, 3 Oct 2009 02:28:28 +0000 (02:28 +0000)]
TRENDnet TEW-424UB has multiple revisions so clarify zyd(4) man page and
adds a device to urtw(4).  The revision informations are as follows:

    rev A       ZD1211
    V2          SiS163U
    V2.1R       SiS163U
    V3.xR       RTL8187B

and bump date.

Obtained from: OpenBSD
Reported by: Albert Shih <Albert.Shih at obspm.fr>

14 years agoFix RTS/CTS flow control, broken by the TTY overhaul. The new TTY
Marcel Moolenaar [Fri, 2 Oct 2009 22:30:44 +0000 (22:30 +0000)]
Fix RTS/CTS flow control, broken by the TTY overhaul. The new TTY
interface is fairly simple WRT dealing with flow control, but
needed 2 new RX buffer functions with "get-char-from-buf" separated
from "advance-buf-pointer" so that the pointer could be advanced
only when ttydisc_rint() succeeded.

MFC after: 1 week

14 years agoDon't comment on stream socket handling in sosend_dgram, since that's
Robert Watson [Fri, 2 Oct 2009 21:31:15 +0000 (21:31 +0000)]
Don't comment on stream socket handling in sosend_dgram, since that's
not handled.

MFC after: 3 weeks

14 years ago- Enable an afexists() check only when no AF argument is specified.
Hiroki Sato [Fri, 2 Oct 2009 20:19:53 +0000 (20:19 +0000)]
- Enable an afexists() check only when no AF argument is specified.
- Simplify helper functions.

Discussed with: ume

14 years agoReplace the name of the sysctl to security.bsd.map_at_zero and to be
Bjoern A. Zeeb [Fri, 2 Oct 2009 17:53:48 +0000 (17:53 +0000)]
Replace the name of the sysctl to security.bsd.map_at_zero and to be
consistent updated the name of the variable as well, after the change
in r197711.

14 years agoBack out the functional parts from r197537. After r197711, affecting all
Bjoern A. Zeeb [Fri, 2 Oct 2009 17:51:46 +0000 (17:51 +0000)]
Back out the functional parts from r197537.  After r197711, affecting all
user mappings, mmap no longer needs special treatment.