]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 months agoacpi: Fix error message
Warner Losh [Thu, 1 Sep 2022 17:34:36 +0000 (11:34 -0600)]
acpi: Fix error message

Fix a formatting error from 195f794318a33

Fixes: 195f794318a33
Sponsored by: Netflix

22 months agohwpmc: Avoid touching MSR_DEBUGCTLMSR inside VMs.
Alexander Motin [Thu, 1 Sep 2022 17:18:04 +0000 (13:18 -0400)]
hwpmc: Avoid touching MSR_DEBUGCTLMSR inside VMs.

At least KVM in Proxmox seems not happy about it.  Just to be safe
block it for all VMs, since it should just improve profile accuracy.

MFC after: 1 week

22 months agokboot: List sources one per line to make merges easier
Warner Losh [Thu, 1 Sep 2022 17:07:34 +0000 (11:07 -0600)]
kboot: List sources one per line to make merges easier

Make SRC an alphabetical list of files, one per line.

Sponsored by: Netflix

22 months agokboot: add minmalist init functionality
Warner Losh [Thu, 1 Sep 2022 17:06:43 +0000 (11:06 -0600)]
kboot: add minmalist init functionality

It is desirable to run kboot as the first program in some LinuxBoot
environments. This is the traditional "pid 1" or "init" program. When
running as pid 1. rovide a minimal environment based on what sysvinit,
u-root, initramfs-tools and other like projects do. We mount /dev, /sys,
/proc, make symlinks from /dev/fd to /dev/proc, and create /tmp, /run,
and /var. We also setup stdin/out/err to the console, set the tty
characteristics of same and block the appropriate signals.

This is indended as an environment that never does a fork/exec. If
that's required, the process groups, session leaders and all things
POSIX terminal handlers will need to be added.

Unlike the general purpose linux projects in this area, no attempt is
made to support very old kernels.

When not pid 1, we skip all of the above.

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

22 months agostand: Add lua binding loader.has_command
Warner Losh [Thu, 1 Sep 2022 17:06:19 +0000 (11:06 -0600)]
stand: Add lua binding loader.has_command

Give scripts the ability to determine if the currently running loader
has provided a command.

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

22 months agostand: Add interp_has_builtin_cmd to see if we have a command
Warner Losh [Thu, 1 Sep 2022 17:06:01 +0000 (11:06 -0600)]
stand: Add interp_has_builtin_cmd to see if we have a command

interp_has_builtin_cmd() will try to lookup the passed in command and
returns true if it was found, false otherwise.

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

22 months agostand: separate the command lookup from the command execution
Warner Losh [Thu, 1 Sep 2022 17:05:42 +0000 (11:05 -0600)]
stand: separate the command lookup from the command execution

Factor out interp_lookup_cmd to search for a command from
interp_builtin_cmd. This simplifies the latter and can be used to expand
lua to ask if a command exists.

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

22 months agoacpi: Move some errors with RSDP and XSLT out from under bootverbose
Warner Losh [Thu, 1 Sep 2022 16:39:34 +0000 (10:39 -0600)]
acpi: Move some errors with RSDP and XSLT out from under bootverbose

Failure to map RSDP, XSLT and checksum failures are events that can't
happen unless something has gone wrong. As such, they should be reported
always, and not in bootverbose. This has been this way since it was
originally brought in to parse APIC tables.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D36406

22 months agoacpi: Unmap RSDP in more error cases
Warner Losh [Thu, 1 Sep 2022 16:39:20 +0000 (10:39 -0600)]
acpi: Unmap RSDP in more error cases

Add missing pmap_unmapbios() calls for when we return 0. Otherwise we
can leave the table mapped when it is of no use.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D36405

22 months agoacpi: arm64 doesn't support ACPI 1.0 RSDP, report when we see one
Warner Losh [Thu, 1 Sep 2022 16:38:53 +0000 (10:38 -0600)]
acpi: arm64 doesn't support ACPI 1.0 RSDP, report when we see one

arm64 requires ACPI RSDP Revision 2.0 since it requires 64-bit physical
addresses. It is an error worth reporting if we have a RSDP pointer, but
it points to the wrong version.

Sponsored by: Netflix
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D36404

22 months agostand: Document EFI consoles
Warner Losh [Thu, 1 Sep 2022 16:34:30 +0000 (10:34 -0600)]
stand: Document EFI consoles

Document how EFI consoles work, at least on x86. There's a number of
weird quirks and limitations that are generally known, but not
documented until now. Include information on how EFI decides what the
defualt console is, how to set it and how to cope with common
situations. Note limitations and mismatch between ACPI (which uses UID
to identify a device) and our console code (which uses a raw address)
and explain why we can't translate between them in the loader.

Sponsored by: Netflix
Reviewed by: manu, kevans, rpokala, pauamma
Differential Revision: https://reviews.freebsd.org/D36286

22 months agostand: Stop setting hints for bios loader too
Warner Losh [Thu, 1 Sep 2022 16:33:09 +0000 (10:33 -0600)]
stand: Stop setting hints for bios loader too

Catch up to 2753bbe71b5a and remove the old hints.

Sponsored by: Netflix

22 months agolinuxkpi: on i386 only use first_msi_irq if apic is in kernel config
Tijl Coosemans [Sat, 1 May 2021 16:01:22 +0000 (18:01 +0200)]
linuxkpi: on i386 only use first_msi_irq if apic is in kernel config

22 months agoi386 machine/cpu.h: include sys/systm.h for cpu_ticks()
Tijl Coosemans [Wed, 31 Aug 2022 18:56:49 +0000 (20:56 +0200)]
i386 machine/cpu.h: include sys/systm.h for cpu_ticks()

Fixes build of graphics/drm-510-kmod on i386.

22 months agoFix reading the correct ID and REV.
Søren Schmidt [Thu, 1 Sep 2022 07:36:37 +0000 (07:36 +0000)]
Fix reading the correct ID and REV.

