]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agostaticize two functions, and use proper format for a struct sglist
luigi [Sun, 17 Aug 2014 10:25:27 +0000 (10:25 +0000)]
staticize two functions, and use proper format for a struct sglist
(reported by bz)

9 years agoBring in the new automounter, similar to what's provided in most other
trasz [Sun, 17 Aug 2014 09:44:42 +0000 (09:44 +0000)]
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric: D523
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoAdd missing DPADD to Makefile.
hselasky [Sun, 17 Aug 2014 06:28:57 +0000 (06:28 +0000)]
Add missing DPADD to Makefile.

PR: 192733

9 years agoWhen the initarm_* routines were renamed to platform_* and moved to their
ian [Sun, 17 Aug 2014 02:56:58 +0000 (02:56 +0000)]
When the initarm_* routines were renamed to platform_* and moved to their
own header file, the lovely block of comments explaining what the generic
init code expects of the soc implementations got lost, restore it.

9 years agoRename the old initarm_* functions to the new platform_* names. Also
ian [Sun, 17 Aug 2014 02:53:36 +0000 (02:53 +0000)]
Rename the old initarm_* functions to the new platform_* names.  Also
move the registration of the static device map table into the function
intended to do devmap init stuff.

9 years agoClean up unused definitions.
melifaro [Sat, 16 Aug 2014 22:55:58 +0000 (22:55 +0000)]
Clean up unused definitions.

9 years ago* Use standard net/sff8472.h header for sff bits and offsets.
melifaro [Sat, 16 Aug 2014 21:53:44 +0000 (21:53 +0000)]
* Use standard net/sff8472.h header for sff bits and offsets.
* Convert sff_8472_id to 'const char *' to please clang.

Pointed by: np

9 years agoFactor out the common code for function boundary tracing instead of
markj [Sat, 16 Aug 2014 21:42:55 +0000 (21:42 +0000)]
Factor out the common code for function boundary tracing instead of
duplicating the entire implementation for both x86 and powerpc. This makes
it easier to add support for other architectures and has no functional
impact.

Phabric: D613
Reviewed by: gnn, jhibbits, rpaulo
Tested by: jhibbits (powerpc)
MFC after: 2 weeks

9 years agoMove the imx6 sysctl temperature info to hw.imx6 where all the other
ian [Sat, 16 Aug 2014 20:44:45 +0000 (20:44 +0000)]
Move the imx6 sysctl temperature info to hw.imx6 where all the other
soc-wide info lives.  It was under dev.imx6_anatop.0.

What does anatop mean anyway?  Nobody seems to know, so it's probably
not where somebody will think to look for imx6 hardware info.

9 years agoAdd support for reading i2c SFP/SFP+ data from NIC driver and
melifaro [Sat, 16 Aug 2014 19:13:52 +0000 (19:13 +0000)]
Add support for reading i2c SFP/SFP+ data from NIC driver and
presenting most interesting fields via ifconfig -v.
This version supports Intel ixgbe driver only.

Tested on: Cisco,Intel,Mellanox,ModuleTech,Molex transceivers
MFC after: 2 weeks

9 years agoUpdate to the current version of netmap.
luigi [Sat, 16 Aug 2014 15:00:01 +0000 (15:00 +0000)]
Update to the current version of netmap.
Mostly bugfixes or features developed in the past 6 months,
so this is a 10.1 candidate.

Basically no user API changes (some bugfixes in sys/net/netmap_user.h).

In detail:

1. netmap support for virtio-net, including in netmap mode.
  Under bhyve and with a netmap backend [2] we reach over 1Mpps
  with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode.

2. (kernel) add support for multiple memory allocators, so we can
  better partition physical and virtual interfaces giving access
  to separate users. The most visible effect is one additional
  argument to the various kernel functions to compute buffer
  addresses. All netmap-supported drivers are affected, but changes
  are mechanical and trivial

3. (kernel) simplify the prototype for *txsync() and *rxsync()
  driver methods. All netmap drivers affected, changes mostly mechanical.

4. add support for netmap-monitor ports. Think of it as a mirroring
  port on a physical switch: a netmap monitor port replicates traffic
  present on the main port. Restrictions apply. Drive carefully.

5. if_lem.c: support for various paravirtualization features,
  experimental and disabled by default.
  Most of these are described in our ANCS'13 paper [1].
  Paravirtualized support in netmap mode is new, and beats the
  numbers in the paper by a large factor (under qemu-kvm,
  we measured gues-host throughput up to 10-12 Mpps).

A lot of refactoring and additional documentation in the files
in sys/dev/netmap, but apart from #2 and #3 above, almost nothing
of this stuff is visible to other kernel parts.

Example programs in tools/tools/netmap have been updated with bugfixes
and to support more of the existing features.

This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline.

