]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 years agoMFC r341439:
Konstantin Belousov [Mon, 10 Dec 2018 00:56:07 +0000 (00:56 +0000)]
MFC r341439:
Provide naive but self-contained implementations of memset(3) and
bzero(3) for rtld.

5 years agoMFC r341441:
Konstantin Belousov [Mon, 10 Dec 2018 00:54:18 +0000 (00:54 +0000)]
MFC r341441:
Some fixes for LD_BIND_NOW + ifuncs.

5 years agoMFC r341164: sh: Fix ${param?} default error message
Jilles Tjoelker [Sun, 9 Dec 2018 19:14:21 +0000 (19:14 +0000)]
MFC r341164: sh: Fix ${param?} default error message

If word in ${param?word} is missing, the shell shall write a default error
message. So expanding ${param?} when param is not set should write an error
message like

sh: param: parameter not set

This was broken by r316417.

PR: 233585

5 years agoMFC r340211:
Marcelo Araujo [Sun, 9 Dec 2018 06:48:44 +0000 (06:48 +0000)]
MFC r340211:

Comestic change to try to inline the memset with SSE/AVX instructions.
Also switch from int to size_t to keep portability.

Reviewed by: brooks
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D17795

5 years agoMFC r341393:
Michal Meloun [Sun, 9 Dec 2018 06:46:53 +0000 (06:46 +0000)]
MFC r341393:

  Return computed real memory size, not a value from similarly named global
  variable.

5 years agoMFC r340046, r340050
Marcelo Araujo [Sun, 9 Dec 2018 06:41:57 +0000 (06:41 +0000)]
MFC r340046, r340050

r340046:
Add support ps/2 scancodes for NumLock, ScrollLock and numerical keypad
keys.

PR: 213835
Submitted by: Vasily Postnicov <ivan.zhmudo@gmail.com>
Relnotes: Yes
Sponsored by: iXsystems Inc.

r340050:
Remove printf for debug purpose forgotten on r340046.

Reported by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

5 years agoMFC r341397:
Konstantin Belousov [Sun, 9 Dec 2018 00:41:46 +0000 (00:41 +0000)]
MFC r341397:
Correct accuracy of the barrier writes accounting.

5 years agoMFC r340835:
Yuri Pankov [Sat, 8 Dec 2018 19:45:05 +0000 (19:45 +0000)]
MFC r340835:
regexec: fix processing multibyte strings.

Matcher function incorrectly assumed that moffset that we get from
findmust is in bytes. Fix this by introducing a stepback function,
taking short path if MB_CUR_MAX is 1, and going back byte-by-byte,
checking if we have a legal character sequence otherwise.

PR: 153502
Reviewed by: pfg, kevans
Differential revision: https://reviews.freebsd.org/D18297

5 years agoMFC r341377, r341388 (fixup):
Cy Schubert [Sat, 8 Dec 2018 17:50:00 +0000 (17:50 +0000)]
MFC r341377, r341388 (fixup):

Restore handling of PMTU discovery, removed through an unifdef(1)
following the MFV of r254219 into r255332. In addition the 'FreeBSD'
macro was never defined in ipfilter 5.1.2 thus it never would have
been enabled in the first place.

This work is prompted by a general cleanup of the IP Filter code
prompted by working to resolve a PR. More to follow.

5 years agoMFC r341384:
Cy Schubert [Sat, 8 Dec 2018 17:28:52 +0000 (17:28 +0000)]
MFC r341384:

Remove IFF_DRVRLOCK as it is used in IRIX only (and we all know IRIX
is dead). This includes collaterally removing code shared by HP/UX,
SGI, and Linux, where IP Filter will in all likelihood for various
reasons never run again.

5 years agoMFC r340474:
Mike Karels [Sat, 8 Dec 2018 14:54:33 +0000 (14:54 +0000)]
MFC r340474:
Fix flags collision causing inability to enable CBQ in ALTQ

