]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoAvoid LOR between vfs_busy() lock and covered vnode lock on quotaon().
kib [Sun, 8 Jan 2012 23:06:53 +0000 (23:06 +0000)]
Avoid LOR between vfs_busy() lock and covered vnode lock on quotaon().
The vfs_busy() is after covered vnode lock in the global lock order, but
since quotaon() does recursive VFS call to open quota file, we usually
end up locking covered vnode after mp is busied in sys_quotactl().

Change the interface of VFS_QUOTACTL(), requiring that mp was unbusied
by fs code, and do not try to pick up vfs_busy() reference in ufs quotaon,
esp. if vfs_busy cannot succeed due to unmount being performed.

Reported and tested by: pho
MFC after: 1 week

12 years agoThere is no longer a need to abstract ${rcvar_manpage} as we are not
dougb [Sun, 8 Jan 2012 20:25:29 +0000 (20:25 +0000)]
There is no longer a need to abstract ${rcvar_manpage} as we are not
attempting to maintain compatibility with NetBSD for some years now.

12 years agoCorrect an error of omission in the implementation of the truncation
alc [Sun, 8 Jan 2012 20:09:26 +0000 (20:09 +0000)]
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.

Discussed with: jhb
Reviewed by: kib (an earlier version)
MFC after: 3 weeks

12 years agoFix a typo. (s/nessesary/necessary/)
hrs [Sun, 8 Jan 2012 18:48:36 +0000 (18:48 +0000)]
Fix a typo.  (s/nessesary/necessary/)

12 years agoMake it possible to use alternative source hardware address
glebius [Sun, 8 Jan 2012 17:25:15 +0000 (17:25 +0000)]
Make it possible to use alternative source hardware address
in the ARP datagram generated by arprequest(). If caller doesn't
supply the address, then it is either picked from CARP or hardware
address of the interface is taken.

While here, make several minor fixes:

- Hold IF_ADDR_RLOCK(ifp) while traversing address list.
- Remove not true comment.
- Access internet address and mask via in_ifaddr fields,
  rather than ifaddr.

12 years agoProvide IA_MASKSIN() macro similar to IA_SIN() and IA_DSTSIN().
glebius [Sun, 8 Jan 2012 17:20:29 +0000 (17:20 +0000)]
Provide IA_MASKSIN() macro similar to IA_SIN() and IA_DSTSIN().

12 years agoCopy ifa->if_data to ifam->ifam_data. This was forgotten in r228571.
glebius [Sun, 8 Jan 2012 17:11:53 +0000 (17:11 +0000)]
Copy ifa->if_data to ifam->ifam_data. This was forgotten in r228571.

Submitted by: bz

12 years agoMove arprequest() declaration to if_ether.h.
glebius [Sun, 8 Jan 2012 13:34:00 +0000 (13:34 +0000)]
Move arprequest() declaration to if_ether.h.

12 years agoDon't include <sys/timeb.h>.
ed [Sun, 8 Jan 2012 12:38:41 +0000 (12:38 +0000)]
Don't include <sys/timeb.h>.

Including this header file causes a compilation warning. The code builds
perfectly fine without this header file.

12 years agoProperly sort functions by name.
ed [Sun, 8 Jan 2012 12:04:22 +0000 (12:04 +0000)]
Properly sort functions by name.

12 years agoFix spelling of C11 and sort functions by name.
ed [Sun, 8 Jan 2012 12:03:46 +0000 (12:03 +0000)]
Fix spelling of C11 and sort functions by name.

12 years agoTwo other places where we can use WEAK_ALIAS.
andreast [Sun, 8 Jan 2012 11:57:38 +0000 (11:57 +0000)]
Two other places where we can use WEAK_ALIAS.

12 years agoAdd an SCTP sysctl "blackhole", similar to the one for TCP.
tuexen [Sun, 8 Jan 2012 09:56:24 +0000 (09:56 +0000)]
Add an SCTP sysctl "blackhole", similar to the one for TCP.
If set to 1, no ABORT is sent back in response to an incoming
INIT. If set to 2, no ABORT is sent back in response to
an out of the blue packet. If set to 0 (the default), ABORTs
are sent.
Discussed with rrs@.

MFC after: 1 month.

