]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agolinux(4): Implement poll system call via linux_common_ppol()
Dmitry Chagin [Tue, 22 Jun 2021 05:07:46 +0000 (08:07 +0300)]
linux(4): Implement poll system call via linux_common_ppol()
for the sake of converting events to/from native.

MFC after: 2 weeks

(cherry picked from commit 2eff670fde51762239fc64139b0cfb5272ce9cdd)

2 years agolinux(4): Rework Linux ppoll system call.
Dmitry Chagin [Tue, 22 Jun 2021 05:06:05 +0000 (08:06 +0300)]
linux(4): Rework Linux ppoll system call.

For now the Linux emulation layer uses in kernel ppoll(2) without
conversion of user supplied fd 'events', and does not convert the
kernel supplied fd 'revents'.

At least POLLRDHUP is handled by FreeBSD differently than by
Linux. Seems that Linux silencly ignores POLLRDHUP on non socket fd's
unlike FreeBSD, which does more strictly check and fails.

Rework the Linux ppoll, using kern_poll and converting 'events'
and 'revents' values.
While here, move poll events defines to the MI part of code as they
mostly identical on all arches except arm.

Differential Revision: https://reviews.freebsd.org/D30716
MFC after: 2 weeks

(cherry picked from commit 26795a0378b58c3e26b68577a4cc446ab527e8b5)

2 years agosg: get rid of unused include.
Dmitry Chagin [Sun, 13 Jun 2021 08:30:49 +0000 (11:30 +0300)]
sg: get rid of unused include.

sg driver does not depends on the Linuxulator any more.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D30750
MFC after: 2 weeks

(cherry picked from commit 8345c513c552f458e0d3993e2606c5e98bb79c8b)

2 years agolinux: improve reporting for unsupported syscall flags
Edward Tomasz Napierala [Tue, 15 Jun 2021 09:18:04 +0000 (10:18 +0100)]
linux: improve reporting for unsupported syscall flags

Filter out the flags we do support; previously we would print
out the flag value verbatim.

Reviewed By: dchagin
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D30693

(cherry picked from commit 9d167945e8409c739442a02e3fbacb3bcdcc3306)

2 years agolinux(4): Regen for ppoll_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 12:19:12 +0000 (15:19 +0300)]
linux(4): Regen for ppoll_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 89f15b79b187a31815b2d65d900e4ba78a9754ef)

2 years agolinux(4): Implement ppoll_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 12:18:46 +0000 (15:18 +0300)]
linux(4): Implement ppoll_time64 system call.

MFC after: 2 weeks

(cherry picked from commit ed61e0ce1d293d659b86e382def05a31ac337e03)

2 years agoSplit kern_poll() on two counterparts.
Dmitry Chagin [Thu, 10 Jun 2021 12:11:25 +0000 (15:11 +0300)]
Split kern_poll() on two counterparts.

The kern_poll_kfds() operates on clear kernel data, kfds points to an
array in the kernel, while kern_poll() operates on user supplied pollfd.
Move nfds check to kern_poll_maxfds().

No functional changes, it's for future use in the Linux emulation layer.

Reviewd by: kib
Differential Revision: https://reviews.freebsd.org/D30690
MFC after: 2 weeks

(cherry picked from commit e884512ad143952f0dbacad631487ce28363fd08)

2 years agolinux(4): Regen for pselect6_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 12:04:37 +0000 (15:04 +0300)]
linux(4): Regen for pselect6_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 981a60f112e213e7b8de04bf66588cab5c480b34)

2 years agolinux(4): Implement pselect6_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 12:03:30 +0000 (15:03 +0300)]
linux(4): Implement pselect6_time64 system call.

MFC after: 2 weeks

(cherry picked from commit f6d075ecd76925cbe56ea528a59bd74e4dd9451e)

2 years agolinux(4): Regen for rt_sigtimedwait_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 11:52:43 +0000 (14:52 +0300)]
linux(4): Regen for rt_sigtimedwait_time64 system call.

MFC after: 2 weeks

(cherry picked from commit c0025290006044d2dd7e3b1b52c04d796dddc374)

2 years agolinux(4): Implement rt_sigtimedwait_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 11:51:30 +0000 (14:51 +0300)]
linux(4): Implement rt_sigtimedwait_time64 system call.

It still does not work as intended, awaits D30675.

MFC after: 2 weeks

(cherry picked from commit db4a1f331b73eb821d5d9c3cbb478ad50223f023)

2 years agolinux(4): Regen for futex_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 11:28:25 +0000 (14:28 +0300)]
linux(4): Regen for futex_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 985978806e21073c5578198fedfdd414290c3e64)

2 years agolinux(4): Implement futex_time64 system call.
Dmitry Chagin [Thu, 10 Jun 2021 11:27:06 +0000 (14:27 +0300)]
linux(4): Implement futex_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 2e46d0c3d983ccd603b9bcfb318c37404b0dbc7f)

2 years agolinux(4): Regen for futex system call.
Dmitry Chagin [Thu, 10 Jun 2021 11:16:40 +0000 (14:16 +0300)]
linux(4): Regen for futex system call.

MFC after: 2 weeks

