Commit Graph

21529 Commits

Author SHA1 Message Date
Baptiste Daroussin
a46722b580 ncurses: register formw as usable lib for LIBADD 2021-11-24 11:02:22 +01:00
Mateusz Piotrowski
ee7485bef5 os-release.5: Fix quoting of dots
Dots needs to escaped with \& to be places inside Ql quotes.

MFC after:	3 days
2021-11-23 11:37:03 +01:00
Guangyuan Yang
28ba36c65d bridge(4): Use American spelling of "behavior"
Fixes:		8406182dbe
MFC after:	3 days
Reported by:	Pau Amma <pauamma@gundo.com>
2021-11-21 21:43:56 -05:00
Warner Losh
a8935083b5 devmatch: Allow devmatch_blocklist to be set in kenv too
Add in all the variables set in the kenv variable devmatch_blocklist
too. This allows blocking autoloading from the boot loader.

Sponsored by:		Netflix
Reviewed by:		0mp
Differential Revision:	https://reviews.freebsd.org/D32171
2021-11-21 08:54:45 -07:00
Robert Wing
8981a100e6 mount: retire kernel_vmount()
The last usage of this function was removed in e3b1c847a4.

There are no in-tree consumers of kernel_vmount().

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D32607
2021-11-20 10:22:28 -09:00
Kristof Provost
5dd9d0605a if_stf: minor man page improvements
- fix typo (router -> routers)
- Remove 6bone reference, because that was phased out in 2006.

Suggested by:	Pau Amma <pauamma@gundo.com>
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D33046
2021-11-20 19:29:02 +01:00
Kristof Provost
3f7b9525ea if_stf: document 6rd in the man page
PR:		253328
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D33042
2021-11-20 19:29:02 +01:00
betterentley
f7c32ed617 Fix 'take effect' spelling in menus and comments.
Signed-off-by: John Bentley <johnbentley.public@gmail.com>
Pull Request: https://github.com/freebsd/freebsd-src/pull/559
2021-11-18 23:22:12 -07:00
Elyes HAOUAS
9097ac9af4 Fix typo on "Celsius"
"Celcius" --> "Celsius"

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Pull Request: https://github.com/freebsd/freebsd-src/pull/551/files
2021-11-18 23:05:32 -07:00
Warner Losh
a721ac948e Document that 13.x is the end of the line for FreeBSD/mips
MFC After:		3 days
Sponsored by:		Netflix
Reviewed by:	brooks, jhb, emaste
Differential Revision:	https://reviews.freebsd.org/D32852
2021-11-18 21:22:55 -07:00
Mateusz Piotrowski
1ac5586c6d style.Makefile.5: Do not require $FreeBSD$ SCM IDs
It's no longer required to have those SCM IDs at the start of makefiles.

MFC after:	3 days
2021-11-18 22:03:05 +01:00
Rick Macklem
9dae2d03bc rc.conf.5: Add entries for NFS
Entries for a few recently defined rc variables
were missing from rc.conf.5.  This patch adds
those.

It was not obvious to me what the ordering is,
so I added them to the area where other nfsd
related variables are.  I can easily move them.

I also replaced "are" with "is", since it seems to
read better.

This is a content change.

Reviewed by:	debdrup
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D33043
2021-11-18 07:59:34 -08:00
Tom Marcoen
8406182dbe bridge(4): Fix spelling
PR:		237725
MFC after:	3 days
2021-11-17 12:52:30 -05:00
Mark Johnston
a2665158d0 vm_page: Remove vm_page_sbusy() and vm_page_xbusy()
They are unused today and cannot be safely used in the face of unlocked
lookup, in which pages may be busied without the object lock held.

Obtained from:	jeff (object_concurrency patches)
Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D32948
2021-11-15 13:01:30 -05:00
Mark Johnston
87b646630c vm_page: Consolidate page busy sleep mechanisms
- Modify vm_page_busy_sleep() and vm_page_busy_sleep_unlocked() to take
  a VM_ALLOC_* flag indicating whether to sleep on shared-busy, and fix
  up callers.
- Modify vm_page_busy_sleep() to return a status indicating whether the
  object lock was dropped, and fix up callers.
- Convert callers of vm_page_sleep_if_busy() to use vm_page_busy_sleep()
  instead.
- Remove vm_page_sleep_if_(x)busy().

No functional change intended.

Obtained from:	jeff (object_concurrency patches)
Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D32947
2021-11-15 13:01:30 -05:00
Greg V
9e9c651cac cddl: fix missing ZFS library dependencies
In 9fae47666 zfsd got a libspl dependency to avoid undefined references.
However that workaround did not help external consumers of libzfs_core.

Fix all missing dependencies lld 13 and the rtld complain about.

Reviewed by:	freqlabs, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D32521
2021-11-15 09:42:07 -05:00
Ian Lepore
44aae623ab Add ETHER_ALIGN support to ng_device(4).
This adds a new ng_device command, NGM_DEVICE_ETHERALIGN, which has no
associated args.  After the command arrives, the device begins adjusting all
packets sent out its hook to have ETHER_ALIGN bytes of padding at the
beginning of the packet.  The ETHER_ALIGN padding is added only when
running on an architecture that requires strict alignment of IP headers
(based on the __NO_STRICT_ALIGNMENT macro, which is only #define'd on
x86 as of this writing).

This also adds ascii <-> binary command translation to ng_device, both for
the existing NGM_DEVICE_GET_DEVNAME and the new ETHERALIGN command.

This also gives a name to every ng_device node when it is constructed, using
the cdev device name (ngd0, ngd1, etc).  This makes it easier to address
command msgs to the device using ngctl(8).

Reviewed by:	donner, ray, adrian
Differential Revision:	https://reviews.freebsd.org/D32905
MFC after:   1 week
2021-11-14 13:37:41 +01:00
Andriy Gapon
c0525ab1d1 pca954x: driver for PCA954x / TCA954x I2C switches
At the moment only PCA9548A is supported and has been tested.

MFC after:	2 weeks
2021-11-13 11:27:41 +02:00
Gleb Smirnoff
1817be481b Add net.inet6.ip6.source_address_validation
Drop packets arriving from the network that have our source IPv6
address.  If maliciously crafted they can create evil effects
like an RST exchange between two of our listening TCP ports.
Such packets just can't be legitimate.  Enable the tunable
by default.  Long time due for a modern Internet host.

Reviewed by:		melifaro, donner, kp
Differential revision:	https://reviews.freebsd.org/D32915
2021-11-12 09:01:40 -08:00
Gleb Smirnoff
2ce85919bb Add net.inet.ip.source_address_validation
Drop packets arriving from the network that have our source IP
address.  If maliciously crafted they can create evil effects
like an RST exchange between two of our listening TCP ports.
Such packets just can't be legitimate.  Enable the tunable
by default.  Long time due for a modern Internet host.

Reviewed by:		donner, melifaro
Differential revision:	https://reviews.freebsd.org/D32914
2021-11-12 09:00:33 -08:00
Gleb Smirnoff
94df3271d6 Rename net.inet.ip.check_interface to rfc1122_strong_es and document it.
This very questionable feature was enabled in FreeBSD for a very short
time.  It was disabled very soon upon merging to RELENG_4 - 23d7f14119.
And in HEAD was also disabled pretty soon - 4bc37f9836.

The tunable has very vague name. Check interface for what? Given that
it was never documented and almost never enabled, I think it is fine
to rename it together with documenting it.

Also, count packets dropped by this tunable as ips_badaddr, otherwise
they fall down to ips_cantforward counter, which is misleading, as
packet was not supposed to be forwarded, it was destined locally.

Reviewed by:		donner, kp
Differential revision:	https://reviews.freebsd.org/D32912
2021-11-12 08:57:06 -08:00
Sergey A. Osokin
b39a93b18e ktls.4: fix openssl-devel port name
PR:	259630
2021-11-12 09:31:48 -05:00
Mark Johnston
811d05449b vm_page_alloc.9: Document VM_ALLOC_NORECLAIM
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2021-11-11 14:52:00 -05:00
Randall Stewart
b8d60729de tcp: Congestion control cleanup.
NOTE: HEADS UP read the note below if your kernel config is not including GENERIC!!

This patch does a bit of cleanup on TCP congestion control modules. There were some rather
interesting surprises that one could get i.e. where you use a socket option to change
from one CC (say cc_cubic) to another CC (say cc_vegas) and you could in theory get
a memory failure and end up on cc_newreno. This is not what one would expect. The
new code fixes this by requiring a cc_data_sz() function so we can malloc with M_WAITOK
and pass in to the init function preallocated memory. The CC init is expected in this
case *not* to fail but if it does and a module does break the
"no fail with memory given" contract we do fall back to the CC that was in place at the time.

This also fixes up a set of common newreno utilities that can be shared amongst other
CC modules instead of the other CC modules reaching into newreno and executing
what they think is a "common and understood" function. Lets put these functions in
cc.c and that way we have a common place that is easily findable by future developers or
bug fixers. This also allows newreno to evolve and grow support for its features i.e. ABE
and HYSTART++ without having to dance through hoops for other CC modules, instead
both newreno and the other modules just call into the common functions if they desire
that behavior or roll there own if that makes more sense.

Note: This commit changes the kernel configuration!! If you are not using GENERIC in
some form you must add a CC module option (one of CC_NEWRENO, CC_VEGAS, CC_CUBIC,
CC_CDG, CC_CHD, CC_DCTCP, CC_HTCP, CC_HD). You can have more than one defined
as well if you desire. Note that if you create a kernel configuration that does not
define a congestion control module and includes INET or INET6 the kernel compile will
break. Also you need to define a default, generic adds 'options CC_DEFAULT=\"newreno\"
but you can specify any string that represents the name of the CC module (same names
that show up in the CC module list under net.inet.tcp.cc). If you fail to add the
options CC_DEFAULT in your kernel configuration the kernel build will also break.

Reviewed by: Michael Tuexen
Sponsored by: Netflix Inc.
RELNOTES:YES
Differential Revision: https://reviews.freebsd.org/D32693
2021-11-11 06:28:18 -05:00
Felix Johnson
c5e0492ae8 module(9): Document that evhand can be NULL
PR:		192250
MFC after:	3 days
Reported by:	ngie
2021-11-11 01:32:54 -05:00
Navdeep Parhar
f6a2e1100f cxgbe(4): separate sysctls for user-requested and in-use FEC.
Recent firmwares have more leeway in FEC selection and there is a need
to track the FECs requested by the driver separately from the FEC in use
on the link. The existing dev.<port>.<inst>.fec sysctl can read both but
its behavior depends on the link state and it is sometimes hard to find
out what was requested when the link is up.

Split the fec sysctl into two (requested_fec and link_fec) to get access
to both pieces of information regardless of the link state.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2021-11-10 15:04:37 -08:00
Rick Macklem
b2bf1a5787 VOP_ALLOCATE: Update man page for Commit f0c9847a6c
Commit f0c9847a6c added the ioflag and cred arguments to
VOP_ALLOCATE() for NFSv4.2 server support. This patch updates
the man page for these arguments.

Reviewed by:	khng, gbe
Differential Revision:	https://reviews.freebsd.org/D32898
2021-11-09 15:13:15 -08:00
Rene Ladan
0752d078df share/misc: update portmgr membership
After five years of service, adamw steps down from portmgr.
Also please welcome tcberner to portmgr.
2021-11-09 21:25:14 +01:00
Mike Karels
12bd931d8c man pages: deprecate Internet Class A/B/C
Mark functions inet_netof(), inet_lnaof(), and inet_makeaddr() as
deprecated, as they assume Class A/B/C.  inet_makeaddr() mostly works
when networks are a multiple of 8 bits, but warn for anything other
than historical classes.  Reduce other mentions of network classes.

