]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoRemove duplicate lines from sed tests
Mateusz Piotrowski [Thu, 11 Jun 2020 03:03:52 +0000 (03:03 +0000)]
Remove duplicate lines from sed tests

Reported by: yuripv
Approved by: pfg (src)
MFC after: 2 weeks
X-MFC-With: 362017

4 years agoHard-code the ice_ddp firmware version.
Mark Johnston [Thu, 11 Jun 2020 00:36:35 +0000 (00:36 +0000)]
Hard-code the ice_ddp firmware version.

Like every other firmware image in the tree, the makefile will need to
be updated to point to the newest import.

Reviewed by: erj, imp (previous version)
Differential Revision: https://reviews.freebsd.org/D25222

4 years agoFix a couple of nits in Linux sysinfo(2) emulation.
Mark Johnston [Wed, 10 Jun 2020 23:52:50 +0000 (23:52 +0000)]
Fix a couple of nits in Linux sysinfo(2) emulation.

- Use the same definition of free memory as Linux.
- Rename the totalbig and freebig fields to match the corresponding
  names on Linux.

Discussed with: alc
MFC after: 1 week

4 years agoAdd a comment reflecting the commit log for r361945.
Mark Johnston [Wed, 10 Jun 2020 23:52:39 +0000 (23:52 +0000)]
Add a comment reflecting the commit log for r361945.

Suggested by: alc
Reviewed by: alc
MFC with: r361945

4 years agoRemove the FIRMWARE_MAX limit.
Mark Johnston [Wed, 10 Jun 2020 23:52:29 +0000 (23:52 +0000)]
Remove the FIRMWARE_MAX limit.

The firmware module arbitrarily limits us to at most 50 images.  It is
possible to hit this limit on platforms that preload many firmware
images, or link all of the firmware images for a set of devices into the
kernel.

Convert the table into a linked list, removing the limit.

Reported by: Steve Wheeler
Reviewed by: rpokala
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D25161

4 years agopowerpc/pmap: Fix pte_find_next() iterators for booke64 pmap
Justin Hibbits [Wed, 10 Jun 2020 23:03:35 +0000 (23:03 +0000)]
powerpc/pmap: Fix pte_find_next() iterators for booke64 pmap

After r361988 fixed the reference count leak on booke64, it became possible
for an iteration somewhere in the middle of a page to become stale, with the
page vanishing (correctly) due to all PTEs on that page going away.
pte_find_next() would start at that iterator, and move along 'higher' order
directory pages until it finds a valid one, without zeroing out the lower
order pages.  For instance:

/* Find next pte at or above 0x10002000. */
pte = pte_find_next(pmap, &(0x10002000));
pte_remove(pmap, pte);
/* This pte was the last reference in the page table page, page is
 * gone.
 */
pte = pte_find_next(pmap, 0x10002000);
/* pte_find_next will see 0x10002000's page is gone, and jump to the
 * next one, but starting iteration at the '0x2000' slot, skipping
 * 0x0000 and 0x1000.
 */

This caused some processes, like git, to trip the KASSERT() in
pmap_release().

Fix this by zeroing all lower order iterators at each level.

4 years agoRemove double-calls to tc_get_timecount() to warm timecounters.
Konstantin Belousov [Wed, 10 Jun 2020 22:30:32 +0000 (22:30 +0000)]
Remove double-calls to tc_get_timecount() to warm timecounters.

It seems that second call does not add any useful state change for all
implemented timecounters.

Discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

4 years agoAdd pthread_getname_np() and pthread_setname_np() aliases for
Konstantin Belousov [Wed, 10 Jun 2020 22:13:24 +0000 (22:13 +0000)]
Add pthread_getname_np() and pthread_setname_np() aliases for
pthread_get_name_np() and pthread_set_name_np().

This re-applies r361770 after compatibility fixes.

Reviewed by: antoine, jkim, markj
Tested by: antoine (exp-run)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D25117

4 years agoamd64 pmap: reorder IPI send and local TLB flush in TLB invalidations.
Konstantin Belousov [Wed, 10 Jun 2020 22:07:57 +0000 (22:07 +0000)]
amd64 pmap: reorder IPI send and local TLB flush in TLB invalidations.

Right now code first flushes all local TLB entries that needs to be
flushed, then signals IPI to remote cores, and then waits for
acknowledgements while spinning idle.  In the VMWare article 'Don’t
shoot down TLB shootdowns!' it was noted that the time spent spinning
is lost, and can be more usefully used doing local TLB invalidation.

We could use the same invalidation handler for local TLB as for
remote, but typically for pmap == curpmap we can use INVLPG for locals
instead of INVPCID on remotes, since we cannot control context
switches on them.  Due to that, keep the local code and provide the
callbacks to be called from smp_targeted_tlb_shootdown() after IPIs
are fired but before spin wait starts.

Reviewed by: alc, cem, markj, Anton Rang <rang at acm.org>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D25188

4 years agoAdd mode selection to iMX6 IPU driver
Oleksandr Tymoshenko [Wed, 10 Jun 2020 22:00:31 +0000 (22:00 +0000)]
Add mode selection to iMX6 IPU driver

- Configure ipu1_di0 tob e sourced from the VIDEO_PLL(PLL5) and hardcode
  frequency to (455000000/3)Mhz. This value, further divided, can yield
  frequencies close enough to support 1080p, 720p, 1024x768, and 640x480
  modes. This is not ideal but it's an improvement comparing to the only
  hardcoded 1024x768 mode.

- Fix memory leaks if attach method failed
- Print EDID when -v passed to the kernel

4 years agoFix reading EDID on TVs/monitors without E-DCC support
Oleksandr Tymoshenko [Wed, 10 Jun 2020 21:38:35 +0000 (21:38 +0000)]
Fix reading EDID on TVs/monitors without E-DCC support

Writing segment id to I2C device 0x30 only required if the segment is
non-zero. On the devices without E-DCC support writing to that address
fails and whole transaction then fails too. To avoid this do
not attempt write to the segment selection device unless required.

MFC after: 2 weeks

4 years agoAdjust crypto_apply function callbacks for OCF.
John Baldwin [Wed, 10 Jun 2020 21:18:19 +0000 (21:18 +0000)]
Adjust crypto_apply function callbacks for OCF.

- crypto_apply() is only used for reading a buffer to compute a
  digest, so change the data pointer to a const pointer.

- To better match m_apply(), change the data pointer type to void *
  and the length from uint16_t to u_int.  The length field in
  particular matters as none of the apply logic was splitting requests
  larger than UINT16_MAX.

- Adjust the auth_xform Update callback to match the function
  prototype passed to crypto_apply() and crypto_apply_buf().  This
  removes the needs for casts when using the Update callback.

