]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoMFC r366613: ls(1): Use \& as an escape character for the ',' option
Gordon Bergling [Mon, 12 Oct 2020 08:43:21 +0000 (08:43 +0000)]
MFC r366613: ls(1): Use \& as an escape character for the ',' option

Reported by: karels@, xtouqh at hotmail dot com

3 years agoMFC r366206: Add DSCP support for network QoS to iscsi target.
Richard Scheffenegger [Sun, 11 Oct 2020 13:39:04 +0000 (13:39 +0000)]
MFC r366206: Add DSCP support for network QoS to iscsi target.

In order to prioritize iSCSI traffic across a network,
DSCP can be used. In order not to rely on "ipfw setdscp"
or in-network reclassification, this adds the dscp value
directly to the portal group (where TCP sessions are accepted).

Reviewed by: mav, trasz
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D26385

3 years agoMFC r366529: Import tzdata 2020b
Philip Paeps [Sun, 11 Oct 2020 09:04:56 +0000 (09:04 +0000)]
MFC r366529: Import tzdata 2020b

3 years agoMFC r366417:
Konstantin Belousov [Sat, 10 Oct 2020 13:46:48 +0000 (13:46 +0000)]
MFC r366417:
amd64: Store full 64bit of FIP/FDP for 64bit processes when using XSAVE.

PR: 250043

3 years agoMFC r366514:
Konstantin Belousov [Sat, 10 Oct 2020 13:33:57 +0000 (13:33 +0000)]
MFC r366514:
Fix typo.

3 years agoMFC r366407, r366403
Gordon Bergling [Sat, 10 Oct 2020 09:52:41 +0000 (09:52 +0000)]
MFC r366407, r366403

ls(1): Bugfix for an issue reported by mandoc
dhclient(8): Bugfixes for some issues reported by mandoc

- no blank before trailing delimiter
- new sentence, new line

3 years agoMFC r366408, r366410, r366405
Gordon Bergling [Sat, 10 Oct 2020 09:50:09 +0000 (09:50 +0000)]
MFC r366408, r366410, r366405

fsdb(8): Fix an issue reported by mandoc
mdmfs(8): Fix an issue reported by mandoc
devd.conf(5): Bugfix for an issue reported by mandoc

- whitespace at end of input line

3 years agoMFC r366411: gvinum(8): Fix an issue reported by mandoc
Gordon Bergling [Sat, 10 Oct 2020 09:44:56 +0000 (09:44 +0000)]
MFC r366411: gvinum(8): Fix an issue reported by mandoc

- new sentence, new line

3 years agoMFC 366404: cp(1): Bugfixes for some issues reported by mandoc
Gordon Bergling [Sat, 10 Oct 2020 09:43:35 +0000 (09:43 +0000)]
MFC 366404: cp(1): Bugfixes for some issues reported by mandoc

- no blank before trailing delimiter

3 years agoMFC r366409: veriexec(8): Bugfix for an issue reported by mandoc
Gordon Bergling [Sat, 10 Oct 2020 09:42:24 +0000 (09:42 +0000)]
MFC r366409: veriexec(8): Bugfix for an issue reported by mandoc

- consider using OS macro: Nx

3 years agoMFC r366406: camcontrol(8): Bugfixes for some issues reported by mandoc
Gordon Bergling [Sat, 10 Oct 2020 09:41:20 +0000 (09:41 +0000)]
MFC r366406: camcontrol(8): Bugfixes for some issues reported by mandoc

- new sentence, new line

3 years agoMFC r366414: cpuset(1): Fix some issues reported by mandoc
Gordon Bergling [Sat, 10 Oct 2020 09:40:03 +0000 (09:40 +0000)]
MFC r366414: cpuset(1): Fix some issues reported by mandoc

- whitespace at end of input line
- new sentence, new line

3 years agoMFC r364787:
Allan Jude [Fri, 9 Oct 2020 23:02:09 +0000 (23:02 +0000)]
MFC r364787:

ZFS: whitelist zstd and encryption in the loader

Please note that neither zstd nor encryption is
supported by the loader at this instant. This
change makes it safe to use those features in
one's root pool, but not in one's root dataset.

3 years agoClean up the mess I made with r366590 and r366591
Allan Jude [Fri, 9 Oct 2020 22:59:27 +0000 (22:59 +0000)]
Clean up the mess I made with r366590 and r366591

3 years agoRevert r366590 that contains garbage
Allan Jude [Fri, 9 Oct 2020 22:50:16 +0000 (22:50 +0000)]
Revert r366590 that contains garbage