MFC after:	1 month
Reviewed by:	bcr, #manpages
Differential Revision: https://reviews.freebsd.org/D32711
2021-11-09 09:33:23 -06:00
Dries Michiels
ecf58c066c Complete steps 5 and 9 for new committers (driesm)
Reviewed by: 0mp (mentor)
Approved by: 0mp (mentor)
Differential Revision: https://reviews.freebsd.org/D32890
2021-11-08 17:19:57 +01:00
Kornel Duleba
197ff4c35b ossl: Add support for AES-CBC cipher
AES-CBC OpenSSL assembly is used underneath.
The glue layer(ossl_aes.c) is based on CHACHA20 implementation.
Contrary to the SHA and CHACHA20, AES OpenSSL assembly logic
does not have a fallback implementation in case CPU doesn't
support required instructions.
Because of that CPU caps are checked during initialization and AES
support is advertised only if available.
The feature is available on all architectures that ossl supports:
i386, amd64, arm64.

The biggest advantage of this patch over existing solutions
(aesni(4) and armv8crypto(4)) is that it supports SHA,
allowing for ETA operations.

Sponsored by:		Stormshield
Obtained from:		Semihalf
Reviewed by:		jhb (previous version)
Differential revision:	https://reviews.freebsd.org/D32099
2021-11-08 10:53:31 +01:00
Andriy Gapon
6354154ef5 pcf8574: driver for 8-pin quasi-bidirectional GPIO over I2C
MFC after:	2 weeks
2021-11-06 19:23:27 +02:00
Andriy Gapon
ff6fe29835 driver for MAX44009 I2C illuminance sensor 2021-11-06 19:19:04 +02:00
Andriy Gapon
a60b304697 pcf8591: driver for adc/dac with i2c interface 2021-11-06 19:14:50 +02:00
Wojciech Macek
200bc58953 Revert "ossl: Add support for AES-CBC cipher"
This reverts commit 849faf4e0b.
2021-11-06 17:46:01 +01:00
Kornel Duleba
849faf4e0b ossl: Add support for AES-CBC cipher
AES-CBC OpenSSL assembly is used underneath.
The glue layer(ossl_aes.c) is based on CHACHA20 implementation.
Contrary to the SHA and CHACHA20, AES OpenSSL assembly logic
does not have a fallback implementation in case CPU doesn't
support required instructions.
Because of that CPU caps are checked during initialization and AES
support is advertised only if available.
The feature is available on all architectures that ossl supports:
i386, amd64, arm64.

The biggest advantage of this patch over existing solutions
(aesni(4) and armv8crypto(4)) is that it supports SHA,
allowing for ETA operations.

Sponsored by:		Stormshield
Obtained from:		Semihalf
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D32099
2021-11-06 09:08:44 +01:00
Warner Losh
15d4459cb2 scsi.4: Document serial numbers
You can wire da, ada and nda device units to serial numbers. sdda cannot
be wired like this because SD and MMC cards lack serial numbers (or at
the very least CAMMMC does not query or retain them).

Sponsored by:		Netflix
Reviewed by:		bcr
Differential Revision:	https://reviews.freebsd.org/D32825
2021-11-05 08:57:05 -06:00
Warner Losh
c688a2eb2f scsi.4: Remove untrue paragraph
Unwired units start with the first avaialble unit that hasn't been
wired, not one greater than the largest wired unit. wired units are
skipped when assigning unwired units a number.