12 years agoFix relocations for MIPS64:
gonzo [Sun, 8 Jan 2012 05:44:19 +0000 (05:44 +0000)]
Fix relocations for MIPS64:
    - Use Elf32_Addr as default, the only field that is
        64 bitw wide is R_MIPS_64
    - Add R_MIPS_HIGHER and R_MIPS_HGHEST handlers
    - Handle R_MIPS_HI16 and R_MIPS_LO16 for both .rel and
        .rela sections

12 years agoopt_inet6.h was missing from some files in the new NFS subsystem.
rmacklem [Sun, 8 Jan 2012 01:54:46 +0000 (01:54 +0000)]
opt_inet6.h was missing from some files in the new NFS subsystem.
The effect of this was, for clients mounted via inet6 addresses,
that the DRC cache would never have a hit in the server. It also
broke NFSv4 callbacks when an inet6 address was the only one available
in the client. This patch fixes the above, plus deletes opt_inet6.h
from a couple of files it is not needed for.

MFC after: 2 weeks

12 years agoMake these two files conditionally build on UFS_ACL, as it doesn't
adrian [Sun, 8 Jan 2012 00:55:22 +0000 (00:55 +0000)]
Make these two files conditionally build on UFS_ACL, as it doesn't
seem to be used elsewhere.

Since UFS_ACL is enabled by default for GENERIC kernels, this shouldn't
break anything - but please beat me to fix things if it does.

This reduces the footprint of the kernel on small embedded systems
(think <1MB flash for the compressed kernel image) just enough to
actually fit.

12 years agoFix DDB x/i addr[,count] command for count > 1 case
gonzo [Sun, 8 Jan 2012 00:34:39 +0000 (00:34 +0000)]
Fix DDB x/i addr[,count] command for count > 1 case

12 years agoCorrect comment for the IPv6 case to say "traffic class" not "TOS"
bz [Sat, 7 Jan 2012 23:41:38 +0000 (23:41 +0000)]
Correct comment for the IPv6 case to say "traffic class" not "TOS"
as pointed out back in 2009.

MFC after: 3 days

12 years ago- Fix how hexdump parses escape strings
eadler [Sat, 7 Jan 2012 23:15:21 +0000 (23:15 +0000)]
- Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

PR: bin/144722
Submitted by: gcooper
Approved by: rpaulo
Obtained from: NetBSD
MFC after: 1 week

12 years ago.. the AR5416 HAL code touches the MIMO parts in HAL_CHANNEL,
adrian [Sat, 7 Jan 2012 20:23:05 +0000 (20:23 +0000)]
.. the AR5416 HAL code touches the MIMO parts in HAL_CHANNEL,
so this is also needed.

Pointed out by: bz

12 years agoCommit a temporary workaround for people who are building kernels
adrian [Sat, 7 Jan 2012 20:13:55 +0000 (20:13 +0000)]
Commit a temporary workaround for people who are building kernels
where they've disabled all the wireless devices/framework.

This is just a build workaround. If you're actively using wireless,
you must still define AH_SUPPORT_AR5416 as I'm not sure what else
will break!

The real solution is to make the module build depend if AH_SUPPORT_AR5416
is defined, as well as make the 11n code in if_ath_tx.c and if_ath_tx_ht.c
completely optional (maybe depend upon ATH_SUPPORT_11N.)

12 years agoFix the broken module build I introduced earlier.
adrian [Sat, 7 Jan 2012 19:38:26 +0000 (19:38 +0000)]
Fix the broken module build I introduced earlier.

12 years agoConvert files to UTF-8 and add some copyright markers where missing.
uqs [Sat, 7 Jan 2012 16:13:56 +0000 (16:13 +0000)]
Convert files to UTF-8 and add some copyright markers where missing.

12 years agoSpelling fixes for etc/
uqs [Sat, 7 Jan 2012 16:10:32 +0000 (16:10 +0000)]
Spelling fixes for etc/

12 years agoSpelling fixes for bin/
uqs [Sat, 7 Jan 2012 16:10:23 +0000 (16:10 +0000)]
Spelling fixes for bin/

12 years agoSpelling fixes for include/
uqs [Sat, 7 Jan 2012 16:10:15 +0000 (16:10 +0000)]
Spelling fixes for include/