A lot of this code has been contributed by my colleagues at UNIPI,
including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella.

MFC after: 3 days.

9 years agoUse mount protocol version 3 by default for showmount and umount.
peter [Sat, 16 Aug 2014 14:56:11 +0000 (14:56 +0000)]
Use mount protocol version 3 by default for showmount and umount.
mount_nfs effectively uses mount protocol v3 by default already.
v1 mount protocol is being removed along with nfsv2 by a high profile NFS
appliance vendor and our legacy v1 mount protocol usage causes rpc errors.

9 years agoprint additional debugging info in virtqueue_dump()
luigi [Sat, 16 Aug 2014 13:13:17 +0000 (13:13 +0000)]
print additional debugging info in virtqueue_dump()
(not fundamental, but useful to debug performance issues on vtnet)

MFC after: 3 days

9 years agonet: move interface removal notification up in if_detach_internal
royger [Sat, 16 Aug 2014 10:47:24 +0000 (10:47 +0000)]
net: move interface removal notification up in if_detach_internal

This is needed to prevent having interfaces with ifp->if_addr == NULL
on bridge interfaces. Moving the notification event handlers up makes
sure the interfaces are removed before doing any more cleanup.

Sponsored by: Citrix Systems R&D
Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D598

net/if.c
 - Move interface removal notification up in if_detach_internal.

9 years agoComplete r254667, do not destroy pmap lock if KVA allocation failed.
kib [Sat, 16 Aug 2014 08:31:25 +0000 (08:31 +0000)]
Complete r254667, do not destroy pmap lock if KVA allocation failed.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
MFC after: 1 week

9 years agoAdd if_ath_alq code into the non-module build.
adrian [Sat, 16 Aug 2014 03:05:02 +0000 (03:05 +0000)]
Add if_ath_alq code into the non-module build.

9 years agosh: Mask off shift distance (<< and >>) in arithmetic.
jilles [Fri, 15 Aug 2014 22:36:41 +0000 (22:36 +0000)]
sh: Mask off shift distance (<< and >>) in arithmetic.

In C, shift distances equal to or larger than the number of bits in the
operand result in undefined behaviour. As part of eliminating undefined
behaviour in arithmetic, mask off the distance like Java and JavaScript
specify and C on x86 usually does.

Assumption: conversion from unsigned to signed retains the two's complement
bits.
Assumption: uintmax_t has no padding bits.

9 years agoMake the USB and ZFS devd configuration files optional depending on the
ngie [Fri, 15 Aug 2014 21:35:31 +0000 (21:35 +0000)]
Make the USB and ZFS devd configuration files optional depending on the
values of MK_USB/MK_ZFS

Making zfs.conf optional resolves PR # 186971

PR: 186971
Phabric: D606
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division

9 years agoFix atmconfig compilation when MK_ATM == yes and MK_BSNMP == no
ngie [Fri, 15 Aug 2014 21:22:49 +0000 (21:22 +0000)]
Fix atmconfig compilation when MK_ATM == yes and MK_BSNMP == no

Makefile.inc1:
Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no
instead of depending on a potentially stale tool installed on the build host

sbin/atm/atmconfig/Makefile:
- Always remove oid.h to avoid cluttering up the build/src tree.
- Consolidate all of the RESCUE/MK_BSNMP != no logic under one
conditional to improve readability
- Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead
  of spelling out oid.h
- Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and
  MK_OPENSSL == yes and not compiling for /rescue/rescue

sbin/atm/atmconfig/main.c:
Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it
clear that we're compiling bsnmp support into atmconfig

Approved by: jmmv (mentor)
Phabric: D579
PR: 143830
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoImplement the FDT static pinctl/pinmux spec for Atmel. This will
imp [Fri, 15 Aug 2014 16:08:52 +0000 (16:08 +0000)]
Implement the FDT static pinctl/pinmux spec for Atmel. This will
configure the mux and config registers for PIO devices based on what
we find in the FDT. I developed it per the spec that had been
committed to Linux in the January 2014 time frame and haven't
updated. In short, bundles of pins are activated in specific ways for
specific configurations, and we implement all of that.

What's not included is a MI device infrastructure, any dynamic
run-time changing of these pins, etc. Also not included are hooks into
all the drivers to enable the latter (static at boot no driver changes
are needed). These larger questions will need to be answered once we
have more drivers like this for more platforms, or somebody has a heck
of a lot of time to research a bunch of platforms, the Linux solution
(which is good, but has its warts), etc.

9 years agoCorrect the order of arguments passed to LIST_INSERT_AFTER().
markj [Fri, 15 Aug 2014 15:42:58 +0000 (15:42 +0000)]
Correct the order of arguments passed to LIST_INSERT_AFTER().

Reviewed by: kib
X-MFC-With: r269656

