]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
5 months agomtree: Properly sort entries
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Properly sort entries

Reduce the diff with the output generated by mtree.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

5 months agomtree: Use spaces not tabs
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Use spaces not tabs

The indentation generated by mtree -j uses spaces, not tabs.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

5 months agomtree: Update mtree flags in README file
Jose Luis Duran [Thu, 28 Dec 2023 05:26:23 +0000 (22:26 -0700)]
mtree: Update mtree flags in README file

- Add -b (suppress blank lines before directories).
- The equivalent of `-i` in fmtree is `-j` in mtree (nmtree) (indent the
  output 4 spaces).
- Add `-F freebsd9` compatibility flavor (print the closing `..` at the
  end).

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/912

5 months agotree: Use 1 semicolon at the end of a statement
Elyes Haouas [Thu, 28 Dec 2023 04:02:07 +0000 (21:02 -0700)]
tree: Use 1 semicolon at the end of a statement

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/889

5 months agotree: Use 1 semicolon at the end of a statement
Elyes Haouas [Thu, 28 Dec 2023 04:02:07 +0000 (21:02 -0700)]
tree: Use 1 semicolon at the end of a statement

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/889

5 months agoCONTRIBUTING.md: add note about upstreams.
Warner Losh [Thu, 28 Dec 2023 03:40:57 +0000 (20:40 -0700)]
CONTRIBUTING.md: add note about upstreams.

Sponsored by: Netflix

5 months agoroute6d: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
route6d: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agobmake: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
bmake: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agosys: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
sys: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agonetpfil: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
netpfil: Fix typo (triple S)

While here, align the comment box.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agonet: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
net: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agofuse: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
fuse: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agoqat: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
qat: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agopms: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:17 +0000 (20:17 -0700)]
pms: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agopci: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
pci: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agoisci: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
isci: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agonetvsc: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
netvsc: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agoddb: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
ddb: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agoarm: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
arm: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agostand: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
stand: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agosecurity.7: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
security.7: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agonetgdb.4: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:16 +0000 (20:17 -0700)]
netgdb.4: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agolibdevdctl: Fix typo (triple S)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:15 +0000 (20:17 -0700)]
libdevdctl: Fix typo (triple S)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/955

5 months agociss: Fix typo (triple T)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:07 +0000 (20:17 -0700)]
ciss: Fix typo (triple T)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/954

5 months agolibcasper: Fix typo (triple T)
Jose Luis Duran [Thu, 28 Dec 2023 03:17:07 +0000 (20:17 -0700)]
libcasper: Fix typo (triple T)

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/954

5 months agosa: Make sa_param_table[] const and static
Mark Johnston [Wed, 27 Dec 2023 21:40:12 +0000 (16:40 -0500)]
sa: Make sa_param_table[] const and static

No functional change intended.

Reviewed by: ken, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43204

5 months agosa: Check for errors from copyout()
Mark Johnston [Wed, 27 Dec 2023 21:28:28 +0000 (16:28 -0500)]
sa: Check for errors from copyout()

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by: ken
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43203

5 months agoCONTRIBUTING: class work
Warner Losh [Thu, 28 Dec 2023 00:21:58 +0000 (17:21 -0700)]
CONTRIBUTING: class work

Add note about contacting me for professors including this as part of
their class work.

5 months agocontributing: Add note about static analyzers
Warner Losh [Thu, 28 Dec 2023 00:16:33 +0000 (17:16 -0700)]
contributing: Add note about static analyzers

Please don't submit the raw results of some static analysis. Please do
submit the thoughtful results, though. Please test with kyua and create
test cases for any actual bugs that might be fixed.

5 months ago<bsd.progs.mk>: Allow using SRCS for common sources
VexedUXR [Thu, 28 Dec 2023 00:01:29 +0000 (17:01 -0700)]
<bsd.progs.mk>: Allow using SRCS for common sources

Instead of having to do:

PROGS= program1 program2
SRCS.program1= program1.c common.c
SRCS.program2= program2.c common.c

This can now be done instead:

PROGS= program1 program2
SRCS= common.c
SRCS.program1= program1.c
SRCS.program2= program2.c

This shouldn't effect any existing projects using <bsd.progs.mk>.

Reviewed by: imp, sjg
Pull Request: https://github.com/freebsd/freebsd-src/pull/766

