Commit Graph

276217 Commits

Author SHA1 Message Date
Eugene Grosbein
95144583f7 adjkerntz(8): revert "detect extra jailed invokation to keep logs clean"
This reverts commit 048ce0876f
due to bugs. Reworked change will be committed later hopefully.
2022-06-23 21:46:08 +07:00
Tom Jones
26b5deef22 diff3: Add man page description for version and help
Reviewed by:	Pau Amma
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D35325
2022-06-23 13:37:28 +01:00
Dmitry Chagin
ed366c37d8 libsysdecode: Fix a typo in my email
Reported by:		Mikaël Urankar
MFC after:		2 weeks
2022-06-23 12:29:29 +03:00
Kristof Provost
488626e553 pf: copy out rather than m_pullup() in pf_test_eth_rule()
Don't change the mbuf chain layout. We've encountered alignment issues
in the tcp syncookie code on armv7, which are triggered by the
m_pullup() here.

Reviewed by:	mjg
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D35551
2022-06-23 09:50:44 +02:00
Cy Schubert
3e8eb5c7f4 wpa: Disable P2P in WPS
Disable P2P in WPS as it is not supported by FreeBSD. Also, it is not
enabled in wpa_supplicant so the WPS P2P code is redundant.

PR:		264238
Reported by:	adrian
MFC after:	3 days
2022-06-22 20:57:27 -07:00
Chuck Silvers
f1b4324b81 ffs: fix vn_read_from_obj() usage for PAGE_SIZE > block size
vn_read_from_obj() requires that all pages of a vnode (except the last
partial page) be either completely valid or completely invalid,
but for file systems with block size smaller than PAGE_SIZE,
partially valid pages may exist anywhere in the file.
Do not enable the vn_read_from_obj() path in this case.

Reviewed by:	mckusick, kib, markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D34836
2022-06-22 14:57:29 -07:00
Rick Macklem
5d3fe02c5a nfsd: Clean up the code by not using the vnode_vtype() macro
The vnode_vtype() macro was used to make the code compatible
with Mac OSX, for the Mac OSX port.
For FreeBSD, this macro just obscured the code, so
avoid using it to clean up the code.

This commit should not result in a semantics change.
2022-06-22 13:20:32 -07:00
Glen Barber
cf83038cec release: arm - increase IMAGE_SIZE
For some reason, while 3072M is sufficient for 14-CURRENT, it is not
for 13-STABLE.  Notably, previous investigations suggest that there
are changes to makefs(8) in main that do not exist in stable/13,
in which 14-CURRENT seems perfectly happy to ignore the target image
size is smaller than the data being populated to it.

I have no futher investigative details at the moment, but as this had
caused arm failures for the past three weeks, this is the more hasty
measure, hence the MFC timeframe noted.

MFC after:	10 minutes
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-06-22 14:23:39 -04:00
Ed Maste
a8af3aee4b src.conf.5: regen after RELRO knob addition 2022-06-22 12:21:31 -04:00
Ed Maste
2f3a961487 Add RELRO build knob, default to enabled
Note that lld enables relro by default, so that we already had either
partial or full RELRO, depending on the state of the BIND_NOW knob.

Add a RELRO knob so that the option can be disabled if desired, and so
that builds using the GNU toolchain are equivalent to those using the
standard Clang/LLVM toolchain.

Reviewed by:	markj
MFC after:	3 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D35545
2022-06-22 12:18:41 -04:00
Alexander V. Chernikov
5d6894bd66 routing: improve debug logging
Use standard logging (FIB_XX_LOG) across nhg code instead of using
 old-style DPRINTFs.
 Add debug object printer for nhgs (`nhgrp_print_buf`).

Example:

```
Jun 19 20:17:09 devel2 kernel: [nhgrp] inet.0 nhgrp_ctl_alloc_default: multipath init done
Jun 19 20:17:09 devel2 kernel: [nhg_ctl] inet.0 alloc_nhgrp: num_nhops: 2, compiled_nhop: 2

Jun 19 20:17:26 devel2 kernel: [nhg_ctl] inet.0 alloc_nhgrp: num_nhops: 3, compiled_nhop: 3
Jun 19 20:17:26 devel2 kernel: [nhg_ctl] inet.0 destroy_nhgrp: destroying nhg#0/sz=2:[#6:1,#5:1]
```

Differential Revision: https://reviews.freebsd.org/D35525
MFC after: 2 weeks
2022-06-22 15:59:21 +00:00
Stefan Eßer
f6ed05f123 vendor/bc: update to upstream commit ca53adf83b7a
The filter_text function in scripts/functions.sh in version 5.3.3 had
commented out a "rm" command, probably for debugging purposes. This
caused temporary files to persist in /tmp when the bc program had been
built.