3 years agoMFC r364787:
Allan Jude [Fri, 9 Oct 2020 22:42:04 +0000 (22:42 +0000)]
MFC r364787:

ZFS: whitelist zstd and encryption in the loader

Please note that neither zstd nor encryption is
supported by the loader at this instant. This
change makes it safe to use those features in
one's root pool, but not in one's root dataset.

3 years agoMFC: r366216 imp
Warner Losh [Fri, 9 Oct 2020 21:01:53 +0000 (21:01 +0000)]
MFC: r366216 imp

Fix video on PCI heuristic

The video on PCI heuristic was broken. It was supposed to infer a
video device when the last element of the path was a PCI DEVICE PATH
node. However, the last node in the device path is an END node, so
this heuristic never fired.

This leads, among other things, to bhyve only producing output in the
serial connection once we leave the boot loader. This restores the
dual headed boot on bhyve + UEFI (as we did in 11.2), but will favor
serial in the absence of other config which may be a change from 11.2.

MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D26572

3 years agoMFC r365847: makefs: connect cd9660 El Torito EFI boot image system type
Ed Maste [Fri, 9 Oct 2020 18:30:49 +0000 (18:30 +0000)]
MFC r365847: makefs: connect cd9660 El Torito EFI boot image system type

Sponsored by: The FreeBSD Foundation

3 years agoMFC r366150: TCP: send full initial window when timestamps are in use
Richard Scheffenegger [Fri, 9 Oct 2020 09:37:43 +0000 (09:37 +0000)]
MFC r366150: TCP: send full initial window when timestamps are in use

The fastpath in tcp_output tries to send out
full segments, and avoid sending partial segments by
comparing against the static t_maxseg variable.
That value does not consider tcp options like timestamps,
while the initial window calculation is using
the correct dynamic tcp_maxseg() function.

Due to this interaction, the last, full size segment
is considered too short and not sent out immediately.

Reported by: tuexen
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D26478

3 years agoMFC r366149: TCP newreno: improve after_idle ssthresh
Richard Scheffenegger [Fri, 9 Oct 2020 09:33:45 +0000 (09:33 +0000)]
MFC r366149: TCP newreno: improve after_idle ssthresh

Adjust ssthresh in after_idle to the maximum of
the prior ssthresh, or 3/4 of the prior cwnd. See
RFC2861 section 2 for an in depth explanation for
the rationale around this.

As newreno is the default "fall-through" reaction,
most tcp variants will benefit from this.

Reviewed by: tuexen
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D22438

3 years agoMFC r366501:
Pedro F. Giffuni [Fri, 9 Oct 2020 05:28:32 +0000 (05:28 +0000)]
MFC r366501:
ext2fs: minor typo.

Obtained from: Dragonfly

3 years agoMFC r366466: crunchgen: fix MK_AUTO_OBJ logic after r364166
Kyle Evans [Thu, 8 Oct 2020 12:56:23 +0000 (12:56 +0000)]
MFC r366466: crunchgen: fix MK_AUTO_OBJ logic after r364166

r364166 converted echo -n `/bin/pwd` to a raw pwd invocation, leaving a
trailing newline at the end of path.  This caused a later stat() of it to
erroneously fail and the fallback to MK_AUTO_OBJ=no logic proceeded as
unexpected.

Harry Schmalzbauer bissected the resulting build failure he experienced
(stable/12 host, -HEAD build) down to r365887. This change is mostly
unrelated, except it switches the build to bootstrapped crunchgen - clue!

I then bissected recent crunchgen changes going back a bit since we wouldn't
observe the failure immediately with -CURRENT in most configurations, which
landed me on r364166. After many intense head-scratching minutes and printf
debugging, I realized that the newline was the difference. This is where our
tale ends.

3 years agoMFC r366287:
Cy Schubert [Thu, 8 Oct 2020 04:00:31 +0000 (04:00 +0000)]
MFC r366287:

Continued ipfilter #ifdef cleanup. The r343701 log entry contains a
complete description.

3 years agoMFC r366300:
Konstantin Belousov [Wed, 7 Oct 2020 10:43:29 +0000 (10:43 +0000)]
MFC r366300:
pciconf: print PCIe CTL max read request.

3 years agoMFC r366394
Vincenzo Maffione [Tue, 6 Oct 2020 19:15:11 +0000 (19:15 +0000)]
MFC r366394

netmap: tools: extend CFLAGS after including bsd.prog.mk

MFC after:      1 week

3 years agoMFC r366393
Vincenzo Maffione [Tue, 6 Oct 2020 19:14:03 +0000 (19:14 +0000)]
MFC r366393

