]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r341357:
Guangyuan Yang [Tue, 4 Dec 2018 02:30:11 +0000 (02:30 +0000)]
MFC r341357:

Clarify that patterns are extended regular expressions in pkill(1) manual page.

PR: 231060
Submitted by: naddy

5 years agoMFC r340110: ipfw(8): clarify layer2 processing abilities
Eugene Grosbein [Tue, 4 Dec 2018 00:41:12 +0000 (00:41 +0000)]
MFC r340110: ipfw(8): clarify layer2 processing abilities

Make it clear that ipfw action set for layer2 frames is a bit limited.

PR: 59835
Reviewed by: yuripv
Differential Revision: https://reviews.freebsd.org/D17719

5 years agoMFC r339627:
Kristof Provost [Mon, 3 Dec 2018 22:02:08 +0000 (22:02 +0000)]
MFC r339627:

pf tests: Fix incorrect test for PR 231323

Fix r339466.  The test result file did not list the rdr rule.
Additionally, the route-to rule needs a redirection address.

PR: 233739

5 years agoMFC r341156:
Stephen Hurd [Mon, 3 Dec 2018 15:18:35 +0000 (15:18 +0000)]
MFC r341156:

Fix first-packet completion

The first packet after the ring is initialized was never
completed as isc_txd_credits_update() would not include it in the
count of completed packets. This caused netmap to never complete
a batch. See PR 233022 for more details.

This is the same fix as the r340310 for e1000

PR: 233607
Reported by: lev
Reviewed by: lev
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D18368

5 years agoMFC r341001:
Mark Johnston [Mon, 3 Dec 2018 15:14:40 +0000 (15:14 +0000)]
MFC r341001:
Check for an allocation failure before dereferencing the pointer.

5 years agoMFC r341071, r341160
Ian Lepore [Mon, 3 Dec 2018 04:07:18 +0000 (04:07 +0000)]
MFC r341071, r341160

r341071:
Restore the ability to override the disk unit/partition at the boot: prompt
in gptboot.

When arch-independent geli support was added, a new static 'gdsk' struct
was added, but there was still a static 'dsk' struct, and when you typed
in an alternate disk/partition, the string was parsed into that struct,
which was then never used for anything.  Now the string gets parsed into
gdsk.dsk, the struct that's actually used.

r341160:
Add comments describing the bootargs handoff between loader(8) and gptboot
or zfsboot, when loader(8) is the BTX loader.  No functional changes.

5 years agoMFC r340095: Remove apparently unused 0-byte files that cause grief on Windows
Ed Maste [Mon, 3 Dec 2018 02:32:39 +0000 (02:32 +0000)]
MFC r340095: Remove apparently unused 0-byte files that cause grief on Windows

r235274 added a sort regression test (it operates by comparing output
against GNU sort).  The commit included a number of 0-byte files, one
of which ends in a trailing . which reportedly breaks svn/git checkouts
on Windows.

It appears these were added accidentally, so just remove them.

PR: 232479

5 years agoMFC r340917, r341007
Guangyuan Yang [Sun, 2 Dec 2018 19:08:51 +0000 (19:08 +0000)]
MFC r340917, r341007

r340917:
Update pxeboot(8) manual page to reflect the next-server change in the ISC DHCP v3 server.

r341007:
Bump the date of pxeboot(8) manual page for r340917.

PR: 123484
Submitted by: edwin@mavetju.org
Reviewed by: AllanJude

5 years agoMFC r340922:
Konstantin Belousov [Sun, 2 Dec 2018 12:35:48 +0000 (12:35 +0000)]
MFC r340922:
Avoid unneeded check in vmspace_alloc().

5 years agoMFC r340867:
Cy Schubert [Sat, 1 Dec 2018 18:23:41 +0000 (18:23 +0000)]
MFC r340867:

FreeBSD 7 has been history for many moons. Remove some dead code.

5 years agoMFC r340868:
Cy Schubert [Sat, 1 Dec 2018 18:17:51 +0000 (18:17 +0000)]
MFC r340868:

An OSF/1 ifdef makes absolutley no sense in a FreeBSD specific source
file.

5 years agoMFC r340909:
Cy Schubert [Sat, 1 Dec 2018 18:09:17 +0000 (18:09 +0000)]
MFC r340909:

Combine two lines into one following unifdef for r255332.

5 years agoMFC r340861, r340900:
Mark Johnston [Sat, 1 Dec 2018 17:48:28 +0000 (17:48 +0000)]
MFC r340861, r340900:
Minor kevent(2) cleanups.

