]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
14 years agoCorrect a copy/paste bug in a comment. lptclose() checks once a second to
jhb [Tue, 13 Oct 2009 12:23:28 +0000 (12:23 +0000)]
Correct a copy/paste bug in a comment.  lptclose() checks once a second to
see if the ppc hardware has gone idle rather than four times a second.

14 years agoProperly initialize the mesh conf capabilities byte.
rpaulo [Tue, 13 Oct 2009 10:43:17 +0000 (10:43 +0000)]
Properly initialize the mesh conf capabilities byte.

MFC after: 2 days

14 years agoEXPORT_SYMS is not, in fact, required, for a dependent module to access
rwatson [Tue, 13 Oct 2009 09:21:20 +0000 (09:21 +0000)]
EXPORT_SYMS is not, in fact, required, for a dependent module to access
non-static symbols in a module they depend on, so remove dtrace symbols
from nfsclient's EXPORT_SYMS again.

Suggested by: jhb

14 years agoMake number(6) build with WARNS=6.
ed [Tue, 13 Oct 2009 06:25:53 +0000 (06:25 +0000)]
Make number(6) build with WARNS=6.

14 years agoChase dependency changes in libgssapi_krb5 module introruced by
bland [Tue, 13 Oct 2009 05:38:08 +0000 (05:38 +0000)]
Chase dependency changes in libgssapi_krb5 module introruced by
revision r197995.

14 years agoUse printb() to display the "nd6 options=" line.
hrs [Mon, 12 Oct 2009 21:11:50 +0000 (21:11 +0000)]
Use printb() to display the "nd6 options=" line.

14 years agoWe haven't installed usbdevs for many moons now, and it doesn't work any
markm [Mon, 12 Oct 2009 21:10:28 +0000 (21:10 +0000)]
We haven't installed usbdevs for many moons now, and it doesn't work any
more anyway. Add it to the "obsolete" list.

14 years agoFix the 106/109 USB Japanese keyboard "underscore" issue.
hrs [Mon, 12 Oct 2009 19:19:08 +0000 (19:19 +0000)]
Fix the 106/109 USB Japanese keyboard "underscore" issue.
Sun Type 6 USB keyboard support added in rev 1.46 conflicted with
some scan codes used in Japanese keyboards because the scan code
conversion routine was ambiguous for the overlapped codes.

PR: ports/134005
Submitted by: YAMASHIRO Jun

14 years agoExport DTrace symbols from nfsclient so that dtnfsclient can get to them.
rwatson [Mon, 12 Oct 2009 18:59:31 +0000 (18:59 +0000)]
Export DTrace symbols from nfsclient so that dtnfsclient can get to them.
This fixes DTrace with nfsclient built as a module.

MFC after: 3 days
Reported by: markm

14 years agoAdd a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
rwatson [Mon, 12 Oct 2009 18:58:42 +0000 (18:58 +0000)]
Add a MODULE_DEPEND() on the NFS client from dtnfsclient so that dtnfsclient
can access NFS client symbols.

MFC after: 3 days
Discussed with: kib
Reported by: markm

14 years ago- Do not assign a link-local address when ND6_IFF_IFDISABLED.
hrs [Mon, 12 Oct 2009 18:54:02 +0000 (18:54 +0000)]
- Do not assign a link-local address when ND6_IFF_IFDISABLED.
  Adding a tentative address is useless.

- Comment out a confused warning message when
  in6_ifattach_linklocal() fails.  This can occur when the
  interface does not support ioctl(SIOCAIFADDR) (interfaces
  associated with 802.11 wireless network device drivers, for
  example).

14 years agoLink GSS mechanics modules against libgssapi so they will not fail due
bland [Mon, 12 Oct 2009 17:10:51 +0000 (17:10 +0000)]
Link GSS mechanics modules against libgssapi so they will not fail due
unresolved symbol errors when in turn libgssapi was loaded with RTLD_LOCAL
flag set (which is the default).

Reviewed by: dfr, jhb
MFC after: 3 days

14 years agoImprove the description of sysctl "kern.sugid_coredump".
jkoshy [Mon, 12 Oct 2009 15:49:48 +0000 (15:49 +0000)]
Improve the description of sysctl "kern.sugid_coredump".