9 years agoDo not lookup source node twice when pf_map_addr() is used.
glebius [Fri, 15 Aug 2014 14:16:08 +0000 (14:16 +0000)]
Do not lookup source node twice when pf_map_addr() is used.

PR: 184003
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agopf_map_addr() can fail and in this case we should drop the packet,
glebius [Fri, 15 Aug 2014 14:02:24 +0000 (14:02 +0000)]
pf_map_addr() can fail and in this case we should drop the packet,
otherwise bad consequences including a routing loop can occur.

Move pf_set_rt_ifp() earlier in state creation sequence and
inline it, cutting some extra code.

PR: 183997
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agoRemove bogus ; at the end of the if condition in order to unbreak gcc builds
bz [Fri, 15 Aug 2014 10:01:33 +0000 (10:01 +0000)]
Remove bogus ; at the end of the if condition in order to unbreak gcc builds
after r270004.

MFC after: 4 days
X-MFX with: r270004

9 years agoImplement 'fast path' for the vm page fault handler. Or, it could be
kib [Fri, 15 Aug 2014 07:30:14 +0000 (07:30 +0000)]
Implement 'fast path' for the vm page fault handler.  Or, it could be
called a scalable path.  When several preconditions hold, the vm
object lock for the object containing the faulted page is taken in
read mode, instead of write, which allows parallel faults processing
in the region.

Namely, the fast path is taken when the faulted page already exists
and does not need copy on write, is already fully valid, and not busy.
For technical reasons, fast path is avoided when the fault is the
first write on the vnode object, or when the fault is for wiring or
debugger read or write.

On the fast path, pmap_enter(9) is passed the PMAP_ENTER_NOSLEEP flag,
since object lock is kept.  Pmap might fail to create the entry, in
which case the fallback to slow path is performed.

Reviewed by: alc
Tested by: pho (previous version)
Hardware provided and hosted by: The FreeBSD Foundation and
 Sentex Data Communications
Sponsored by: The FreeBSD Foundation
MFC after: 2 week

9 years agoFix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL.
glebius [Fri, 15 Aug 2014 04:35:34 +0000 (04:35 +0000)]
Fix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL.

PR: 127920
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agoChange pr_output's prototype to avoid the need for explicit casts.
kevlo [Fri, 15 Aug 2014 02:43:02 +0000 (02:43 +0000)]
Change pr_output's prototype to avoid the need for explicit casts.
This is a follow up to r269699.

Phabric: D564
Reviewed by: jhb

9 years agoPrint the symbolic bit names for the status when we get a timeout.
imp [Thu, 14 Aug 2014 23:17:33 +0000 (23:17 +0000)]
Print the symbolic bit names for the status when we get a timeout.

9 years agoTry to clarify how file systems are exported for NFSv4.
rmacklem [Thu, 14 Aug 2014 22:52:05 +0000 (22:52 +0000)]
Try to clarify how file systems are exported for NFSv4.

Suggested by: rcarter@pinyon.org
MFC after: 1 week

9 years agoConvert devd's client socket to type SOCK_SEQPACKET.
asomers [Thu, 14 Aug 2014 22:33:56 +0000 (22:33 +0000)]
Convert devd's client socket to type SOCK_SEQPACKET.

This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.

sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
Add ATF test cases for reading events from both devd socket types.

r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
Create a new socket, of type SOCK_SEQPACKET, for communicating with
clients. SOCK_SEQPACKET sockets preserve record boundaries,
simplying code in the client. The old SOCK_STREAM socket is retained
for backwards-compatibility with existing clients.

r269993:
sbin/devd/devd.8
Fix grammar bug.

CR: https://reviews.freebsd.org/rS266519
MFC after: 5 days
Sponsored by: Spectra Logic

9 years agoSync list of supported devices in the man page with the driver.
gavin [Thu, 14 Aug 2014 19:15:20 +0000 (19:15 +0000)]
Sync list of supported devices in the man page with the driver.

MFC after: 1 week

9 years agoUpdate iwn(4) and iwnfw(4) man pages to reflect all available firmware.
gavin [Thu, 14 Aug 2014 19:14:24 +0000 (19:14 +0000)]
Update iwn(4) and iwnfw(4) man pages to reflect all available firmware.

MFC after: 1 week

9 years ago- Count global pf(4) statistics in counter(9).
glebius [Thu, 14 Aug 2014 18:57:46 +0000 (18:57 +0000)]
- Count global pf(4) statistics in counter(9).
- Do not count global number of states and of src_nodes,
  use uma_zone_get_cur() to obtain values.
- Struct pf_status becomes merely an ioctl API structure,
  and moves to netpfil/pf/pf.h with its constants.