The CBQ BORROW flag conflicts with the RMCF_CODEL flag; the
two sets of definitions actually define the same things. The symptom
is that a kernel with CBQ support and not CODEL fails to load a QoS
policy with the obscure error "pfctl: DIOCADDALTQ: Cannot allocate memory."
If ALTQ_DEBUG is enabled, the error becomes a little clearer:
"rmc_newclass: CODEL not configured for CBQ!" is printed by the kernel.
There really shouldn't be two sets of macros that have to be defined
consistently, but the include structure isn't right for exporting
CBQ flags to altq_rmclass.h. Re-align the definitions, and add
CTASSERTs in the kernel to ensure that the definitions are consistent.

PR:             215716
Reviewed by:    pkelsey
Sponsored by:   Forcepoint LLC
Differential Revision:  https://reviews.freebsd.org/D17758

5 years agoMFC r341375:
Konstantin Belousov [Sat, 8 Dec 2018 00:46:05 +0000 (00:46 +0000)]
MFC r341375:
Allow to create swap zone larger than v_page_count / 2.

5 years agoMFC r341374:
Konstantin Belousov [Sat, 8 Dec 2018 00:44:44 +0000 (00:44 +0000)]
MFC r341374:
Correct the tunable name in the message.

PR: 231577

5 years agoMFC r340245: ping(8): improve diagnostics in case of wrong arguments.
Eugene Grosbein [Sat, 8 Dec 2018 00:28:27 +0000 (00:28 +0000)]
MFC r340245: ping(8): improve diagnostics in case of wrong arguments.

  For example, in case of super-user:
  $ sudo ping -s -64 127.0.0.1
  PING 127.0.0.1 (127.0.0.1): -64 data bytes
  ping: sendto: Invalid argument

  For unprivileged user:
  $ ping -s -64 127.0.0.1
  ping: packet size too large: 18446744073709551552 > 56: Operation not permitted

  Fix this by switching from strtoul() to strtol() for integer arguments
  and adding explicit checks for negative values.

5 years agoMFC r341280:
Cy Schubert [Fri, 7 Dec 2018 21:42:41 +0000 (21:42 +0000)]
MFC r341280:

Clean up a rather useless conditional structure member definition.

5 years agoMFC r341346:
Mark Johnston [Fri, 7 Dec 2018 15:48:42 +0000 (15:48 +0000)]
MFC r341346:
Add missing display messages when toggling modes.

PR: 233667

5 years agoMFC r340864:
Konstantin Belousov [Fri, 7 Dec 2018 14:45:28 +0000 (14:45 +0000)]
MFC r340864:
Parse FreeBSD Feature Control note on the ELF image activation.

5 years agoMFC r340858:
Konstantin Belousov [Fri, 7 Dec 2018 14:25:46 +0000 (14:25 +0000)]
MFC r340858:
rtld: parse FreeBSD Feature Control note on the object load.

5 years agoMFC r340076: Define NT_FREEBSD_FEATURE_CTL ELF note type
Ed Maste [Fri, 7 Dec 2018 13:53:29 +0000 (13:53 +0000)]
MFC r340076: Define NT_FREEBSD_FEATURE_CTL ELF note type

This ELF note will be used to allow binaries to opt out of, or in to,
upcoming vulnerability mitigation and other features.

5 years agoMFC r341008:
Andrey V. Elsukov [Fri, 7 Dec 2018 09:38:25 +0000 (09:38 +0000)]
MFC r341008:
  Fix possible panic during ifnet detach in rtsock.

  The panic can happen, when some application does dump of routing table
  using sysctl interface. To prevent this, set IFF_DYING flag in
  if_detach_internal() function, when ifnet under lock is removed from
  the chain. In sysctl_rtsock() take IFNET_RLOCK_NOSLEEP() to prevent
  ifnet detach during routes enumeration. In case, if some interface was
  detached in the time before we take the lock, add the check, that ifnet
  is not DYING. This prevents access to memory that could be freed after
  ifnet is unlinked.

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