Sponsored by:		Netflix
Reviewed by:		bcr
Differential Revision:	https://reviews.freebsd.org/D32824
2021-11-05 08:56:57 -06:00
Kristof Provost
76c5eecc34 pf: Introduce ridentifier
Allow users to set a number on rules which will be exposed as part of
the pflog header.
The intent behind this is to allow users to correlate rules across
updates (remember that pf rules continue to exist and match existing
states, even if they're removed from the active ruleset) and pflog.

Obtained from:	pfSense
MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D32750
2021-11-05 09:39:56 +01:00
Warner Losh
80f21bb039 vt: fix git mismerge
I made a mistaking in merging the final commits for the devctl changes. This
adds the 'hushed' variable and has the correct dates for the manuals.

Pointy hat to: imp
2021-11-03 16:20:41 -06:00
Warner Losh
cc48eb70d1 vt: fix typo
Notifcation -> Notification
2021-11-03 16:12:55 -06:00
Warner Losh
4ac3d08a96 vt: Add devctl message for bells
Generate VT events when the bell beeps. When coupled with disabling the
bell,this allows custom bells to be rung when we'd otherwise beep.

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D32656
2021-11-03 16:03:51 -06:00
Gleb Smirnoff
3ea9a7cf7b blackhole(4): disable for locally originated TCP/UDP packets
In most cases blackholing for locally originated packets is undesired,
leads to different kind of lags and delays. Provide sysctls to enforce
it, e.g. for debugging purposes.

Reviewed by:		rrs
Differential revision:	https://reviews.freebsd.org/D32718
2021-11-03 13:02:44 -07:00
Edward Tomasz Napierala
e03813c3e1 development(7): Use a more common architecture for examples 2021-11-03 08:59:26 +00:00
Bjoern A. Zeeb
1a8f198fa6 epair: remove "All rights reserved"
Remove "All rights reserved" from The FreeBSD Foundation owned
copyrights on epair code and documentation.

Approved by:	emaste (FreeBSD Foundation)
2021-11-02 16:50:26 +00:00
Lakshman
2fe85640b2 efirt(9): Correct efi_var_set definition in the manpage
PR:		257531
MFC after:	3 days
2021-11-02 03:17:38 -04:00
Ed Maste
5d03c18773 Document my doc commit bit
Prodded by:	ygy
2021-11-01 21:04:55 -04:00
Michael Zhilin
9400fe9cf8 Add entry in rtwn_usb(4) for TP-Link Archer T2U Plus
This is missing documentation change of D24142.

Submitted by: kjopek@gmail.com
Reviewed by: gbe
Differential Revision: https://reviews.freebsd.org/D25114
2021-11-01 22:39:50 +03:00
Ed Maste
0ab89d72aa src.conf.5: regen for WITH_ASAN and WITH_UBSAN descriptions 2021-11-01 10:48:56 -04:00
Ed Maste
ac56b22f44 src.conf.5: regen
Pick up changes in option dependencies (WITHOUT_OPENSSL and WITHOUT_CXX)
and the addition of WITH_DETECT_TZ_CHANGES and WITH_LLVM_BINUTILS.

Sponsored by:	The FreeBSD Foundation
2021-11-01 09:08:44 -04:00
Ed Maste
0e1c864898 src.opts.mk: Add WITHOUT_CXX dependencies
OFED, OPENMP, and PMC depend on C++ support.  Force them off when
building WITHOUT_CXX.

Reported by:	Michael Dexter, Build Option Survey
Reviewed by:	imp, jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32730
2021-10-29 10:06:27 -04:00
Ed Maste
6940d0e470 Force WITHOUT_OPENSSL_KTLS off when WITHOUT_OPENSSL
Discussed with:	jhb
MFC after:	1 week
Reported by:	Michael Dexter, Build Option Survey
Sponsored by:	The FreeBSD Foundation
2021-10-28 19:04:14 -04:00
Ed Maste
48cb3fee25 Retire obsolete iscsi_initiator(4)
The new iSCSI initiator iscsi(4) was introduced with FreeBSD 10.0, and
the old intiator was marked obsolete shortly thereafter (in commit
d32789d95c, MFC'd to stable/10 in ba54910169).  Remove it now.

Reviewed by:	jhb, mav
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32673
2021-10-26 16:17:35 -04:00
Ed Maste
7b1e19ad78 Add libfido2 to the build
From https://github.com/Yubico/libfido2:

    libfido2 provides library functionality and command-line tools to
    communicate with a FIDO device over USB, and to verify attestation
    and assertion signatures.

    libfido2 supports the FIDO U2F (CTAP 1) and FIDO 2.0 (CTAP 2)
    protocols.

libfido2 will be used by ssh to support FIDO/U2F keys. It is currently
intended only for use by ssh, and so is installed as a PRIVATELIB and is
placed in the ssh pkgbase package.

This is currently disabled for the 32-bit library build as libfido2 is
not compatible with the COMPAT_32BIT hack in usb_ioctl.h.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32448
2021-10-22 19:57:57 -04:00
Gleb Smirnoff
6aae3517ed Retire synchronous PPP kernel driver sppp(4).
The last two drivers that required sppp are cp(4) and ce(4).

These devices are still produced and can be purchased
at Cronyx <http://cronyx.ru/hardware/wan.html>.

Since Roman Kurakin <rik@FreeBSD.org> has quit them, they no
longer support FreeBSD officially.  Later they have dropped
support for Linux drivers to.  As of mid-2020 they don't even
have a developer to maintain their Windows driver.  However,
their support verbally told me that they could provide aid to
a FreeBSD developer with documentaion in case if there appears
a new customer for their devices.

These drivers have a feature to not use sppp(4) and create an
interface, but instead expose the device as netgraph(4) node.
Then, you can attach ng_ppp(4) with help of ports/net/mpd5 on
top of the node and get your synchronous PPP.  Alternatively
you can attach ng_frame_relay(4) or ng_cisco(4) for HDLC.
Actually, last time I used cp(4) back in 2004, using netgraph(4)
instead of sppp(4) was already the right way to do.

Thus, remove the sppp(4) related part of the drivers and enable
by default the negraph(4) part.  Further maintenance of these
drivers in the tree shouldn't be a big deal.

While doing that, remove some cruft and enable cp(4) compilation
on amd64.  The ce(4) for some unknown reason marks its internal
DDK functions with __attribute__ fastcall, which most likely is
safe to remove, but without hardware I'm not going to do that, so
ce(4) remains i386-only.

Reviewed by:		emaste, imp, donner
Differential Revision:	https://reviews.freebsd.org/D32590
See also:		https://reviews.freebsd.org/D23928
2021-10-22 11:41:36 -07:00
Li-Wen Hsu
73f8667ed4
Document my doc commit bit history
Reminded by:	ygy
2021-10-22 11:54:06 +08:00
Colin Percival
6fa58bfb3e uefi(8): loader.efi does not search for loader.efi
This man page formerly referred to boot1.efi searching for loader.efi;
when boot1.efi was obsoleted in favour of having loader.efi launched
directly, this was left claiming that loader.efi searched for
loader.efi.

Reviewed by:	bcran
Fixes:		db8b561345 Rework UEFI ESP generation
Differential Revision:	https://reviews.freebsd.org/D32334
2021-10-21 13:17:33 -07:00
Guangyuan Yang
d677560dd0 arswitch(4): Hook new manpage to build
PR:		211668
Fixes:		262717e270
Reported by:	jhb
2021-10-21 15:23:48 -04:00
Baptiste Daroussin
f3aad18d5e sh(1): fix home/del key on mobaxterm env
For $reason mobaxterm default on sending unusual sequence from home/del
key, which makes libedit unabel to catch them and bind them correctly.

mobaxterm seems popular on the windows environment, so add proper
keybinding to default shrc configuration so it works out of box.

Reported by:	lme
2021-10-20 14:00:20 +02:00
Baptiste Daroussin
5fe9737348 skel: update .shrc as well
Somehow we end up having 2 definition of the same .shrc in the source
tree, both of them should have been updated.

A batter fix would be to only keep one copy of the same file. but that
would be for another commit

Reported by:	lme
2021-10-20 11:23:13 +02:00
Felix Johnson
262717e270 arswitch(4): Add new manpage
PR:		211668
Reported by:	O. Hartmann <ohartmann@walstatt.org>
Reviewed by:	adrian, debdrup, imp
Differential Revision:	https://reviews.freebsd.org/D32476
2021-10-19 23:35:04 -04:00
Mark Johnston
6d3c78d970 Rewrite the vm_page_alloc manual page
Document the new allocator variants and flesh out the description of
some details of the page allocator interface.

Reviewed by:	kib, alc
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32035
2021-10-19 21:22:56 -04:00
Mark Johnston
51425cb210 bitset: Reimplement BIT_FOREACH_IS(SET|CLR)
Eliminate the nested loops and re-implement following a suggestion from
rlibby.

Add some simple regression tests.

Reviewed by:	rlibby, kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32472
2021-10-18 09:56:58 -04:00
Edward Tomasz Napierala
70774c637b procfs: Document as deprecated
Update the procfs(5) man page to clarify that it's deprecated.

Reviewed By:	bcr, 0mp (earlier version)
Sponsored By:	EPSRC
Differential Revision: https://reviews.freebsd.org/D22275
2021-10-17 13:46:00 +01:00
Ed Maste
2e85df652c Add libcbor to the build
From https://github.com/PJK/libcbor:

    libcbor is a C library for parsing and generating CBOR, the general-
    purpose schema-less binary data format.

libcbor will be used by ssh to support FIDO/U2F keys.  It is currently
intended only for use by ssh, and so is installed as a PRIVATELIB and is
placed in the ssh pkgbase package.

cbor_export.h and configuration.h were generated by the upstream CMake
build.  We could create them with bmake rules instead (as NetBSD has
done) but this is a fine start.

This is currently disabled for the 32-bit library build as libfido2 is
not compatible with the COMPAT_32BIT hack in usb_ioctl.h, and there is
no need for libcbor without libfido2.

Reviewed by:	kevans
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32347
2021-10-15 15:10:24 -04:00
Felix Johnson
a524aaf683 bpf(4): Fix a misnamed constant
rarpd.c was modified in r19859 to use REVARP_REQUEST instead of
ARPOP_REVREQUEST.

PR:		183333
MFC after:	3 days
Reported by:	pluknet <pluknet@gmail.com>
2021-10-13 19:03:18 -04:00
Felix Johnson
6882064d0c acpi(4): Correct outdated sysctl
This changes the location of cx_supported sysctl to dev.cpu.N.

PR:		214370
MFC after:	3 days
2021-10-12 20:47:03 -04:00
Felix Johnson
df7d763849 pthread_np.3: Add a manpage summarizing all of the pthread extensions.
PR:		197299
MFC after:	1 week
2021-10-12 13:20:36 -07:00
Kyle Evans
08580603b5 kqueue(9): correct spelling of kn_fop 2021-10-12 02:44:09 -05:00
Mateusz Guzik
2b68eb8e1d vfs: remove thread argument from VOP_STAT
and fo_stat.
2021-10-11 13:22:32 +00:00
Baptiste Daroussin
9294a2c719 ncurses: convert libncursesw.a into a static ldscript
Introduce the notion of static linker scripts to allow libncursesw.a to
track its dependency on libtinfow.a

this allows the build of older freebsd source tree to happen and make
static linking in part with dynamic linking which already provides a
ldscript

This fixes a bootstrapping FreeBSD 12 or 13 on recent FreeBSD 14

Reviewed by:		imp
Differential Revision:	https://reviews.freebsd.org/D32435
2021-10-10 07:51:00 +02:00
Warner Losh
15575aca87 bsd.cpu.mk: Minor formatting for armv6 vs armv7
Separate out the arch/cpu options for armv6 from the armv7 ones. This is
less confusing.

Sponsored by:		Netflix
2021-10-08 15:44:46 -06:00
Konstantin Belousov
b5cadc643e Make core dump writes interruptible with SIGKILL
This can be disabled by sysctl kern.core_dump_can_intr

Reported and tested by:	pho
Reviewed by:	imp, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32313
2021-10-08 03:21:43 +03:00
Konstantin Belousov
2ec505d2b8 core(5): explicitly mention the core file size limit name
Reviewed by:	imp, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32313
2021-10-08 03:21:43 +03:00
John Baldwin
42dcd39528 crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes.
This is useful for WireGuard which uses a nonce of 8 bytes rather
than the 12 bytes used for IPsec and TLS.

Note that this also fixes a (should be) harmless bug in ossl(4) where
the counter was incorrectly treated as a 64-bit counter instead of a
32-bit counter in terms of wrapping when using a 12 byte nonce.
However, this required a single message (TLS record) longer than 64 *
(2^32 - 1) bytes (about 256 GB) to trigger.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32122
2021-10-06 14:08:49 -07:00
John Baldwin
ae18720d27 crypto: Support multiple nonce lengths for AES-CCM.
Permit nonces of lengths 7 through 13 in the OCF framework and the
cryptosoft driver.  A helper function (ccm_max_payload_length) can be
used in OCF drivers to reject CCM requests which are too large for the
specified nonce length.

Reviewed by:	sef
Sponsored by:	Chelsio Communications, The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32111
2021-10-06 14:08:47 -07:00
John Baldwin
16676123fc cryptodev: Permit explicit IV/nonce and MAC/tag lengths.
Add 'ivlen' and 'maclen' fields to the structure used for CIOGSESSION2
to specify the explicit IV/nonce and MAC/tag lengths for crypto
sessions.  If these fields are zero, the default lengths are used.

This permits selecting an alternate nonce length for AEAD ciphers such
as AES-CCM which support multiple nonce leengths.  It also supports
truncated MACs as input to AEAD or ETA requests.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32107
2021-10-06 14:08:46 -07:00
Tom Hukins
70ffa69e1b Remove obsolete amd(8) rc.conf configuration
The script that used these was removed in 13f7dbe822 along with amd
itself.

Fixes:		13f7dbe822 ("retire amd(8)")
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/548
2021-10-05 17:16:58 -04:00
Konstantin Belousov
be6116fdfc pthread_mutexattr(3): document each pthread_mutexattr_set/get* function
The descriptions may be more elaborated of course, but this is a good
step at starting providing any useful information in our man page, at all.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D32243
2021-10-05 06:39:53 +03:00
Konstantin Belousov
6bda192013 pthread_mutexattr(3): install pthread_mutexattr_get/setpshared links
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D32243
2021-10-05 06:39:52 +03:00
Konstantin Belousov
0a6e5fc29b pthread_mutexattr(3): document pthread_mutexattr_set/getpshared
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D32243
2021-10-05 06:39:52 +03:00
Konstantin Belousov
9f3b6cdbe8 pthread_mutexattr(3): use .Fo/.Fc to avoid too long lines
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D32243
2021-10-05 06:39:52 +03:00
Baptiste Daroussin
cbc83e378a ncurses: chase dependency changes in the source tree
Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:24 +02:00
Baptiste Daroussin
396851c20a ncurses: split libtinfo from libncurses
many external program expects libncurses to not be provided as a single
library. Instead of fixing all ports, distribute ncurses the way
upstream distributes it

Turn libncursesw.so into a ldscript which will link automatically as
needed to libtinfow so so this change is seamless at compile time.

Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:21 +02:00
Warner Losh
4b3da659bf nvme: Only reset once on attach.
The FreeBSD nvme driver has reset the nvme controller twice on attach to
address a theoretical issue assuring the hardware is in a known
state. However, exierence has shown the second reset is unnecessary and
increases the time to boot. Eliminate the second reset. Should there be
a situation when you need a second reset (for buggy or at least somewhat
out of the mainstream hardware), the hardware option NVME_2X_RESET will
restore the old behavior. Document this in nvme(4).

If there's any trouble at all with this, I'll add a sysctl tunable to
control it.

Sponsored by:		Netflix
Reviewed by:		cperciva, mav
Differential Revision:	https://reviews.freebsd.org/D32241
2021-10-01 11:09:34 -06:00
Kyle Evans
6a7647eccd jail(3lua): add a jail.list() method
This is implemented as an iterator, reusing parts of the earlier logic
to populate jailparams from a passed in table.

The user may request any number of parameters to pull in while we're
searching, but we'll force jid and name to appear at a minimum.

Reviewed by:	freqlabs
Differential Revision:	https://reviews.freebsd.org/D26756
2021-09-30 16:30:57 -05:00
Warner Losh
79a100e28e bluetooth: complete removal of ng_h4
The ng_h4 module was disconnected 13 years ago when the tty later was
locked by Ed. It completely fails to compile, and has a number of false
positives for Giant use. Remove it for lack of interest. Bluetooth has
largely (completely?) moved on from bluetooth over UART transport.

OK'd by:		emax
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D31846
2021-09-29 20:00:02 -06:00
Kristof Provost
20f015f08d pf.conf: document syncookies
Reviewed by:	bcr
Obtained from:	OpenBSD
MFC after:	1 week
Sponsored by:	Modirum MDPay
Differential Revision:	https://reviews.freebsd.org/D32137
2021-09-29 15:41:49 +02:00
Ed Maste
543df60907 mgb: Connect if_mgb module to the build
It supports the following Microchip devices:

LAN7430 PCIe Gigabit Ethernet controller with PHY
LAN7431 PCIe Gigabit Ethernet controller with RGMII interface

The driver has a number of caveats and limitations, but is functional.

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2021-09-28 21:16:40 -04:00
Ed Maste
667ea7385d mgb: Update man page wrt state of the driver
Be explicit that the driver has caveats and limitations, and remove the
note about not being connected to the build: I plan to connect it soon.
(Also the note serves no real purpose in a man page that is not
installed.)

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2021-09-28 16:28:37 -04:00
Mitchell Horne
800e74955d boot(9): update to match reality
This function was renamed to kern_reboot() in 2010, but the man page has
failed to keep in sync. Bring it up to date on the rename, add the
shutdown hooks to the synopsis, and document the (obvious) fact that
kern_reboot() does not return.

Fix an outdated reference to the old name in kern_reboot(), and leave a
reference to the man page so future readers might find it before any
large changes.

Reviewed by:	imp, markj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32085
2021-09-28 11:36:09 -03:00
Yasuhiro Kimura
77087b11e2 Add myself as ports committer and update mentor/mentee information
It corresponds to the 5th step of the procedure described in section
7.1 of Committer's Guide.

Approved by:	meta (mentor)
Differential Revision:	https://reviews.freebsd.org/D32151
2021-09-27 15:10:47 +09:00
Alexander Motin
c8077ccd70 acpi_cpu: Make device unit numbers match OS CPU IDs.
There are already APIC ID, ACPI ID and OS ID for each CPU.  In perfect
world all of those may match, but at least for SuperMicro server boards
none of them do.  Plus none of them match the CPU devices listing order
by ACPI.  Previous code used the ACPI device listing order to number
cpuX devices.  It looked nice from NewBus perspective, but introduced
4th different set of IDs. Extremely confusing one, since in some places
the device unit numbers were treated as OS CPU IDs (coretemp), but not
in others (sysctl dev.cpu.X.%location).
2021-09-24 21:24:19 -04:00
Kristof Provost
00a7a05bde pf.conf.5: document dummynet support
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31907
2021-09-24 11:41:26 +02:00
Kristof Provost
c8607bf4e7 man dummynet: dummynet can also be used with pf
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31906
2021-09-24 11:41:26 +02:00
Kristof Provost
cc1ce085b8 man dummynet: point to dnctl instead of ipfw
Dummynet configuration is ideally done through dnctl now. While ipfw
still works dnctl is preferred now that dummynet can also be used with
pf.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31902
2021-09-24 11:41:25 +02:00
Baptiste Daroussin
00582fa660 pci_vendors: update to 2021.09.19 2021-09-22 09:36:43 +02:00
Konstantin Belousov
cf0ee8738e Drop cloudabi
According to https://github.com/NuxiNL/cloudlibc:
CloudABI is no longer being maintained. It was an awesome experiment,
but it never got enough traction to be sustainable.

There is no reason to keep it in FreeBSD.

Approved by:	ed (private mail)
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D31923
2021-09-22 00:18:44 +03:00
Mark Johnston
dfd3bde577 bitset(9): Introduce BIT_FOREACH_ISSET and BIT_FOREACH_ISCLR
These allow one to non-destructively iterate over the set or clear bits
in a bitset.  The motivation is that we have several code fragments
which iterate over a CPU set like this:

while ((cpu = CPU_FFS(&cpus)) != 0) {
	cpu--;
	CPU_CLR(cpu, &cpus);
	<do something>;
}

This is slow since CPU_FFS begins the search at the beginning of the
bitset each time.  On amd64 and arm64, CPU sets have size 256, so there
are four limbs in the bitset and we do a lot of unnecessary scanning.

A second problem is that this is destructive, so code which needs to
preserve the original set has to make a copy.  In particular, we have
quite a few functions which take a cpuset_t parameter by value, meaning
that each call has to copy the 32 byte cpuset_t.

The new macros address both problems.

Reviewed by:	cem, kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32028
2021-09-21 12:07:39 -04:00
Bartlomiej Grzesik
3f9a00e3b5 device: add device_get_property and device_has_property
Generialize bus specific property accessors. Those functions allow driver code
to access device specific information.

Currently there is only support for FDT and ACPI buses.

Reviewed by: manu, mw
Sponsored by: Semihalf
Differential revision: https://reviews.freebsd.org/D31597
2021-09-20 17:17:57 +02:00
John Baldwin
93d6fa53c9 Disable -Woverflow errors for i386 for GCC 9.
GCC 9 warns about floating point constants overflowing for i386.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D26201
2021-09-13 11:00:38 -07:00
Dimitry Andric
45feade38e Add -Wno-error=unused-but-set-variable when building with Clang 13+
This warning triggers many times while building world. Downgrade it to a
warning until all occurrences have been fixed. Once the Clang warnings
have been fixed we should be able to turn it on for GCC as well. See
also f4fed768bb which did the same for the
kernel builds.

Reviewed by:	arichardson, imp
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D31927
2021-09-13 18:05:43 +02:00
Edward Tomasz Napierala
ddedf2a11e tzcode: Implement timezone change detection
Implement optional timezone change detection for local time libc
functions.  This is disabled by default; set WITH_DETECT_TZ_CHANGES
to build it.

Reviewed By:	imp
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
X-NetApp-PR:	#47
Differential Revision:	https://reviews.freebsd.org/D30183
2021-09-12 03:07:58 +00:00
Alex Richardson
2d78130185 Add missing dep patterns for .pieo
While adding sanitizer support, I noticed that all other extensions were
handled but .pieo was missing.

Reviewed By:	emaste, imp
MFC after:	1 week

Differential Revision: https://reviews.freebsd.org/D31040
2021-09-13 13:22:31 +01:00
Ed Maste
7c0226cad3 bsd.lib.mk: add conditions for building _pie.a archives
As with other .a targets, build _pie.a archives only if LIB is set.

At present we build _pie.a only for INTERNALLIBs, and none of them
include bsd.lib.mk without setting LIB.  However, we might want to build
_pie.a for non-INTERNALLIBs in the future.

Reviewed by:	arichardson
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31920
2021-09-13 07:52:02 -04:00
Antranig Vartanian
7955efd574 Add support for jail.conf.d
Using /etc/jail.{jailname}.conf is nice, however it makes /etc/ very
messy if you have many jails.  This patch allows one to move these
config files out of the way into /etc/jail.conf.d/{jailname}.conf.

Note that the same caveat as /etc/jail.*.conf applies: the jail service
will not autodiscover all of these for starting 'all' jails.  This is
considered future work, since the behavior matches.

Reviewed by:	kevans
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D24570
2021-09-10 00:30:04 -05:00
Henri Hennebert
9d3bc16382 rtsx: Call taskqueue sooner, adjust DELAY(9) calls, add an inversion heuristic
- Some configurations, e.g. HP EliteBook 840 G3, come with a dummy card
in the card slot which is detected as a valid SD card.  This added long
timeout at boot time.  To alleviate the problem, the default timeout is
reduced to one second during the setup phase. [1]

- Some configurations crash at boot if rtsx(4) is defined in the kernel
config.  At boot time, without a card inserted, the driver found that
a card is present and just after that a "spontaneous" interrupt is
generated showing that no card is present.  To solve this problem,
DELAY(9) is set to one quarter of a second before checking card presence
during driver attach.

- As advised by adrian, taskqueue and DMA are set up sooner during
the driver attach.  A heuristic to try to detect configuration needing
inversion was added.

PR:		255130 [1]
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D30499
2021-09-09 14:26:17 -04:00
Emmanuel Vadot
27a7ae0ce0 pkgbase: Create a syscons-data package
syscons is mostly deprecated and all it's files aren't needed for most
users so create a separate package for them.

Differential Revision:	   https://reviews.freebsd.org/D31798
Reviewed by: emaste
2021-09-07 10:21:40 +02:00
Emmanuel Vadot
88ba5e8955 pkgbase: Create a vt-data package
vt files for either keyboards and fonts are totally optional
so create a separate package for them.

Differential Revision:	     https://reviews.freebsd.org/D31797
2021-09-07 10:21:09 +02:00
Alex Richardson
24f586182f Enable MK_LLVM_BINUTILS if MK_ASAN is requested
ASan will not be able to provide backtraces with symbol names with
elftoolchain's addr2line. To fix this turn MK_LLVM_BINUTILS on by
default when ASan instrumentation is requested.

Reviewed By:	emaste, markj
Differential Revision: https://reviews.freebsd.org/D31061
2021-09-06 10:24:34 +01:00
Alex Richardson
021385aba5 Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain
When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as
ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones.
Having the LLVM binutils instead of the elftoolchain ones allows us to use
features such as LTO that depend on binutils that understand LLVM IR.
Another benefit will be an improved user-experience when compiling with
AddressSanitizer, since ASAN does not symbolize backtraces correctly if
addr2line is elftoolchain addr2line instead of llvm-symbolizer.
See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/000062.html
for more details.

This is currently off by default but will be turned on by default at some
point in the near future.

Reviewed By:	emaste

Differential Revision: https://reviews.freebsd.org/D31060
2021-09-06 09:49:49 +01:00
Alex Richardson
e7e22476d1 Don't default MK_LLVM_TARGET_ALL to yes unless MK_CLANG is requested
When building -DWITH_LLVM_BINUTILS -DWITHOUT_CLANG, this avoids
building a few hundred C++ source files that should not be needed
by default.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D31059
2021-09-06 09:31:25 +01:00
Philip Paeps
71611b0c68 tcp: document TCP Fast Open (RFC 7413) in tcp(4)
Adds documentation for the TCP_FASTOPEN socket option
and related MIB variables to the tcp(4) manual page.

PR:		257907
Reviewed by:	gbe
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D31764
2021-09-03 10:33:12 +08:00
Alexander Motin
4730a8972b callout(9): Allow spin locks use with callout_init_mtx().
Implement lock_spin()/unlock_spin() lock class methods, moving the
assertion to _sleep() instead.  Change assertions in callout(9) to
allow spin locks for both regular and C_DIRECT_EXEC cases. In case of
C_DIRECT_EXEC callouts spin locks are the only locks allowed actually.

As the first use case allow taskqueue_enqueue_timeout() use on fast
task queues.  It actually becomes more efficient due to avoided extra
context switches in callout(9) thanks to C_DIRECT_EXEC.

MFC after:	2 weeks
Reviewed by:	hselasky
Differential Revision:	https://reviews.freebsd.org/D31778
2021-09-02 21:16:46 -04:00
Alexander Motin
7af4475a6e vmd(4): Major driver refactoring
- Re-implement pcib interface to use standard pci bus driver on top of
vmd(4) instead of custom one.
 - Re-implement memory/bus resource allocation to properly handle even
complicated configurations.
 - Re-implement interrupt handling to evenly distribute children's MSI/
MSI-X interrupts between available vmd(4) MSI-X vectors and setup them
to be handled by standard OS mechanisms with minimal overhead, except
sharing when unavoidable.

Successfully tested on Dell XPS 13 laptop with Core i7-1185G7 CPU (VMD
device ID 0x9a0b) and single NVMe SSD, dual-booting with Windows 10.

Successfully tested on Supermicro X11DPI-NT motherboard with Xeon(R)
Gold 6242R CPUs (VMD device ID 0x201d), simultaneously handling NVMe
SSD on one PCIe port and PLX bridge with 3 NVMe and 1 AHCI SSDs on
another.  Handles SSD hot-plug (except Optane 905p for some reason,
which are not detected until manual bus rescan) and enabled IOMMU
(directly connected SSDs work, but ones connected to the PLX fail
without errors from IOMMU).

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
Differential revision:	https://reviews.freebsd.org/D31762
2021-09-02 20:58:02 -04:00
Alan Somers
1fb52e4373 ses: Correct spelling of "Temperature Sensor"
According to SES 4 revision 2 table 71, it should be singular.

MFC after:	2 weeks
Sponsored by:	Axcient
2021-09-02 14:38:06 -06:00
Andrey V. Elsukov
5c8e8e82ae dtrace: fix ipfw_rule_info_t translator
322e5efda8 has changed field names in the struct ip_fw.
Use correct names in ipfw_rule_info_t translator in the ipfw.d script.

Reported by:	Keith White <kwhite uottawa at gmail>
MFC after:	1 week
2021-09-02 16:35:01 +03:00
Ka Ho Ng
483e3cda0c man: A trailing space cleanup in man9's Makefile
Sponsored by:	The FreeBSD Foundation
2021-09-02 21:04:03 +08:00
Artur Rojek
6d1ef2abd3 ena: Implement full RSS reconfiguration
Bind RX/TX queues and MSI-X vectors to matching CPUs based on the RSS
bucket entries.

Introduce sysctls for the following RSS functionality:
- rss.indir_table:      indirection table mapping
- rss.indir_table_size: indirection table size
- rss.key:              RSS hash key (if Toeplitz used)

Said sysctls are only available when compiled without `option RSS`, as
kernel-side RSS support currently doesn't offer RSS reconfiguration.

Migrate the hash algorithm from CRC32 to Toeplitz and change the initial
hash value to 0x0 in order to match the standard Toeplitz implementation.
Provide helpers for hash key inversion required for HW operations.

Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
2021-09-02 01:06:53 +02:00
Piotr Pawel Stefaniak
0939f965d8 Update a sysctl name to nbuffers_pcpu in hwpmc.4 and pmcstat.c
This change was missed in r333509 (e6b475e0af).

Differential Revision:	https://reviews.freebsd.org/D31704
Reviewed by:	mjg
2021-08-29 21:24:50 +02:00
Dimitry Andric
22b8ab15c4 Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13
After llvm/clang 13.0.0, the -simplifycfg-dup-ret backend flag is no
longer supported. This was part of CLANG_OPT_SMALL, which is only still
used for stand/i386/boot2 and stand/i386/isoboot, to achieve the very
small binary size required. Luckily clang 13.0.0 does not need any
additional flags for this (I get 240 bytes available when building
boot2).

MFC after:	3 days
2021-08-29 15:39:16 +02:00
Gordon Bergling
b1603638e3 Fix a common typo in man pages and src comments
- s/desciptor/descriptor/

MFC after:	5 days
2021-08-28 19:24:27 +02:00
Ka Ho Ng
6e1df1d14c pmap_extract.9: Fix pmap_extract_and_hold()'s function type
pmap_extract_and_hold() returns a vm_page_t instead of a physical page
address.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	alc
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D31691
2021-08-27 21:44:16 +08:00
Ka Ho Ng
9e202d036d fspacectl(2): Changes on rmsr.r_offset's minimum value returned
rmsr.r_offset now is set to rqsr.r_offset plus the number of bytes
zeroed before hitting the end-of-file. After this change rmsr.r_offset
no longer contains the EOF when the requested operation range is
completely beyond the end-of-file. Instead in such case rmsr.r_offset is
equal to rqsr.r_offset.  Callers can obtain the number of bytes zeroed
by subtracting rqsr.r_offset from rmsr.r_offset.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D31677
2021-08-26 00:03:37 +08:00
Jessica Clarke
83ec48b792 Revert "Mark LLDB/CLANG_BOOTSTRAP/LLD_BOOTSTRAP as broken on non-FreeBSD for now"
The fixes for this have now been committed so we can re-enable these.

This reverts commit d9f25575a2.

MFC after:	1 week
2021-08-24 15:04:25 +01:00
Jessica Clarke
c8edd05426 clang: Support building with GCC and DEBUG_FILES disabled
If MK_DEBUG_FILES=no then the Clang link rule has clang as .TARGET,
rather than clang.full, causing the implicit ${CFLAGS.${.TARGET:T}} to
be CFLAGS.clang, and thus pull in flags intended for when your compiler
is Clang, not when linking Clang itself. This doesn't matter if your
compiler is in fact Clang, but it breaks using GCC as, for example,
bsd.sys.mk adds -Qunused-arguments to CFLAGS.clang. This is seen when
trying to build a bootstrap toolchain on Linux where GCC is the system
compiler.

Thus, introduce a new internal NO_TARGET_FLAGS variable that is set by
Clang to disable the addition of these implicit flags. This is a bigger
hammer than necessary, as flags for .o files would be safe, but that is
not needed for Clang.

Note that the same problem does not arise for LDFLAGS when building LLD
with BFD, since our build produces a program called ld.lld, not plain
lld (unlike upstream, where ld.lld is a symlink to lld so they can
support multiple different flavours in one binary).

Suggested by:	sjg
Fixes:		31ba4ce889 ("Allow bootstrapping llvm-tblgen on macOS and Linux")
MFC after:	1 week
Reviewed by:	dim, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D31532
2021-08-24 15:04:25 +01:00
Ka Ho Ng
1eaa36523c fspacectl(2): Clarifies the return values
rmacklem@ spotted two things in the system call:
- Upon returning from a successful operation, vop_stddeallocate can
  update rmsr.r_offset to a value greater than file size. This behavior,
  although being harmless, can be confusing.
- The EINVAL return value for rqsr.r_offset + rqsr.r_len > OFF_MAX is
  undocumented.

This commit has the following changes:
- vop_stddeallocate and shm_deallocate to bound the the affected area
  further by the file size.
- The EINVAL case for rqsr.r_offset + rqsr.r_len > OFF_MAX is
  documented.
- The fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9)'s return
  len is explicitly documented the be the value 0, and the return offset
  is restricted to be the smallest of off + len and current file size
  suggested by kib@. This semantic allows callers to interact better
  with potential file size growth after the call.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D31604
2021-08-24 17:08:28 +08:00
Bjoern A. Zeeb
298ee47e19 localedef: unbreak WITHOUT_LOCALES
After 0fa5403d49 ("pkgbase: move locales into their own package") we
need usr.bin/localedef as a bootstrap tool independent on where
WITHOUT_LOCALE was specified as we ALWAYS process C.UTF-8.

At the same time LOCALES= in the local Makefile is empty but
C.UTF-8 with WITHOUT_LOCALES. C.UTF-8 is excluded from FILES, and thus
after the replacement FILES= is set to only .LC_CTYPE which results in
a build failure not knowing how to build that. Tweak the substitution to
replace only non-empty words so that FILES remains harmlessly empty.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D31589
2021-08-19 12:38:17 -05:00
Kristof Provost
a051ca72e2 Introduce m_get3()
Introduce m_get3() which is similar to m_get2(), but can allocate up to
MJUM16BYTES bytes (m_get2() can only allocate up to MJUMPAGESIZE).

This simplifies the bpf improvement in f13da24715.

Suggested by:	glebius
Differential Revision:	https://reviews.freebsd.org/D31455
2021-08-18 08:48:27 +02:00
Piotr Pawel Stefaniak
f49931c142 style.9: remove an outdated comment about indent(1)
indent(1) has had -ncs and -nbs for some time now.
2021-08-17 19:06:24 +02:00
Alex Richardson
d9f25575a2 Mark LLDB/CLANG_BOOTSTRAP/LLD_BOOTSTRAP as broken on non-FreeBSD for now
I enabled these options again in 31ba4ce889,
but unfortunately only my specific build configuration worked whereas the
build with default options is still broken.
2021-08-17 17:44:52 +01:00
Ed Maste
dff1ba09f7 sysctl.9: put negative sense sysctl note in own paragraph
The sysctl man page cautions against negative-sense boolean sysctls
(foobar_disable), but it gets lost at the end of a large paragraph.
Move it to a separate paragraph in an attempt to make it more clear.

This man page could use a more holistic review and edit pass.  This
change is simple and straightforward and I hope provides a small but
immediate benefit.
2021-08-17 12:10:44 -04:00
Ed Maste
d8aeab4b45 Add gone_in(9) man page
Reviewed by:	imp
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30703
2021-08-16 17:23:59 -04:00
Vladimir Kondratyev
14a4d6d013 bitstring(3): Add bitstring traversal macros.
The macro bit_foreach() traverses all set bits in the bitstring in the
forward direction, assigning each location in turn to variable.

The macro bit_foreach_at() traverses all set bits in the bitstring in
the forward direction at or after the zero-based bit index, assigning
each location in turn to variable.

The bit_foreach_unset() and bit_foreach_unset_at() macros which
traverses unset bits are implemented for completeness.

Reviewed by:	asomers, dougm
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D31469
2021-08-16 23:24:05 +03:00
Kyle Evans
239aebee61 domain: give domains a chance to probe for availability
This gives any given domain a chance to indicate that it's not actually
supported on the current system. If dom_probe isn't supplied, we assume
the domain is universally applicable as most of them are. Keeping
fully-initialized and registered domains around that physically can't
work on a large majority of FreeBSD deployments is sub-optimal and leads
to errors that aren't consistent with the reality of why the socket
can't be created (e.g. ESOCKTNOSUPPORT) because such scenario has to be
caught upon pru_attach, at which point kicking back the more-appropriate
EAFNOSUPPORT would seem weird.

The initial consumer of this will be hvsock, which is only available on
HyperV guests.

Reviewed by:	cem (earlier version), bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D25062
2021-08-16 00:59:56 -05:00
Mark Johnston
7e14be0b07 pci: Add an ioctl to perform I/O to BARs
This is useful for bhyve, which otherwise has to use /dev/io to handle
accesses to I/O port BARs when PCI passthrough is in use.

Reviewed by:	imp, kib
Discussed with:	jhb
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31307
2021-08-14 10:59:03 -04:00
Gordon Bergling
a1581cd735 Fix a common typo in source code comments
- s/aligment/alignment/

MFC after:	5 days
2021-08-14 14:17:48 +02:00
Jessica Clarke
cef65082ae bsd.compiler.mk: Fix cross-building from non-FreeBSD
On non-FreeBSD, the various MACHINE variables for the host when
bootstrapping can be missing or not match FreeBSD's naming, causing
bsd.endian.mk to be unable to infer the endianness. Work around this by
assuming it's unsupported.

Note that we can't check BOOTSTRAPPING here as Makefile.inc1 includes
bsd.compiler.mk before that is set, and so we are unable to catch errors
during buildworld itself when cross-building and bsd.endian.mk failed,
but such errors should also show up when building on FreeBSD.

Fixes:	47363e99d3 ("Enable compressed debug on little-endian targets")
2021-08-12 23:45:09 +01:00
Ka Ho Ng
a638dc4ebc vfs: Add ioflag to VOP_DEALLOCATE(9)
The addition of ioflag allows callers passing
IO_SYNC/IO_DATASYNC/IO_DIRECT down to the file system implementation.
The vop_stddeallocate fallback implementation is updated to pass the
ioflag to the file system implementation. vn_deallocate(9) internally is
also changed to pass ioflag to the VOP_DEALLOCATE call.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D31500
2021-08-12 23:03:49 +08:00
Ka Ho Ng
4a9b832a2a vfs: Rename ioflg to ioflag in vn_deallocate
This includes a style fix around ioflag checking as well.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib, bcr
Differential Revision:	https://reviews.freebsd.org/D31505
2021-08-11 17:45:47 +08:00
Daniel Engberg
4f3a0cfbde Add myself (diizzy) as ports committer
Section 7.1 in Committer's Guide

Reviewed by:	tcberner
Approved by:	tcberner
Differential Revision:	<https://reviews.freebsd.org/D31479>
2021-08-11 09:58:17 +02:00
Mark Johnston
ce2609947c kmsan: Add a manual page
Sponsored by:	The FreeBSD Foundation
2021-08-10 21:27:53 -04:00
Mark Johnston
805c3af898 build.7: Describe the default value for LOCAL_MODULES
Suggested by:	jhb
MFC after:	1 week
2021-08-10 21:18:34 -04:00
Mark Johnston
e7a13643b1 build.7: Document LOCAL_MODULES and LOCAL_MODULES_DIR
Reviewed by:	0mp, imp
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31461
2021-08-10 11:43:02 -04:00
Piotr Kubaj
8f642f797a share/man/man7/arch.7: bump date 2021-08-10 17:04:51 +02:00
Piotr Kubaj
ecb3f90dd1 share/man/man7/arch.7: powerpc64 support appeared in 9.0-RELEASE
Differential revision:	https://reviews.freebsd.org/D31013
Approved by:	eadler, 0mp
2021-08-10 16:33:29 +02:00
Alan Somers
518e697f2a [skip ci] unix(4): LOCAL_PEERCRED works on SOCK_SEQPACKET, too.
MFC after:	2 weeks
Reviewed By:	dchagin
Differential Revision: https://reviews.freebsd.org/D31456
2021-08-10 07:31:09 -06:00
Konstantin Belousov
4a5a67fe67 ip(4): Mention IP_IPSEC_POLICY ip-level socket option
Text is literally taken from NetBSD ip(4).

Sponsored by:	NVIDIA Networking
MFC after:	3 days
2021-08-10 03:46:49 +03:00
Mark Johnston
e0cc566035 kasan.9: Note the header required for kasan_mark()
Sponsored by:	The FreeBSD Foundation
2021-08-09 13:27:52 -04:00
Ed Maste
47363e99d3 Enable compressed debug on little-endian targets
Compressed debug was enabled by default in commit c910570e75, but
broke the build on big-endian targets, and so was disabled in
89ed2ecb14.

Older versions of LLD fail with big-endian compressed debug sections.
This was fixed in LLD upstream (commit c6ebc651b6fa) and merged to
FreeBSD main (commit d69d07569e) by dim.

External toolchains (e.g. the llvm12 package) will not yet have the fix.
These may be used to link against base system .a archives, so compressed
debug sections would cause trouble even though the base system is fixed.

Enable compressed debug sections again, for little-endian targets only.
As discussed on freebsd-hackers[1] I expect to undo this in the future
(using compressed debug everywhere), once fixed versions of lld are
widely available.

Note that to be pedantically correct we should check both the compiler
and the linker for compressed debug support, but given the external
toolchain constraint the extra complexity does not seem worthwhile.

[1] https://lists.freebsd.org/archives/freebsd-hackers/2021-August/000188.html

PR:		257638
Reported by:	jrtc27 [impact of .a archives]
Discussed with:	imp
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31454

Revert "Disable compressed debug by default"

This reverts commit 89ed2ecb14.
2021-08-08 13:31:28 -04:00
Ed Maste
b0dafb1b6f src.conf.5: Regen after fe52b7f60e, PROFILE default off 2021-08-07 20:51:44 -04:00
Ed Maste
fe52b7f60e Disable PROFILE option by default
Hardware based profiling (e.g. hwpmc) is much better and produces more
useful results.  Today the profiling lib archives (_p.a) serve no real
purpose other than increasing the library build time.

Both upstream and base system (in commit b762974cf4) Clang have been
modified to remove the special case for linking against these libraries.

Clang's -pg support and mcount() remain, so building with -pg can still
be used on code that the user builds; we just no longer provide prebuilt
libraries compiled with -pg.

Discussed on freebsd-hackers[1] / freebsd-current [2] in 2020 and
freebsd-arch [3] in 2021.  A deprecation notice was added in
commit 175841285e.

[1] https://lists.freebsd.org/pipermail/freebsd-hackers/2020-January/055551.html
[2] https://lists.freebsd.org/pipermail/freebsd-current/2020-January/075105.html
[3] https://lists.freebsd.org/archives/freebsd-arch/2021-June/000016.html

PR:		256873 [exp-run]
Reviewed by:	imp, jhb, kib
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30833
2021-08-07 20:24:36 -04:00
Jessica Clarke
5668a155cb gpio.4: Mention new sifive_gpio driver
Suggested by:	mhorne
MFC after:	1 week
2021-08-07 19:31:34 +01:00
Fernando Apesteguía
e6379a2c95 man: Install more man pages unconditionally
Add more manual pages which were not spotted previously in 0a0f748641

Ideally to be MFH'ed with:

8539518055 - Remove manpages from OLD_FILES
8b487b8292 - Fix bsd.subdir.mk-related issues after 0a0f748641
f6043a6721 - ObsoleteFiles.inc: Remove manpages from OLD_FILES
0a0f748641 - man: Build manpages for all architectures

There is at least one pending issue when building with -DNO_ROOT.

Reported by:    ceri@
MFH:    4 weeks
Discussed with: wosch
Differential Revision: https://reviews.freebsd.org/D31018
2021-08-06 18:34:07 +02:00
Greg V
362fef2f4a bsd.cpu.mk: add support for x86-64-v[234] levels as CPUTYPE
These are supported in LLVM 12 and GCC 11:

https://github.com/llvm/llvm-project/commit/012dd42e027e
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=324bec558e95584e8c1997575ae9d75978af59f1

Differential Revision:	https://reviews.freebsd.org/D29150
2021-08-06 09:33:37 -04:00
Emmanuel Vadot
86c71e97d1 pkgbase: locales: Also tag the files dir
Otherwise bsd.dirs.mk will create the directory with the default
package (utilities) and we end up with a bunch of empty dirs managed
by this package while it shouldn't be the case.
2021-08-06 14:37:45 +02:00
Kyle Evans
b3e87f1334 ctypedef: fix installation of C.UTF-8
The appropriate directory and name were assigned to the FILESDIR
grouping, but not the ALWAYS grouping where C.UTF-8 is actually
assigned. Add the appropriate bits for ALWAYSDIR, and remove an
obsolete *PACKAGE= assignment since C.UTF-8 is explicitly not included
in FILES.

Prior to this change, C.UTF-8 was being installed as
/usr/share/C.UTF-8.LC_CTYPE.

Reviewed by:	manu
Fixes:	0fa5403d49 ("pkgbase: move locales into their own package")
Differential Revision:	https://reviews.freebsd.org/D31429
2021-08-05 22:31:40 -05:00
Kyle Evans
645b46d379 pkgbase: fix locale packages
Most places spelled it -locales, but numericdef spelled it as -locale
in just this one place. Pluralize it.

Reviewed by:	emaste, manu
Fixes:	0fa5403d49 ("pkgbase: move locales into their own package")
Differential Revision:	https://reviews.freebsd.org/D31428
2021-08-05 22:31:40 -05:00
Ka Ho Ng
0dc332bff2 Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9).
fspacectl(2) is a system call to provide space management support to
userspace applications. VOP_DEALLOCATE(9) is a VOP call to perform the
deallocation. vn_deallocate(9) is a public KPI for kmods' use.