5 years agoMFC r341145
Vincenzo Maffione [Sat, 1 Dec 2018 11:52:13 +0000 (11:52 +0000)]
MFC r341145

cxgbe: revert r309725

After the fix contained in r341144, cxgbe does not need anymore
to set the IFCAP_NETMAP flag manually.

Differential Revision: https://reviews.freebsd.org/D17987

5 years agoMFC r341144
Vincenzo Maffione [Sat, 1 Dec 2018 11:50:52 +0000 (11:50 +0000)]
MFC r341144

netmap: set IFCAP_NETMAP in if_capabilities

Revision r307394 removed (by mistake) the code that sets IFCAP_NETMAP
in if_capabilities on netmap_attach. This patch reverts this change.

Differential Revision: https://reviews.freebsd.org/D17987

5 years agoMFC r340792:
Guangyuan Yang [Fri, 30 Nov 2018 23:51:53 +0000 (23:51 +0000)]
MFC r340792:

Fix a minor typo in ipfw(8) manual page.

PR: 230747
Submitted by: f.toscan@hotmail.it

5 years agoMFC r339502
Mariusz Zaborski [Fri, 30 Nov 2018 19:59:28 +0000 (19:59 +0000)]
MFC r339502
  Add link to the setproctitle_fast function.

5 years agoMFC r340477:
Andrey V. Elsukov [Fri, 30 Nov 2018 11:19:04 +0000 (11:19 +0000)]
MFC r340477:
  Allow configuration of several ipsec interfaces with the same tunnel
  endpoints.

  This can be used to configure several IPsec tunnels between two hosts
  with different security associations.

  Obtained from: Yandex LLC
  Sponsored by: Yandex LLC

5 years agoMFC r340765
Andrew Rybchenko [Fri, 30 Nov 2018 09:56:47 +0000 (09:56 +0000)]
MFC r340765

sfxge(4): cleanup: move into right place

Due to incorrect merge the piece of code was put in incorrect
place and diverge from libefx in other locations.

Sponsored by:   Solarflare Communications, Inc.

5 years agoMFC r340754:
Cy Schubert [Fri, 30 Nov 2018 06:44:32 +0000 (06:44 +0000)]
MFC r340754:

Allow forced start of ipmon in special cases where testing is desired
(or other special cases) and when ipfilter is disabled in rc.conf but
started by other means.

5 years agoMFC r341068:
David Bright [Fri, 30 Nov 2018 01:45:54 +0000 (01:45 +0000)]
MFC r341068:

Make whitespace more consistent in libkqueue tests.

After r337820, which "corrected" some spaces-instead-of-tab whitespace
issues in the libkqueue tests, jmg@ pointed out that these files were
originally space-based, not tab-spaced, and so the correction should
have been to get rid of the tabs that had been introduced in previous
changes, not the spaces. This change does that. This is a whitespace
only change; no functional change is intended.

Reported by: jmg@
Sponsored by: Dell EMC Isilon

5 years agoMFV: r341039, MFC: r341041
Marius Strobl [Thu, 29 Nov 2018 21:10:18 +0000 (21:10 +0000)]
MFV: r341039, MFC: r341041

Import CK as of 21d3e319407d19dece16ee317c757ffc54a452bc, which makes its
sparcv9 atomics compatible with the FreeBSD kernel by using instructions
which access the appropriate address space.
Atomic operations within the kernel must access the nucleus address space
instead of the default primary one. Without this change but the increased
use of CK in the kernel, machines started to panic after some minutes of
uptime due to an unresolvable fault in ck_pr_cas_64_value().

5 years agoMFC: r341016
Marius Strobl [Thu, 29 Nov 2018 20:48:38 +0000 (20:48 +0000)]
MFC: r341016

- Add a belated UPDATING entry for the ixlv(4) -> iavf(4) rename in r339338.
- Likewise, add ixlv.4.gz to OLD_FILES,
- and link if_ixlv.ko to if_iavf.ko in order to aid a bit in the transition.

5 years agoMFC r340483 (by jtl):
Mark Johnston [Thu, 29 Nov 2018 20:25:47 +0000 (20:25 +0000)]
MFC r340483 (by jtl):
Add some additional length checks to the IPv4 fragmentation code.

5 years agoMFC r341248:
Mark Johnston [Thu, 29 Nov 2018 17:42:30 +0000 (17:42 +0000)]
MFC r341248:
Fix age_old_log() after r337468.

PR: 233633

