]>
CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
Dmitry Chagin [Mon, 9 May 2022 18:16:31 +0000 (21:16 +0300)]
linux(4): Return native error from futex_atomic_op to avoid conversion by the caller.
MFC after: 2 weeks
Dmitry Chagin [Mon, 9 May 2022 18:11:37 +0000 (21:11 +0300)]
linux(4): Fixed offset miscalculation in the preadv/pwritev syscalls.
MFC after: 2 weeks
Dmitry Chagin [Mon, 9 May 2022 18:10:48 +0000 (21:10 +0300)]
linux(4): Regen for prctl syscall.
MFC after: 2 weeks
Dmitry Chagin [Mon, 9 May 2022 18:09:39 +0000 (21:09 +0300)]
linux(4): Change prctl syscall definition to match Linux actual one.
Otherwise argX conversion leads to an unexpected behaviour.
MFC after: 2 weeks
Dmitry Chagin [Mon, 9 May 2022 18:08:59 +0000 (21:08 +0300)]
linux(4): The futex_wait operation should restart.
It's ok from the futex_wait perspective as umtxq_sleep method uses
absolute sleep timeout.
MFC after: 2 weeks
Gleb Smirnoff [Mon, 9 May 2022 17:51:17 +0000 (10:51 -0700)]
domains: undocument dom_destroy() and fix .Dd
Fixes:
24e1c6ae7d3f7731a0884a62e9d5273e5ca1335a
Gleb Smirnoff [Mon, 9 May 2022 17:43:01 +0000 (10:43 -0700)]
sockbufs: make sbrelease_internal() private
Gleb Smirnoff [Mon, 9 May 2022 17:43:01 +0000 (10:43 -0700)]
sockets: remove the socket-on-stack hack from sorflush()
The hack can be tracked down to 4.4BSD, where copy was performed
under splimp() and then after splx() dom_dispose was called.
Stevens has a chapter on this function, but he doesn't answer why
this trick is necessary. Why can't we call into dom_dispose under
splimp()? Anyway, with multithreaded kernel the hack seems to be
necessary to avoid LORs between socket buffer lock and different
filesystem locks, especially network file systems.
The new socket buffers KPI sbcut() from
1d2df300e9b allow us to get
rid of the hack.
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35125
Gleb Smirnoff [Mon, 9 May 2022 17:42:57 +0000 (10:42 -0700)]
sockets: don't call dom_dispose() on a listening socket
sorflush() already did the right thing, so only sofree() needed
a fix. Turn check into assertion in our only dom_dispose method.
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35124
Gleb Smirnoff [Mon, 9 May 2022 17:42:48 +0000 (10:42 -0700)]
sockets: assert that any protocol with PR_RIGHTS has dom_dispose()
Through the entire history only PF_UNIX has this feature.
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35123
Gleb Smirnoff [Mon, 9 May 2022 17:42:48 +0000 (10:42 -0700)]
tests/unix_passfd: add test for shutdown(2) on a buffer with an fd
This has two goals:
- Exercize call to unp_dispose() via soshutdown() instead of sofree()
- Make sure that shutdown indeed dereferences the fd stored
Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35122
Gleb Smirnoff [Mon, 9 May 2022 17:42:48 +0000 (10:42 -0700)]
ng_socket: don't assign NULL in C99 sparse initializer
Gleb Smirnoff [Mon, 9 May 2022 17:42:48 +0000 (10:42 -0700)]
bluetooth: don't assign NULL in C99 sparse initializer
Gleb Smirnoff [Mon, 9 May 2022 17:42:48 +0000 (10:42 -0700)]
unix/*: unp_internalize() can sleep, so allocate mbufs with M_WAITOK
Gleb Smirnoff [Mon, 9 May 2022 17:42:47 +0000 (10:42 -0700)]
sockets: make SO_SND/SO_RCV a enum
Not a functional change now. The enum will also be used for other socket
buffer related KPIs.
Alexander Motin [Mon, 9 May 2022 14:23:23 +0000 (10:23 -0400)]
Fix
bd82711aff98 serial number trailing spaces removal.
For devices returning 16 byte serial numbers with 8 leading spaces
this falsely removed everything due to looking at wrong offset.
Mike Karels [Mon, 9 May 2022 12:19:52 +0000 (07:19 -0500)]
genet: fix output packet corruption in uncommon case
The code for the "shift" block in the COPY macro set the pointer for
the next copy block to the wrong value. In this case, the link-layer
header would be overwritten by the network-layer header. This case is
difficult or impossible to exercise in the current driver without
changing the value of the hw.genet.tx_hdr_min sysctl. Correct the
pointer. While here, remove a line in the macro that was marked
"unneeded", which was actually wrong.
PR: 263824
Submitted by: jiahali@blackberry.com
MFC after: 2 weeks
Adam S [Mon, 9 May 2022 12:44:09 +0000 (08:44 -0400)]
asmc: Update Mac Pro 6 sensor definitions
- Make descriptions a bit more human-friendly.
- Don't attempt to probe fan safe speeds, this model does not provide
one.
PR: 260781
MFC after: 2 weeks
Ruslan Bukin [Mon, 9 May 2022 12:30:37 +0000 (13:30 +0100)]
Allocate resources selectively.
One of the SMMU interrupt lines (priq) is optional and may be ommited in FDT.
Tested on ARM Morello Board, which has three SMMU units: first two have four
interrupt lines, last one has three interrupt lines.
Sponsored by: UKRI
Ruslan Bukin [Mon, 9 May 2022 10:24:47 +0000 (11:24 +0100)]
Change __unused to __diagused.
Pointed out by: jhb
Sponsored by: UKRI
Dmitry Chagin [Sun, 8 May 2022 14:20:52 +0000 (17:20 +0300)]
linux(4): Use the right function to get the bit index in vdso binuptime.
This is modeled after
a1f93266 (by kib@).
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 14:20:52 +0000 (17:20 +0300)]
linux(4): Implement vdso getcpu for x86.
This is modeled after
f2395455 (by kib@).
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 14:20:51 +0000 (17:20 +0300)]
linux(4): Refactor vdso_gettc_x86 includes.
Factor out includes from common vdso_gettc_x86 file to the corresponding
MD files.
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 13:16:47 +0000 (16:16 +0300)]
linux(4): Add a helper intended for copying timespec's from the userspace.
There are many places where we copyin Linux timespec from the userspace
and then convert it to the kernel timespec. To avoid code duplication
add a tiny halper for doing this.
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 12:39:09 +0000 (15:39 +0300)]
linux(4): Prevent time_t overflows on i386.
As native i386 time_t is still 32-bit, check that the user-provided 64-bit
tv_sec value fits to the kernel time_t, return EOVERFLOW if not.
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 12:38:19 +0000 (15:38 +0300)]
linux(4): Zero out high order bits of nanoseconds in the compat mode.
Assuming the kernel would use random data, the 64-bit Linux kernel ignores
upper 32 bits of tv_nsec of struct timespec64 for 32-bit binaries.
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 12:37:27 +0000 (15:37 +0300)]
linux(4): Add a helper intended for copying timespec's to the userspace.
There are many places where we convert natvie timespec and copyout it to
the userspace. To avoid code duplication add a tiny halper for doing this.
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 10:38:17 +0000 (13:38 +0300)]
linux(4): Regen for ppoll_time64 syscall.
MFC after: 2 weeks
Dmitry Chagin [Sun, 8 May 2022 10:37:48 +0000 (13:37 +0300)]
linux(4): Fix ppoll_time64 syscall definition.
Fixed my typo in
ed61e0ce1d . Here tsp is a pointer to the 64-bit timespec.
MFC after: 2 weeks
Peter Holm [Sun, 8 May 2022 07:54:54 +0000 (09:54 +0200)]
stress2: Added a test scenario
Kristof Provost [Sat, 7 May 2022 15:15:34 +0000 (17:15 +0200)]
epair: unbind prior to returning to userspace
If 'options RSS' is set we bind the epair tasks to different CPUs. We
must take care to not keep the current thread bound to the last CPU when
we return to userspace.
MFC after: 1 week
Sponsored by: Orange Business Services
Kristof Provost [Sat, 7 May 2022 14:01:13 +0000 (16:01 +0200)]
in_rss: fix set but not used warning
If 'options RSS' is set.
MFC after: 1 week
Sponsored by: Orange Business Services
Kristof Provost [Sat, 7 May 2022 14:00:42 +0000 (16:00 +0200)]
epair: fix set but not used warning
If 'options RSS' is set.
MFC after: 1 week
Sponsored by: Orange Business Services
Warner Losh [Sat, 7 May 2022 15:49:22 +0000 (09:49 -0600)]
dmesg: Better wording from review
I pushed the last changes before I'd noticed the better wording
suggestions in the review. Also include a note that not all lines will
have a timestampe. Some multi-line messages are generated with sbuf, and
when those are pushed, only the first line will have the
timestamp. Document this quirky behavior as well since fixing it likely
won't happen soon. CAM periph drivers generate all the lines in their
announce message together so they aren't intermingled with other things,
for example.
Suggested by: allanjude, emaste, rpokala
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D35139
Differential Revision: https://reviews.freebsd.org/D35141
Warner Losh [Sat, 7 May 2022 15:32:47 +0000 (09:32 -0600)]
param.h: Bump FreeBSD_Version to
1400058 for devclass newbus changes
jhb changed the newbus ABI and it's affecting some ports. Bump the
version to give them something to key off of for the removal of the
devclass arg from some macros. In theory the change should have been
ABI neutral, but there some build breakage with drm-kmod so better
to bump than not.
Sponsored by: Netflix
Warner Losh [Fri, 6 May 2022 17:31:18 +0000 (11:31 -0600)]
msgbuf: Allow microsecond granularity timestamps
Today, kern.msgbuf_show_timestamp=1 will give 1 second granularity
timestamps on dmesg lines. When kern.msgbuf_show_timestamp=2, we'll
produce microsecond level graunlarity.
For example:
old (== 1):
[13] Dual Console: Video Primary, Serial Secondary
[14] lo0: link state changed to UP
[15] bxe0: NIC Link is Up, 10000 Mbps full duplex, Flow control: ON - receive & transmit
[15] bxe0: link state changed to UP
new (== 2):
[13.807015] Dual Console: Video Primary, Serial Secondary
[14.544150] lo0: link state changed to UP
[15.272044] bxe0: NIC Link is Up, 10000 Mbps full duplex, Flow control: ON - receive & transmit
[15.272052] bxe0: link state changed to UP
Sponsored by: Netflix
Warner Losh [Fri, 6 May 2022 16:32:10 +0000 (10:32 -0600)]
dmesg: Document kern.msgbuf_show_timestamp
kern.msgbuf_show_timestamp=1 turns on timestamps in kernel's message
buffer which dmesg(8) prints.
Sponsored by: Netflix
Ruslan Bukin [Sat, 7 May 2022 10:13:46 +0000 (11:13 +0100)]
Add FDT attachment driver for ARM System MMU v3.2 controller.
Tested on ARM Morello Board.
Sponsored by: UKRI
Ruslan Bukin [Sat, 7 May 2022 10:11:27 +0000 (11:11 +0100)]
Change iommu list lock to SX as we need a sleepable lock so we
can call to ofw_bus_iommu_map().
Sponsored by: UKRI
Ruslan Bukin [Sat, 7 May 2022 09:44:54 +0000 (10:44 +0100)]
Fix !INVARIANTS build.
Sponsored by: UKRI
Ruslan Bukin [Sat, 7 May 2022 09:27:17 +0000 (10:27 +0100)]
Check if iommu ctx is valid before passing it to functions.
Differential Revision: https://reviews.freebsd.org/D35130
Sponsored by: UKRI
Ruslan Bukin [Sat, 7 May 2022 09:24:30 +0000 (10:24 +0100)]
Return error code from IOMMU_MAP and fix build.
Sponsored by: UKRI
Ruslan Bukin [Sat, 7 May 2022 09:17:43 +0000 (10:17 +0100)]
Add OFW_IOMMU id type for pci_get_id() so we can ask parent IOMMU
controller to map PCI RID to an IOMMU specifier.
Sponsored by: UKRI
Discussed with: jhb
Differential Revision: https://reviews.freebsd.org/D35129
Ed Maste [Fri, 6 May 2022 16:41:04 +0000 (12:41 -0400)]
libutil: eliminate one syscall from kinfo_getproc
Previously we invoked the sysctl with a NULL buffer to query the size,
allocated a buffer, then invoked it again to fetch the data.
As we only handle the case where the sysctl provides data of the
expected size we can just allocate a correctly-sized buffer to begin
with.
Reported by: Thomas Hurst via Twitter
Reviewed by: kevans
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35140
Alan Somers [Thu, 5 May 2022 21:35:23 +0000 (15:35 -0600)]
Correctly measure system load averages > 1024
The old fixed-point arithmetic used for calculating load averages had an
overflow at 1024. So on systems with extremely high load, the observed
load average would actually fall back to 0 and shoot up again, creating
a kind of sawtooth graph.
Fix this by using 64-bit math internally, while still reporting the load
average to userspace as a 32-bit number.
Sponsored by: Axcient
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D35134
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
acpi_support: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
isa: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
vmd: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
smartpqi: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
nfe: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
iavf/ice/ixl: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
axgbe: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
agp: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:59 +0000 (15:46 -0700)]
amd64: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
x86: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
kvm_clock: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
isci: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
hyperv: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
fd/fdc: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
bxe: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
atkbd/psm: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
arcmsr: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
crypto: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
linuxkpi: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
cpufreq: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
xl: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:58 +0000 (15:46 -0700)]
xen: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
wpi: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
vte: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
vt: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
vr: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
vmware: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
vmgenc: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
virtio: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
vge: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
usb: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
hid: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
Remove unused hidraw_devclass.
John Baldwin [Fri, 6 May 2022 22:46:57 +0000 (15:46 -0700)]
Remove unused uart_devclass.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
twe/tws: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
ti: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
sym: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
stge: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
ste: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
sound: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
Remove pcm_devclass from DRIVER_MODULE invocations.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
smbios: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
sk: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
sis: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
siis: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
sge: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
sdhci: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:56 +0000 (15:46 -0700)]
rtsx: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
re/rl: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
ral: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
puc: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
ppbus/ppc: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
pms: Remove unused devclass argument to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
pci: Remove unused devclass arguments to DRIVER_MODULE.
John Baldwin [Fri, 6 May 2022 22:46:55 +0000 (15:46 -0700)]
pccbb: Remove unused devclass argument to DRIVER_MODULE.