Commit Graph

268827 Commits

Author SHA1 Message Date
Eugene Grosbein
3b4cc56e52 syslogd: undo regression after r326573
Restore ability for our syslogd to collect pre-RFC3164 formatted
messages from remote hosts that was broken with r326573.

For example, the line from Cisco SCE8000 splitted for readability:

1130: 03:37:57: %USER-6-PORT_OPERSTATUS_CHANGE_TRAP: CPU#000 trap:link
down EntityAdminState: 4  EntityAlarmStatus: 32

Such line was collected and stored before mentioned change
but silently dropped after that. Now syslogd saves it again.

Note that parsing of RFC5424 format not changed.

MFC after:	1 month
2021-09-27 14:25:21 +07:00
Yasuhiro Kimura
77087b11e2 Add myself as ports committer and update mentor/mentee information
It corresponds to the 5th step of the procedure described in section
7.1 of Committer's Guide.

Approved by:	meta (mentor)
Differential Revision:	https://reviews.freebsd.org/D32151
2021-09-27 15:10:47 +09:00
Wojciech Macek
8deba29c0a ipsec: fix typo part2 2021-09-27 07:46:56 +02:00
Wojciech Macek
c27214f0af ipsec: fix typo in comment 2021-09-27 07:45:33 +02:00
Piotr Pawel Stefaniak
260f26f035 mount: make libxo support more locale-aware
"special", "node", and "mounter" are not guaranteed to be encoded with
UTF-8. Use the appropriate modifier.

Reported by:	eugen@
2021-09-27 07:12:26 +02:00
Alan Somers
7124d2bc3a fusefs: implement FUSE_NO_OPEN_SUPPORT and FUSE_NO_OPENDIR_SUPPORT
For file systems that allow it, fusefs will skip FUSE_OPEN,
FUSE_RELEASE, FUSE_OPENDIR, and FUSE_RELEASEDIR operations, a minor
optimization.

MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision: https://reviews.freebsd.org/D32141
2021-09-26 21:57:29 -06:00
Alan Somers
a3a1ce3794 fusefs: diff reduction in fuse_kernel.h
Synchronize formatting and documentation in fuse_kernel.h with upstream
sources.

MFC after:	2 weeks
Reviewed by:	pfg
Differential Revision:	https://reviews.freebsd.org/D32141
2021-09-26 21:57:07 -06:00
Rick Macklem
62c5be4ab4 nfscl: Add a check for "has acquired a delegation" to nfscl_removedeleg()
Commit 5e5ca4c8fc added a flag to a NFSv4 mount point that is set when
the first delegation is acquired from the NFSv4 server.

For a common case where delegations are not being issued by the
NFSv4 server, the nfscl_removedeleg() code acquires the mutex lock for
open/lock state, finds the delegation list empty, then just unlocks the
mutex and returns. This patch adds a check of the flag to avoid the
need to acquire the mutex for this common case.

This change appears to be performance neutral for a small number
of opens, but should reduce lock contention for a large number of opens
for the common case where server is not issuing delegations.

This commit should not affect the high level semantics of delegation
handling.

MFC after:      2 weeks
2021-09-26 18:37:25 -07:00
Kevin Bowling
15d077995b ixgbe: whitespace cleanup pass
Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32131
2021-09-26 11:29:02 -07:00
Kevin Bowling
b1d5caf3c7 ixgbe: Rename 'struct adapter' to 'struct ixgbe_softc'
Rename the 'struct adapter' to 'struct ixgbe_softc' to avoid type
ambiguity in things like kgdb.

Reviewed by:	markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32131
2021-09-26 11:18:07 -07:00
Kevin Bowling
21ab8c75c9 e1000: Fix tabstop width in if_em.h
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D32145
2021-09-26 09:24:53 -07:00
Alexander Motin
08063e9f98 sched_ule(4): Fix hang with steal_thresh < 2.
e745d729be caused infinite loop with interrupts disabled in load
stealing code if steal_thresh set below 2.  Such configuration should
not generally be used, but appeared some people are using it to
workaround some problems.

To fix the problem explicitly pass to sched_highest() minimum number
of transferrable threads, supported by the caller, instead of guessing.