- Change the Reinit and Setkey callbacks to also use a u_int length
  instead of uint16_t.

- Update auth transforms for the changes.  While here, use C99
  initializers for auth_hash structures and avoid casts on callbacks.

Reviewed by: cem
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25171

4 years agopci: loosen PCIe hot-plug requirements
Chuck Tuffli [Wed, 10 Jun 2020 20:12:45 +0000 (20:12 +0000)]
pci: loosen PCIe hot-plug requirements

The original PCIe hot-plug code required a couple of things which cause
PCI probing errors on the QEMU Q35 system and possibly physical systems
(Dell R6515).

Allocate the hot-plug interrupt as shared to support INTx interrupts.
The hot-plug interrupt mechanism should normally be MSI as PCIe mandates
MSI support, but QEMU's Q35 bridge only provides INTx interrupts.

Second, the code required the Electromechanical Interlock (Slot Status
EIS) to be engaged if present (Slot Capability EIP). Some platforms
including QEMU Q35 set EIP but not EIS. Fix by deleting the check.

Reviewed by: imp, mav, jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24877

4 years agoRead commands from stdin when -f - is passed to sed(1)
Mateusz Piotrowski [Wed, 10 Jun 2020 19:23:58 +0000 (19:23 +0000)]
Read commands from stdin when -f - is passed to sed(1)

This patch teaches sed to interpret a "-" in a special way when given
as an argument to the -f flag.

This behavior is also present in GNU sed.

PR: 244872
Tested by: antoine (exp-run)
Reviewed by: pfg, tobik (older version)
Approved by: pfg (src)
Relnotes: yes
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24079

4 years ago[net80211] ok ok if_xname won't ever be NULL.
Adrian Chadd [Wed, 10 Jun 2020 18:59:46 +0000 (18:59 +0000)]
[net80211] ok ok if_xname won't ever be NULL.

Somewhere in net80211 if_xname is checked against NULL but it doesn't trigger
a compiler warning, but this does.  So DTRT for FreeBSD and the other if_xname
derefences can be converted to this function at a later time.

4 years agoMake linux(4) set the openfiles soft resource limit to 1024 for Linux
Edward Tomasz Napierala [Wed, 10 Jun 2020 18:50:46 +0000 (18:50 +0000)]
Make linux(4) set the openfiles soft resource limit to 1024 for Linux
applications, which often depend on this being the case.  There's a new
sysctl, compat.linux.default_openfiles, to control this behaviour.

Reviewed by: kevans, emaste, bcr (manpages)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25177

4 years agoSupport SO_SNDBUFFORCE/SO_RCVBUFFORCE by aliasing them to the
Edward Tomasz Napierala [Wed, 10 Jun 2020 18:43:43 +0000 (18:43 +0000)]
Support SO_SNDBUFFORCE/SO_RCVBUFFORCE by aliasing them to the
standard SO_SNDBUF/SO_RCVBUF.  Mostly cosmetics, to get rid
of the warning during 'apt upgrade'.

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

4 years agoFix arm64 kernel build with DEBUG on
Ed Maste [Wed, 10 Jun 2020 16:00:43 +0000 (16:00 +0000)]
Fix arm64 kernel build with DEBUG on

Submitted by: Greg V <greg@unrelenting.technology>, andrew
Differential Revision: https://reviews.freebsd.org/D24986

4 years agoAll the ARM Coresight interconnect devices set ResourceProducer on memory
Ruslan Bukin [Wed, 10 Jun 2020 14:39:54 +0000 (14:39 +0000)]
All the ARM Coresight interconnect devices set ResourceProducer on memory
resources, ignore it.

The devices found in the ARM Neoverse N1 System Development Platform
(N1SDP).

Sponsored by: DARPA, AFRL

4 years agoARM Coresight Funnel device:
Ruslan Bukin [Wed, 10 Jun 2020 14:28:36 +0000 (14:28 +0000)]
ARM Coresight Funnel device:
o Split-out FDT attachment to a separate file;
o Add ACPI attachment;
o Add support for the Static Funnel device.

Sponsored by: DARPA, AFRL

4 years agorelease: Fix arm GPT image
Emmanuel Vadot [Wed, 10 Jun 2020 14:10:48 +0000 (14:10 +0000)]
release: Fix arm GPT image

msdosfs labels are capitalized, use EFI instead of efi.

MFC after: 3 days

4 years agoFix the efi serial console in the Arm models.
Andrew Turner [Wed, 10 Jun 2020 09:31:37 +0000 (09:31 +0000)]
Fix the efi serial console in the Arm models.

On some UEFI implementations the ConsOut EFI variable is not a device
path end type so we never move to the next node. Fix this by always
incrementing the device path node pointer, with a sanity check that
the node length is large enough so no two nodes overlap.

While here return failure on malloc failure rather than a NULL pointer
dereference.

Reviewed by: tsoome, imp (previous version)
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D25202

4 years agoSwitch rtsock code to using newly-create rib_action() KPI call.
Alexander V. Chernikov [Wed, 10 Jun 2020 07:46:22 +0000 (07:46 +0000)]
Switch rtsock code to using newly-create rib_action() KPI call.

This simplifies the code and allows to further split rtentry and nexthop,
 removing one of the blockers for multipath code introduction, described in
 D24141.

Reviewed by: ae
Differential Revision: https://reviews.freebsd.org/D25192

4 years agoPrevent TCP Cubic to abruptly increase cwnd after app-limited
Richard Scheffenegger [Wed, 10 Jun 2020 07:32:02 +0000 (07:32 +0000)]
Prevent TCP Cubic to abruptly increase cwnd after app-limited

Cubic calculates the new cwnd based on absolute time
elapsed since the start of an epoch. A cubic epoch is
started on congestion events, or once the congestion
avoidance phase is started, after slow-start has
completed.

When a sender is application limited for an extended
amount of time and subsequently a larger volume of data
becomes ready for sending, Cubic recalculates cwnd
with a lingering cubic epoch. This recalculation
of the cwnd can induce a massive increase in cwnd,
causing a burst of data to be sent at line rate by
the sender.

This adds a flag to reset the cubic epoch once a
session transitions from app-limited to cwnd-limited
to prevent the above effect.

Reviewed by: chengc_netapp.com, tuexen (mentor)
Approved by: tuexen (mentor), rgrimes (mentor)
MFC after: 3 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D25065

4 years agoAdd le_read_channel_map and le_read_remote_features command
Takanori Watanabe [Wed, 10 Jun 2020 05:01:00 +0000 (05:01 +0000)]
Add le_read_channel_map and le_read_remote_features command

PR: 247051
Submitted by:   Marc Veldman marc at bumblingdork.com