(cherry picked from commit ee64d982049544b1e8a77acc01fd230c906fb305)

2 years agolinux(4): Change Linux futex syscall definition to match Linux actual one.
Dmitry Chagin [Thu, 10 Jun 2021 11:00:00 +0000 (14:00 +0300)]
linux(4): Change Linux futex syscall definition to match Linux actual one.

MFC after: 2 weeks

(cherry picked from commit 3c1de151e365f05809264352b1d57125d792f373)

2 years agoFix copyright, remove "all rights reserved".
Dmitry Chagin [Tue, 8 Jun 2021 05:18:00 +0000 (08:18 +0300)]
Fix copyright, remove "all rights reserved".

The eventfd code was written by me, rdivacky@ copyrigth applicable only
to epoll part of the Linuxulator code. Roman is ok to retire his copyright
from sys/kern/sys_eventfd.c and 'All rights reserved.' lines from
sys/compat/linux/linux_event.[c|h] and sys/kern/sys_eventfd.c files.

Reviewed by: kib, emaste
Approved by: rdivacky
Differential Revision: https://reviews.freebsd.org/D30677
MFC after: 2 weeks

(cherry picked from commit f570a6723e145ae585bfb402f3f42260687666d3)

2 years agolinux(4): Fix clock_nanosleep return value for unsupported clockid.
Dmitry Chagin [Mon, 7 Jun 2021 03:22:25 +0000 (06:22 +0300)]
linux(4): Fix clock_nanosleep return value for unsupported clockid.

The Linux clock_nanosleep() returns ENOTSUP for CLOCK_THREAD_CPUTIME_ID.
This silence one of the LTP clock_nanosleep tests.

MFC after: 2 weeks

(cherry picked from commit 66e73ce7371b717b8dd0dfd6e3deeacfa95e6f8b)

2 years agolinux(4): optimize ksiginfo to siginfo conversion.
Dmitry Chagin [Mon, 7 Jun 2021 03:06:17 +0000 (06:06 +0300)]
linux(4): optimize ksiginfo to siginfo conversion.

Retire ksiginfo_to_lsiginfo function, use siginfo_to_lsiginfo instead.
Convert rt_sigtimedwait siginfo variables to well known names.

MFC after: 2 weeks

(cherry picked from commit f4e801085b055fd33f680dd7cb9f8562d236f39a)

2 years agolinux(4): Properly convert linux siginfo to native siginfo
Dmitry Chagin [Mon, 7 Jun 2021 02:55:34 +0000 (05:55 +0300)]
linux(4): Properly convert linux siginfo to native siginfo
add input validation.

MFC after: 2 weeks

(cherry picked from commit 9c1045ff00935a4bb0592d8c00ca1981d3e6eb8b)

2 years agoRegen for ('0f8dab45404f347752470579feccc6d2739b9570') Linux
Dmitry Chagin [Mon, 7 Jun 2021 02:39:29 +0000 (05:39 +0300)]
Regen for ('0f8dab45404f347752470579feccc6d2739b9570') Linux
rt_sigtimedwait system call.

MFC after: 2 weeks

(cherry picked from commit e29ea22f7012bb94f5f427349aa4580539cf2b7c)

2 years agolinux(4): Fix timeout parameter of rt_sigtimedwait syscall, which is
Dmitry Chagin [Mon, 7 Jun 2021 02:35:35 +0000 (05:35 +0300)]
linux(4): Fix timeout parameter of rt_sigtimedwait syscall, which is
timespec not a timeval.

MFC after: 2 weeks

(cherry picked from commit 0f8dab45404f347752470579feccc6d2739b9570)

2 years agoRegen for ('6501370a7dfb358daf07555136742bc064e68cb7') Linux
Dmitry Chagin [Mon, 7 Jun 2021 02:29:27 +0000 (05:29 +0300)]
Regen for ('6501370a7dfb358daf07555136742bc064e68cb7') Linux
clock_nanosleep_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 56b187005c07562dd85f126ee6d2986df1881cec)

2 years agolinux(4): Implement clock_nanosleep_time64 system call.
Dmitry Chagin [Mon, 7 Jun 2021 02:26:48 +0000 (05:26 +0300)]
linux(4): Implement clock_nanosleep_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 6501370a7dfb358daf07555136742bc064e68cb7)

2 years agoRegen for ('187715a420237e1ed94dd5aef158eada7dcdc559') Linux
Dmitry Chagin [Mon, 7 Jun 2021 02:21:48 +0000 (05:21 +0300)]
Regen for ('187715a420237e1ed94dd5aef158eada7dcdc559') Linux
clock_getres_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 773d9153c37a709d5c12bc8abe9166e1d044c01b)

2 years agolinux(4): Implement clock_getres_time64 system call.
Dmitry Chagin [Mon, 7 Jun 2021 02:21:32 +0000 (05:21 +0300)]
linux(4): Implement clock_getres_time64 system call.

MFC after: 2 weeks

(cherry picked from commit 187715a420237e1ed94dd5aef158eada7dcdc559)