This commit fixes the build process with no change of the resulting
artefacts.

(cherry picked from commit 1576f66712)

MFC after:	3 days
2022-06-22 15:56:01 +02:00
Alexander V. Chernikov
c8f34118ac netstat: print path weight when showing routes in structured output.
Differential Revision: https://reviews.freebsd.org/D35530
MFC after:	2 weeks
2022-06-22 12:47:06 +00:00
Konstantin Belousov
8db679af66 UFS: make mkdir() and link() reliable when using SU and reaching nlink limit
i_nlink overflow might be transient, i_effnlink indicates the final
value of the link count after all dependencies would be resolved. So if
i_nlink reached the maximum but i_efflink did not, we should be able to
make the link by syncing.

We must sync the whole filesystem to resolve dependencies,
which requires unlocking vnodes locked for VOPs.  Use existing
ERELOOKUP/VOP_UNLOCK_PAIR() mechanism to restart the VOP if sync with
unlock was done.

PR:	165392
Reported by:	Vsevolod Volkov <vvv@colocall.net>
Reviewed by:	mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35514
2022-06-22 15:35:47 +03:00
Dmitry Chagin
ef1976ccf5 linprocfs: Skip printing of the guard page in the /proc/self/maps
To calculate the base (lowest addressable) address of the stack of the
initial thread glibc parses /proc/self/maps.
In fact, the base address is calculated as 'to' value of stack entry of the
/proc/self/maps - stack size limit (if the stack grows down).
The base address should fit in between preceding entry and stack entry of
the /proc/self/maps.
In FreeBSD, since 19bd0d9 (Implement address space guards), we actually
have two mappings for the stack region. The first one is the no-access
mapping for the region the stack can grow into (guard page), and the
second - initial stack region with size sgrowsiz.
The first mapping confuses Glibc, in the end which is improperly
calculate stack size and the base address.

PR:			253337
Reviewed by:		kib
Differential revision:	https://reviews.freebsd.org/D35537
MFC after:		2 week
2022-06-22 14:49:40 +03:00
Dmitry Chagin
4d496ab44a kdump: Decode Linux *at() syscalls
MFC after:		2 weeks
2022-06-22 14:29:38 +03:00
Dmitry Chagin
d416ee86c7 linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint
MFC after:		2 weeks
2022-06-22 14:28:24 +03:00
Dmitry Chagin
ed2f123a21 kdump: For future use made decode_filemode() public
MFC after:		2 weeks
2022-06-22 14:26:50 +03:00
Dmitry Chagin
fde775bc53 libsysdecode: Decode Linux open() flags
MFC after:		2 weeks
2022-06-22 14:26:10 +03:00
Dmitry Chagin
d2b3237eeb libsysdecode: Decode Linux *at() flags
MFC after:		2 weeks
2022-06-22 14:25:36 +03:00
Dmitry Chagin
39de84b619 kdump: Decode Linux clock_nanosleep syscall
MFC after:		2 weeks
2022-06-22 14:21:42 +03:00
Dmitry Chagin
f587a2a765 kdump: Decode Linux sigprocmask how argument
MFC after:		2 weeks
2022-06-22 14:20:39 +03:00
Dmitry Chagin
b9b86b6742 kdump: Decode getitimer, setitimer which argument
Reviewed by:		jhb (previous version, without truss)
Differential revision:	https://reviews.freebsd.org/D35231
MFC after:		2 weeks
2022-06-22 14:19:31 +03:00
Dmitry Chagin
2fc3a51db1 libsysdecode: Decode setitimer, getitimer which argument
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D35230
MFC after:		2 weeks
2022-06-22 14:17:10 +03:00
Dmitry Chagin
3606a213bf kdump: Decode Linux l_sigset_t.
Reviewed by:		markj
Differential revision:	https://reviews.freebsd.org/D35153
MFC after:		2 weeks
2022-06-22 14:15:20 +03:00
Dmitry Chagin
9310737333 linux(4): Trace Linux l_sigset_t.
MFC after:		2 weeks
2022-06-22 14:09:54 +03:00
Dmitry Chagin
8a0f6d8cfd kdump: Add preliminary support for decoding Linux syscalls
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D35216
MFC after:		2 weeks
2022-06-22 14:03:56 +03:00
Dmitry Chagin
8b8e2e8f41 kdump: For future use extract common code to a separate files
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D35356
MFC after:		2 weeks
2022-06-22 14:01:36 +03:00
Dmitry Chagin
f85848fc61 libsysdecode: Add method for decoding Linux signal names
Reviewed by:		jhb
Differential revision:	https://reviews.freebsd.org/D35215
MFC after:		2 weeks
2022-06-22 14:00:05 +03:00
Dmitry Chagin
b69ae1a34c libsysdecode: Add preliminary support for decoding Linux syscalls
Differential revision:	https://reviews.freebsd.org/D35354
MFC after:		2 weeks
2022-06-22 13:58:53 +03:00
Dmitry Chagin
9dac609629 libsysdecode: For future use extract common code to a separate files
Reviewed by:		jhb, emaste
Differential revision:	https://reviews.freebsd.org/D35353
MFC after:		2 weeks
2022-06-22 13:12:21 +03:00
Neel Chauhan
4f1d91e413 if_ix: Reset on an ECC error
This mirrors the Linux behavior as seen in the kernel commit d773ce2.