Submitted by: Mel Flynn <mel.flynn+fbsd.hackers at mailing.thruhere.net>
on -hackers

14 years agoUpdate for latest 802.11s changes in meshconf format.
rpaulo [Mon, 12 Oct 2009 14:51:19 +0000 (14:51 +0000)]
Update for latest 802.11s changes in meshconf format.

MFC after: 3 days

14 years agoFix a wrong initialization that snuck in the latest commit.
rpaulo [Mon, 12 Oct 2009 10:30:15 +0000 (10:30 +0000)]
Fix a wrong initialization that snuck in the latest commit.

MFC after: 3 days

14 years agoFix typo.
kib [Mon, 12 Oct 2009 10:09:48 +0000 (10:09 +0000)]
Fix typo.

Submitted by: rdivacky
MFC after: 1 month

14 years agoAnother 3.03 draft bit that I missed in the previous 802.11s stack
rpaulo [Mon, 12 Oct 2009 10:08:58 +0000 (10:08 +0000)]
Another 3.03 draft bit that I missed in the previous 802.11s stack
update. The Mesh Configuration IE has changed quite a bit. Refactor the
code to handle this change.

MFC after: 3 days

14 years agoScan for option ROMs on i386 and amd64 only.
marcel [Sun, 11 Oct 2009 20:42:26 +0000 (20:42 +0000)]
Scan for option ROMs on i386 and amd64 only.

14 years agoMake openat(2) a cancellation point.
jilles [Sun, 11 Oct 2009 20:19:45 +0000 (20:19 +0000)]
Make openat(2) a cancellation point.

This is required by POSIX and matches open(2).

Reviewed by: kib, jhb
MFC after: 1 month

14 years agoTweaks for sigqueue tests:
kib [Sun, 11 Oct 2009 17:04:13 +0000 (17:04 +0000)]
Tweaks for sigqueue tests:
- slightly adjust code for style, sort headers.
- in sigqtest2, print received signals, to make it easy to see why test
  failed.
- in sigqtest2, job_control_test(), cover a race by adding sleep after
  child stopped itself to allow for SIGCHLD due to stop and exit to not
  be coalesced.

MFC after: 2 weeks

14 years agoCurrently, when signal is delivered to the process and there is a thread
kib [Sun, 11 Oct 2009 16:49:30 +0000 (16:49 +0000)]
Currently, when signal is delivered to the process and there is a thread
not blocking the signal, signal is placed on the thread sigqueue. If
the selected thread is in kernel executing thr_exit() or sigprocmask()
syscalls, then signal might be not delivered to usermode for arbitrary
amount of time, and for exiting thread it is lost.

Put process-directed signals to the process queue unconditionally,
selecting the thread to deliver the signal only by the thread returning
to usermode, since only then the thread can handle delivery of signal
reliably. For exiting thread or thread that has blocked some signals,
check whether the newly blocked signal is queued for the process, and
try to find a thread to wakeup for delivery, in reschedule_signal(). For
exiting thread, assume that all signals are blocked.

Change cursig() and postsig() to look both into the thread and process
signal queues. When there is a signal that thread returning to usermode
could consume, TDF_NEEDSIGCHK flag is not neccessary set now. Do
unlocked read of p_siglist and p_pendingcnt to check for queued signals.

Note that thread that has a signal unblocked might get spurious wakeup
and EINTR from the interruptible system call now, due to the possibility
of being selected by reschedule_signals(), while other thread returned
to usermode earlier and removed the signal from process queue. This
should not cause compliance issues, since the thread has not blocked a
signal and thus should be ready to receive it anyway.

Reported by: Justin Teller <justin.teller gmail com>
Reviewed by: davidxu, jilles
MFC after: 1 month

14 years agoCorrect another typo. Actually save the condition register instead
nwhitehorn [Sun, 11 Oct 2009 16:44:58 +0000 (16:44 +0000)]
Correct another typo. Actually save the condition register instead
of overwriting r12 by mistake.

14 years agoCorrect a typo here and actually save DSISR instead of overwriting it.
nwhitehorn [Sun, 11 Oct 2009 16:41:39 +0000 (16:41 +0000)]
Correct a typo here and actually save DSISR instead of overwriting it.