netmap: tools: fix several compiler warnings

MFC after:      1 week

3 years agoMFC r366389
Vincenzo Maffione [Tue, 6 Oct 2020 19:12:43 +0000 (19:12 +0000)]
MFC r366389

netmap: minor documentation fix

Also update date of pkt-gen.8 (not done in r366387).

Submitted by:   milosz.kaniewski@gmail.com

3 years agoMFC r366388
Vincenzo Maffione [Tue, 6 Oct 2020 19:11:55 +0000 (19:11 +0000)]
MFC r366388

netmap: fix constness warnings generated by "-Wcast-qual"

Submitted by:   milosz.kaniewski@gmail.com

3 years agoMFC r366387
Vincenzo Maffione [Tue, 6 Oct 2020 19:10:32 +0000 (19:10 +0000)]
MFC r366387

netmap: pkt-gen: minor corrections to documentation

Submitted by:   Brian Poole <brian90013@gmail.com>

3 years agoMFC r365759-r365765, r365788:
Mark Johnston [Tue, 6 Oct 2020 14:03:59 +0000 (14:03 +0000)]
MFC r365759-r365765, r365788:
Simplify unix domain socket locking.

3 years agoMFC r366415:
Konstantin Belousov [Tue, 6 Oct 2020 09:28:24 +0000 (09:28 +0000)]
MFC r366415:
Move ctx_switch_xsave declaration to amd64 md_var.h.

3 years agoMFC r366354:
Navdeep Parhar [Mon, 5 Oct 2020 19:45:11 +0000 (19:45 +0000)]
MFC r366354:

cxgbe(4): validate largest_rx_cluster and safest_rx_cluster.

These tunables can only be set to a valid cluster size (2K, 4K, 9K, or
16K) as documented in the man page.  Anything else could lead to a
panic on interface up.

Reported by: mav@
Sponsored by: Chelsio Communications

3 years agoMFC r366247:
Navdeep Parhar [Mon, 5 Oct 2020 19:22:28 +0000 (19:22 +0000)]
MFC r366247:

cxgbe(4): Avoid unnecessary work in the firmware during netmap tx.

Bind the netmap tx queues to a special '0xff' scheduling class which
makes the firmware skip some processing related to rate limiting on the
outgoing traffic.  Future firmwares will do this automatically.

Sponsored by: Chelsio Communications

3 years agoMFC r366246:
Navdeep Parhar [Mon, 5 Oct 2020 18:59:10 +0000 (18:59 +0000)]
MFC r366246:

Remove duplicate line.

3 years agoMFC r366245:
Navdeep Parhar [Mon, 5 Oct 2020 18:49:55 +0000 (18:49 +0000)]
MFC r366245:

cxgbe(4): adjust the doorbell threshold for netmap freelists to match the
maximum burst size used when fetching descriptors from the list.

Sponsored by: Chelsio Communications

3 years agoMFC r366244:
Navdeep Parhar [Mon, 5 Oct 2020 18:47:12 +0000 (18:47 +0000)]
MFC r366244:

cxgbe(4): display an error message when netmap cannot be enabled because
the interface is down.

Sponsored by: Chelsio Communications

3 years agoMFC r366242:
Navdeep Parhar [Mon, 5 Oct 2020 18:45:32 +0000 (18:45 +0000)]
MFC r366242:

cxgbe(4): fixes for netmap operation with only some queues active.

- Only active netmap receive queues should be in the RSS lookup table.

- The RSS table should be restored for NIC operation when the last
  active netmap queue is switched off, not the first one.

- Support repeated netmap ON/OFF on a subset of the queues.  This works
  whether the the queues being enabled and disabled are the only ones
  active or not.  Some kring indexes have to be reset in the driver for
  the second case.

Sponsored by: Chelsio Communications

3 years agoMerge commit 0fac1c191 from llvm git (by Craig Topper):
Dimitry Andric [Mon, 5 Oct 2020 18:08:52 +0000 (18:08 +0000)]
Merge commit 0fac1c191 from llvm git (by Craig Topper):

  [X86] Allow Yz inline assembly constraint to choose ymm0 or zmm0 when
  avx/avx512 are enabled and type is 256 or 512 bits

  gcc supports selecting ymm0/zmm0 for the Yz constraint when used with
  256 or 512 bit vector types.

  Fixes PR45806

  Differential Revision: https://reviews.llvm.org/D79448

This should fix 'fatal error: error in backend: Cannot select' errors if
assertions are disabled, or 'Assertion failed: (isVector() && "Invalid
vector type!"), function getVectorNumElements, file
/usr/src/contrib/llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h,
line 276.', when building the audio/lsp-plugins-lv2 port.

