Displaying 1 50 of 329,196 commits (0.042s)

FreeBSD — head/usr.sbin/pwd_mkdb pwd_mkdb.c

pwd_mkdb: default to network (big) endian hash order

For cross-architecture reproducibility.  The db(3) functions work with
hashes of either endianness, and the current (v4) version password db
entries already store integers in network order.  Do so with the hash as
well so that identical password databases can be created on big- and
little-endian hosts.

The -B and -L flags exist to set the endianness for legacy (v3) entries
when the -l flag is used, and they will still control hash endianness
(at least until the backwards compatibility infrastructure is removed).

MFC after:        1 week
Sponsored by:        The FreeBSD Foundation
Delta File
+1 -1 head/usr.sbin/pwd_mkdb/pwd_mkdb.c
+1 -1 1 file

FreeBSD — head/sys/cddl/dev/dtmalloc dtmalloc.c, head/sys/kern kern_malloc.c

dtrace: depessimize dtmalloc when dtrace is active

Each malloc/free was testing dtrace_malloc_enabled and forcing
extra reads from the malloc type struct to see if perhaps a
dtmalloc probe was on.

Treat it like lockstat and sdt: have a global bolean.

FreeBSD — head/sys/cddl/dev/sdt sdt.c, head/sys/kern kern_lockstat.c

lockstat: track lockstat just like sdt probes

In particular flip the frequently tested var to bool.

FreeBSD — stable/11/lib/clang/include/lld/Common Version.inc

MFC r332649: lld: add a __FreeBSD_version-style identifier to version

This will faciliate a WITH_SYSTEM_LINKER option.

MFC r332803:
lld: use correct number of digits in __FreeBSD_version-style ID

__FreeBSD_version-style IDs should have 5 digits following the major.

Also, use 11xxxxx for stable/11.

Sponsored by:        The FreeBSD Foundation

FreeBSD — head/contrib/llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Pull in r329771 from upstream llvm trunk (by Craig Topper):

  [X86] In X86FlagsCopyLowering, when rewriting a memory setcc we need
  to emit an explicit MOV8mr instruction.

  Previously the code only knew how to handle setcc to a register.

  This should fix a crash in the chromium build.

This fixes various assertion failures while building ports targeting
* www/firefox: isReg() && "This is not a register operand!"
* www/iridium, www/qt5-webengine: (I.atEnd() || std::next(I) ==
  def_instr_end()) && "getVRegDef assumes a single definition or no
* devel/powerpc64-gcc: FromReg != ToReg && "Cannot replace a reg with

Reported by:        jbeich
PR:                225330, 227686, 227698, 227699
MFC after:        1 week
X-MFC-With:        r332833

FreeBSD — head/sys/dev/nvme nvme_ns.c

Migrate to make_dev_s interface to populate /dev/nvmeX entries

Submitted by: Michael Hordijk
Differential Revision: https://reviews.freebsd.org/D15162
Delta File
+11 -4 head/sys/dev/nvme/nvme_ns.c
+11 -4 1 file

FreeBSD — head/sys/kern kern_malloc.c

malloc: stop reading the subzone if MALLOC_DEBUG_MAXZONES == 1 (the default)

malloc was showing at the top of profile during while running microbenchmarks.

