]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMerge compiler-rt r291274.
Dimitry Andric [Sun, 8 Jan 2017 19:47:17 +0000 (19:47 +0000)]
Merge compiler-rt r291274.

7 years agoMerge libc++ r291274, and update the library Makefile.
Dimitry Andric [Sun, 8 Jan 2017 19:39:03 +0000 (19:39 +0000)]
Merge libc++ r291274, and update the library Makefile.

7 years agoMerge ^/head r311684 through r311691.
Dimitry Andric [Sun, 8 Jan 2017 18:17:35 +0000 (18:17 +0000)]
Merge ^/head r311684 through r311691.

7 years agoFor kernel builds, make the -Waddress-of-packed-member warning non-fatal.
Dimitry Andric [Sun, 8 Jan 2017 18:14:28 +0000 (18:14 +0000)]
For kernel builds, make the -Waddress-of-packed-member warning non-fatal.
The warning is informative, but often there is no real alignment problem.

7 years agoFix logic error in gvinum's gv_set_sd_state()
Dimitry Andric [Sun, 8 Jan 2017 17:56:54 +0000 (17:56 +0000)]
Fix logic error in gvinum's gv_set_sd_state()

With clang 4.0.0, I'm getting the following warnings:

    sys/geom/vinum/geom_vinum_state.c:186:7: error: logical not is only
    applied to the left hand side of this bitwise operator
    [-Werror,-Wlogical-not-parentheses]
                    if (!flags & GV_SETSTATE_FORCE)
                        ^      ~

The logical not operator should obiously be called after masking.

Reviewed by: mav, pfg
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9093

7 years agoDisable -Waddress-of-packed-member for WARNS <= 3.
Dimitry Andric [Sun, 8 Jan 2017 14:49:50 +0000 (14:49 +0000)]
Disable -Waddress-of-packed-member for WARNS <= 3.

7 years agoMerge ^/head r311546 through r311683.
Dimitry Andric [Sun, 8 Jan 2017 14:36:18 +0000 (14:36 +0000)]
Merge ^/head r311546 through r311683.

7 years agoMake CTL_GETSTATS ioctl return partial data if buffer is small.
Alexander Motin [Sun, 8 Jan 2017 13:26:34 +0000 (13:26 +0000)]
Make CTL_GETSTATS ioctl return partial data if buffer is small.

MFC after: 2 weeks

7 years agoAdd direction argument to ipsec_setspidx_inpcb() function.
Andrey V. Elsukov [Sun, 8 Jan 2017 12:40:07 +0000 (12:40 +0000)]
Add direction argument to ipsec_setspidx_inpcb() function.

This function is used only by ipsec_getpolicybysock() to fill security
policy index selector for locally generated packets (that have INPCB).
The function incorrectly assumes that spidx is the same for both directions.
Fix this by using new direction argument to specify correct INPCB security
policy - sp_in or sp_out. There is no need to fill both policy indeces,
because they are overwritten for each packet.
This fixes security policy matching for outbound packets when user has
specified TCP/UDP ports in the security policy upperspec.

PR: 213869
MFC after: 1 week

7 years ago[net80211] add roaming parameters for 11ac.
Adrian Chadd [Sun, 8 Jan 2017 10:13:05 +0000 (10:13 +0000)]
[net80211] add roaming parameters for 11ac.

These are mostly placeholders for now.

7 years ago[net80211] use the correct freq2 field when populating VHT operation element.
Adrian Chadd [Sun, 8 Jan 2017 10:07:54 +0000 (10:07 +0000)]
[net80211] use the correct freq2 field when populating VHT operation element.

Whilst here, leave a TODO comment so I revisit this routine in the context
of hostap operation probe requests for IBSS/mesh.

7 years agoiso_rrip.h: Hide kernel definitions from makefs(8)
Conrad Meyer [Sun, 8 Jan 2017 09:16:07 +0000 (09:16 +0000)]
iso_rrip.h: Hide kernel definitions from makefs(8)

Reported by: O. Hartmann <ohartmann at walstatt.org>

7 years agolibprocstat: Include cd9660 headers in the same order as the kernel
Conrad Meyer [Sun, 8 Jan 2017 08:36:37 +0000 (08:36 +0000)]
libprocstat: Include cd9660 headers in the same order as the kernel

Fix userspace build after r311665.

7 years agochown/chgrp: Add SIGINFO handler
Conrad Meyer [Sun, 8 Jan 2017 06:58:42 +0000 (06:58 +0000)]
chown/chgrp: Add SIGINFO handler

PR: 191884
Submitted by: Dan McGregor <dan.mcgregor at usask.ca>
Reviewed by: mjg@ (earlier version)