- V_pf_status is now of type struct pf_kstatus.

Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agoUpdate i386/NOTES and amd64/NOTES files to contain the complete list of
gavin [Thu, 14 Aug 2014 18:29:55 +0000 (18:29 +0000)]
Update i386/NOTES and amd64/NOTES files to contain the complete list of
firmwares for iwn(4) and sort them.

MFC after: 1 week

9 years agoAllow iwn105fw and iwn135 firmwares to be compiled into the kernel.
gavin [Thu, 14 Aug 2014 18:16:27 +0000 (18:16 +0000)]
Allow iwn105fw and iwn135 firmwares to be compiled into the kernel.

MFC after: 1 week

9 years agoReword comment to match the interrupt mode names from the MPtable spec.
neel [Thu, 14 Aug 2014 18:03:38 +0000 (18:03 +0000)]
Reword comment to match the interrupt mode names from the MPtable spec.

Reviewed by: tychon

9 years agoUpdate the URL to the phabricator instance.
gjb [Thu, 14 Aug 2014 16:25:43 +0000 (16:25 +0000)]
Update the URL to the phabricator instance.

Sponsored by: The FreeBSD Foundation

9 years agocreate_$ARCH_diskimage never really took off. Collapse back down to
imp [Thu, 14 Aug 2014 16:17:30 +0000 (16:17 +0000)]
create_$ARCH_diskimage never really took off. Collapse back down to
just one.

9 years agoOnly install the boot loader if it actually exists. This is a stop-gap
imp [Thu, 14 Aug 2014 16:17:23 +0000 (16:17 +0000)]
Only install the boot loader if it actually exists. This is a stop-gap
change, since larger changes to use geom more exclusively to create
partitions is in th works.

9 years agoins is only set and unused, but only when we're not doing software
imp [Thu, 14 Aug 2014 16:01:51 +0000 (16:01 +0000)]
ins is only set and unused, but only when we're not doing software
single stepping. Only set it when we're doing that by bending
style(9) rules a little to avoid even worse #ifdef soup.

9 years agoDisable all inline warnings on gcc >= 4.3. Not sure exactly where the
imp [Thu, 14 Aug 2014 16:01:46 +0000 (16:01 +0000)]
Disable all inline warnings on gcc >= 4.3. Not sure exactly where the
cutover is, but we need better tools to cope with inline tuning per
compiler version than we have. This is a quick bandaid until such
tools are around.

9 years agoDelete pp_isadma. It isn't use, and the code that used it has been
imp [Thu, 14 Aug 2014 16:01:38 +0000 (16:01 +0000)]
Delete pp_isadma. It isn't use, and the code that used it has been
commented out (temporarily) since 1998 when this driver hit the
tree. Also, no need to compute the ethernet header and then never use
it.

9 years agoStreamline format extensions. Either the compiler supports them, and
imp [Thu, 14 Aug 2014 16:01:33 +0000 (16:01 +0000)]
Streamline format extensions. Either the compiler supports them, and
we enable them and format wordings. Or it doesn't, and we disable
format warnings because the kernel uses the extensions pervasively.

9 years agoAvoid pointless (but harmless) actions on unmanaged pages.
alc [Thu, 14 Aug 2014 15:46:15 +0000 (15:46 +0000)]
Avoid pointless (but harmless) actions on unmanaged pages.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

9 years agoSkip pgrep-j and pkill-j if jail or jls is not installed.
asomers [Thu, 14 Aug 2014 14:59:40 +0000 (14:59 +0000)]
Skip pgrep-j and pkill-j if jail or jls is not installed.

Even though jail is part of the base system, it can be disabled by src.conf
settings. Therefore, it should be listed as a required program for tests
that use it.

CR: D603
MFC after: 3 days
Sponsored by: Spectra Logic

9 years agoAdd support for NEWCONS to kbdmap and vidfont.
se [Thu, 14 Aug 2014 14:22:12 +0000 (14:22 +0000)]
Add support for NEWCONS to kbdmap and vidfont.

The path to keymaps and fonts is selected based on the existence and value
of "sysctl kern.vty".

MFC after: 1 week

9 years agoAdded 4K quirks for Corsair Force GT and Samsung 840 SSDs
smh [Thu, 14 Aug 2014 13:57:17 +0000 (13:57 +0000)]
Added 4K quirks for Corsair Force GT and Samsung 840 SSDs

MFC after: 1 week
Sponsored by: Multiplay

9 years agoFix euro symbol in copied keymaps
emaste [Thu, 14 Aug 2014 13:45:02 +0000 (13:45 +0000)]
Fix euro symbol in copied keymaps

These were copied from share/syscons/keymaps/??.iso.kbd.  They were
not actually ISO 8859-1 as assumed.  When interpreted as Unicode they
ended up with the generic currency sign (U+00A4) instead of the euro
(U+20AC).

Reported by: Claude Buisson, tijl@