The purpose of proposing a new system call, a KPI and a VOP call is to
allow bhyve or other hypervisor monitors to emulate the behavior of SCSI
UNMAP/NVMe DEALLOCATE on a plain file.

fspacectl(2) comprises of cmd and flags parameters to specify the
space management operation to be performed. Currently cmd has to be
SPACECTL_DEALLOC, and flags has to be 0.

fo_fspacectl is added to fileops.
VOP_DEALLOCATE(9) is added as a new VOP call. A trivial implementation
of VOP_DEALLOCATE(9) is provided.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D28347
2021-08-05 23:20:42 +08:00
Ka Ho Ng
de2e152959 Add vnode_pager_purge_range(9) KPI
This KPI is created in addition to the existing vnode_pager_setsize(9)
KPI. The KPI is intended for file systems that are able to turn a range
of file into sparse range, also known as hole-punching.

Sponsored by:	The FreeBSD Foundation
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D27194
2021-08-05 22:52:26 +08:00
Ed Maste
89ed2ecb14 Disable compressed debug by default
In c910570e75 I enabled compressed debug sections, but it broke mips
and powerpc.  Disable it for now.

Reported by:	jenkins, manu
Sponsored by:	The FreeBSD Foundation
2021-08-05 08:36:00 -04:00
Ed Maste
c910570e75 Use compressed debug in standalone userland debug files by default
The compiler supports CFLAGS=-gz=zlib to compress .debug sections in
object files, libraries, and binaries.  Enable it to reduce disk usage
for standalone debug files (and /usr/obj).