2 years agoRegen for ('19f9a0e4df54f8d1e99234146024422bdcfa09ce') Linux
Dmitry Chagin [Mon, 7 Jun 2021 02:14:04 +0000 (05:14 +0300)]
Regen for ('19f9a0e4df54f8d1e99234146024422bdcfa09ce') Linux
clock_settime64 system call.

MFC after: 2 weeks

(cherry picked from commit 82e38486548c70b9e7fc4323376aab85f5cc026c)

2 years agolinux(4): Implement clock_settime64 system call.
Dmitry Chagin [Mon, 7 Jun 2021 02:11:25 +0000 (05:11 +0300)]
linux(4): Implement clock_settime64 system call.

MFC after: 2 weeks

(cherry picked from commit 19f9a0e4df54f8d1e99234146024422bdcfa09ce)

2 years agoRegen for ('99b6f430698fa00a33184dd61591d8b6518ed9d3') Linux
Dmitry Chagin [Mon, 7 Jun 2021 02:08:11 +0000 (05:08 +0300)]
Regen for ('99b6f430698fa00a33184dd61591d8b6518ed9d3') Linux
clock_gettime64 system call.

MFC after: 2 weeks

(cherry picked from commit 9e07ae7a096742018aafb7e29ddf5c4cac8c1e7e)

2 years agolinux(4): Implement clock_gettime64 system call.
Dmitry Chagin [Mon, 7 Jun 2021 02:04:42 +0000 (05:04 +0300)]
linux(4): Implement clock_gettime64 system call.

MFC after: 2 weeks

(cherry picked from commit 99b6f430698fa00a33184dd61591d8b6518ed9d3)

2 years agoRegen for ('e4bffb80bbc6a2e4b3be89aefcbd5bb2c2fc0ba0') Linux
Dmitry Chagin [Mon, 7 Jun 2021 01:56:58 +0000 (04:56 +0300)]
Regen for ('e4bffb80bbc6a2e4b3be89aefcbd5bb2c2fc0ba0') Linux
utimensat_time64 syscall.

MFC after: 2 weeks

(cherry picked from commit ea7fa5583c407664b278a5f50cb16c7a7c6bcbc0)

2 years agolinux(4): Implement utimensat_time64 system call.
Dmitry Chagin [Mon, 7 Jun 2021 01:54:30 +0000 (04:54 +0300)]
linux(4): Implement utimensat_time64 system call.

MFC after: 2 weeks

(cherry picked from commit e4bffb80bbc6a2e4b3be89aefcbd5bb2c2fc0ba0)

2 years agolinux(4): add struct timespec64 definition and conversion routine for
Dmitry Chagin [Mon, 7 Jun 2021 01:47:12 +0000 (04:47 +0300)]
linux(4): add struct timespec64 definition and conversion routine for
future use.

MFC after: 2 weeks

(cherry picked from commit bfcce1a9f6e3c9defde10bb1f83d4ba9752c23f6)

2 years agolinux(4): Microoptimize futimesat, utimes, utime.
Dmitry Chagin [Mon, 31 May 2021 19:54:18 +0000 (22:54 +0300)]
linux(4): Microoptimize futimesat, utimes, utime.
While here wrap long line.

Differential Revision: https://reviews.freebsd.org/D30488
MFC after: 2 weeks

(cherry picked from commit 2a0fa277f66b0dc81a97d0f7fc6dc91ff5a7fd9c)

2 years agolinux(4): Handle AT_EMPTY_PATH in the utimensat syscall.
Dmitry Chagin [Mon, 31 May 2021 19:37:06 +0000 (22:37 +0300)]
linux(4): Handle AT_EMPTY_PATH in the utimensat syscall.

Differential Revision: https://reviews.freebsd.org/D30518
MFC after: 2 weeks

(cherry picked from commit b4f9b6eef2bb30059cf1040383c88c94f4d093a5)

2 years agolinux(4): Convert flags before use in utimensat.
Dmitry Chagin [Mon, 31 May 2021 19:30:37 +0000 (22:30 +0300)]
linux(4): Convert flags before use in utimensat.

Differential Revision: https://reviews.freebsd.org/D30487
MFC after: 2 weeks

(cherry picked from commit 8505eb5dd8f743f29e9c93b6814a34f1890e6c41)

2 years agolinux(4): Add F_GETPIPE_SZ fcntl operation which returns the capacity
Dmitry Chagin [Mon, 31 May 2021 19:15:02 +0000 (22:15 +0300)]
linux(4): Add F_GETPIPE_SZ fcntl operation which returns the capacity
of the pipe referred by fd.

Differential Revision: https://reviews.freebsd.org/D30517
MFC after: 2 weeks

(cherry picked from commit a06c12464bb49750c6b113c971e2770408ce422a)

2 years agolinux(4); Retire unnecessary __packed attribute from some struct's
Dmitry Chagin [Mon, 31 May 2021 18:56:34 +0000 (21:56 +0300)]
linux(4); Retire unnecessary __packed attribute from some struct's
definition.

Differential Revision: https://reviews.freebsd.org/D30482
MFC after: 2 weeks

(cherry picked from commit 19593f775c23623571cac4cf638996f5c11e91f4)

