Commit Graph

279315 Commits

Author SHA1 Message Date
Baptiste Daroussin
7592dd5527 ObsoleteFiles: add missing '+'
Reported by:	antoine
2022-11-10 14:04:54 +01:00
Baptiste Daroussin
6658132e5a ObsoleteFiles: fix typo
Reported by:	marck
2022-11-10 13:47:08 +01:00
Emmanuel Vadot
ee247fc1e9 linuxkpi: Move cpu_relax out of ifdef for x86
It's needed by drm-kmod and this allow building on arm64 and powerpc.

Reported by:	jhibbits
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-11-10 12:50:51 +01:00
Richard Scheffenegger
1a70101a87 tcp: account sent/received IP ECN markings independently
Have tcpstats (netstat -s) differentiate between received and sent
ECN-marked packets. Also account for IP ECN bits (on TCP packets)
even when the tcp session has not negotiated ECN support.

Event:			IETF 115 Hackathon
Reviewed By:		glebius, tuexen, #transport
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D37314
2022-11-10 11:35:35 +01:00
Andrey V. Elsukov
8526120ad4 ixgbe: workaround errata about UDP frames with zero checksum
Intel 82599 has errata related to IPv4 UDP frames with zero checksum.
It reports such datagrams with L4 integrity errors in IXGBE_XEC
register. And after afb1aa4e6d commit such errors are reported
via IFCOUNTER_IERRORS. This confuses users, since actually all frames
are handled correctly by the system.
To workaround the problem, let's ignore the XEC register value for
82599 cards for now.

PR:		266048
Discussed with:	erj
MFC after:	1 week
Sponsored by:	Yandex LLC
2022-11-10 12:34:40 +03:00
Baptiste Daroussin
820b62d941 ObsoleteFiles: the rc.sendmail(8) man page was also removed 2022-11-10 10:27:42 +01:00
Peter Holm
f31ca922cb stress2: Add SU+J as a test. Save fsck_ffs core dump, if any 2022-11-10 10:12:46 +01:00
Alexander Leidinger
f993fff689 Sort list of supported features for more easy handling
in the future.

Reviewed by:	imp
2022-11-10 09:47:23 +01:00
Baptiste Daroussin
d88828148d rc.conf: document the sendmail options
While here remove the deprecation of the sendmail_enable="NONE" as
it has been deprecated for 20 years and never removed
2022-11-10 07:00:33 +01:00
Kirk McKusick
5f7acd1858 Fix printfs for fsck_ffs(8) i386 build.
Reported by:  jenkins
Sponsored by: The FreeBSD Foundation
2022-11-09 21:59:20 -08:00
Kyle Evans
8b8babf044 include: put includes into -dev packages
The includes build is kind of funky, as we support either copying or
symlinking files into /usr/include.  For `copies`, we were supplying
the include/ ${TAG_ARGS}, which puts packages into `FreeBSD-runtime`,
without any consideration to the fact that we're installing headers.

Let's copy the approach that the `symlinks` target uses for now, and
add ",dev" to the TAG_ARGS so that headers at least end up in
FreeBSD-runtime-dev, which is more appropriate.  Some of these includes
are actually technically supposed to be in *other* packages and their
INCSGROUP's PACKAGE setting is actually correct, but this is less
trivial to solve.  This is a bandaid to fix the immediate problem of
some headers ending up in two different packages.

PR:		267526
Reviewed by:	dfr, manu
Differential Revision:	https://reviews.freebsd.org/D37256
2022-11-09 22:20:38 -06:00
Kirk McKusick
689a9368eb Fix types for fsck_ffs(8) i386 build.
Reported by:  jenkins
Reported by:  Cy Schubert
Sponsored by: The FreeBSD Foundation
2022-11-09 18:31:19 -08:00
Luiz Amaral
813c5b75e6 pfsync: prepare code to accommodate AF_INET6 family
Work is ongoing to add support for pfsync over IPv6. This required some
changes to allow for differentiating between the two families in a more
generic way.