5 years agoMFC r341247:
Mark Johnston [Thu, 29 Nov 2018 17:35:37 +0000 (17:35 +0000)]
MFC r341247:
Update the free page count when blacklisting pages.

PR: 231296
Approved by: re (gjb, insta-MFC)

5 years agoregen src.conf.5 after r341239
Ed Maste [Thu, 29 Nov 2018 15:53:10 +0000 (15:53 +0000)]
regen src.conf.5 after r341239

5 years agoMFC r340984: Do not install GNU ld if lld is /usr/bin/ld
Ed Maste [Thu, 29 Nov 2018 15:48:36 +0000 (15:48 +0000)]
MFC r340984: Do not install GNU ld if lld is /usr/bin/ld

GNU binutils ld.bfd 2.17.50 does not support ifuncs and produces broken
binaries when ifuncs are in use.  When LLD_IS_LD is default we have an
ifunc-capable system linker and can just avoid installing ld.bfd.

Merged to stable/12 as libc's ifunc use has been merged there; ifunc use
has not been merged to releng/12.0 so this change does not need to be
either.

5 years agoMFC r340968:
Mark Johnston [Thu, 29 Nov 2018 15:42:32 +0000 (15:42 +0000)]
MFC r340968:
Plug routing sysctl leaks.

5 years agoMFC r339900:
Mark Johnston [Thu, 29 Nov 2018 15:38:27 +0000 (15:38 +0000)]
MFC r339900:
Have gconcat advertise delete support if one of its disks does.

PR: 232676

5 years agoMFC r340976:
Yuri Pankov [Thu, 29 Nov 2018 15:05:47 +0000 (15:05 +0000)]
MFC r340976:
vi: fix UTF-8 detection.

PR: 202290
Submitted by: lampa@fit.vutbr.cz
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D17950

5 years agoMFC r340047:
Toomas Soome [Thu, 29 Nov 2018 13:58:41 +0000 (13:58 +0000)]
MFC r340047:
loader: do not probe floppy devices for zfs

Floppy devices do not have enough space for ZFS pool.

5 years agoMFC r340049:
Toomas Soome [Thu, 29 Nov 2018 13:55:57 +0000 (13:55 +0000)]
MFC r340049:
loader: biosdisk should check if the media is present

The bd_print/bd_open/bd_strategy need to make sure the device does have
media, before getting into performing IO operations. Some systems can
hung if the device without a media is accessed.

Reported by: yuripv

5 years agoMFC r339959:
Toomas Soome [Thu, 29 Nov 2018 13:54:07 +0000 (13:54 +0000)]
MFC r339959:
loader: issue edd probe before legacy ah=08 and detect no media

while probing for drives, use int13 extended info before standard one and
provide workaround for case we are not getting needed information in case
of floppy drive.

In case of INT13 errors, there are (at least) 3 error codes appearing in case
of missing media - 20h, 31h and 80h. Flag the no media and do not print an
error.

Differential Revision: https://reviews.freebsd.org/D17667

5 years agoMFC r339658:
Toomas Soome [Thu, 29 Nov 2018 13:44:37 +0000 (13:44 +0000)]
MFC r339658:
loader: biosdisk interface should be able to cope with 4k sectors

The 4kn support in current bios specific biosdisk.c is broken, as the code
is only implementing the support for the 512B sector size.

This work is building the support for custom size sectors, we still do assume
the requested data to be multiple of 512B blocks and we only do address the
biosdisk.c interface here.

For reference, see also:
https://www.illumos.org/issues/8303
https://www.illumos.org/rb/r/547

As the GELI is moved above biosdisk "layer", the GELI should just work

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D11174

5 years agoMFC r340215:
Toomas Soome [Thu, 29 Nov 2018 13:37:44 +0000 (13:37 +0000)]
MFC r340215:
oader: always set media size from partition.

The disk access is validated by using partition table definitions, therefore
we have no need for if statements, just set the disk size.

Of course the partition table itself may be incorrect/inconsistent, but if
so, we are in trouble anyhow.

Differential Revision: https://reviews.freebsd.org/D17822

5 years agoMFC: r340240:
Toomas Soome [Thu, 29 Nov 2018 13:01:21 +0000 (13:01 +0000)]
MFC: r340240:
loader: ptable_open() check for ptable_cd9660read result is wrong

The ptable_*read() functions return NULL on read errors (and partition table
closed as an side effect). The ptable_open must check the return value and
act properly.

