]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoUpdate the previous openssl fix. [12:01]
bz [Wed, 30 May 2012 12:01:28 +0000 (12:01 +0000)]
Update the previous openssl fix. [12:01]

Fix a bug in crypt(3) ignoring characters of a passphrase. [12:02]

Security: FreeBSD-SA-12:01.openssl (revised)
Security: FreeBSD-SA-12:02.crypt
Approved by: so (bz, simon)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236149:
dim [Wed, 30 May 2012 06:53:09 +0000 (06:53 +0000)]
MFC r236149:

Pull in r157212 from upstream clang trunk:

  Revert r115805. An array type is required to have a range type,
  however, the range can be unknown for the upper bound.

  Testcase to follow.

  Part of rdar://11457152

This should fix ctfconvert producing error messages during kernel
builds, similar to:

  ERROR: scsi_all.c: die 24561: failed to retrieve array bounds

These were caused by incorrect debug information for flexible array
members of structs.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235851:
kib [Wed, 30 May 2012 04:54:39 +0000 (04:54 +0000)]
MFC r235851:
Add 'cow' keyword to show per-process cow count.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236293 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235850:
kib [Wed, 30 May 2012 04:51:23 +0000 (04:51 +0000)]
MFC r235850:
Calculate the count of per-process cow faults.  Export the count to
userspace using the obscure spare int field in struct kinfo_proc.

MFC r236136:
Fix ki_cow for compat32 binaries.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236135:
davidxu [Wed, 30 May 2012 01:52:53 +0000 (01:52 +0000)]
MFC r236135:

Return EBUSY for PTHREAD_MUTEX_ADAPTIVE_NP too when the mutex could not
be acquired.

PR: 168317

git-svn-id: svn://svn.freebsd.org/base/stable/9@236275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235854
emax [Wed, 30 May 2012 00:38:24 +0000 (00:38 +0000)]
MFC r235854

Tweak condition for disabling allocation from per-CPU buckets in
low memory situation. I've observed a situation where per-CPU
allocations were disabled while there were enough free cached pages.
Basically, cnt.v_free_count was sitting stable at a value lower
than cnt.v_free_min and that caused massive performance drop.

Reviewed by: alc@

git-svn-id: svn://svn.freebsd.org/base/stable/9@236269 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234106, r235751:
jimharris [Tue, 29 May 2012 23:10:10 +0000 (23:10 +0000)]
MFC r234106, r235751:

Queue CCBs internally instead of using CAM_REQUEUE_REQ status.  This fixes
problem where userspace apps such as smartctl fail due to CAM_REQUEUE_REQ
status getting returned when tagged commands are outstanding when smartctl
sends its I/O using the pass(4) interface.

Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@236263 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232598:
trasz [Tue, 29 May 2012 19:47:06 +0000 (19:47 +0000)]
MFC r232598:

Make racct and rctl correctly handle jail renaming.  Previously
they would continue using old name, the one jail was created with.

PR: bin/165207

MFC r235795:

Don't leak locks in prison_racct_modify().

MFC r235803:

Fix use-after-free in kern_jail_set() triggered e.g. by attempts
to clear "persist" flag from empty persistent jail, like this:

jail -c persist=1
jail -n 1 -m persist=0

git-svn-id: svn://svn.freebsd.org/base/stable/9@236253 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC 235915:
jpaetzel [Tue, 29 May 2012 16:21:43 +0000 (16:21 +0000)]
MFC 235915:

Hook up mkulzma to the build.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236244 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235787:
trasz [Tue, 29 May 2012 15:08:35 +0000 (15:08 +0000)]
MFC r235787:

Fix panic with RACCT that could occur in low memory (or out of swap)
situations, due to fork1() calling racct_proc_exit() without calling
racct_proc_fork() first.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236239 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r233628, r234598, r235229, r235831, r226986.
fabient [Tue, 29 May 2012 14:50:21 +0000 (14:50 +0000)]
MFC r233628, r234598, r235229, r235831, r226986.

Add software PMC support.

New kernel events can be added at various location for sampling or counting.
This will for example allow easy system profiling whatever the processor is
with known tools like pmcstat(8).

Simultaneous usage of software PMC and hardware PMC is possible, for example
looking at the lock acquire failure, page fault while sampling on
instructions.

Sponsored by: NETASQ

git-svn-id: svn://svn.freebsd.org/base/stable/9@236238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235693:
gjb [Tue, 29 May 2012 14:35:51 +0000 (14:35 +0000)]
MFC r235693:

Typo and mdoc(7) style fixes.

PR: 168117

git-svn-id: svn://svn.freebsd.org/base/stable/9@236235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235691:
gjb [Tue, 29 May 2012 13:54:53 +0000 (13:54 +0000)]
MFC r235691:

Typo and mdoc(7) style fixes.

PR: 167890

git-svn-id: svn://svn.freebsd.org/base/stable/9@236232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r236042:
kib [Tue, 29 May 2012 08:53:24 +0000 (08:53 +0000)]
MFC r236042:
Clarify the SEEK_HOLE description, it repositions the file pointer.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236224 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC:
delphij [Tue, 29 May 2012 05:43:21 +0000 (05:43 +0000)]
MFC:

