Commit Graph

271384 Commits

Author SHA1 Message Date
sebastien.bini
d28d74de87 smp.h: make sign conversion explicit
When comparing singed with unsigned the signed value is casted
to unsigned. Make this explicit as it might lead to compilation
warnings otherwise.

Obtained from:		Stormshield
2022-01-02 08:59:21 +01:00
Warner Losh
4cc76d90ea iicbb: Always build ofw_bus_if.h
Always make ofw_bus_if.h. While it's only used when option FDT is in the
kernel, it can always be generated. In theory we could omit it if option
FDT isn't present, but none of the rest of sys/modules does that. That
fine-grained control likely won't be reliable w/o a redesign of the
kernel/module config system.

Sponsored by:		Netflix
2022-01-02 00:41:28 -07:00
Warner Losh
e0281204cc Add clarifying comments
Expand on the terse comments for where each of these files is used.

Reviewed by:		emaste
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D33716
2022-01-02 00:30:58 -07:00
Kirk McKusick
a115a4aa51 systat -vm: Humanize output for ease of reading.
Using 8 width is too wide for large numbers like 1379991K;
1330M is easier to read.

Submitted by: ota_j.email.ne.jp
Reviewed by:  mckusick
MFC after:    2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33495
2022-01-01 19:48:06 -08:00
Nathan Whitehorn
dfa5a74357 Fix grammatical issues. 2022-01-01 19:34:48 -05:00
Bjoern A. Zeeb
e9016c0be8 iwlwifi: clarify page update
Based on some feedback clarify the man page for
- how to load the driver currently
- status of the driver with respect to iwm(4)
and leave a comment to (automatically) add a full list of chipsets
to the man page.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	debdrup
Differential Revision: https://reviews.freebsd.org/D33713
2022-01-01 20:57:13 +00:00
Alfonso Siciliano
18f20d5d96 bsddialog: convert bsdinstall/distextract
Differential Revision:	https://reviews.freebsd.org/D33581
2022-01-01 21:51:23 +01:00
Michael Tuexen
502d5e8500 sctp: improve counting of incoming chunks
MFC after:	3 days
2022-01-01 20:59:47 +01:00
Michael Tuexen
657fcf5807 udp6: remove assignments not being used
MFC after:	3 days
Sponsored by:	Netflix, Inc.
2022-01-01 19:25:47 +01:00
Michael Tuexen
4760956e9a udp: use appropriate pcbinfo when signalling EHOSTDOWN
MFC after:	3 days
Sponsored by:	Netflix, Inc.
2022-01-01 19:17:17 +01:00
Michael Tuexen
430df2abee in_pcb: improve inp_next()
If there is no inp to check, exit the loop iterating through them.

Reported by:	syzbot+403406a9cbf082b36ea4@syzkaller.appspotmail.com
Reviewed by:	glebius
Sponsored by:	Netflix, Inc.
2022-01-01 19:04:10 +01:00
Ed Maste
c217390359 route: use NULL for null ptr in getaddr call, not 0
Style(9) prefers NULL.

Sponsored by:	The FreeBSD Foundation
2022-01-01 12:02:17 -05:00
Warner Losh
3640e30501 Welcome 2022, update copyrights.
Sponsored by:		Netflix
2022-01-01 09:49:49 -07:00
Stefan Eßer
ec3af9d0ca sys/kern/sched_4bsd.c: fix typo introduced in previous commit 2022-01-01 15:33:38 +01:00
Stefan Eßer
a19bd8e30e Restore variable aliasing in the context of cpu set operations
A simplification of set operations removed side-effects of the
previous code, which are restored by this commit.
2022-01-01 11:58:40 +01:00
Alan Somers
398c88c758 fusefs: implement VOP_ALLOCATE
Now posix_fallocate will be correctly forwarded to fuse file system
servers, for those that support it.

MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D33389
2021-12-31 21:05:28 -07:00
Konstantin Belousov
76ef4f6348 amd64 get_mcontext(): third argument to get_fpcontext() is a pointer
Use NULL instead of raw 0

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2022-01-01 05:58:21 +02:00
Alan Somers
1613087a81 fusefs: fix .. lookups when the parent has been reclaimed.
By default, FUSE file systems are assumed not to support lookups for "."
and "..".  They must opt-in to that.  To cope with this limitation, the
fusefs kernel module caches every fuse vnode's parent's inode number,
and uses that during VOP_LOOKUP for "..".  But if the parent's vnode has
been reclaimed that won't be possible.  Previously we paniced in this
situation.  Now, we'll return ESTALE instead.  Or, if the file system
has opted into ".." lookups, we'll just do that instead.

This commit also fixes VOP_LOOKUP to respect the cache timeout for ".."
lookups, if the FUSE file system specified a finite timeout.