Reviewed by:	dim, kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29002
2021-08-04 16:08:40 -04:00
Ed Maste
62174eaf46 Install ipmi man page also on arm64
Fixes:		40d0971bbe ("arm64: enable build of the ipmi module")
Sponsored by:	The FreeBSD Foundation
2021-08-04 15:04:24 -04:00
Mitchell Horne
1b8db4b4e3 arm: enable stack-smashing protection
With current generation clang/llvm it can pass all of our tests in
libc/ssp.

While here, remove the extra MACHINE_CPUARCH check for mips. SSP is
included in BROKEN_OPTIONS for this architecture in src.opts.mk, which
is enough to ensure normal builds won't set SSP_CFLAGS.

Reviewed by:	kevans, imp, emaste
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D31400
2021-08-04 15:23:22 -03:00
Goran Mekić
21d8546588 sound: Add an example of basic sound application
This is an example demonstrating the usage of the OSS-compatible APIs
provided by the sound(4) subsystem. It reads frames from a dsp node and
writes them to the same dsp node.

MFC after:	2 weeks
Reviewed by:	hselasky, bcr
Differential revision:	https://reviews.freebsd.org/D30149
2021-08-04 18:11:54 +08:00
Baptiste Daroussin
0fa5403d49 pkgbase: move locales into their own package
The only exception here being C.UTF-8 as this is the default
locales so it needs to always be installed