9 years agoRenamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp
smh [Thu, 14 Aug 2014 13:25:05 +0000 (13:25 +0000)]
Renamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp

This now matches all other ixgbe sysctl / tunables.

Sponsored by: Multiplay

9 years agoAdd a new loader tunable, vm.kmem_zmax which allows a system administrator
delphij [Thu, 14 Aug 2014 05:31:39 +0000 (05:31 +0000)]
Add a new loader tunable, vm.kmem_zmax which allows a system administrator
to limit the maximum allocation size that malloc(9) would consider using
the UMA cache allocator as backend.

Suggested by: alfred
MFC after: 2 weeks

9 years agoRe-instate UMA cached backend for 4K - 64K allocations. New consumers
delphij [Thu, 14 Aug 2014 05:13:24 +0000 (05:13 +0000)]
Re-instate UMA cached backend for 4K - 64K allocations.  New consumers
like geli(4) uses malloc(9) to allocate temporary buffers that gets
free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
supported flame graph.

Discussed with: jeff, alfred
MFC after: 1 week

9 years agoUse the max guest memory address when creating its iommu domain.
neel [Thu, 14 Aug 2014 05:00:45 +0000 (05:00 +0000)]
Use the max guest memory address when creating its iommu domain.

Also, assert that the GPA being mapped in the domain is less than its maxaddr.

Reviewed by: grehan
Pointed out by: Anish Gupta (akgupt3@gmail.com)

9 years agoBump version because challenge buffer size changed
ache [Thu, 14 Aug 2014 04:42:09 +0000 (04:42 +0000)]
Bump version because challenge buffer size changed

MFC after:      1 week

9 years agoAdd AIC to at91sam9260 support, now that it is needed for multipass to
imp [Thu, 14 Aug 2014 04:21:31 +0000 (04:21 +0000)]
Add AIC to at91sam9260 support, now that it is needed for multipass to
work. This gets my AT91SAM9260-based boards almost booting with
current in multi pass. The MCI driver is broken, but it is equally
broken before multi-pass.

9 years agoAdd support for multipass to Atmel, for both FDT and !FDT cases.
imp [Thu, 14 Aug 2014 04:21:25 +0000 (04:21 +0000)]
Add support for multipass to Atmel, for both FDT and !FDT cases.

9 years agoStart to add FDT support.
imp [Thu, 14 Aug 2014 04:21:20 +0000 (04:21 +0000)]
Start to add FDT support.

9 years agoAdd support for FDT and !FDT configs on Atmel, though FDT isn't
imp [Thu, 14 Aug 2014 04:21:14 +0000 (04:21 +0000)]
Add support for FDT and !FDT configs on Atmel, though FDT isn't
working yet.
Bump rev on arm Makefile since files.at91 uses new '!' operator.

9 years agoFrom https://sourceware.org/ml/newlib/2014/msg00113.html
imp [Thu, 14 Aug 2014 04:20:13 +0000 (04:20 +0000)]
From https://sourceware.org/ml/newlib/2014/msg00113.html
By Richard Earnshaw at ARM
>
>GCC has for a number of years provides a set of pre-defined macros for
>use with determining the ISA and features of the target during
>pre-processing.  However, the design was always somewhat cumbersome in
>that each new architecture revision created a new define and then
>removed the previous one.  This meant that it was necessary to keep
>updating the support code simply to recognise a new architecture being
>added.
>
>The ACLE specification (ARM C Language Extentions)
>(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html)
>provides a much more suitable interface and GCC has supported this
>since gcc-4.8.
>
>This patch makes use of the ACLE pre-defines to map to the internal
>feature definitions.  To support older versions of GCC a compatibility
>header is provided that maps the traditional pre-defines onto the new
>ACLE ones.

Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the
couple of places in tree. clang already implements ACLE. Add a define
that says we implement version 1.1, even though the implementation
isn't quite complete.

9 years agoStop telling people to directly report llvm or clang bugs upstream,
dim [Wed, 13 Aug 2014 21:38:29 +0000 (21:38 +0000)]
Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.

MFC after: 3 days

9 years agoUse "NO NAME" as the default unnamed label.
pfg [Wed, 13 Aug 2014 21:18:31 +0000 (21:18 +0000)]
Use "NO NAME" as the default unnamed label.

Microsoft recommends avoiding the use of spaces in the
string structures for FAT. Unfortunately they do just
that by default in the case of unlabeled filesystems.

Follow the default MS behavior to avoid confusion in
common tools like file(1). This was actually the
default behavior before r203868.

Obtained from: NetBSD (CVS rev. 1.39)
MFC after: 3 days

9 years agoRemove trailing whitespace
emaste [Wed, 13 Aug 2014 19:55:14 +0000 (19:55 +0000)]
Remove trailing whitespace