5 months agoauto_master.5: Fix my push
Warner Losh [Wed, 27 Dec 2023 23:59:48 +0000 (16:59 -0700)]
auto_master.5: Fix my push

Forgot the commit --amend before the push to fix the date. My bad.
Fixes: fc8ac5fedf7e
5 months agoauto_master.5: improve description, bump date
concussious [Wed, 27 Dec 2023 23:56:43 +0000 (16:56 -0700)]
auto_master.5: improve description, bump date

Add autofs automounter to description to improve visibility.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/824

5 months agobsd-family-tree: tidiness, width
Graham Perrin [Wed, 27 Dec 2023 23:36:26 +0000 (16:36 -0700)]
bsd-family-tree: tidiness, width

Tidy the raggedness in the section that begins [44B]. As the line that begins
[KB] was previously tidied, now tidy the section to accommodate [BSDI] and
[TUHS]. Rewrap the section to fit the same number of columns.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/812

5 months agobsd-family-tree: QCU: ISBN and EAN numbers
Graham Perrin [Wed, 27 Dec 2023 23:36:25 +0000 (16:36 -0700)]
bsd-family-tree: QCU: ISBN and EAN numbers

ISBN 0201547775 and International Article Number (EAN) 9780201547771 for
'A Quarter Century of UNIX' by Peter H. Salus.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/812

5 months agorc(8): angle brackets to avoid link breakage
Graham Perrin [Wed, 27 Dec 2023 23:26:46 +0000 (16:26 -0700)]
rc(8): angle brackets to avoid link breakage

<https://datatracker.ietf.org/doc/html/rfc3986#appendix-C>

Double-quotes are not suitably effective. Instead, use angle brackets.

Whilst here:
- remove superfluous quotation marks from the %T title.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/811

5 months agozfs: merge openzfs/zfs@233d34e47
Martin Matuska [Wed, 27 Dec 2023 21:51:21 +0000 (22:51 +0100)]
zfs: merge openzfs/zfs@233d34e47

Notable upstream pull request merges:
 #15635 eff77a802 ZIL: Improve next log block size prediction
 #15675 6930ecbb7 spa: make read/write queues configurable
 #15677 5a4915660 Don't panic on unencrypted block in encrypted dataset
 #15716 07e95b467 Fix the FreeBSD userspace build

Obtained from:  OpenZFS
OpenZFS commit: 233d34e47ef88ee9e9a1e1ad02384f2063cd039b

5 months agox86: Adjust base addr for PCI MCFG regions
Colin Percival [Wed, 27 Dec 2023 08:09:08 +0000 (00:09 -0800)]
x86: Adjust base addr for PCI MCFG regions

Each bus gets 1 MB of address space; the actual base address for an
MCFG bus range is the address from the table plus the starting bus
number times 1 MB.

The PCI spec is unclear on this point, but this change matches what
Linux does, which is likely enough of a de facto standard regardless
of what any de jure standard might attempt to say.

Fixes: f54a3890b1f4 ("x86: Support multiple PCI MCFG regions")
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D43206