Reviewed by:	pkgbase (emaste)
Differential Revision:	https://reviews.freebsd.org/D31397
2021-08-03 18:35:26 +02:00
Baptiste Daroussin
30e1773fde locales: fix abuse of bsd.dirs.mk
the way SAMEDIRS was defined was an abuse of bsd.dirs.mk resulting in
all the directory to be created in one single command, but DESTDIR is
only prepend once on the first element of the list

Switch to the properway to use bsd.dirs.mk
2021-08-03 18:02:15 +02:00
Baptiste Daroussin
8232bb3859 locales: fix typo preventing installation of collation for ru_RU.CP866 2021-08-03 14:37:26 +02:00
Baptiste Daroussin
184d64af13 locales: stop hardcoding the directories in the mtree
The framework knows how to create directories and tag them properly
for a the creation of a mtree, not need to hardcode all the locales
entries in bsd.usr.mk

This simplifies addition of new locales but also allow people building
with WITHOUT_LOCALES to end up with a directory full of empty files
2021-08-03 14:25:00 +02:00
Baptiste Daroussin
d3fd2cbbb7 nl_NL.ISO8859-1: reinstall the missing LC_MESSAGES 2021-08-03 12:13:52 +02:00
Marcin Wojtas
451bcf1b36 Introduce driver for Freescale Felix switch
It is found on boards equipped with LS1028A SoC.
802.1q VLAN grouping is supported.
An external MDIO device is used for communicating with PHYs.
The driver is built as a module by default, it is not included
in GENERIC kernel config.

Submitted by: Lukasz Hajec <lha@semihalf.com>
              Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30923
2021-08-03 12:07:49 +02:00
Alex Richardson
428a32edba Use .sinclude for bsd.sanitizer.mk
We don't install this file since MK_ASAN/MK_UBSAN is only supported for
src builds. However, some ports also use bsd.lib.mk/bsd.prog.mk so we
should not fail the build if it can't be included.

Reported by:	jkim
Fixes:		7bc797e3f3 ("Add build system support for ASAN+UBSAN instrumentation")
2021-08-03 10:38:20 +01:00
Adam Fenn
6162cf885c malloc(9): Document/complete aligned variants
Comments on a pending kvmclock driver suggested adding a
malloc_aligned() to complement malloc_domainset_aligned(); add it now,
and document both.

Reviewed by:	imp, kib, allanjude (manpages)
Differential Revision:	https://reviews.freebsd.org/D31004
2021-08-02 15:36:14 -05:00
Alex Richardson
17d6371e4c Fix GCC and -DWITH_CLEAN build after 7bc797e3f3
Reported by:	kib
2021-08-02 16:03:05 +01:00
Alex Richardson
31ba4ce889 Allow bootstrapping llvm-tblgen on macOS and Linux
This is needed in order to build various LLVM binutils (e.g. addr2line)
as well as clang/lld/lldb.

Co-authored-by: Jessica Clarke <jrtc27@FreeBSD.org>
Test Plan:	Compiles on ubuntu 18.04 and macOS 11.4
Reviewed By:	dim
Differential Revision: https://reviews.freebsd.org/D31057
2021-08-02 14:36:03 +01:00
Alex Richardson
2de949cf85 Remove mkcsmapper_static and mkesdb_static from build-tools
Build them as part of the bootstrap-tools phase instead.

Reviewed by:	emaste (no objections)
Differential Revision: https://reviews.freebsd.org/D28181
2021-08-02 14:33:25 +01:00
Alex Richardson
7bc797e3f3 Add build system support for ASAN+UBSAN instrumentation
This adds two new options WITH_ASAN/WITH_UBSAN that can be set to
enable instrumentation of all binaries with AddressSanitizer and/or
UndefinedBehaviourSanitizer. This current patch is almost sufficient
to get a complete buildworld with sanitizer instrumentation but in
order to actually build and boot a system it depends on a few more
follow-up commits.