PR: 232483
Reported by: lev
Reviewed by: lev,cem
Differential Revision: https://reviews.freebsd.org/D17890

5 years agoMFC r339651,339992-339993,340026
Toomas Soome [Thu, 29 Nov 2018 12:12:42 +0000 (12:12 +0000)]
MFC r339651,339992-339993,340026

libsa: re-send ACK for older data packets in tftp
libsa: tftp should not read past file end
libsa: tftp should use calloc
libsa: cstyle cleanup tftp.c

Make loader pxeboot more stable over tftp transport.

5 years agoMFC r340978-340979: ipfw.8: new section to EXAMPLES: SELECTIVE MIRRORING
Eugene Grosbein [Thu, 29 Nov 2018 01:24:20 +0000 (01:24 +0000)]
MFC r340978-340979: ipfw.8: new section to EXAMPLES: SELECTIVE MIRRORING

5 years agoMFC r340442
Sean Eric Fagan [Thu, 29 Nov 2018 01:04:24 +0000 (01:04 +0000)]
MFC r340442

mountd has no way to configure the listen queue depth; rather than add a new
option, we pass -1 down to listen, which causes it to use the
kern.ipc.soacceptqueue sysctl.

Approved by: mav
Sponsored by: iXsystems Inc

5 years agoMFC r340974:
Yuri Pankov [Thu, 29 Nov 2018 00:34:55 +0000 (00:34 +0000)]
MFC r340974:
bectl: sync usage with man page, removing stray multibyte characters
in the process.

PR:             233526
Submitted by:   tigersharke@gmail.com (original version)
Reviewed by:    kevans
Differential revision:  https://reviews.freebsd.org/D18335

5 years agoMFC r340983:
Glen Barber [Thu, 29 Nov 2018 00:28:08 +0000 (00:28 +0000)]
MFC r340983:
 Fix NTP query on GCE due to unresolved hostname.

PR: 232456
Submitted by: Lucas Kanashiro
Sponsored by: The FreeBSD Foundation

5 years agoMFC r339506, r339508, r340064 (by markj), r340546 (by alc):
Konstantin Belousov [Wed, 28 Nov 2018 18:42:42 +0000 (18:42 +0000)]
MFC r339506, r339508, r340064 (by markj), r340546 (by alc):
Tidy up code to merge vm_entry neighbors and simplify related checks.

r339506:
Reduce code duplication in merging vm_entry neighbors.
r339508:
Unindent.
r340064:
Initialize the eflags field of vm_map headers.
r340546:
Tidy up vm_map_simplify_entry() and its recently introduced helper functions.

Discussed with: markj

5 years agoMFC r339795:
Mark Johnston [Wed, 28 Nov 2018 18:02:59 +0000 (18:02 +0000)]
MFC r339795:
Add a very basic regression test for setfacl -R with NFSv4 ACLs.

5 years agoMFC r340730, r340731:
Mark Johnston [Wed, 28 Nov 2018 16:52:41 +0000 (16:52 +0000)]
MFC r340730, r340731:
Add taskqueue_quiesce(9) and use it to implement taskq_wait().

PR: 227784

5 years agoMFC r340733:
Mark Johnston [Wed, 28 Nov 2018 16:51:11 +0000 (16:51 +0000)]
MFC r340733:
Remove KN_HASKQLOCK.

5 years agoMFC r339497 (by cem):
Mark Johnston [Wed, 28 Nov 2018 16:48:40 +0000 (16:48 +0000)]
MFC r339497 (by cem):
ZSTDIO: Correctly initialize zstd context with provided 'level'

5 years agoMFC r340995
Eric van Gyzen [Wed, 28 Nov 2018 15:34:46 +0000 (15:34 +0000)]
MFC r340995

Prevent kernel stack disclosure in signal delivery

On arm64 and riscv platforms, sendsig() failed to zero the signal
frame before copying it out to userspace.  Zero it.

On arm, I believe all the contents of the frame were initialized,
so there was no disclosure.  However, explicitly zero the whole frame
because that fact could inadvertently change in the future,
it's more clear to the reader, and I could be wrong in the first place.

Security: similar to FreeBSD-EN-18:12.mem and CVE-2018-17155
Sponsored by: Dell EMC Isilon

5 years agoMFC r340994
Eric van Gyzen [Wed, 28 Nov 2018 15:31:05 +0000 (15:31 +0000)]
MFC r340994

Prevent kernel stack disclosure in getcontext/swapcontext

Expand r338982 to cover freebsd32 interfaces on amd64, mips, and powerpc.

