Dag-Erling Smørgrav [Tue, 10 Jan 2023 15:14:27 +0000 (16:14 +0100)]
Bring our tzcode up to date.
* Replay 2010[acflm] which had been merged but not recorded.
* Merge 2010n.
* Reorganize (unsplit) the code to match the upstream layout.
* Merge 2022[cdefg].
MFC after: 1 week
Sponsored by: Klara, Inc.
Gleb Popov [Tue, 10 Jan 2023 10:17:01 +0000 (13:17 +0300)]
libc: Fix build with WITHOUT_MACHDEP_OPTIMIZATIONS=YES set.
Test Plan: `make buildword WITHOUT_MACHDEP_OPTIMIZATIONS=YES` on 14-CURRENT and 13-STABLE
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38017
PR: 266900
Peter Holm [Tue, 10 Jan 2023 05:33:14 +0000 (06:33 +0100)]
stress2: Added finding to unionfs9.sh and updated the exclude list
Justin Hibbits [Mon, 9 Jan 2023 19:24:08 +0000 (14:24 -0500)]
ifnet/API: Change if_set*bit accessors to clear first
Summary:
A common pattern has been to:
if (foo)
caps = IFCAP_FOO;
ifp->if_capenable &= ~IFCAP_FOO;
ifp->if_capenable |= caps;
which in the new order of things would be:
if (foo)
caps = IF_FOO;
if_setcapenablebits(ifp, 0, IFCAP_FOO);
if_setcapenablebits(ifp, caps, 0);
This change streamlines this into:
if (foo)
caps = IF_FOO;
if_setcapenablebits(ifp, caps, IFCAP_FOO);
Reviewed by: melifaro
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37993
Brooks Davis [Mon, 9 Jan 2023 19:09:48 +0000 (19:09 +0000)]
tools/build: Always bootstrap (sys/)bitstring.h
Older, supported FreeBSD versions lack bit_ntest() so hoist the boostrap
installation out of the OS!=FreeBSD case and always install it. A more
precise criteria is possible, but would add little value.
This fixes bootstrapping makefs as a build tool on 13.1.
Reviewed by: jrtc27, emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D37951
Alan Somers [Mon, 26 Dec 2022 02:06:21 +0000 (19:06 -0700)]
ifconfig: abort if loading a module fails other than for ENOENT
If "ifconfig create" tries to load a kernel module, and the module
exists but can't be loaded, fail the command with a useful error
message. This is helpful, for example, when trying to create a cloned
interface in a vnet jail. But ignore ENOENT, because sometimes ifconfig
can't correctly guess the name of the required kernel module.
MFC after: 2 weeks
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D37873
Alan Somers [Sun, 18 Dec 2022 20:12:02 +0000 (13:12 -0700)]
Switch wg(4) to the new if_clone KPI
MFC after: 2 weeks
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D37740
Jessica Clarke [Mon, 9 Jan 2023 18:34:43 +0000 (18:34 +0000)]
libc: Fix longjmp/_longjmp(buf, 0) for AArch64 and RISC-V
These architectures fail to handle this special case, and will cause the
corresponding setjmp/_setjmp to return 0 rather than 1. Fix this and add
regression tests (also committed upstream).
PR: 268684
Reviewed by: arichardson, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29363
Warner Losh [Sun, 8 Jan 2023 19:00:51 +0000 (12:00 -0700)]
stand/efi: Better variable name
sanity_check_currdev returns true if it found a kernel or a sane loader
config file. A better name for this would be 'bootable' rather than 'rv'
which connotes in other places an errno value or similar.
Sponsored by: Netflix
Gleb Smirnoff [Mon, 9 Jan 2023 16:40:20 +0000 (08:40 -0800)]
fuser: fix loop over kinfo_proc array
The previous code would skip as many entries at the end of the
array as there were zombies in the list. While here fix type
of cnt.
Submitted by: Ali Abdallah <ali.abdallah suse.com>
PR: 232702
MFC After: 2 weeks
Ed Maste [Fri, 6 Jan 2023 14:44:54 +0000 (09:44 -0500)]
pkgbase: share rules for packages without pkgdeps
Have liby and libcompat share *-dev and *-lib32_dev rules, and share
*-man rule for libcompat and libelftc. Also correct name substitution
and description for man rules.
Reviewed by: manu
Fixes:
5391bcf0f7e4 ("pkgbase: Do not record dependency on...")
Fixes:
65fa2fd23b9d ("pkgbase: Do record dependency on non-...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37964
Alexander V. Chernikov [Sun, 8 Jan 2023 19:51:26 +0000 (19:51 +0000)]
testing: fix skipping netlink tests if netlink module is not loaded.
Warner Losh [Sun, 8 Jan 2023 16:43:58 +0000 (09:43 -0700)]
testing: Make sure to specify a name for zpools
Zpools have to have a name. Pools created w/o a name aren't legit and
trigger a number of bugs.
Sponsored by: Netflix
Warner Losh [Fri, 16 Dec 2022 23:19:51 +0000 (16:19 -0700)]
stand/zfs: Add a third argument to zfs_probe_dev: part_too
Pass in 'true' if you'd like to search this device's partitions or
'false' if you should just search the device. EFI and (in the future)
kboot have discrete partitions that aren't accessed via the full disk
device. Weird things happen if you try to search in these cases.
Sponsored by: Netflix
Alexander V. Chernikov [Sat, 7 Jan 2023 16:18:39 +0000 (16:18 +0000)]
netlink: improve RTM_GETADDR handling.
* Allow filtering by ifa_family & ifa_index.
* Add common RTM_<NEW|DEL|GET>ADDR parser
* Add tests verifying RTM_GETADDR filtering behaviour & output
* Factor out common netlink socket test methods into NetlinkTestTemplate
* Add NLMSG_DONE message handler
Reviewed By: pauamma
Differential Revision: https://reviews.freebsd.org/D37970
Søren Schmidt [Sun, 8 Jan 2023 03:07:18 +0000 (03:07 +0000)]
Add Combo PHY, RK817, Syr827, tcs4525 pmic devices to Rockchip specific config.
Rick Macklem [Sat, 7 Jan 2023 21:49:25 +0000 (13:49 -0800)]
gssd: Fix handling of the gssname=<name> NFS mount option
If an NFS mount using "sec=krb5[ip],gssname=<name>" is
done, the gssd daemon fails. There is a long delay
(several seconds) in the gss_acquire_cred() call and then
it returns success, but the credentials returned are
junk.
I have no idea how long this has been broken, due to some
change in the Heimdal gssapi library call, but I suspect
it has been quite some time.
Anyhow, it turns out that replacing the "desired_name"
argument with GSS_C_NO_NAME fixes the problem.
Replacing the argument should not be a problem, since the
TGT for the host based initiator credential in the default
keytab file should be the only TGT in the gssd'd credential
cache (which is not the one for uid 0).
I will try and determine if FreeBSD13 and/or FreeBSD12
needs this same fix and will MFC if they need the fix.
This problem only affected Kerberized NFS mounts when the
"gssname" mount option was used. Other Kerberized NFS
mount cases already used GSS_C_NO_NAME and work ok.
A workaround if you do not have this patch is to do a
"kinit -k host/FQDN" as root on the machine, followed by
the Kerberized NFS mount without the "gssname" mount
option.
MFC after: 1 month
Warner Losh [Fri, 23 Dec 2022 18:26:32 +0000 (11:26 -0700)]
kboot: use 128MB for the heap area, ZFS needs a lot of memory
ZFS uses a lot of memory. The old minimal allocations won't work when
ZFS support is added. Most environments this will be used (or will
liekly be used) have >> 256MB, 128MB should be safe everywhere and allow
examination of a fair number of ZFS pools to boot from.
Sponsored by: Netflix
Warner Losh [Sat, 7 Jan 2023 20:24:45 +0000 (13:24 -0700)]
kboot: Sort kexec_load alphabetically
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37968
Warner Losh [Sat, 7 Jan 2023 20:23:05 +0000 (13:23 -0700)]
stand: Add macros for file types from stat
Add the familiar macros for file types for stat's st_mode
member. Prepend HOST_ to the start of these. Make sure all the values
match the linux nolibc and uapi headers. These values are the same as
native values since they appear to be required by POSIX. Define anyway
to allow the reader of the code to know that they are in the 'host (eg
Linux)' namespace rather than the 'loader' namespace.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37967
Warner Losh [Tue, 13 Dec 2022 05:39:03 +0000 (22:39 -0700)]
kboot: Disks should be at least 16MB
Linux pre-boot environments will often have a number of psuedo disks
that are small, all smaller than a few MB. 16MB is a good cutoff since
it's big enough to filter these devices, yet small enough to allow a
super-minimal partition through (the smallest I've been able to make
that's useful lately is around 20MB).
Sponsored by: Netflix
Warner Losh [Tue, 13 Dec 2022 05:37:35 +0000 (22:37 -0700)]
kboot: hostdisk.c update copyright notice
I've rewritten a substantial portion of this file, so add Netflix
copyright.
Sponsored by: Netflix
Li-Wen Hsu [Sat, 7 Jan 2023 16:05:26 +0000 (00:05 +0800)]
organization.dot: Update Core Team Secretary
Søren Schmidt [Sat, 7 Jan 2023 07:42:44 +0000 (07:42 +0000)]
Add delay to have things settle.
Ganbold Tsagaankhuu [Sat, 7 Jan 2023 06:05:52 +0000 (06:05 +0000)]
Remove unnecessary sys/cdefs.h includes.
Warner Losh [Sat, 7 Jan 2023 01:39:09 +0000 (18:39 -0700)]
stand: Allow stand.h to be included in C++ programs
Allow stand.h to be included in C++ programs. This is little more than
using our stylized __BEGIN_DECL / __END_DECL around the entire
file. There's no run-time support for C++, so the C++ that can be used
is quite limited. It is enough for libunwind, though.
Sponsored by: Netflix
Reviewed by: jrtc27, kevans
Differential Revision: https://reviews.freebsd.org/D37946
Warner Losh [Sat, 7 Jan 2023 01:37:56 +0000 (18:37 -0700)]
stand: Add inttype.h
libunwind files need inttype.h. It's safe so add it to the safe list.
Sponsored by: Netflix
Reviewed by: jrtc27, kevans
Differential Revision: https://reviews.freebsd.org/D37947
Alan Somers [Sat, 7 Jan 2023 04:49:28 +0000 (21:49 -0700)]
fsx: more consistent debug output with -[RWU]
MFC after: 2 weeks
Val Packett [Fri, 6 Jan 2023 15:33:07 +0000 (10:33 -0500)]
copyright: chase my name and email change
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D37945
Gleb Smirnoff [Fri, 6 Jan 2023 20:17:41 +0000 (12:17 -0800)]
tests: add test for ipfw fwd localaddr,port
Checks basic forward to local address, also with presence of
a listener that matches original port (see
aab8c844b91). Based
on non-ATF test case written by Pavel Polyakov.
Reviewed by: kp, melifaro
Differential revision: https://reviews.freebsd.org/D37960
Alexander V. Chernikov [Fri, 6 Jan 2023 19:13:42 +0000 (19:13 +0000)]
netlink: fix ifaddr reporting.
Output the proper attributes for IPv4/IPvv6 ifaddrs:
* IFA_ADDRESS contains local address in every case except p2p,
in that case it contains the peer address
* IFA_LOCAL contains local address. It is always present in IPv4,
or in IPv6/p2p.
* IFA_BROADCAST contains the network broadcast address (if any)
Reported by: Adam Wood <aswood@gmail.com>
Tested by: Adam Wood <aswood@gmail.com>
Michael Gmelin [Thu, 29 Dec 2022 15:59:08 +0000 (16:59 +0100)]
asmc: Add support for MacBook5,5
This is a slightly refined version of a patch[0] by FreeBSD Forums
user "tmcclean".
[0]https://forums.freebsd.org/threads/success-installing-freebsd-13-0-on-macbook-pro-5-5.80458/
Reviewed by: adrian, emaste, imp
Differential Revision: https://reviews.freebsd.org/D37900
MFC after: 1 month
Konstantin Belousov [Fri, 6 Jan 2023 18:18:51 +0000 (20:18 +0200)]
i386: print trampoline disposition value for verbose boot
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Alan Somers [Sat, 7 Jan 2023 01:54:23 +0000 (18:54 -0700)]
fsx: bounds check the inputs
In particular, don't allow the user to specify a file size that can't be
expressed as an int, since fsx's random-number generator only has a 32
bit range.
MFC after: 2 weeks
Cy Schubert [Fri, 6 Jan 2023 17:10:14 +0000 (09:10 -0800)]
sqlite3: Vendor import of sqlite3 3.40.1
Release notes at https://www.sqlite.org/releaselog/3_40_1.html.
Obtained from: https://www.sqlite.org/2022/sqlite-autoconf-3400100.tar.gz
Merge commit '
c728c97f5c838c9a873516c4499e4e1a41788ce7' into main
Cy Schubert [Fri, 6 Jan 2023 17:03:38 +0000 (09:03 -0800)]
sqlite3: Vendor import of sqlite3 3.40.0
Release notes at https://www.sqlite.org/releaselog/3_40_1.html.
Obtained from: https://www.sqlite.org/2022/sqlite-autoconf-3400100.tar.gz
Ed Maste [Wed, 4 Jan 2023 18:47:26 +0000 (13:47 -0500)]
dma: dma.conf.5 as MLINK to dma.8
There's no separate man page for dma.conf, but the format is documented
in dma.8.
Reviewed by: bapt
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37944
Dag-Erling Smørgrav [Fri, 6 Jan 2023 10:12:40 +0000 (11:12 +0100)]
Missed skey(4), a copy of opie(4).
Ganbold Tsagaankhuu [Fri, 6 Jan 2023 08:15:44 +0000 (08:15 +0000)]
Use BSD-2-Clause for the SPDX license id as -FreeBSD variant has been deprecated.
Ganbold Tsagaankhuu [Fri, 6 Jan 2023 04:14:49 +0000 (04:14 +0000)]
Add SPDX-License-Identifier.
Ganbold Tsagaankhuu [Fri, 6 Jan 2023 04:10:09 +0000 (04:10 +0000)]
Remove unnecessary $Id string from license.
While there add SPDX-License-Identifier.
Søren Schmidt [Fri, 6 Jan 2023 03:00:18 +0000 (03:00 +0000)]
Add Naneng combo PHY support for RK3568 SoC.
It can be used as pcie-phy, usb3-phy, sata-phy or sgmii-phy.
Mike Karels [Thu, 5 Jan 2023 13:15:21 +0000 (07:15 -0600)]
growfs(7): clarify assumptions and limitations
Document that the growfs(7) script works only if the root file system
is in the last partition and free space immediately follows it.
Don't imply that /usr can be a separate partition, as that would
likely mean that root is not last.
Reported by: marklmi at yahoo dot com
Konstantin Belousov [Wed, 4 Jan 2023 10:31:16 +0000 (12:31 +0200)]
amd64 pmap.h: make it easier to use the header for other consumers
Guard pmap_invlpg() definition with checks that only provide it when
both sys/pcpu.h and machine/cpufunc.h were already included.
Requested by: Elliott Mitchell
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Konstantin Belousov [Tue, 3 Jan 2023 10:13:07 +0000 (12:13 +0200)]
amd64: be more precise when enabling the AlderLake small core PCID workaround
In particular, do not enable the workaround if INVPCID is not supported
by the core.
Reported by: "Chen, Alvin W" <Weike.Chen@Dell.com>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37940
Emmanuel Vadot [Thu, 5 Jan 2023 22:38:14 +0000 (23:38 +0100)]
pkgbase: Do record dependency on non-existent libelftc package
libelftc is an internal lib so it's never installed.
When building with WITH_MANSPLITPKG=yes the libelftc-man package
will have a dependecy on a non-existent libelftc package.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Emmanuel Vadot [Thu, 5 Jan 2023 22:27:22 +0000 (23:27 +0100)]
pkgbase: Do not record dependency on non-existent libcompat package
libcompat only provides a .a which is put in the -dev package.
Add a special record for it so we do not require a dependency on the
non-existent package FreeBSD-libcompat.
Sponsored by: Beckhoff Automation GmbH & Co. KG
Gleb Smirnoff [Thu, 5 Jan 2023 22:34:50 +0000 (14:34 -0800)]
tcp/ipfw: fix "ipfw fwd localaddr,port"
The ipfw(4) feature of forwarding to local address without modifying
a packet was broken. The first lookup needs always be a non-wildcard
one, cause its goal is to find an already existing socket. Otherwise
a local wildcard listener with the same port number may match resulting
in the connection being forwared to wrong port.
Reported by: Pavel Polyakov <bsd kobyla.org>
Fixes:
d88eb4654f372d0451139a1dbf525a8f2cad1cf8
Sergey A. Osokin [Thu, 5 Jan 2023 21:36:57 +0000 (16:36 -0500)]
bsd-family-tree: add DragonFly 6.4.0
MFC after: 3 days
Randall Stewart [Thu, 5 Jan 2023 16:59:21 +0000 (11:59 -0500)]
rack and bbr not loading if TCP_RATELIMIT is not configured.
So it turns out that rack and bbr still will not load without TCP_RATELIMIT. This needs
to be fixed and lets also at the same time bring tcp_ratelimit up to date where we allow
the transports to set a divisor (though still having a default path with the default
divisor of 1000) for setting the burst size.
Reviewed by: tuexen, gallatin
Sponsored by: Netflix Inc
Differential Revision: https://reviews.freebsd.org/D37954
Robert Clausecker [Mon, 2 Jan 2023 21:12:50 +0000 (22:12 +0100)]
loader.efi: make sure kernel image is executable
The Windows Dev Kit 2023 (Volterra) has an UEFI implementation that maps
EfiLoaderData pages as non-executable. Map the kernel as EfiLoaderCode
to ensure that it can be executed.
With this change and another in review, FreeBSD boots to the mountroot
prompt if hw.pac.enable = 0 is set in loader.conf(5).
Reviewed by: andrew, imp, tsoome
Sponsored by: Berliner Linux User Group e.V.
Sponsored by: spline / FU-Berlin
Differential Revision: https://reviews.freebsd.org/D37931
Andre Albsmeier [Thu, 11 Mar 2010 10:53:47 +0000 (11:53 +0100)]
pwd_mkdb(8): Don't copy comments from /etc/passwd to /etc/passwd.
The intention of /etc/passwd was to support legacy applications that are
not yet converted to use modern API like getpwent(3). Comments are not
defined in the legacy format, so copying them could break these
applications. Plus, it could leak sensitive information (e.g. encrypted
form of password of an user that was commented out instead of deleted
or disabled).
PR: bin/144652
MFC after: 1 month
Søren Schmidt [Thu, 5 Jan 2023 04:15:56 +0000 (04:15 +0000)]
Add PCIe driver for RK3568 SoC.
PCIe3 ports work, however PCIe2x1 is not working yet in this case as it depends on Naneng Combo Phy driver.
John Baldwin [Wed, 4 Jan 2023 22:55:00 +0000 (14:55 -0800)]
rtld: Revert "When loading dso without PT_GNU_STACK phdr, only call"
After the removal of ia64 and sparc64, all current architectures
support executable stacks at an architectural level.
This reverts commit
1290d38ac50b3afa7e5781d9d97346a1042c736c.
Reviewed by: kib
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D37904
Justin Hibbits [Wed, 4 Jan 2023 20:56:31 +0000 (15:56 -0500)]
ifnet: Expose if_t to userspace
<net/if_var.h> should be a kernel-only header, but it's included
elsewhere. Until that's addressed expose if_t to userspace to fix the
build.
Fixes:
be4315dcbb8
Sponsored by: Juniper Networks, Inc.
Justin Hibbits [Wed, 21 Dec 2022 21:15:09 +0000 (16:15 -0500)]
ifnet/DrvAPI: Move if_t typedef to a better place
Summary:
<net/if_var.h> should really be used by the netstack only, not by
drivers. Eventually all the accessors will be moved to <net/if.h> as
well, but for now just move the typedef while the KPI gets sorted and
drivers get converted.
Sponsored by: Juniper Networks, Inc.
Reviewed By: melifaro, glebius
Differential Revision: https://reviews.freebsd.org/D37784
Justin Hibbits [Wed, 21 Dec 2022 21:42:42 +0000 (16:42 -0500)]
ifnet/DrvAPI: Implement if_setoutputfn() accessor
Fixes:
eb1da3e5258238e1c0555c6a006a341df0821d8e
Sponsored by: Juniper Networks, Inc.
Mike Karels [Wed, 4 Jan 2023 18:25:54 +0000 (12:25 -0600)]
growfs script: fix config-dependent errors
- awk sometimes formatted swapbase as floating point, which gpart
does not accept; force int.
- Fix typo in code for checking vm.max_swap_pages.
- While here, do not set kernel env if "gpart add" fails.
- Add "gpart show" before modification to verbose output.
Reported by: marklmi at yahoo dot com
Tested by: marklmi at yahoo dot com
Andrew Turner [Wed, 4 Jan 2023 13:23:59 +0000 (13:23 +0000)]
Add Windows Dev Kit 2023 support to if_ure
The Windows Dev Kit 2023 has an if_ure NIC with custom vendor and
procuct IDs. Add them to the driver.
Tested by: Robert Clausecker <fuz@fuz.su>
Obtained from: OpenBSD
Sponsored by: Arm Ltd
Andrew Turner [Wed, 4 Jan 2023 12:33:08 +0000 (12:33 +0000)]
Check for more XHCI ACPI IDs
The Windows Dev Kit 2023 uses the XHCI-compliant USB controller without
standard debug ID in its ACPI tables. Check for both ID values found
on [1] in the XHCI ACPI attachment.
[1] https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/device-management-namespace-objects
Tested by: Robert Clausecker <fuz@fuz.su>
Sponsored by: Arm Ltd
Mark Johnston [Wed, 4 Jan 2023 02:47:52 +0000 (10:47 +0800)]
atomic: Make atomic_san.h self-contained
This file assumes that uint*_t and __typeof() are defined, so ensure
that consumers don't have to pull in the requisite includes themselves.
This is consistent with sys/atomic_common.h.
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D37939
Kyle Evans [Wed, 4 Jan 2023 05:21:10 +0000 (23:21 -0600)]
grep: properly switch EOL indicator with -z
-z is supposed to use only the NUL byte as EOL, but we were
inadvertently using both newline and NUL due to REG_NEWLINE in cflags.
The odds of anyone relying on this bsdgrep-specific bug are quite low,
so let's just fix it. At least one port in the wild has been reported
to expect the intended behavior.
Reported by: Hill Ma <maahiuzeon@gmail.com>
Triaged by: the self-proclaimed peanut gallery on Discord
Takanori Watanabe [Tue, 3 Jan 2023 23:30:32 +0000 (08:30 +0900)]
wdatwd: fix i386 build breakage.
Formatting string for uint64_t has portablity issue and
lead bulid breakage, so fix it.
Reviewed by hrs
Differential Revision: https://reviews.freebsd.org/D37937
Ed Maste [Sun, 1 Jan 2023 18:58:56 +0000 (13:58 -0500)]
Cirrus-CI: add `gpart show` to setup script
GCP instances have stopped resizing the UFS root filesystem. The 14.x
snapshot image built from
b1ef176eb528 works while
c89209c674f2 fails.
Discovered via testing a WIP branch in Cirrus-CI that uses
`image: family/freebsd-14-0-snap`.
Add `gpart show` to the setup script to confirm that the partition
size (as set by Cirrus config / GCP) took effect and to help when
investigating any similar issue in the future.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Takanori Watanabe [Tue, 3 Jan 2023 15:16:36 +0000 (00:16 +0900)]
wdatwd: Add support for ACPI WDAT based watchdog timer.
Simply said, WDAT is an abstraction for the real WDT hardware. For
instance, to add a newer generation WDT to ichwd(4), one must know the
detailed hardware registers, etc..
With WDAT, the necessary IO accesses to operate the WDT are comprehensively
described in it and no hardware knowledge is required.
With this driver, the WDT on Advantech ARK-1124C, Dell R210 and Dell R240 are
detected and operated flawlessly.
* While R210 is also supported by ichwd(4), others are not supported yet.
The unfortunate thing is that not all systems have WDAT defined.
Submitted by: t_uemura at macome.co.jp
Reviewed by: hrs
Differential Revision: https://reviews.freebsd.org/D37493
Joseph Mingrone [Mon, 19 Dec 2022 04:07:11 +0000 (00:07 -0400)]
beinstall.sh: Check correct exit status
When retrieving the timestamp of the last commit using git-show(1), do
not pipe the output to head(1), otherwise the return value in $? will be
for head(1) and not git-show(1).
Approved by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37742
Konstantin Belousov [Fri, 23 Dec 2022 17:30:11 +0000 (19:30 +0200)]
ifcapnv: fix IFCAP2 usage
IFCAP2_XXX constants are integers, they do not need shift for the
definition. But their usage as bitmask for if_capenable2 does require
shift. Add convenience macro IFCAP2_BIT() for consumers.
Fix the only existing consumer, mlx5(4) RXTLS enable bits.
Reported by: jhb
Reviewed by: jhb, jhibbits, hselasky
Coverity CID: 1501659
Sponsored by: NVIDIA networking
Differential revision: https://reviews.freebsd.org/D37862
Peter Holm [Tue, 3 Jan 2023 09:34:00 +0000 (10:34 +0100)]
stress2: Added a regression test
Michal Meloun [Wed, 3 Feb 2021 08:51:45 +0000 (09:51 +0100)]
extres/phy: Add mode setting function.
Modern multi-protocol phys are capable of supporting multiple different
protocols. Add a method for mode (and/or its variants) setting.
Discused with: ganbold, manu, andrew
MFC after: 3 weeks
Eugene Grosbein [Tue, 3 Jan 2023 08:53:47 +0000 (15:53 +0700)]
syslog: fix PID of forking process
Do not cache PID for a process that does not fabricate it,
calls openlog() before forking and does not call exec() thereafter.
PR: 268666
Fixes:
e9ae9fa93745669b7dd0341d333257ad6cfe8e37
Tested by: kp
MFC after: 3 days
Jean-Sébastien Pédron [Fri, 30 Dec 2022 09:50:02 +0000 (10:50 +0100)]
linuxkpi: Define `lockdep_assert_none_held_once()`
This is defined as a no-op even when INVARIANTS is defined. I admit I
don't know how to implement that in FreeBSD and didn't search
thoroughly.
Reviewed by: bz
Approved by: bz
Differential Revision: https://reviews.freebsd.org/D37911
Jean-Sébastien Pédron [Fri, 30 Dec 2022 09:48:01 +0000 (10:48 +0100)]
linuxkpi: Include `errno.h` from `acpi/video.h`
This defines `ENODEV` used in this header. This fixes a build failure in
the DRM drivers.
Reviewed by: bz
Approved by: bz
Differential Revision: https://reviews.freebsd.org/D37909
Cy Schubert [Wed, 14 Dec 2022 21:41:10 +0000 (13:41 -0800)]
network.subr: Fix infinite loop
When setting up carp tunnel, using a password consisting of only the
characters used as hexadecimal characters, i.e. abc-def, there will be
an infinite loop in the shell function ifalias_af_common_handler().
To circumvent this we test for " pass ".
PR: 268378
Reported by: jyoung15@gmail.com
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D37748
Cy Schubert [Wed, 14 Dec 2022 21:36:23 +0000 (13:36 -0800)]
network.subr: Add missing brace
PR: 268378
Submitted by: jyoung15@gmail.com
Reported by: jyoung15@gmail.com
MFC after: 3 days
Cy Schubert [Wed, 21 Dec 2022 16:06:02 +0000 (08:06 -0800)]
network.subr: Replace "\ " with "[[:space:]]"
"[[:space:]]" is easier to read than "\ " and is conisitent with
clone_up().
Reported by: eugen
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D37748
Yoshihiro Takahashi [Mon, 2 Jan 2023 04:17:27 +0000 (13:17 +0900)]
unzip: Document optional member list
Submitted by: Pat Maddox (man page)
PR: 267426
MFC after: 2 weeks
Kirk McKusick [Mon, 2 Jan 2023 03:29:43 +0000 (19:29 -0800)]
Fix vop_readdir's ncookies handling in UFS and EXT2.
Submitted by: Kusumi Tomohiro
PR: 267706
MFC after: 1 week
Jose Luis Duran [Sun, 20 Nov 2022 02:56:49 +0000 (23:56 -0300)]
ping(8): man page cleanup
* Appease mandoc -T lint and igor
* Use example.com for documentation
* Update the IPv4 TTL section.
Update the IPv4 TTL section specifically for FreeBSD.
FreeBSD changed the default TTL to 64 in
5639e86bdd7ea151958776264bf5a67e60a54d68. NetBSD and OpenBSD still
use 255. Remove some references of extinct operating systems.
Reviewed by: gbe (manpages), asomers
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/630
Ceri Davies [Sun, 1 Jan 2023 16:49:51 +0000 (16:49 +0000)]
mp[rs].4: correct spelling error, and expand "man page"
PR: 262957
Reported by: Trond Endrestol
Reviewed by: pauamma
Ceri Davies [Sun, 1 Jan 2023 16:49:22 +0000 (16:49 +0000)]
mpt.4: correct spelling error
Alexander V. Chernikov [Sun, 1 Jan 2023 14:35:41 +0000 (14:35 +0000)]
testing: add python test examples
Simplify the adoption of python tests by proving some examples,
utilising commonly-used patterns.
Differential Revision: https://reviews.freebsd.org/D37902
Reviewed by: asomers
MFC after: 2 weeks
Alexander V. Chernikov [Sun, 1 Jan 2023 14:11:18 +0000 (14:11 +0000)]
testing: fix tests without cleanup in pytest.
It was broken by
89ffac3b01fb3f6749799ac67b7d94056a36778e,
which added "cleanup" method to the base test class,
resulting in reporting cleanup for all of the tests.
Li-Wen Hsu [Sun, 1 Jan 2023 10:33:40 +0000 (18:33 +0800)]
Update the SPDX header to preferred BSD-2-Clause
Discussed with: imp, bcr
Eugene Grosbein [Sun, 1 Jan 2023 08:26:30 +0000 (15:26 +0700)]
syslog(3): expand a commentary adding a reference to RFC 3164.
Li-Wen Hsu [Sun, 1 Jan 2023 05:44:43 +0000 (13:44 +0800)]
Happy New Year 2023!
Sponsored by: The FreeBSD Foundation
Xin LI [Sun, 1 Jan 2023 04:25:17 +0000 (20:25 -0800)]
MFV: xz 5.4.0
MFC after: 2 weeks
Xin LI [Sun, 1 Jan 2023 04:23:22 +0000 (20:23 -0800)]
Vendor import of xz 5.4.0 (trimmed)
Konstantin Belousov [Thu, 29 Dec 2022 20:48:51 +0000 (22:48 +0200)]
Move INVLPG to pmap_quick_enter_page() from pmap_quick_remove_page().
If processor prefetches neighboring TLB entries to the one being accessed
(as some have been reported to do), then the spin lock does not prevent
the situation described in the "AMD64 Architecture Programmer's Manual
Volume 2: System Programming" rev. 3.23, "7.3.1 Special Coherency
Considerations".
Reported and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37770
Konstantin Belousov [Mon, 10 Oct 2022 23:08:55 +0000 (02:08 +0300)]
amd64: for small cores, use (big hammer) INVPCID_CTXGLOB instead of INVLPG
A hypothetical CPU bug makes invalidation of global PTEs using INVLPG
in pcid mode unreliable, it seems. The workaround is applied for all
CPUs with small cores, since we do not know the scope of the issue, and
the right fix.
Reviewed by: alc (previous version)
Discussed with: emaste, markj
Tested by: karels
PR: 261169, 266145
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37770
Konstantin Belousov [Wed, 21 Dec 2022 11:04:14 +0000 (13:04 +0200)]
amd64: identify small cores
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37770
Alexander V. Chernikov [Sat, 31 Dec 2022 16:22:30 +0000 (16:22 +0000)]
testing: allow custom test cleanup handlers in pytest
In order to provide more flexibility for the test writers,
add per-test-method cleanups in addition to the per-class cleanups.
Now the test 'test_one' can perform cleanup by either defining
per-class 'cleanup' method (typically used in VNET classes) and
per-test method 'cleanup_test_one'. The latter has preference.
In order to handle paramatrization, testid is passed as a single
argument to both of the methods.
MFC after: 2 weeks
Vincenzo Maffione [Sat, 31 Dec 2022 14:56:02 +0000 (14:56 +0000)]
netmap: bridge: fix -Wdate-time compilation issue
MFC after: 3 days
Bjoern A. Zeeb [Mon, 28 Nov 2022 22:31:28 +0000 (22:31 +0000)]
LinuxKPI: pm.h add pm_sleep_ptr and DEFINE_SIMPLE_DEV_PM_OPS
Extend pm.h by pm_sleep_ptr and DEFINE_SIMPLE_DEV_PM_OPS().
For the moment this duplicates some parts (as can be seen in the earlier
review I tried to simplify bits but given our implementation this
was easier in the end).
While here and cleanup the SIMPLE_DEV_PM_OPS() bits (white-space only).
MFC after: 3 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D37527
Bjoern A. Zeeb [Sat, 3 Dec 2022 00:33:34 +0000 (00:33 +0000)]
LinuxKPI: add simplified vesion of page_frag_cache
For the moment and the currently only consumer (mt76) add a simplified
version of the page_frag_cache. We will only accept fragement sizes up
to 1 PAGE_SIZE (KASSERT) and we will always return a full page.
Should we add more consumers or small (or large) objects would become a
problem we can always add a more elaborate version.
Discussed with: markj
Reviewed by: markj (,hselasky commented as well)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D37595
Bjoern A. Zeeb [Sat, 31 Dec 2022 02:24:23 +0000 (02:24 +0000)]
LinuxKPI: 802.11: move ieee80211_{unregister,restart}_hw out of header
Migrate the two functions from the header into the implementation file
in order to have access to more facilities and not to run into possible
allocation/locking/... problems in the future.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Bjoern A. Zeeb [Sat, 31 Dec 2022 02:15:28 +0000 (02:15 +0000)]
LinuxKPI; 802.11: update mac80211.h structures and fields
Cleanup some fields and structures and add new ones.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Bjoern A. Zeeb [Sat, 31 Dec 2022 02:02:01 +0000 (02:02 +0000)]
LinuxKPI: 802.11: implement ieee80211_get_hdrlen_from_skb()
Implement ieee80211_get_hdrlen_from_skb() doing basic sanity checks
on lengths (minimal length or skb data length vs. header length).
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Bjoern A. Zeeb [Sat, 31 Dec 2022 01:59:20 +0000 (01:59 +0000)]
LinuxKPI: 802.11: implement cfg80211_get_ies_channel_number()
Using the previous changes implement cfg80211_get_ies_channel_number()
either based on DSPARMS (or for the future HTINFO).
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Bjoern A. Zeeb [Sat, 31 Dec 2022 01:33:28 +0000 (01:33 +0000)]
LinuxKPI: 802.11: implement some *eleme/ie* lookup functions
Implement cfg80211_find_elem(), ieee80211_bss_get_elem(),
ieee80211_bss_get_ie(), and cfg80211_find_vendor_ie() with the last
one having a short cut always also checking oui_type in the pattern.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Bjoern A. Zeeb [Sat, 31 Dec 2022 01:18:16 +0000 (01:18 +0000)]
LinuxKPI: 802.11: implement cfg80211_{get,put}_bss
Implement cfg80211_{get,put}_bss currently doing malloc/free bits,
so hopefully the drivers get the calls right.
cfg80211_get_bss() sets up a lookup structure which may also take a
result (first hit wins) and calls ieee80211_scan_iterate() comparing
the various values in the iterator funcion. Some of the checks are
partially pointless (as it seems the drivers are not interested in
these parts [ANY] but we keep them for documentation purposes should
futher values arise in the future).
We currently only iterate over the first VAP which will do for now.
Sponsored by: The FreeBSD Foundation
MFC after: 10 days