PR:		259974
MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D33239
2021-12-31 20:38:27 -07:00
Alan Somers
8d99a6b91b fusefs: move common code from forget.cc to utils.cc
MFC after:	2 weeks
2021-12-31 20:38:20 -07:00
Alan Somers
19ab361045 fusefs: in the tests, always assume debug.try_reclaim_vnode is available
In an earlier version of the revision that created that sysctl (D20519)
the sysctl was gated by INVARIANTS, so the test had to check for it.
But in the committed version it is always available.

MFC after:	2 weeks
2021-12-31 18:04:52 -07:00
Alan Somers
5169832c96 fusefs: copy_file_range must update file timestamps
If FUSE_COPY_FILE_RANGE returns successfully, update the atime of the
source and the mtime and ctime of the destination.

MFC after:	2 weeks
Reviewers:	pfg
Differential Revision: https://reviews.freebsd.org/D33159
2021-12-31 17:43:57 -07:00
Alan Somers
13d593a5b0 Fix a race in fusefs that can corrupt a file's size.
VOPs like VOP_SETATTR can change a file's size, with the vnode
exclusively locked.  But VOPs like VOP_LOOKUP look up the file size from
the server without the vnode locked.  So a race is possible.  For
example:

1) One thread calls VOP_SETATTR to truncate a file.  It locks the vnode
   and sends FUSE_SETATTR to the server.
2) A second thread calls VOP_LOOKUP and fetches the file's attributes from
   the server.  Then it blocks trying to acquire the vnode lock.
3) FUSE_SETATTR returns and the first thread releases the vnode lock.
4) The second thread acquires the vnode lock and caches the file's
   attributes, which are now out-of-date.

Fix this race by recording a timestamp in the vnode of the last time
that its filesize was modified.  Check that timestamp during VOP_LOOKUP
and VFS_VGET.  If it's newer than the time at which FUSE_LOOKUP was
issued to the server, ignore the attributes returned by FUSE_LOOKUP.

PR:		259071
Reported by:	Agata <chogata@moosefs.pro>
Reviewed by:	pfg
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D33158
2021-12-31 17:38:42 -07:00
Warner Losh
0c8968c6b0 mips: remove forgotten options file too
Sponsored by:		Netflix
2021-12-31 15:09:46 -07:00
Warner Losh
bf89848811 netfpga10: mips only, remove
Sponsored by:		Netflix
2021-12-31 15:09:46 -07:00
Warner Losh
c66fd95c8f mips: Remove dtrace build support
Sponsored by:		Netflix
2021-12-31 15:09:46 -07:00
Warner Losh
f9bf88760d mips: Remove system module support
Remove all mips .if conditionals. Since _sym was now set
unconditionally, just add it to the right place w/o a variable.

Sponsored by:		Netflix
2021-12-31 15:09:46 -07:00
Mark Johnston
6b95cf5bde callout: Wait for the softclock thread to switch before rescheduling
When a softclock thread prepares to go off-CPU, the following happens in
the context of the thread:

1. callout state is locked
2. thread state is set to IWAIT
3. thread lock is switched from the tdq lock to the callout lock
4. tdq lock is released
5. sched_switch() sets td_lock to &blocked_lock
6. sched_switch() releases old td_lock (callout lock)
7. sched_switch() removes td from its runqueue
8. cpu_switch() sets td_lock back to the callout lock

Suppose a timer interrupt fires while the softclock thread is switching
off, and callout_process() schedules the softclock thread.  Then there
is a window between steps 5 and 8 where callout_process() can call
sched_add() while td_lock is &blocked_lock, but this is not correct
since the thread is not logically locked.

callout_process() thus needs to spin waiting for the softclock thread to
finish switching off (i.e., after step 8 completes) before rescheduling
it, since callout_process() does not acquire the thread lock directly.

Reported by:	syzbot+fb44dbf6734ff492c337@syzkaller.appspotmail.com
Fixes:		74cf7cae4d ("softclock: Use dedicated ithreads for running callouts.")
Reviewed by:	mav, kib, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33709
2021-12-31 17:01:39 -05:00
Warner Losh
5a73a6c178 Add lio back to NOTES
lio appears to be partially removed from this file. It's a modern enough
card, so add it back. It builds everywhere.

Sponsored by:		Netflix
2021-12-31 14:56:16 -07:00
Ed Maste
daf481f3d5 rescue: include ping iff at least one of INET & INET6 is enabled
Ping does not build (and serves no purpose) if neither is enabled
(i.e., building WITHOUT_INET and WITHOUT_INET6).

This is equvalent to a4ef9e58bc but for rescue/.