Reviewed By:	brooks, kib, markj
Differential Revision: https://reviews.freebsd.org/D31043
2021-08-02 14:33:24 +01:00
Tom Jones
0943200b13 inet6_option_space is deprecated, refer to inet6_opt_init instead
Reviewed by:	bz, hrs
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D26273
2021-07-30 14:23:39 +01:00
David Malone
fd309107e9 Minor language improvements. Note that they can't be changed
by sysctl (I think they can be changed as a tuneable.)
2021-07-29 09:26:19 +01:00
Ed Maste
1a7c2789a9 Regen src.conf.5 after 5f946c76c0 2021-07-27 17:28:42 -04:00
Baptiste Daroussin
dcd882f302 pci_vendors: update to 2021-07-25 2021-07-27 18:56:39 +02:00
Konstantin Belousov
85ae35ef37 /dev/pci: clarify meaning of writeable file descriptor
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D31317
2021-07-27 12:13:43 +03:00
Luiz Otavio O Souza
1e7fe2fbb9 bpf: Add an ioctl to set the VLAN Priority on packets sent by bpf
This allows the use of VLAN PCP in dhclient, which is required for
certain ISPs (such as Orange.fr).

Reviewed by:	bcr (man page)
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31263
2021-07-26 23:13:31 +02:00
Warner Losh
380710a5c8 geom: create an API to allocate events, and use that storage to send them
g_alloc_event will allocate storage for an opaque event. g_post_event_ep
can use memory returned by g_alloc_event to send an event from a context
that might not be able to allocate the event. Occasionally, we can
alloate memory when we create an object, but not while we're destroy
it. This allows one to allocate at creation time memory to use when
destorying the object.

Reviewed by:		jhb
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30544
2021-07-23 18:08:45 -06:00
Mark Johnston
93d8b4da7b kasan.9: Fix formatting in the synopsis
Sponsored by:	The FreeBSD Foundation
2021-07-23 15:40:50 -04:00
Mark Johnston
f4e67f18bd Remove sr_RS.UTF-8@latin from the list of targets
It is installed with other unicode locales, from monetdef_unicode.

This is just a band-aid to fix the build, as it's not clear how to
regenerate this Makefile.

Fixes:		0a36787e4c
2021-07-23 15:05:28 -04:00
Faraz Vahedi
bd90d8bbb1 locale: Add Farsi/Persian locales
MFC after:	3 weeks
Reviewed by:	farrokhi
Differential Revision:	https://reviews.freebsd.org/D24359
2021-07-23 16:58:20 +02:00
Baptiste Daroussin
3a04284df0 locales: upgrade CLDR to 39.0 and Unicode to 13.0.0
MFC after:	3 weeks
Relnotes:	yes
2021-07-23 16:58:20 +02:00
Baptiste Daroussin
ecff3c30b7 locales: now that C.UTF-8 is the default locale, always install it
MFC after:	3 weeks
2021-07-23 16:58:20 +02:00
Baptiste Daroussin
0a36787e4c locales: separate unicode from other locales
Unicode locales are maintained and to evolved in cldr.
Generating the other locales from the unicode gets more and more painful
over the time.

Let's freeze the other locales to cldr 34.0.
2021-07-23 16:58:20 +02:00
Baptiste Daroussin
7a7930cd4a LC_CTIME: has been removed from automatic generation long ago
due to too many mistakes in the data provided by cldr it was decided
to remove timedef from the automatic generation
2021-07-23 16:58:19 +02:00
Mark Johnston
fd5827b178 man9: Update guarantees for userspace fetch/store operations
Platforms may either silently handle unaligned accesses or return an
error.  Atomicity is not guaranteed in this case, however.

Reviewed by:	kib
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31282
2021-07-22 13:40:39 -04:00
Mark Johnston
18c696c001 man9: Remove stray .In macros
Fixes:		9c11d8d483
MFC after:	1 week
2021-07-22 12:47:43 -04:00
Ceri Davies
a52936f1d5 man9/VOP_LISTEXTATTR.9: correct grammar in .Nd 2021-07-22 16:43:46 +01:00
Ceri Davies
b578d2a77e man/man7/development.7: correct typo in manpage. 2021-07-22 16:43:46 +01:00
Baptiste Daroussin
d6ed0d3d31 ports.7: catchup with the package extension name since pkg 1.17
MFC After:	3 days
2021-07-22 10:50:19 +02:00
Hans Petter Selasky
575945f10b Update the mlx5en(4) manual page.
Differential Revision:	https://reviews.freebsd.org/D31228
Reviewed by:	kib@
MFC after:	1 week
Sponsored by:	NVIDIA Networking
2021-07-21 11:10:31 +02:00
Alex Richardson
f8147dad44 bsd.linker.mk: Detect LLD when built with PACKAGE_VENDOR
Recent versions of homebrew's LLD are built with PACKAGE_VENDOR (since
e7c972b606).
This means that the -v output is now
`Homebrew LLD 12.0.1 (compatible with GNU linkers)` and bsd.linker.mk no
longer detects it as LLD since it only checks whether the first word is
LLD. This change allow me to build on macOS again and should unbreak the
GitHub actions CI.

Reviewed By:	imp, uqs
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D31224
2021-07-20 16:10:22 +01:00
Kristof Provost
0351b9875a pf.conf.5: Document new 'match' keyword
Reviewed by:	bcr
Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D31117
2021-07-17 12:01:08 +02:00
David Chisnall
cf98bc28d3 Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return
on amd64 (and possibly other architectures) and so it is impossible to
recover in the signal handler after the call has returned.  This small
tweak delivers it in the `si_value` field of the signal, which is
sufficient to catch capability violations and emulate them with a call
to a more-privileged process in the signal handler.

This reapplies 3a522ba1bc with a fix for
the static assertion failure on i386.

Approved by:	markj (mentor)

Reviewed by:	kib, bcr (manpages)

Differential Revision: https://reviews.freebsd.org/D29185
2021-07-16 18:06:44 +01:00
Mark Johnston
5d40fb677a Add some missing osd.9 MLINKs
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2021-07-16 12:13:51 -04:00
Philip Paeps
b345b7e9e9 Document my shiny new doc commit bit 2021-07-14 11:55:16 +08:00
Trond Endrestol
331d4f3c07 igc(4): Correct the man page section
When not specifying the man page section the man page is set to 'LOCAL'
in the header of the page.

PR:	257145
Reviewed by:	gbe
MFC after:	1 month (when the driver is MFC'ed)
2021-07-13 15:14:24 +02:00
Warner Losh
dc5a0d6d6d ddb(4): improve wording
Incorporate feedback overlooked in revew by wblock@

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D4860
2021-07-12 15:13:13 -06:00
Bryan Drewery
6da773cb1c bsd.compiler.mk: Use CCACHE_PKG_PREFIX as ports now supports. 2021-07-12 12:52:52 -07:00
Peter Grehan
517904de5c igc(4): Introduce new driver for the Intel I225 Ethernet controller.
This controller supports 2.5G/1G/100MB/10MB speeds, and allows
tx/rx checksum offload, TSO, LRO, and multi-queue operation.

The driver was derived from code contributed by Intel, and modified
by Netgate to fit into the iflib framework.

Thanks to Mike Karels for testing and feedback on the driver.

Reviewed by:	bcr (manpages), kbowling, scottl, erj
MFC after:	1 month
Relnotes:	yes
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D30668
2021-07-12 14:57:18 +10:00
Gordon Bergling
5aa1e55b0a hwpmc(4): Fix a typo in the man page date
MFC after:	3 days
2021-07-11 14:53:18 +02:00
David Chisnall
d2b558281a Revert "Pass the syscall number to capsicum permission-denied signals"
This broke the i386 build.

This reverts commit 3a522ba1bc.
2021-07-10 20:26:01 +01:00
Warner Losh
d8514fa6f1 mk: LZMA_SUPPORT is unused
Retire LZMA_SUPPORT. It's unused since r332995.

Reviewed by:		delphij
PR:			244302
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D31088
2021-07-10 10:53:35 -06:00
David Chisnall
3a522ba1bc Pass the syscall number to capsicum permission-denied signals
The syscall number is stored in the same register as the syscall return
on amd64 (and possibly other architectures) and so it is impossible to
recover in the signal handler after the call has returned.  This small
tweak delivers it in the `si_value` field of the signal, which is
sufficient to catch capability violations and emulate them with a call
to a more-privileged process in the signal handler.

Approved by:	markj (mentor)

Reviewed by:	kib, bcr (manpages)

Differential Revision: https://reviews.freebsd.org/D29185
2021-07-10 17:19:52 +01:00
Thomas Steen Rasmussen
28f47a199c pf: fallback if $pf_rules fails to load
Support loading a default pf ruleset in case of invalid pf.conf.

If no pf rules are loaded pf will pass/allow all traffic, assuming the
kernel is compiled without PF_DEFAULT_TO_DROP, as is the case in
GENERIC.

In other words: if there's a typo in the main pf_rules we would allow
all traffic. The new default rules minimise the impact of this.

If $pf_program (i.e. pfctl) fails to set $pf_fules and
$pf_fallback_rules_enable is YES we will load $pf_fallback_rules_file if
set, or $pf_fallback_rules.

$pf_fallback_rules can include multiple rules, for example to permit
traffic on a management interface.

$pf_fallback_rules_enable defaults to "NO", preserving historic behaviour.

man page changes by ceri@.

PR:		256410
Reviewed by:	donner, kp
Sponsored by:	semaphor.dk
Differential Revision:	https://reviews.freebsd.org/D30791
2021-07-08 14:22:04 +02:00
Li-Wen Hsu
8dfb002457
man7: Update FreeBSD.org URLs
MFC after:	3 days
2021-07-04 22:07:23 +08:00
Li-Wen Hsu
89c0640c70
share/misc: Update FreeBSD.org URLs
MFC after:	3 days
2021-07-04 22:04:33 +08:00
Pavel Balaev
d12d651f86 EFI RT: resurrect EFIIOC_GET_TABLE
Make it work, but change the interface to be safe for non-root users. In
particular, right now interface only works for the tables which can be
minimally parsed by kernel to determine the table size. Then, userspace can
query the table size, after that it provides a buffer of needed size
and kernel copies out just table to userspace.

Main advantage is that user no longer need to be able to read /dev/mem,
the disadvantage is the need to have minimal parsers aware of the table
types.  Right now the parsers are implemented for ESRT and PROP tables.

Future extension of the present interface might be a return of only
the table physical address, in case kernel does not have suitable
parser yet. Then, a privileged user could read the table from /dev/mem.
This extension, which logically equivalent to the old (non-worked)
EFIIOC_GET_TABLE variant, is not implemented until needed.

Submitted by:	Pavel Balaev <pavel.balaev@3mdeb.com>
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D30104
2021-07-03 20:06:48 +03:00
Warner Losh
6329ca325e hardclock.9: Refine some details
Refine mistakes from adaptaton of NetBSD's hardclock man page to
FreeBSD:
	o clarify what usermode means
	o clarify how often hardclock is called
	o remove Xr callout(9) since that's done elsewhere

Reviewed by:		mav@
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30982
2021-07-02 17:10:35 -06:00
Ceri Davies
202edfe357 committers-doc.dot: move myself out of alumni 2021-07-02 19:43:02 +01:00
Ceri Davies
db6eac6821 nvmem(9): install the manpage
This is being installed on all architectures in line with the OF_*
pages.

Discussed with:	fernape, manu
2021-07-02 19:43:02 +01:00
Alex Richardson
2eb9ad4274 Simplify and speed up the kyua build
Instead of having multiple kyua libraries, just include the files as part
of usr.bin/kyua. Previously, we would build each kyua source up to four
times: once as a .o file and once as a .pieo. Additionally, the kyua
libraries might be built again for compat32. As all the kyua libraries
amount to 102 C++ sources the build time is significant (especially when
using an assertions enabled compiler). This change ensures that we build
306 fewer .cpp source files as part of buildworld.

Reviewed By:	brooks
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D30967
2021-07-02 09:21:05 +01:00
Ceri Davies
2ce5851295 rc.conf.5: -Tlint fixes. 2021-07-01 22:54:26 +01:00
Ceri Davies
40944510db rc.conf.5: add .Xr to firewall(7), growfs(7), and tuning(7) 2021-07-01 22:54:26 +01:00
Ceri Davies
cd4346a0e4 cd(9): correct minor typo in manpage. 2021-07-01 22:54:25 +01:00
Ceri Davies
1f7d11e636 build.7: remove documentation of "make update"
update target was removed in e290182bcf
2021-07-01 16:52:32 +01:00
Warner Losh
1426907f4d hz.9: update stathz for current usage
Update the stathz description to reflect reality. profhz is the only
thing we should deprecate. Add some implementation notes that describe
the optimizations made to date.

Discusssed with:	emaste
Reviewed by:		kib (prior), jhb (prior), gbe
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30815
2021-07-01 09:33:03 -06:00
Allan Jude
781c3b5119 Add Thomas Munro to the committers graph
Reported by:	gnn
2021-06-30 20:09:18 +00:00
Fernando Apesteguía
0a0f748641 man: Build manpages for all architectures
Building and installing architecture-specific man pages only raises a number of
problems:

 * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an
   example, it does not show results for pae(4). The reason for this is
   that the cgi interface runs on FreeBSD amd64.

 * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4)
   for an example.

 * Also, we have broken links in our Release Notes. This is a
   consequence of the first point. See
   https://www.freebsd.org/releases/13.0R/hardware/#proc-i386.