Reviewed by: manu

22 months agoAdd support for TCS4525 pmic.
Ganbold Tsagaankhuu [Thu, 1 Sep 2022 07:31:08 +0000 (07:31 +0000)]
Add support for TCS4525 pmic.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D36209

22 months agoFix problem getting gpio version during attach.
Ganbold Tsagaankhuu [Thu, 1 Sep 2022 07:21:56 +0000 (07:21 +0000)]
Fix problem getting gpio version during attach.
Both RK3328 and RK3399 don't have GPIO_VER_ID register.
Set gpio version depending on compat string of the parent.

22 months agomount_nfs.8: Reword sentence so .Pa macro works
Rick Macklem [Wed, 31 Aug 2022 23:19:22 +0000 (16:19 -0700)]
mount_nfs.8: Reword sentence so .Pa macro works

Commit 603677334a64 added a sentence with a file path
in it. However, it did not use .Pa since it would leave
a space after it, where ('s) was supposed to go.

This patch rewords the sentence so that .Pa can
be used.

This is a content change.

Suggested by: mkarels

22 months agoiwlwifi: move an ieee80211_get_tid() call
Bjoern A. Zeeb [Wed, 31 Aug 2022 23:01:36 +0000 (23:01 +0000)]
iwlwifi: move an ieee80211_get_tid() call

Introduce a local change.  It seems ieee80211_get_tid() does not deal
with non-dataqos packets unlike net80211's ieee80211_gettid().
Gernally all calls in Linux drivers to ieee80211_get_tid() seem to
be proceeded by an ieee80211_is_data_qos() check.

Moving the ieee80211_get_tid() has no difference in the result, but
(a) saves us the call if we do not need it due to an earlier return,
and (b) allows us to put an assert into the LinuxKPI ieee80211_get_tid()
implementation to avoid accidentally returning random frame header data
in case of a missing earlier ieee80211_is_data_qos() check in (future/
other) drivers.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

22 months agotcp: Functional implementation of Accurate ECN
Richard Scheffenegger [Wed, 31 Aug 2022 13:01:25 +0000 (15:01 +0200)]
tcp: Functional implementation of Accurate ECN

The AccECN handshake and TCP header flags are supported,
no support yet for the AccECN option. This minimalistic
implementation is sufficient to support DCTCP while
dramatically cutting the number of ACKs, and provide ECN
response from the receiver to the CC modules.

Reviewed By: #transport, #manpages, rrs, pauamma
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D21011

22 months agotcp: finish SACK loss recovery on sudden lack of SACK blocks
Richard Scheffenegger [Wed, 31 Aug 2022 12:49:25 +0000 (14:49 +0200)]
tcp: finish SACK loss recovery on sudden lack of SACK blocks

While a receiver should continue sending SACK blocks for the
duration of a SACK loss recovery, if for some reason the
TCP options no longer contain these SACK blocks, but we
already started maintaining the Scoreboard, keep on handling
incoming ACKs (without SACK) as belonging to the SACK recovery.

Reported by: thj
Reviewed by: tuexen, #transport
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D36046

22 months agoStore mpidr as a 64-bit value on arm64
Andrew Turner [Thu, 25 Aug 2022 08:28:28 +0000 (08:28 +0000)]
Store mpidr as a 64-bit value on arm64

The mpidr register is 64 bit on arm64 and 32 bit on arm. Fix this by
extending the arm64 definition to include the top 32 bits.

To preserve KBI when MFCing split the value into two 32 bit values.
This will be cleaned up later only on main.

Reviewed by: bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36346

22 months agoOptionalObsoleteFiles.inc: Add missing sendmail feature macro files.
Peter Wemm [Wed, 31 Aug 2022 08:54:04 +0000 (01:54 -0700)]
OptionalObsoleteFiles.inc: Add missing sendmail feature macro files.

MFC after: 3 days

22 months agoarm64: Fix hwpmc module for OPT_ACPI isn't selected
Emmanuel Vadot [Mon, 29 Aug 2022 09:50:52 +0000 (11:50 +0200)]
arm64: Fix hwpmc module for OPT_ACPI isn't selected

Fixes: 59191f3573f6 ("Add support of ARM CMN-600 controller ...")
Sponsored by: Beckhoff Automation GmbH & Co. KG

22 months agoprotosw: repair protocol selection logic in socket(2)
Gleb Smirnoff [Wed, 31 Aug 2022 04:19:46 +0000 (21:19 -0700)]
protosw: repair protocol selection logic in socket(2)

Pointy hat to: glebius
Fixes: 61f7427f02a307d28af674a12c45dd546e3898e4

22 months agoprocstat: fix printing divert(4) sockets
Gleb Smirnoff [Tue, 30 Aug 2022 23:26:21 +0000 (16:26 -0700)]
procstat: fix printing divert(4) sockets

22 months agotests: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
Gleb Smirnoff [Tue, 30 Aug 2022 23:23:36 +0000 (16:23 -0700)]
tests: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT

22 months agoipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
Gleb Smirnoff [Tue, 30 Aug 2022 23:22:50 +0000 (16:22 -0700)]
ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT

22 months agonatd: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
Gleb Smirnoff [Tue, 30 Aug 2022 23:21:19 +0000 (16:21 -0700)]
natd: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT

22 months agosqlite3: Vendor import of sqlite3 3.39.2
Cy Schubert [Tue, 30 Aug 2022 22:54:32 +0000 (15:54 -0700)]
sqlite3: Vendor import of sqlite3 3.39.2

Changes at https://www.sqlite.org/releaselog/3_39_2.html.

Security:       CVE-2022-35737
Obtained from:  https://www.sqlite.org/2022/sqlite-autoconf-3390200.tar.gz
MFC after:      immediately

Merge commit '1545dd7d6cc54bdfca9bc9f74c42745b514b60c9' into sqlite3/main3

22 months agosqlite3: Vendor import of sqlite3 3.39.2
Cy Schubert [Tue, 30 Aug 2022 22:29:34 +0000 (15:29 -0700)]
sqlite3: Vendor import of sqlite3 3.39.2

Changes at https://www.sqlite.org/releaselog/3_39_2.html.

Obtained from: https://www.sqlite.org/2022/sqlite-autoconf-3390200.tar.gz

22 months agodivert(4): make it compilable and working without INET
Gleb Smirnoff [Tue, 30 Aug 2022 22:09:21 +0000 (15:09 -0700)]
divert(4): make it compilable and working without INET

Differential revision: https://reviews.freebsd.org/D36383

22 months agodivert(4): maintain own cb database and stop using inpcb KPI
Gleb Smirnoff [Tue, 30 Aug 2022 22:09:21 +0000 (15:09 -0700)]
divert(4): maintain own cb database and stop using inpcb KPI

Here go cons of using inpcb for divert:
- divert(4) uses only 16 bits (local port) out of struct inpcb,
  which is 424 bytes today.
- The inpcb KPI isn't able to provide hashing for divert(4),
  thus it uses global inpcb list for lookups.
- divert(4) uses INET-specific part of the KPI, making INET
  a requirement for IPDIVERT.

Maintain our own very simple hash lookup database instead.  It
has mutex protection for write and epoch protection for lookups.
Since now so->so_pcb no longer points to struct inpcb, don't
initialize protosw methods to methods that belong to PF_INET.
Also, drop support for setting options on a divert socket.  My
review of software in base and ports confirms that this has no
use and unlikely worked before.

Differential revision: https://reviews.freebsd.org/D36382

22 months agodivert(4): provide statistics
Gleb Smirnoff [Tue, 30 Aug 2022 22:09:21 +0000 (15:09 -0700)]
divert(4): provide statistics

Instead of incrementing pretty random counters in the IP statistics,
create divert socket statistics structure.  Export via netstat(1).

Differential revision: https://reviews.freebsd.org/D36381

22 months agoprotosw: cleanup protocols that existed merely to provide pr_input
Gleb Smirnoff [Tue, 30 Aug 2022 22:09:21 +0000 (15:09 -0700)]
protosw: cleanup protocols that existed merely to provide pr_input

Since 4.4BSD the protosw was used to implement socket types created
by socket(2) syscall and at the same to demultiplex incoming IPv4
datagrams (later copied to IPv6).  This story ended with 78b1fc05b20.

These entries (e.g. IPPROTO_ICMP) in inetsw that were added to catch
packets in ip_input(), they would also be returned by pffindproto()
if user says socket(AF_INET, SOCK_RAW, IPPROTO_ICMP).  Thus, for raw
sockets to work correctly, all the entries were pointing at raw_usrreq
differentiating only in the value of pr_protocol.

With 78b1fc05b20 all these entries are no longer needed, as ip_protox
is independent of protosw.  Any socket syscall requesting SOCK_RAW type
would end up with rip_protosw.  And this protosw has its pr_protocol
set to 0, allowing to mark socket with any protocol.

For IPv6 raw socket the change required two small fixes:
o Validate user provided protocol value
o Always use protocol number stored in inp in rip6_attach, instead
  of protosw value, which is now always 0.

Differential revision: https://reviews.freebsd.org/D36380

22 months agodivert: declare PF_DIVERT domain and stop abusing PF_INET
Gleb Smirnoff [Tue, 30 Aug 2022 22:09:21 +0000 (15:09 -0700)]
divert: declare PF_DIVERT domain and stop abusing PF_INET

The divert(4) is not a protocol of IPv4.  It is a socket to
intercept packets from ipfw(4) to userland and re-inject them
back.  It can divert and re-inject IPv4 and IPv6 packets today,
but potentially it is not limited to these two protocols.  The
IPPROTO_DIVERT does not belong to known IP protocols, it
doesn't even fit into u_char.  I guess, the implementation of
divert(4) was done the way it is done basically because it was
easier to do it this way, back when protocols for sockets were
intertwined with IP protocols and domains were statically
compiled in.

Moving divert(4) out of inetsw accomplished two important things:

1) IPDIVERT is getting much closer to be not dependent on INET.
   This will be finalized in following changes.
