Commit Graph

281865 Commits

Author SHA1 Message Date
Baptiste Daroussin
4cd30c640d uuidgen(1): fix another typo 2023-03-06 09:03:52 +01:00
Kirk McKusick
528d8e55c8 FFS/UFS snapshots: improve documentation.
This update provides a more detailed description of FFS/UFS snapshots
and adds links to useful man pages.

Requested by: Graham Perrin
Submitted by: darius-dons.net.au
Reviewed by:  Ravi Pokala
PR:           266358
MFC after:    2 weeks
Differential Revision: https://reviews.freebsd.org/D38817
2023-03-05 21:38:57 -08:00
Kajetan Staszkiewicz
cd9e5d4333 netstat: fix pfsync stats spelling
Reviewed by:	mjg
2023-03-05 22:50:07 +00:00
Andrew Turner
5a91529479 Support non-posted MMIO on arm64 with FDT
To allow hardware to work around a broken memory bus where we need to
support the nonposted-mmio flag.

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D34333
2023-03-05 20:17:21 +00:00
Andrew Turner
cb894f746c Map arm64 pci config memory as non-posted
On arm64 PCI config memory is expected to be mapped with a non-posted
device type. To handle this use the new bus_map_resource support in
arm64 to map memory with the new VM_MEMATTR_DEVICE_NP attribute. This
memory has already been allocated and activated, it just needs to be
mapped.

Reviewed by:	kevans, mmel
Differential Revision:	https://reviews.freebsd.org/D30079
2023-03-05 20:17:21 +00:00
Colin Percival
3689f8aeab linux_80211: Don't dequeue lsta if not queued
This fixes an instapanic when restarting wpa_supplicant on my laptop's
iwlwifi device.  After this change, iwlwifi enters a nonfunctional
state if wpa_supplicant is restarted, but "service netif restart wlan0"
is enough to get it working again.

releng/13.2 candidate.

Reviewed by:	bz
MFC after:	3 days
2023-03-05 12:16:22 -08:00
Xin LI
c237c10a23 xz: Improve compatibility with systems without capability mode support
When the kernel is built without capability mode support, or when
using an emulator like qemu-user-static that does not translate
system calls, these calls will return a negative number and set
the errno to ENOSYS. However, this error does not indicate a
real programming or runtime error and is generally ignored by
base system applications built with capability mode sandboxing.

Match this behavior by making xz(1) to ignore ENOSYS errors
when calling capability mode system calls too.

PR:		269185
Reported by:	Dan Kotowski
MFC after:	2 days
2023-03-05 01:40:13 -08:00
Tom Hukins
6d2feb39ad netlink: Fix "version introduced" documentation
netlink(4) and associated features will exist in FreeBSD 14.0 but they
will also exist in 13.2, an older version, from commits such as 02b958b1
and b309249b.

This commit needs merging to stable/13 and releng/13.2.

MFC after: 2days (needs to be in RC2)
Reviewed by: imp,melifaro
Pull Request: https://github.com/freebsd/freebsd-src/pull/651
2023-03-04 09:00:13 -07:00
Kristof Provost
38e2d5db2a netpfil tests: Add functions for testing routing scenarios
Many pf tests use identical setup where one jail is a router and
optionally another jail is a server. Add functions to create such jails
for IPv6 and IPv4 and functions to perform tests on such setup.

Add tests using those functions: scrub actions, routing table, tcp
sequence number modulation.

Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D38126
2023-03-04 14:35:24 +01:00
Kristof Provost
f5b204adf4 ifconfig: remove unused variable
In printgroup() 'cnt' is set, but never read. Remove it.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-03-04 11:19:12 +01:00
Dmitry Chagin
8243e17463 linux(4): Fixup 5c32488de0 mis-merge 2023-03-04 12:42:04 +03:00
Dmitry Chagin
5c32488de0 linux(4): Add a counterpart to linux_ifflags
For further use in linux_ioctl_socket add bsd_to_linux_ifflags() which
accepts FreeBSD interface flags and translate it to Linux if flags.

Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D38873
2023-03-04 12:26:48 +03:00
Dmitry Chagin
945a7f0d21 linux(4): Assert that the FreeBSD size of struct sockaddr is equal to Linux
Our code depends on the fact that the size of struct sockaddr and
the size of sa_data is equal between FreeBSD and Linux.
2023-03-04 12:11:39 +03:00
Dmitry Chagin
9883961ed5 linux(4): Drop excess assert that Linux IFNAMSIZ is equal to FreeBSD
While here use _Static_assert() instead of the older CTASSERT().
2023-03-04 12:11:39 +03:00
Dmitry Chagin
d447088d99 linux(4): Improve linux_ifconf readability
Initialize max_len and full variables in a code block where
they are used.
2023-03-04 12:11:39 +03:00
Dmitry Chagin
96a8c6aa37 linux(4): Fixup of the pointer cast when comparing to an integer 2023-03-04 12:11:39 +03:00
Dmitry Chagin
8d6dd96d50 linux(4): Add net epoch assert to the linux_ifhwaddr, linux_ifflags
Now this functions are intended to use in the net epoch.