7 years agochmod: Add SIGINFO handler
Conrad Meyer [Sun, 8 Jan 2017 06:50:53 +0000 (06:50 +0000)]
chmod: Add SIGINFO handler

PR: 191884
Submitted by: Dan McGregor <dan.mcgregor at usask.ca>
Reviewed by: mjg@ (earlier version)

7 years agoAdd some additional ACPI methods for DRM
Conrad Meyer [Sun, 8 Jan 2017 06:26:33 +0000 (06:26 +0000)]
Add some additional ACPI methods for DRM

Add AcpiGetDataFull and AcpiGetTableWithSize.

Submitted by: Matt Macy

7 years agoDo not truncate inode calculation from ISO9660 block offset
Conrad Meyer [Sun, 8 Jan 2017 06:22:35 +0000 (06:22 +0000)]
Do not truncate inode calculation from ISO9660 block offset

PR: 190655
Reported by: Thomas Schmitt <scdbackup at gmx.net>
Obtained from: NetBSD sys/fs/cd9660/cd9660_node.c,r1.31

7 years agocd9660: Expand internal inum size to 64 bits
Conrad Meyer [Sun, 8 Jan 2017 06:21:49 +0000 (06:21 +0000)]
cd9660: Expand internal inum size to 64 bits

Inums in cd9660 refer to byte offsets on the media.  DVD and BD media
can have entries above 4GB, especially with multi-session images.

PR: 190655
Reported by: Thomas Schmitt <scdbackup at gmx.net>

7 years agommc: Accept even lower voltage for Cherryview
Conrad Meyer [Sun, 8 Jan 2017 06:20:21 +0000 (06:20 +0000)]
mmc: Accept even lower voltage for Cherryview

And HP x2 210, per DragonFlyBSD 240bd9cd58f8259c12c14a8006837e698.

Submitted by: Johannes Lundberg <yohanesu75 at gmail.com>
No objection: gonzo@
Obtained from: DragonFlyBSD

7 years ago[net80211] include the prototype VHT code into the build.
Adrian Chadd [Sun, 8 Jan 2017 04:27:08 +0000 (04:27 +0000)]
[net80211] include the prototype VHT code into the build.

Note: it isn't called anywhere yet!

7 years ago[net80211] Add initial VHT support routines.
Adrian Chadd [Sun, 8 Jan 2017 04:25:41 +0000 (04:25 +0000)]
[net80211] Add initial VHT support routines.

This is a skeleton set based on ieee80211_ht.c.  It implements some IE
parsing, some basic unfinished negotiation, and channel promotion/demotion.

However, by itself it's not enough to do VHT - notably, the actual
channel promotion for STA mode at least is done in ieee80211_ht.c as
part of htinfo_update_chw().  I was .. quite amused when I found that
out.

I'm checking this in so others can see progress rather than one huge
commit when VHT is "done" (which will likely be quite a while.)

7 years ago[net80211] add a "is VHT available" macro.
Adrian Chadd [Sun, 8 Jan 2017 04:23:05 +0000 (04:23 +0000)]
[net80211] add a "is VHT available" macro.

We have run out of config bits, sigh, so until I expand the ic config
bits, just use this macro as a substitute.

7 years agoAdd a new sdhci interface method, get_card_present().
Ian Lepore [Sun, 8 Jan 2017 02:32:53 +0000 (02:32 +0000)]
Add a new sdhci interface method, get_card_present().

Many embedded SoC controllers that are (more or less) sdhci-compatible don't
implement card detect, and the related values in the PRESENT_STATE register
aren't useful.  A bridge driver can now implement get_card_present() to read
a gpio pin or whatever else is necessary for that system.