2) Now divert socket no longer aliases with raw IPv4 socket.
   Domain/proto selection code won't need a hack for SOCK_RAW and
   multiple entries in inetsw implementing different flavors of
   raw socket can merge into one without requirement of raw IPv4
   being the last member of dom_protosw.

Differential revision: https://reviews.freebsd.org/D36379

22 months agomount_nfs.8: Note that NFSv4 requires unique /etc/hostid's
Rick Macklem [Tue, 30 Aug 2022 14:55:32 +0000 (07:55 -0700)]
mount_nfs.8: Note that NFSv4 requires unique /etc/hostid's

Recent problems related to NFSv4 mounts has been traced
to multiple NFSv4 clients using the same /etc/hostid
(or kern.hostuuid, if you prefer).

This patch adds a sentence to the man page noting that
clients must have unique /etc/hostid's.

This is a content change.

Reviewed by: gbe (manpages)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36392

22 months agocp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED.
Alexander Motin [Tue, 30 Aug 2022 14:51:21 +0000 (10:51 -0400)]
cp: Fix build without VM_AND_BUFFER_CACHE_SYNCHRONIZED.

It allows to not use mmap() for small files, which is not helpful
in case of ZFS.  Should be no functional change.

MFC after: 1 week

22 months agoucom(4): Make sure the open routine is executed synchronously.
Dave Baukus [Tue, 30 Aug 2022 14:19:40 +0000 (16:19 +0200)]
ucom(4): Make sure the open routine is executed synchronously.

To avoid issues starting any USB transfers before the open
function is complete.