commandline -> command line.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235821:
yongari [Tue, 29 May 2012 04:44:51 +0000 (04:44 +0000)]
MFC r235821:
  Don't force max payload size to 128. Root complex and Endpoint will
  negotiate with each other on the TLP payload size so blindly
  forcing the size to 128 can cause a completion error which in turn
  will stop device.

  Reported by: Geans Pin < geanspin <> broadcom dot com >

git-svn-id: svn://svn.freebsd.org/base/stable/9@236218 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235816:
yongari [Tue, 29 May 2012 04:30:02 +0000 (04:30 +0000)]
MFC r235816:
  Make IPMI work in the bce driver even when the interface is
  configured down.  Formerly, IPMI communication was lost whenever the
  interface was not up.  The reason was that the BCE_EMAC_MODE
  register was not configured with the correct media settings.  There
  are two parts to the fix.

  First, resetting the chip in bce_reset() causes the BCE_EMAC_MODE
  register to be initialized to a default value that does not
  necessarily correspond to the actual media settings.  The fix
  implemented here is a bit of a hack.  Ideally, at the end of
  bce_reset() we would poll the PHY to determine the negotiated media,
  and then we would set the BCE_EMAC_MODE register accordingly.  That
  is difficult, since the PHY is abstracted behind the MII layer and is
  not supposed to be queried directly from the MAC driver.  Instead,
  we read the BCE_EMAC_MODE register at the beginning of bce_reset()
  and then restore its media bits to their original values before
  returning.  If IPMI is up and running, then the link is already
  established and the BCE_EMAC_MODE register is already set appropriately
  when bce_reset() is called.  If IPMI is not running, no harm is
  done by preserving the BCE_EMAC_MODE settings.  The driver will set
  the register properly once the interface is configured up and link
  is established.

  Second, bce_miibus_statchg() is sometimes called when the link is
  down.  In that case, the reported media settings are invalid.
  Formerly, the driver used them anyway to setup the BCE_EMAC_MODE
  register.  We now avoid changing any MAC registers unless link is
  active and the reported media settings are valid.

  Submitted by: jdp
  Tested by: jdp

git-svn-id: svn://svn.freebsd.org/base/stable/9@236216 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r230120
alc [Mon, 28 May 2012 23:31:48 +0000 (23:31 +0000)]
MFC r230120
  Neither tmpfs_nocacheread() nor tmpfs_mappedwrite() needs to call
  vm_object_pip_{add,subtract}() on the swap object because the swap
  object can't be destroyed while the vnode is exclusively locked.
  Moreover, even if the swap object could have been destroyed during
  tmpfs_nocacheread() and tmpfs_mappedwrite() this code is broken
  because vm_object_pip_subtract() does not wake up the sleeping thread
  that is trying to destroy the swap object.

  Free invalid pages after an I/O error.  There is no virtue in keeping
  them around in the swap object creating more work for the page daemon.
  (I believe that any non-busy page in the swap object will now always
  be valid.)

  vm_pager_get_pages() does not return a standard errno, so its return
  value should not be returned by tmpfs without translation to an errno
  value.

  There is no reason for the wakeup on vpg in tmpfs_mappedwrite() to
  occur with the swap object locked.

  Eliminate printf()s from tmpfs_nocacheread() and tmpfs_mappedwrite().
  (The swap pager already spams your console if data corruption is
  imminent.)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r229821
alc [Mon, 28 May 2012 22:58:13 +0000 (22:58 +0000)]
MFC r229821
  Correct an error of omission in the implementation of the truncation
  operation on POSIX shared memory objects and tmpfs.  Previously, neither of
  these modules correctly handled the case in which the new size of the object
  or file was not a multiple of the page size.  Specifically, they did not
  handle partial page truncation of data stored on swap.  As a result, stale
  data might later be returned to an application.

  Interestingly, a data inconsistency was less likely to occur under tmpfs
  than POSIX shared memory objects.  The reason being that a different mistake
  by the tmpfs truncation operation helped avoid a data inconsistency.  If the
  data was still resident in memory in a PG_CACHED page, then the tmpfs
  truncation operation would reactivate that page, zero the truncated portion,
  and leave the page pinned in memory.  More precisely, the benevolent error
  was that the truncation operation didn't add the reactivated page to any of
  the paging queues, effectively pinning the page.  This page would remain
  pinned until the file was destroyed or the page was read or written.  With
  this change, the page is now added to the inactive queue.

MFC r230180
  When tmpfs_write() resets an extended file to its original size after an
  error, we want tmpfs_reg_resize() to ignore I/O errors and unconditionally
  update the file's size.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r230044, r233456: style and markup nits
des [Mon, 28 May 2012 21:19:33 +0000 (21:19 +0000)]
MFH r230044, r233456: style and markup nits

git-svn-id: svn://svn.freebsd.org/base/stable/9@236200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: tcpdump 4.2.1.
delphij [Mon, 28 May 2012 19:13:21 +0000 (19:13 +0000)]
MFC: tcpdump 4.2.1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: libpcap 1.2.1.
delphij [Mon, 28 May 2012 07:34:52 +0000 (07:34 +0000)]
MFC: libpcap 1.2.1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236167 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235425:
delphij [Mon, 28 May 2012 04:47:46 +0000 (04:47 +0000)]
MFC r235425:

Sync DLTs with the latest pcap version.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC of 235610
mckusick [Sun, 27 May 2012 21:31:28 +0000 (21:31 +0000)]
MFC of 235610

Add missing `continue' statement at end of case.

Found by:  Kevin Lo (kevlo@)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234691
rstone [Sun, 27 May 2012 18:55:23 +0000 (18:55 +0000)]
MFC r234691

 Implement the D "cpu" variable, which returns curcpu.  I have chosen not
 to follow the example of OpenSolaris and its descendants, which implemented
 cpu as an inline that took a value out of curthread.  At certain points in
 the FreeBSD scheduler curthread->td_oncpu will no longer be valid (in
 particular, just before the thread gets descheduled) so instead I have
 implemented this as its own built-in variable.

 Sponsored by: Sandvine Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236160 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r233552
rstone [Sun, 27 May 2012 14:48:14 +0000 (14:48 +0000)]
MFC r233552

 Instead of only iterating over the set of known SDT probes when sdt.ko is
 loaded and unloaded, also have sdt.ko register callbacks with kern_sdt.c
 that will be called when a newly loaded KLD module adds more probes or
 a module with probes is unloaded.

 This fixes two issues: first, if a module with SDT probes was loaded after
 sdt.ko was loaded, those new probes would not be available in DTrace.
 Second, if a module with SDT probes was unloaded while sdt.ko was loaded,
 the kernel would panic the next time DTrace had cause to try and do
 anything with the no-longer-existent probes.

 This makes it possible to create SDT probes in KLD modules, although there
 are still two caveats: first, any SDT probes in a KLD module must be part
 of a DTrace provider that is defined in that module.  At present DTrace
 only destroys probes when the provider is destroyed, so you can still
 panic the system if a KLD module creates new probes in a provider from a
 different module(including the kernel) and then unload the the first module.

 Second, the system will panic if you unload a module containing SDT probes
 while there is an active D script that has enabled those probes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236152 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235864:
dim [Sun, 27 May 2012 12:01:04 +0000 (12:01 +0000)]
MFC r235864:

Upgrade our copy of llvm/clang to 3.1 release.  Release notes can be
found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html

git-svn-id: svn://svn.freebsd.org/base/stable/9@236144 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234740
rmacklem [Sun, 27 May 2012 01:24:08 +0000 (01:24 +0000)]
MFC: r234740
Fix a leak of namei lookup path buffers that occurs when a
ZFS volume is exported via the new NFS server. The leak occurred
because the new NFS server code didn't handle the case where
a file system sets the SAVENAME flag in its VOP_LOOKUP() and
ZFS does this for the DELETE case.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236134 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agonit: use >= 1000013 instead of > 1000012
des [Sat, 26 May 2012 23:48:56 +0000 (23:48 +0000)]
nit: use >= 1000013 instead of > 1000012

git-svn-id: svn://svn.freebsd.org/base/stable/9@236129 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMake yacc a bootstrap tool if building on head, since the new yacc is
des [Sat, 26 May 2012 23:42:52 +0000 (23:42 +0000)]
Make yacc a bootstrap tool if building on head, since the new yacc is
not 100% backward compatible.  Also, build yacc before lex, because lex
requires yacc but not vice versa.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236128 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r228513
alc [Sat, 26 May 2012 22:47:56 +0000 (22:47 +0000)]
MFC r228513
  Create large page mappings in pmap_map().

git-svn-id: svn://svn.freebsd.org/base/stable/9@236123 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235297, r235316:
mdf [Sat, 26 May 2012 20:13:24 +0000 (20:13 +0000)]
MFC r235297, r235316:

Add a -v and -N option to kenv(1), so it can be more easily used in
scripts the way sysctl(8) is.  The -N option, like in sysctl(8),
displays only the kenv names, not their values.  The -v option prints an
individual kenv variable name with its value as name="value".  This is
the inverse of sysctl(8)'s -n flag, since the default behaviour of
kenv(1) is already like sysctl(8) -n.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236118 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r226625, 226632: document what openpam_static.c is for
des [Sat, 26 May 2012 18:20:30 +0000 (18:20 +0000)]
MFH r226625, 226632: document what openpam_static.c is for

git-svn-id: svn://svn.freebsd.org/base/stable/9@236116 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r227798, r227933: simplify build by using STATIC_CFLAGS
des [Sat, 26 May 2012 17:56:54 +0000 (17:56 +0000)]
MFH r227798, r227933: simplify build by using STATIC_CFLAGS

git-svn-id: svn://svn.freebsd.org/base/stable/9@236115 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r227797, 227932: add {STATIC,SHARED}_{C,CXX}FLAGS
des [Sat, 26 May 2012 17:53:35 +0000 (17:53 +0000)]
MFH r227797, 227932: add {STATIC,SHARED}_{C,CXX}FLAGS

git-svn-id: svn://svn.freebsd.org/base/stable/9@236114 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r230059: improve examples
des [Sat, 26 May 2012 17:38:55 +0000 (17:38 +0000)]
MFH r230059: improve examples

git-svn-id: svn://svn.freebsd.org/base/stable/9@236113 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r234311: utf8 and drop middle name
des [Sat, 26 May 2012 17:37:07 +0000 (17:37 +0000)]
MFH r234311: utf8 and drop middle name

git-svn-id: svn://svn.freebsd.org/base/stable/9@236112 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r234685: utf8 and drop middle name
des [Sat, 26 May 2012 17:28:57 +0000 (17:28 +0000)]
MFH r234685: utf8 and drop middle name

git-svn-id: svn://svn.freebsd.org/base/stable/9@236111 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r234837: avoid busy-loop on slow connections when no timeout is set.
des [Sat, 26 May 2012 17:08:01 +0000 (17:08 +0000)]
MFH r234837: avoid busy-loop on slow connections when no timeout is set.
MFH r234838: don't reuse credentials when redirected to a different host.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236108 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r233648: cosmetic
des [Sat, 26 May 2012 16:42:47 +0000 (16:42 +0000)]
MFH r233648: cosmetic

git-svn-id: svn://svn.freebsd.org/base/stable/9@236105 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r230478: fix nits in already-merged r230307.
des [Sat, 26 May 2012 16:37:43 +0000 (16:37 +0000)]
MFH r230478: fix nits in already-merged r230307.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236104 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFH r225813,r225814,r226537: cosmetic
des [Sat, 26 May 2012 16:34:39 +0000 (16:34 +0000)]
MFH r225813,r225814,r226537: cosmetic

git-svn-id: svn://svn.freebsd.org/base/stable/9@236103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235332
rmacklem [Sat, 26 May 2012 13:12:14 +0000 (13:12 +0000)]
MFC: r235332
PR# 165923 reported intermittent write failures for dirty
memory mapped pages being written back on an NFS mount.
Since any thread can call VOP_PUTPAGES() to write back a
dirty page, the credentials of that thread may not have
write access to the file on an NFS server. (Often the uid
is 0, which may be mapped to "nobody" in the NFS server.)
Although there is no completely correct fix for this
(NFS servers check access on every write RPC instead of at
open/mmap time), this patch avoids the common cases by
holding onto a credential that recently opened the file
for writing and uses that credential for the write RPCs
being done by VOP_PUTPAGES() for both NFS clients.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236096 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235474:
bz [Sat, 26 May 2012 10:24:30 +0000 (10:24 +0000)]
MFC r235474:

 Switch to a standard 2 clause BSD license (from bsd-style-copyright).

 Approved by: Myricom Inc. (gallatin)
 Approved by: Intel Corporation (jfv)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236091 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234524
marius [Sat, 26 May 2012 09:31:23 +0000 (09:31 +0000)]
MFC: r234524

o Fixes:
  - When switching to 4-bit operation, send a SET_CLR_CARD_DETECT command
    to disconnect the card-detect pull-up resistor from the DAT3 line before
    sending the SET_BUS_WIDTH command.
  - Add the missing "reserved" zero entry to the mantissa table used to
    decode various CSD fields. This was causing SD cards to report that they
    could run at 30 MHz instead of the maximum 25 MHz mandated in the spec.
o Enhancements:
  - At the MMC layer, format various info from the CID into a string that
    uniquely identifies the card instance (manufacturer number, serial
    number, product name and revision, etc). Export it as an instance
    variable.
  - At the MMCSD layer, display the formatted card ID string, and also
    report the clock speed of the hardware (not the card's max speed), and
    the number of bits and number of blocks per transfer. It comes out like
    this now:
    mmcsd0: 968MB <SD SD01G 8.0 SN 276886905 MFG 08/2008 by 3 SD> at mmc0
    22.5MHz/4bit/128-block
o Use DEVMETHOD_END.
o Use NULL instead of 0 for pointers.

PR: 156496
Submitted by: Ian Lepore

git-svn-id: svn://svn.freebsd.org/base/stable/9@236089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234901
marius [Sat, 26 May 2012 09:16:37 +0000 (09:16 +0000)]
MFC: r234901

- Add missing locking in at91_usart_getc().
- Align the RX buffers on the cache line size, otherwise the requirement
  of partial cache line flushes on every are pretty much guaranteed. [1]
- Make the code setting the RX timeout match its comment (apparently,
  start and stop bits were missed in the previous calculation). [1]
- Cover the busdma operations in at91_usart_bus_{ipend,transmit}() with
  the hardware mutex, too, so these don't race against each other.
- In at91_usart_bus_ipend(), reduce duplication in the code dealing with
  TX interrupts.
- In at91_usart_bus_ipend(), turn the code dealing with RX interrupts
  into an else-if cascade in order reduce its complexity and to improve
  its run-time behavior.
- In at91_usart_bus_ipend(), add missing BUS_DMASYNC_PREREAD calls on
  the RX buffer map before handing things over to the hardware again. [1]
- In at91_usart_bus_getsig(), used a variable of sufficient width for
  storing the contents of USART_CSR.
- Use KOBJMETHOD_END.
- Remove an unused header.

Submitted by: Ian Lepore [1]
Reviewed by: Ian Lepore

git-svn-id: svn://svn.freebsd.org/base/stable/9@236088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234561
marius [Sat, 26 May 2012 09:13:24 +0000 (09:13 +0000)]
MFC: r234561

Interrupts must be disabled while handling a partial cache line flush,
as otherwise the interrupt handling code may modify data in the non-DMA
part of the cache line while we have it stashed away in the temporary
stack buffer, then we end up restoring a stale value.

PR: 160431
Submitted by: Ian Lepore

git-svn-id: svn://svn.freebsd.org/base/stable/9@236085 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234560
marius [Sat, 26 May 2012 09:11:45 +0000 (09:11 +0000)]
MFC: r234560

- Add support for MCI1 revision 2xx controllers and a work-around for their
  "Data Write Operation and number of bytes" erratum.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234293
marius [Sat, 26 May 2012 09:08:30 +0000 (09:08 +0000)]
MFC: r234293

Generate an obviously missing STOP when having finished transmitting data.
This fixes communication with PCF8563.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234291, r234292
marius [Sat, 26 May 2012 09:05:45 +0000 (09:05 +0000)]
MFC: r234291, r234292

Add support for the Atmel SAM9XE family of microcontrollers, which
consist of a ARM926EJ-S processor core with up to 512 Kbytes of on-chip
flash. Tested with SAM9XE512.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236081 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234281
marius [Sat, 26 May 2012 09:03:14 +0000 (09:03 +0000)]
MFC: r234281

- Try to bring these files closer to style(9).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234248
marius [Sat, 26 May 2012 08:58:27 +0000 (08:58 +0000)]
MFC: r234248

Add a driver for the NXP (Philips) PCF8563 RTC.

Obtained from: NetBSD (pcf8563reg.h)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236078 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234898, r235207
marius [Sat, 26 May 2012 08:54:26 +0000 (08:54 +0000)]
MFC: r234898, r235207

Add initial support for booting from ZFS on sparc64. At least on Sun Fire
V100, the firmware is known to be broken and not allowing to simultaneously
open disk devices, causing attempts to boot from a mirror or RAIDZ to cause
a crash. This will be worked around later. The firmwares of newer sun4u models
don't seem to exhibit this problem though.

PR:             165025
Submitted by:   Gavin Mu

git-svn-id: svn://svn.freebsd.org/base/stable/9@236076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234936 (emaste)
thompsa [Sat, 26 May 2012 08:44:26 +0000 (08:44 +0000)]
MFC r234936 (emaste)

 Relax restriction on direct tx to child ports

 Lagg(4) restricts the type of packet that may be sent directly to a child
 port, to avoid undesired output from accidental misconfiguration.
 Previously only ETHERTYPE_PAE was permitted.

 BPF writes to a lagg(4) child port are presumably intentional, so just
 allow them, while still blocking other packets that should take the
 aggregation path.

PR: kern/138620

git-svn-id: svn://svn.freebsd.org/base/stable/9@236074 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r231130 (pjd)
thompsa [Sat, 26 May 2012 08:41:17 +0000 (08:41 +0000)]
MFC r231130 (pjd)

 Allow to set if_bridge(4) sysctls from /boot/loader.conf.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236071 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232321
thompsa [Sat, 26 May 2012 08:25:25 +0000 (08:25 +0000)]
MFC r232321

 Correct the description for CTLFLAG_TUN and CTLFLAG_RDTUN, the declaring of a
 system tunable has never been implemented. This flag is only used by sysctl(8)
 to provide a helpful error message.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232009
thompsa [Sat, 26 May 2012 08:21:11 +0000 (08:21 +0000)]
MFC r232009

 Make it clear that fec is just an alias

git-svn-id: svn://svn.freebsd.org/base/stable/9@236065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232638
thompsa [Sat, 26 May 2012 08:18:46 +0000 (08:18 +0000)]
MFC r232638

 Fix typo in lagg options.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236064 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235147
thompsa [Sat, 26 May 2012 07:44:35 +0000 (07:44 +0000)]
MFC r235147

 Do not reinitialise the interface if it is already running, this prevents the
 bootp+nfs code from working as it calls init on each dhcp send and rx fails to
 start in time.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236054 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235144
thompsa [Sat, 26 May 2012 07:44:00 +0000 (07:44 +0000)]
MFC r235144

 The DEVICE_POLLING dereference of sc->tsec_ifp needs to be checked for null
 first or this will panic. Condense three blocks that check sc->tsec_ifp into
 one while I am here.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236053 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234488
thompsa [Sat, 26 May 2012 07:43:17 +0000 (07:43 +0000)]
MFC r234488

 Move the interface media check to a taskqueue, some interfaces (usb) sleep
 during SIOCGIFMEDIA and we were holding locks.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236052 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234487
thompsa [Sat, 26 May 2012 07:42:32 +0000 (07:42 +0000)]
MFC r234487

 Add linkstate to bridge(4), set the link to up when at least one underlying
 interface is up, otherwise the link is down.

 This, among other things, allows carp to work on a bridge.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236051 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234163
thompsa [Sat, 26 May 2012 07:41:05 +0000 (07:41 +0000)]
MFC r234163

 Set the proto to LAGG_PROTO_NONE before calling the detach routine so packets
 are discarded, this is an issue because lacp drops the lock which may allow
 network threads to access freed memory. Expand the lock coverage so the
 detach/attach happen atomically.

Submitted by: Andrew Boyer (earlier version)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232629,r232640
thompsa [Sat, 26 May 2012 07:39:52 +0000 (07:39 +0000)]
MFC r232629,r232640

 Add the ability to set which packet layers are used for the load balance hash
 calculation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232118
thompsa [Sat, 26 May 2012 07:35:44 +0000 (07:35 +0000)]
MFC r232118

 Only look for a usable MAC address for the bridge ID from ports within our
 bridge, this allows us to have more than one independent bridge in the same
 STP domain.

PR: kern/164369
Submitted by: Nikos Vassiliadis (earlier version)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236048 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232014,r232030,r232070
thompsa [Sat, 26 May 2012 07:34:46 +0000 (07:34 +0000)]
MFC r232014,r232030,r232070

- bstp_input() always consumes the packet so remove the mbuf handling dance
  around it.
- Now that network interfaces advertise if they support linkstate notifications
  we do not need to perform a media ioctl every 15 seconds.
- Indicate this function decrements the timer as well as testing for expiry.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236047 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235681
marius [Fri, 25 May 2012 19:56:40 +0000 (19:56 +0000)]
MFC: r235681

Rewrite nd6_sysctl_{d,p}rlist() to avoid misaligned accesses to char arrays
casted to structs by getting rid of these buffers entirely. In r169832, it
was tried to paper over this issue by 32-bit aligning the buffers. Depending
on compiler optimizations that still was insufficient for 64-bit architectures
with strong alignment requirements though.
While at it, add comments regarding the total lack of locking in this area.

Tested by: bz
Reviewed by: bz (slightly earlier version), yongari (earlier version)

git-svn-id: svn://svn.freebsd.org/base/stable/9@236021 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r229413
marius [Fri, 25 May 2012 17:56:27 +0000 (17:56 +0000)]
MFC: r229413

Import compiler-rt r147467.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r228919
marius [Fri, 25 May 2012 17:50:50 +0000 (17:50 +0000)]
MFC: r228919

Add locally implemented atomic intrinsics to libcompiler_rt.

The built-in atomic operations are not implemented in our version of GCC
4.2 for the ARM and MIPS architectures. Instead of emitting locked
instructions, they generate calls to functions that can be implemented
in the C runtime.

Only implement the atomic operations that are used by <stdatomic.h> for
datatype sizes that are supported by atomic(9). This means that on these
architectures, we can only use atomic operations on 32-bits and 64-bits
variables, which is typically sufficient.

This makes <stdatomic.h> work on all architectures except MIPS, since
MIPS still uses libgcc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236016 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r229135
marius [Fri, 25 May 2012 17:48:45 +0000 (17:48 +0000)]
MFC: r229135

Upgrade libcompiler_rt to upstream revision 147390.

This version of libcompiler_rt adds support for __mulo[sdt]i4(), which
computes a multiply and its overflow flag. There are also a lot of
cleanup fixes to headers that don't really affect us.

Updating to this revision should make it a bit easier to contribute
changes back to the LLVM developers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236015 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235487
marius [Fri, 25 May 2012 17:20:00 +0000 (17:20 +0000)]
MFC: r235487

Switch sparc64 to using libcompiler_rt; since r230021 (MFC'ed to stable/9 in
r236012) we have a workaround in place allowing it to be used there and since
r235388 (MFC'ed to stable/9 in r236002) we also have usable div/mod
optimizations like libgcc has.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236014 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r230021
marius [Fri, 25 May 2012 17:15:53 +0000 (17:15 +0000)]
MFC: r230021

Add a workaround to prevent endless recursion in compiler-rt.

SPARC and MIPS CPUs don't have special instructions to count
leading/trailing zeroes. The compiler-rt library provides fallback
rountines for these. The 64-bit routines, __clzdi2 and __ctzdi2, are
implemented as simple wrappers around the compiler built-in
__builtin_clz(), assuming these will expand to either 32-bit
CPU instructions or calls to __clzsi2 and __ctzsi2.

Unfortunately, our GCC 4.2 probably thinks that because the operand is
stored in a 64-bit register, it might just be a better idea to invoke
its 64-bit equivalent, simply resulting into endless recursion. Fix this
by defining __builtin_clz and __builtin_ctz to __clzsi2 and __ctzsi2
explicitly.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236012 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r222656
marius [Fri, 25 May 2012 17:14:47 +0000 (17:14 +0000)]
MFC: r222656

Upgrade libcompiler_rt from revision 117047 to 132478.

It seems there have only been a small amount to the compiler-rt source
code in the mean time. I'd rather have the code in sync as much as
possible by the time we release 9.0. Changes:

- The libcompiler_rt library is now dual licensed under both the
  University of Illinois "BSD-Like" license and the MIT license.

- Our local modifications for using .hidden instead of .private_extern
  have been upstreamed, meaning our changes to lib/assembly.h can now be
  reverted.

- A possible endless recursion in __modsi3() has been fixed.

- Support for ARM EABI has been added, but it has no effect on FreeBSD
  (yet).

- The functions __udivmodsi4 and __divmodsi4 have been added.

Requested by: many, including bf@ and Pedro Giffuni

git-svn-id: svn://svn.freebsd.org/base/stable/9@236011 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235235-235237:
bschmidt [Fri, 25 May 2012 16:09:06 +0000 (16:09 +0000)]
MFC r235235-235237:
Update man page due to import of RT2800/RT3000 support.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236005 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232946,232958,235233:
bschmidt [Fri, 25 May 2012 16:07:39 +0000 (16:07 +0000)]
MFC r232946,232958,235233:

r232946:
Update the rt2860's firmware and add a Makefile for the module. While
here remove the ucode header file which was used to generate the fw files
but by now is outdated.

r232958:
Import the latest microcode.h which was used to generate the current
firmware files and adjust the Makefile.

r235233:
Add support for Ralink RT2800/RT3000 chipsets.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236004 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235389
marius [Fri, 25 May 2012 15:16:40 +0000 (15:16 +0000)]
MFC: r235389

Regenerate after r235388 (MFC'ed to stable/9 in r236002).

git-svn-id: svn://svn.freebsd.org/base/stable/9@236003 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235388
marius [Fri, 25 May 2012 15:15:25 +0000 (15:15 +0000)]
MFC: r235388

- Get rid of debugging support in order to get rid of the V8-specific C
  compiler frame size used there so this whole thing is V8/V9-agnostic.
- Use 32-bit function alignment as GCC does when using UltraSPARC I or
  higher optimizations.
- Don't waste delay slots when possible.

git-svn-id: svn://svn.freebsd.org/base/stable/9@236002 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r230025
marius [Fri, 25 May 2012 15:14:22 +0000 (15:14 +0000)]
MFC: r230025

Add SPARC64 version of div/mod written in assembly.

This version is similar to the code shipped with libgcc. It is based on
the code from the SPARC64 architecture manual, provided without any
restrictions.

Tested by: flo@

git-svn-id: svn://svn.freebsd.org/base/stable/9@236001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234897
marius [Fri, 25 May 2012 14:57:01 +0000 (14:57 +0000)]
MFC: r234897

Add a command for showing the heap usage.

PR: 165025
Submitted by: Gavin Mu

git-svn-id: svn://svn.freebsd.org/base/stable/9@235997 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234789
marius [Fri, 25 May 2012 14:54:12 +0000 (14:54 +0000)]
MFC: r234789

Add multiple inclusion protection.

PR: 165025
Submitted by: Gavin Mu

git-svn-id: svn://svn.freebsd.org/base/stable/9@235995 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r234348
marius [Fri, 25 May 2012 14:40:56 +0000 (14:40 +0000)]
MFC: r234348

Turn on PREEMPTION by default. After fixing several bugs over time, the
last show-stopper keeping PREEMPTION from being usable on sparc64 should
have been dealt with in r230662 (MFC'ed to stable/9 in r230662).
At least on 2-way systems, PREEMPTION causes a little bit of a degradation
in worldstone performance. However, FreeBSD seems to have started building
up regressions in !PREEMPTION cases so sparc64 better should not be an
oddball in this regard.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235992 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235603:
kib [Fri, 25 May 2012 08:55:59 +0000 (08:55 +0000)]
MFC r235603:
Do not double-reference the found vm object in cdev_pager_lookup().
vm_pager_object_lookup() already referenced the object.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235983 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r233611:
fabient [Fri, 25 May 2012 07:25:30 +0000 (07:25 +0000)]
MFC r233611:
- Support inlined location in calltree output.
  In case of multiple level of inlining all the locations are flattened.
  Require recent binutils/addr2line (head works or binutils from ports
  with the right $PATH order).
- Multiple fixes in the calltree output (recursion case, ...)
- Fix the calltree top view that previously hide some shared nodes.

Tested with Kcachegrind(kdesdk4)/qcachegrind(head).

Sponsored by: NETASQ

git-svn-id: svn://svn.freebsd.org/base/stable/9@235977 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235773:
dim [Fri, 25 May 2012 06:41:08 +0000 (06:41 +0000)]
MFC r235773:

Correct use_screen() and use_window() prototypes in curs_threads(3x).

Submitted by: Yanhui Shen <shen.elf@gmail.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@235974 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: netcat from OpenBSD 5.1.
delphij [Fri, 25 May 2012 04:42:18 +0000 (04:42 +0000)]
MFC: netcat from OpenBSD 5.1.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235599:
ae [Fri, 25 May 2012 04:26:14 +0000 (04:26 +0000)]
MFC r235599:
  Introduce new device flag G_MIRROR_DEVICE_FLAG_TASTING. It should
  protect geom from destroying while it is tasting.

MFC r235600:
  Prevent removing of the last active component from a mirror.

PR: kern/154860
Reviewed by: pjd
Tested by: Eugene Grosbein

git-svn-id: svn://svn.freebsd.org/base/stable/9@235968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235623
pfg [Fri, 25 May 2012 03:07:20 +0000 (03:07 +0000)]
MFC: r235623

Bring in a subset of gcc fixes that were back ported to
the GCC 4.1 branch and are available under GPLv2.

Reviewed by: mm
Approved by: jhb (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@235965 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235222:
mm [Fri, 25 May 2012 01:19:28 +0000 (01:19 +0000)]
MFC r235222:
Import illumos changeset 13686:4bc0783f6064
2703 add mechanism to report ZFS send progress

If the zfs send command is used with the -v flag, the amount of bytes
transmitted is reported in per second updates.

References:
https://www.illumos.org/issues/2703

Obtained from: illumos (issue #2703)

git-svn-id: svn://svn.freebsd.org/base/stable/9@235951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232614:
bz [Thu, 24 May 2012 19:24:31 +0000 (19:24 +0000)]
MFC r232614:

 Provide wbwd(4), a driver for the watchdog timer found on various
 Winbond Super I/O chips.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235926 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoAdd missing \n when generating pkg.conf
bapt [Thu, 24 May 2012 17:10:54 +0000 (17:10 +0000)]
Add missing \n when generating pkg.conf

Reported by: beat
Approved by: des (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@235919 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r235634
sbruno [Thu, 24 May 2012 16:11:13 +0000 (16:11 +0000)]
MFC r235634

Decode new battery status indications.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235914 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234383:
trasz [Thu, 24 May 2012 15:55:41 +0000 (15:55 +0000)]
MFC r234383:

Stop treating system processes as special.  This fixes panics
like the one triggered by this:

# kldload geom_vinum
# pwait `pgrep -S gv_worker` &
# kldunload geom_vinum

or this:

GEOM_JOURNAL: Shutting down geom gjournal 3464572051.
panic: destroying non-empty racct: 1 allocated for resource 6

which were tracked by jh@ to be caused by checking p->p_flag,
while it wasn't initialised yet.  Basically, during fork, the code
checked p_flag, concluded the process isn't marked as P_SYSTEM,
incremented the counter, and later on, when exiting, checked that
the process was marked as P_SYSTEM, and thus didn't decrement it.

Also, I believe there wasn't any good reason for checking P_SYSTEM
in the first place.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235913 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC: r235568
rmacklem [Thu, 24 May 2012 12:28:11 +0000 (12:28 +0000)]
MFC: r235568
A problem with the NFSv4 server was reported by Andrew Leonard
to freebsd-fs@, where the setfacl of an NFSv4 acl would fail.
This was caused by the VOP_ACLCHECK() call for ZFS replying
EOPNOTSUPP. After discussion with rwatson@, it was determined
that a call to VOP_ACLCHECK() before doing VOP_SETACL() is not
required. This patch fixes the problem by deleting the
VOP_ACLCHECK() call.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235906 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r226234:
trasz [Thu, 24 May 2012 11:50:14 +0000 (11:50 +0000)]
MFC r226234:

Make unionfs also clear VAPPEND when clearing VWRITE, since VAPPEND
is just a modifier for VWRITE.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235902 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234380:
trasz [Thu, 24 May 2012 11:46:39 +0000 (11:46 +0000)]
MFC r234380:

Enforce upper bound on the input buffer length.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235901 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234381:
trasz [Thu, 24 May 2012 11:43:33 +0000 (11:43 +0000)]
MFC r234381:

Fix panic, triggered like this: "int main() { thr_exit(); }"

git-svn-id: svn://svn.freebsd.org/base/stable/9@235900 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r232782:
trasz [Thu, 24 May 2012 10:31:17 +0000 (10:31 +0000)]
MFC r232782:

Remove useless thread_{lock,unlock}() in raccd.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235893 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r225868:
trasz [Thu, 24 May 2012 10:20:23 +0000 (10:20 +0000)]
MFC r225868:

Make ps(1) automatically size its column widths.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r234385:
trasz [Thu, 24 May 2012 10:02:42 +0000 (10:02 +0000)]
MFC r234385:

Fix bug where NFSv4 ACL enforcement code wouldn't unconditionally
allow the owner to read and write ACL and file attributes when there
was no entry with subject matching the owner.  In other words,
'getfacl meh' shouldn't fail for the owner if the ACL looks like this:

# file: meh
# owner: trasz
# group: wheel
         user:root:------a-------:------:allow

git-svn-id: svn://svn.freebsd.org/base/stable/9@235890 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

11 years agoMFC r226043:
trasz [Thu, 24 May 2012 09:59:58 +0000 (09:59 +0000)]
MFC r226043:

Remove assertion against empty NFSv4 ACLs.  An empty ACL is not exactly
valid - we don't allow for setting it on a file, for example - but it's
not something we should assert on.

For STABLE kernel, it changes nothing, because it's not compiled with
INVARIANTS.  If it was, it would fix crashes.  It also fixes an assert
in libc encountered with NFSv4 without nfsuserd(8) running.

git-svn-id: svn://svn.freebsd.org/base/stable/9@235889 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f