MFC r341334:
  Adapt the fix in r341008 to correctly work with EBR.

  IFNET_RLOCK_NOSLEEP() is epoch_enter_preempt() in FreeBSD 12+. Holding
  it in sysctl_rtsock() doesn't protect us from ifnet unlinking, because
  unlinking occurs with IFNET_WLOCK(), that is rw_wlock+sx_xlock, and it
  doesn check that concurrent code is running in epoch section. But while
  we are in epoch section, we should be able to do access to ifnet's
  fields, even it was unlinked. Thus do not change if_addr and if_hw_addr
  fields in ifnet_detach_internal() to NULL, since rtsock code can do
  access to these fields and this is allowed while it is running in epoch
  section.

  This should fix the race, when ifnet_detach_internal() unlinks ifnet
  after we checked it for IFF_DYING in sysctl_dumpentry.

  Move free(ifp->if_hw_addr) into ifnet_free_internal(). Also remove the
  NULL check for ifp->if_description, since free(9) can correctly handle
  NULL pointer.

5 years agoMFC r341505:
Pedro F. Giffuni [Fri, 7 Dec 2018 03:43:34 +0000 (03:43 +0000)]
MFC r341505:
ext2fs.5: basic updates.

Starting with FreeBSD 12 we fully support writing ext4 filesystems.
Mention some features that we don't support while here.

5 years agoMFC r340860:
Konstantin Belousov [Fri, 7 Dec 2018 00:50:02 +0000 (00:50 +0000)]
MFC r340860:
Provide storage for the process feature control flags in struct proc.

5 years agoMFC r340863:
Konstantin Belousov [Fri, 7 Dec 2018 00:35:56 +0000 (00:35 +0000)]
MFC r340863:
Generalize ELF parse_notes().

5 years agoMFC r340862:
Konstantin Belousov [Fri, 7 Dec 2018 00:33:02 +0000 (00:33 +0000)]
MFC r340862:
Trivial reduction of the code duplication, reuse the return FALSE code.

5 years agoMFC r340986: UPDATING: add note for ld.bfd removal
Ed Maste [Thu, 6 Dec 2018 16:10:39 +0000 (16:10 +0000)]
MFC r340986: UPDATING: add note for ld.bfd removal

r340984 in HEAD, MFC in r341239

5 years agoMFC r340010
Eric Joyner [Thu, 6 Dec 2018 15:28:09 +0000 (15:28 +0000)]
MFC r340010

ixl/iavf(4): Update remaining references of "num_queues" to "num_rx_queues"

5 years agoMFC r340491, r340492:
Yuri Pankov [Thu, 6 Dec 2018 10:53:11 +0000 (10:53 +0000)]
MFC r340491, r340492:
Use UnicodeData.txt to create UTF-8 ctype map.

This should provide more complete coverage of currently defined Unicode
characters as compared to manually assembled one we use currently.

Comparison of original and new UTF-8 ctype maps by character class:

TYPE    ORIG    NEW
alnum   94229   126029
alpha   93557   125419
blank   4       2
cntrl   73      137685
digit   469     622
graph   109615  137203
lower   1478    2145
print   109641  137222
punct   3428    797
rune    110481  274907
space   33      24
upper   983     1781
xdigit  469     622

Large number of added cntrl definitions is due to the fact that private-use
planes are currently defined as such, this can change in the future.

Discussed with: bapt
Differential revision: https://reviews.freebsd.org/D17842

5 years agoMFC r340204:
Yuri Pankov [Thu, 6 Dec 2018 10:48:46 +0000 (10:48 +0000)]
MFC r340204:
Cleanup locale tools:

- Simplify the source dir specification, and update README
  appropriately
- Drop the LC (doonly) processing, it's broken, and even if fixed, not
  really useful
- Don't remove the target directories while installing new data as it
  removes Makefile.depend which we don't manage; only rm the files we
  are going to add/replace/delete instead
- Restrict adding bsd.endian.mk to colldef and ctypedef Makefiles, it's
  not needed in other (text-only) categories
- GC unused scripts; they don't seem to be particularly helpful standalone
  as well

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D17858