Differential Revision: https://reviews.freebsd.org/D36391
MFC after: 1 week
Sponsored by: NVIDIA Networking

22 months agoumodem(4): Clear stall at every open.
Hans Petter Selasky [Tue, 30 Aug 2022 14:01:43 +0000 (16:01 +0200)]
umodem(4): Clear stall at every open.

Some controllers like the XHCI(4) loose track of the data toggle value when
USB receive transfers are cancelled at close. This in turn can lead to to
data loss after the next open.

To avoid data loss, make sure both the receive and transmit data toggles
get reset, before trying to read or write any data.

Differential Revision: https://reviews.freebsd.org/D36391
Submitted by: Dave Baukus <daveb@spectralogic.com>
MFC after: 1 week
Sponsored by: NVIDIA Networking

22 months agotcp: remove a dead code leftover from T/TCP,
Gleb Smirnoff [Tue, 30 Aug 2022 02:30:12 +0000 (19:30 -0700)]
tcp: remove a dead code leftover from T/TCP,

that doesn't have any value today.

22 months agodivert: merge div_output() into div_send()
Gleb Smirnoff [Tue, 30 Aug 2022 02:15:01 +0000 (19:15 -0700)]
divert: merge div_output() into div_send()

No functional change intended.

22 months agodomains: merge domain_init() into domain_add()
Gleb Smirnoff [Tue, 30 Aug 2022 02:15:01 +0000 (19:15 -0700)]
domains: merge domain_init() into domain_add()

domain_init() called at SI_SUB_PROTO_DOMAIN/SI_ORDER_SECOND is always
called right after domain_add(), that had been called at SI_ORDER_FIRST.
Note that protocols aren't initialized yet at this point, since they are
usually scheduled to initialize at SI_ORDER_THIRD.

After this merge it becomes clear that DOMF_SUPPORTED / DOMF_INITED
can be garbage collected as they are set & checked in the same function.

For initialization of the domain system itself it is now clear that
domaininit() can be garbage collected and static initializer is enough.

22 months agodomains: use queue(9) SLIST for linked list of domains
Gleb Smirnoff [Tue, 30 Aug 2022 02:15:01 +0000 (19:15 -0700)]
domains: use queue(9) SLIST for linked list of domains

22 months agodomains: init pr_domain in pr_init()
Gleb Smirnoff [Tue, 30 Aug 2022 02:15:01 +0000 (19:15 -0700)]
domains: init pr_domain in pr_init()

22 months agombufs: isolate max_linkhdr and max_protohdr handling in the mbuf code
Gleb Smirnoff [Tue, 30 Aug 2022 02:14:25 +0000 (19:14 -0700)]
mbufs: isolate max_linkhdr and max_protohdr handling in the mbuf code

o Statically initialize max_linkhdr to default value without relying
  on domain(9) code doing that.
o Statically initialize max_protohdr to a sane value, without relying
  on TCP being always compiled in.
o Retire max_datalen. Set, but not used.
o Don't make the domain(9) system responsible in validating these
  values and updating max_hdr.  Instead provide KPI max_linkhdr_grow()
  and max_protohdr_grow().
o Call max_linkhdr_grow() from IEEE802.11 and max_protohdr_grow() from
  TCP.  Those are the only protocols today that may want to grow.

Reviewed by: tuexen
Differential revision: https://reviews.freebsd.org/D36376

22 months agobhyve virtio-scsi: Avoid out of bounds accesses to guest requests.
John Baldwin [Mon, 29 Aug 2022 22:36:11 +0000 (15:36 -0700)]
bhyve virtio-scsi: Avoid out of bounds accesses to guest requests.

- Ignore I/O requests with insufficiently sized input or output
  buffers (those not containing compete request headers).

- Ignore control requests with improperly sized buffers.

- While here, explicitly zero the output header of an I/O request to
  avoid leaking malloc garbage from the host if the header is not
  fully populated.

PR: 264521
Reported by: Robert Morris <rtm@lcs.mit.edu>
Reviewed by: mav, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36271

22 months agobhyve virtio-scsi: Tidy warning and debug prints.
John Baldwin [Mon, 29 Aug 2022 22:35:42 +0000 (15:35 -0700)]
bhyve virtio-scsi: Tidy warning and debug prints.

Use a consistent prefix ("virtio-scsi: ") similar to the e1000 device
model.

Reviewed by: mav, emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36270

22 months agobhyve e1000: Sanitize transmit ring indices.
John Baldwin [Mon, 29 Aug 2022 22:35:15 +0000 (15:35 -0700)]
bhyve e1000: Sanitize transmit ring indices.

When preparing to transmit pending packets, ensure that the head (TDH)
and tail (TDT) indices are in bounds.  Note that validating values
when they are written is not sufficient along as the transmit length
(TDLEN) could be changed turning a value that was valid when written
into an out of bounds value.

While here, add further restrictions to the head register (TDH).  The
manual states that writing to this value while transmit is enabled can
cause unexpected behavior and that it should only be written after a
reset.  As such, ignore attempts to write while transmit is active,
and also ignore writes of non-zero values.  Later e1000 chipsets have
this register as read-only.

Also ignore any attempts to transmit packets if the transmit ring's
size is zero.

PR: 264567
Reported by: Robert Morris <rtm@lcs.mit.edu>
Reviewed by: emaste
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36269

22 months agorouting: constantify @rc in rib_decompose_notification().
Alexander V. Chernikov [Mon, 29 Aug 2022 18:10:21 +0000 (18:10 +0000)]
routing: constantify @rc in rib_decompose_notification().

Clarify the @rc immutability by explicitly marking @rc const.

MFC after: 2 weeks

22 months agodevstat: Remove DTrace io probes lacking a BIO reference
Mark Johnston [Mon, 29 Aug 2022 17:22:36 +0000 (13:22 -0400)]
devstat: Remove DTrace io probes lacking a BIO reference