This patch converts the relevant ioctls to using nvlists, making future
extensions (such as supporting IPv6 addresses) easier.

Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D36277
2022-11-09 21:06:07 +01:00
Anton Rang
cfbf1da0de vm_page_unswappable: remove wrong assertion
markj says:

    ...the assertion is incorrect and should simply be removed.
    It has been racy since we removed the use of the page hash
    lock to synchronize wiring of pages.

PR:		267621
Reviewed by:	markj, Anton Rang <rang@acm.org>
MFC after:	1 week
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D37320
2022-11-09 14:28:03 -06:00
Kirk McKusick
460ed6106c Add support for managing UFS/FFS snapshots to fsck_ffs(8).
The kernel handles the managment of UFS/FFS snapshots. Since UFS/FFS
updates filesystem data (rather than always writing changes to new
locations like ZFS), the kernel must check every filesystem write
to see if the block being written is part of a snapshot. If it is
part of a snapshot, then the kernel must make a copy of the old
block value into a newly allocated block for the snapshot before
allowing the write to be done. Similarly, if a block is being freed,
the kernel must check to see if it is part of a snapshot and let
the snapshot claim the block rather than freeing it for future use.
When a snapshot is freed, its blocks need to be offered to older
snapshots and freed only if no older snapshots wish to claim them.

When snapshots were added to UFS/FFS they were integrated into soft
updates and just a small part of the management of snapshots needed
to be added to fsck_ffs(8) as soft updates minimized the set of
snapshot changes that might need correction. When journaling was
added to soft updates a much more complete knowledge of snapshots
needed to be added to fsck_ffs(8) for it to be able to properly
handle the filesystem changes that a journal rollback needs to do
(specifically the freeing and allocation of blocks). Since this
functionality was unavailable, the use of snapshots was disabled
when running with journaled soft updates.

This set of changes imports the kernel code for the management of
snapshots to fsck_ffs(8). With this code in place it will become
possible to enable snapshots when running with journalled soft
updates. The most immediate benefit will be the ability to use
snapshots to take consistent filesystem dumps on live filesystems.
Future work will be done to update fsck_ffs(8) to be able to use
snapshots to run in background on live filesystems running with
journaled soft updates.

Reviewed by:  kib
Tested by:    Peter Holm
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36491
2022-11-09 10:46:31 -08:00
Alan Somers
05d0f4308c Don't panic when tasting a disk with sectorsize=0
This can sometimes happen with broken HDDs.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	markj
Differential Revision: https://reviews.freebsd.org/D37313
2022-11-09 10:21:12 -07:00
Dag-Erling Smørgrav
817f1f3064 libc: Don't warn about RRSIG replies.
PR:		213178
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D37303
2022-11-09 17:41:47 +01:00
Ed Maste
733bf3b108 ssh: update comment text to match upstream
Reported by:	bz
Obtained from:	OpenSSH dffa64480163
2022-11-09 11:32:47 -05:00
Richard Scheffenegger
0b00b80149 ipfw: Have NAT steal the TH_RES1 bit, instead of the TH_AE bit
The NAT module use of the tcphdr.th_x2 field now collides with the
use of this TCP header flag as AccECN (AE) bit. Use the topmost
bit instead to allow negotiation of AccECN across a NAT device.

Event:			IETF 115 Hackathon
Reviewed By:		#transport, tuexen
MFC after:		3 days
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D37300
2022-11-09 11:19:19 +01:00
Baptiste Daroussin
0b1adc42a1 rc.sendmail: remove unused script
20 years ago the use of rc.sendmail script was dropped in favor
of /etc/rc.d/sendmail, it is time to retire the script entirely
now.

MFC after:	1 week
2022-11-09 16:55:18 +01:00
Baptiste Daroussin
6a2d6a569b rc.conf(5): fix the description of mta_start_script
mta_start_script is used by /etc/rc.d/othermta which only execute
something if this variable is set to something else than
/etc/rc.sendmail

MFC after:	1 week
2022-11-09 16:55:18 +01:00
Jose Luis Duran
c7c9836853 sendmail: Add back a comment about "NONE"
Differential Revision:	https://reviews.freebsd.org/D37315
2022-11-09 16:54:34 +01:00
Baptiste Daroussin
7cadc52638 sendmail: do not use NONE
NONE is deprecated, instead of using NONE, switch to "NO" all
the sendmail_*_enable which sendmail_enable=NONE would have done
2022-11-09 15:20:30 +01:00
Kyle Evans
d22f03636b mktemp: skip later TMPDIR check if -p is specified
We already did the necessary $TMPDIR fallback, if it's going to be used.
Skip the later check so that we don't accidentally override our -p
argument.