5 years agoMFC r340144:
Yuri Pankov [Thu, 6 Dec 2018 10:41:22 +0000 (10:41 +0000)]
MFC r340144:
Add hybrid C.UTF-8 locale being identical to default C locale except
that it uses the same ctype maps and functions as other UTF-8 locales.

Reviewed by: bapt, cem, eadler
Differential Revision: https://reviews.freebsd.org/D17833

5 years agoMFC r340128:
Yuri Pankov [Thu, 6 Dec 2018 09:51:51 +0000 (09:51 +0000)]
MFC r340128:
Teach man(1) about C.UTF-8.

While here, use LANG as the proper source to select man pages language/encoding,
falling back to LC_CTYPE.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D17835

5 years agoMFC r340104:
Yuri Pankov [Thu, 6 Dec 2018 09:47:23 +0000 (09:47 +0000)]
MFC r340104:
Update to CLDR 34 and UNICODE 11.

Discussed with: bapt

5 years agoMFC r340111:
Baptiste Daroussin [Thu, 6 Dec 2018 08:27:30 +0000 (08:27 +0000)]
MFC r340111:

nfsd: Factorize code

Factorize code by using struct sockaddr_storage to handle both ipv6 and ipv4

Discussed with: rmacklem
Reviewed by: manu
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D13223

5 years agoMFC r341265:
Cy Schubert [Thu, 6 Dec 2018 04:28:39 +0000 (04:28 +0000)]
MFC r341265:

Remove an old comment/code and replace with a comment that
directly references a NetBSD commit.

5 years agoMFC r340525:
Alan Somers [Thu, 6 Dec 2018 02:38:42 +0000 (02:38 +0000)]
MFC r340525:

mount_fusefs.8: expand HISTORY section

Note that fuse was available from ports long before joining the base system.
Also, update the upstream URL.

5 years agoMFC r340455:
Alan Somers [Thu, 6 Dec 2018 02:37:34 +0000 (02:37 +0000)]
MFC r340455:

fcntl.2: document an additional error condition