Security: FreeBSD-EN-18:12.mem
Security: CVE-2018-17155
Sponsored by: Dell EMC Isilon

5 years agoMFC r340724:
Oleg Bulyzhin [Wed, 28 Nov 2018 11:58:40 +0000 (11:58 +0000)]
MFC r340724:

Unbreak kernel build with VLAN_ARRAY defined.

5 years agoMFC r340717:
Guangyuan Yang [Wed, 28 Nov 2018 09:10:28 +0000 (09:10 +0000)]
MFC r340717:

Fix incorrect DSCP value range from 0..64 to 0..63.

PR: 232786
Submitted by: Sergey Akhmatov <sergey@akhmatov.ru>
Reviewed by: AllanJude

5 years agoMFC r340409
Eric van Gyzen [Tue, 27 Nov 2018 22:32:34 +0000 (22:32 +0000)]
MFC r340409

Make no assertions about lock state when the scheduler is stopped.

Change the assert paths in rm, rw, and sx locks to match the lock
and unlock paths.  I did this for mutexes in r306346.

Reported by: Travis Lane <tlane@isilon.com>
Sponsored by: Dell EMC Isilon

5 years agoMFC r340345
Eric van Gyzen [Tue, 27 Nov 2018 19:45:24 +0000 (19:45 +0000)]
MFC r340345

Fix daily mailq script for Postfix and daily_show_success="NO"

Exit with a zero status when Postfix reports "Mail queue is empty" so this
section won't appear in the report at all when daily_show_success="NO".

Sponsored by: Dell EMC Isilon

5 years agoMFC r340328
Eric van Gyzen [Tue, 27 Nov 2018 19:44:04 +0000 (19:44 +0000)]
MFC r340328

Update comment about 'universe' disk usage

It's 167 GB now (or 81 GB with ZFS lz4).

Sponsored by: Dell EMC Isilon

5 years agoMFC r340257
Eric van Gyzen [Tue, 27 Nov 2018 19:40:07 +0000 (19:40 +0000)]
MFC r340257

in6_ifattach_linklocal: handle immediate removal of the new LLA

If another thread immediately removes the link-local address
added by in6_update_ifa(), in6ifa_ifpforlinklocal() can return NULL,
so the following assertion (or dereference) is wrong.
Remove the assertion, and handle NULL somewhat better than panicking.
This matches all of the other callers of in6_update_ifa().

PR: 219250
Reviewed by: bz, dab (both an earlier version)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D17898

5 years agoMFC r340898:
Mark Johnston [Tue, 27 Nov 2018 17:08:07 +0000 (17:08 +0000)]
MFC r340898:
Ensure that knotes do not get registered when KQ_CLOSING is set.

PR: 228858

5 years agoMFC r340400:
Mark Johnston [Tue, 27 Nov 2018 17:03:15 +0000 (17:03 +0000)]
MFC r340400:
RISC-V: Implement get_cyclecount(9).

5 years agoMFC r340399:
Mark Johnston [Tue, 27 Nov 2018 17:02:15 +0000 (17:02 +0000)]
MFC r340399:
RISC-V: Add macros for reading performance counter CSRs.

5 years agoMFC r340408:
Mark Johnston [Tue, 27 Nov 2018 17:00:47 +0000 (17:00 +0000)]
MFC r340408:
Ensure that libnv can be used when kern.trap_enotcap=1.

5 years agoMFC r340897:
Mark Johnston [Tue, 27 Nov 2018 16:57:59 +0000 (16:57 +0000)]
MFC r340897:
Lock the knlist before releasing the in-flux state in knote_fork().

PR: 228858

5 years agoMFC r340899:
Mark Johnston [Tue, 27 Nov 2018 16:54:23 +0000 (16:54 +0000)]
MFC r340899:
Plug some kernel memory disclosures via kevent(2).

5 years agoRevert r341069, I committed it to the wrong branch.
Ian Lepore [Tue, 27 Nov 2018 16:13:56 +0000 (16:13 +0000)]
Revert r341069, I committed it to the wrong branch.

5 years agoRestore the ability to override the disk unit/partition at the boot: prompt
Ian Lepore [Tue, 27 Nov 2018 16:09:16 +0000 (16:09 +0000)]
Restore the ability to override the disk unit/partition at the boot: prompt
in gptboot.

When arch-independent geli support was added, a new static 'gdsk' struct
was added, but there was still a static 'dsk' struct, and when you typed
in an alternate disk/partition, the string was parsed into that struct,
which was then never used for anything.  Now the string gets parsed into
gdsk.dsk, the struct that's actually used.

