Displaying 1 50 of 334,270 commits (0.022s)

FreeBSD — stable/11/sys/netpfil/ipfw ip_dn_io.c ip_fw_table.c

MFC r321316, r337860:

Fix a few typos in comments.

FreeBSD — stable/11/sys/net if.c, stable/11/sys/netinet in.c ip_carp.c

MFC r312770 and r337854:

After the in_control() changes in r257692, an existing address is
(intentionally) deleted first and then completely added again (so all the
events, announces and hooks are given a chance to run).

This cause an issue with CARP where the existing CARP data structure is
removed together with the last address for a given VHID, which will cause
a subsequent fail when the address is later re-added.

This change fixes this issue by adding a new flag to keep the CARP data
structure when an address is not being removed.

There was an additional issue with IPv6 CARP addresses, where the CARP data
structure would never be removed after a change and lead to VHIDs which
cannot be destroyed.

PR:                229384
Sponsored by:        Rubicon Communications, LLC (Netgate)

FreeBSD — stable/11/cddl/lib/libnvpair Makefile, stable/11/cddl/lib/libzfs_core Makefile

MFC r337696: Use INCS for non-sys/ libnvpair and libzfs_core includes

While nothing was wrong with libnvpair.h, libzfs_core.h was only guarded by
MK_CDDL rather than MK_CDDL && MK_ZFS. Rather than ugl'if'ying
include/Makefile to impose the extra restriction, just move the non-sys/
includes into INCS with the respect lib builds.

This has the added bonus of allowing third party packagers to try and split
these libs out of the FreeBSD-runtime package, if they are so inclined.

The sys/ include was left alone- generally userland libraries shouldn't
install kernel headers.

FreeBSD — stable/11/lib/libc/stdlib getopt_long.3

MFC r337666: getopt_long(3): Document behavior, optstring leading characters

Leading '+', '-', and ':' in optstring have special meaning. We briefly
mention that the first two have special meaning in that we say
POSIXLY_CORRECT turns them off, but we don't actually document their
meaning. Add a paragraph to RETURN VALUES explaining how they control
the treatment of non-option arguments.

A leading ':' has no mention; add a note that it suppresses warnings about
missing arguments.

FreeBSD — stable/11/stand/i386/libi386 pxe.h

MFC r337524: libi386: Fix typo in pxe.h

PR:                207337

FreeBSD — stable/11/stand/libsa gets.c

MFC r337523: libsa: exit on EOF in ngets

It was possible in some rare circumstances for ngets to behave terribly with
bhyveload and some form of redirecting user input over a pipe.

PR:                198706
Delta File
+6 -2 stable/11/stand/libsa/gets.c
+6 -2 1 file

FreeBSD — stable/11/kerberos5/usr.bin/krb5-config Makefile

MFC r337665: krb5-config build: Remove gratuitous escaping

FreeBSD — head/sys/arm64/arm64 identcpu.c

use sbuf so that lines are printed together...  As aarch64 often
has SMP enabled, lines can get intermixed with other console output
making these lines hard to read...

Reviewed by:        manu
Differential Revision:        https://reviews.freebsd.org/D16689
Delta File
+188 -167 head/sys/arm64/arm64/identcpu.c
+188 -167 1 file

FreeBSD — head/sys/arm/nvidia tegra_uart.c, head/sys/dev/acpica acpi.c

add snps IP uart support / genaralize UART