The io:::start and end probes trace individual I/O requests.

Also remove the unimplemented wait-start and wait-done probes.

PR: 266098
MFC after: 1 week

22 months agomakefs tests: Do not run ZFS tests in parallel
Mark Johnston [Mon, 29 Aug 2022 16:39:33 +0000 (12:39 -0400)]
makefs tests: Do not run ZFS tests in parallel

makefs-created pools always have the same GUID and thus cannot be
imported simultaneously.

Reported by: olivier

22 months agomakefs tests: Do not install ZFS tests if WITHOUT_ZFS is defined
Mark Johnston [Mon, 29 Aug 2022 16:35:37 +0000 (12:35 -0400)]
makefs tests: Do not install ZFS tests if WITHOUT_ZFS is defined

22 months agomakefs: Remove some redundant initializations
Mark Johnston [Mon, 29 Aug 2022 16:33:55 +0000 (12:33 -0400)]
makefs: Remove some redundant initializations

No functional change intended.

22 months agoRevert "routing: install prefix and loopback routes using new nhop-based KPI."
Alexander V. Chernikov [Mon, 29 Aug 2022 16:12:51 +0000 (16:12 +0000)]
Revert "routing: install prefix and loopback routes using new nhop-based KPI."

Temporarily revert the commit to unblock testing.

This reverts commit a1b59379db7d879551118b921f6e9692b4bf200c.

22 months agorb_tree: avoid extra reads in rebalancing
Doug Moore [Mon, 29 Aug 2022 16:11:31 +0000 (11:11 -0500)]
rb_tree: avoid extra reads in rebalancing

In RB_INSERT_COLOR and RB_REMOVE_COLOR, avoid reading a parent pointer
from memory, and then reading the left-color bit from memory, and then
reading the right-color bit from memory, since they're all in the same
field. The compiler can't infer that only the first read is really
necessary, so write the code in a way so that it doesn't have to.

Drop RB_RED_LEFT and RB_RED_RIGHT macros that reach into memory to get
those bits.  Drop RB_COLOR, the only thing left using RB_RED_LEFT and
RB_RED_RIGHT after the other changes, and go straight to DIAGNOSTIC
code in subr_stats to implement RB_COLOR for its single, dubious use
there.

Reviewed by: alc
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36353

22 months agorouting: improve multiline debug
Alexander V. Chernikov [Mon, 29 Aug 2022 15:14:49 +0000 (15:14 +0000)]
routing: improve multiline debug

Add IF_DEBUG_LEVEL() macro to ensure all debug output preparation
 is run only if the current debug level is sufficient. Consistently
 use it within routing subsystem.

MFC after: 2 weeks

22 months agorouting: extend nhop(9) kpi
Alexander V. Chernikov [Mon, 29 Aug 2022 14:38:25 +0000 (14:38 +0000)]
routing: extend nhop(9) kpi

* add nhop_get_unlinked() used to prepare referenced but not
 linked nexthop, that can later be used as a clone source.
* add nhop_check_gateway() to check for allowed address family
  combinations between the rib family and neighbor family (useful
  for 4o6 or direct routes)
* add nhop_set_upper_family() to allow copying IPv6 nexthops to
 IPv4 rib.
* add rt_get_rnd() wrapper, returning both nexthop/group and its
 weight attached to the rtentry.
* Add CHT_SLIST_FOREACH_SAFE(), allowing to delete items during
  iteration.

MFC after: 2 weeks

22 months agorouting: fix rib_add_route_px()
Alexander V. Chernikov [Mon, 29 Aug 2022 12:23:06 +0000 (12:23 +0000)]
routing: fix rib_add_route_px()

Fix panic in newly-added rib_add_route_px() by removin unlocked
 prefix lookup.

MFC after: 2 weeks

22 months agorouting: add ability to store opaque indentifiers in nhops/nhgs
Alexander V. Chernikov [Mon, 29 Aug 2022 12:20:24 +0000 (12:20 +0000)]
routing: add ability to store opaque indentifiers in nhops/nhgs

This is a pre-requisite for the direct nexthop/nexhop group operations
 via netlink.

MFC after: 2 weeks

22 months agorouting: make rib_add_redirect() use new nhop-based KPI
Alexander V. Chernikov [Tue, 9 Aug 2022 11:45:59 +0000 (11:45 +0000)]
routing: make rib_add_redirect() use new nhop-based KPI

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

22 months agorouting: make IPv6 defrouter code use new nhop-based KPI.
Alexander V. Chernikov [Tue, 9 Aug 2022 11:33:45 +0000 (11:33 +0000)]
routing: make IPv6 defrouter code use new nhop-based KPI.

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

22 months agorouting: add rib_add_default_route() wrapper
Alexander V. Chernikov [Tue, 9 Aug 2022 13:34:28 +0000 (13:34 +0000)]
routing: add rib_add_default_route() wrapper

Multiple consumers in the kernel space want to install IPv4 or IPv6
 default route. Provide convenient wrapper to simplify the code
 inside the customers.

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

22 months agorouting: install prefix and loopback routes using new nhop-based KPI.
Alexander V. Chernikov [Mon, 8 Aug 2022 19:24:26 +0000 (19:24 +0000)]
routing: install prefix and loopback routes using new nhop-based KPI.

Construct the desired hexthops directly instead of using the
 "translation" layer in form of filling rt_addrinfo data.
Simplify V_rt_add_addr_allfibs handling by using recently-added
 rib_copy_route() to propagate the routes to the non-primary address
 fibs.

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

22 months agoCorrect calculation of inode location in getnextino cache.
Kirk McKusick [Mon, 29 Aug 2022 06:44:35 +0000 (23:44 -0700)]
Correct calculation of inode location in getnextino cache.

Fix for 345bfec.

Reported by:  Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agomana: Fix a couple i386 build errors
Wei Hu [Mon, 29 Aug 2022 06:30:49 +0000 (06:30 +0000)]
mana: Fix a couple i386 build errors