MFC after:	25 days
2021-09-26 12:03:05 -04:00
Vincenzo Maffione
3e3314a8b7 netmap: fix uint32_t overflow in pool size calculation
MFC after:	1 week
2021-09-26 13:56:33 +00:00
Vincenzo Maffione
6127ce9d91 netmap: monitor: support offsets in copy mode 2021-09-26 13:52:16 +00:00
Vincenzo Maffione
f7cef43aa9 nemtap: lb app: Validate ihl field when hashing packet
MFC after:	1 week
2021-09-26 13:48:21 +00:00
Gordon Bergling
8771ff7538 jail(9): Fix a typo in a comment
- s/erorr/error/

MFC after:	3 days
2021-09-26 15:17:41 +02:00
Gordon Bergling
90d60ca8b7 nfsclient: Fix a typo in a comment
- s/derefernce/dereference/

MFC after:	3 days
2021-09-26 15:17:00 +02:00
Gordon Bergling
d2e616147d sctp: Fix a typo in a comment
- s/assue/assume/

MFC after:	3 days
2021-09-26 15:15:39 +02:00
Dimitry Andric
8c15a9ce53 Spell cloudabi correctly in ObsoleteFiles.inc
Fixes:		cf0ee8738e Drop cloudabi
2021-09-26 13:26:42 +02:00
Gordon Bergling
513ee901ee pcm(4): Fix a common typo in source code comments
- s/prefered/preferred/

MFC after:	3 days
2021-09-26 11:21:16 +02:00
Philip Paeps
94c2d487f1 contrib/tzdata: import tzdata 2021b
Merge commit 'a5725262945a2971af3b808088217fe975e8364e'

Changes: https://github.com/eggert/tz/blob/2021b/NEWS

MFC after:	3 days
2021-09-26 14:45:39 +08:00
Philip Paeps
a572526294 Import tzdata 2021b 2021-09-26 14:35:07 +08:00
Yoshihiro Ota
cb17f4a6bd kern_ctf: Use zlib's uncompress function for simpler code.
Reviewed by:	markj, delphij
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D21531
2021-09-25 23:33:00 -07:00
Sean Bruno
fb640be4e9 uart: Add PCI ID for intel 100 Series/C230 Series AMT
Reviewed by:	kib
Tested by:	kbowling
Differential Revision:	https://reviews.freebsd.org/D32146
2021-09-25 15:24:34 -07:00
Alexander Motin
695323ae88 acpi_cpu: Fix panic if some CPU devices are disabled.
While there, remove couple unneeded global variables.
2021-09-25 17:01:28 -04:00
Colin Percival
19e4f2f289 efi loader: Call tslog_init from efi_main
We were calling tslog_init from main; no reason to wait that long.

Fixes:		f49381ccb6 efi/loader: Call tslog_init
Sponsored by:	https://www.patreon.com/cperciva
2021-09-25 12:06:07 -07:00
John Baldwin
9d324b5ffc mount: Don't pass a NULL format string to xo_err().
This fixes a -Wformat error from GCC 9.

Fixes:		e725ee7eb6 mount: add libxo(3) support
2021-09-25 11:52:10 -07:00
John Baldwin
0def501d14 mana: Cast an unused value to void to quiet a warning.
This appeases a -Wunused-value warning from GCC 9.

Reviewed by:	whu
Differential Revision:	https://reviews.freebsd.org/D31948
2021-09-25 11:28:14 -07:00
John Baldwin
7ecdfc8237 bhyve: Add an empty case for event types in mevent_kq_fflags().
This fixes a -Wswitch error raised by GCC 9.

Differential Revision:	https://reviews.freebsd.org/D31938
2021-09-25 11:25:25 -07:00
John Baldwin
e72c7e2738 kernel: Disable errors for -Walloca-larger-than for GCC.
GCC complains about the use of alloca() with variable sizes (for XSAVE
state len) in sendsig() for i386.  Modern XSAVE state is probably
getting a bit large for the i386 kstack, but downgrade the error to a
warning.