9 years agoMake the libbsdstat useful again.
adrian [Wed, 13 Aug 2014 19:43:22 +0000 (19:43 +0000)]
Make the libbsdstat useful again.

9 years agoCopy country-code .iso syscons keymaps for vt(4)
emaste [Wed, 13 Aug 2014 19:06:29 +0000 (19:06 +0000)]
Copy country-code .iso syscons keymaps for vt(4)

Existing syscons ISO 8859-1 keymaps (??.iso.kbd) are usable without
change as Unicode keymaps for vt(4).

Sponsored by: The FreeBSD Foundation

9 years agoSupplement r259111 by also using correct casts in gcc's emmintrin.h for
dim [Wed, 13 Aug 2014 16:42:44 +0000 (16:42 +0000)]
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by: Jos Chrispijn <ports@webrz.net>
MFC after: 3 days

9 years agoAdd support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
tuexen [Wed, 13 Aug 2014 15:50:16 +0000 (15:50 +0000)]
Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.

MFC after: 1 week

9 years agoFixed ENOMEM description.
pluknet [Wed, 13 Aug 2014 14:49:51 +0000 (14:49 +0000)]
Fixed ENOMEM description.

MFC after: 1 week
Sponsored by: Nginx, Inc.

9 years agoAdd a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
kib [Wed, 13 Aug 2014 05:53:41 +0000 (05:53 +0000)]
Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
the whole RLIMIT_STACK-sized region of the kernel-allocated stack as
the stack of main thread.

By default, the main thread stack is clamped at 2MB (4MB on 64bit
ABIs) and the rest is used for other threads stack allocation.  Since
there is no programmatic way to adjust the size of the main thread
stack, pthread_attr_setstacksize() is too late, the knob allows user
to manage the main stack size both for single-threaded and
multi-threaded processes with the rlimit.

Reported by: "Ivan A. Kosarev" <ivan@ivan-labs.com>
Tested by: dim
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoStyle.
kib [Wed, 13 Aug 2014 05:47:49 +0000 (05:47 +0000)]
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoIf vm_page_grab() allocates a new page, the page is not inserted into
kib [Wed, 13 Aug 2014 05:44:08 +0000 (05:44 +0000)]
If vm_page_grab() allocates a new page, the page is not inserted into
page queue even when the allocation is not wired.  It is
responsibility of the vm_page_grab() caller to ensure that the page
does not end on the vm_object queue but not on the pagedaemon queue,
which would effectively create unpageable unwired page.

In exec_map_first_page() and vm_imgact_hold_page(), activate the page
immediately after unbusying it, to avoid leak.

In the uiomove_object_page(), deactivate page before the object is
unlocked.  There is no leak, since the page is deactivated after
uiomove_fromphys() finished.  But allowing non-queued non-wired page
in the unlocked object queue makes it impossible to assert that leak
does not happen in other places.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
ngie [Wed, 13 Aug 2014 05:15:28 +0000 (05:15 +0000)]
Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
MK_TESTS == no

Phabric: D555
X-MFC with: r269904
Approved by: jmmv (mentor, implicit)
Pointyhat to: ngie

9 years agoIntegrate lib/libutil into the build/kyua
ngie [Wed, 13 Aug 2014 04:56:27 +0000 (04:56 +0000)]
Integrate lib/libutil into the build/kyua

Remove the .t wrappers

Rename all of the TAP test applications from test-<test> to
<test>_test to match the convention described in the TestSuite
wiki page

humanize_number_test.c:

- Fix -Wformat warnings with counter variables
- Fix minor style(9) issues:
-- Header sorting
-- Variable declaration alignment/sorting in main(..)
-- Fit the lines in <80 columns
- Fix an off by one index error in the testcase output [*]
- Remove unnecessary `extern char * optarg;` (this is already provided by
  unistd.h)

Phabric: D555
Approved by: jmmv (mentor)
MFC after: 2 weeks
Obtained from: EMC / Isilon Storage Division [*]
Submitted by: Casey Peel <cpeel@isilon.com> [*]
Sponsored by: EMC / Isilon Storage Division

9 years agoPort date/bin/tests to ATF
ngie [Wed, 13 Aug 2014 04:43:29 +0000 (04:43 +0000)]
Port date/bin/tests to ATF

Phabric: D545
Approved by: jmmv (mentor)
Submitted by: keramida (earlier version)
MFC after: 2 weeks
Sponsored by: Google, Inc
Sponsored by: EMC / Isilon Storage Division

9 years agoConvert bin/sh/tests to ATF
ngie [Wed, 13 Aug 2014 04:14:50 +0000 (04:14 +0000)]
Convert bin/sh/tests to ATF

The new code uses a "test discovery mechanism" to determine
what tests are available for execution

The test shell can be specified via:

  kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh

Sponsored by: EMC / Isilon Storage Division
Approved by: jmmv (mentor)
Reviewed by: jilles (maintainer)

9 years agoMinor style tweaks.
pfg [Wed, 13 Aug 2014 03:44:30 +0000 (03:44 +0000)]
Minor style tweaks.

Obtained from: OpenBSD (CVS rev. 1.7)
MFC after: 3 days

9 years agoMake sure the DTrace header files are built before depend and before
rpaulo [Wed, 13 Aug 2014 01:27:51 +0000 (01:27 +0000)]
Make sure the DTrace header files are built before depend and before
the build starts.

This adds a new variable DHDRS that contains a list of all DTrace
header files.  Then, we use the beforedepend hook to make sure the
heaeder files are built.

Introduce a beforebuild dependency (from projects/bmake) based on
feedback from Simon J. Gerraty.  This lets us generate the header
files without running make depend.

Reviewed by: sjg, imp
MFC after: 3 days

9 years agoFix typo when displaying the HPET timer unit number.
neel [Wed, 13 Aug 2014 00:18:16 +0000 (00:18 +0000)]
Fix typo when displaying the HPET timer unit number.

9 years agoMinor cleanup:
neel [Wed, 13 Aug 2014 00:14:26 +0000 (00:14 +0000)]
Minor cleanup:
- Set 'pirq_cold' to '0' on the first PIRQ allocation.
- Make assertions stronger.

Reviewed by: jhb
CR: https://phabric.freebsd.org/D592

9 years agoTruncate the ctfmerge command line, like we do with SYSTEM_LD.
imp [Tue, 12 Aug 2014 23:48:37 +0000 (23:48 +0000)]
Truncate the ctfmerge command line, like we do with SYSTEM_LD.

9 years agoFix a typo in a comment: s/interprete/interpret/
gjb [Tue, 12 Aug 2014 19:37:49 +0000 (19:37 +0000)]
Fix a typo in a comment: s/interprete/interpret/

Submitted by: Sam Fourman Jr.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoCorrect a comment brought over from amd64. i386 doesn't use long
jhb [Tue, 12 Aug 2014 18:22:57 +0000 (18:22 +0000)]
Correct a comment brought over from amd64.  i386 doesn't use long
mode.

9 years agoComplete the usr.bin/yacc kyua integration work I originally
ngie [Tue, 12 Aug 2014 17:51:26 +0000 (17:51 +0000)]
Complete the usr.bin/yacc kyua integration work I originally
submitted via r268811

- Install the Kyuafile by adding FILES to FILESGROUPS
- Run the testcases with an unprivileged user

  Some of the testcases depend upon behavior that's broken when
  run as root on FreeBSD because of how permissions are treated
  with access(2) vs eaccess(2), open(2), etc

- Simplify the test driver to just inspect the exit code from
  run_test because it now exits with 0 if successful and exits
  with !0 if unsuccessful
- Don't do ad hoc temporary directory creation/deletion; let Kyua
  handle that
- Add entries for files removed in r268811 to
  OptionalObsoleteFiles.inc

PR: 191020
X-MFC with: r268811
Approved by: jmmv (mentor)
Reviewed by: bapt
Sponsored by: EMC / Isilon Storage Division

9 years ago(belatedly) Document FreeBSD 9.3-R
marck [Tue, 12 Aug 2014 16:51:37 +0000 (16:51 +0000)]
(belatedly) Document FreeBSD 9.3-R

MFC after: 1 week

M    misc/bsd-family-tree

9 years agoAdd Dan Langille (myself) to committers-ports.dot file with mat and wg as mentors.
dvl [Tue, 12 Aug 2014 14:37:33 +0000 (14:37 +0000)]
Add Dan Langille (myself) to committers-ports.dot file with mat and wg as mentors.

Approved by: wg (mentor)

9 years agoAccording to opie code and even direct mention in opie(4) challenge buffer
ache [Tue, 12 Aug 2014 13:28:46 +0000 (13:28 +0000)]
According to opie code and even direct mention in opie(4) challenge buffer
size must be OPIE_CHALLENGE_MAX + 1, not OPIE_CHALLENGE_MAX

Reviewed by:    des
MFC after:      1 week

9 years agoChange SCTP sysctl from auth_disable to auth_enable. This is
tuexen [Tue, 12 Aug 2014 13:13:11 +0000 (13:13 +0000)]
Change SCTP sysctl from auth_disable to auth_enable. This is
consistent with other similar sysctl variable used in SCTP.

9 years agoFix broken pointer overflow check ns_name_unpack()
ume [Tue, 12 Aug 2014 13:09:32 +0000 (13:09 +0000)]
Fix broken pointer overflow check ns_name_unpack()

Many compilers may optimize away the overflow check `msg + l < msg',
where `msg' is a pointer and `l' is an integer, because pointer
overflow is undefined behavior in C.

