Commit Graph

280322 Commits

Author SHA1 Message Date
Alan Somers
da303f5fd4 fsx: more consistent debug output with -[RWU]
MFC after:	2 weeks
2023-01-06 21:49:28 -07:00
Val Packett
0b4531511e copyright: chase my name and email change
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D37945
2023-01-06 15:28:42 -05:00
Gleb Smirnoff
c3ca3fa7d3 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 aab8c844b9). Based
on non-ATF test case written by Pavel Polyakov.

Reviewed by:		kp, melifaro
Differential revision:	https://reviews.freebsd.org/D37960
2023-01-06 12:17:42 -08:00
Alexander V. Chernikov
13214c601a 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>
2023-01-06 19:18:54 +00:00
Michael Gmelin
638937d466 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
2023-01-06 20:11:56 +01:00
Konstantin Belousov
29bfaf1c6d i386: print trampoline disposition value for verbose boot
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-01-06 20:18:51 +02:00
Alan Somers
3f8ca7a22e 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
2023-01-06 18:54:23 -07:00
Cy Schubert
5ae830e9ba 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
2023-01-06 09:11:41 -08:00
Cy Schubert
c728c97f5c 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
2023-01-06 09:03:38 -08:00
Ed Maste
45396fda8b 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
2023-01-06 09:40:45 -05:00
Dag-Erling Smørgrav
d4ac5aa334 Missed skey(4), a copy of opie(4). 2023-01-06 11:12:40 +01:00
Ganbold Tsagaankhuu
90737b632e Use BSD-2-Clause for the SPDX license id as -FreeBSD variant has been deprecated. 2023-01-06 08:15:44 +00:00
Ganbold Tsagaankhuu
7e2600ea7b Add SPDX-License-Identifier. 2023-01-06 04:14:49 +00:00
Ganbold Tsagaankhuu
0d4a240b0d Remove unnecessary $Id string from license.
While there add SPDX-License-Identifier.
2023-01-06 04:10:09 +00:00
Søren Schmidt
5723e5ac6d Add Naneng combo PHY support for RK3568 SoC.
It can be used as pcie-phy, usb3-phy, sata-phy or sgmii-phy.
2023-01-06 03:04:53 +00:00
Mike Karels
8664e266d6 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
2023-01-05 18:44:16 -06:00
Konstantin Belousov
ad97b9bbfc 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
2023-01-06 01:30:29 +02:00
Konstantin Belousov
a2c08eba43 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
2023-01-06 01:30:29 +02:00
Emmanuel Vadot
65fa2fd23b 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
2023-01-05 23:42:39 +01:00
Emmanuel Vadot
5391bcf0f7 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
2023-01-05 23:42:37 +01:00
Gleb Smirnoff
aab8c844b9 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:		d88eb4654f
2023-01-05 14:34:50 -08:00
Sergey A. Osokin
c47015fafa bsd-family-tree: add DragonFly 6.4.0
MFC after:	3 days
2023-01-05 16:36:57 -05:00
Randall Stewart
26bdd35c39 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
2023-01-05 11:59:52 -05:00
Robert Clausecker
95fa2e0aee 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
2023-01-05 09:58:33 +00:00
Andre Albsmeier
0deb25bd9d pwd_mkdb(8): Don't copy comments from /etc/master.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
2023-01-04 22:18:09 -08:00
Søren Schmidt
7daf96523b 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.
2023-01-05 04:15:56 +00:00
John Baldwin
b069d3e019 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 1290d38ac5.

Reviewed by:	kib
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D37904
2023-01-04 14:55:00 -08:00
Justin Hibbits
11905a0b4e 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:		be4315dcbb
Sponsored by:	Juniper Networks, Inc.
2023-01-04 16:04:05 -05:00
Justin Hibbits
be4315dcbb 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
2023-01-04 15:15:10 -05:00
Justin Hibbits
74abe47e32 ifnet/DrvAPI: Implement if_setoutputfn() accessor
Fixes:		eb1da3e525
Sponsored by:	Juniper Networks, Inc.
2023-01-04 15:15:10 -05:00
Mike Karels
0e2fdab227 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
2023-01-04 14:05:35 -06:00
Andrew Turner
e5b9b5ee8c 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
2023-01-04 17:12:20 +00:00
Andrew Turner
8793196ca2 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
2023-01-04 16:54:05 +00:00
Mark Johnston
6ebd8466af 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
2023-01-04 23:43:01 +08:00
Kyle Evans
e898a3af97 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
2023-01-03 23:37:54 -06:00
Takanori Watanabe
eb03c1f81c 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
2023-01-04 10:04:44 +09:00
Ed Maste
170d10421a Cirrus-CI: add gpart show to setup script
GCP instances have stopped resizing the UFS root filesystem.  The 14.x
snapshot image built from b1ef176eb5 works while c89209c674 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
2023-01-03 11:06:16 -05:00
Takanori Watanabe
99aeb219ca 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
2023-01-04 00:36:24 +09:00
Joseph Mingrone
a0c50eda29
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
2023-01-03 10:27:53 -04:00
Konstantin Belousov
01143ba118 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
2023-01-03 11:48:16 +02:00
Peter Holm
17edacfb6e stress2: Added a regression test 2023-01-03 10:34:00 +01:00
Michal Meloun
e4ef4c5d66 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
2023-01-03 10:19:29 +01:00
Eugene Grosbein
2ce3ef5503 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:		e9ae9fa937
Tested by:	kp
MFC after:	3 days
2023-01-03 15:58:36 +07:00
Jean-Sébastien Pédron
17f2b12a38
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
2023-01-02 22:07:31 +01:00
Jean-Sébastien Pédron
8dfb5571c4
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
2023-01-02 22:05:27 +01:00
Cy Schubert
e3e57edf4a 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
2023-01-02 10:20:05 -08:00
Cy Schubert
87061d3bff network.subr: Add missing brace
PR:		268378
Submitted by:	jyoung15@gmail.com
Reported by:	jyoung15@gmail.com
MFC after:	3 days
2023-01-02 10:20:05 -08:00
Cy Schubert
fef0e429f1 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
2023-01-02 10:20:05 -08:00
Yoshihiro Takahashi
a1f28ec729 unzip: Document optional member list
Submitted by:	Pat Maddox (man page)
PR:		267426
MFC after:	2 weeks
2023-01-02 13:17:27 +09:00
Kirk McKusick
e84e44215f Fix vop_readdir's ncookies handling in UFS and EXT2.
Submitted by: Kusumi Tomohiro
PR:           267706
MFC after:    1 week
2023-01-01 19:30:14 -08:00