12 years agoSpelling fixes for libexec/
uqs [Sat, 7 Jan 2012 16:09:54 +0000 (16:09 +0000)]
Spelling fixes for libexec/

12 years agoSpelling fixes for release/
uqs [Sat, 7 Jan 2012 16:09:43 +0000 (16:09 +0000)]
Spelling fixes for release/

12 years agoSpelling fixes for sbin/
uqs [Sat, 7 Jan 2012 16:09:33 +0000 (16:09 +0000)]
Spelling fixes for sbin/

12 years agoMerge from OpenBSD:
glebius [Sat, 7 Jan 2012 14:39:45 +0000 (14:39 +0000)]
Merge from OpenBSD:
  revision 1.170
  date: 2011/10/30 23:04:38;  author: mikeb;  state: Exp;  lines: +6 -7
  Allow setting big MTU values on the pfsync interface but not larger
  than the syncdev MTU.  Prompted by the discussion with and tested
  by Maxim Bourmistrov;  ok dlg, mpf

Consistently use sc_ifp->if_mtu in the MTU check throughout the
module. This backs out r228813.

12 years agoRetire the SCTP sysctl "strict_init". We always perform the validation
tuexen [Sat, 7 Jan 2012 14:04:00 +0000 (14:04 +0000)]
Retire the SCTP sysctl "strict_init". We always perform the validation
and there is no reason to make is configuarable.
Discussed with rrs@.

12 years agoImprove the handling of received INITs. Send an ABORT when
tuexen [Sat, 7 Jan 2012 13:03:33 +0000 (13:03 +0000)]
Improve the handling of received INITs. Send an ABORT when
not accepting the connection. Also fix a crash, which
could happen when the user closed the socket.

MFC after: 1 month.

12 years agoFix indentation.
glebius [Sat, 7 Jan 2012 12:40:45 +0000 (12:40 +0000)]
Fix indentation.

12 years agoDocument comconsole_port and comconsole_pcidev loader variables.
kib [Sat, 7 Jan 2012 11:16:23 +0000 (11:16 +0000)]
Document comconsole_port and comconsole_pcidev loader variables.

MFC after: 2 weeks

12 years agoImplement fdlopen(3), an rtld interface to load shared object by file
kib [Sat, 7 Jan 2012 10:33:01 +0000 (10:33 +0000)]
Implement fdlopen(3), an rtld interface to load shared object by file
descriptor.

Requested and tested by: des (previous version)
Reviewed by:  des, kan (previous version)
MFC after:    2 weeks

12 years agoether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again
kevlo [Sat, 7 Jan 2012 09:41:57 +0000 (09:41 +0000)]
ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it again

Reviewed by: yongari

12 years agoHandle the internal scope address representation of the KAME IPv6
ume [Sat, 7 Jan 2012 09:01:19 +0000 (09:01 +0000)]
Handle the internal scope address representation of the KAME IPv6
stack for the node-local multicast address.

Spotted by: Rainer Bredehorn <Bredehorn__at__gmx.de>
MFC after: 1 week

12 years agoFix the ar724x shift calculation when writing to the PCI config space.
adrian [Sat, 7 Jan 2012 04:13:25 +0000 (04:13 +0000)]
Fix the ar724x shift calculation when writing to the PCI config space.

This was preventing the ath driver from being loaded at runtime.
It worked fine when compiled statically into the kernel but not when
kldload'ed after the system booted.

The root cause was that PCIR_INTLINE (register 60) was being
overwritten by zeros when register 62 was being written to.
A subsequent read of this register would return 0, and thus
the rest of the PCI glue assumed an IRQ resource had already
been allocated.  This caused the device to fail to attach at
runtime as the device itself didn't contain any IRQ resources.

TODO: go back over the ar71xx and ar724x PCI config read/write
code and ensure it's correct.