X-MFC after: 3 days

5 years agoMFC r340689:
Andrey V. Elsukov [Tue, 27 Nov 2018 14:01:59 +0000 (14:01 +0000)]
MFC r340689:
  Make multiline APPLY_MASK() macro to be function-like.

  Reported by: cem

5 years agoMFC r340675:
Konstantin Belousov [Tue, 27 Nov 2018 13:06:54 +0000 (13:06 +0000)]
MFC r340675:
rtld: when immediate bind mode is requested, process irelocs in PLT
immediately after other PLT relocs.

5 years agoMFC r339523:
Oleksandr Tymoshenko [Mon, 26 Nov 2018 22:00:29 +0000 (22:00 +0000)]
MFC r339523:

Add amdgpio, driver for GPIO controller on AMD-based x86_64 platforms

Submitted by: Rajesh Kumar <rajbsd@gmail.com>
Differential Revision: https://reviews.freebsd.org/D16865

5 years agoMFC r340787 (by rmacklem), r340856, r340859:
Mark Johnston [Mon, 26 Nov 2018 14:01:05 +0000 (14:01 +0000)]
MFC r340787 (by rmacklem), r340856, r340859:
Ensure that directory entry padding bytes are zeroed.

5 years agoMFC r339818: rcorder(8)
Eugene Grosbein [Mon, 26 Nov 2018 13:23:10 +0000 (13:23 +0000)]
MFC r339818: rcorder(8)

  Add support for /etc/rc.resume, so it calls
  "rcorder -k resume" and runs scripts containing "KEYWORD: resume"
  with single "resume" argument.

  Working example is the port sysutils/cpupdate that defines
  extra_commands="resume" to reload CPU microcode cleared
  by suspend/resume sequence.

  This change does nothing for a system having no scripts with
  KEYWORD: resume.

PR: 227866
Differential Revision: https://reviews.freebsd.org/D15247

5 years agoMFC r339817: makewhatis: do not try to operate on read-only mounted
Eugene Grosbein [Mon, 26 Nov 2018 13:01:51 +0000 (13:01 +0000)]
MFC r339817: makewhatis: do not try to operate on read-only mounted
directories just to fail later.

5 years agoMFC r339808: Prevent ip_input() from panicing due to unprotected access
Eugene Grosbein [Mon, 26 Nov 2018 12:39:57 +0000 (12:39 +0000)]
MFC r339808: Prevent ip_input() from panicing due to unprotected access
to INADDR_HASH.

PR: 220078
Differential Revision: https://reviews.freebsd.org/D12457
Tested-by: Cassiano Peixoto and others

5 years agoMFC r339810: ipfw: implement ngtee/netgraph actions for layer-2 frames.
Eugene Grosbein [Mon, 26 Nov 2018 11:28:34 +0000 (11:28 +0000)]
MFC r339810: ipfw: implement ngtee/netgraph actions for layer-2 frames.

  Kernel part of ipfw does not support and ignores rules other than
  "pass", "deny" and dummynet-related for layer-2 (ethernet frames).
  Others are processed as "pass".

  Make it support ngtee/netgraph rules just like they are supported
  for IP packets. For example, this allows us to mirror some frames
  selectively to another interface for delivery to remote network analyzer
  over RSPAN vlan. Assuming ng_ipfw(4) netgraph node has a hook named "900"
  attached to "lower" hook of vlan900's ng_ether(4) node, that would be
  as simple as:

  ipfw add ngtee 900 ip from any to 8.8.8.8 layer2 out xmit igb0

PR: 213452
Tested-by: Fyodor Ustinov <ufm@ufm.su>

5 years agoMFC r339816: mount_msdosfs
Eugene Grosbein [Mon, 26 Nov 2018 11:20:25 +0000 (11:20 +0000)]
MFC r339816: mount_msdosfs

  mount_msdosfs: do not fail mounts requiring locale name conversion table
  that is already present in a kernel statically.

  For example, the command "mount_msdosfs -L ru_RU.KOI8-R" fails with error
  "mount_msdosfs: msdosfs_iconv: File exists" for a kernel having
  options LIBICONV and MSDOSFS_ICONV. After this change, it mounts
  successfully.

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D16951

5 years agoMFC r339806: Prevent stf(4) from panicing due to unprotected access
Eugene Grosbein [Mon, 26 Nov 2018 11:15:59 +0000 (11:15 +0000)]
MFC r339806: Prevent stf(4) from panicing due to unprotected access
to INADDR_HASH.