4 years agoAdd LE events:
Takanori Watanabe [Wed, 10 Jun 2020 04:54:02 +0000 (04:54 +0000)]
Add LE events:
READ_REMOTE_FEATURES_COMPL
LONG_TERM_KEY_REQUEST
REMOTE_CONN_PARAM_REQUEST
DATA_LENGTH_CHANGE
READ_LOCAL_P256_PK_COMPL
GEN_DHKEY_COMPL
ENH_CONN_COMPL

PR: 247050
Submitted by: Marc Veldman marc at bumblingdork.com

4 years agopowerpc/powernv: Don't use the vmem quantum cache for OPAL PCI MSI allocations
Justin Hibbits [Wed, 10 Jun 2020 04:08:16 +0000 (04:08 +0000)]
powerpc/powernv: Don't use the vmem quantum cache for OPAL PCI MSI allocations

vmem quantum cache is only needed when doing a lot of concurrent allocations,
which doesn't happen when allocating MSIs.  This wastes memory for the cache
zones.  Avoid this waste and don't use the quantum cache.

Reported by: markj

4 years agopowerpc/mpc85xx: Don't use the quantum cache in vmem for MPIC MSIs
Justin Hibbits [Wed, 10 Jun 2020 04:04:59 +0000 (04:04 +0000)]
powerpc/mpc85xx: Don't use the quantum cache in vmem for MPIC MSIs

The qcache is unnecessary for this purpose, it's only needed when there are
lots of concurrent allocations.

Reported by: markj

4 years agoFixup r361997 by balancing parens. Duh.
Doug Moore [Wed, 10 Jun 2020 03:36:17 +0000 (03:36 +0000)]
Fixup r361997 by balancing parens.  Duh.

4 years agoAdd missing shell script from r361995
Kyle Evans [Wed, 10 Jun 2020 03:04:36 +0000 (03:04 +0000)]
Add missing shell script from r361995

Pointy hat: kevans
Reported by: rpokala
X-MFC-With: r361995

4 years agoAdd two functions that create M_EXTPG mbufs with anonymous pages.
Rick Macklem [Wed, 10 Jun 2020 02:51:39 +0000 (02:51 +0000)]
Add two functions that create M_EXTPG mbufs with anonymous pages.

These two functions are needed by nfs-over-tls, but could also be
useful for other purposes.
mb_alloc_ext_plus_pages() - Allocates a M_EXTPG mbuf and enough anonymous
      pages to store "len" data bytes.
mb_mapped_to_unmapped() - Copies the data from a list of mapped (non-M_EXTPG)
      mbufs into a list of M_EXTPG mbufs allocated with anonymous pages.
      This is roughly the inverse of mb_unmapped_to_ext().

Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D25182

4 years agoRestore an RB_COLOR macro, for the benefit of a bit of DIAGNOSTIC code
Doug Moore [Wed, 10 Jun 2020 02:50:25 +0000 (02:50 +0000)]
Restore an RB_COLOR macro, for the benefit of a bit of DIAGNOSTIC code
that depends on it.

Reported by: rpokala, mjguzik
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D25204

4 years agoexecvPe: obviate the need for potentially large stack allocations
Kyle Evans [Wed, 10 Jun 2020 01:32:13 +0000 (01:32 +0000)]
execvPe: obviate the need for potentially large stack allocations

Some environments in which execvPe may be called have a limited amount of
stack available. Currently, it avoidably allocates a segment on the stack
large enough to hold PATH so that it may be mutated and use strsep() for
easy parsing. This logic is now rewritten to just operate on the immutable
string passed in and do the necessary math to extract individual paths,
since it will be copying out those segments to another buffer anyways and
piecing them together with the name for a full path.

Additional size is also needed for the stack in posix_spawnp(), because it
may need to push all of argv to the stack and rebuild the command with sh in
front of it. We'll make sure it's properly aligned for the new thread, but
future work should likely make rfork_thread a little easier to use by
ensuring proper alignment.

Some trivial cleanup has been done with a couple of error writes, moving
strings into char arrays for use with the less fragile sizeof().

Reported by: Andrew Gierth <andrew_tao173.riddles.org.uk>
Reviewed by: jilles, kib, Andrew Gierth
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25038

4 years agoexecvp: fix up the ENOEXEC fallback
Kyle Evans [Wed, 10 Jun 2020 01:30:37 +0000 (01:30 +0000)]
execvp: fix up the ENOEXEC fallback

If execve fails with ENOEXEC, execvp is expected to rebuild the command
with /bin/sh instead and try again.

The previous version did this, but overlooked two details:

argv[0] can conceivably be NULL, in which case memp would never get
terminated.  We must allocate no less than three * sizeof(char *) so we can
properly terminate at all times. For the non-NULL argv standard case, we
count all the non-NULL elements and actually skip the first argument, so we
end up capturing the NULL terminator in our bcopy().

The second detail is that the spec is actually worded such that we should
have been preserving argv[0] as passed to execvp:

"[...] executed command shall be as if the process invoked the sh utility
using execl() as follows:

execl(<shell path>, arg0, file, arg1, ..., (char *)0);

where <shell path> is an unspecified pathname for the sh utility, file is
the process image file, and for execvp(), where arg0, arg1, and so on
correspond to the values passed to execvp() in argv[0], argv[1], and so on."

So we make this change at this time as well, while we're already touching
it. We decidedly can't preserve a NULL argv[0] as this would be incredibly,
incredibly fragile, so we retain our legacy behavior of using "sh" for
argv[] in this specific instance.

Some light tests are added to try and detect some components of handling the
ENOEXEC fallback; posix_spawnp_enoexec_fallback_null_argv0 is likely not
100% reliable, but it at least won't raise false-alarms and it did result in
useful failures with pre-change libc on my machine.

This is a secondary change in D25038.

Reported by: Andrew Gierth <andrew_tao173.riddles.org.uk>
Reviewed by: jilles, kib, Andrew Gierth
MFC after: 1 week

4 years agoAdd some default cases for unreachable code to silence compiler warnings.
John Baldwin [Wed, 10 Jun 2020 00:09:31 +0000 (00:09 +0000)]
Add some default cases for unreachable code to silence compiler warnings.

This was caused by r361481 when the buffer type was changed from an
int to an enum.

Reported by: mjg, rpokala
Sponsored by: Chelsio Communications

4 years agocred: distribute reference count per thread
Mateusz Guzik [Tue, 9 Jun 2020 23:03:48 +0000 (23:03 +0000)]
cred: distribute reference count per thread

This avoids dirtying creds in the common case, see the comment in kern_prot.c
for details.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D24007