Fix a couple i386 build errors

Fixes: b685df314f138
Sponsored by: Microsoft

22 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Mon, 29 Aug 2022 06:14:35 +0000 (23:14 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Further updates based on ways Peter Holm found to corrupt UFS
superblocks in ways that could cause kernel hangs or crashes.

No legitimate superblocks should fail as a result of these changes.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agoCorrect calculation of inode location in getnextino cache.
Kirk McKusick [Mon, 29 Aug 2022 06:08:49 +0000 (23:08 -0700)]
Correct calculation of inode location in getnextino cache.

Fix for 345bfec.

Reported by:  Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agomana: some code refactoring and export apis for future RDMA driver
Wei Hu [Mon, 29 Aug 2022 05:03:33 +0000 (05:03 +0000)]
mana: some code refactoring and export apis for future RDMA driver

- Record the physical address for doorbell page region
  For supporting RDMA device with multiple user contexts with their
  individual doorbell pages, record the start address of doorbell page
  region for use by the RDMA driver to allocate user context doorbell IDs.

- Handle vport sharing between devices
  For outgoing packets, the PF requires the VF to configure the vport with
  corresponding protection domain and doorbell ID for the kernel or user
  context. The vport can't be shared between different contexts.

  Implement the logic to exclusively take over the vport by either the
  Ethernet device or RDMA device.

- Add functions for allocating doorbell page from GDMA
  The RDMA device needs to allocate doorbell pages for each user context.
  Implement those functions and expose them for use by the RDMA driver.

- Export Work Queue functions for use by RDMA driver
  RDMA device may need to create Ethernet device queues for use by Queue
  Pair type RAW. This allows a user-mode context accesses Ethernet hardware
  queues. Export the supporting functions for use by the RDMA driver.

- Define max values for SGL entries
  The number of maximum SGl entries should be computed from the maximum
  WQE size for the intended queue type and the corresponding OOB data
  size. This guarantees the hardware queue can successfully queue requests
  up to the queue depth exposed to the upper layer.

- Define and process GDMA response code GDMA_STATUS_MORE_ENTRIES
   When doing memory registration, the PF may respond with
   GDMA_STATUS_MORE_ENTRIES to indicate a follow request is needed. This is
   not an error and should be processed as expected.

- Define data structures for protection domain and memory registration
  The MANA hardware support protection domain and memory registration for use
  in RDMA environment. Add those definitions and expose them for use by the
  RDMA driver.

MFC after: 2 weeks
Sponsored by: Microsoft

22 months agonfscl: Fix setup of Sequence when all slots marked bad
Rick Macklem [Sun, 28 Aug 2022 21:36:45 +0000 (14:36 -0700)]
nfscl: Fix setup of Sequence when all slots marked bad

Commit 40ada74ee1da modified the NFSv4.1/4.2 client so
that it would issue a DestroySession to the server when
all session slots are marked bad.  Once this is done,
the Sequence operation should get a NFSERR_BADSESSION
reply from the server.

Without this patch, the code was setting ND_HASSLOTID
when, in fact, there was no slot marked in use by
nfsv4_sequencelookup().  This would result in the
code freeing a slot not in use.  The effect of this
was minimal, since the session was already destroyed.

This patch fixes the code so that it does not set
ND_HASSLOTID for this case.

MFC after: 2 weeks

22 months agonfscl: Add a console message for session recovery
Rick Macklem [Sun, 28 Aug 2022 21:24:39 +0000 (14:24 -0700)]
nfscl: Add a console message for session recovery

The NFSv4.1/4.2 client does recovery when it receives a
NFSERR_BADSESSION reply from the server.  If the server has
not rebooted, this is often caused by multiple clients using
the same /etc/hostid and, as such, not being recognized as
different clients by the server.

This trivial patch adds a console message to suggest that
client's /etc/hostid's need to be checked for uniqueness.

MFC after: 2 weeks

22 months agoUSB id of yet another Lenovo USB-C ethernet dongle.
Poul-Henning Kamp [Sun, 28 Aug 2022 17:21:38 +0000 (17:21 +0000)]
USB id of yet another Lenovo USB-C ethernet dongle.

22 months agotcp: fix stats counter for SYN_RCVD state when TCP-FO is used
Michael Tuexen [Sun, 28 Aug 2022 16:45:59 +0000 (18:45 +0200)]
tcp: fix stats counter for SYN_RCVD state when TCP-FO is used

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

22 months agorc.conf(5): add <service>_umask to run the service using this value
Eugene Grosbein [Sun, 28 Aug 2022 05:45:23 +0000 (12:45 +0700)]
rc.conf(5): add <service>_umask to run the service using this value

None of tools working with login classes change umask(1)
and we had no ways to specify non-default umask for a service
not touching its startup script. This change makes in possible.

Some file-sharing services that create new files may benefit from it.

Differential: https://reviews.freebsd.org/D36309
MFC-after: 3 days

22 months agorb_tree: fine-tune RB_REMOVE
Doug Moore [Sun, 28 Aug 2022 05:43:49 +0000 (00:43 -0500)]
rb_tree: fine-tune RB_REMOVE

Improve RB_REMOVE by reading the fields of the removed node only once,
and by not writing to the removed node.

Reviewed by: kib
Discussed with: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D36288

22 months agonfsd: Update console message for no session found
Rick Macklem [Sun, 28 Aug 2022 01:31:20 +0000 (18:31 -0700)]
nfsd: Update console message for no session found

The NFSv4.1/4.2 server generates a console message that indicates
that there is no session. I was until recently perplexed w.r.t. how
this could occur. It turns out that the common cause is multiple NFS
clients with the same /etc/hostid.

The host uuid is used by the FreeBSD NFSv4.1/4.2 client as a unique
identifier for the client. If multiple clients use the same host uuid,
this indicates to the NFSv4.1/4.2 server that they are the same client
and confusion occurs.

This trivial patch modifies the console message to suggest that the
client's /etc/hostid needs to be checked for uniqueness.

Reviewed by: asomers
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36377

22 months agonfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION
Rick Macklem [Sat, 27 Aug 2022 23:03:18 +0000 (16:03 -0700)]
nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION

When the NFSv4.1/4.2 client is handling a server error
of NFSERR_BADSESSION, it retries RPCs with a new session.
Without this patch, the nd_slotid was not being updated
for the new session.

This would result in a bogus console message like
"Wrong session srvslot=X slot=Y" and then it would
free the incorrect slot, often generating a
"freeing free slot!!" console message as well.

This patch fixes the problem.

Note that FreeBSD NFSv4.1/4.2 servers only
generate a NFSERR_BADSESSION error after a reboot
or after a client does a DestroySession operation.

PR: 260011
MFC after: 1 week

22 months agoRevert "nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION"
Rick Macklem [Sat, 27 Aug 2022 22:58:23 +0000 (15:58 -0700)]
Revert "nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION"

Revert this commit, since I now have a better fix to commit.

This reverts commit 8e59ec29e47f6ec64f54ddd88cab388ae536f0ff.

22 months agopf: do not block new Ethernet rules for in-progress transactions
Kristof Provost [Fri, 19 Aug 2022 10:05:12 +0000 (12:05 +0200)]
pf: do not block new Ethernet rules for in-progress transactions

Make Ethernet rule addition behave just like L3 rules, in that we now
allow ongoing transaction to be interrupted, rather than rejecting a new
one.

The result of that is that we can no longer end up in a state where a
transaction failed, but was not rolled back, blocking us from setting
new rules.

It's safe to assume there's no pending epoch callback for cleanup here,
because we've explicitly called it before hitting pf_begin_eth().

Sponsored by: Rubicon Communications, LLC ("Netgate")

22 months agonat64: fix whitespace damage in callout calls
Mateusz Guzik [Sat, 27 Aug 2022 19:06:41 +0000 (19:06 +0000)]
nat64: fix whitespace damage in callout calls

No functional changes.

22 months agoLinuxKPI 802.11: change type of bssid in struct ieee80211_bss_conf
Bjoern A. Zeeb [Sat, 27 Aug 2022 14:48:09 +0000 (14:48 +0000)]
LinuxKPI 802.11: change type of bssid in struct ieee80211_bss_conf

Enabling other driver code found that the bssid in
struct ieee80211_bss_conf is not an array but expected to be
a const pointer (const, != NULL checks).
Adjust accordingly in the header and in the LinuxKPI compat code.
There initialization now needs to be a static array always present
as we need a value before we will have a BSS (node in scan_to_auth)
as the mac80211 driver (*handlers) are expecting the pointer to be
not NULL (copying without checks).
This is a pre-req to enable d3 (CONFIG_PM[_SLEEP]) in the future.

Tested by: Tomoaki AOKI (junchoon dec.sakura.ne.jp)
Tested by: Berislav Purgar (bpurgar gmail.com)
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

22 months agobhnd(4): Correct a typo in a source code comment
Gordon Bergling [Sat, 27 Aug 2022 10:10:00 +0000 (12:10 +0200)]
bhnd(4): Correct a typo in a source code comment

- s/in he/in the/

MFC after: 3 days

22 months agousb(4): Quirk for non-compliant USB devices.
Hans Petter Selasky [Sat, 27 Aug 2022 06:50:51 +0000 (08:50 +0200)]
usb(4): Quirk for non-compliant USB devices.

Some non-compliant USB devices do not implement the
clear endpoint halt feature. Silently ignore such
failures, when they at least responded correctly
passing up a valid STALL PID packet.

Tested by: Doug Ambrisko <ambrisko@ambrisko.com>
MFC after: 1 week
Sponsored by: NVIDIA Networking

22 months agostand: Document that boot0 uses BIOS
Warner Losh [Fri, 26 Aug 2022 21:47:21 +0000 (15:47 -0600)]
stand: Document that boot0 uses BIOS

And thus has a limited range of supported baud rates. Also add that
setting BOOT_BOOT0_COMCONSOLE_SPEED=0 will leave it unchanged which
sometimes can give you 115200 if the BIOS initialized things outside of
the normal BIOS baud rates (which many x86 enbedded-targetted boards
do).

Sponsored by: Netflix
Reviewed by: emaste, manu (earlier versions)
Suggestions by: jhb
Differential Revision: https://reviews.freebsd.org/D36300

22 months agostand: More sensible defaults when ConOut is missing
Warner Losh [Fri, 26 Aug 2022 21:46:33 +0000 (15:46 -0600)]
stand: More sensible defaults when ConOut is missing

When ConOut is missing, we used to default to serial. Except we did it
in the worst way possible by just setting the howto bits and not
updating the console setting, which lead to weird behavior where we'd
get some things on the video port, others on serial.

Instead, set console to "efi,comconsole" for this case. Also set
RB_MULTIPLE always (so we get dual consoles from the kernel) and or in
RB_SERIAL when we can't find GOPs that suggest the precense of a video
console. This will put output in the most places and have a sensible
default for 'primary' console.

Sponsored by: Netflix
Reviewed by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D36299

22 months agolibprocstat: forward declare struct kinfo_proc
Brooks Davis [Fri, 26 Aug 2022 22:20:32 +0000 (23:20 +0100)]
libprocstat: forward declare struct kinfo_proc

This allows libprocstat.h to be included without sys/user.h as
documented in the manpage.

22 months agou3g(4): Add more USB IDs.
Hans Petter Selasky [Fri, 26 Aug 2022 20:01:41 +0000 (22:01 +0200)]
u3g(4): Add more USB IDs.

Submitted by: malavon <benny.goemans@gmail.com>
MFC after: 1 week
PR: 263700
Sponsored by: NVIDIA Networking

22 months agosoo_stat: Ensure error is always initialized.
John Baldwin [Fri, 26 Aug 2022 18:17:55 +0000 (11:17 -0700)]
soo_stat: Ensure error is always initialized.

In kernels without MAC, error is not set for sockets whose protocol
layer does not implement the pr_sense hook.

Reported by: Jenkins (powerpc kernel builds)
Fixes: 7c04ca1fad67 sockets: for stat(2) on a socket don't report hiwat as block size

22 months agoefi: Create a define for memory descriptor version
Warner Losh [Fri, 26 Aug 2022 17:39:37 +0000 (11:39 -0600)]
efi: Create a define for memory descriptor version

For true EFI platforms, the EFI BIOS will return version 1 (since no
other version is defined as of this commit). However, for environments
that wish to create an EFI memory mapping table that aren't actually
EFI, we need to know this. Add EFI_MEMORY_DESCRIPTOR_VERSION for this
constant.

Sponsored by: Netflix

22 months agodomains: use struct domain as argument
Gleb Smirnoff [Fri, 26 Aug 2022 17:35:35 +0000 (10:35 -0700)]
domains: use struct domain as argument

22 months agoFix compat10 semaphore interface race
firk [Fri, 26 Aug 2022 08:05:56 +0000 (11:05 +0300)]
Fix compat10 semaphore interface race

Wrong has-waiters and missing unconditional _count==0 check may cause
infinite waiting with already non-zero count.
1) properly clear _has_waiters flag when waiting failed to start
2) always check _count before start waiting