PR: 220078
Differential Revision: https://reviews.freebsd.org/D12457
Tested-by: Cassiano Peixoto and others

5 years agoMFC r340622:
Hans Petter Selasky [Mon, 26 Nov 2018 11:13:11 +0000 (11:13 +0000)]
MFC r340622:
Minor code factoring. No functional change.

Sponsored by: Mellanox Technologies

5 years agoMFC r340621:
Hans Petter Selasky [Mon, 26 Nov 2018 11:11:02 +0000 (11:11 +0000)]
MFC r340621:
Be more verbose when a sysctl fails to unregister.
Print name of sysctl in question.

Sponsored by: Mellanox Technologies

5 years agoMFC r340480:
Hans Petter Selasky [Mon, 26 Nov 2018 11:08:55 +0000 (11:08 +0000)]
MFC r340480:
Define asm macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

5 years agoMFC r340479:
Hans Petter Selasky [Mon, 26 Nov 2018 11:06:39 +0000 (11:06 +0000)]
MFC r340479:
Implement ktime_get_ts64() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

5 years agoMFC r339811: route(8): correctly return exit status when "-q" flag
Eugene Grosbein [Mon, 26 Nov 2018 11:05:26 +0000 (11:05 +0000)]
MFC r339811: route(8): correctly return exit status when "-q" flag
is used.

  Previously, route returned 1 in case of error  properly signalling
  failure but "route -q" it returned 0 for same case. Fix it.

PR: 186333

5 years agoMFC r340842:
Konstantin Belousov [Mon, 26 Nov 2018 10:51:39 +0000 (10:51 +0000)]
MFC r340842:
Silence gcc warnings.

5 years agoMFC r339807: Prevent multicast code from panicing due to unprotected access to INADDR...
Eugene Grosbein [Mon, 26 Nov 2018 10:47:00 +0000 (10:47 +0000)]
MFC r339807: Prevent multicast code from panicing due to unprotected access to INADDR_HASH.

PR: 220078
Differential Revision: https://reviews.freebsd.org/D12457
Tested-by: Cassiano Peixoto and others

5 years agoMFC r340783:
Mark Johnston [Sun, 25 Nov 2018 17:46:37 +0000 (17:46 +0000)]
MFC r340783:
Plug some networking sysctl leaks.

5 years agoMFC r340772:
Mark Johnston [Sun, 25 Nov 2018 17:39:41 +0000 (17:39 +0000)]
MFC r340772:
Clear unused bytes in ia32_osendsig().

5 years agoMFC r340771: proto: change device permissions to 0600
Ed Maste [Sun, 25 Nov 2018 00:32:23 +0000 (00:32 +0000)]
MFC r340771: proto: change device permissions to 0600

C Turt reports that the driver is not thread safe and may have
exploitable races.

Note that the proto device is intended for prototyping and development,
and is not for use on production systems.  From the man page:

SECURITY CONSIDERATIONS
    Because programs have direct access to the hardware, the proto
    driver is inherently insecure.  It is not advisable to use this
    driver on a production machine.

The proto device is not included in any of FreeBSD's kernel config files
(although the module is built).

The issues in the proto device still need to be fixed, and the device is
inherently (and intentionally) insecure, but it might as well be limited
to root only.

admbugs: 782
Reported by: C Turt <ecturt@gmail.com>
Sponsored by: The FreeBSD Foundation

5 years agoRevert r340161 in stable/12, setting the default pkg(8) repository back
Glen Barber [Sat, 24 Nov 2018 17:47:53 +0000 (17:47 +0000)]
Revert r340161 in stable/12, setting the default pkg(8) repository back
to 'latest' from 'quarterly' prior to branching releng/12.0.

Sponsored by: The FreeBSD Foundation

5 years agoMFC r340734:
Mark Johnston [Sat, 24 Nov 2018 17:09:35 +0000 (17:09 +0000)]
MFC r340734:
Avoid unsynchronized updates to kn_status.

5 years agoMFC r340485:
Mark Johnston [Sat, 24 Nov 2018 17:08:49 +0000 (17:08 +0000)]
MFC r340485:
Add regression tests for r340313 and r340483.

5 years agoMFC r340484:
Mark Johnston [Sat, 24 Nov 2018 17:08:12 +0000 (17:08 +0000)]
MFC r340484:
Rename the SO_REUSEPORT_LB test file to be consistent with other tests.