4 years agoixl(4): Add FW recovery mode support and other things
Eric Joyner [Tue, 9 Jun 2020 22:42:54 +0000 (22:42 +0000)]
ixl(4): Add FW recovery mode support and other things

Update the iflib version of ixl driver based on the OOT version ixl-1.11.29.

Major changes:

- Extract iflib specific functions from ixl_pf_main.c to ixl_pf_iflib.c
  to simplify code sharing between legacy and iflib version of driver

- Add support for most recent FW API version (1.10), which extends FW
  LLDP Agent control by user to X722 devices

- Improve handling of device global reset

- Add support for the FW recovery mode

- Use virtchnl function to validate virtual channel messages instead of
  using separate checks

- Fix MAC/VLAN filters accounting

Submitted by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by: erj@
Tested by: Jeffrey Pieper <jeffrey.e.pieper@intel.com>
MFC after: 1 week
Relnotes: yes
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D24564

4 years agoAdd a crypto capability flag for accelerated software drivers.
John Baldwin [Tue, 9 Jun 2020 22:26:07 +0000 (22:26 +0000)]
Add a crypto capability flag for accelerated software drivers.

Use this in GELI to print out a different message when accelerated
software such as AESNI is used vs plain software crypto.

While here, simplify the logic in GELI a bit for determing which type
of crypto driver was chosen the first time by examining the
capabilities of the matched driver after a single call to
crypto_newsession rather than making separate calls with different
flags.

Reviewed by: delphij
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25126

4 years agoMark padlock(4) and cryptocteon(4) as software drivers.
John Baldwin [Tue, 9 Jun 2020 22:19:36 +0000 (22:19 +0000)]
Mark padlock(4) and cryptocteon(4) as software drivers.

Both already return the accelerated software priority from
cryptodev_probesession.

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25125

4 years agopowerpc/pmap: Fix wired memory leak in booke64 page directories
Justin Hibbits [Tue, 9 Jun 2020 21:59:13 +0000 (21:59 +0000)]
powerpc/pmap: Fix wired memory leak in booke64 page directories

Properly handle reference counts in the 64-bit pmap page directories.
Otherwise all page table pages would leak due to over-referencing.  This
would cause a quick enter to swap on a desktop system (AmigaOne X5000) when
quitting and rerunning applications, or just building world.

Add an INVARIANTS check to validate no leakage at pmap release time.

4 years agoPrevent TCP Cubic to abruptly increase cwnd after slow-start
Richard Scheffenegger [Tue, 9 Jun 2020 21:07:58 +0000 (21:07 +0000)]
Prevent TCP Cubic to abruptly increase cwnd after slow-start

Introducing flags to track the initial Wmax dragging and exit
from slow-start in TCP Cubic. This prevents sudden jumps in the
caluclated cwnd by cubic, especially when the flow is application
limited during slow start (cwnd can not grow as fast as expected).
The downside is that cubic may remain slightly longer in the
concave region before starting the convex region beyond Wmax again.

Reviewed by: chengc_netapp.com, tuexen (mentor)
Approved by: tuexen (mentor), rgrimes (mentor, blanket)
MFC after: 3 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D23655

4 years agoMerge bmake-20200606
Simon J. Gerraty [Tue, 9 Jun 2020 20:52:35 +0000 (20:52 +0000)]
Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.

4 years agoFix boot of wandquad after DTS update
Andreas Tobler [Tue, 9 Jun 2020 20:27:35 +0000 (20:27 +0000)]
Fix boot of wandquad after DTS update

In the recent dts sync the name of the aips-bus@ changed to bus@. Reflect
this change and add an additional OF_finddevice in fix_fdt_interrupt_data()
and in fix_fdt_iomuxc_data() with bus@ only. Iow, keep the old naming for
compatibility.

Discussed with: ian@

4 years agoTo reduce the size of an rb_node, drop the color field. Set the least
Doug Moore [Tue, 9 Jun 2020 20:19:11 +0000 (20:19 +0000)]
To reduce the size of an rb_node, drop the color field. Set the least
significant bit in the pointer to the node from its parent to indicate
that the node is red. Have the tree rotation macros leave the
old-parent/new-child node red and the new-parent/old-child node black.

This change makes RB_LEFT and RB_RIGHT no longer assignable, and
RB_COLOR no longer defined. Any code that modifies the tree or
examines a node color would have to be modified after this change.

Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D25105

4 years agoiflib: netmap: honor netmap_irx_irq return values
Vincenzo Maffione [Tue, 9 Jun 2020 19:15:43 +0000 (19:15 +0000)]
iflib: netmap: honor netmap_irx_irq return values

In the receive interrupt routine, always call netmap_rx_irq().
The latter function will return != NM_IRQ_PASS if netmap is not
active on that specific receive queue, so that the driver can go
on with iflib_rxeof(). Note that netmap supports partial opening,
where only a subset of the RX or TX rings can be open in netmap mode.
Checking the IFCAP_NETMAP flag is not enough to make sure that the
queue is indeed in netmap mode.
Moreover, in case netmap_rx_irq() returns NM_IRQ_RESCHED, it means
that netmap expects the driver to call netmap_rx_irq() again as soon
as possible. Currently, this may happen when the device is attached
to a VALE switch.

Reviewed by: gallatin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25167

4 years agorelease: amd64 efi boot name is bootx64
Emmanuel Vadot [Tue, 9 Jun 2020 18:13:52 +0000 (18:13 +0000)]
release: amd64 efi boot name is bootx64

efi_boot_name is just used for arm image so no harm done.

Reported by: gonzo
MFC after: 3 days

4 years agolibusb: improve compatibility
Kyle Evans [Tue, 9 Jun 2020 17:17:43 +0000 (17:17 +0000)]
libusb: improve compatibility

Specifically, add LIBUSB_CLASS_PHYSICAL and the libusb_has_capability API.
Descriptions and functionality for these derived from the
documentation at [0].  The current set of capabilities are all supported by
libusb.

These were detected as missing after updating net/freerdp to 2.1.1, which
attempted to use both.

[0] http://libusb.sourceforge.net/api-1.0/group__libusb__misc.html

Reviewed by: hselasky
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25194

4 years agoSimilar to UART on ThunderX2, the ARM Coresight (ETM component)
Ruslan Bukin [Tue, 9 Jun 2020 17:07:42 +0000 (17:07 +0000)]
Similar to UART on ThunderX2, the ARM Coresight (ETM component)
set ResourceProducer on memory resources: ignore it.

Tested on ARM N1SDP board.

Sponsored by: DARPA, AFRL

4 years agoRefactor ptrace() ABI compatibility.
John Baldwin [Tue, 9 Jun 2020 16:43:23 +0000 (16:43 +0000)]
Refactor ptrace() ABI compatibility.