2 years agolinux: remove redundant SDT tracepoints
Dmitry Chagin [Fri, 17 Jun 2022 19:22:15 +0000 (22:22 +0300)]
linux: remove redundant SDT tracepoints

Remove all the 'entry' and 'return' probes; they clutter up the source
and are redundant to FBT.

Reviewed By:    dchagin
Sponsored By:   EPSRC
Differential Revision:  https://reviews.freebsd.org/D30040

(cherry picked from commit 5e8caee259d0cc73301b8fc60c8fb388e7f745af)

2 years agolinux(4): make linkat(2) handle AT_EMPTY_PATH
Edward Tomasz Napierala [Tue, 4 May 2021 12:09:31 +0000 (13:09 +0100)]
linux(4): make linkat(2) handle AT_EMPTY_PATH

Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29974

(cherry picked from commit ee384b229dc62b2b0c9180db8c71fa99f30144cf)

2 years agokern_linkat: modify to accept AT_ flags instead of FOLLOW/NOFOLLOW
Edward Tomasz Napierala [Sun, 25 Apr 2021 13:13:02 +0000 (14:13 +0100)]
kern_linkat: modify to accept AT_ flags instead of FOLLOW/NOFOLLOW

This makes this API match other kern_xxxat() functions.

Reviewed By: kib
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29776

(cherry picked from commit 5d1d844a77622878cd05478d4ab504f70e067248)

2 years agoUpdate tools/regression/poll/sockpoll.c for POLLRDPOLL.
Thomas Munro [Wed, 28 Apr 2021 11:08:27 +0000 (23:08 +1200)]
Update tools/regression/poll/sockpoll.c for POLLRDPOLL.

Add a POLLRDHUP example to this tool, for comparison with other
operating systems.  Also record current output on FreeBSD and Linux.

Reviewed by:    kib
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D29757

(cherry picked from commit 18f21f0355481283ceef0ec10e99554f44c205c2)

2 years agopoll(2): Add POLLRDHUP.
Thomas Munro [Wed, 28 Apr 2021 09:31:38 +0000 (21:31 +1200)]
poll(2): Add POLLRDHUP.

Teach poll(2) to support Linux-style POLLRDHUP events for sockets, if
requested.  Triggered when the remote peer shuts down writing or closes
its end.

Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D29757

(cherry picked from commit 3aaaa2efde896e19d229ee2cf09fe7e6ab0fbf6e)

2 years agolinux: drop unneeded casts
Edward Tomasz Napierala [Mon, 15 Feb 2021 12:34:10 +0000 (12:34 +0000)]
linux: drop unneeded casts

No functional changes.

Sponsored By: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28533

(cherry picked from commit cc743b050acf59862b268296d50923d6e5f0e86f)

2 years agoLoader: support booting OS from memory disk (MD)
Yongbo Yao [Wed, 7 Apr 2021 18:33:22 +0000 (13:33 -0500)]
Loader: support booting OS from memory disk (MD)

Until now, the boot image can be embedded into the loader with
/sys/tools/embed_mfs.sh, and memory disk (MD) is already supported
in loader source. But due to memory disk (MD) driver isn't registered
to the loader yet, the boot image can't be boot from embedded memory
disk.

Reviewed by: dab, tsoome
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D29512

(cherry picked from commit 5984246f9626fbc3d356ee2d3b3cd159f6d0a7c2)

2 years agobsdinstall/scripts/docsinstall: Add Indonesian Documentation
Marc Fonvieille [Mon, 6 Jun 2022 11:40:56 +0000 (13:40 +0200)]
bsdinstall/scripts/docsinstall: Add Indonesian Documentation

Add Indonesian Documentation to docinstall menu.

Approved by: doceng (implicit) re (gjb, implicit)
MFC after: 1 week

(cherry picked from commit 45ef6b4b5db14eaadb1c8c2eda48353c112fd2ae)

2 years agosshd_config: clarify password authentication options
Ed Maste [Wed, 25 May 2022 13:32:57 +0000 (09:32 -0400)]
sshd_config: clarify password authentication options

Passwords may be accepted by both the PasswordAuthentication and
KbdInteractiveAuthentication authentication schemes.  Add a reference to
the latter in the description/comment for PasswordAuthentication, as it
otherwise may seem that "PasswordAuthentication no" implies passwords
will be disallowed.

This situation should be clarified with more extensive documentation on
the authentication schemes and configuration options, but that should be
done in coordination with upstream OpenSSH.  This is a minimal change
that will hopefully clarify the situation without requiring an extensive
local patch set.

PR: 263045
Reviewed by: manu (earlier version)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35272

(cherry picked from commit 9f009e066f088e2c31442db31d2a85001040abfe)

2 years agogetpagesize(3): add .Xr to sysconf(3)
Ed Maste [Mon, 30 May 2022 19:34:34 +0000 (15:34 -0400)]
getpagesize(3): add .Xr to sysconf(3)

POSIX deprecated getpagesize(3).  The portable way to obtain the page
size is `sysconf(_SC_PAGESIZE)`.

Reviewed by: cperciva (earlier), imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35352

(cherry picked from commit 49c937e7040c44afdcfccede57dcecaf9ff08ed6)