Reviewed by:		kbowling
MFH after:		3 days
Differential Revision:	https://reviews.freebsd.org/D35542
2022-06-21 20:22:25 -07:00
Chuck Silvers
5bd21cbbd1 vfs: fix vfs_bio_clrbuf() for PAGE_SIZE > block size
Calculate the desired page valid mask using math that will not
overflow the types used.

Sponsored by:	Netflix

Reviewed by:	mckusick, kib, markj
Differential Revision:	https://reviews.freebsd.org/D34837
2022-06-21 17:58:52 -07:00
Chuck Silvers
82817f26f8 ffs: fix vn_io_fault_pgmove() offset for PAGE_SIZE > block size
The "offset" argument to vn_io_fault_pgmove() is supposed to be
the offset within the page, but for ffs we currently use the offset
within the block.  When the block size is at least as large as the
page size then these values are the same, but when the page size is
larger than the block size then we need to add the offset of
the block within the page as well.

Sponsored by:	Netflix

Reviewed by:	mckusick, kib, markj
Differential Revision:	https://reviews.freebsd.org/D34835
2022-06-21 17:54:18 -07:00
Ed Maste
a4d55999dc Remove ISA sound cards from NOTES
Fixes:		df51e63eb5 ("Retire snd_ad1816 ISA sound card driver")
Fixes:		aa83e9b189 ("Retire snd_ess ISA sound card driver")
Fixes:		754decef38 ("Retire snd_gusc ISA sound card driver")
Fixes:		5126e5eeeb ("Retire snd_mss ISA sound card driver")
Fixes:		716924cb48 ("Retire snd_sbc ISA sound card driver")

Sponsored by:	The FreeBSD Foundation
2022-06-21 16:33:00 -04:00
Ed Maste
716924cb48 Retire snd_sbc ISA sound card driver
Along with the snd_sb8 and snd_sb16 drivers.  They supported ISA
Creative Sound Blaster and compatible sound cards.

Note that isa/sb.h is not removed, as it is still used by some PCI
sound card drivers.

ISA sound card drivers are deprecated as discussed on the current[1] and
stable[2] mailing lists.  Deprecation notices were added in e39ec8933b
and MFCd to stable branches.

Driver removals are being committed individually so that specific
drivers can be restored if necessary (either in FreeBSD or by downstream
projects).