5 years agoMFC r339827:
Yuri Pankov [Wed, 5 Dec 2018 17:10:06 +0000 (17:10 +0000)]
MFC r339827:
localedef: define characters in "space" class also as "print", except
for the known conflicts ("control" characters can't be "print"able).
POSIX doesn't explicitly forbid this, and actually includes <space>
character in "print".

PR: 225692
Reviewed by: bapt, cem (previous version), pfg (previous version)
Differential Revision: https://reviews.freebsd.org/D17467

5 years agoMFC r339989, r339991:
Michael Tuexen [Tue, 4 Dec 2018 22:46:58 +0000 (22:46 +0000)]
MFC r339989, r339991:

Improve a comment to refer to the actual sections in the TCP
specification for the comparisons made.
Thanks to lstewart@ for the suggestion.

Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D17595

5 years agoMFC r341335:
Michael Tuexen [Tue, 4 Dec 2018 22:15:56 +0000 (22:15 +0000)]
MFC r341335:

Limit option_len for the TCP_CCALGOOPT.

Limiting the length to 2048 bytes seems to be acceptable, since
the values used right now are using 8 bytes.
This issue was found by using syzkaller.

Reviewed by: glebius, bz, rrs
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D18366

5 years agoMFC r340782:
Michael Tuexen [Tue, 4 Dec 2018 22:14:18 +0000 (22:14 +0000)]
MFC r340782:

A TCP stack is required to check SEG.ACK first, when processing a
segment in the SYN-SENT state as stated in Section 3.9 of RFC 793,
page 66. Ensure this is also done by the TCP RACK stack.

Reviewed by: rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D18034

5 years agoMFC r340781:
Michael Tuexen [Tue, 4 Dec 2018 22:13:05 +0000 (22:13 +0000)]
MFC r340781:

Ensure that the TCP RACK stack honours the setting of the
net.inet.tcp.drop_synfin sysctl-variable.

Reviewed by: rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D18033

5 years agoMFC r340777:
Michael Tuexen [Tue, 4 Dec 2018 22:11:41 +0000 (22:11 +0000)]
MFC r340777:

Ensure that the default RTT stack can make an RTT measurement if
the TCP connection was initiated using the RACK stack, but the
peer does not support the TCP RACK extension.

This ensures that the TCP behaviour on the wire is the same if
the TCP connection is initated using the RACK stack or the default
stack.

Reviewed by: rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D18032

5 years agoMFC r340774:
Michael Tuexen [Tue, 4 Dec 2018 22:10:09 +0000 (22:10 +0000)]
MFC r340774:

Ensure that TCP RST-segments announce consistently a receiver window of
zero. This was already done when sending them via tcp_respond().

Reviewed by: rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D17949

5 years agoMFC r340738:
Michael Tuexen [Tue, 4 Dec 2018 22:05:36 +0000 (22:05 +0000)]
MFC r340738:

Improve two KASSERTs in the TCP RACK stack.

There are two locations where an always true comparison was made in
a KASSERT. Replace this by an appropriate check and use a consistent
panic message. Also use this code when checking a similar condition.

PR: 229664
Reviewed by: rrs@
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D18021

5 years agoMFC r341464:
Renato Botelho [Tue, 4 Dec 2018 20:40:28 +0000 (20:40 +0000)]
MFC r341464:

Restore /var/crash permissions to 0750, as declared in mtree file. After
r337337 it changed to 0755.

Reviewed by: loos
Approved by: loos
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D18355

5 years agoMFC r341442, r341443:
Mark Johnston [Tue, 4 Dec 2018 19:06:11 +0000 (19:06 +0000)]
MFC r341442, r341443:
Plug memory disclosures via ptrace(2).

5 years agoMFC r341484
Gordon Tetlow [Tue, 4 Dec 2018 18:31:21 +0000 (18:31 +0000)]
MFC r341484

Always treat firmware request and response sizes as unsigned.

This fixes an incomplete bounds check on the guest-supplied request
size where a very large request size could be interpreted as a negative
value and not be caught by the bounds check.

Submitted by: jhb
Reported by:  Reno Robert
Approved by:  so
Security:     FreeBSD-SA-18:14.bhyve
Security:     CVE-2018-17160

5 years agoMFC r341430
Vincenzo Maffione [Tue, 4 Dec 2018 17:57:01 +0000 (17:57 +0000)]
MFC r341430

netmap(4): improve man page

Reviewed by:    bcr
Differential Revision:  https://reviews.freebsd.org/D18057

5 years agoMFC r341096:
Konstantin Belousov [Tue, 4 Dec 2018 15:06:24 +0000 (15:06 +0000)]
MFC r341096:
Fix assert condition in pmap_large_unmap().

5 years agoMFC r341094:
Konstantin Belousov [Tue, 4 Dec 2018 15:02:19 +0000 (15:02 +0000)]
MFC r341094:
Improve sigonstack().

5 years agoMFC r341073:
Andrey V. Elsukov [Tue, 4 Dec 2018 09:16:20 +0000 (09:16 +0000)]
MFC r341073:
  Do not limit the mbuf queue length for keepalive packets.

  It was unlimited before overhaul, and one user reported that this limit
  can be reached easily.

  PR: 233562

5 years agoMFC r340135: Make ng_pptpgre(8) netgraph node be able to restore order
Eugene Grosbein [Tue, 4 Dec 2018 07:39:54 +0000 (07:39 +0000)]
MFC r340135: Make ng_pptpgre(8) netgraph node be able to restore order
for packets reordered in transit instead of dropping them altogether.
It uses sequence numbers of PPtPGRE packets.

A set of new sysctl(8) added to control this ability or disable it:

net.graph.pptpgre.reorder_max (1) defines maximum length of node's
private reorder queue used to keep data waiting for late packets.
Zero value disables reordering. Default value 1 allows the node to restore
the order for two packets swapped in transit. Greater values allow the node
to deliver packets being late after more packets in sequence
at cost of increased kernel memory usage.

net.graph.pptpgre.reorder_timeout (1) defines time value in miliseconds
used to wait for late packets. It may be useful to increase this
if reordering spot is distant.

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