2 years agosyscons: note incompatibility with UEFI
Ed Maste [Thu, 26 May 2022 00:19:24 +0000 (20:19 -0400)]
syscons: note incompatibility with UEFI

PR: 264226
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 20b2b464ebb6748756e262d8a421509a2937c74b)

2 years agomakefs: sort cd9660 sysid entries in man page
Ed Maste [Wed, 18 May 2022 19:38:54 +0000 (15:38 -0400)]
makefs: sort cd9660 sysid entries in man page

"efi" was added at the end of the sysid list rather than in alpha
order.  Move it as a diff reduction against NetBSD.

(cherry picked from commit ec3c01ae7233088057395aa50be2439d1abde828)

2 years agoloader.efi: add cross-reference to loader(8)
Ed Maste [Wed, 18 May 2022 14:33:20 +0000 (10:33 -0400)]
loader.efi: add cross-reference to loader(8)

The loader.efi man page describes UEFI-specific loader details, but not
general loader information.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f70de61e567df59bceb2d18c8bc1b54943a7466b)

2 years agourtw(4): Adjust all pause calls to use milliseconds instead of ticks.
Hans Petter Selasky [Thu, 9 Jun 2022 13:11:29 +0000 (15:11 +0200)]
urtw(4): Adjust all pause calls to use milliseconds instead of ticks.

Sponsored by: NVIDIA Networking

(cherry picked from commit c6c22ebb38e7371191e2f8c411b81011ecbe096a)

2 years agoupgt(4): Adjust all pause calls to use milliseconds instead of ticks.
Hans Petter Selasky [Thu, 9 Jun 2022 13:14:17 +0000 (15:14 +0200)]
upgt(4): Adjust all pause calls to use milliseconds instead of ticks.

Sponsored by: NVIDIA Networking

(cherry picked from commit bc2e447338b7ade8d800d1f24913bb3873c65f99)

2 years agoMerge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c
Dimitry Andric [Sun, 12 Jun 2022 18:51:09 +0000 (20:51 +0200)]
Merge llvm-project release/14.x llvmorg-14.0.5-0-gc12386ae247c

This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-14.0.5-0-gc12386ae247c, aka 14.0.5 release.

PR: 261742
MFC after: 3 days

(cherry picked from commit 56f451bb3b99a72f73d6771b98825a0b00784e7b)

2 years agoFix mtree for usr/
Xin LI [Sun, 12 Jun 2022 04:37:15 +0000 (21:37 -0700)]
Fix mtree for usr/

MFC after: 3 days

(cherry picked from commit 695052e240c7c4291707a55358fe79de9ef79767)