5 years agoMFC r340649:
Benedict Reuschling [Sat, 24 Nov 2018 15:10:05 +0000 (15:10 +0000)]
MFC r340649:
Add a fortune describing how to upload a machine's dmesg information to the
NYCBUG database.

We want to encourage our users to upload their dmesgs so that the project can
get a better insight into what kind of hardware is run on. This helps in making
data-driven decisions about i.e., platform and driver support.

Note that dmesgs may contain sensitive information like hardware serial numbers,
hence uploading them without review is discouraged.

Reviewed by: brooks, imp, allanjude
Approved by: allanjude
Differential Revision:    https://reviews.freebsd.org/D17705

5 years agoMFC r340663 (rmacklem):
Ed Maste [Fri, 23 Nov 2018 20:32:41 +0000 (20:32 +0000)]
MFC r340663 (rmacklem):

Improve sanity checking for the dircount hint argument to
NFSv3's ReaddirPlus and NFSv4's Readdir operations. The code
checked for a zero argument, but did not check for a very large value.
This patch clips dircount at the server's maximum data size.

5 years agoMFC r340662 (rmacklem):
Ed Maste [Fri, 23 Nov 2018 20:31:27 +0000 (20:31 +0000)]
MFC r340662 (rmacklem):

nfsm_advance() would panic() when the offs argument was negative.
The code assumed that this would indicate a corrupted mbuf chain, but
it could simply be caused by bogus RPC message data.
This patch replaces the panic() with a printf() plus error return.

5 years agoMFC r340661 (rmacklem):
Ed Maste [Fri, 23 Nov 2018 20:29:47 +0000 (20:29 +0000)]
MFC r340661 (rmacklem):

r304026 added code that started statistics gathering for an operation
before the operation number (the variable called "op") was sanity checked.
This patch moves the code down to below the range sanity check for "op".

5 years agoMFC r340285: kldxref: use appropriate Elf_Off type for offsets
Ed Maste [Fri, 23 Nov 2018 01:05:42 +0000 (01:05 +0000)]
MFC r340285: kldxref: use appropriate Elf_Off type for offsets

Submitted by: Mitchell Horne <mhorne063@gmail.com>
Sponsored by: The FreeBSD Foundation

5 years agoMFC r340699:
Mark Johnston [Fri, 23 Nov 2018 00:56:42 +0000 (00:56 +0000)]
MFC r340699:
Clear pad bytes in the struct exported by kern.ntp_pll.gettime.

5 years agoMFC r340266:
Kristof Provost [Thu, 22 Nov 2018 20:00:56 +0000 (20:00 +0000)]
MFC r340266:

pf tests: Test PR 183198

Create a table which is only used inside an anchor, ensure that the
table exists.

PR: 183198

5 years agoMFC r340264:
Kristof Provost [Thu, 22 Nov 2018 19:59:02 +0000 (19:59 +0000)]
MFC r340264:

pfctl: Populate ifname in ifa_lookup()

pfctl_adjust_skip_ifaces() relies on this name.

5 years agoMFC r340265:
Kristof Provost [Thu, 22 Nov 2018 19:56:50 +0000 (19:56 +0000)]
MFC r340265:

pf: Prevent tables referenced by rules in anchors from getting disabled.

PR: 183198
Obtained from: OpenBSD

5 years agoMFC r340639:
Mark Johnston [Thu, 22 Nov 2018 16:53:30 +0000 (16:53 +0000)]
MFC r340639:
Remove comments made obsolete by the ino64 work.

5 years agoMFC r339653:
Mark Johnston [Thu, 22 Nov 2018 16:52:30 +0000 (16:52 +0000)]
MFC r339653:
Add an IMPLEMENTATION NOTES section to ldd.1.

PR: 231926

5 years agoMFC: r340543, r340654
Marius Strobl [Thu, 22 Nov 2018 13:09:03 +0000 (13:09 +0000)]
MFC: r340543, r340654

Add a quirk handling for AMDI0040 controllers allowing them to do HS400.

Submitted by: Shreyank Amartya (original version)

5 years agoMFC: r340656
Marius Strobl [Thu, 22 Nov 2018 13:03:11 +0000 (13:03 +0000)]
MFC: r340656

Given that the idea of D15374 was to "make memmove a first class citizen",
provide a _MEMMOVE extension of _MEMCPY that deals with overlap based on
the previous bcopy(9) implementation and use the former for bcopy(9) and
memmove(9). This addresses my D15374 review comment, avoiding extra MOVs
in case of memmove(9) and trashing the stack pointer.