14 years agoIn nanosleep(2), note that the calling thread is put to sleep, not the
kib [Sun, 11 Oct 2009 16:23:11 +0000 (16:23 +0000)]
In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.

14 years agoRemove dupe.
des [Sun, 11 Oct 2009 14:27:33 +0000 (14:27 +0000)]
Remove dupe.

14 years ago- Catch SIGHUP to perform cleanup before exiting.
jh [Sun, 11 Oct 2009 12:32:25 +0000 (12:32 +0000)]
- Catch SIGHUP to perform cleanup before exiting.
- Exit if getch() returns with an error other than EINTR. Otherwise
  systat(1) may get stuck in an infinite loop if it doesn't receive
  SIGHUP when terminal closes. [1]
- Remove attempt to clear stdio error indicators. getch() doesn't use
  stdio, making it useless. [2]
- Remove unneeded masking of getch() return value. [2]

PR: bin/107171
Reviewed by: bde
Approved by: trasz (mentor)
Obtained from: OpenBSD [1]
Suggested by: bde [2]
MFC after: 1 month

14 years agoFix a race condition where a mutex was destroyed while sleeping on it.
tuexen [Sun, 11 Oct 2009 12:23:56 +0000 (12:23 +0000)]
Fix a race condition where a mutex was destroyed while sleeping on it.
Found while analyzing a report from julian. It might fix his bug.
Approved by: rrs (mentor)
MFC after: 3 days

14 years agoAdd locking around access to parent node, and bail out when the parent
delphij [Sun, 11 Oct 2009 07:03:56 +0000 (07:03 +0000)]
Add locking around access to parent node, and bail out when the parent
node is already freed rather than panicking the system.

PR: kern/122038
Submitted by: gk
Tested by: pho
MFC after: 1 week

14 years agoVirtualize the pfil hooks so that different jails may chose different
julian [Sun, 11 Oct 2009 05:59:43 +0000 (05:59 +0000)]
Virtualize the pfil hooks so that different jails may chose different
packet filters. ALso allows ipfw to be enabled on on ejail and disabled
on another. In 8.0 it's a global setting.

Sitting aroung in tree waiting to commit for: 2 months
MFC after: 2 months

14 years agoAdd support for Intel G41 chipset
rnoland [Sun, 11 Oct 2009 01:54:00 +0000 (01:54 +0000)]
Add support for Intel G41 chipset

Submitted by: Artyom Mirgorodsky <man@email.com.ua>
MFC after: 3 days

14 years agoAdd pci id's for Intel G41 chipset
rnoland [Sun, 11 Oct 2009 01:51:35 +0000 (01:51 +0000)]
Add pci id's for Intel G41 chipset

Submitted by: Artyom Mirgorodsky <man@email.com.ua>
MFC after: 3 days

14 years agoDocument errno codes added in r144530.
das [Sun, 11 Oct 2009 00:08:55 +0000 (00:08 +0000)]
Document errno codes added in r144530.

14 years agoAtheros EEPROM version 4K. This version is mostly based on version 1.4.
rpaulo [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
dougb [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
trasz [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
kib [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.
kib [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
kib [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.
kib [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
kib [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
kib [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.
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!
eri [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.
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 [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).
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).
des [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
pjd [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 agoExport disk serial numbers for adaX disks.
pjd [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().
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.
trasz [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.
jkim [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.
pjd [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.
pjd [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
trasz [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
rrs [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 [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
delphij [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.
delphij [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 [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 [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
pjd [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.
pjd [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
rwatson [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
zml [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
mav [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
stas [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 [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.
stas [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
jh [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
stas [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
pjd [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).
rpaulo [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 [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 [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
kmacy [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
rwatson [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
rdivacky [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
rwatson [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
rwatson [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 [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$
des [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 [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
dougb [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
rwatson [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.
rwatson [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
delphij [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:
np [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.
hrs [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
trasz [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.
bcr [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.
des [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:
des [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
jkim [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.
rwatson [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.
trasz [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.
rwatson [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.
rwatson [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
rwatson [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.
jh [Mon, 5 Oct 2009 15:05:43 +0000 (15:05 +0000)]
Add myself.

Approved by: trasz (mentor)