Direct commit to stable/{11,12} since head has clang 11.0.0, which
already includes this fix.

Reported by: yuri
PR: 232911

3 years agoMFC r365993:
Navdeep Parhar [Mon, 5 Oct 2020 09:03:17 +0000 (09:03 +0000)]
MFC r365993:

cxgbe(4): let the PF driver use VM work requests for transmit.

This allows the PF interfaces to communicate with the VF interfaces over
the internal switch in the ASIC.  Fix the GL limits for VM work requests
while here.

Sponsored by: Chelsio Communications

3 years agoMFC r365871. This needs a couple other revisions which aren't in
Navdeep Parhar [Mon, 5 Oct 2020 08:51:03 +0000 (08:51 +0000)]
MFC r365871.  This needs a couple other revisions which aren't in
stable/12 yet to actually work but is being committed out of order to
ease other cxgbe MFCs.

r365871:
cxgbe(4): add support for stateless offloads for VXLAN traffic.

Hardware assistance includes checksumming (tx and rx), TSO, and RSS on
the inner traffic in a VXLAN tunnel.

Sponsored by: Chelsio Communications

3 years agoMFC r365868:
Navdeep Parhar [Mon, 5 Oct 2020 07:26:06 +0000 (07:26 +0000)]
MFC r365868:

Add two new ifnet capabilities for hw checksumming and TSO for VXLAN traffic.

These are similar to the existing VLAN capabilities.

Reviewed by: kib@
Sponsored by: Chelsio Communications

3 years agoMFC r365867:
Navdeep Parhar [Mon, 5 Oct 2020 06:38:56 +0000 (06:38 +0000)]
MFC r365867:

mbuf checksum flags and fields to support tunneling protocols.

These are being added to support VXLAN but will work for GENEVE as well.
ENCAP_RSVD1 will likely become ENCAP_GENEVE in the future.

The size of struct mbuf does not change and that means this change can be MFC'd.
If size wasn't a constraint a cleaner way may have been to add inner_csum_flags
and inner_csum_data to go with csum_flags and csum_data.

Reviewed by: kib@
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25873

3 years agoMFC r366384:
Navdeep Parhar [Mon, 5 Oct 2020 05:36:01 +0000 (05:36 +0000)]
MFC r366384:

cxgbe(4): set up the firmware flowc for the tid before send_abort_rpl.

3 years agoMFC r366364:
Mateusz Piotrowski [Mon, 5 Oct 2020 01:26:34 +0000 (01:26 +0000)]
MFC r366364:

Correct the documented size of kern.msgbufsize

The correct value is 96KB after r226090.

PR: 249971
Submitted by: johannes@jo-t.de

3 years agoMFC r362421: raspberry pi 4: cpufreq support
Kyle Evans [Sun, 4 Oct 2020 19:59:12 +0000 (19:59 +0000)]
MFC r362421: raspberry pi 4: cpufreq support

The submitter notes that the bcm2835_cpufreq driver really just needs the
rpi4 compat string added to it; powerd subsequently works and the dev.cpu.0
sysctl values look sane and can be successfully manipulated.

3 years agoMFC r366347:
Mark Johnston [Sun, 4 Oct 2020 16:27:49 +0000 (16:27 +0000)]
MFC r366347:
Remove svn:executable from a couple of vmm(4) source files.

3 years agoMFC: r366229
Warner Losh [Sun, 4 Oct 2020 06:14:51 +0000 (06:14 +0000)]
MFC: r366229

For mulitcons boot, report it and which console is primary

Until we can do proper /etc/rc output on both consoles in multicons
boot (or all of them if we ever generalize), report when we are
booting multicons. Also report the primary console. This will be a big
hint why output stops after this line (though some slow USB discovery
still happens after mountroot / init starts).

Reviewed by: scottl@, tsoome@
Differential Revision: https://reviews.freebsd.org/D26574

3 years agoMFC: r366228
Warner Losh [Sun, 4 Oct 2020 06:12:52 +0000 (06:12 +0000)]
MFC: r366228

Report the kernel console on the boot screen
Report what console the boot loader is telling the kernel to use:
            o Dual (Serial Primary)
            o Dual (Video Primary)
            o Serial
            o Video
and allow toggling between them.

3 years agoMFC r366203:
Cy Schubert [Sun, 4 Oct 2020 03:33:05 +0000 (03:33 +0000)]
MFC r366203:

Remove Linux and IRIX specific files.

3 years agoMFC r366202:
Cy Schubert [Sun, 4 Oct 2020 03:31:35 +0000 (03:31 +0000)]
MFC r366202:

Continuing the effort started in r343701, #ifdef cleanup, remove
never to be used again checks.

3 years agoMFC r366210:
Konstantin Belousov [Sun, 4 Oct 2020 00:40:28 +0000 (00:40 +0000)]
MFC r366210:
Consistently use __FBSDID("FreeBSD") for ids in usr.bin/procstat.

3 years agoMFC r365904: crypto(7): Correct Sections out of conventional order error
Gordon Bergling [Sat, 3 Oct 2020 15:06:47 +0000 (15:06 +0000)]
MFC r365904: crypto(7): Correct Sections out of conventional order error

Event: September 2020 Bugathon

3 years agoMFC r365903: src.conf(5): Fix some mandoc issues in source files
Gordon Bergling [Sat, 3 Oct 2020 14:51:15 +0000 (14:51 +0000)]
MFC r365903: src.conf(5): Fix some mandoc issues in source files

- new sentence, new line
- blank line in fill mode

Event: September 2020 Bugathon

3 years agoMFC r365640: Improvements for the src.conf(5) and build(7) man pages
Gordon Bergling [Sat, 3 Oct 2020 14:45:17 +0000 (14:45 +0000)]
MFC r365640: Improvements for the src.conf(5) and build(7) man pages

PR: 203863 (based on)
Submitted by: Russell Haley <russ dot haley at gmail dot com>
Reviewed by: bcr, imp
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D26343

3 years agoMFC r361254: Fix Typo in ng_hci_le_connection_complete_ep struct.
Kyle Evans [Sat, 3 Oct 2020 13:27:57 +0000 (13:27 +0000)]
MFC r361254: Fix Typo in ng_hci_le_connection_complete_ep struct.

PR: 246538

3 years agoMFC r366162,r366169,r366188
Justin Hibbits [Sat, 3 Oct 2020 02:26:38 +0000 (02:26 +0000)]
MFC r366162,r366169,r366188

Fix compat32 on mips64:
* Elf32_Auxinfo is broken, using pointers in the union, which are 64-bits not
  32.
* freebsd32_sysarch() doesn't update the 'user local' register when handling
  MIPS_SET_TLS, leading to a NULL pointer dereference in the 32-bit
  application.

3 years agoMFC r366271:
Mitchell Horne [Fri, 2 Oct 2020 13:31:20 +0000 (13:31 +0000)]
MFC r366271:
arm64: set the correct HWCAP

3 years agoMFC r366143: pwm(8): do not exit with failure after successfully reading configuration
Andriy Gapon [Fri, 2 Oct 2020 12:49:27 +0000 (12:49 +0000)]
MFC r366143: pwm(8): do not exit with failure after successfully reading configuration

3 years agoMFC r365396: twsi: use tsleep instead of pause for better responsiveness
Andriy Gapon [Fri, 2 Oct 2020 12:48:07 +0000 (12:48 +0000)]
MFC r365396: twsi: use tsleep instead of pause for better responsiveness

3 years agoMFC r365290: move definition of hw.i2c sysctl node from iicbb to iicbus
Andriy Gapon [Fri, 2 Oct 2020 12:46:28 +0000 (12:46 +0000)]
MFC r365290: move definition of hw.i2c sysctl node from iicbb to iicbus

3 years agoMFC r366237:
Konstantin Belousov [Fri, 2 Oct 2020 10:03:17 +0000 (10:03 +0000)]
MFC r366237:
procstat: Fix regression after 365880.

3 years agozfs: fix "zfs receive" of interrupted stream without "-F" after r366180
Alan Somers [Thu, 1 Oct 2020 19:55:52 +0000 (19:55 +0000)]
zfs: fix "zfs receive" of interrupted stream without "-F" after r366180

The OpenZFS test suite revealed a regression with the changes made by
r366180 and r364974: "zfs recv" resuming and interrupted stream without -F
would refuse to run, complaining that "dataset exists".

Direct commit to stable/12 because head has moved to the OpenZFS code base.

Upstream issue: https://github.com/openzfs/zfs/issues/10995

Reviewed by: mmacy
MFC after: 3 days
MFC-with: 366180
Sponsored by: Axcient

3 years agoMFC r366248:
Michael Tuexen [Thu, 1 Oct 2020 16:53:16 +0000 (16:53 +0000)]
MFC r366248:
Improve the input validation and processing of cookies.
This avoids setting the association in an inconsistent
state, which could result in a use-after-free situation.
This can be triggered by a malicious peer, if the peer
can modify the cookie without the local endpoint recognizing
it.
Thanks to Ned Williamson for reporting the issue.