12 years agoIn sys/contrib/rdma/ib_addr.h, bump MAX_ADDR_LEN to 20 bytes (the same
dim [Sat, 7 Jan 2012 00:47:27 +0000 (00:47 +0000)]
In sys/contrib/rdma/ib_addr.h, bump MAX_ADDR_LEN to 20 bytes (the same
value used in sys/ofed/include/linux/netdevice.h), so there will be no
buffer overruns in the rest of the inline functions in this file.

Reviewed by: kmacy
MFC after: 1 week

12 years ago- Fix sysctl description
eadler [Sat, 7 Jan 2012 00:11:36 +0000 (00:11 +0000)]
- Fix sysctl description

PR: 163623
Submitted by: Eugene Grosbein <eugen@eg.sd.rdtc.ru>
Approved by: bz

12 years agofork(2) returns -1 on failure, not some random negative number.
pjd [Fri, 6 Jan 2012 23:44:26 +0000 (23:44 +0000)]
fork(2) returns -1 on failure, not some random negative number.

MFC after: 3 days

12 years agosh: Avoid possible echo options in a testcase.
jilles [Fri, 6 Jan 2012 23:20:33 +0000 (23:20 +0000)]
sh: Avoid possible echo options in a testcase.

12 years agoHandle memory allocation failures in devstat_getdevs(), devstat_selectdevs(),
ghelmer [Fri, 6 Jan 2012 21:28:29 +0000 (21:28 +0000)]
Handle memory allocation failures in devstat_getdevs(), devstat_selectdevs(),
and devstat_buildmatch().

PR: bin/83359
Reviewed by: ken

12 years agoUse NULL instead of 0.
tuexen [Fri, 6 Jan 2012 20:20:59 +0000 (20:20 +0000)]
Use NULL instead of 0.

MFC after: 1 month.

12 years agoAdd 5 spare VOPs as placeholders to avoid breaking the KBI in the future
jhb [Fri, 6 Jan 2012 20:06:45 +0000 (20:06 +0000)]
Add 5 spare VOPs as placeholders to avoid breaking the KBI in the future
when new VOPs are MFC'd to a branch.

Reviewed by: kib, bz
MFC after: 3 days

12 years agoUse proper argument structure types for the extattr post-VOP hooks.
jhb [Fri, 6 Jan 2012 20:05:48 +0000 (20:05 +0000)]
Use proper argument structure types for the extattr post-VOP hooks.
The wrong structure happened to work since the only argument used was
the vnode which is in the same place in both VOP_SETATTR() and the two
extattr VOPs.

MFC after: 3 days

12 years agoLast attempt at <tgmath.h>: do enable the new code for C11 compilers.
ed [Fri, 6 Jan 2012 19:04:59 +0000 (19:04 +0000)]
Last attempt at <tgmath.h>: do enable the new code for C11 compilers.

I was thinking by myself, if the new code doesn't work with GCC 4.2, why
not simply turn it into an efficient version for C11 compilers? By
changing the code to use _Generic() directly in that case, I can build
the tgmath regression test in a matter of milliseconds with Clang,
instead of the 8 seconds it used to take.

So by the time C11 becomes the default, it will pick up the new code
automatically. And now I will refrain from making more changes to
<tgmath.h>.

12 years agoSilence a warning about redefinition of TARGET_ELF on powerpc.
andreast [Fri, 6 Jan 2012 18:37:49 +0000 (18:37 +0000)]
Silence a warning about redefinition of TARGET_ELF on powerpc.

12 years agoAlways release the inp lock before returning from tcp_detach.
np [Fri, 6 Jan 2012 18:29:40 +0000 (18:29 +0000)]
Always release the inp lock before returning from tcp_detach.

MFC after: 5 days

12 years agoAdd an even faster implementation of <tgmath.h> for the future.
ed [Fri, 6 Jan 2012 16:20:17 +0000 (16:20 +0000)]
Add an even faster implementation of <tgmath.h> for the future.

Instead of using an exponential number of cases with respect to the
number of arguments, this version only uses a linear number.
Unfortunately, it works with Clang, GCC 4.6 and GCC 4.7, but not GCC
4.2. Therefore, leave it commented out.

12 years agoFix build.
glebius [Fri, 6 Jan 2012 15:01:05 +0000 (15:01 +0000)]
Fix build.

12 years agoAdd 'nojail' keyword as auditd(8) can't really do anything useful when
pjd [Fri, 6 Jan 2012 14:00:31 +0000 (14:00 +0000)]
Add 'nojail' keyword as auditd(8) can't really do anything useful when
inside a jail.

Discussed with: rwatson
MFC after: 1 week

12 years agoTweak the last fix to match what was actually tested.
jhb [Fri, 6 Jan 2012 12:49:01 +0000 (12:49 +0000)]
Tweak the last fix to match what was actually tested.

Pointy hat to: jhb

12 years agoConstify argument.
pjd [Fri, 6 Jan 2012 12:27:17 +0000 (12:27 +0000)]
Constify argument.

MFC after: 3 days

12 years agoSince r228571 CARP is no longer an interface.
glebius [Fri, 6 Jan 2012 12:05:43 +0000 (12:05 +0000)]
Since r228571 CARP is no longer an interface.

12 years agoFix mdoc date from previous commit.
uqs [Fri, 6 Jan 2012 11:42:03 +0000 (11:42 +0000)]
Fix mdoc date from previous commit.

12 years agor222004 changed sbuf_finish() to not clear the buffer error status. As a
jh [Fri, 6 Jan 2012 10:12:59 +0000 (10:12 +0000)]
r222004 changed sbuf_finish() to not clear the buffer error status. As a
consequence sbuf_len() will return -1 for buffers which had the error
status set prior to sbuf_finish() call. This causes a problem in
pfs_read() which purposely uses a fixed size sbuf to discard bytes which
are not needed to fulfill the read request.

Work around the problem by using the full buffer length when
sbuf_finish() indicates an overflow. An overflowed sbuf with fixed size
is always full.

PR: kern/163076
Approved by: des
MFC after: 2 weeks

12 years agoUse the macro WEAK_ALIAS. Tested on 32 and 64-bit.
andreast [Fri, 6 Jan 2012 09:21:40 +0000 (09:21 +0000)]
Use the macro WEAK_ALIAS. Tested on 32 and 64-bit.

12 years agoCheck the return value of sbuf_finish() in pfs_readlink() and return
jh [Fri, 6 Jan 2012 09:17:34 +0000 (09:17 +0000)]
Check the return value of sbuf_finish() in pfs_readlink() and return
ENAMETOOLONG if the buffer overflowed.

Approved by: des
MFC after: 2 weeks

12 years agoFlip these options on so the modules build correctly for now.
adrian [Fri, 6 Jan 2012 08:51:20 +0000 (08:51 +0000)]
Flip these options on so the modules build correctly for now.

12 years ago- Add better COP2 (crypto coprocessor) context handler for Octeon. Keep
gonzo [Fri, 6 Jan 2012 01:23:26 +0000 (01:23 +0000)]
- Add better COP2 (crypto coprocessor) context handler for Octeon. Keep
    COP2 disabled and lazily allocate COP2 context structure in exception
    handler. Keep kernel and userland contexts separated.

12 years agoImport the first cut of "bsdbox".
adrian [Fri, 6 Jan 2012 00:56:31 +0000 (00:56 +0000)]
Import the first cut of "bsdbox".

This uses the existing crunchgen infrastructure to build
a series of tools designed to replace the base and networking
tools on an embedded system.

It reuses 'bsd.crunchgen.mk' to drive the actual file
creation. The rescue build system also uses this.

Unlike busybox, it doesn't include its own source - instead,
it just builds from the sources in /usr/src/ and leverages
the existing BSD framework.

Thie is still quite messy and could do with a whole lot of
cleaning up.   However it is proving to be very useful with
my current build framework, allowing me to build binary root
images that are about 30% less than simply cherrypicking files
and libraries from an installworld.

12 years agoFix the broken non-cross compile build. Oops!
adrian [Fri, 6 Jan 2012 00:34:27 +0000 (00:34 +0000)]
Fix the broken non-cross compile build. Oops!

Another pointy hat to: adrian, for stirring up more trouble.

12 years agoFix a typo.
pluknet [Fri, 6 Jan 2012 00:23:17 +0000 (00:23 +0000)]
Fix a typo.

X-MFC-with: 229665

12 years agoAdd 0x2826 device ID for C600 (Patsburg) SATA controller in RAID mode.
jimharris [Fri, 6 Jan 2012 00:22:55 +0000 (00:22 +0000)]
Add 0x2826 device ID for C600 (Patsburg) SATA controller in RAID mode.

Reviewed by: mav
Approved by: scottl

12 years agoReplace an OpenBSDism with a FreeBSDism in the pfctl(8) man page: we put
rwatson [Thu, 5 Jan 2012 23:11:05 +0000 (23:11 +0000)]
Replace an OpenBSDism with a FreeBSDism in the pfctl(8) man page: we put
configuration file man pages in section 5, and we prefer rc.conf to
rc.conf.local.

MFC after: 3 days

12 years agoFix a memory leak in addgroup() by ensuring the allocated memory
ghelmer [Thu, 5 Jan 2012 23:08:11 +0000 (23:08 +0000)]
Fix a memory leak in addgroup() by ensuring the allocated memory
is freed if an error occurs.

PR: bin/161510
MFC after: 4 weeks

12 years agoAllow daemon(8) to run pidfile_open() before relenquishing privileges
ghelmer [Thu, 5 Jan 2012 22:48:36 +0000 (22:48 +0000)]
Allow daemon(8) to run pidfile_open() before relenquishing privileges
so pid files can be written in /var/run when started as root.

I do not expect this to cause any security issues, but if anyone objects
it could be easily reverted.

PR: bin/159568
MFC after: 4 weeks

12 years agoRemove the assertion from tcp_input() that rcv_nxt is always greater
jhb [Thu, 5 Jan 2012 22:29:11 +0000 (22:29 +0000)]
Remove the assertion from tcp_input() that rcv_nxt is always greater
than or equal to rcv_adv and fix tcp_twstart() to handle this case by
assuming the last window was zero rather than a negative value.

The code in tcp_input() already safely handled this case.  It can happen
due to delayed ACKs along with a remote sender that sends data beyond
the window we previously advertised.  If we have room in our socket buffer
for the extra data beyond the advertised window, we will accept it.
However, if the ACK for that segment is delayed, then we will not
effectively fixup rcv_adv to account for that extra data until the
next segment arrives and forces out an ACK.  When that next segment
arrives, rcv_nxt will be beyond rcv_adv.

Tested by: pjd
MFC after: 1 week

12 years ago- Allow to change vfs.zfs.arc_meta_limit at runtime.
pjd [Thu, 5 Jan 2012 22:16:41 +0000 (22:16 +0000)]
- Allow to change vfs.zfs.arc_meta_limit at runtime.
- Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is
  not a tunable.

MFC after: 3 days

12 years agoFix build on powerpc64 too. The same as r229640.
andreast [Thu, 5 Jan 2012 22:06:01 +0000 (22:06 +0000)]
Fix build on powerpc64 too. The same as r229640.

12 years agoAllow extra directories to be added to the build-tools target.
adrian [Thu, 5 Jan 2012 21:50:50 +0000 (21:50 +0000)]
Allow extra directories to be added to the build-tools target.

Things such as "sh" require local tools to be built before
cross-compiling. This allows for extra software (that's
built via LOCAL_DIRS) to also have a build-tools target where
required.

12 years agoAllow crunchgen binary link generation to be disabled.
adrian [Thu, 5 Jan 2012 21:49:43 +0000 (21:49 +0000)]
Allow crunchgen binary link generation to be disabled.

If CRUNCH_GENERATE_LINKS is set to "no", then no links will be
generated.

This defaults to "yes" so things like release crunch building
still works.

12 years agoApply Typo-B-Gone 2000 [TM]
uqs [Thu, 5 Jan 2012 21:43:33 +0000 (21:43 +0000)]
Apply Typo-B-Gone 2000 [TM]

12 years agoConvert files over to UTF-8.
uqs [Thu, 5 Jan 2012 21:36:53 +0000 (21:36 +0000)]
Convert files over to UTF-8.

These files contained various combinations of Big5, eucJP and KOI8-U
encoded strings. The byte representations of their respective encodings
have been translated to $'...' escape sequences as understood by our sh(1).

With help from: jilles

12 years agoTouch up some more small typos missed in the previous round.
uqs [Thu, 5 Jan 2012 21:36:45 +0000 (21:36 +0000)]
Touch up some more small typos missed in the previous round.

Reported by: Ben Kaduk <minimarmot@gmail.com> et al.

12 years agoFurther fix a typo and spelling classic correctly in function names,
uqs [Thu, 5 Jan 2012 21:36:36 +0000 (21:36 +0000)]
Further fix a typo and spelling classic correctly in function names,
too.

Submitted by: Ben Kaduk <minimarmot@gmail.com>

12 years agoPartial backout of r228990, restore original MIB object name.
uqs [Thu, 5 Jan 2012 21:36:28 +0000 (21:36 +0000)]
Partial backout of r228990, restore original MIB object name.

It's too late to change this in 9.0 -- so we have a release with the
misspelling in the wild and should not break users that depend on it.

Deprecating/replacing it because of a one-char typo seems excessive.

12 years agoDocument the detrimental effect of kern.cam.XX.retry_count for recoverdisk(1)
uqs [Thu, 5 Jan 2012 21:36:20 +0000 (21:36 +0000)]
Document the detrimental effect of kern.cam.XX.retry_count for recoverdisk(1)

recoverdisk(1) wants to know about read errors when doing the 1MB/64k
reads as fast as possible so it can continue and retry them later with
smaller reads (down to sector size). Any retries by lower layers will
only slow it down.

Prodded by: arundel

12 years agoPull up vendor changes to mdoc(7)
uqs [Thu, 5 Jan 2012 21:36:12 +0000 (21:36 +0000)]
Pull up vendor changes to mdoc(7)

This switches us to using -isoC-2011 as the symbol name which is used by
groff and mdocml. It follows the change to 4 digit years as done with
IEEE Std 1003 post-1999.

MFC after: 2 weeks (groff changes only)

12 years agoFix build.
adrian [Thu, 5 Jan 2012 20:19:33 +0000 (20:19 +0000)]
Fix build.

12 years agoAdd missing options so modules build/load correctly.
adrian [Thu, 5 Jan 2012 20:18:01 +0000 (20:18 +0000)]
Add missing options so modules build/load correctly.

12 years agoFix a logic bug in change 228207 in the check for a thread's new user
jhb [Thu, 5 Jan 2012 19:02:52 +0000 (19:02 +0000)]
Fix a logic bug in change 228207 in the check for a thread's new user
priority being a realtime priority.

MFC after: 3 days

12 years agoConvert all users of IF_ADDR_LOCK to use new locking macros that specify
jhb [Thu, 5 Jan 2012 19:00:36 +0000 (19:00 +0000)]
Convert all users of IF_ADDR_LOCK to use new locking macros that specify
either a read lock or write lock.

Reviewed by: bz
MFC after: 2 weeks

12 years agoAdd new variants of the IF_ADDR_*LOCK*() macros used for protecting
jhb [Thu, 5 Jan 2012 18:35:49 +0000 (18:35 +0000)]
Add new variants of the IF_ADDR_*LOCK*() macros used for protecting
interface address lists that distinguish read locks from write locks.
To preserve the KPI, the previous operations are mapped to the write
lock macros.  The lock is still kept as a mutex for now.

Reviewed by: bz
MFC after: 2 weeks

12 years agoUpdate recently added drivers to use the if_*addr_r*lock() wrapper
jhb [Thu, 5 Jan 2012 18:32:37 +0000 (18:32 +0000)]
Update recently added drivers to use the if_*addr_r*lock() wrapper
functions instead of using the IF_ADDR_LOCK directly.  The wrapper
functions are the supported interface for device drivers.

Reviewed by: bz, philip
MFC after: 1 week

12 years agoWhen extracting the VLAN tag from if_em and if_lem receive descriptor
rwatson [Thu, 5 Jan 2012 17:30:15 +0000 (17:30 +0000)]
When extracting the VLAN tag from if_em and if_lem receive descriptor
rings, copy the whole VLAN tag, not just the VLAN ID.  This fixes a
problem in which VLAN priority information was dropped when using
offloaded VLAN processing with these drivers.

Discussed with: jfv, rrs
Sponsored by: ADARA Networks, Inc.
MFC after: 3 days

12 years agoFlip on IEEE80211_SUPPORT_MESH and AH_SUPPORT_AR5416, the
adrian [Thu, 5 Jan 2012 17:28:05 +0000 (17:28 +0000)]
Flip on IEEE80211_SUPPORT_MESH and AH_SUPPORT_AR5416, the
wlan and ath modules respectively assume this is set.

Pointy hat to: adrian

12 years agoIn sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode
dim [Thu, 5 Jan 2012 17:06:04 +0000 (17:06 +0000)]
In sys/fs/nullfs/null_subr.c, in a KASSERT, output the correct vnode
pointer 'lowervp' instead of 'vp', which is uninitialized at that point.

Reviewed by: kib
MFC after: 1 week

12 years agoRemove use of explicit bus space tags and handles and use methods that
jhb [Thu, 5 Jan 2012 16:27:32 +0000 (16:27 +0000)]
Remove use of explicit bus space tags and handles and use methods that
operate on resource objects instead.

MFC after: 1 week

12 years agoRemove redundant inclusion of <sys/cdefs.h>.
ed [Thu, 5 Jan 2012 12:09:39 +0000 (12:09 +0000)]
Remove redundant inclusion of <sys/cdefs.h>.

Mea culpa.

12 years agoRemove _Complex_I workaround from <tgmath.h>.
ed [Thu, 5 Jan 2012 12:06:49 +0000 (12:06 +0000)]
Remove _Complex_I workaround from <tgmath.h>.

This removes the use of __typeof() from this header, thus making it work
with a plain C11 compiler.

12 years agoMake _Complex_I a proper float _Complex when using GCC 4.2.
ed [Thu, 5 Jan 2012 12:05:48 +0000 (12:05 +0000)]
Make _Complex_I a proper float _Complex when using GCC 4.2.

It turns out our GCC has quite an interesting bug:

typeof(1.0fi) != float _Complex
typeof((float _Complex)1.0fi) != float _Complex
typeof((float _Complex)1.0i) == float _Complex

In other words: if casting to an equal size, GCC seems to take a
shortcut. By casting down from a double to a float, GCC doesn't take
this shortcut, yielding the proper type.

To prevent foot-shooting, add a _Static_assert() to guarantee that
_Complex_I is always a float _Complex. I'm not going to MFC this part of
the diff.

MFC after: 2 weeks

12 years agoRefine last comment.
rwatson [Thu, 5 Jan 2012 11:42:34 +0000 (11:42 +0000)]
Refine last comment.

Submitted by: joeld
Sponsored by: ADARA Networks, Inc.
MFC after: 3 days

12 years agoAdd comment to the VLAN code about its integration with VIMAGE: we see what
rwatson [Thu, 5 Jan 2012 11:24:22 +0000 (11:24 +0000)]
Add comment to the VLAN code about its integration with VIMAGE: we see what
the code is doing, we recognise the legitimacy of its goal, but we're not
quite sure it's going about it the right way.  More pondering is clearly
required.

Sponsored by: ADARA Networks, Inc.
Discussed with: bz
MFC after: 3 days

12 years agoFix typo.
brueffer [Thu, 5 Jan 2012 11:16:42 +0000 (11:16 +0000)]
Fix typo.

MFC after: 1 week

12 years agoReimplement <tgmath.h> on top of __generic().
ed [Thu, 5 Jan 2012 10:46:22 +0000 (10:46 +0000)]
Reimplement <tgmath.h> on top of __generic().

The macro construction used now, is almost identical to the code
provided in C11 proposal N1404. This new version doesn't seem to
introduce any regressions according to the regression test in tools/,
but still seems to malfunction with Clang on certain aspects.

The new code does work successfully with GCC 4.2, 4.6 and 4.7. With 4.7,
it also works when __generic() is implemented on top of _Generic().

Discussed with: stefanf

12 years agoAdd __generic(), to be able to use a very simple _Generic().
ed [Thu, 5 Jan 2012 10:43:03 +0000 (10:43 +0000)]
Add __generic(), to be able to use a very simple _Generic().

Already introducing this allows us to be forward compatible with C11
compilers. By implementing <tgmath.h> on top of this interface, it
becomes trivial to support both our existing GCC and newer compilers.

12 years agoAdd new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd
bapt [Thu, 5 Jan 2012 10:40:24 +0000 (10:40 +0000)]
Add new pw_make_v7 to make a passwd line (in v7 format) out of a struct passwd
while here, fix missing parentheses of the return statement of pw_make.

Approved by: des (mentor)

12 years agoChange index() and rindex() to a weak alias.
ed [Thu, 5 Jan 2012 10:32:53 +0000 (10:32 +0000)]
Change index() and rindex() to a weak alias.

This allows people to still write statically linked applications that
call strchr() or strrchr() and have a local variable or function called
index.

Discussed with: bde@