PR:		260082
Fixes:		a4ef9e58bc ("sbin: build ping if at least one of...")
Sponsored by:	The FreeBSD Foundation
2021-12-31 13:16:30 -05:00
Dmitry Wagin
881059955a libc: Some enhancements to syslog(3)
This is a re-application of commit
2d82b47a5b, which was reverted since it
broke with syslog daemons that don't adjust the /dev/log recv buffer
size.  Now that the default is large enough to accomodate 8KB messages,
restore support for large messages.

PR:		260126
2021-12-31 12:57:01 -05:00
Mark Johnston
963f5dc7a3 ctfconvert: Handle arrays of empty structs
Members with such a type will legitimately have a size of zero, so don't
emit a warning.

PR:		260818
Reviewed by:	bz
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33700
2021-12-31 12:55:01 -05:00
Mark Johnston
f04a096049 exec: Simplify sv_copyout_strings implementations a bit
Simplify control flow around handling of the execpath length and signal
trampoline.  Cache the sysentvec pointer in a local variable.

No functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33703
2021-12-31 12:50:15 -05:00
Alexander Motin
757089f01e CAM: List few missed opcodes.
MFC after:	1 weeks
2021-12-31 11:48:03 -05:00
Stefan Eßer
5650d340ad sys/cpuset.h: fix macro definition
The _s parameter was missing in the paramater list.

Reported by:	gljennjohn at gmail.com (Gary Jennejohn)
2021-12-31 14:09:44 +01:00
Bjoern A. Zeeb
58101517cb iwlwifi: import correct firmware versions for select Intel iwlwifi/mvm
The firmware files for 3160, 7260, and 7265 imported contain old versions
no longer supported by the driver.
Replace with latest versions from linux-firmware to possibly also
support these chip revisions.

Reported by:	FreeBSD User (freebsd walstatt-de.de) on wireless (2021-12-30)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-12-31 11:51:18 +00:00
Bjoern A. Zeeb
500be2e803 LinuxKPI: 802.11 fix queue wait
We are using a bandaid to wait for queues after station creation
looping and pausing.
The abort condition was looping in the wrong direction so we were
potentially waiting forever if queues never became ready.
From initial user test data we also found that the wait time was
too low in some cases so increase the length.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-12-31 11:47:14 +00:00
Stefan Eßer
cb65d4432a sys/cpuset.h: add 3 more macros provided by GLIBC
The lang/python* ports failed since they expected CPU_COUNT_S() to be
provided by sys/cpuset.h. Add this function plus 2 more in a way that
is compatible with GLIBC.

Reported by:	ler at lerctr.org (Larry Rosenman)
2021-12-31 11:08:34 +01:00
Doug Moore
b7810e05ff x86-busdma - Add missing paren
Reported by:	jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere
2021-12-31 02:33:54 -06:00
Doug Moore
b496126886 riscv-busdma: Balance parens.
Reported by:	jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere
2021-12-31 02:01:58 -06:00
Warner Losh
f7eed0c124 ar71xx: Remove atheros modules
These are mips only for the atheros MIPS-based SoCs.

Sponsored by:		Netflix
2021-12-31 00:56:43 -07:00
Doug Moore
cfb2aa3f53 iommu_gas: Rename a function missed earlier
Reported by:	jenkins
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere
2021-12-31 01:50:30 -06:00
Warner Losh
abae2c01c5 hwpmc: deorbit mips support
Sponsored by:		Netflix
2021-12-31 00:46:56 -07:00
Warner Losh
373d5df3e3 remove octeon sdk
Octeon is a mips-only target.

Sponsored by:		Netflix
2021-12-31 00:28:12 -07:00
Warner Losh
cb264bc716 mips: Remove thread_db support
Sponsored by:		Netflix
2021-12-31 00:14:53 -07:00
Warner Losh
39034b1254 mips: remove pthread support
Sponsored by:		Netflix
2021-12-31 00:14:53 -07:00
Warner Losh
8ff32ab58e mips: remove libc
Remove mips specific libc code and build infrasturcture.

Sponsored by:		Netflix
2021-12-31 00:14:53 -07:00
Warner Losh
b94b8bf702 mips: Remove msun support
Decommision msun (libm) support for mips.

Sponsored by:		Netflix
2021-12-31 00:14:52 -07:00
Warner Losh
e8399cfbbd mips: Remove CSU
Remove the CSU support for mips.

Sponsored by:		Netflix
2021-12-31 00:14:52 -07:00
Doug Moore
f76916c095 vm_reserv: #include vm_extern.h explicitly, for arm.
Fixes:	c606ab59e7 vm_extern: use standard address checkers everywhere
2021-12-31 00:40:25 -06:00
Doug Moore
e6930b1c5f vm_phys: convert error back to warning
Move an assignment back to where it was before, to turn the
defined-but-not-used error back into a set-but-not-used warning.

Fixes:	01e115ab83 vm_phys: #include vm_extern
2021-12-31 00:23:46 -06:00