3 years agoMFC r366226:
Michael Tuexen [Thu, 1 Oct 2020 16:25:35 +0000 (16:25 +0000)]
MFC r366226:
Minor cleanup.

3 years agoMFC r366199:
Michael Tuexen [Thu, 1 Oct 2020 16:24:28 +0000 (16:24 +0000)]
MFC r366199:

Cleanup, no functional change intended.

3 years agoMFC r366198:
Michael Tuexen [Thu, 1 Oct 2020 16:23:35 +0000 (16:23 +0000)]
MFC r366198:
Improve the handling of receiving unordered and unreliable user
messages using DATA chunks. Don't use fsn_included when not being
sure that it is set to an appropriate value. If the default is
used, which is -1, this can result in SCTP associaitons not
making any user visible progress.

Thanks to Yutaka Takeda for reporting this issue for the the
userland stack in https://github.com/pion/sctp/issues/138.

3 years agoMFC r366114:
Michael Tuexen [Thu, 1 Oct 2020 16:22:34 +0000 (16:22 +0000)]
MFC r366114:
Whitespace changes.

3 years agoMFC r365688:
Michael Tuexen [Thu, 1 Oct 2020 16:18:49 +0000 (16:18 +0000)]
MFC r365688:
Add a -C option to netstat to display the congestion control for
TCP connections.

3 years agoMFC r365687:
Michael Tuexen [Thu, 1 Oct 2020 16:14:00 +0000 (16:14 +0000)]
MFC r365687:

Add a -C option to sockstat to display the congestion control for TCP
connections.

3 years agoMFC r365686:
Michael Tuexen [Thu, 1 Oct 2020 16:11:08 +0000 (16:11 +0000)]
MFC r365686:
Export the name of the congestion control. This will be used by sockstat
and netstat.

3 years agoMFC r365685:
Michael Tuexen [Thu, 1 Oct 2020 16:09:23 +0000 (16:09 +0000)]
MFC r365685:
Add a -t option to traceroute6 to control the traffic class used when
sending probe packets.

3 years agoMFC r366064, r366065, r366215: sbin/fsck_msdosfs: Fix an integer
Xin LI [Thu, 1 Oct 2020 03:08:23 +0000 (03:08 +0000)]
MFC r366064, r366065, r366215: sbin/fsck_msdosfs: Fix an integer
overflow on 32-bit platforms

3 years agoMFC r359067: -F is GNU diff specific, not implemented in BSD diff.
Ed Maste [Wed, 30 Sep 2020 20:57:01 +0000 (20:57 +0000)]
MFC r359067: -F is GNU diff specific, not implemented in BSD diff.

PR: 239519
Reported by: kouya@ryuhoku.jp [in -CURRENT]
MFC after: 3 days

3 years agoMFC r363563: chio: avoid out of bounds read
Ed Maste [Wed, 30 Sep 2020 19:23:25 +0000 (19:23 +0000)]
MFC r363563: chio: avoid out of bounds read

ch_ces is alloacated with space for total_elem entries.

CID: 1418536
Reported by: Coverity Scan
Sponsored by: The FreeBSD Foundation

3 years agoMFC 366175: Revert most of r360179.
John Baldwin [Wed, 30 Sep 2020 18:09:50 +0000 (18:09 +0000)]
MFC 366175: Revert most of r360179.

I had failed to notice that sgsendccb() was using cam_periph_mapmem()
and thus was not passing down user pointers directly to drivers.  In
practice this broke requests submitted from userland.

PR: 249395

3 years agoMFC r366091:
Mark Johnston [Wed, 30 Sep 2020 13:33:28 +0000 (13:33 +0000)]
MFC r366091:
Flag vm_reserv and vm_phys sysctls as MPSAFE.

3 years agoMFC r357530:
Konstantin Belousov [Wed, 30 Sep 2020 13:21:17 +0000 (13:21 +0000)]
MFC r357530:
Remove unneeded assert for curproc.  Simplify.

3 years agoMFC r366204:
Cy Schubert [Wed, 30 Sep 2020 03:38:13 +0000 (03:38 +0000)]
MFC r366204:

Remove extraneous bracket.

3 years agoMFC r366085, r366113:
Konstantin Belousov [Wed, 30 Sep 2020 02:25:05 +0000 (02:25 +0000)]
MFC r366085, r366113:
Do not leak oldvmspace if image activation failed

3 years agoMFC r366059-r366060: cp(1): tests
Kyle Evans [Wed, 30 Sep 2020 00:56:08 +0000 (00:56 +0000)]
MFC r366059-r366060: cp(1): tests