Reviewed by:	kib, emaste
Differential Revision:	https://reviews.freebsd.org/D31934
2021-09-25 11:24:35 -07:00
John Baldwin
48759c4ed7 bhyve_config.5: Document gdb.address. 2021-09-25 10:07:18 -07:00
John Baldwin
b70b050ab5 bhyve: Update the -G description in the SYNPOSIS.
It was missing both the 'w' flag and 'bind_address'.
2021-09-25 10:01:43 -07:00
Yoshihiro Takahashi
a4724ff481 unzip: sync with NetBSD upstream to add passphrase support
- Add support for password protected zip archives.
  We use memset_s() rather than explicit_bzero() for more portable
  (See PR).
- Use success/failure macro in exit()
- Mention ZIPX format in unzip(1)

Submitted by:	Mingye Wang and Alex Kozlov (ak@)
PR:		244181
Reviewed by:	mizhka
Obtained from:	NetBSD
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28892
2021-09-26 01:32:42 +09:00
Yoshihiro Takahashi
d653b188e8 ng_ether: Create netgraph nodes for bridge interfaces.
Create netgraph nodes for bridge interfaces when the ng_ether module
is loaded.  If a bridge interface is created after loading the ng_ether
module, a netgraph node is created via ether_ifattach().

MFC after:	1 week
2021-09-26 01:24:33 +09:00
Mateusz Guzik
13c63ae08d mmc: fix 1-byte reallocs (when it should have been sizeof device_t)
Reported by KASAN:
panic: ASan: Invalid access, 8-byte write at 0xfffffe00f0992610, RedZonePartial(1)
panic() at panic+0xb5/frame 0xffffffff86a595b0
__asan_store8_noabort() at __asan_store8_noabort+0x376/frame 0xffffffff86a59670
mmc_go_discovery() at mmc_go_discovery+0x6c61/frame 0xffffffff86a5a790
mmc_delayed_attach() at mmc_delayed_attach+0x35/frame 0xffffffff86a5a7b0
[snip]

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-09-25 14:58:31 +00:00
Mateusz Guzik
d71e1a883c fifo: support flock
This evens it up with Linux.

Original patch by:	Greg V <greg@unrelenting.technology>
Differential Revision:	https://reviews.freebsd.org/D24255#565302
2021-09-25 14:58:31 +00:00
Mark Johnston
f766826fe3 amd64: Remove proc0_tf, the bootstrap trapframe
It no longer serves any purpose as thread0's td_frame field is now
initialized during fpuinitstate().  No functional change intended.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32057
2021-09-25 10:18:52 -04:00
Mark Johnston
ca1e447b10 amd64: Avoid copying td_frame from kernel procs
When creating a new thread, we unconditionally copy td_frame from the
creating thread.  For threads which never return to user mode, this is
unnecessary since td_frame just points to the base of the stack or a
random interrupt frame.

If KASAN is configured this copying may also trigger false positives
since the td_frame region may contain poisoned stack regions.  It was
not noticed before since thread0 used a dummy proc0_tf trapframe, and
kernel procs are generally created by thread0.  Since commit
df8dd6025a, though, we call
cpu_thread_alloc(&thread0) when initializing FPU state, which
reinitializes thread0.td_frame.

Work around the problem by not copying the frame unless the copying
thread came from user mode.  While here, de-duplicate the copying and
remove redundant re(initialization) of td_frame.

Reported by:	syzbot+2ec89312bffbf38d9aec@syzkaller.appspotmail.com
Reviewed by:	kib
Fixes:		df8dd6025a
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32057
2021-09-25 10:18:30 -04:00
Mark Johnston
ed8ef7ae8b cam: Avoiding waking up doneq threads if we're dumping
Depending on the state of the target doneq thread at the time of the
panic, the wakeup can hang indefinitely in thread_lock_block_wait().
That function should likely be modified to return immediately if the
scheduler is stopped, but it is also preferable to avoid wakeups in
general after a panic.

Reported by:	pho
Reviewed by:	mav, imp
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32126
2021-09-25 10:15:03 -04:00
Konstantin Belousov
24a3897c2c x86 bounce_bus_dmamem_alloc(): use malloc_aligned() only when possible
malloc_domainset_aligned() requires that alignment is less than
page size. Fall back to other allocation methods, most likely
kmem_alloc_contig(), when malloc_aligned() cannot fullfill the driver
request.