Account for missing `..' in BSD.usr.dist for clang 14.0.3.

MFC after: 3 days

(cherry picked from commit 1d25053e9365e99a2d16f2ee64d3416f14f7f167)

Remove yet another incorrect .. level from BSD.usr.dist

Since the spacing was off, it was not clear that it descended one level
too many.

Fixes: 695052e240c7
MFC after: 3 days

(cherry picked from commit 987d26ee3f7a1685f7070db834478964170b6f62)

2 years agomlx4core: Use-after-free causes a resource leak in flow-steering detach
Hans Petter Selasky [Tue, 7 Jun 2022 14:27:53 +0000 (16:27 +0200)]
mlx4core: Use-after-free causes a resource leak in flow-steering detach

mlx4_QP_FLOW_STEERING_DETACH_wrapper first removes the steering
rule (which results in freeing the rule structure), and then
references a field in this struct (the qp number) when releasing the
busy-status on the rule's qp.

Since this memory was freed, it could reallocated and changed.
Therefore, the qp number in the struct may be incorrect,
so that we are releasing the incorrect qp. This leaves the rule's qp
in the busy state (and could possibly release an incorrect qp as well).

Fix this by saving the qp number in a local variable, for use after
removing the steering rule.

Linux commit:
3b01fe7f91c8e4f9afc4fae3c5af72c14958d2d8

PR:       264469
Sponsored by: NVIDIA Networking

(cherry picked from commit dd2a8c8f72d369440c36f10512324d42ecedb5c7)

2 years agoktls: Refer send tag pointer once.
Hans Petter Selasky [Wed, 25 May 2022 12:16:27 +0000 (14:16 +0200)]
ktls: Refer send tag pointer once.

So that the asserts and the actual code see the same values.

Differential revision: https://reviews.freebsd.org/D32356
Sponsored by: NVIDIA Networking

(cherry picked from commit f0fca64618045bba23f4d61a377b64f9acb96220)

2 years agong_ubt(4): Probe USB Bluetooth per USB interface and not per USB device.
Hans Petter Selasky [Fri, 3 Jun 2022 08:22:54 +0000 (10:22 +0200)]
ng_ubt(4): Probe USB Bluetooth per USB interface and not per USB device.

PR: 264416
Sponsored by: NVIDIA Networking

(cherry picked from commit 9d28e15e7bbee7a809eb4ccab558d114d4343312)

2 years agoRegen src.conf.5 for recent MFCs
Ed Maste [Tue, 14 Jun 2022 00:34:43 +0000 (20:34 -0400)]
Regen src.conf.5 for recent MFCs

2 years agofdescfs: allow chown/utime etc on fdescfs fd for underlying files opened with O_PATH
Konstantin Belousov [Sun, 5 Jun 2022 18:49:09 +0000 (21:49 +0300)]
fdescfs: allow chown/utime etc on fdescfs fd for underlying files opened with O_PATH

(cherry picked from commit 156745b42d9e6dfa3d9c6dc480db7836683850cf)

2 years agoAlso define THR_PAGE_SIZE_MIN for mips
Dimitry Andric [Mon, 13 Jun 2022 18:55:23 +0000 (20:55 +0200)]
Also define THR_PAGE_SIZE_MIN for mips

Commit 6173c7833be4, which cherry-picked commit c7904405a8d4 ("Remove
PAGE_SIZE from libthr") to stable/13 resulted in build errors on mips:

/usr/src/lib/libthr/thread/thr_barrier.c:40:50: error: use of undeclared identifier 'THR_PAGE_SIZE_MIN'
_Static_assert(sizeof(struct pthread_barrier) <= THR_PAGE_SIZE_MIN,
                                                 ^

This is because c7904405a8d4 defined THR_PAGE_SIZE_MIN for all supported
architectures in main/14-CURRENT, but that list no longer includes mips.
Add a similar define for mips, so libthr can build successfully again.

Direct commit to stable/13, since main no longer has mips.

Fixes: 6173c7833be4

2 years agosrc.conf.5: Update the WITHOUT_ZFS description
Mark Johnston [Mon, 30 May 2022 14:45:57 +0000 (10:45 -0400)]
src.conf.5: Update the WITHOUT_ZFS description

... to take into account programs and libraries which might implement
some ZFS-specific features without being exclusive to ZFS.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation

(cherry picked from commit f7f387730e3fc7d6e3807c1300269cd127ad3234)

2 years agosmp: Use local copies of the setup function pointer and argument
Yuichiro NAITO [Mon, 6 Jun 2022 15:21:33 +0000 (11:21 -0400)]
smp: Use local copies of the setup function pointer and argument

No functional change intended.

PR: 264383
Reviewed by: jhb, markj

(cherry picked from commit 8d95f500521128c2b40270bdd703a54b56dbccf2)

2 years agopkgbase: Move pw to the runtime package
Doug Rabson [Mon, 30 May 2022 13:22:08 +0000 (14:22 +0100)]
pkgbase: Move pw to the runtime package

This allows building a container image with enough functionality for
downloading and installing packages without having to include the
utilities package.

Reviewed by: manu
MFC after:   2 weeks

(cherry picked from commit 5e9c888a7ac014f81bcf369ff3d38690d51545ee)

2 years agosqlite3: Vendor import of sqlite3 3.38.5
Cy Schubert [Thu, 12 May 2022 19:25:36 +0000 (12:25 -0700)]
sqlite3: Vendor import of sqlite3 3.38.5

Changes at https://www.sqlite.org/releaselog/3_38_5.html.

Obtained from https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz.

Merge commit 'b562e59e27efbea397bdc8782dfceaa3c0e23542'

(cherry picked from commit 4fe1295c964fa712dd763e3852187da8724ef79a)

2 years agomount_nfs: Only create a mounttab file entry is nmount(2) succeeds
Rick Macklem [Sat, 28 May 2022 22:48:40 +0000 (15:48 -0700)]
mount_nfs: Only create a mounttab file entry is nmount(2) succeeds

mount_nfs creates entries in the mounttab file and umount removes
them.  Entries in the mounttab file ae used by rpc.umntall to
notify the NFS server that NFSv3 entries need to be removed when
they have not been removed by umount.

Without this patch, an enty will be created in the mounttab file,
even if the nmount(2) syscall fails for the mount.  This patch
modifies the code so that the mounttab entry is only created
after nmount(2) succeeds.

This change only affects NFSv3 and only affects how showmount
displays NFSv3 mounts.

(cherry picked from commit 7cab630ba4fb26bf85336a89d88721ed2315c46c)

2 years agonfscl: Add a diagnostic printf() for a "should never happen" case
Rick Macklem [Fri, 27 May 2022 21:32:46 +0000 (14:32 -0700)]
nfscl: Add a diagnostic printf() for a "should never happen" case

When a NFSv4.1/4.2 session to the NFS server (not a pNFS DS) is
replaced, the old session should always be marked defunct by
nfsess_defunct being set non-zero.

However, the hang reported by the PR suggests that this might
be the case.

This patch adds a printf() to indicate this has somehow happened.

PR: 260011

(cherry picked from commit a7bb120f8b8735bc4c417b3c8fc2308c3d2964aa)

2 years agonfscl: Do not handle NFSERR_BADSESSION in operation code
Rick Macklem [Fri, 27 May 2022 21:20:31 +0000 (14:20 -0700)]
nfscl: Do not handle NFSERR_BADSESSION in operation code

The NFSERR_BADSESSION reply from a NFSv4.1/4.2 server
is handled by newnfs_request().  It should not be handled
separately after newnfs_request() has returned.

These two cases were spotted during code inspection.
One of them should only redo what newnfs_request() already
did by the same "nfscl" thread.  The other might have
resulted in recovery being done twice, but the code is
only used for "pnfs" mounts, so that would be rare.
Also, since NFSERR_BADSESSION should only be replied by
a server after the server reboots, this would be extremely
rare.

(cherry picked from commit 425e5c739bcf190265330b79e85f89eb4d7b5f25)

2 years agofirewire.4: Fix typo
PauAmma [Mon, 6 Jun 2022 03:52:34 +0000 (23:52 -0400)]
firewire.4: Fix typo

While there, replace dead wiki URL with dev handbook one and fix markup.

Reviewed by: gbe
Differential Revision: https://reviews.freebsd.org/D35252

(cherry picked from commit eabfcbbfe1a4bee09d1dab659116ccbb8e36f88f)

2 years agobuild(7): fix references to svn(1) and svnlite(1)
Fernando ApesteguĂ­a [Fri, 23 Apr 2021 16:59:19 +0000 (18:59 +0200)]
build(7): fix references to svn(1) and svnlite(1)

Replace them with references to Git.

PR: 254937
Reported by: m.bueker@berlin.de
Approved by: 0mp (mentor)
Differential Revision: https://reviews.freebsd.org/D29949

(cherry picked from commit e444a4c677ee3e86038ba2179c4838f5f4b778cd)

2 years agoal_eth: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:33:36 +0000 (15:33 +0200)]
al_eth: Fix a typo in a source code comment

- s/enought/enough/

(cherry picked from commit 45b143d2ea5fb0389304cc918781e98696a4b48f)

2 years agoipsec(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:28:20 +0000 (12:28 +0200)]
ipsec(4): Fix a typo in a source code comment

- s/formated/formatted/

(cherry picked from commit 7a33c6bf52b747a1725a2a3665c438cd5a9e9355)

2 years agofstype(8): Fix two typos in source code comments
Gordon Bergling [Sat, 4 Jun 2022 08:38:48 +0000 (10:38 +0200)]
fstype(8): Fix two typos in source code comments

- s/auxillary/auxiliary/

(cherry picked from commit df4da2d6b7bc96abb1ae78bb1f2d28150124bd15)

2 years agorack: Fix a common typo in comments and a sysctl description
Gordon Bergling [Sat, 4 Jun 2022 15:56:56 +0000 (17:56 +0200)]
rack: Fix a common typo in comments and a sysctl description

- s/multipler/multiplier/

(cherry picked from commit 32a01b2b8691453b59a26cf273a5a5eae7643985)

2 years agoamdsbwd(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:26:44 +0000 (11:26 +0200)]
amdsbwd(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit 68c0bd3e3f45e030d48b354d7444934ca381a07e)

2 years agoufs: Fix a typo a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:23:53 +0000 (15:23 +0200)]
ufs: Fix a typo a source code comment

- s/droped/dropped/

(cherry picked from commit a429d3050ec3f2a807d6e74be80b055ee636cb6f)

2 years agolinux(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:27:19 +0000 (11:27 +0200)]
linux(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit 8cf0d094629edbafc1d6de055cef6a53d6a4addb)

2 years agopowerpc: Fix a typo in a comment
Gordon Bergling [Sat, 4 Jun 2022 17:55:03 +0000 (19:55 +0200)]
powerpc: Fix a typo in a comment

- s/layed/laid/

(cherry picked from commit 23615a3e4e41f55693980fdcb6842a25754741c9)

2 years agopowerpc: Fix two typos in source code comments
Gordon Bergling [Sat, 4 Jun 2022 08:39:50 +0000 (10:39 +0200)]
powerpc: Fix two typos in source code comments

- s/auxillary/auxiliary/

(cherry picked from commit d8dd4b2fd2bdedb33978692c82fc494aa594b8b2)

2 years agonvmw(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:46:03 +0000 (11:46 +0200)]
nvmw(4): Fix a typo in a source code comment

- s/inaccessable/inaccessible/

(cherry picked from commit 6e8ab6715d3589ad5577ad5fa408f81b4a7077e9)

2 years agotegra: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:54:09 +0000 (11:54 +0200)]
tegra: Fix a typo in a source code comment

- s/Disble/Disable/

(cherry picked from commit 415e8d12d12808897fe23f06637e942f5a4a2d06)

2 years agomake.conf: Fix a typo in the example file
Gordon Bergling [Sat, 4 Jun 2022 10:24:17 +0000 (12:24 +0200)]
make.conf: Fix a typo in the example file

- s/architechture/architecture/

(cherry picked from commit 6300e58ab2d2575852e15724a74d545cea32cef5)

2 years agousbhid(3): Fix a typo in the manual page
Gordon Bergling [Sat, 4 Jun 2022 17:54:25 +0000 (19:54 +0200)]
usbhid(3): Fix a typo in the manual page

- s/layed/laid/

(cherry picked from commit 9b15c51b0551fe09d589d06e654ce61584e3f61c)

2 years agovm_page: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:52:22 +0000 (12:52 +0200)]
vm_page: Fix a typo in a source code comment

- s/consistancy/consistency/

(cherry picked from commit f77a88c855c557902e4e4c9696b08e847c413f54)

2 years agotcp_rack: Fix two typos in sysctl descriptions
Gordon Bergling [Sat, 4 Jun 2022 09:24:18 +0000 (11:24 +0200)]
tcp_rack: Fix two typos in sysctl descriptions

- s/higest/highest/

(cherry picked from commit 21b923c33082b0123a7c638e8984fd313c3a6f1f)

2 years agoaic7xxx: Fix a few typos in comments and an error message
Gordon Bergling [Sat, 4 Jun 2022 14:49:53 +0000 (16:49 +0200)]
aic7xxx: Fix a few typos in comments and an error message

- s/directrive/directive/
- s/specifiled/specified/
- s/Decend/Descend/
- s/tranversal/transversal/

Obtained from: NetBSD

(cherry picked from commit d35e1c29a9bb5c2ed98a6d8df171b3b3c8439130)

2 years agoac(8): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:41:20 +0000 (12:41 +0200)]
ac(8): Fix a typo in a source code comment

- s/chosing/choosing/

(cherry picked from commit 10924c4fc3bec1a3170681e42c3a854845584a51)

2 years agoena(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 15:17:04 +0000 (17:17 +0200)]
ena(4): Fix a typo in a source code comment

- s/entred/entered/

(cherry picked from commit eb3f25b413c5d8912cdb40f2040a0b678a2af2fd)

2 years agokthread(9): Add a missing space
Gordon Bergling [Sat, 4 Jun 2022 18:15:07 +0000 (20:15 +0200)]
kthread(9): Add a missing space

- s/inthe/in the/

(cherry picked from commit a7f5cf2096346076ef16bed9c40b21d3d7a7bd8f)

2 years agosound(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:11:06 +0000 (12:11 +0200)]
sound(4): Fix a typo in a source code comment

- s/alltogether/altogether/

(cherry picked from commit 70311ccffc2f9233cc4c3db1bb706f0566d6818d)

2 years agohptmv(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:28:52 +0000 (13:28 +0200)]
hptmv(4): Fix a typo in a source code comment

- s/continous/continuous/

(cherry picked from commit bbb0ca45f8189911a35ba76000783b05188153af)

2 years agofpu: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:15:53 +0000 (13:15 +0200)]
fpu: Fix a typo in a source code comment

- s/choise/choice/

Obtained from: NetBSD

(cherry picked from commit faff37be462262c6ae958c93f0aa27118d4d62cf)

2 years agole(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 10:00:44 +0000 (12:00 +0200)]
le(4): Fix a typo in a source code comment

- s/brodcast/broadcast/

(cherry picked from commit b008ab622c401ee2e705b1fe5804865982dac11c)

2 years agoif_bridge(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 09:26:01 +0000 (11:26 +0200)]
if_bridge(4): Fix a typo in a source code comment

- s/accross/across/

(cherry picked from commit f7faa4ad4844470058b84fa35156c463cfa8bd85)

2 years agorack: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 13:32:59 +0000 (15:32 +0200)]
rack: Fix a typo in a source code comment

- s/enought/enough/

(cherry picked from commit c93db89231fedd4afe64915cf8dcad89bfdd3c94)

2 years agoif_llatbl: Fix a typo in a debug statement
Gordon Bergling [Sat, 4 Jun 2022 13:22:09 +0000 (15:22 +0200)]
if_llatbl: Fix a typo in a debug statement

- s/droped/dropped/

Obtained from: NetBSD

(cherry picked from commit 4f493559b0d7853c7521bd3cb5affe659914e479)

2 years agonvmecontrol(8): Fix a typo in an error message
Gordon Bergling [Sat, 4 Jun 2022 18:30:48 +0000 (20:30 +0200)]
nvmecontrol(8): Fix a typo in an error message

- s/insufficent/insufficient/

(cherry picked from commit e2dfabb5895122ce46e627e53347f0e81019c95f)

2 years agoacpi(4): Fix a typo in a debug statement
Gordon Bergling [Sat, 4 Jun 2022 13:17:09 +0000 (15:17 +0200)]
acpi(4): Fix a typo in a debug statement

- s/Efficency/tEfficiency/

Obtained from: NetBSD

(cherry picked from commit 0b4302aa934d748503d6377f875f2972db41a092)

2 years agoif_sis(4): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 14:56:18 +0000 (16:56 +0200)]
if_sis(4): Fix a typo in a source code comment

- s/emperical/empirical/

(cherry picked from commit 3c2ea3ca28c5e95185f57ff27148909c8f846c3e)

2 years agosed(1): Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 18:27:45 +0000 (20:27 +0200)]
sed(1): Fix a typo in a source code comment

- s/Initialy/Initially/

Obtained from: NetBSD

(cherry picked from commit bb0e21032bf61a93489f8b964b6707038cc4d1c3)

2 years agoam335x: Fix a typo in a source code comment
Gordon Bergling [Sat, 4 Jun 2022 11:28:10 +0000 (13:28 +0200)]
am335x: Fix a typo in a source code comment

- s/continous/continuous/

(cherry picked from commit 1261c01d7fa25955610936f690e237b7c308ee5b)