r366059:
cp: add some basic tests

There are some tests available in the NetBSD test suite, but we don't
currently pass all of those; further investigation will go into that. For
now, just add a basic test as well as a test that copies from /dev/null to a
file.

The /dev/null test confirms that the file gets created if it's empty, then
that it truncates the file if it's non-empty. This matches some usage that
was previously employed in the build and was replaced in r366042 by a
simpler shell construct.

I will also plan on coming back to expand these in due time.

r366060:
cp: tests: fix weird 20 insertion

This slipped in at the last moment. =(

3 years agoMFC r365954: xargs: add some long options for GNU compatibility
Kyle Evans [Wed, 30 Sep 2020 00:53:55 +0000 (00:53 +0000)]
MFC r365954: xargs: add some long options for GNU compatibility

These are low-effort to add, so let's just do it.

3 years agoMFC r365991:
Navdeep Parhar [Wed, 30 Sep 2020 00:13:19 +0000 (00:13 +0000)]
MFC r365991:

cxgbe(4): add counters for mbuf pullups and defrags.

3 years agoMFC r349533 (by jhb@).
Navdeep Parhar [Tue, 29 Sep 2020 23:35:46 +0000 (23:35 +0000)]
MFC r349533 (by jhb@).

Note that this does not add any functionality as IFCAP_NOMAP doesn't
exist on 12.  This is mainly an attempt to get t4_sge.c closer to what's
in head (to help with other MFCs).

r349533:
Add support for IFCAP_NOMAP to cxgbe(4).

Since cxgbe(4) uses sglist instead of bus_dma, this required updates
to the code that generates scatter/gather lists for packets.  Also,
unmapped mbufs are always sent via DMA and never as immediate data in
the payload of a work request.

3 years agoMFC r365967:
David Bright [Tue, 29 Sep 2020 17:09:43 +0000 (17:09 +0000)]
MFC r365967:

Whitespace fix after r365948

Sponsored by: Dell EMC Isilon

3 years agoMFC r365948:
David Bright [Tue, 29 Sep 2020 16:38:56 +0000 (16:38 +0000)]
MFC r365948:

Honor the FWUG value of some drives in nvmecontrol

nvmecontrol tries to upload firmware in chunks as large as it thinks
the device permits. It fails to take into account the FWUG value used
by some drives to advertise the size and alignment limits for firmware
chunks.

  - Use the firwmare update granularity value from the
    identify-controller response to set the max transfer size.
  - If the granularity is not reported or not restricted, fall back to
    the previously existing logic that calculates the max transfer
    size based on MDTS.
  - Add firmware update granularity to the identify-controller output.

Sponsored by: Dell EMC Isilon

3 years agoMFC r366186: bsdconfig, bsdinstall: Prune dead mirrors
Niclas Zeising [Tue, 29 Sep 2020 15:37:33 +0000 (15:37 +0000)]
MFC r366186: bsdconfig, bsdinstall: Prune dead mirrors

Prune dead mirrors from the list of mirrors in bsdconfig and bsdinstall.
All these return NXDOMAIN when trying to resolve them.

Approved by: emaste

3 years agoMFC r365946:
David Bright [Tue, 29 Sep 2020 14:59:41 +0000 (14:59 +0000)]
MFC r365946:

Add an ioctl to get an NVMe device's maximum transfer size

Sponsored by: Dell EMC Isilon

3 years agoMFC r366003:
Mark Johnston [Tue, 29 Sep 2020 01:56:21 +0000 (01:56 +0000)]
MFC r366003:
ftpd: Add missing braces around a statfd check

3 years agoMFC r366002:
Mark Johnston [Tue, 29 Sep 2020 01:54:04 +0000 (01:54 +0000)]
MFC r366002:
tftpd: Check for errors from chdir()

3 years agoMFC: r366189
Rick Macklem [Tue, 29 Sep 2020 01:52:53 +0000 (01:52 +0000)]
MFC: r366189
Bjorn reported a problem where the Linux NFSv4.1 client is
using an open_to_lock_owner4 when that lock_owner4 has already
been created by a previous open_to_lock_owner4. This caused the NFS server
to reply NFSERR_INVAL.

For NFSv4.0, this is an error, although the updated NFSv4.0 RFC7530 notes
that the correct error reply is NFSERR_BADSEQID (RFC3530 did not specify
what error to return).

For NFSv4.1, it is not obvious whether or not this is allowed by RFC5661,
but the NFSv4.1 server can handle this case without error.
This patch changes the NFSv4.1 (and NFSv4.2) server to handle multiple
uses of the same lock_owner in open_to_lock_owner so that it now correctly
interoperates with the Linux NFS client.
It also changes the error returned for NFSv4.0 to be NFSERR_BADSEQID.

Thanks go to Bjorn for diagnosing this and testing the patch.
He also provided a program that I could use to reproduce the problem.

PR: 249567
Reported by: bf@cebitec.uni-bielefeld.de

3 years agoMFC r364387:
Mateusz Piotrowski [Mon, 28 Sep 2020 22:13:07 +0000 (22:13 +0000)]
MFC r364387:

Cross-reference development.7 and tests.7

3 years agoMFC r364342:
Mateusz Piotrowski [Mon, 28 Sep 2020 22:10:08 +0000 (22:10 +0000)]
MFC r364342:

Use complete OIDs to avoid confusion

Submitted by: otis_sk.freebsd.org
Differential Revision: https://reviews.freebsd.org/D26098

3 years agoMFC 364454, 364453:
Mateusz Piotrowski [Mon, 28 Sep 2020 13:52:18 +0000 (13:52 +0000)]
MFC 364454, 364453:

I. Reference spi(8) from spigen.4

II. Clean up spi.8

- Remove trailing whitespace
- Address igor and mandoc warnings
- Sort options
- Use macros consistently (e.g., Fl for flags, Dq for quoting, Bd for code
  blocks)
- Add a history section
- Fix incorrect use of macros in various places

3 years agoMFC r365907:
Mark Johnston [Mon, 28 Sep 2020 11:52:09 +0000 (11:52 +0000)]
MFC r365907:
Address compiler warnings in C code used by the DTrace test suite.

3 years agoMFC r366167:
Mark Johnston [Mon, 28 Sep 2020 11:46:03 +0000 (11:46 +0000)]
MFC r366167:
ng_l2tp: Fix callout synchronization in the rexmit timeout handler

PR: 241133

3 years agoMFC r366100:
Stefan Eßer [Mon, 28 Sep 2020 07:59:50 +0000 (07:59 +0000)]
MFC r366100:

Add build options WITH/WITHOUT_GH_BC.

The update to the man-page cannot be merged, since the default value of
this option differs between -CURRENT and 12-STABLE.

3 years agoMFC r356323: src.opts.mk: SVNLITE requires FILE
Ed Maste [Sun, 27 Sep 2020 22:50:01 +0000 (22:50 +0000)]
MFC r356323: src.opts.mk: SVNLITE requires FILE

3 years agoMFC r356615: src.opts.mk: force KERBEROS_SUPPORT off where KERBEROS forced off
Ed Maste [Sun, 27 Sep 2020 22:48:43 +0000 (22:48 +0000)]
MFC r356615: src.opts.mk: force KERBEROS_SUPPORT off where KERBEROS forced off

Explicitly setting WITHOUT_KERBEROS implies WITHOUT_KERBEROS_SUPPORT,
but previously other cases that forced KERBEROS off (such as
WITHOUT_CRYPT) did not also set KERBEROS_SUPPORT off.  Because the
_SUPPORT dependent options (KERBEROS/KERBEROS_SUPPORT) are processed
before other dependencies (CRYPT/KERBEROS) it's not easy to make this
happen automatically.  Instead just explicitly set KERBEROS_SUPPORT
off where we set KERBEROS off.

3 years agoMFC r365905: diskless(8): Correct Sections out of conventional order error
Gordon Bergling [Sun, 27 Sep 2020 08:39:38 +0000 (08:39 +0000)]
MFC r365905: diskless(8): Correct Sections out of conventional order error

Event: September 2020 Bugathon

3 years agoMFC r366121:
Alan Somers [Sun, 27 Sep 2020 02:59:28 +0000 (02:59 +0000)]
MFC r366121:

fusefs: fix mmap'd writes in direct_io mode

If a FUSE server returns FOPEN_DIRECT_IO in response to FUSE_OPEN, that
instructs the kernel to bypass the page cache for that file. This feature
is also known by libfuse's name: "direct_io".

However, when accessing a file via mmap, there is no possible way to bypass
the cache completely. This change fixes a deadlock that would happen when
an mmap'd write tried to invalidate a portion of the cache, wrongly assuming
that a write couldn't possibly come from cache if direct_io were set.

Arguably, we could instead disable mmap for files with FOPEN_DIRECT_IO set.
But allowing it is less likely to cause user complaints, and is more in
keeping with the spirit of open(2), where O_DIRECT instructs the kernel to
"reduce", not "eliminate" cache effects.

PR: 247276
Reported by: trapexit@spawn.link
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D26485