Reported by:	Loic F <loic.f@hardenedbsd.org>
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32127
2021-09-25 15:58:12 +03:00
Konstantin Belousov
71d31f1cf6 malloc_aligned(9): allow zero size and alignment
For alignment we do not need to do anything to make it operational.
For size, upgrade zero sized request to one byte so that we do not
request insane amount of memory for placeholder.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D32127
2021-09-25 15:58:12 +03:00
Gordon Bergling
2ec4c3c7f3 net80211(4): Fix a few common typos in source code comments
- s/annoucement/announcement/
- s/setings/settings/

MFC after:	1 week
2021-09-25 13:57:41 +02:00
Gordon Bergling
2aad906266 ubsan: Fix a typo in an error message
- s/asumption/assumption/

Obtained from:	NetBSD
MFC after:	1 week
2021-09-25 11:47:24 +02:00
Kyle Evans
33c1e7271a hostname: avoid strcpy() overlap in -d flag handling
We don't need the strcpy() anyways, just use a pointer to the hostname
buffer and move it forward for `hostname -d`.

Sponsored by:	Klara, Inc.
2021-09-25 00:03:50 -05:00
Marko Zec
43880c511c [fib_algo][dxr] Split unused range chunk list in multiple buckets
Traversing a single list of unused range chunks in search for a block
of optimal size was suboptimal.

The experience with real-world BGP workloads has shown that on average
unused range chunks are tiny, mostly in length from 1 to 4 or 5, when
DXR is configured with K = 20 which is the current default (D16X4R).

Therefore, introduce a limited amount of buckets to accomodate descriptors
of empty blocks of fixed (small) size, so that those can be found in O(1)
time.  If no empty chunks of the requested size can be found in fixed-size
buckets, the search continues in an unsorted list of empty chunks of
variable lengths, which should only happen infrequently.

This change should permit us to manage significantly more empty range
chunks without sacrifying the speed of incremental range table updating.

MFC after:	3 days
2021-09-25 06:29:48 +02:00
Alexander Motin
d3a8f98acb Make CPU children explicitly share parent unit numbers.
Before this device unit number match was coincidental and broke if I
disabled some CPU device(s).  Aside of cosmetics, for some drivers
(may be considered broken) it caused talking to wrong CPUs.
2021-09-24 23:31:51 -04:00
Colin Percival
0a35c4b3ca loader printf: Profile with TSLOG
Now that the loader tslog code doesn't call printf, we can profile
printf using TSLOG.  On an EC2 c5.xlarge instance, we spend roughly
45 ms here (out of roughly 500 ms), presumably due to the time spent
writing output to the console.

MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2021-09-24 20:23:49 -07:00
Colin Percival
242923eb84 loader tslog: Don't use sprintf
Instead, append the log entry "manually".

MFC after:	1 week
Sponsored by:	https://www.patreon.com/cperciva
2021-09-24 20:23:37 -07:00
Kyle Evans
6687410af7 makesyscalls: sprinkle some assert() on standard function calls
Improves our error reporting, ensuring that we aren't just ignoring
errors in the common case.

Note specifically the boundary where we have to change up our error
handling approach.  It's fine to error() out up until we create the
tempdir, then the rest should try to handle it gracefully and abort().
A future change will clean this up further by pcall'ing all of the bits
that cannot currently error() without cleaning up.
2021-09-24 20:55:56 -05:00
Kyle Evans
e12a0ffe2b makesyscalls: rip out arbitrary command execution
This was previously needed only for CloudABI, which used it to generate
its capenabled from syscalls.master.  CloudABI was removed in
cf0ee8738e, so we don't need to support this anymore.  Others looking
to do similar things should come up with a more integrated technique,
such as a .conf flag or pattern/glob support.  brooks suggests that it
could be done in modern makesyscalls.lua by adding a config flag to
specify always-on/initial flags (CAPENABLED).

Reviewed by:	brooks, imp
MFC after:	never
Differential Revision:	https://reviews.freebsd.org/D32095
2021-09-24 20:53:44 -05:00