[1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html
[2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html

Reviewed by:	mav
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34671
2022-06-21 14:50:04 -04:00
Ed Maste
5126e5eeeb Retire snd_mss ISA sound card driver
The snd_mss driver supported Microsoft Sound System sound cards.

ISA sound card drivers are deprecated as discussed on the current[1] and
stable[2] mailing lists.  Deprecation notices were added in e39ec8933b
and MFCd to stable branches.

Driver removals are being committed individually so that specific
drivers can be restored if necessary (either in FreeBSD or by downstream
projects).

[1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html
[2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html

Reviewed by:	mav
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	Thttps://reviews.freebsd.org/D34671
2022-06-21 14:50:04 -04:00
Ed Maste
754decef38 Retire snd_gusc ISA sound card driver
snd_gusc supported the Gravis UltraSound MAX and UltraSound PnP sound
cards.

ISA sound card drivers are deprecated as discussed on the current[1] and
stable[2] mailing lists.  Deprecation notices were added in e39ec8933b
and MFCd to stable branches.

Driver removals are being committed individually so that specific
drivers can be restored if necessary (either in FreeBSD or by downstream
projects).

[1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html
[2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html

Reviewed by:	mav
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34671
2022-06-21 14:50:04 -04:00
Ed Maste
aa83e9b189 Retire snd_ess ISA sound card driver
snd_ess supported sound cards using the ESS 18xx chipset.

ISA sound card drivers are deprecated as discussed on the current[1] and
stable[2] mailing lists.  Deprecation notices were added in e39ec8933b
and MFCd to stable branches.

Driver removals are being committed individually so that specific
drivers can be restored if necessary (either in FreeBSD or by downstream
projects).

[1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html
[2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html

Reviewed by:	mav
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34671
2022-06-21 14:50:04 -04:00
Ed Maste
df51e63eb5 Retire snd_ad1816 ISA sound card driver
snd_ad1816 supported ISA sound cards based on the Analog Devices
AD1816A "SoundPort® Controller".

ISA sound card drivers are deprecated as discussed on the current[1] and
stable[2] mailing lists.  Deprecation notices were added in e39ec8933b
and MFCd to stable branches.

Driver removals are being committed individually so that specific
drivers can be restored if necessary (either in FreeBSD or by downstream
projects).

[1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html
[2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html

Reviewed by:	mav
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34671
2022-06-21 14:50:04 -04:00
Eugene Grosbein
048ce0876f adjkerntz(8): detect extra jailed invokation to keep logs clean
It may happen that "adjkerntz -a" called from jailed root crontab.
In that case it spams logs with a line:

sysctl(set: "machdep.wall_cmos_clock"): Operation not permitted

Be silent in that case.

MFC after:	1 month
2022-06-22 01:32:54 +07:00
Jung-uk Kim
b4bdc8f925 OpenSSL: Regen manual pages for OpenSSL 1.1.1p 2022-06-21 14:22:28 -04:00
Jung-uk Kim
ec4d9b059e OpenSSL: Regen assembly file for OpenSSSL 1.1.1p 2022-06-21 14:20:33 -04:00
Jung-uk Kim
83eaf7ae0a OpenSSL: Merge OpenSSL 1.1.1p
Merge commit '54ae8e38f717f22963c2a87f48af6ecefc6b3e9b'
2022-06-21 13:34:41 -04:00
Greg V
8870cb573f LinuxKPI: add asm/neon.h
This is equivalent to asm/fpu/api.h, but is included by drm on aarch64.

Reviewed by:	bz, imp, hselasky
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D35512
2022-06-21 19:10:43 +02:00
Jung-uk Kim
54ae8e38f7 Import OpenSSL 1.1.1p 2022-06-21 10:36:39 -04:00
Emmanuel Vadot
3cbf6518d6 fb: Add a default getinfo method
fb_getinfo is badly designed as it returns either the
info if the driver have the method or ENXIO via the kobj stuff
if the driver doesn't have it.
Add a default method that returns NULL as the code already checks this
and it avoid changing the interface.
None of the drm drivers supported have this method and it sometimes
fails and panic when loading them (for now only usb-c docks seems to be
affected).

MFC after:	3 days
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-06-21 15:52:49 +02:00
Li-Wen Hsu
b256d2dc0c
Temporarily skip flaky test case: sys.netpfil.common.dummynet.ipfw_queue
PR:		264805
Sponsored by:	The FreeBSD Foundation
2022-06-21 20:00:07 +08:00
Hans Petter Selasky
9fc6a63522 ibcore: Fix a race with disassociate and exit_mmap()
If uverbs_user_mmap_disassociate() is called while the mmap is
concurrently doing exit_mmap then the ordering of the
rdma_user_mmap_entry_put() is not reliable.

The put must be done before uvers_user_mmap_disassociate() returns,
otherwise there can be a use after free on the ucontext, and a left over
entry in the xarray. If the put is not done here then it is done during
rdma_umap_close() later.

Add the missing put to the error exit path.

Linux commit:
39c011a538272589b9eb02ff1228af528522a22c

PR:		264473
MFC after:	3 days
Sponsored by:	NVIDIA Networking
2022-06-21 11:33:27 +02:00
Hans Petter Selasky
55d1833671 ibcore: Fix sysfs registration error flow
The kernel commit cited below restructured ib device management
so that the device kobject is initialized in ib_alloc_device.

As part of the restructuring, the kobject is now initialized in
procedure ib_alloc_device, and is later added to the device hierarchy
in the ib_register_device call stack, in procedure
ib_device_register_sysfs (which calls device_add).

However, in the ib_device_register_sysfs error flow, if an error
occurs following the call to device_add, the cleanup procedure
device_unregister is called. This call results in the device object
being deleted -- which results in various use-after-free crashes.

The correct cleanup call is device_del -- which undoes device_add
without deleting the device object.

The device object will then (correctly) be deleted in the
ib_register_device caller's error cleanup flow, when the caller invokes
ib_dealloc_device.

Linux commit:
b312be3d87e4c80872cbea869e569175c5eb0f9a

PR:		264472
MFC after:	3 days
Sponsored by:	NVIDIA Networking
2022-06-21 11:33:27 +02:00