This is an amalgam of a patch by Doug Ambrisko to
generalize uart_acpi_find_device, imp moving the
ACPI table to uart_dev_ns8250.c and advice by jhb
to work around a bug in the EPYC 3151 BIOS
(the BIOS incorrectly marks the serial ports as

Reviewed by: imp
MFC after: 8 weeks
Differential Revision: https://reviews.freebsd.org/D16432

FreeBSD — head/sys/powerpc/conf MPC85XX MPC85XXSPE

powerpc conf: Add PRINTF_BUFR_SIZE option to Book-E configs

Without this, printf is very hard to follow at times on multicore systems.

FreeBSD — head/sys/powerpc/include spr.h

Sort SPR_SPEFSCR in the SPR list

Also remove duplicate definition of SPR_IBAT0U.
Delta File
+1 -2 head/sys/powerpc/include/spr.h
+1 -2 1 file

FreeBSD — head/sys/conf ldscript.powerpc64

powerpc64: Align frequently used/exclusive data on cacheline boundaries

This is effectively a merge from amd64 of r312888, r323235, and r333486.

I've been running this on my POWER9 Talos for some time now with no ill

Suggested by:        mjg
Delta File
+14 -0 head/sys/conf/ldscript.powerpc64
+14 -0 1 file

FreeBSD — head/sys/arm/allwinner aw_syscon.c, head/sys/arm64/conf GENERIC

arm64: allwinner: Add aw_syscon driver to GENERIC

Recent DTS use the syscon for the emac controller.
We support this but since U-Boot is still using old DTS it was never
needed for us to add this support, but this is a problem when using upstream
recent DTS and will be when U-Boot will catch up.

While here add a new compatible to the aw_syscon driver as Linux changed it ...

FreeBSD — head/sys/powerpc/booke pmap.c

booke pmap: hide debug-ish printf behind bootverbose

It's not necessary during normal operation to know the mapped region size
and wasted space.
Delta File
+3 -2 head/sys/powerpc/booke/pmap.c
+3 -2 1 file

FreeBSD — head/sys/amd64/amd64 support.S trap.c, head/sys/amd64/include md_var.h

Update L1TF workaround to sustain L1D pollution from NMI.

Current mitigation for L1TF in bhyve flushes L1D either by an explicit
WRMSR command, or by software reading enough uninteresting data to
fully populate all lines of L1D.  If NMI occurs after either of
methods is completed, but before VM entry, L1D becomes polluted with
the cache lines touched by NMI handlers.  There is no interesting data
which NMI accesses, but something sensitive might be co-located on the
same cache line, and then L1TF exposes that to a rogue guest.

Use VM entry MSR load list to ensure atomicity of L1D cache and VM
entry if updated microcode was loaded.  If only software flush method
is available, try to help the bhyve sw flusher by also flushing L1D on
NMI exit to kernel mode.

Suggested by and discussed with: Andrew Cooper <andrew.cooper3 at citrix.com>
Reviewed by:        jhb
Sponsored by:        The FreeBSD Foundation
MFC after:        2 weeks
Differential revision:        https://reviews.freebsd.org/D16790

FreeBSD — head/stand/lua drawer.lua

lualoader: Add drawer-exported variables for default logodefs

Uncovered while writing the documentation from this, we previously
explicitly fell back to orb or orbbw if an invalid or incompatible logodef
was selected -- in contrast to branddefs, which have an exported variable
that one can whip up a quick local.lua to override in a safe manner that
works regardless of whether or not loader.conf(5) successfully loads.
Delta File
+4 -2 head/stand/lua/drawer.lua
+4 -2 1 file

FreeBSD — head/stand/lua drawer.lua

lualoader: Hide the rest of the private interfaces

These are less controversial than the others, thus done in a separate
commit. These are all used internally and ways to override are provided via
soon-to-be-documented API or loader.conf(5) variables.
Delta File
+56 -46 head/stand/lua/drawer.lua
+56 -46 1 file

FreeBSD — head/stand/lua drawer.lua

lualoader: Hide most of the internal drawing functions

Ideally, all of the functionality to revamp the loader screen has associated
APIs that are flexible enough that third-party scripts wouldn't need to
override these.
Delta File
+128 -128 head/stand/lua/drawer.lua
+128 -128 1 file

FreeBSD — head UPDATING, head/stand/userboot/userboot Makefile

Turn back the clock just a little: make userboot.so always be 4th

Turns out there was a hidden dependency we hasn't counted upon.  The
host load /boot/userboot.so to boot the VMs it runs. This means that
the change to lua meant suddently that nobody could run their older
VMs because LUA wasn't in 10.0, last month's HardenedBSD, 11.2 or
whatever.  Even more than for the /boot/loader* binaries, we need a
good coexistance strategy for this. While that's being designed and
implemented, drop back to always 4th for userboot.so. This will fail
safe in all but the most extreme environments (but lua-only hacks
to .lua files won't be processes in VMs until we fix it).

Differential Review: https://reviews.freebsd.org/D16805

FreeBSD — head/stand/lua drawer.lua

lualoader: Stop exporting drawer.draw

drawer.draw is the back-end for drawlogo and drawbrand and should not be
used directly.
Delta File
+9 -9 head/stand/lua/drawer.lua
+9 -9 1 file

FreeBSD — head/sys/x86/x86 local_apic.c

Fix a couple of comment nits.
Delta File
+2 -2 head/sys/x86/x86/local_apic.c
+2 -2 1 file

FreeBSD — head/sys/sys param.h

Bump __FreeBSD_version after r338059 (Chacha20 based arc4random(3)
and deprecation of arc4random_stir and arc4random_addrandom).
Delta File
+1 -1 head/sys/sys/param.h
+1 -1 1 file

FreeBSD — head/lib/libc/sys send.2 recv.2, head/share/man/man3 CMSG_DATA.3 Makefile

Document socket control message routines for ancillary data access (CMSG_DATA).

PR:                227777
Reviewed by:        bcr, eadler
Approved by:        mat (mentor), manpages (bcr)
Obtained from:        OpenBSD
Differential Revision:        https://reviews.freebsd.org/D15215

FreeBSD — head ObsoleteFiles.inc, head/contrib/ntp/lib/isc random.c

Update userland arc4random() with OpenBSD's Chacha20 based arc4random().


    Remove manual pages for arc4random_addrandom(3) and


    Eliminate in-tree usage of arc4random_addrandom().


    Eliminate in-tree usage of arc4random_stir().


    Remove arc4random_stir() and arc4random_addrandom() prototypes,
    provide temporary shims for transistion period.


    Hook arc4random-compat.c to build, add hint for Chacha20 source for

    [43 lines not shown]

FreeBSD — head/sys/x86/x86 mptable.c

Fix the MPTable probe code after the 4:4 changes on i386.

The MPTable probe code was using PMAP_MAP_LOW as the PA -> VA offset
when searching for the table signature but still using KERNBASE once
it had found the table.  As a result, the mpfps table pointed into a
random part of the kernel text instead of the actual MP Table.

Rather than adding more #ifdef's, use BIOS_PADDRTOVADDR from
<machine/pc/bios.h> which already uses PMAP_MAP_LOW on i386 and KERNBASE
on amd64.

Reviewed by:        kib
MFC after:        1 week
Differential Revision:        https://reviews.freebsd.org/D16802
Delta File
+5 -14 head/sys/x86/x86/mptable.c
+5 -14 1 file

FreeBSD — head/sys/ufs/ffs ffs_alloc.c

For traditional disks, the filesystem attempts to allocate the
blocks of a file as contiguously as possible. Since the filesystem
does not know how large a file will grow when it is first being
written, it initially places the file in a set of blocks in which
it currently fits. As it grows, it is relocated to areas with
larger contiguous blocks.  In this way it saves its large contiguous
sets of blocks for the files that need them and thus avoids
unnecessaily fragmenting its disk space.

We used to skip reallocating the blocks of a file into a contiguous
sequence if the underlying flash device requested BIO_DELETE
notifications, because devices that benefit from BIO_DELETE also
benefit from not moving the data. However, in the algorithm described
above that reallocates the blocks, the destination for the data is
usually moved before the data is written to the initially allocated
location. So we rarely suffer the penalty of extra writes.  With
the addition of the consolodation of contiguous blocks into single
BIO_DELETE operations, having fewer but larger contiguous blocks
reduces the number of (slow and expensive) BIO_DELETE operations.
So when doing BIO_DELETE consolodation, we do block reallocation.

Reviewed by:  kib
Tested by:    Peter Holm
Sponsored by: Netflix
Delta File
+15 -6 head/sys/ufs/ffs/ffs_alloc.c
+15 -6 1 file

FreeBSD — head/sys/ufs/ffs ffs_alloc.c

Add consolodation of TRIM / BIO_DELETE commands to the UFS/FFS filesystem.

When deleting files on filesystems that are stored on flash-memory
(solid-state) disk drives, the filesystem notifies the underlying
disk of the blocks that it is no longer using. The notification
allows the drive to avoid saving these blocks when it needs to
flash (zero out) one of its flash pages. These notifications of
no-longer-being-used blocks are referred to as TRIM notifications.
In FreeBSD these TRIM notifications are sent from the filesystem
to the drive using the BIO_DELETE command.

Until now, the filesystem would send a separate message to the drive
for each block of the file that was deleted. Each Gigabyte of file
size resulted in over 3000 TRIM messages being sent to the drive.
This burst of messages can overwhelm the drive's task queue causing
multiple second delays for read and write requests.

This implementation collects runs of contiguous blocks in the file
and then consolodates them into a single BIO_DELETE command to the
drive. The BIO_DELETE command describes the run of blocks as a
single large block being deleted. Each Gigabyte of file size can
result in as few as two BIO_DELETE commands and is typically less
than ten.  Though these larger BIO_DELETE commands take longer to
run, they do not clog the drive task queue, so read and write
commands can intersperse effectively with them.

    [11 lines not shown]
Delta File
+253 -50 head/sys/ufs/ffs/ffs_alloc.c
+253 -50 1 file

FreeBSD — head/sys/i386/include intr_machdep.h, head/sys/x86/include apicvar.h

Remove some vestiges of IPI_LAZYPMAP on i386.

The support for lazy pmap invalidations on i386 was removed in r281707.
This removes the constant for the IPI and stops accounting for it when
sizing the interrupt count arrays.

Reviewed by:        kib
MFC after:        2 weeks
Differential Revision:        https://reviews.freebsd.org/D16801

FreeBSD — head/stand/lua config.lua.8

Add config.lua(8) to the tree

Reviewed by:        0mp, rpokala (earlier version)
Differential Revision:        https://reviews.freebsd.org/D14819
Delta File
+188 -0 head/stand/lua/config.lua.8
+188 -0 1 file

FreeBSD — head/sys/netinet tcp_subr.c tcp_syncache.c

Don't expose the uptime via the TCP timestamps.

The TCP client side or the TCP server side when not using SYN-cookies
used the uptime as the TCP timestamp value. This patch uses in all
cases an offset, which is the result of a keyed hash function taking
the source and destination addresses and port numbers into account.
The keyed hash function is the same a used for the initial TSN.

Reviewed by:                rrs@
MFC after:                1 month
Sponsored by:                Netflix, Inc.
Differential Revision:        https://reviews.freebsd.org/D16636

FreeBSD — head/stand/libsa Makefile

libsa: Add lshrdi3.c for powerpc* and mips
Delta File
+2 -2 head/stand/libsa/Makefile
+2 -2 1 file

FreeBSD — head/lib/libc/stdlib set_constraint_handler_s.3 Makefile.inc, head/lib/libc/string memset.3

Provide set_constraint_handler_s(3) man page.

Mention abort_handler_s(3) and ignore_handler_s(3), provide
cross-reference from memset(3).

Submitted by:        Yuri Pankov <yuripv at yuripv.net>
MFC after:        3 days
Differential revision:        https://reviews.freebsd.org/D16797

FreeBSD — head UPDATING, head/stand defs.mk

stand: Flip the default interpreter to Lua

After years in the making, lualoader is ready to make its debut. Both
flavors of loader are still built by default, and may be installed as
/boot/loader or /boot/loader.efi as appropriate either by manually creating
hard links or using LOADER_DEFAULT_INTERP as documented in build(7).

Discussed with:        imp
Relnotes:        yes
Differential Revision:        https://reviews.freebsd.org/D16795
Delta File
+9 -0 head/UPDATING
+3 -3 head/stand/defs.mk
+12 -3 2 files

FreeBSD — head/lib/libc/string memset.3

Clarify that memset_s(3) requires __STDC_WANT_LIB_EXT1__ for visibility.
Fix typos and other nits.

Submitted by:        Yuri Pankov <yuripv at yuripv.net>
MFC after:        3 days
Differential revision:        https://reviews.freebsd.org/D16797
Delta File
+5 -5 head/lib/libc/string/memset.3
+5 -5 1 file

FreeBSD — head/lib/libc/stdlib Makefile.inc

Use tab for indent.

Submitted by:        Yuri Pankov <yuripv at yuripv.net>
MFC after:        3 days
Delta File
+1 -1 head/lib/libc/stdlib/Makefile.inc
+1 -1 1 file

FreeBSD — head/sys/contrib/ipfilter/netinet ip_nat.c

The bucket index is subtracted by one at lines 2304 and 2314.  When 0 it
becomes -1, except these are unsigned integers, so they become very large
numbers. Thus are always larger than the maximum bucket; the hash table
insertion fails causing NAT to fail.

This commit ensures that if the index is already zero it is not reduced
prior to insertion into the hash table.

PR:                208566

FreeBSD — head/sys/contrib/ipfilter/netinet ip_nat.c

Add handy DTrace probes useful in diagnosing NAT issues. DTrace probes
are situated next to error counters and/or in one instance prior to the
-1 return from various functions. This was useful in diagnosis of
PR/208566 and will be handy in the future diagnosing NAT failures.

PR:                208566
MFC after:        3 days

FreeBSD — head/sys/contrib/ipfilter/netinet ip_nat.c

Expose np (nat_t - an entry in the nat table structure) in the DTrace
probe when nat fails (label badnat). This is useful in diagnosing
failed NAT issues and was used in PR/208566.

PR:                208566
MFC after:        3 days

FreeBSD — head/share/man/man3 pthread_set_name_np.3

Fix typo.

Noted by:        Yuri Pankov <yuripv at yuripv.net>
MFC after:        12 days

FreeBSD — head/share/man/man7 build.7


This controls what interpreter the default boot loader in
/boot/loader{,.efi} is, and which one we compile into userboot by
Delta File
+12 -0 head/share/man/man7/build.7
+12 -0 1 file

FreeBSD — head ObsoleteFiles.inc, head/targets/pseudo/userland Makefile.depend

send-pr: wave goodbye

Entering into the world of 12.x we no longer need even the placeholder
for send-pr. It has not done anything for some time.

With Hat: bugmeister

FreeBSD — head/targets/pseudo/userland Makefile.depend

build: remove reference to some dead utilities

FreeBSD — head/usr.bin/diff diffreg.c

diff(1): Refactor -B a little bit

Instead of doing a second pass to skip empty lines if we've specified -I, go
ahead and check both at once. Ignore critera has been split out into its own
function to try and keep the logic cleaner.
Delta File
+23 -31 head/usr.bin/diff/diffreg.c
+23 -31 1 file

FreeBSD — head/usr.bin/diff diffreg.c diff.1, head/usr.bin/diff/tests diff_test.sh Bflag_F.out

diff(1): Implement -B/--ignore-blank-lines

As noted by cem in r338035, coccinelle invokes diff(1) with the -B flag.
This was not previously implemented here, so one was forced to create a link
for GNU diff to /usr/local/bin/diff

Implement the -B flag and add some primitive tests for it. It is implemented
in the same fashion that -I is implemented; each chunk's lines are scanned,
and if a non-blank line is encountered then the chunk will be output.
Otherwise, it's skipped.

MFC after:        2 weeks

FreeBSD — head/sys/dev/sound/pci csa.c

Extending the delay cycles to give the codec more time to pump ADC data across the 

Without this patch, some CS4614 cards will need users to reload the driver manually or
the hardware won't be initialised properly. Something like:

        # kldload snd_csa
        # kldunload snd_csa
        # kldload snd_csa

Tested with:        Terratec SiXPack 5.1+
Delta File
+1 -1 head/sys/dev/sound/pci/csa.c
+1 -1 1 file

FreeBSD — head/sys/crypto/ccp ccp.c, head/sys/dev/aac aac_pci.c

Back out r338035 until Warner is finished churning GSoC PNP patches

I was not aware Warner was making or planning to make forward progress in
this area and have since been informed of that.

It's easy to apply/reapply when churn dies down.

FreeBSD — stable/11/sys/netpfil/pf pf_if.c

MFC r337643:

pf: Fix 'set skip on' for groups

The pfi_skip_if() function sometimes caused skipping of groups to work,
if the members of the group used the groupname as a name prefix.
This is often the case, e.g. group lo usually contains lo0, lo1, ...,
but not always.

Rather than relying on the name explicitly check for group memberships.

Obtained from:        OpenBSD (pf_if.c,v 1.62, pf_if.c,v 1.63)
Delta File
+14 -4 stable/11/sys/netpfil/pf/pf_if.c
+14 -4 1 file

FreeBSD — head/sys/crypto/ccp ccp.c, head/sys/dev/aac aac_pci.c

Remove unused and easy to misuse PNP macro parameter

Inspired by r338025, just remove the element size parameter to the
MODULE_PNP_INFO macro entirely.  The 'table' parameter is now required to
have correct pointer (or array) type.  Since all invocations of the macro
already had this property and the emitted PNP data continues to include the
element size, there is no functional change.

Mostly done with the coccinelle 'spatch' tool:

  $ cat modpnpsize0.cocci
    identifier b,c;
    expression a,d,e;
    declarer MODULE_PNP_INFO;

    identifier b,c,d;
    expression a;
    declarer MODULE_PNP_INFO;

    [12 lines not shown]

FreeBSD — stable/10/contrib/libarchive/libarchive archive_read_support_format_iso9660.c

MFH r337745:
Sync libarchive with vendor..

Vendor changes:
  PR #1042: validate iso9660 directory record length

MFC after:        3 days
Security:        CVE-2017-14501

FreeBSD — stable/11/contrib/libarchive/libarchive archive_read_support_format_iso9660.c

MFH r337745:
Sync libarchive with vendor..

Vendor changes:
  PR #1042: validate iso9660 directory record length

MFC after:        3 days
Security:        CVE-2017-14501