PR: 265997
Reviewed by: kib
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D36272

22 months agosocket(2): bring documentation up tp date
Gleb Smirnoff [Fri, 26 Aug 2022 15:16:15 +0000 (08:16 -0700)]
socket(2): bring documentation up tp date

o Undocument sockets that are no longer supported, or never were.
o Add AF_HYPERV. Note: PF_HYPERV isn't defined, no typo here.
o Point at ip(4) and ip6(4) instead of unwelcoming "not described here".

Reviewed by: gbe, markj
Differential revision: https://reviews.freebsd.org/D36284

22 months agosockets: for stat(2) on a socket don't report hiwat as block size
Gleb Smirnoff [Fri, 26 Aug 2022 15:16:15 +0000 (08:16 -0700)]
sockets: for stat(2) on a socket don't report hiwat as block size

The code appeared in d8392c6c39eb with not good explanation.  It is
very unlikely any software in the world needs that.

Differential revision: https://reviews.freebsd.org/D36283

22 months agotzsetup: remove left overs from libbsddialog conversion
Baptiste Daroussin [Fri, 26 Aug 2022 09:48:03 +0000 (11:48 +0200)]
tzsetup: remove left overs from libbsddialog conversion

PR: 265954

22 months agoCorrect diagnostic messages for bad cylinder groups.
Kirk McKusick [Fri, 26 Aug 2022 07:31:44 +0000 (00:31 -0700)]
Correct diagnostic messages for bad cylinder groups.