Use a safe precondition test `l >= eom - msg' instead.

Reference:
https://android-review.googlesource.com/#/c/50570/

Requested by: pfg
Obtained from: NetBSD (CVS rev. 1.10)

9 years agoClarify descriptions of pthread_cond_wait() and pthread_cond_timedwait()
gavin [Tue, 12 Aug 2014 12:44:52 +0000 (12:44 +0000)]
Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait()

Requested by: Malcolm Douglas via freebsd-doc
Reviewed by: jhb
MFC after: 1 week

9 years agoUpdate our stub resolver to final version of libbind.
ume [Tue, 12 Aug 2014 12:36:06 +0000 (12:36 +0000)]
Update our stub resolver to final version of libbind.

Obtained from: ISC

9 years agoBring the md5 functions into libc for internal use only.
ume [Tue, 12 Aug 2014 12:25:56 +0000 (12:25 +0000)]
Bring the md5 functions into libc for internal use only.
It is required to support ID randomization for our stub
resolver.

9 years ago- Fix radix tree memory leakage when unloading modules using radix
hselasky [Tue, 12 Aug 2014 11:45:57 +0000 (11:45 +0000)]
- Fix radix tree memory leakage when unloading modules using radix
trees. This happens because the logic inserting items into the radix
tree is allocating empty radix levels, when index zero does not
contain any items.
- Add proper error case handling, so that the radix tree does not end
up in a bad state, if memory cannot be allocated during insertion of
an item.
- Add check for inserting NULL items into the radix tree.
- Add check for radix tree getting too big.

MFC after: 1 week
Sponsored by: Mellanox Technologies

9 years agoAdd support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
tuexen [Tue, 12 Aug 2014 11:30:16 +0000 (11:30 +0000)]
Add support for the SCTP_AUTH_SUPPORTED and SCTP_ASCONF_SUPPORTED
socket options. Add also a sysctl to control the support of ASCONF.

MFC after: 1 week

9 years agoTurn off kern.geom.part.mbr.enforce_chs by default.
ae [Tue, 12 Aug 2014 10:31:31 +0000 (10:31 +0000)]
Turn off kern.geom.part.mbr.enforce_chs by default.

9 years agoRemove duplicate entry.
ae [Tue, 12 Aug 2014 09:34:53 +0000 (09:34 +0000)]
Remove duplicate entry.

9 years agoRevision r269457 removed the Giant around mount and unmount code, but
kib [Tue, 12 Aug 2014 09:33:00 +0000 (09:33 +0000)]
Revision r269457 removed the Giant around mount and unmount code, but
r269533, which was tested before r269457 was committed, implicitely
relied on the Giant to protect the manipulations of the softdepmounts
list.  Use softdep global lock consistently to guarantee the list
structure now.

Insert the new struct mount_softdeps into the softdepmounts only after
it is sufficiently initialized, to prevent softdep_speedup() from
accessing bare memory.  Similarly, remove struct mount_softdeps for
the unmounted filesystem from the tailq before destroying structure
rwlock.

Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set
ae [Tue, 12 Aug 2014 09:10:13 +0000 (09:10 +0000)]
Add sysctl and loader tunable kern.geom.part.mbr.enforce_chs that is set
by default. It can be used to disable automatic alignment to CHS geometry,
that GEOM_PART_MBR does.

Reviewed by: wblock
MFC after: 1 week

9 years agoUpdate sqlite-3.7.17 -> 3.8.5
peter [Tue, 12 Aug 2014 02:09:00 +0000 (02:09 +0000)]
Update sqlite-3.7.17 -> 3.8.5

9 years agoRevert r269839.
rpaulo [Mon, 11 Aug 2014 22:43:44 +0000 (22:43 +0000)]
Revert r269839.

This doesn't work like I expected and the if clause is never matched.
It turns out that the problem with the older make is unrelated.

MFC after: 3 days

9 years agoAdd .d files to the reverse matching pattern in bsd.dep.mk to account
rpaulo [Mon, 11 Aug 2014 21:42:06 +0000 (21:42 +0000)]
Add .d files to the reverse matching pattern in bsd.dep.mk to account
for source file dependencies.

This follows the .y and .l behaviour.

MFC after: 3 days

9 years agoFix another typoe in the definition of DTrace SOBJS.
rpaulo [Mon, 11 Aug 2014 21:14:08 +0000 (21:14 +0000)]
Fix another typoe in the definition of DTrace SOBJS.

MFC after: 3 days

9 years agobsd.dep.mk: use the empty() function with the check for .d files.
rpaulo [Mon, 11 Aug 2014 20:44:57 +0000 (20:44 +0000)]
bsd.dep.mk: use the empty() function with the check for .d files.

Seems to work better with the old make.

MFC after: 3 days