Fixes:		ac6f924e1c ("mktemp: add -p/--tmpdir argument")
Sponsored by:	Klara, Inc.
2022-11-09 00:04:04 -06:00
Mateusz Guzik
83286682f8 vfs: whack mips remnant
This reverts commit 8ffa01a061.
2022-11-09 00:31:50 +00:00
Ed Maste
185efcc376 tests: also remove sparc64 case
Followup to commit d6273acf56, which removed MIPS.

Reported by:	mhorne
2022-11-08 18:55:00 -05:00
Alex S
9f7bf94ee2 linux(4): Fix get_robust_list() syscall return value.
The system call returns the head of the robust futex list. The list head is stored
in the location pointed to by the head argument. When copying data between address
spaces use proper head storage size as it depends on an emulated ABI.

PR:		267616
MFC after:	3 days
2022-11-09 00:17:17 +03:00
Gleb Smirnoff
b40ae8c9fe tcp: fix build without INVARIANTS and VIMAGE
Lines from upcoming changes crept in and broke certain builds.

Fixes:	9eb0e8326d
2022-11-08 12:34:45 -08:00
John Baldwin
e4bc19b2fa cxgbe tom: Fix jobtotid() compilation.
The previous commit lost an implicit struct socket * cast.  Use an
inline function instead as the macro is already rather long.

Fixes:		e1401f7579 cxgbe: use standard sototcpcb() accessor macro to get socket's tcpcb
Sponsored by:	Chelsio Communications
2022-11-08 11:25:58 -08:00
Gleb Smirnoff
326f455625 tcp: forward declare struct tcpcb in the TCP logging header
This allows to include tcp_log_buf.h without including tcp_var.h.
2022-11-08 10:32:29 -08:00
Gleb Smirnoff
73bebcc5bd inpcb: remove TCP includes, all TCP specific code was moved 2022-11-08 10:24:40 -08:00
Gleb Smirnoff
8840ae2288 tcp: don't store VNET in every tcpcb, take it from the inpcbinfo
Reviewed by:		rscheff
Differential revision:	https://reviews.freebsd.org/D37125
2022-11-08 10:24:40 -08:00
Gleb Smirnoff
ab0ef9455f hpts: move inp initialization from the generic inpcb code to TCP
Differential revision:	https://reviews.freebsd.org/D37124
2022-11-08 10:24:40 -08:00
Gleb Smirnoff
9eb0e8326d tcp: provide macros to access inpcb and socket from a tcpcb
There should be no functional changes with this commit.

Reviewed by:		rscheff
Differential revision:	https://reviews.freebsd.org/D37123
2022-11-08 10:24:40 -08:00
Gleb Smirnoff
f71cb9f748 tcp: inp_socket is valid through the lifetime of a TCP inpcb
The inp_socket is cleared only in in_pcbdetach(), which for TCP is
always accompanied with inp_pcbfree().  An inpcb that went through
in_pcbfree() shall never be returned by any kind of pcb lookup.

Reviewed by:		tuexen
Differential revision:	https://reviews.freebsd.org/D37062
2022-11-08 10:24:39 -08:00
Gleb Smirnoff
ada90cb978 tcp: remove INP_DROPPED check from notify functions
These functions tcp_notify(), tcp_drop_syn_sent() and tcp_mtudisc()
are called from tcp*_ctlinput*() right after successfull
in_pcblookup*().  They shall never get a pcb that is dropped.
2022-11-08 10:24:39 -08:00
Gleb Smirnoff
f567d55f51 inpcb: don't return INP_DROPPED entries from pcb lookups
The in_pcbdrop() KPI, which is used solely by TCP, allows to remove a
pcb from hash list and mark it as dropped.  The comment suggests that
such pcb won't be returned by lookups.  Indeed, every call to
in_pcblookup*() is accompanied by a check for INP_DROPPED.  Do what
comment suggests: never return such pcbs and remove unnecessary checks.