Make MAN_ARCH default to 'all' so we build all the man pages for all the
architectures. The difference in disk space is negligible. Also link
architecture-specific man pages to their own section while keeping their own
namespace.

PR: 212290
Reported by:	mj@bsdops.com
Approved by:	ceri@, wosch@
MFC after:	4 weeks
2021-06-30 09:57:51 +02:00
Ed Maste
f94360971e Clarify notice for profiled libraries in FreeBSD 14
Reported by:	kevans
Fixes:		175841285e ("Add deprecation notice for...")
Sponsored by:	The FreeBSD Foundation
2021-06-28 19:24:56 -04:00
Robert Wing
c7a7e547a5 vn_isdisk(9): update after r364372
Reviewed by:	mjg
Differential Revision:	https://reviews.freebsd.org/D30874
2021-06-28 10:27:27 -08:00
Ed Maste
914b6a0122 src.conf.5: regen after RISC-V OPENMP (aa033e0b14)
Sponsored by:	The FreeBSD Foundation
2021-06-27 13:30:08 -04:00
Michael Tuexen
870af3f4dc tcp: tolerate missing timestamps
Some TCP stacks negotiate TS support, but do not send TS at all
or not for keep-alive segments. Since this includes modern widely
deployed stacks, tolerate the violation of RFC 7323 per default.

Reviewed by:		rgrimes, rrs, rscheff
MFC after:		3 days
Differential Revision:	https://reviews.freebsd.org/D30740
Sponsored by:		Netflix, Inc.
2021-06-27 16:03:57 +02:00
Warner Losh
520a2401a6 bsd-family-tree: Add 2.8BSD relationship to Research 7th edition
In the 2BSD line, the 2.8BSD tapes were the first ones to include a
kernel, both source and a bootable tape. This was an AT&T V7 kernel,
with a number of bug fixes; new features in use at Berkeley; performance
enhancements that were circulating to V7 in the licensee community; and
build system changes. Based on the TUHS archives, it contains none of
the V32 changes, however.

In addition to the source code analysis, Mike Karels relates the story
of how his group lost a customizes to V6 on a PDP-11/40 due to a disk
crash. Since V7 just came out and Bill Jolitz had just brought that up
elsewhere, they replaced their customized V6 with a V7 system, and that
base would eventually become 2.8BSD. (Quarter Century of Unix)

Given both lines of evidence, add a direct line from V7 Unix to 2.8BSD.

Also confirmed that the V6 line to 1BSD and 2BSD was appropriate. 1BSD
and 2BSD included ashell(1) and ex(1). ashell(1) was derived from v6
hell. ex(1) was an enhanced v6 ed.  2.8BSD included process control and
user-land utilities from 4.1BSD

Discussed with:		Clem Cole, Diomidis Spinellis (dds)
Differential Revision:	https://reviews.freebsd.org/D30883
2021-06-25 11:30:12 -06:00
Piotr Kubaj
aa033e0b14 Enable OPENMP on riscv64* by default.
Differential revision:	https://reviews.freebsd.org/D30862
Approved by:	mhorne
2021-06-25 16:22:50 +02:00
Warner Losh
779b70a226 bsd-family-tree: add DragonFly 6.0.0
Tagged on May 8, 2021.

Sponsored by:		Netflix
2021-06-24 10:43:18 -06:00
Marcin Wojtas
e34856a2c4 Update ENA driver man page
Bring the obsolete man page up to date:
* update diagnostic error messages
* add documentation of loader tunables
* document netmap support
* add a driver history section
* update the contact information

Submitted by: Artur Rojek <ar@semihalf.com>
Submitted by: Michal Krawczyk <mk@semihalf.com>
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
2021-06-24 16:35:37 +02:00
Marcin Wojtas
19aa95e4b3 Introduce new driver for NXP Ethernet controller
ENETC it a gigabit Ethernet controller found on the LS1028A board.
It supports basic VLAN offloads - tag extraction, injection and hardware
filtering. Inband MDIO connectivity is used for link status
monitoring through the miibus interface. Fixed-link mode is also
supported, which allows for operation of internal cpu to switch port.
Since no admin interrupts are present in hardware, link status polling
has to be used.
Due to a hardware bug software reset of the NIC results in a external
abort. Because of that most of the hardware initialization is done
during attach. This also means that in the case of an fatal error full
board reset is required.
The enetc_hw.h header was imporoted from Linux. It is dual licensed.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential Revision: https://reviews.freebsd.org/D30729
2021-06-24 13:01:13 +02:00
Warner Losh
ddfc9c4c59 newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf
Now that the upper layers all go through a layer to tie into these
information functions that translates an sbuf into char * and len. The
current interface suffers issues of what to do in cases of truncation,
etc. Instead, migrate all these functions to using struct sbuf and these
issues go away. The caller is also in charge of any memory allocation
and/or expansion that's needed during this process.

Create a bus_generic_child_{pnpinfo,location} and make it default. It
just returns success. This is for those busses that have no information
for these items. Migrate the now-empty routines to using this as
appropriate.

Document these new interfaces with man pages, and oversight from before.

Reviewed by:		jhb, bcr
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D29937
2021-06-22 20:52:06 -06:00
Dmitry Chagin
e013e36939 linux(4): Get rid of Linuxulator kernel build options.
Stop confusing people, retire COMPAT_LINUX and COMPAT_LINUX32 kernel
build options. Since we have 32 and 64 bit Linux emulators, we can't build both
emulators together into the kernel. I don't think it matters, Linux emulation
depends on loadable modules (via rc).

Cut LINPROCFS and LINSYSFS for consistency.

PR:			215061
Reviewed by:		bcr (manpages), trasz
Differential Revision:	https://reviews.freebsd.org/D30751
MFC after:		2 weeks
2021-06-22 08:32:39 +03:00
Alex Richardson
ab0c68ba4a Emit an error when we seen absolute paths to .o files
This is usually an error caused by using an absolute path in SRCS. This
happened to me in 83c20b8a2d due to changing LDADD to SRCS.
I did not notice that this had created a .o file inside the source tree
since .gitignore contains "*.o" and therefore git did not report any
changes.

Adding this warning message to bsd.lib.mk/bsd.prog.mk should prevent
issues like this in the future.

There was exactly one case of an absolute OBJS path in the current source
tree but that was removed in e713d3a013.

Reviewed By:	emaste (earlier version), imp
Differential Revision: https://reviews.freebsd.org/D28467
2021-06-21 16:13:54 +01:00
Emmanuel Vadot
af5e40770e pkgbase: Put the mibs and defs in the bnsmp package
Differential Revision:	https://reviews.freebsd.org/D30756
Sponsored by:	Diablotin Systems
2021-06-19 17:50:03 +02:00
Emmanuel Vadot
79ac3c12a7 pkgbase: Put dtrace in its own package
While dtrace is usefull some people might not want it.

Differential Revision:	https://reviews.freebsd.org/D30752
Sponsored by:	Diablotin Systems
2021-06-19 17:49:31 +02:00
Emmanuel Vadot
395d907e61 regulator: Add manpage for this framework
Reviewed by:	imp, mmel
Differential Revision:	https://reviews.freebsd.org/D30762
Sponsored by:	Diablotin Systems
2021-06-19 17:42:43 +02:00
Warner Losh
4c0bc59146 man9: add hz(9) and hardclock(9)
Document aspects of system time keeping. Hz is the nominal rate that we
interrupt the system and is known and the 'tick' period of 1 / hz.
hardclock is the routine that does various bits of timekeeping.  stathz
and profhz are documented as historical relics that are deprecated
and replaced by hwpmc.4 and others.

Reviewed by:		phk@, mav@ and gnn@ (previous version)
Obtained from:		hardclock.9 from NetBSD (with FreeBSD adjustments)
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30802
2021-06-18 08:42:51 -06:00
Ceri Davies
c43b0081fa devmatch: improve naming of devmatch config variable
Accept the old rc.conf variable if the new one is not present for
compatability.

Approved by:	imp
Differential Revision:	https://reviews.freebsd.org/D30806
2021-06-18 13:17:30 +01:00
Warner Losh
a19bd307bd man9: Sort unr in Makefile MLINKS
Sort unr entries in alphabetical order, like everything else in the
MLINKS section.

Sponsored by:		Netflix
2021-06-17 13:55:50 -06:00
Warner Losh
5851680bca style(9): Add advice about $FreeBSD$
Codify our standard practice with $FreeBSD$
o New code only needs it if it might land in stable/12
o Old code should retain it until stable/12 is unsupported
o We'll do a bulk remove in the future: don't do it proactively.
o Give advice about how to tag files derived from other files
  in the tree.

Reviewed by:		bcr, allanjude,ceri
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D30789
2021-06-17 13:54:59 -06:00
John Baldwin
8fa5c577de crypto: Remove now-unused crypto_cursor_seg{base,len}.
Callers should use crypto_cursor_segment() instead.

Reviewed by:	markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D30448
2021-06-16 15:23:16 -07:00
Alan Somers
fcb5a0a2ad vn_fullpath.9: update args after rev 364633
MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D30779
2021-06-15 15:42:30 -06:00
Warner Losh
1fbd574e87 u3g: Note range of GOBI devices
Qualcomm makes the GOBI devices, and gobi_loader port supports all the
Qualcomm GOBI 1000 and 2000 devices with the MDM1000 and MDM2000
chipsets. And likely the 3000 as well, though that's not been tested
on FreeBSD.

Submitted by:		zarychtam@plan-b.pwste.edu.pl
Sponsored by:		Netflix
2021-06-15 10:21:20 -06:00
Jung-uk Kim
e80145525b bsd.cpu.mk: Correct MACHINE_CPU for Intel Alder Lake
Apparently Intel Alder Lake lacks AVX-512 instructions.

Fixes:		09e7341c5e "Catch up with Clang 12"
2021-06-14 19:06:03 -04:00
Jung-uk Kim
09e7341c5e Catch up with Clang 12.
Add "znver3" for AMD and "alderlake" and "sapphirerapids" for Intel.
2021-06-14 18:42:59 -04:00
Ceri Davies
abb0d7d366 make.conf: DOC_LANG and PRINTERDEVICE clarifications in man and example 2021-06-14 09:53:34 +01:00