The default implementation reads the CARD_PRESENT bit from the PRESENT_STATE
register, so existing drivers will keep working (or keep not-fully-working,
since many drivers right now can't detect card insert/remove).

7 years agoremove network mask calculation for Classful network
Baptiste Daroussin [Sat, 7 Jan 2017 23:42:17 +0000 (23:42 +0000)]
remove network mask calculation for Classful network

Nowadays it's not necessary to compute network mask from the IP address and
compare to given by DHCP.

Submitted by: kczekirda
Reviewed by: glebius, bapt
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D8740

7 years agoOnly write to *active once, even when GPIO_ACTIVE_LOW is set.
Ian Lepore [Sat, 7 Jan 2017 22:55:23 +0000 (22:55 +0000)]
Only write to *active once, even when GPIO_ACTIVE_LOW is set.

7 years agocxgbe/t4_tom: Fix tid accounting. An offloaded IPv6 connection uses 2
Navdeep Parhar [Sat, 7 Jan 2017 20:26:19 +0000 (20:26 +0000)]
cxgbe/t4_tom: Fix tid accounting.  An offloaded IPv6 connection uses 2
tids, not 1, in the hardware.

MFC after: 3 days
Sponsored by: Chelsio Communications

7 years agoAdd skein(3) front ends to the md5 manpage
Allan Jude [Sat, 7 Jan 2017 19:43:40 +0000 (19:43 +0000)]
Add skein(3) front ends to the md5 manpage

Reported by: emaste

7 years agolibmd: add noexec stack annotation in skein_block_asm.s
Ed Maste [Sat, 7 Jan 2017 19:26:25 +0000 (19:26 +0000)]
libmd: add noexec stack annotation in skein_block_asm.s

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agostyle(9) fix
Allan Jude [Sat, 7 Jan 2017 17:37:39 +0000 (17:37 +0000)]
style(9) fix

Submitted by: jmallett

7 years agoExport __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
Konstantin Belousov [Sat, 7 Jan 2017 16:05:19 +0000 (16:05 +0000)]
Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.

libstdc++ before gcc r244057 expected that libc provided
__cxa_thread_atexit_impl, and libstdc++ implemented
__cxa_thread_atexit, by forwarding the calls to _impl.  Mentioned gcc
revision checks for __cxa_thread_atexit in libc and does not provide
the symbol from libstdc++ if found.

This change helps older gcc, in particular, all released versions
which implement thread_local, by consolidating the implementation into
libc.  For that versions, if configured with the current libc, the
__cxa_thread_atexit is exported from libstdc++ as a trivial wrapper
around libc::__cxa_thread_atexit_impl.

The __cxa_thread_atexit implementation is put into separate source
file to allow for static linking with older libstdc++.a.

gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968
Reported by: Hannes Hauswedell <h2+fbsdports@fsfe.org>
PR: 215709
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoRestore priority value for OGIO_KEYMAP
Nikolai Lifanov [Sat, 7 Jan 2017 15:58:57 +0000 (15:58 +0000)]
Restore priority value for OGIO_KEYMAP

PR: 206678
Submitted by: ecturt@gmail.com
Reviewed by: cem
Approved by: cem, matthew (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5095

7 years agoFix the following clang 4.0.0 warning in ngatm's snmp_atm.c:
Dimitry Andric [Sat, 7 Jan 2017 15:57:12 +0000 (15:57 +0000)]
Fix the following clang 4.0.0 warning in ngatm's snmp_atm.c:

    contrib/ngatm/snmp_atm/snmp_atm.c:173:6: error: logical not is only
    applied to the left hand side of this bitwise operator
    [-Werror,-Wlogical-not-parentheses]
            if (!ifmr.ifm_status & IFM_AVALID) {
                ^                ~

Obviously, the masking needs to be done before the logical not
operation.  Add parentheses to make it so.

MFC after:      3 days

7 years agoAdd one more dependency for lld.
Dimitry Andric [Sat, 7 Jan 2017 15:18:49 +0000 (15:18 +0000)]
Add one more dependency for lld.

7 years agolibunwind: add noexec stack annotation
Ed Maste [Sat, 7 Jan 2017 14:40:58 +0000 (14:40 +0000)]
libunwind: add noexec stack annotation

Reported by: vangyzen
Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D9075

7 years agoDefine _POSIX_PRIORITY_SCHEDULING as 0.
Konstantin Belousov [Sat, 7 Jan 2017 12:24:45 +0000 (12:24 +0000)]
Define _POSIX_PRIORITY_SCHEDULING as 0.

sched_*(2) syscalls might be not available at runtime.  Defining this
constant as zero directs POSIX-compliant code to call sysconf(3) to
detect the feature at runtime, and forces libc sysconf(3) to ask
kernel.

Noted by: ngie
Reviewed by: jilles, ngie
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D9055

7 years agosfxge(4): allow DMA descs to cross 4k boundary on EF10
Andrew Rybchenko [Sat, 7 Jan 2017 10:55:38 +0000 (10:55 +0000)]
sfxge(4): allow DMA descs to cross 4k boundary on EF10

Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9061

7 years agosfxge(4): treat EFX_LINK_UNKOWN as link down
Andrew Rybchenko [Sat, 7 Jan 2017 10:52:02 +0000 (10:52 +0000)]
sfxge(4): treat EFX_LINK_UNKOWN as link down

It is safer to consider EFX_LINK_UNKNOWN as link down.
link_mode is set to EFX_LINK_UNKNOWN on port stop and fini.

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9060

7 years agosfxge(4): use SFXGE_LINK_UP() to report link up state
Andrew Rybchenko [Sat, 7 Jan 2017 10:51:12 +0000 (10:51 +0000)]
sfxge(4): use SFXGE_LINK_UP() to report link up state

Reviewed by:    philip
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision:  https://reviews.freebsd.org/D9059

7 years agoMake 'camcontrol modepage' support subpages.
Alexander Motin [Sat, 7 Jan 2017 09:56:12 +0000 (09:56 +0000)]
Make 'camcontrol modepage' support subpages.

MFC after: 2 weeks

7 years agoMake do_buff_decode() not read past the end of the buffer.
Alexander Motin [Sat, 7 Jan 2017 09:33:11 +0000 (09:33 +0000)]
Make do_buff_decode() not read past the end of the buffer.

Abort format processing as soon as we have no enough data.

MFC after: 2 weeks

7 years agoMove the mibII module up so uncommenting the bridge module works
Enji Cooper [Sat, 7 Jan 2017 09:03:40 +0000 (09:03 +0000)]
Move the mibII module up so uncommenting the bridge module works

Add a note about how module ordering and dependent modules

MFC after: 1 week

7 years agoConditionalize building libwrap support into sshd
Enji Cooper [Sat, 7 Jan 2017 08:08:35 +0000 (08:08 +0000)]
Conditionalize building libwrap support into sshd

Only build libwrap support into sshd if MK_TCP_WRAPPERS != no

This will unbreak the build if libwrap has been removed from the system

MFC after: 2 weeks
PR: 210141
Submitted by: kpect@protonmail.com
Differential Revision: D9049

7 years agoUnbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag
Enji Cooper [Sat, 7 Jan 2017 07:54:23 +0000 (07:54 +0000)]
Unbreak lib/libsysdecode after r311568 by decoding MSG_MORETOCOME flag
in msgflags

MFC after: 1 month
X-MFC with: r311568
Pointyhat to: jhb
Reported by: cy
Submitted by: Michael Butler <imb@protected-networks.net>
Sponsored by: Dell EMC Isilon

7 years ago[net80211] add syncflags methods for the VHT flags configuration.
Adrian Chadd [Sat, 7 Jan 2017 07:35:27 +0000 (07:35 +0000)]
[net80211] add syncflags methods for the VHT flags configuration.

I missed this in my last commit.  Pointy hat to me.

7 years agoCapsicum: add capability mode to users binary
Allan Jude [Sat, 7 Jan 2017 04:57:21 +0000 (04:57 +0000)]
Capsicum: add capability mode to users binary

Submitted by: Tyler Littlefield <tyler@tysdomain.com>
Reviewed by: cem, oshogbo
Differential Revision: https://reviews.freebsd.org/D9046

7 years ago[net80211] add some more bits.
Adrian Chadd [Sat, 7 Jan 2017 02:16:48 +0000 (02:16 +0000)]
[net80211] add some more bits.

7 years ago[ifconfig] add initial VHT (802.11ac) configuration and channel support to ifconfig.
Adrian Chadd [Sat, 7 Jan 2017 02:07:05 +0000 (02:07 +0000)]
[ifconfig] add initial VHT (802.11ac) configuration and channel support to ifconfig.

This is very preliminary and mostly enough for me (with other patches)
to work on VHT support.

It adds:

* VHT20, VHT40 and VHT80 regulatory/band awareness
* VHT20, VHT40 and VHT80 channel configuration / population
* Parses vht channel specifications (eg ifconfig wlan0 create wlandev athp0 wlanmode monitor channel 36:vht/80)
* Configuration of VHT, VHT40, VHT80, VHT80+80, VHT160 channel
  width (IEEE80211_FVHT_VHT* flags in net80211)

TODO:

* No VHT80+80 or VHT160 channels yet - I don't yet have hardware, and I'm
  not yet sure how to support/populate VHT80+80 channels.
* No, I won't update the manpage until this is "more done", lest someone
  tries using vht and gets upset with me.
* No, I won't commit the regulatory database I'm testing with, so you'll
  just end up with no VHT channels ever populated.  Which is good, as there
  isn't an 11ac driver in-tree yet to try it with.

7 years ago[net80211] add VHT ioctl parameters and driver capabilities
Adrian Chadd [Sat, 7 Jan 2017 01:59:39 +0000 (01:59 +0000)]
[net80211] add VHT ioctl parameters and driver capabilities

* Add the VHT capability element to the driver capabilities so ifconfig
  can see if VHT is available
* Add ioctl plumbing for enabling/disabling VHT and each of the VHT
  widths.

Note: this DOES change the ABI (the driver caps ioctl struct size, sigh)
so this will require a recompile of at least ifconfig.

7 years ago[lib80211] add VHT bands and channel flags.
Adrian Chadd [Sat, 7 Jan 2017 01:56:10 +0000 (01:56 +0000)]
[lib80211] add VHT bands and channel flags.

This is preparation work for 11ac support.  The regulatory database
needs to know about VHT channel flags and 80MHz (and later 160MHz)
available channel bands.

Whilst here, add the 2GHz VHT band (which is a terrible, terrible vendor
extension that almost all vendors do) just in preparation, even though
I don't (yet) plan on supporting it.

7 years ago[net80211] add VHT IEs to scan elements.
Adrian Chadd [Sat, 7 Jan 2017 01:54:32 +0000 (01:54 +0000)]
[net80211] add VHT IEs to scan elements.

In preparation for VHT station support, we need to store VHT IEs when
scanning so we can choose to upgrade to VHT.

This doesn't change the ABI - it just steals spare[] entries.

7 years ago[net80211] add VHT node flag; parsed chanwidth.
Adrian Chadd [Sat, 7 Jan 2017 01:53:27 +0000 (01:53 +0000)]
[net80211] add VHT node flag; parsed chanwidth.

The VHT operational element (VHTOPMODE) isn't a uint32_t - it's
the MCS sets, freq1/freq2 parameters and channel width.
So, store the channel width too in lieu of just storing the
IE struct.

This changes the VHT parameter layout in ieee80211_node but it
doesn't change ABI at all.

7 years ago[net80211] add FVHT flags for channel widths.
Adrian Chadd [Sat, 7 Jan 2017 01:51:54 +0000 (01:51 +0000)]
[net80211] add FVHT flags for channel widths.

The 11n code uses these bits for both configuration /and/ controlling
the channel width on softmac chips - it uses it to find the widest
width for all VAPs (eg a HT20 vap and a HT40 vap) to know what to
configure the ic_curchan.

For fullmac devices it isn't /as/ important, as each virtual device
exposed by the firmware will likely have its own configuration and the
firmware figures out what to do to enable it.

7 years ago[net80211] Remove duplicate VHTOPMODE configuration bits.
Adrian Chadd [Sat, 7 Jan 2017 01:49:34 +0000 (01:49 +0000)]
[net80211] Remove duplicate VHTOPMODE configuration bits.

These came from Linux mac80211 headers and are configuration bits, not
VHTOPMODE field parameters.

Whilst here, add the field names for the VHTCAP bits.

Tested:

* ath10k, 11ac STA mode

7 years agoFix file descriptor leaks in cmp(1)
Alan Somers [Sat, 7 Jan 2017 00:59:06 +0000 (00:59 +0000)]
Fix file descriptor leaks in cmp(1)

Also, add a few test cases

Reported by: Coverity
CID: 271624 275338
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9074

7 years agoIn tcpdump's print-tcp.c, avoid increasing alignment when taking the
Dimitry Andric [Sat, 7 Jan 2017 00:17:01 +0000 (00:17 +0000)]
In tcpdump's print-tcp.c, avoid increasing alignment when taking the
addresses of members of struct ip, which is packed.  Since the pointers
are only used for memcmp'ing, they can be pointing to void instead.

Note that upstream has removed the src and dst variables, in the mean
time.

MFC after: 3 days

7 years agoFix comment in t4_tom. No functional change.
Navdeep Parhar [Sat, 7 Jan 2017 00:08:55 +0000 (00:08 +0000)]
Fix comment in t4_tom.  No functional change.

MFC after: 3 days

7 years agoSet MORETOCOME for AIO write requests on a socket.
John Baldwin [Fri, 6 Jan 2017 23:41:45 +0000 (23:41 +0000)]
Set MORETOCOME for AIO write requests on a socket.

Add a MSG_MOREOTOCOME message flag. When this flag is set, sosend*
set PRUS_MOREOTOCOME when invoking the protocol send method. The aio
worker tasks for sending on a socket set this flag when there are
additional write jobs waiting on the socket buffer.

Reviewed by: adrian
MFC after: 1 month
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D8955

7 years agoEnable /usr/lib32 for o32 binaries on mips64.
John Baldwin [Fri, 6 Jan 2017 23:30:54 +0000 (23:30 +0000)]
Enable /usr/lib32 for o32 binaries on mips64.

Build and install an o32 set of libraries on mips64 suitable for
running o32 binaries via COMPAT_FREEBSD32. Enable COMPAT_FREEBSD32 in
MALTA64.

Reviewed by: jmallett, imp
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D9032

7 years agoSet -m32 in MD LIB32CPUCFLAGS rather than MI LIB32CFLAGS.
John Baldwin [Fri, 6 Jan 2017 23:20:59 +0000 (23:20 +0000)]
Set -m32 in MD LIB32CPUCFLAGS rather than MI LIB32CFLAGS.

Both amd64 and powerpc64 use -m32 to compile 32-bit binaries, but not
all platforms follow this convention.  Move the -m32 compile flag into
the per-architecture flags to accomodate other architectures.

Sponsored by: DARPA / AFRL

7 years agoLink llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled. When
Dimitry Andric [Fri, 6 Jan 2017 23:05:29 +0000 (23:05 +0000)]
Link llvm-ar to llvm-ranlib, if WITH_CLANG_EXTRAS is enabled.  When
invoked as llvm-ranlib, it can create an archive symbol table for
archives of objects compiled for LTO by an LLVM compiler.

Submitted by: Dan McGregor <danismostlikely@gmail.com>
MFC after: 3 days

7 years agoAfter r311459, some ports can break, because a few of the newly added
Dimitry Andric [Fri, 6 Jan 2017 21:40:30 +0000 (21:40 +0000)]
After r311459, some ports can break, because a few of the newly added
prototypes in <tcpd.h> use FILE.  Pull in a minimal forward declaration
of FILE from <stdio.h> to minimize impact.  Sorry for the breakage.

Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
X-MFC-With: r311459

7 years agoRegenerate src.conf(5) after r311548
Enji Cooper [Fri, 6 Jan 2017 21:14:07 +0000 (21:14 +0000)]
Regenerate src.conf(5) after r311548

MFC after: 1 week

7 years agoCarry over r311520 to tools/build/options/WITHOUT_USB_GADGET_EXAMPLES
Enji Cooper [Fri, 6 Jan 2017 21:08:19 +0000 (21:08 +0000)]
Carry over r311520 to tools/build/options/WITHOUT_USB_GADGET_EXAMPLES

Discussed with: wblock

r311520:

Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES.

PR: 215831
Submitted by: p5B2E9A8F@t-online.de
MFC after: 1 week
X-MFC with: r311520
Sponsored by: iXsystems

7 years agoMerge ^/head r311460 through r311545.
Dimitry Andric [Fri, 6 Jan 2017 20:33:48 +0000 (20:33 +0000)]
Merge ^/head r311460 through r311545.

7 years agoUpdate clang and lld Version.inc files.
Dimitry Andric [Fri, 6 Jan 2017 20:25:08 +0000 (20:25 +0000)]
Update clang and lld Version.inc files.

7 years agoMerge llvm, clang, lld and lldb trunk r291274, and resolve conflicts.
Dimitry Andric [Fri, 6 Jan 2017 20:24:06 +0000 (20:24 +0000)]
Merge llvm, clang, lld and lldb trunk r291274, and resolve conflicts.

7 years agoVendor import of libc++ trunk r291274:
Dimitry Andric [Fri, 6 Jan 2017 20:13:54 +0000 (20:13 +0000)]
Vendor import of libc++ trunk r291274:
https://llvm.org/svn/llvm-project/libcxx/trunk@291274

7 years agoVendor import of compiler-rt trunk r291274:
Dimitry Andric [Fri, 6 Jan 2017 20:13:44 +0000 (20:13 +0000)]
Vendor import of compiler-rt trunk r291274:
https://llvm.org/svn/llvm-project/compiler-rt/trunk@291274

7 years agoVendor import of llvm trunk r291274:
Dimitry Andric [Fri, 6 Jan 2017 20:13:21 +0000 (20:13 +0000)]
Vendor import of llvm trunk r291274:
https://llvm.org/svn/llvm-project/llvm/trunk@291274

7 years agotmpfs: perform a lockless check in tmpfs_itimes
Mateusz Guzik [Fri, 6 Jan 2017 19:58:20 +0000 (19:58 +0000)]
tmpfs: perform a lockless check in tmpfs_itimes

Most of the time the status is 0 as the function is repeatedly
called from tmpfs_getattr.

7 years agoFix clang 4.0.0 warnings about taking the address of a packed member of
Dimitry Andric [Fri, 6 Jan 2017 18:41:28 +0000 (18:41 +0000)]
Fix clang 4.0.0 warnings about taking the address of a packed member of
struct ip in ping(8):

sbin/ping/ping.c:1684:53: error: taking address of packed member
'ip_src' of class or structure 'ip' may result in an unaligned pointer
value [-Werror,-Waddress-of-packed-member]
        (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_src.s_addr));
                                                           ^~~~~~~~~~~~~~~~~
sbin/ping/ping.c:1685:53: error: taking address of packed member
'ip_dst' of class or structure 'ip' may result in an unaligned pointer
value [-Werror,-Waddress-of-packed-member]
        (void)printf(" %s ", inet_ntoa(*(struct in_addr *)&ip->ip_dst.s_addr));
                                                           ^~~~~~~~~~~~~~~~~

MFC after: 3 days

7 years agoRemove '-vd' option to make iasl(8) reproducible.
Jung-uk Kim [Fri, 6 Jan 2017 18:08:53 +0000 (18:08 +0000)]
Remove '-vd' option to make iasl(8) reproducible.

PR: 215421

7 years agoShow that the crunchgen configuration file name is not optional.
Warren Block [Fri, 6 Jan 2017 18:04:34 +0000 (18:04 +0000)]
Show that the crunchgen configuration file name is not optional.

PR: 215087
Submitted by: Iblis Lin <iblis@hs.ntnu.edu.tw>
MFC after: 1 week
Sponsored by: iXsystems

7 years agotmpfs: enabled MNTK_EXTENDED_SHARED
Mateusz Guzik [Fri, 6 Jan 2017 18:01:46 +0000 (18:01 +0000)]
tmpfs: enabled MNTK_EXTENDED_SHARED

Discussed with: kib

7 years agoLock tmpfs node tn_status updates done under the shared vnode lock.
Konstantin Belousov [Fri, 6 Jan 2017 17:43:36 +0000 (17:43 +0000)]
Lock tmpfs node tn_status updates done under the shared vnode lock.

If tmpfs vnode is only shared locked, tn_status field still needs
updates to note the access time modification.  Use the same locking
scheme as for UFS, protect tn_status with the node interlock + shared
vnode lock.

Fix nearby style.

Noted and reviewed by: mjg
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUse vnode lock assertion expression, and upgrade it to assert the
Konstantin Belousov [Fri, 6 Jan 2017 17:32:44 +0000 (17:32 +0000)]
Use vnode lock assertion expression, and upgrade it to assert the
required exclusive state of the vnode lock in tmpfs chflags, chmod,
chown, chsize, chtimes operations.

Fix nearby style.

Reviewed by: mjg
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoRemove dead code.
Konstantin Belousov [Fri, 6 Jan 2017 17:03:08 +0000 (17:03 +0000)]
Remove dead code.

Fifos overwrite file ops vector, and fifo VOP_KQFILTER is VOP_PANIC().

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoUse type-independent formats for printing nlink_t and ino_t.
Konstantin Belousov [Fri, 6 Jan 2017 16:59:33 +0000 (16:59 +0000)]
Use type-independent formats for printing nlink_t and ino_t.

Extracted from: ino64 work by gleb, mckusick
Discussed with: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoExplicitely add "opt_compat.h" to kern_exec.c: fix powerpc LINT builds.
Konstantin Belousov [Fri, 6 Jan 2017 16:56:24 +0000 (16:56 +0000)]
Explicitely add "opt_compat.h" to kern_exec.c: fix powerpc LINT builds.

sys/ptrace.h includes sys/signal.h, which includes sys/_sigset.h.
Note that sys/_sigset.h only defines osigset_t if COMPAT_43 was defined.

Two lines later, sys/ptrace.h includes machine/reg.h, which in case of
powerpc, includes opt_compat.h.

After the include headers reordering in r311345, we have sys/ptrace.h
included before sys/sysproto.h.

If COMPAT_43 was requested in the kernel config, the result is that
sys/_sigset.h does not define osigset_t, but sys/sysproto.h sees
COMPAT_43 and uses osigset_t.

Fix this by explicitely including opt_compat.h to cover the whole
kern/kern_exec.c scope.

Sponsored by: The FreeBSD Foundation

7 years agoFix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES.
Warren Block [Fri, 6 Jan 2017 16:43:45 +0000 (16:43 +0000)]
Fix src.conf(5) description of WITHOUT_USB_GADGET_EXAMPLES.

PR: 215831
Submitted by: p5B2E9A8F@t-online.de
MFC after: 1 week
Sponsored by: iXsystems

7 years agoAdd new USB device ID.
Kevin Lo [Fri, 6 Jan 2017 14:05:31 +0000 (14:05 +0000)]
Add new USB device ID.

7 years agoAdd some more mode page fields.
Alexander Motin [Fri, 6 Jan 2017 13:12:56 +0000 (13:12 +0000)]
Add some more mode page fields.

MFC after: 2 weeks

7 years agoAdd integration makefile for contrib/bsnmp/gensnmpdef
Enji Cooper [Fri, 6 Jan 2017 10:15:17 +0000 (10:15 +0000)]
Add integration makefile for contrib/bsnmp/gensnmpdef

It's a whole lot less error prone than generating the file completely
by hand.

MFC after: 1 week

7 years agoRemove unnecessary __unused attribute attached to `ctx` in op_begemot_mibII(..)
Enji Cooper [Fri, 6 Jan 2017 07:57:45 +0000 (07:57 +0000)]
Remove unnecessary __unused attribute attached to `ctx` in op_begemot_mibII(..)

MFC after: 3 days

7 years agoMFV r311477: xz 5.2.3.
Xin LI [Fri, 6 Jan 2017 07:54:53 +0000 (07:54 +0000)]
MFV r311477: xz 5.2.3.

MFC after: 2 weeks

7 years agoVendor import of xz-5.2.3 (trimmed).
Xin LI [Fri, 6 Jan 2017 06:35:21 +0000 (06:35 +0000)]
Vendor import of xz-5.2.3 (trimmed).

7 years agoif: Defer the if_up until the ifnet.if_ioctl is called.
Sepherosa Ziehau [Fri, 6 Jan 2017 05:10:49 +0000 (05:10 +0000)]
if: Defer the if_up until the ifnet.if_ioctl is called.

This ensures the interface is initialized by the interface driver
before it can be used by the rest of the system.

Reviewed by: jhb, karels, gnn
MFC after: 3 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8905

7 years agoUse getsock_cap() instead of fgetsock().
Gleb Smirnoff [Fri, 6 Jan 2017 04:38:38 +0000 (04:38 +0000)]
Use getsock_cap() instead of fgetsock().

Reviewed by: dchagin

7 years agoConditionalize all code that uses tcpd.h behind `LIBWRAP` guard
Enji Cooper [Fri, 6 Jan 2017 04:27:07 +0000 (04:27 +0000)]
Conditionalize all code that uses tcpd.h behind `LIBWRAP` guard

This will allow the code to stand by itself without libwrap

MFC after: 2 weeks

7 years agoConditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
Enji Cooper [Fri, 6 Jan 2017 04:22:25 +0000 (04:22 +0000)]
Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into amd(8).

MFC after: 2 weeks

7 years agoConditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
Enji Cooper [Fri, 6 Jan 2017 04:16:03 +0000 (04:16 +0000)]
Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into sendmail.

MFC after: 2 weeks

7 years agoConditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
Enji Cooper [Fri, 6 Jan 2017 04:13:08 +0000 (04:13 +0000)]
Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into rpcbind.

MFC after: 2 weeks

7 years agoConditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
Enji Cooper [Fri, 6 Jan 2017 04:10:33 +0000 (04:10 +0000)]
Conditionalize wrap(3) use based on MK_TCP_WRAPPERS instead of
always building support into ypserv.

MFC after: 2 weeks

7 years agoAdd uintmax_t casts to silence printf format warnings.
John Baldwin [Fri, 6 Jan 2017 00:41:30 +0000 (00:41 +0000)]
Add uintmax_t casts to silence printf format warnings.

The format strings weren't checked when stacksave_subr() used a function
pointer for printf instead of directly using db_printf().

Reported by: kib
Sponsored by: DARPA / AFRL

7 years agoRemove redundant cache initialization in JZ4780 SMP startup code
Alexander Kabaev [Fri, 6 Jan 2017 00:07:36 +0000 (00:07 +0000)]
Remove redundant cache initialization in JZ4780 SMP startup code

This was done out of pure paranoia when hunting for bugs in cache
and is not really required.

7 years agoMerge ACPICA 20161222.
Jung-uk Kim [Thu, 5 Jan 2017 21:28:25 +0000 (21:28 +0000)]
Merge ACPICA 20161222.

7 years agoAlso remove unnecessary extern keywords from tcpd.h.
Dimitry Andric [Thu, 5 Jan 2017 21:17:10 +0000 (21:17 +0000)]
Also remove unnecessary extern keywords from tcpd.h.

Noticed by: kib
X-MFC-With: r311459

7 years agoMerge ^/head r311314 through r311459.
Dimitry Andric [Thu, 5 Jan 2017 20:50:44 +0000 (20:50 +0000)]
Merge ^/head r311314 through r311459.

7 years agoPut proper prototypes in tcpd.h
Dimitry Andric [Thu, 5 Jan 2017 20:44:45 +0000 (20:44 +0000)]
Put proper prototypes in tcpd.h

Clang 4.0.0 complains about tcpd.h's not-really-prototypes, e.g.:

    /usr/include/tcpd.h:75:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
    extern int hosts_access();              /* access control */
                           ^

To fix this, turn these declarations into real prototypes.  While here,
garbage collect the incompatible rfc931() function from scaffold.c, as
it is never used.

Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9052

7 years agoUse compiler driver to link BERI boot loaders
Alexander Kabaev [Thu, 5 Jan 2017 19:17:14 +0000 (19:17 +0000)]
Use compiler driver to link BERI boot loaders

Do not hardcode elf64-tradbigmips as output format in BERI linker scrips.
Unfortunately, in-tree toolchain and external newer versions of binutils
mean two different things under that. When creating elf binaries using
external toolchain, gcc uses elf64-tradbigmips-freebsd and so linker
script file has to match in order for ld to be able to create the final loader
binary.

Rather than trying to guess, remove hardcoded output format directive from
the linker directive files and use CC to invoke the linker instead.

Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D9050