Add a freebsd32_ptrace() and move as many freebsd32 shims as possible
to freebsd32_ptrace().  Aside from register sets, freebsd32 passes
pointers to native structures to kern_ptrace() and converts to/from
native/32-bit structure formats in freebsd32_ptrace() outside of
kern_ptrace().

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D25195

4 years agoARM Embedded Trace Macrocell v4.x driver:
Ruslan Bukin [Tue, 9 Jun 2020 16:43:16 +0000 (16:43 +0000)]
ARM Embedded Trace Macrocell v4.x driver:
o Split-out FDT attachment to a separate file;
o Add ACPI attachment.

Sponsored by: DARPA, AFRL

4 years agoFix style: wrap long lines.
Ruslan Bukin [Tue, 9 Jun 2020 16:06:10 +0000 (16:06 +0000)]
Fix style: wrap long lines.

Sponsored by: DARPA, AFRL

4 years agoRename coresight drivers: use underscores in filenames.
Ruslan Bukin [Tue, 9 Jun 2020 15:56:41 +0000 (15:56 +0000)]
Rename coresight drivers: use underscores in filenames.

Sponsored by: DARPA, AFRL

4 years agoAssert on pg_jobc state.
Mateusz Guzik [Tue, 9 Jun 2020 15:17:23 +0000 (15:17 +0000)]
Assert on pg_jobc state.

Stolen from NetBSD.

4 years agovm: rework swap_pager_status to execute in constant time
Mateusz Guzik [Tue, 9 Jun 2020 14:16:18 +0000 (14:16 +0000)]
vm: rework swap_pager_status to execute in constant time

The lock-protected iteration is trivially avoidable.

This removes a serialisation point from Linux binaries (which end up calling
here from the sysinfo syscall).

4 years agocoufreq_dt: Rename DEBUG to DPRINTF
Emmanuel Vadot [Tue, 9 Jun 2020 09:42:39 +0000 (09:42 +0000)]
coufreq_dt: Rename DEBUG to DPRINTF

DEBUG is a kernel configuration flag and if used cpufreq_dt.c will fail the
build of kernel.

PR: 246867
Submitted by: Oskar Holmund (oskar.holmlund@ohdata.se)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25080

4 years agops: remove xo_no_setlocale() call
Yuri Pankov [Tue, 9 Jun 2020 07:07:29 +0000 (07:07 +0000)]
ps: remove xo_no_setlocale() call

Apparently libxo was fixed to do the right thing on FreeBSD,
and calling xo_no_setlocale() is no longer needed.

Reported by: phil

4 years agoPost CVE-2020-12695 cleanup patch:
Cy Schubert [Tue, 9 Jun 2020 05:43:51 +0000 (05:43 +0000)]
Post CVE-2020-12695 cleanup patch:

Resolve a Linuxism to fix the build.

MFC after: 3 days
X-MFC with: r361957, r361958, r361959

4 years agoMFV r361938:
Cy Schubert [Tue, 9 Jun 2020 05:39:37 +0000 (05:39 +0000)]
MFV r361938:

Upstream commit message:

[PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more
properly

While it is appropriate to try to retransmit the event to another
callback URL on a failure to initiate the HTTP client connection, there
is no point in trying the exact same operation multiple times in a row.
Replve the event_retry() calls with event_addr_failure() for these cases
to avoid busy loops trying to repeat the same failing operation.

These potential busy loops would go through eloop callbacks, so the
process is not completely stuck on handling them, but unnecessary CPU
would be used to process the continues retries that will keep failing
for the same reason.

Obtained from: https://w1.fi/security/2020-1/\
0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch
MFC after: 3 days
Security: VU#339275 and CVE-2020-12695

4 years agoMFV r361937:
Cy Schubert [Tue, 9 Jun 2020 05:38:12 +0000 (05:38 +0000)]
MFV r361937:

Upstream commit message:

[PATCH 2/3] WPS UPnP: Fix event message generation using a long URL path

More than about 700 character URL ended up overflowing the wpabuf used
for building the event notification and this resulted in the wpabuf
buffer overflow checks terminating the hostapd process. Fix this by
allocating the buffer to be large enough to contain the full URL path.
However, since that around 700 character limit has been the practical
limit for more than ten years, start explicitly enforcing that as the
limit or the callback URLs since any longer ones had not worked before
and there is no need to enable them now either.

Obtained from: https://w1.fi/security/2020-1/\
0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch
MFC after: 3 days
Security: VU#339275 and CVE-2020-12695

4 years agoMFV r361936:
Cy Schubert [Tue, 9 Jun 2020 05:35:38 +0000 (05:35 +0000)]
MFV r361936:

Upstream commit message:

[PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to
other networks

The UPnP Device Architecture 2.0 specification errata ("UDA errata
16-04-2020.docx") addresses a problem with notifications being allowed
to go out to other domains by disallowing such cases. Do such filtering
for the notification callback URLs to avoid undesired connections to
external networks based on subscriptions that any device in the local
network could request when WPS support for external registrars is
enabled (the upnp_iface parameter in hostapd configuration).

Obtained from: https://w1.fi/security/2020-1/\
0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch
MFC after: 3 days
Security: VU#339275 and CVE-2020-12695

4 years agoFix a bug where XU_NGROUPS + 1 groups might be copied.
Rick Macklem [Tue, 9 Jun 2020 05:01:23 +0000 (05:01 +0000)]
Fix a bug where XU_NGROUPS + 1 groups might be copied.

r361780 fixed the code so that it would only remove the duplicate when
it actually existed. However, that might have resulted in XU_NGROUPS + 1
groups being copied, running off the end of the array. This patch fixes
the problem.

Spotted during code inspection for other mountd changes.

MFC after: 2 weeks

4 years agoImport bmake-20200606
Simon J. Gerraty [Tue, 9 Jun 2020 02:07:26 +0000 (02:07 +0000)]
Import bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.

4 years agoStop computing a "sharedram" value when emulating Linux sysinfo(2).
Mark Johnston [Mon, 8 Jun 2020 22:29:52 +0000 (22:29 +0000)]
Stop computing a "sharedram" value when emulating Linux sysinfo(2).

The previous code was computing an incorrect value in a very expensive
manner.  "sharedram" is supposed to be the amount of memory used by
named swap objects, which on FreeBSD basically corresponds to memory
usage by shared memory objects (including, for example, GEM objects) and
tmpfs.  We currently have no cheap way to count such pages.  The
previous code tried to determine the number of copy-on-write pages
shared between processes.

Just replace the computed value with 0.  illumos reportedly does the
same thing.  Linux itself did not populate this field until a 2014
commit, "mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces".

Reported by: mjg
MFC after: 1 week

4 years agovirtio: Support non-legacy network device and queue
Jessica Clarke [Mon, 8 Jun 2020 21:51:36 +0000 (21:51 +0000)]
virtio: Support non-legacy network device and queue

The non-legacy interface always defines num_buffers in the header,
regardless of whether VIRTIO_NET_F_MRG_RXBUF, just leaving it unused. We
also need to ensure our virtqueue doesn't filter out VIRTIO_F_VERSION_1
during negotiation, as it supports non-legacy transports just fine. This
fixes network packet transmission on TinyEMU.

Reviewed by: br, brooks (mentor), jhb (mentor)
Approved by: br, brooks (mentor), jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D25132

4 years agovirtio_mmio: Negotiate the upper half of the feature bits too
Jessica Clarke [Mon, 8 Jun 2020 21:49:42 +0000 (21:49 +0000)]
virtio_mmio: Negotiate the upper half of the feature bits too

The feature bits are exposed as a 32-bit register with 2 banks, so we
should negotiate both halves. Notably, VIRTIO_F_VERSION_1 is in the
upper half, and will be used in an upcoming commit.

The PCI bus driver also has this bug, but the legacy BAR layout did not
include selector registers and is rather different from the modern
layout, so it remains solely as legacy.

Reviewed by: br, brooks (mentor), jhb (mentor)
Approved by: br, brooks (mentor), jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D25131

4 years agoUse Fl instead of Ar for long flags
Mateusz Piotrowski [Mon, 8 Jun 2020 21:11:34 +0000 (21:11 +0000)]
Use Fl instead of Ar for long flags

Also, bump date after r361935.

MFC after: 1 week

4 years agoImplement zero-copy iSCSI target transmission/read.
Alexander Motin [Mon, 8 Jun 2020 20:53:57 +0000 (20:53 +0000)]
Implement zero-copy iSCSI target transmission/read.

Add ICL_NOCOPY flag to icl_pdu_append_data(), specifying that the method
can just reference the data buffer instead of immediately copying it.

Extend the offload KPI with optional PDU queue method, allowing to specify
completion callback, called when all the data referenced by above has been
transferred and won't be accessed any more (the buffers can be freed).

Implement the above functionality in software iSCSI driver using mbufs
with external storage and reference counter.  Note that some NICs (ixl(4))
may keep the mbuf in TX queue for a long time, so CTL has to be ready.

Add optional method to struct ctl_scsiio for buffer reference counting.
Implement it for CTL block backend, allowing to delay free of the struct
ctl_be_block_io and memory it references as needed.  In first reincarnation
of the patch I tried to delay whole I/O as it is done for FibreChannel,
that was cleaner, but due to the above callback delays I had to rewrite
it this way to not leave LUN referenced potentially for hours or more.

All together on sequential read from ZFS ARC this saves about 30% of CPU
time and memory bandwidth by avoiding one of 3 memory copies (the other
two are from ZFS ARC to DMU cache and then from DMU cache to CTL buffers).
On tests with 2x Xeon Silver 4114 this allows to reach full line rate of
100GigE NIC.  Tests with Gold CPUs and two 100GigE NICs are stil TBD,
but expectations to saturate them are pretty high. ;)

Discussed with: Chelsio
Sponsored by: iXsystems, Inc.

4 years agoUpstream commit message:
Cy Schubert [Mon, 8 Jun 2020 20:40:09 +0000 (20:40 +0000)]
Upstream commit message:

[PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more
properly

While it is appropriate to try to retransmit the event to another
callback URL on a failure to initiate the HTTP client connection, there
is no point in trying the exact same operation multiple times in a row.
Replve the event_retry() calls with event_addr_failure() for these cases
to avoid busy loops trying to repeat the same failing operation.

These potential busy loops would go through eloop callbacks, so the
process is not completely stuck on handling them, but unnecessary CPU
would be used to process the continues retries that will keep failing
for the same reason.

Obtained from: https://w1.fi/security/2020-1/\
0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch
Security: VU#339275 and CVE-2020-12695

4 years agoUpstream commit message:
Cy Schubert [Mon, 8 Jun 2020 20:37:52 +0000 (20:37 +0000)]
Upstream commit message:

[PATCH 2/3] WPS UPnP: Fix event message generation using a long URL path

More than about 700 character URL ended up overflowing the wpabuf used
for building the event notification and this resulted in the wpabuf
buffer overflow checks terminating the hostapd process. Fix this by
allocating the buffer to be large enough to contain the full URL path.
However, since that around 700 character limit has been the practical
limit for more than ten years, start explicitly enforcing that as the
limit or the callback URLs since any longer ones had not worked before
and there is no need to enable them now either.

Obtained from: https://w1.fi/security/2020-1/\
0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch
Security: VU#339275 and CVE-2020-12695

4 years agoUpstream commit message:
Cy Schubert [Mon, 8 Jun 2020 20:35:03 +0000 (20:35 +0000)]
Upstream commit message:

[PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to
other networks

The UPnP Device Architecture 2.0 specification errata ("UDA errata
16-04-2020.docx") addresses a problem with notifications being allowed
to go out to other domains by disallowing such cases. Do such filtering
for the notification callback URLs to avoid undesired connections to
external networks based on subscriptions that any device in the local
network could request when WPS support for external registrars is
enabled (the upnp_iface parameter in hostapd configuration).

Obtained from: https://w1.fi/security/2020-1/\
0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch
MFC after: 1 week
Security: VU#339275 and CVE-2020-12695

4 years agoAdd VHDX support to mkimg(1)
Oleksandr Tymoshenko [Mon, 8 Jun 2020 20:28:32 +0000 (20:28 +0000)]
Add VHDX support to mkimg(1)

VHDX is the successor of Microsoft's VHD file format. It increases
maximum capacity of the virtual drive to 64TB and introduces features
to better handle power/system failures.

VHDX is the required format for 2nd generation Hyper-V VMs.

Reviewed by: marcel
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25184

4 years agoWhitespace cleanups and removal of a stale comment.
Michael Tuexen [Mon, 8 Jun 2020 20:23:20 +0000 (20:23 +0000)]
Whitespace cleanups and removal of a stale comment.

MFC after: 1 week

4 years agoloader: install allow for more complete device spec in url
Simon J. Gerraty [Mon, 8 Jun 2020 18:13:38 +0000 (18:13 +0000)]
loader: install allow for more complete device spec in url

Rework to simplify and impose sane url syntax.
That is we allow for file://[devname[:fstype]]/package

Reviewed by: stevek
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org//D25134

4 years agoriscv: Use SBI shutdown call to implement RB_POWEROFF
Jessica Clarke [Mon, 8 Jun 2020 17:57:21 +0000 (17:57 +0000)]
riscv: Use SBI shutdown call to implement RB_POWEROFF

Currently we only call sbi_shutdown in cpu_reset, which means we reach
"Please press any key to reboot." even when RB_POWEROFF is set, and only
once the user presses a key do we then shutdown. Instead, register a
shutdown_final event handler and make an SBI shutdown call if
RB_POWEROFF is set.

Reviewed by: br, jhb (mentor), kp
Approved by: br, jhb (mentor), kp
Differential Revision: https://reviews.freebsd.org/D25183

4 years agoMove MPASS() macros to systm.h. They are widely used all over
Gleb Smirnoff [Mon, 8 Jun 2020 17:40:39 +0000 (17:40 +0000)]
Move MPASS() macros to systm.h.  They are widely used all over
the kernel and aren't contained only to the locking code.

Reviewed by: kib, mjg
Differential Revision: https://reviews.freebsd.org/D23656

4 years agocrashinfo: stop looking for gdb in /usr/bin/gdb
Ed Maste [Mon, 8 Jun 2020 16:11:44 +0000 (16:11 +0000)]
crashinfo: stop looking for gdb in /usr/bin/gdb

As of r359457 we removed the GDB_LIBEXEC option, always installing in-tree
gdb into /usr/libexec/.  Thus, there is now no need for crashinfo to include
/usr/bin/gdb in the list of pathnames to check when looking for gdb.

4 years agoAn important statistic in determining if a server process (or client) is being delayed
Randall Stewart [Mon, 8 Jun 2020 11:48:07 +0000 (11:48 +0000)]
An important statistic in determining if a server process (or client) is being delayed
is to know the time to first byte in and time to first byte out. Currently we
have no way to know these all we have is t_starttime. That (t_starttime) tells us
what time the 3 way handshake completed. We don't know when the first
request came in or how quickly we responded. Nor from a client perspective
do we know how long from when we sent out the first byte before the
server responded.

This small change adds the ability to track the TTFB's. This will show up in
BB logging which then can be pulled for later analysis. Note that currently
the tracking is via the ticks variable of all three variables. This provides
a very rough estimate (hz=1000 its 1ms). A follow-on set of work will be
to change all three of these values into something with a much finer resolution
(either microseconds or nanoseconds), though we may want to make the resolution
configurable so that on lower powered machines we could still use the much
cheaper ticks variable.

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

4 years agoDocument that /lib is always in the list of shared library paths
Mateusz Piotrowski [Mon, 8 Jun 2020 09:33:45 +0000 (09:33 +0000)]
Document that /lib is always in the list of shared library paths

/lib was added to the list in r119011.

MFC after: 1 week

4 years agoRISC-V: Check that the DTB doesn't overlap with kernel
Alex Richardson [Mon, 8 Jun 2020 08:52:02 +0000 (08:52 +0000)]
RISC-V: Check that the DTB doesn't overlap with kernel

This can happen with very large kernels (e.g. ones embedding a root
filesystem). The DTB written by OpenSBI/BBL is quite small so this is
unlikely to hit important data, but if it does this can result in very
confusing and hard-to-debug crashes. Add a KASSERT() and a verbose print
to catch this problem with debug kernels.

While this will not print any output by default if it fails (that would
depend on EARLY_PRINTF), at least the kernel now halts reliably instead
of randomly crashing.

Reviewed By: mhorne
Differential Revision: https://reviews.freebsd.org/D25153

4 years agosys/riscv: Remove debug printfs
Alex Richardson [Mon, 8 Jun 2020 08:51:57 +0000 (08:51 +0000)]
sys/riscv: Remove debug printfs

They are only visible with EARLY_PRINTF so don't show up by default.

Reviewed By: mhorne
Differential Revision: https://reviews.freebsd.org/D25152

4 years agoRISC-V: handle DTB aligned to less than 2MB
Alex Richardson [Mon, 8 Jun 2020 08:51:52 +0000 (08:51 +0000)]
RISC-V: handle DTB aligned to less than 2MB

By default OpenSBI and BBL will pass the DTB at a 2MB-aligned address.
However, by default there are no 2MB aligned regions between the SBI and
the kernel, so we have to choose a 2MB aligned region after the kernel.
OpenSBI defaults to placing the DTB 32MB after the start of the kernel but
this is not sufficient for a kernel with a large MFS embedded.
We could increase this offset to a larger number (e.g. 64/128/256) but that
imposes restrictions on the minimum RAM size.
Another solution would be to place the DTB between OpenSBI and the kernel
at 1MB alignment, but current locore.S code assumes 2MB alignment.

With this change I can now boot on QEMU with an OpenSBI configured to
store the DTB at an offset of 1MB.

See also https://github.com/riscv/opensbi/issues/169

Reviewed By: mhorne
Differential Revision: https://reviews.freebsd.org/D25151

4 years agoRELNOTES: Post-portem note about sed(1) \x support
Kyle Evans [Mon, 8 Jun 2020 02:42:41 +0000 (02:42 +0000)]
RELNOTES: Post-portem note about sed(1) \x support

Requested by: Oliver Pinter

4 years agopowerpc/powernv: Don't configure disabled CPUs
Justin Hibbits [Mon, 8 Jun 2020 02:28:00 +0000 (02:28 +0000)]
powerpc/powernv: Don't configure disabled CPUs

If the POWER firmware detects a bad CPU core, it will "GUARD" it out,
marking it disabled.  Any attempt to spin up a bad CPU will trigger a panic
later on when waiting for threads on said core to wake up.  Support limping
along on fewer cores instead.

4 years agox86 boot.8: Remove obsolescent non-loader x86 boot documentation
Conrad Meyer [Mon, 8 Jun 2020 00:46:19 +0000 (00:46 +0000)]
x86 boot.8: Remove obsolescent non-loader x86 boot documentation

x86 boot uses loader(8) and the boot2-direct-to-kernel process is not
supported.  Remove the documentation, which doesn't document a working
process and leads to confusion.

PR: 247074
Reported by: Alex K.

4 years agoservices: Add SSDP to service database
Pedro F. Giffuni [Sun, 7 Jun 2020 19:56:17 +0000 (19:56 +0000)]
services: Add SSDP to service database

This is used for UPnP and is registered in the IANA database.

MFC after: 2 weeks
PR: 241573

4 years agoRetire SCTP_SO_LOCK_TESTING.
Michael Tuexen [Sun, 7 Jun 2020 14:39:20 +0000 (14:39 +0000)]
Retire SCTP_SO_LOCK_TESTING.

This was intended to test the locking used in the MacOS X kernel on a
FreeBSD system, to make use of WITNESS and other debugging infrastructure.
This hasn't been used for ages, to take it out to reduce the #ifdef
complexity.

MFC after: 1 week

4 years agoRemove now-unused GNU as build infrastructure
Ed Maste [Sun, 7 Jun 2020 13:53:23 +0000 (13:53 +0000)]
Remove now-unused GNU as build infrastructure

4 years agobridge tests: Re-enable STP test
Kristof Provost [Sun, 7 Jun 2020 13:53:02 +0000 (13:53 +0000)]
bridge tests: Re-enable STP test

This test should no longer provoke large amounts of traffic, which can
overwhelm single-core systems, preventing them from making progress in the
tests.

The test can now be re-enabled.

PR: 246448

4 years agosrc.conf.5: regen after BINUTILS options removal
Ed Maste [Sun, 7 Jun 2020 13:52:49 +0000 (13:52 +0000)]
src.conf.5: regen after BINUTILS options removal

4 years agoAdd EXAMPLES to cover all flags except -f since it is analogous to -s.
Benedict Reuschling [Sun, 7 Jun 2020 13:21:47 +0000 (13:21 +0000)]
Add EXAMPLES to cover all flags except -f since it is analogous to -s.

An EXAMPLE section was adding with some basic examples that show the use of
uniq(1) with various flags.

Submitted by: fernape@
Approved by: bcr@
MFC after: 4 days
Relnotes: yes (EXAMPLE section for uniq(1))
Differential Revision: https://reviews.freebsd.org/D25149

4 years agotaskqueue(9): reference callout(9) instead of timeout(9)
Yuri Pankov [Sun, 7 Jun 2020 09:17:57 +0000 (09:17 +0000)]
taskqueue(9): reference callout(9) instead of timeout(9)

As timeout(9) was removed and all consumers were converted to
callout(9), reference it instead for the description of sbt, pr,
and flags arguments.

Reviewed by: trasz
Differential Revision: https://reviews.freebsd.org/D25165

4 years agops: use %hs instead of %s format specifiers
Yuri Pankov [Sun, 7 Jun 2020 08:21:19 +0000 (08:21 +0000)]
ps: use %hs instead of %s format specifiers

Use %hs (locale-based encoding) instead of %s (UTF-8) format for
strings that are expected to be in current locale encoding (date/time,
process names/argument list).

PR: 241491
Reviewed by: phil
Differential Revision: https://reviews.freebsd.org/D22160

4 years ago[if_ath] Don't update the beacon bits from beacon frames in hostapd mode.
Adrian Chadd [Sun, 7 Jun 2020 05:08:44 +0000 (05:08 +0000)]
[if_ath] Don't update the beacon bits from beacon frames in hostapd mode.

This logic is running the beacon receive bits in STA+AP mode on both the
STA and AP side.  The STA side sees its beacons from the BSS fine; the
AP side is seeing other beacons on the same channel but with the BSS
node for some odd reason.  (I think it's a valid reason, but I currently
forget what that valid reason is.)

So, just to be cleaner about things, don't run the nexttbtt/etc bits
at all if we're in hostap mode.  If I ever get mesh working then maybe
I'll make sure it works right on mesh+ap and mesh+sta modes.

Whilst here, log the VAP i'm being called on to make it clearer what
is going on.  I may end up adding a VAP dprintf version of this at
some point.

Tested:

* AR9380, STA (DWDS client) + hostap on the same NIC

4 years ago[net80211] Add a method to return the vap's ifname.
Adrian Chadd [Sun, 7 Jun 2020 04:57:48 +0000 (04:57 +0000)]
[net80211] Add a method to return the vap's ifname.

This removes the requirement to know what's in the ifp.

(If someone wants a quick clean-up task, it'd be nice to convert instances
of ifp dereferencing for if_xname over to this method.)

4 years agosed: attempt to learn about hex escapes (e.g. \x27)
Kyle Evans [Sun, 7 Jun 2020 04:32:38 +0000 (04:32 +0000)]
sed: attempt to learn about hex escapes (e.g. \x27)

Somewhat predictably, software often wants to use \x27/\x24 among others so
that they can decline worrying about ugly escaping, if said escaping is even
possible. Right now, this software is using these and getting the wrong
results, as we'll interpret those as x27 and x24 respectively. Some examples
of this, when an exp-run was ran, were science/octopus and misc/vifm.

Go ahead and process these at all times.  We allow either one or two digits,
and the tests account for both.  If extra digits are specified, e.g. \x2727,
then the third and fourth digits are interpreted literally as one might
expect.

PR: 229925
MFC after: 2 weeks

4 years agoMention nda where we mention nvd.
Warner Losh [Sun, 7 Jun 2020 02:40:21 +0000 (02:40 +0000)]
Mention nda where we mention nvd.

4 years agoRetire BINUTILS and BINUTILS_BOOTSTRAP options
Ed Maste [Sun, 7 Jun 2020 00:07:21 +0000 (00:07 +0000)]
Retire BINUTILS and BINUTILS_BOOTSTRAP options

As of r361857 all BINUTILS options are disabled by default - ports
have been changed to depend on binutils if they require GNU as, and
all base system assembly files have been switched to use Clang's
integrated assembler.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation

4 years agosrc.conf.5: regen after r361876, SYSTEM_LINKER description update
Ed Maste [Sat, 6 Jun 2020 22:26:44 +0000 (22:26 +0000)]
src.conf.5: regen after r361876, SYSTEM_LINKER description update

4 years ago[net80211] Flip on A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options.
Adrian Chadd [Sat, 6 Jun 2020 22:25:00 +0000 (22:25 +0000)]
[net80211] Flip on A-MPDU, A-MSDU, A-MPDU+A-MSDU and Fast frames options.

This updates the logic to allow:

* A-MPDU if available;
* A-MSDU if available and A-MPDU is off/NACKed;
* A-MPDU+A-MSDU if it's available and negotiated;
* Fast frames if the node is 11abg (and not HT/VHT.)

This allows for things to fail back to A-MSDU or fast frames
if A-MPDU isn't available rather than needing to be non-HT/non-VHT.
It also allows A-MPDU+A-MSDU to work if it's negotiated.

Tested:

* AR9380, STA + AP mode (A-MPDU, A-MSDU, FF, A-MPDU+A-MSDU)
* RT5350, STA mode (A-MSDU, FF)
* AR9170, STA mode (A-MSDU, FF)

4 years agoFix typo in comment.
Michael Tuexen [Sat, 6 Jun 2020 21:26:34 +0000 (21:26 +0000)]
Fix typo in comment.

Submitted by Orgad Shaneh for the userland stack.
MFC after: 1 week