Fix for 495b1ba.

Reported by:  Mike Karels
Sponsored by: The FreeBSD Foundation

22 months agoUpdates to UFS/FFS superblock integrity checks when reading a superblock.
Kirk McKusick [Fri, 26 Aug 2022 07:09:01 +0000 (00:09 -0700)]
Updates to UFS/FFS superblock integrity checks when reading a superblock.

Further updates based on ways Peter Holm found to corrupt UFS
superblocks in ways that could cause kernel hangs or crashes.

No legitimate superblocks should fail as a result of these changes.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agoProvide better diagnostic messages for bad cylinder groups.
Kirk McKusick [Fri, 26 Aug 2022 06:56:31 +0000 (23:56 -0700)]
Provide better diagnostic messages for bad cylinder groups.

Like the detailed diagnostics produced when a bad superblock
is read, provide similar detailed diagnostics when bad
cylinder groups are read.

Reported by:  Peter Holm
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation

22 months agonfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION
Rick Macklem [Fri, 26 Aug 2022 03:48:04 +0000 (20:48 -0700)]
nfscl: Fix handling of nd_slotid while handling NFSERR_BADSESSION

When the NFSv4.1/4.2 client is handling a server error
of NFSERR_BADSESSION, it retries RPCs with a new session.
Without this patch, the nd_slotid was not being updated
for the new session.

This would result in a bogus console message like
"Wrong session srvslot=X slot=Y" and then it would
free the incorrect slot, often generating a
"freeing free slot!!" console message as well.

This patch fixes the problem.

Note that FreeBSD NFSv4.1/4.2 servers only
generate a NFSERR_BADSESSION error after a reboot
or after a client does a DestroySession operation.

PR: 260011
MFC after: 1 week

22 months agonfscl: Fix handling of a bad session slot (NFSv4.1/4.2)
Rick Macklem [Fri, 26 Aug 2022 03:33:31 +0000 (20:33 -0700)]
nfscl: Fix handling of a bad session slot (NFSv4.1/4.2)

When a session has been marked defunct by the server
sending a NFSERR_BADSESSION reply to the NFSv4.1/4.2
client, nfsv4_sequencelookup() returns NFSERR_BADSESSION
without actually assigning a session slot.
Without this patch, newnfs_request() would erroneously
free slot 0.

This could result in the slot being reused prematurely,
but most likely just generated a "freeing free slot!!"
console message.

This patch fixes the code to not do the erroneous
freeing of the slot for this case.

PR: 260011
MFC after: 1 week

22 months agoamd64: update comment for casueword/casueword32, mentioning return value 1
Konstantin Belousov [Thu, 25 Aug 2022 23:41:48 +0000 (02:41 +0300)]
amd64: update comment for casueword/casueword32, mentioning return value 1

Sponsored by: The FreeBSD Foundation
MFC after: 3 days