5 months agoFix the FreeBSD userspace build (#15716)
Mark Johnston [Wed, 27 Dec 2023 20:17:53 +0000 (15:17 -0500)]
Fix the FreeBSD userspace build (#15716)

- Mark some parameters to zpool_power*() as unused.
- Add a stub zpool_disk_wait().

Fixes: a9520e6e5 ("zpool: Add slot power control, print power status")
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
5 months agonvme: Add some bits from NVMe 2.0c spec.
Alexander Motin [Wed, 27 Dec 2023 18:50:54 +0000 (13:50 -0500)]
nvme: Add some bits from NVMe 2.0c spec.

MFC after: 1 week

5 months agoctladm: Only autoload cfiscsi.ko for iSCSI-specific commands
John Baldwin [Wed, 27 Dec 2023 18:11:19 +0000 (10:11 -0800)]
ctladm: Only autoload cfiscsi.ko for iSCSI-specific commands

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42935

5 months agoctladm: Fix a typo and add a FALLTHROUGH annotation
John Baldwin [Wed, 27 Dec 2023 18:10:42 +0000 (10:10 -0800)]
ctladm: Fix a typo and add a FALLTHROUGH annotation

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42934

5 months agocltadm.8: Correct documentation of -r arg to port command
John Baldwin [Wed, 27 Dec 2023 18:10:05 +0000 (10:10 -0800)]
cltadm.8: Correct documentation of -r arg to port command

-r does not take a target port argument

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42932

5 months agoctl: Add missing comma after CTL_FLAG_ALREADY_DONE
John Baldwin [Wed, 27 Dec 2023 18:09:52 +0000 (10:09 -0800)]
ctl: Add missing comma after CTL_FLAG_ALREADY_DONE

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42930

5 months agoctl_frontend.h: Note that ctl_port.frontend is set by the FETD
John Baldwin [Wed, 27 Dec 2023 18:09:40 +0000 (10:09 -0800)]
ctl_frontend.h: Note that ctl_port.frontend is set by the FETD

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42931

5 months agoctl: Always return errno values from ctl_port_register
John Baldwin [Wed, 27 Dec 2023 18:09:24 +0000 (10:09 -0800)]
ctl: Always return errno values from ctl_port_register

Return EBUSY instead of a bare 1 if a port number is already active.

Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D42929

5 months agonfsstat: update option strings in docs
Lexi Winter [Wed, 27 Dec 2023 17:30:31 +0000 (17:30 +0000)]
nfsstat: update option strings in docs

Add the missing -q option to the nfsstat(1) manpage SYNOPSIS (it is
already documented in DESCRIPTION), and add the missing -E and -q
options to the built-in usage output.

PR: 275912
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/958

5 months agoFix multiple bugs with ctld's UCL parsing
Alan Somers [Mon, 9 Oct 2023 18:26:25 +0000 (12:26 -0600)]
Fix multiple bugs with ctld's UCL parsing

* Don't segfault when parsing a misformatted auth-group section
* If the config file specifies a chap section within a target but no
  auth-group, create a new anonymous auth-group.  That matches the
  behavior with non-UCL config files.
* Protect some potential segfaults with assertions

PR: 274380
MFC after: 1 week
Sponsored by: Axcient
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D43198

5 months agoimprove handling of shell metacharacters in filenames
Wolfram Schneider [Wed, 27 Dec 2023 17:35:08 +0000 (17:35 +0000)]
improve handling of shell metacharacters in filenames

PR: 275967
MFC after: 1 week

5 months agoinpcb: poison several inpcb pointer in in_pcbfree()
Gleb Smirnoff [Wed, 27 Dec 2023 16:34:37 +0000 (08:34 -0800)]
inpcb: poison several inpcb pointer in in_pcbfree()

There are few subsystems that reference inpcb and allow it to outlive
in_pcbfree().  There are no known bugs with them to unreference the
options pointers for a freed inpcb.  Enforce this so that such bugs
don't appear in the future.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43134

5 months agoinpcb: reoder inpcb destruction
Gleb Smirnoff [Wed, 27 Dec 2023 16:34:37 +0000 (08:34 -0800)]
inpcb: reoder inpcb destruction

First, merge in_pcbdetach() with in_pcbfree().  The comment for
in_pcbdetach() was no longer correct.  Then, make sure we remove
the inpcb from the hash before we commit any destructive actions
on it.  There are couple functions that rely on the hash lock
skipping SMR + inpcb lock to lookup an inpcb.  Although there are
no known functions that similarly rely on the global inpcb list
lock, also do list removal before destructive actions.

PR: 273890
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D43122

5 months agofortune: update mailing list search url
Christos Margiolis [Wed, 27 Dec 2023 16:28:11 +0000 (18:28 +0200)]
fortune: update mailing list search url

Markmail no longer exists.

Reviewed by: markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43209

5 months agodaemon: fix recent style regressions
Kyle Evans [Wed, 27 Dec 2023 16:08:28 +0000 (10:08 -0600)]
daemon: fix recent style regressions

Re-wrap the read(2) line, and make the listen_child loop more explicit
in intent.

Reported by: kib
Fixes: 6ac7c9f06ae9 ("daemon: remove redundant parameter from [...]")

5 months agonetmap: Ignore errors in CSB_WRITE()
Mark Johnston [Wed, 27 Dec 2023 15:13:29 +0000 (10:13 -0500)]
netmap: Ignore errors in CSB_WRITE()

The CSB_WRITE() and _READ() macros respectively write to and read from
userspace memory and so can in principle fault.  However, we do not
check for errors and will proceed blindly if they fail.  Add assertions
to verify that they do not.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

Reviewed by: vmaffione
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43200

5 months agolinux: Check for copyout errors in ioctl handlers
Mark Johnston [Wed, 27 Dec 2023 15:13:15 +0000 (10:13 -0500)]
linux: Check for copyout errors in ioctl handlers

In preparation for annotating copyin() and friends with
__result_use_check.

Reviewed by: dchagin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43199

5 months agolinuxkpi: Annotate an unused variable as such
Mark Johnston [Wed, 27 Dec 2023 15:11:33 +0000 (10:11 -0500)]
linuxkpi: Annotate an unused variable as such

This addresses a -Wunused-but-set-variable warning in the gcc builds.

No functional change intended.

Reported by: Jenkins

5 months agoConvert fsidcmp(9) from macro to inline function
Konstantin Belousov [Tue, 26 Dec 2023 19:39:33 +0000 (21:39 +0200)]
Convert fsidcmp(9) from macro to inline function

This allows type checking the arguments.

Explicit structure members comparisions are done to avoid introducting
string.h pollution for userspace.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D43205

5 months agogpioevents: Fix a typo in a diagnostic output message
Gordon Bergling [Wed, 27 Dec 2023 08:41:48 +0000 (09:41 +0100)]
gpioevents: Fix a typo in a diagnostic output message

- s/recieved/received/

MFC after: 3 days

5 months agoipfw(4): Fix a typo in a source code comment
Gordon Bergling [Wed, 27 Dec 2023 08:38:43 +0000 (09:38 +0100)]
ipfw(4): Fix a typo in a source code comment

- s/preserv/preserve/

MFC after: 3 days

5 months agohvsock: Fix a typo in a source code comment
Gordon Bergling [Wed, 27 Dec 2023 08:37:29 +0000 (09:37 +0100)]
hvsock: Fix a typo in a source code comment

- s/recieved/received/

MFC after: 3 days

5 months agotcp_stacks: Fix two typos in a source code comments
Gordon Bergling [Wed, 27 Dec 2023 08:36:30 +0000 (09:36 +0100)]
tcp_stacks: Fix two typos in a source code comments

- s/recieved/received/

MFC after: 3 days

5 months agotail(1): Fix a typo in a source code comment
Gordon Bergling [Wed, 27 Dec 2023 08:35:38 +0000 (09:35 +0100)]
tail(1): Fix a typo in a source code comment

- s/recieved/received/

MFC after: 3 days

5 months agodaemon: separate pipe_fd[2] into pipe_rd and pipe_wr
Ihor Antonov [Wed, 27 Dec 2023 06:07:26 +0000 (00:07 -0600)]
daemon: separate pipe_fd[2] into pipe_rd and pipe_wr

This improves code readability and prevents mixing up read and write
ends of the pipe.

Reviewed by: cperciva, kevans
Requested by: kevans

5 months agodaemon: replace memchr with memrchr
Ihor Antonov [Wed, 27 Dec 2023 06:07:26 +0000 (00:07 -0600)]
daemon: replace memchr with memrchr

Looping over lines in the buffer is not needed.
Same effect can be achieved by looking for the last new line.
If found the buffer is guaranteed to have one or more complete lines.
All complete lines are flushed at once with no looping.

Reviewed by: cperciva, kevans

5 months agodaemon: move buffer into daemon_state
Ihor Antonov [Wed, 27 Dec 2023 06:07:25 +0000 (00:07 -0600)]
daemon: move buffer into daemon_state

There is no reason for a buffer in listen_child()
to be a static function variable. The buffer and
its position are parts of the daemon state and should
live together with the rest of the state variables.

Reviewed by: cperciva, kevans

5 months agodaemon: remove redundant parameter from listen_child()
Ihor Antonov [Wed, 27 Dec 2023 06:07:25 +0000 (00:07 -0600)]
daemon: remove redundant parameter from listen_child()

state already contains pipe fd

Reviewed by: cperciva, kevans

5 months agodaemon: fix clang-tidy warnings
Ihor Antonov [Wed, 27 Dec 2023 06:07:25 +0000 (00:07 -0600)]
daemon: fix clang-tidy warnings

Fixed narrowing conversions:
- strtol replaced with strtonum with range check
- read returns ssize_t
- kevent.data explicitly cast to int before passing into strerror

While we we're here:
- Defined and documented maximum restart delay.
- Fixed typo in a comment.
- Remove unused includes

Reviewed by: cperciva, kevans

5 months agonetlink: simplify socket destruction
Gleb Smirnoff [Wed, 27 Dec 2023 04:22:12 +0000 (20:22 -0800)]
netlink: simplify socket destruction

Destroy the socket at the file descriptor close(2).  There is no
reason to linger for any longer, there are no external references.
Remove pr_detach method as nothing left to do after pr_close.
Remove pr_abort method as it shall never be executed for this type
of socket.

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D42521

5 months agolinux/netlink: don't override sopt level
Gleb Smirnoff [Wed, 27 Dec 2023 04:21:58 +0000 (20:21 -0800)]
linux/netlink: don't override sopt level

This override effectively prevents correct entering of netlink
protocol specific pr_ctloutput in sosetopt().

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D42520

5 months agonetlink: remove unused structure
Gleb Smirnoff [Wed, 27 Dec 2023 04:21:58 +0000 (20:21 -0800)]
netlink: remove unused structure

5 months agoSchedule fast taskqueue callouts on right CPU.
Alexander Motin [Wed, 27 Dec 2023 03:30:56 +0000 (22:30 -0500)]
Schedule fast taskqueue callouts on right CPU.

With fast taskqueues using direct callouts we can reduce number of
CPU wakeups by scheduling callout on current CPU if taskqueue calls
taskqueue_enqueue_timeout() on itself.  The trick won't work for
regular taskqueues, since the callout thread will occupy the CPU.
It also may not work in case of multiple threads since we do not
know which thread will pick the task, and we do not want excessive
callout migrations.  So we optimize only the other cases we can.

In practice this allows iichid(4) taskqueue to stay on CPU where
underlying ig4(4) interrupts are routed and to not kick CPU 0 with
timer interrupts on each sampling period (every 2nd/3rd sleep).

MFC after: 1 month

5 months agoBlock cloning tests.
Pawel Jakub Dawidek [Tue, 26 Dec 2023 20:01:53 +0000 (12:01 -0800)]
Block cloning tests.

The test mostly focus on testing various corner cases.
The tests take a long time to run, so for the common.run runfile
we randomly select a hundred tests.
To run all the bclone tests, bclone.run runfile should be used.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #15631

5 months agonetpfil: Use accessor functions and named constants for all tcphdr flags
Richard Scheffenegger [Mon, 25 Dec 2023 11:26:25 +0000 (12:26 +0100)]
netpfil: Use accessor functions and named constants for all tcphdr flags

Update all remaining references to the struct tcphdr th_x2 field.
This completes the compatibilty of various aspects with AccECN
(TH_AE), after the internal ipfw "re-checksum required" was moved
to use the TH_RES1 flag.

No functional change.

Reviewed By:           tuexen, #transport, glebius
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D43172

5 months agoiichid(4): Switch taskqueue to "fast"
Alexander Motin [Wed, 27 Dec 2023 00:36:34 +0000 (19:36 -0500)]
iichid(4): Switch taskqueue to "fast"

While "fast" taskqueue may be more expensive due to spinlock use,
when used mainly for timeout tasks it allows to avoid extra context
switches to and from callout thread, that is even more expensive.

MFC after: 1 month

5 months agoiichid(4): Unify two taskqueue tasks
Alexander Motin [Wed, 27 Dec 2023 00:28:56 +0000 (19:28 -0500)]
iichid(4): Unify two taskqueue tasks

taskqueue_enqueue_timeout(0) is equivalent to taskqueue_enqueue(),
so no need to create a separate periodic_task and event_task to run
exactly the same handler.

MFC after: 1 month

5 months agofb: Explicitly handle errors when getting or setting a colour palette
Mark Johnston [Wed, 27 Dec 2023 00:00:14 +0000 (19:00 -0500)]
fb: Explicitly handle errors when getting or setting a colour palette

In the VESA driver, simply ignore errors.  It is not clear to me how to
return them to userspace.

This is in preparation for annotating copyin() and related functions
with __result_use_check.

MFC after: 1 week

5 months agohptmv: Handle errors from copyout() in hpt_set_info()
Mark Johnston [Wed, 27 Dec 2023 00:00:01 +0000 (19:00 -0500)]
hptmv: Handle errors from copyout() in hpt_set_info()

This is in preparation for annotating copyin() and related functions
with __result_use_check.

MFC after: 1 week

5 months agotdfx: Handle errors from copyin() and copyout()
Mark Johnston [Tue, 26 Dec 2023 23:59:21 +0000 (18:59 -0500)]
tdfx: Handle errors from copyin() and copyout()

This is in preparation for annotating copyin() and related functions
with __result_use_check.

MFC after: 1 week

5 months agoti: Handle errors from copyin() and copyout()
Mark Johnston [Tue, 26 Dec 2023 23:58:24 +0000 (18:58 -0500)]
ti: Handle errors from copyin() and copyout()

This is in preparation for annotating copyin() and related functions
with __result_use_check.

MFC after: 1 week

5 months agocat: Use present tense
Zhan-Wei [Tue, 26 Dec 2023 23:52:22 +0000 (16:52 -0700)]
cat: Use present tense

Event: Advanced UNIX Programming Course (Fall23) at NTHU.
Reviewed by: imp, lwhsu
Pull Request: https://github.com/freebsd/freebsd-src/pull/923

5 months agoncal(1): print the correct option name when -B is specified twice
Daniel Tameling [Tue, 26 Dec 2023 23:44:47 +0000 (16:44 -0700)]
ncal(1): print the correct option name when -B is specified twice

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/911

5 months agotimeout_test.sh: Fix typo
Elyes Haouas [Tue, 26 Dec 2023 23:39:25 +0000 (16:39 -0700)]
timeout_test.sh: Fix typo

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/906

5 months agosys: ${CFLAGS:N-flto} -> ${CFLAGS:N-flto*}
Alex Xu (Hello71) [Tue, 26 Dec 2023 23:24:53 +0000 (16:24 -0700)]
sys: ${CFLAGS:N-flto} -> ${CFLAGS:N-flto*}

For the same reason as the original https://reviews.freebsd.org/D9659:
-flto=<N>, -flto=full, and -flto=thin also produce the GIMPLE/bitcode
which is not supported by genassym, so filter those out as well.

Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/898

5 months agoatf-sh: fix comment typo
Igor Ostapenko [Tue, 26 Dec 2023 23:21:54 +0000 (16:21 -0700)]
atf-sh: fix comment typo

Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/895

5 months agoRELNOTES: Add an entry for commit 1a878807006c
Rick Macklem [Tue, 26 Dec 2023 23:01:42 +0000 (15:01 -0800)]
RELNOTES: Add an entry for commit 1a878807006c

5 months agonfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2)
Rick Macklem [Tue, 26 Dec 2023 22:33:39 +0000 (14:33 -0800)]
nfscl: Fix handling of expired Kerberos credentials (NFSv4.1/4.2)

If the NFS server detects that the Kerberos credentials provided
by a NFSv4.1/4.2 mount using sec=krb5[ip] have expired, the NFS
server replies with a krpc layer error of RPC_AUTHERROR.
When this happened, the client erroneously left the NFSv4.1/4.2
session slot busy, so that it could not be used by other RPCs.
If this happened for all session slots, the mount point would
hang.

This patch fixes the problem by releasing the session slot
and resetting its sequence# upon receiving a RPC_AUTHERROR
reply.

This bug only affects NFSv4.1/4.2 mounts using sec=krb5[ip],
but has existed since NFSv4.1 client support was added to
FreeBSD.

So, why has the bug remained undetected for so long?
I cannot be sure, but I suspect that, often, the client detected
the Kerberos credential expiration before attempting the RPC.
For this case, the client would not do the RPC and, as such,
there would be no busy session slot.  Also, no hang would
occur until all session slots are busied (64 for a FreeBSD
client/server), so many cases of the bug probably went undetected?
Also, use of sec=krb5[ip] mounts are not that common.

PR: 275905
Tested by: Lexi <lexi.freebsd@le-fay.org>
MFC after: 1 week

5 months agohpts: avoid duplicate call to tcp_output()
Gleb Smirnoff [Tue, 26 Dec 2023 21:09:09 +0000 (13:09 -0800)]
hpts: avoid duplicate call to tcp_output()

Obtained from: rrs

5 months agoofed: use ANSI C functions definitions in opensm/sm.c
Konstantin Belousov [Tue, 26 Dec 2023 19:16:49 +0000 (21:16 +0200)]
ofed: use ANSI C functions definitions in opensm/sm.c

Sponsored by: NVidia networking
MFC after: 1 week

5 months agocat(1): Fix typo
Kai-Yang Chen [Tue, 26 Dec 2023 17:42:38 +0000 (10:42 -0700)]
cat(1): Fix typo

Fix type: rebiuld -> rebuild in Makefile

Event: Advanced UNIX Programming Course (Fall’23) at NTHU.
Reviewed by: imp, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/933

5 months agosh(1): Fix typo
Pei-Ju Chien [Tue, 26 Dec 2023 17:39:10 +0000 (10:39 -0700)]
sh(1): Fix typo

Remove extra 'ing' from 'bookinging.'

Event: Advanced UNIX Programming Course (Fall’23) at NTHU.
Reviewed by: imp, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/934

5 months agosh(1): Fix typo
Kai-Yang Chen [Tue, 26 Dec 2023 17:33:20 +0000 (10:33 -0700)]
sh(1): Fix typo

Event: Advanced UNIX Programming Course (Fall’23) at NTHU.
Reviewed by: imp, @rilysh on github
Pull Request: https://github.com/freebsd/freebsd-src/pull/935

5 months agosh(1): Fix typo
WEININGCHIU [Tue, 26 Dec 2023 17:30:20 +0000 (10:30 -0700)]
sh(1): Fix typo

nozero -> non-zero

Event: Advanced UNIX Programming Course (Fall’23) at NTHU.
Reviewed by: imp, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/936

5 months agoRemove SVN related Git attributes
Minsoo Choo [Tue, 26 Dec 2023 17:24:59 +0000 (10:24 -0700)]
Remove SVN related Git attributes

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/938

5 months agoUpdate MAINTAINERS for Git
Minsoo Choo [Tue, 26 Dec 2023 17:26:16 +0000 (10:26 -0700)]
Update MAINTAINERS for Git

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/937

5 months agoUpdate LOCKS for Git
Minsoo Choo [Tue, 26 Dec 2023 17:26:16 +0000 (10:26 -0700)]
Update LOCKS for Git

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/937

5 months agopax: Add missing 'for' in comment.
Zhan-Wei [Tue, 26 Dec 2023 17:08:58 +0000 (10:08 -0700)]
pax: Add missing 'for' in comment.

Event: Advanced UNIX Programming Course (Fall23) at NTHU.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/941

5 months agomv: Improve comment
Zhan-Wei [Tue, 26 Dec 2023 17:15:46 +0000 (10:15 -0700)]
mv: Improve comment

Fix typo/grammar error: Use the singlar verb ending on exists.

Event: Advanced UNIX Programming Course (Fall23) at NTHU.
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/940

5 months agobluetooth: fix comment in bluetooth.device.conf
lherschi [Tue, 26 Dec 2023 17:18:54 +0000 (10:18 -0700)]
bluetooth: fix comment in bluetooth.device.conf

The default for discoverable is 'NO' not 'YES'. This now matches the man
page.

Event: Advanced UNIX Programming Course (Fall'23) at NTHU.
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/939

5 months agodiff(1): fix a typo
Pin-Yi Kuo [Tue, 26 Dec 2023 17:06:03 +0000 (10:06 -0700)]
diff(1): fix a typo

On the manpage of diff(1), "when" is mistyped to "wen".

Event: Advanced UNIX Programming Course (Fall'23) at NTHU.
Signed-off-by: Pin-Yi Kuo <kuokuoyiyi@gapp.nthu.edu.tw>
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/943

5 months agodf(1): fix a typo
Pin-Yi Kuo [Tue, 26 Dec 2023 16:37:43 +0000 (09:37 -0700)]
df(1): fix a typo

On the manpage of df(1), "according" is mistyped into "acccording"

Event: Advanced UNIX Programming Course (Fall'23) at NTHU.
Signed-off-by: Pin-Yi Kuo <kuokuoyiyi@gapp.nthu.edu.tw>
Reviewed by: imp, zlei, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/944

5 months agobhyve/audio.c: avoid re-calculating the length of dev_name
rilysh [Tue, 26 Dec 2023 16:24:04 +0000 (09:24 -0700)]
bhyve/audio.c: avoid re-calculating the length of dev_name

In the function audio_init(), strlen() is being called two times,
first to get the length of dev_name and second to use in memcpy().
Creating a local variable and keeping the length avoids this
re-calculation.

Signed-off-by: rilysh <nightquick@proton.me>
Reviewed by: imp, zlei
Pull Request: https://github.com/freebsd/freebsd-src/pull/945