Reviewed by:		emaste, melifaro
Differential Revision:	https://reviews.freebsd.org/D38795
2023-03-04 12:11:38 +03:00
Dmitry Chagin
f9b0675b01 linux(4): Refactor socket ioctl path to avoid referencing an unstable interfaces
Split the linux_ioctl_socket() function on two counterparts, where
the linux_ioctl_socket_ifreq() intended to use in a code path which
requires the struct ifreq manipulation, i.e., translating in/out
values of the struct, while the linux_ioctl_socket() function is left
as is, it calls sys_ioctl() without touching in/out values.

Due to structures ifreq, sockaddr difference between FreeBSD and Linux
the linux_ioctl_socket_ifreq() calls kern_ioctl() directly, converting
in and out values to FreeBSD and to Linux accordingly.

Finally, modify the ifname_linux_to_bsd() to return error code, not
an unstable reference to the interface.

Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D38794
2023-03-04 12:11:38 +03:00
Dmitry Chagin
9e7f03e9c6 linux(4): Drop unncessary struct l_ifconf declaration from amd64/linux
Its needed only for amd64/linux32 Linuxulator.

Differential Revision:	https://reviews.freebsd.org/D38793
2023-03-04 12:11:38 +03:00
Dmitry Chagin
a927409ce8 linux(4): Rename struct l_ifreq members names to avoid conflicts with FreeBSD
For now we are using mixed names to access struct ifreq members, some
of Linux (ifr_name, ifr_ifindex), others of FreeBSD. To avoid conflicts
switch to use FreeBSD names.

Reviewed by:		jhibbits
Differential Revision:	https://reviews.freebsd.org/D38792
2023-03-04 12:11:38 +03:00
Dmitry Chagin
cabbfb60d0 linux(4): Reduce code duplication between MD files
Move struct ifnet definitions under compat/linux.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D38791
2023-03-04 12:11:38 +03:00
Dmitry Chagin
5d5b633dde linsysfs(4): Refactor to avoid referencing an unstable interfaces
Enter the net epoch when traversing a list of interfaces. For that
split the ifname_linux_to_bsd() function on two counterparts, where
the ifname_linux_to_ifp() intended to use in epoch, while the
ifname_linux_to_bsd() intended to be a self-contained.
Until the linux_ioctl_coket() function is refactored, the
ifname_linux_to_bsd() temporarily returns interface outside
of the net epoch.

Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D38790
2023-03-04 12:11:38 +03:00
Dmitry Chagin
130383f2f1 linux(4): Make linux_ifflags return a value
To simplify the use of the function in the printf-like statements.

Differential Revision:	https://reviews.freebsd.org/D38830
2023-03-04 12:11:38 +03:00
Dmitry Chagin
6c5786fd37 linux(4): Migrate to IfAPI
Migrate linux and linprocfs to use the IfAPI interfaces instead of
direct ifnet accesses.
The code initially writed by jhibbits@, and adapted by me to 3ab3c9c2.

Reviewed by:		jhibbits
Differential Revision:  https://reviews.freebsd.org/D38735
2023-03-04 12:11:38 +03:00
Fidaullah Noonari
290f7f4a09 in_mcat.c: change multicast not member condition
If there is no source filter entry => block if that's SSM ("exclude"
mode per RFC 3678 clause 3).  If there is an entry => check its action &
block if the action is "exclude".

It would be nice if the test case in this PR were converted into an ATF
test case, but not blocking on that.

Reviewed by: imp, melifaro
Pull Request: https://github.com/freebsd/freebsd-src/pull/601
2023-03-03 22:25:17 -07:00
Gleb Smirnoff
7fc82fd1f8 ipfw: garbage collect ip_fw_chk_ptr
It is a relict left from the old times when ipfw(4) was hooked
into IP stack directly, without pfil(9).
2023-03-03 10:30:15 -08:00
Kyle Evans
d2ae03bae2 arm64: disable the physical timer for now if HCR_EL2.E2H is set
On some hardware, we can't clear HCR_EL2.E2H so accesses to the physical
timer hopelessly trap to EL2.  Stash off the value of HCR_EL2 and use it
in has_hyp() to avoid this.

Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D38884
2023-03-03 11:02:34 -06:00
Mark Johnston
577b62c2ba pkgbase: Put termcap.small in the same package as termcap
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D36951
2023-03-03 12:01:22 -05:00
Brooks Davis
c2285a7b09 ng_atmllc: deprecate
With the deprecation of NgATM, ng_atmllc is the last vestage of ATM
support so deprecate it too.