Reviewed by:		tuexen
Differential revision:	https://reviews.freebsd.org/D37061
2022-11-08 10:24:39 -08:00
Bjoern A. Zeeb
b5c3819c7b LinuxKPI: add virt_to_phys()
Add virt_to_phys() as a define to vtophys().
This is used by a wireless driver for dma related work; sigh.

MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D37301
2022-11-08 18:18:01 +00:00
Bjoern A. Zeeb
f2978460c7 LinuxKPI: tasklet add (*callback) support
In addition to (*func) tasklet also seems to have a (*callback) with
a different argument.  Add support for this and add tasklet_setup()
as well for support in more drivers.

The from_tasklet() definition is duplicated in the tree; hide it there
under #ifndef to avoid a re-definition.  People should generally add
LinuxKPI bits to linuxkpi rather than private files if they also rely
on other LinuxKPI bits.

X-MFC:		DO NOT MFC, space allocated by drivers not us.
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D37216
2022-11-08 18:14:17 +00:00
Bjoern A. Zeeb
e2361e04b0 LinuxKPI: implement cpumask_of()
Add a static set of cpumasks for all (possible) cpus with only the one
indexed cpu enabled in each set.
This is needed for cpumask_of(_cpuid) which returns a cpumask (cpuset)
with only cpu _cpuid enabled and is used by one wireless driver at least.

MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D37223
2022-11-08 18:11:55 +00:00
Richard Scheffenegger
dc9daa04fb tcp: allow packets to be marked as ECT1 instead of ECT0
This adds the capability for a modular congestion control
to select which variant of ECN-capable-transport it wants to use
when sending out elegible segments. As an initial CC to utilize
this, DCTCP was selected.

Event:			IETF 115 Hackathon
Reviewed By:		tuexen, #transport
Sponsored by:		NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D24869
2022-11-08 18:36:38 +01:00
Ed Maste
d6273acf56 tests: retire now-unused MIPS case 2022-11-08 09:17:53 -05:00
Gordon Bergling
bcf8fb7f03 tcp_bbr(4): Fix a typo in a source code comment
- s/retranmitted/retransmitted/

MFC after:	3 days
2022-11-08 14:59:56 +01:00
Gordon Bergling
bf31248287 nfs: Fix common typos in source code comments
- s/attrbute/attribute/

MFC after:	3 days
2022-11-08 14:58:32 +01:00
Gordon Bergling
40b245af0f pnfs.4: Fix a typo
- s/attrbute/attribute/

MFC after:3 days
2022-11-08 14:57:06 +01:00
Baptiste Daroussin
b7104f1914 sendmail: document that sendmail_enable can be set to NONE
setting sendmail_enable to NONE (which is now the default)
turns all the sendmail_*_enable variables to NO

Reported by:	many
2022-11-08 14:39:27 +01:00
Jakub Kołodziej
f1717ffd7a gpio: Fix typo causing GPIO configuration mismatch
Polarity inversion register was mistekanly filled with the value of
the direction configuration register.
Correct that.

Reviewed by:	kd
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D37262
2022-11-08 14:14:59 +01:00
Baptiste Daroussin
1edc3b6e56 netlink: unregister groups along with family
Differential Revision:	https://reviews.freebsd.org/D37308
Reviewed by:	melifaro
2022-11-08 12:46:58 +01:00
Mateusz Guzik
b935e867af Tree-wide replacement of VOP_UNLOCK + vrele combo with vput
No functional changes.
2022-11-07 23:34:27 +00:00
John Baldwin
613aaf59af git-arc: Accept message via -m when updating reviews.
If a -m argument is given to update, it is passed through to arc diff
when updating each review.  Note that if an empty message is specified
via -m, arc diff will update the review without adding a note.

If an -m argument is not given, then the user's editor is invoked by
arc to supply a message for each review matching the previous
behavior.

This can be used to simplify the process for updating a set of
reviews, e.g.:

  git checkout foo
  git rebase main
  git arc update -m "Rebase" main..

This will rebase the 'foo' branch and update the reviews for all
commits on the branch without invoking the user's editor separately
for each review.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D37260
2022-11-07 14:46:15 -08:00