#define DTMALLOC_PROBE_MAX              2
struct malloc_type_internal {
        uint32_t        mti_probes[DTMALLOC_PROBE_MAX];
        u_char          mti_zone;
        struct malloc_type_stats        mti_stats[MAXCPU];

Reading mti_zone it wastes a cacheline to hold mti_probes + mti_zone
(which we know is 0) + part of malloc stats of the first cpu which on top
induces false-sharing.

In particular will-it-scale lock1_processes -t 128 -s 10:
before: average:45879692
after:  average:51655596

Note the counters can be padded but the right fix is to move them to
counter(9), leaving the struct read-only after creation (modulo dtrace
Delta File
+36 -19 head/sys/kern/kern_malloc.c
+36 -19 1 file

FreeBSD — head/lib/libifconfig libifconfig_media.c, head/sbin/etherswitchcfg ifmedia.c

Finish removing FDDI and tokenring media support.

This fixes media display for 802.11 wireless devices.

Software outside the base system that uses these media types and
defines should use #ifdef IFM_FDDI or IFM_TOKEN to include or remove

Reported by:        zeising
Reviewed by:        emaste, kib, zeising
Tested by:        zeising
Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D15170

FreeBSD — head/cddl/lib/libdtrace tcp.d, head/sys/kern uipc_socket.c uipc_debug.c

Load balance sockets with new SO_REUSEPORT_LB option

This patch adds a new socket option, SO_REUSEPORT_LB, which allow multiple
programs or threads to bind to the same port and incoming connections will be
load balanced using a hash function.

Most of the code was copied from a similar patch for DragonflyBSD.

However, in DragonflyBSD, load balancing is a global on/off setting and can not
be set per socket. This patch allows for simultaneous use of both the current
SO_REUSEPORT and the new SO_REUSEPORT_LB options on the same system.

Required changes to structures
Globally change so_options from 16 to 32 bit value to allow for more options.
Add hashtable in pcbinfo to hold all SO_REUSEPORT_LB sockets.

As DragonflyBSD, a load balance group is limited to 256 pcbs
(256 programs or threads sharing the same socket).

Submitted by:        Johannes Lundberg <johanlun0 at gmail.com>
Sponsored by:        Limelight Networks
Differential Revision:        https://reviews.freebsd.org/D11003

FreeBSD — head/sys/compat/linux linux_errno.inc


Previously EDOOFUS mapped to EBUSY.  EINVAL seems more appropriate.

Discussed with:        cem
MFC after:        1 week
Sponsored by:        Turing Robotic Industries Inc.

FreeBSD — head/sys/arm/include atomic-v4.h

Implement 32-bit atomic_fcmpset() in userland for armv4/v5.

- Add an implementation of atomic_fcmpset_32() using RAS for armv4/v5.
  This fixes recent world breakage due to use of atomic_fcmpset() in
- While here, be more careful to not expose wrapper macros for 64-bit
  atomic_*cmpset to userland for armv4/v5 as only 32-bit cmpset is

This has been reviewed, but not runtime-tested, but should fix the arm.arm
and arm.armeb worlds that have been broken for a while.

Reviewed by:        imp
MFC after:        1 month
Differential Revision:        https://reviews.freebsd.org/D15147
Delta File
+31 -3 head/sys/arm/include/atomic-v4.h
+31 -3 1 file

FreeBSD — head/sys/arm/include atomic-v6.h atomic-v4.h

Fix some harmless type mismatches in the ARM atomic_cmpset implementations.

The return value of atomic_cmpset() and atomic_fcmpset() is an int (which
is really a bool) that has the values 0 or 1.  Some of the inlines were
using the type being operated on (e.g. uint32_t) as either the return type
of the function, or the type of a local 'ret' variable used to hold the
return value.  Fix all of these to just use plain 'int'.  Due to C promotion
rules and the fact that the value can only be 0 or 1, these should all be

Reviewed by:        imp (only the v4 ones)
MFC after:        1 week
Differential Revision:        https://reviews.freebsd.org/D15147

FreeBSD — head/sys/dev/sound/pci/hda hdaa_patches.c hdac.h

 - add quirk for Dell XPS9560 audio gleaned and massages from linux


Submitted by:        K Staring
MFC after:        3 days
Relnotes:        yes

FreeBSD — stable/11/sys/netinet in_pcb.c

MFC r331745 (by np):
  Fix RSS build (broken in r331309).

  Sponsored by: Chelsio Communications

PR:                227691
Pointy-hat to:        jtl
Delta File
+2 -2 stable/11/sys/netinet/in_pcb.c
+2 -2 1 file

FreeBSD — stable/10/release/arm GUMSTIX.conf PANDABOARD.conf, stable/11/release/arm RPI-B.conf BEAGLEBONE.conf

MFC r332674:
 Increase the msdosfs partition size on arm SoC images where the
 current size may not be sufficiently large for development and/or

PR:                227548
Sponsored by:        The FreeBSD Foundation

FreeBSD — head/sys/arm/conf SOCFPGA, head/sys/dts/arm socfpga_arria10_socdk_sdmmc.dts

Enable ARM PL330 DMA engine and Cadence Quad SPI flash controller on
Intel Arria 10 SoC boards.

Tested on Intel Arria 10 SoC Development Kit.

Sponsored by:        DARPA, AFRL

FreeBSD — head/sys/netinet6 icmp6.c

icmp6_reflect() sends ICMPv6 message with new IPv6 header. So, it is
considered as originated by our host packet. And thus rcvif should be
NULL, since it is used by ipfw(4) to determine that packet was originated
from this host. Some of icmp6_reflect() consumers reuse mbuf and m_pkthdr
without resetting rcvif pointer. To avoid this always reset m_pkthdr.rcvif
pointer to NULL in icmp6_reflect(). Also remove such line and comment
describing this from icmp6_error(), since it does not longer matters.

PR:                227674
Reported by:        eugen
MFC after:        1 week
Delta File
+1 -10 head/sys/netinet6/icmp6.c
+1 -10 1 file

FreeBSD — head/sys/conf files, head/sys/dev/flash cqspi.c n25q.c

Add driver for Cadence Quad SPI Flash Controller found on
Intel® Arria® 10 SoC.

Cadence Quad SPI Flash is not generic SPI controller, but SPI flash
controller, so don't use spibus here, instead provide quad spi flash

Since it is not on spibus, then mx25l flash device driver is not usable
here, so provide new n25q flash device driver with quad spi flash

Sponsored by:        DARPA, AFRL
Differential Revision:        https://reviews.freebsd.org/D10245

FreeBSD — stable/11/share/misc committers-src.dot

MFC r332386, r332430:
  Updated mentors information.
  Added entry in the correct section.

Approved by: mav

FreeBSD — stable/11/sys/dev/ocs_fc ocs_os.h ocs_os.c

MFC r332471, r332646:
   Check if STACK is defined before using the stack(9).
   Moved opts-stack.h include before all other includes.

Approved by: mav

FreeBSD — head/sys/kern kern_lockf.c

lockf: add per-chain locks to the owner hash

This combined with previous changes significantly depessimizes the behaviour
under contentnion.

In particular the lock1_processes test (locking/unlocking separate files)
from the will-it-scale suite was executed with 128 concurrency on a
4-socket Broadwell with 128 hardware threads.

Operations/second (lock+unlock) go from ~750000 to ~45000000 (6000%)
For reference single-process is ~1680000 (i.e. on stock kernel the resulting
perf is less than *half* of the single-threaded run),

Note this still does not really scale all that well as the locks were just
bolted on top of the current implementation. Significant room for improvement
is still here. In particular the top performance fluctuates depending on the
extent of false sharing in given run (which extends beyond the file).
Added chain+lock pairs were not padded w.r.t. cacheline size.

One big ticket item is the hash used for spreading threads: it used to be the
process pid (which basically serialized all threaded ops). Temporarily the
vnode addr was slapped in instead.

Tested by:      pho
Delta File
+27 -18 head/sys/kern/kern_lockf.c
+27 -18 1 file

FreeBSD — head/sys/kern kern_lockf.c

lockf: skip locking the graph if not necessary (common case)

Tested by:      pho
Delta File
+9 -6 head/sys/kern/kern_lockf.c
+9 -6 1 file

FreeBSD — head/sys/kern kern_lockf.c

lockf: perform wakeup onlly when there is anybody waiting

Tested by:      pho
Delta File
+2 -1 head/sys/kern/kern_lockf.c
+2 -1 1 file

FreeBSD — head/sys/kern kern_lockf.c

lockf: skip the hard work in lf_purgelocks if possible

Tested by:      pho
Delta File
+7 -0 head/sys/kern/kern_lockf.c
+7 -0 1 file

FreeBSD — head/sys/kern kern_lockf.c

lockf: free state only when recycling the vnode

This avoids malloc/free cycles when locking/unlocking the vnode when
nobody is contending.

Tested by:        pho
Delta File
+50 -71 head/sys/kern/kern_lockf.c
+50 -71 1 file

FreeBSD — head/usr.sbin/syslogd syslogd.c

Correct size for allocation and bzero of fdsr.

MFC after:        2 weeks
Delta File
+2 -2 head/usr.sbin/syslogd/syslogd.c
+2 -2 1 file

FreeBSD — head/usr.bin/grep file.c

bsdgrep: Fix build failure WITHOUT_LZMA (incorrect bracket placement)

Submitted by:        sbruno
Reported by:        sbruno
Delta File
+1 -1 head/usr.bin/grep/file.c
+1 -1 1 file

FreeBSD — head/usr.sbin/pwd_mkdb pwd_mkdb.8

pwd_mkdb: add deprecation notice in manpage too

Followon to r332789; as reported on the -current and -stable lists and
in review D15144 the -l option will be removed before FreeBSD 12.0.
Delta File
+6 -1 head/usr.sbin/pwd_mkdb/pwd_mkdb.8
+6 -1 1 file

FreeBSD — head/share/misc committers-src.dot

Update committers-src.dot to show the mentorship arrangement for myself: eadler has agreed 
to mentor me.

FreeBSD — head/share/misc committers-src.dot, head/usr.bin/calendar/calendars calendar.freebsd

Update account and given names in committers-src.dot and calendar.freebsd

I have changed my given name from Bruce to Rebecca, and my FreeBSD account
from brucec to bcran.
Update committers-src.dot and calendar.freebsd to show these changes.

Reviewed by:        rrs
Differential Revision: https://reviews.freebsd.org/D15125

FreeBSD — head/sys/kern vfs_bio.c

Make bufdaemon and bufspacedaemon use kthread_suspend_check instead of
kproc_suspend_check.  In r329612 bufspacedaemon was turned into a thread
of the bufdaemon process causing both to call kproc_suspend_check with the
same proc argument and that function contains the following while loop:

while (SIGISMEMBER(p->p_siglist, SIGSTOP)) {
        msleep(&p->p_siglist, &p->p_mtx, PPAUSE, "kpsusp", 0);

So one thread wakes up the other and the other wakes up the first again,
locking up UP machines on shutdown.

Also register the shutdown handlers with SHUTDOWN_PRI_LAST + 100 so they
run after the syncer has shutdown, because the syncer can cause a
situation where bufdaemon help is needed to proceed.

PR:                227404
Reviewed by:        kib
Tested by:        cy, rmacklem
Delta File
+7 -4 head/sys/kern/vfs_bio.c
+7 -4 1 file

FreeBSD — head/sys/kern kern_descrip.c kern_lockf.c

lockf: slightly depessimize

1. check if P_ADVLOCK is already set and if so, don't lock to set it
(stolen from DragonFly)
2. when trying for fast path unlock, check that we are doing unlock
first instead of taking the interlock for no reason (e.g. if we want
to *lock*). whilere make it more likely that falling fast path will
not take the interlock either by checking for state

Note the code is severely pessimized both single- and multithreaded.

FreeBSD — head/contrib/ofed/libibverbs init.c

Remove the "load drivers" logic from libibverbs.

The "load drivers" logic in the libibverbs configuration file is relevant
for Linux only.

MFC after:        3 days
Sponsored by:        Mellanox Technologies
Delta File
+0 -263 head/contrib/ofed/libibverbs/init.c
+0 -263 1 file

FreeBSD — head/sys/powerpc/include cpu.h, head/sys/powerpc/powerpc cpu.c

Fix the build post r332859

sysentvec::sv_hwcap/sv_hwcap2 are pointers to  u_long, so cpu_features* need
to be u_long to use the pointers.  This also requires a temporary cast in
printing the bitfields, which is fine because the feature flag fields are
only 32 bits anyway.

FreeBSD — head/cddl/usr.sbin/dwatch/libexec sendrecv

dwatch(1): Remove the line used to demonstrate `-dev' option

In recently added sendrecv profile, there was a line purposefully
added to introduce a compilation error in which `-dev' is used to
debug the entry. Removing the entry.

Sponsored by:        Smule, Inc.

FreeBSD — head/cddl/usr.sbin/dwatch/libexec sendrecv Makefile

dwatch(1): Add profile for send(2)/recv(2) syscalls

Sponsored by:        Smule, Inc.

FreeBSD — head/cddl/usr.sbin/dwatch dwatch

dwatch(1): Add `-dev' option to aid debugging of profiles

The options `-d' (debug), `-e' (exit after compile), and `-v' (verbose)
when combined in any order (though best remembered as `-dev') will run
the conflated script through dtrace(1), test for error conditions, and
show the line that dtrace(1) failed at (with context).

If no errors are found, the output is the same as `-e[v]'.

When writing a new profile for dwatch(1), you can quickly test to
make sure it compiles by running `dwatch -devX profile_name' where
profiles live in /usr/libexec/dwatch or /usr/local/libexec/dwatch
(the latter being where profiles installed via ports should go).

Sponsored by:        Smule, Inc.
Delta File
+63 -1 head/cddl/usr.sbin/dwatch/dwatch
+63 -1 1 file

FreeBSD — stable/11/etc/rc.d ddb

MFC r332773: Fix ddb rc script

r288291 added a call to limits(1), which isn't available before partitions
are mounted. This broke the ddb rc script, which does not provide its own

Alleviate the situation here by providing a start_cmd. We still have other
problems with diskless setups that need to be considered, but this is a

PR:                206291
Delta File
+6 -0 stable/11/etc/rc.d/ddb
+6 -0 1 file

FreeBSD — projects/pnfs-planb-server/sys/fs/nfsclient nfs_clrpcops.c

Fix nfsrpc_layoutreturn() and nfscl_dofflayoutio() for the Flexible File
Layout returns/recalls and I/O errors against the DS.

FreeBSD — projects/pnfs-planb-server/sys/fs/nfs nfs_var.h nfsclstate.h, projects/pnfs-planb-server/sys/fs/nfsclient nfs_clstate.c nfs_clport.c

Add NFSv4.1 client support for Flexible File Layout callbacks and the
generation of Ioerr stats for the LayoutReturn reply.
These changes are needed by the client to do testing of the mirrored
pNFS server configuration.

FreeBSD — head/sys/dev/bktr msp34xx.c

Remove unused definition bl_dfp; fix build with bktr compiled into kernel

PR:                216566
Submitted by:        mail at fbsd.e4m.org
Reviewed by:        riggs, cognet
Approved by:        cognet
MFC after:        3 days
Delta File
+0 -4 head/sys/dev/bktr/msp34xx.c
+0 -4 1 file

FreeBSD — head/sys/kern kern_shutdown.c

When running with INVARIANTS, the kernel contains extra checks.  However,
these assumptions may not hold true once we've panic'd. Therefore, the
checks hold less value after a panic.  Additionally, if one of the checks
fails while we are already panic'd, this creates a double-panic which can
interfere with debugging the original panic.

Therefore, this commit allows an administrator to suppress a response to
KASSERT checks after a panic by setting a tunable/sysctl.  The
tunable/sysctl (debug.kassert.suppress_in_panic) defaults to being

Reviewed by:        kib
Sponsored by:        Netflix, Inc.
Differential Revision:        https://reviews.freebsd.org/D12920
Delta File
+9 -0 head/sys/kern/kern_shutdown.c
+9 -0 1 file

FreeBSD — head/sys/powerpc/powerpc elf32_machdep.c elf64_machdep.c

Export powerpc CPU features for auxvec

FreeBSD exports the AT_HWCAP* auxvec items if provided by the ELF sysentvec
structure.  Add the CPU features to be exported, so user space can more
easily check for them without using the hw.cpu_features and hw.cpu_features2

FreeBSD — head/usr.bin/grep util.c

bsdgrep: Use grep_strdup instead of grep_malloc+strcpy
Delta File
+1 -2 head/usr.bin/grep/util.c
+1 -2 1 file

FreeBSD — head/etc/defaults rc.conf, head/etc/rc.d cfumass Makefile

Add cfumass rc script, to create a LUN for cfumass(4).

MFC after:        2 weeks
Relnotes:        yes
Sponsored by:        The FreeBSD Foundation
Differential Revision:        https://reviews.freebsd.org/D14844

FreeBSD — head/usr.bin/grep util.c

bsdgrep: Fix --include/--exclude ordering issues

Prior to r332851:
* --exclude always win out over --include
* --exclude-dir always wins out over --include-dir

r332851 broke that behavior, resulting in:
* First of --exclude, --include wins
* First of --exclude-dir, --include-dir wins

As it turns out, both behaviors are wrong by modern grep standards- the
latest rule wins. e.g.:

`grep --exclude foo --include foo 'thing' foo`
foo is included

`grep --include foo --exclude foo 'thing' foo`
foo is excluded

As tested with GNU grep 3.1.

This commit makes bsdgrep follow this behavior.

Reported by:        se
Delta File
+10 -4 head/usr.bin/grep/util.c
+10 -4 1 file

FreeBSD — stable/11/usr.bin/clang/clang clang.1

MFC r332414:

Regenerate clang man page after upstream change to document the possible
values for the -std= option.

Noticed by:        Steve Kargl
Obtained from:        https://reviews.llvm.org/rL329827
Delta File
+258 -3 stable/11/usr.bin/clang/clang/clang.1
+258 -3 1 file

FreeBSD — head/sys/powerpc/include cpu.h, head/sys/powerpc/powerpc cpu.c

Sync powerpc feature flags with Linux

Not all feature flags are synced.  Those for processors we don't currently
support are ignored currently.  Those that are supported are synced best I
can tell.  One flag was renamed to match the Linux flag name

FreeBSD — head/sys/conf files, head/sys/modules/blake2 Makefile

blake2: Disable warnings (not just error) for code we will not modify

Leave libb2 pristine and silence the warnings for mjg.

FreeBSD — head/usr.bin/grep file.c

bsdgrep: if chain => switch

This makes some of this a little easier to follow (in my opinion).
Delta File
+70 -49 head/usr.bin/grep/file.c
+70 -49 1 file