MFC after:	3 days
Relnotes:	yes

Reviewed by:	manu, emaste
Differential Revision:	https://reviews.freebsd.org/D38878
2023-03-03 16:47:36 +00:00
Brooks Davis
211c302f10 NgATM: deprecate
Support for ATM NICs was removed prior to FreeBSD 12.  At the time it
was unclear if this code was still useful without it.  Now the time has
come to finish removing support.

Add DREPRECATION NOTICEs to the manpages and gone_in(14, ...) warnings
in the constructors (or module init for ngatmbase).

MFC after:	3 days
Relnotes:	yes

Reviewed by:	manu, emaste
Differential Revision:	https://reviews.freebsd.org/D38877
2023-03-03 16:47:36 +00:00
Brooks Davis
f0c4b42c60 nanobsd: remove comment about keeping C++ enabled
It's no longer possible to disable C++ so there's no need to comment
on it.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D38883
2023-03-03 16:47:36 +00:00
Mark Johnston
560f9cd5e1 posixshm tests: Correct page size index checks
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks, Inc.
2023-03-03 11:16:51 -05:00
Mark Johnston
831601773e deadlkres: Make parameters settable with tunables
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks, Inc.
2023-03-03 11:16:41 -05:00
Mark Johnston
ad43dd69ce bhyveload: Address compiler warnings and bump WARNS
Mostly sprinkle __unused.  Also duplicate strings passed to addenv() so
that constant string literals can be passed.  No functional change
intended.

Reviewed by:	corvink, rew, jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D38840
2023-03-03 11:13:22 -05:00
Mark Johnston
3f5d875a27 bhyvectl: Address compiler warnings and bump WARNS
Avoid unaligned accesses in cpu_vendor_intel() and address a few other
nits.  No functional change intended.

Reviewed by:	corvink, rew, jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D38839
2023-03-03 11:13:22 -05:00
Alexander V. Chernikov
ce9f95bd83 netlink: fix vlan interface creation
MFC after:	2 weeks
2023-03-03 16:02:05 +00:00
Alexander V. Chernikov
61507ae30b netlink: add u8/u64 attribute fetcher accessors to snl(3).
MFC after:	2 weeks
2023-03-03 14:05:40 +00:00
Ed Maste
4530e0c3e7 bsnmp: Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2023-03-03 08:11:39 -05:00
Mateusz Piotrowski
0ea0a371d2 dtrace_proc.4: Fix the description of pr_sname
MFC after:	2 weeks
Sponsored by:	Klara Inc.
Sponsored by:	ELW – Entsorgungsbetriebe der Landeshauptstadt Wiesbaden
2023-03-03 11:16:45 +01:00
John-Mark Gurney
144661f941
note that some arch independent code can live in dev (e.g. SMBios) 2023-03-03 01:54:07 -08:00
Emmanuel Vadot
5ea96be40b src.conf.5: Regen after switching to WITHOUT_ATM
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38846
2023-03-03 08:52:41 +01:00
Emmanuel Vadot
66a175980e Add description for WITH_ATM
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38845
2023-03-03 08:52:39 +01:00
Emmanuel Vadot
d43812b173 Disable ATM programs by default
ATM is an old technology, remove build of related programs by default

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38844
Reviewed by:	brooks, imp, emaste
2023-03-03 08:52:35 +01:00
Ihor Antonov
f907027b49 daemon: set supervise_enabled during argument processing
Now when supervsion mode has it's own variable there is really no
reason to set it separately from the rest of the variables. Move
initialization of supervise_enabled var to the argument processing
switch loop, where it belongs.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:02 -06:00
Ihor Antonov
e781739084 daemon: decouple restart variable
The 'restart' variable was responsible for enablement of restart
behavior and for restart delay. While it may seem convenient it
leads to cluttering the exit/restart logic

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:02 -06:00
Ihor Antonov
d6c398d882 daemon: add braces to while loop
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:02 -06:00
Ihor Antonov
cd1e6e70d0 daemon: simplify if/else chain
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:02 -06:00
Ihor Antonov
bc43a9a715 daemon: change type of listen_child() to C99 bool
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:02 -06:00
Ihor Antonov
75f61ca920 daemon: flatten and simplify fork() logic
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:02 -06:00
Ihor Antonov
39ea4280e4 daemon: style changes
This is not a functional change.
- Clean up whitespace (spaces where there should be tabs)
- Break up lines that are longer than 80

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/672
2023-03-02 23:17:01 -06:00