Commit Graph

273735 Commits

Author SHA1 Message Date
Mateusz Piotrowski
fe1e3b55f2 ifconfig.8: Clean up -l documentation
MFC after: 2 weeks
2022-03-30 14:58:35 +02:00
Mateusz Piotrowski
787599088b ifconfig.8: Clean up -G & -g documentation
MFC after:	2 weeks
2022-03-30 14:58:35 +02:00
Mateusz Piotrowski
0625c31391 ifconfig.8: Clean up documentation of -a, -d, and -u
MFC after:	2 weeks
2022-03-30 14:58:34 +02:00
Mateusz Piotrowski
19c1b75f71 ifconfig.8: Clean up -L documentation
MFC after:	2 weeks
2022-03-30 14:58:34 +02:00
Mateusz Piotrowski
b56e4224e9 ifconfig.8: Clean up -m documentation
MFC after: 2 weeks
2022-03-30 14:58:33 +02:00
Mateusz Piotrowski
f4f02fa1e3 ifconfig.8: Clean up formatting of -f documentation
This change is about moving the -f documentation into the right place in
the manual. Also, document the IFCONFIG_FORMAT variable in the
ENVIRONMENT section.

MFC after:	2 weeks
2022-03-30 14:58:33 +02:00
Mateusz Piotrowski
f15eed7c2a ifconfig.8: Move options sections to the top
In order to clean up the layout of the manual page, let's keep
parameters in the end of the DESCRIPTION section. This patch does not
change any content, it's meant to only move the content around before
refactoring.

MFC after:	2 weeks
2022-03-30 14:58:32 +02:00
Mateusz Piotrowski
12a774649a ifconfig.8: Deduplicate groupname documentation
-G and -g flags are already described somewhere else in the manual.

MFC after:	2 weeks
2022-03-30 14:58:32 +02:00
Kristof Provost
d27c9f5bc3 pf: fixup match rules
Ensure that we can set and print match rules in ethernet rules.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-30 10:28:19 +02:00
Kristof Provost
81cac0d2f6 pf: add missing input/error validation for DIOCGETETHRULE
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-30 10:28:19 +02:00
Kristof Provost
514039bb90 libpfct: Return errno from pfctl_add_eth_rule()
If the pfctl_add_eth_rule() ioctl fails return the errno, not the error
returned by ioctl(). That will give us slightly more insight into what
went wrong, because ioctl() would always return -1.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-30 10:28:19 +02:00
Kristof Provost
9bb06778f8 pf: support listing ethernet anchors
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-03-30 10:28:19 +02:00
Wei Hu
5473dee730 Hyper-V: vPCI: Write back original BAR values after prepopulating bars
In vmbus_pcib_prepopulate_bars(), after writing all 1's to the
avialable device bars, those without being configured by device driver
are also set to its initialized values. However, this could cause
weird problem which results to device failure. The issue has been
reported to happen on LSI 9211-8i HBA card for DDA access on Hyper-V.
Writing back the orignal BAR values seem to work around this problem.

Reported by:	Alexander Motin <mavbsd@gmail.com>
Tested by:	Mathias Kraut <krautmaster@gmail.com>
Fixes:		75412a521f Hyper-V: vPCI: Prepopulate device bars
MFC after:	1 month
2022-03-30 06:56:09 +00:00
Greg Lehey
8deef88628 Correct source markup. No change to output.
Reported by:	0mp@
2022-03-30 14:55:28 +11:00
Greg Lehey
8e4b069f45 Remove reference to kernel clock time zone.
Add references.

Reported by:	philip@
2022-03-30 14:42:14 +11:00
Michael Tuexen
218e463b85 sctp: ensure that ASCONF chunks are not too large
MFC after:	3 days
2022-03-30 01:22:20 +02:00
Ed Maste
868c1b8431 fstyp: detect Raspberry Pi Pico boot filesystem as FAT
fstyp looks for a 0x55 0xAA signature at offset 510, but this is not
required by specifications and is not proivded by the Raspberry Pi Nano
bootloader.

We should really remove the signature check and implement a more
comprehensive BPB validation instead, but it will require more
investigation and testing.  For now just add a special case for the
Raspberry Pi Nano bootloader, to avoid introducing regressions or new
false positives.

PR:		262896
Reviewed by:	delphij
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34699
2022-03-29 17:33:15 -04:00
Michael Tuexen
e7e65008ff sctp: fix typos
Thanks to David Sanders for fixing the typos in the userland stack.

MFC after:	3 days
2022-03-29 21:09:51 +02:00
Ed Maste
f90cd1ae30 Clear non-x86 compat stat syscall kernel stack memory disclosure
32-bit architectures other than i386 have 64-bit time_t which results
in a struct timespec with 12 bytes for tv_sec and tv_nsec, and 4 bytes
of padding.  Zero the padding holes in struct stat32 and struct
freebsd11_stat32.

i386 has 32-bit time_t; struct timespec is 8 bytes and has no padding.

Found by inspection, prompted by a report by Reno Robert of Trend Micro
Zero Day Initiative.  The originally reported issue (ZDI-CAN-14538) is
already fixed in all supported FreeBSD versions (it was addressed
incidentally as part of the 64-bit inode project).

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34709
2022-03-29 16:10:04 -04:00
Mateusz Guzik
e123e2294c pf: guard against DIOCADDRULE without DIOCXBEGIN
Possibility to do it was always a bug, but it runs into crashes
since recent introduction of a per-ruleset RB tree.

Reviewed by:	kp
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Reported by:	syzbot+665b700afc6f69f1766a@syzkaller.appspotmail.com
2022-03-29 19:00:55 +00:00
Gordon Bergling
277d3e855d Revert "drm2: Fix a typo in a source code comment"
The comment about 'mmaping' was actually correct since
the comment was referencing to mmap(2).

Reported by:	alc

This reverts commit 22ba115b49.
2022-03-29 20:47:52 +02:00
Jens Schweikhardt
e50daba0e4 Remove extraneous semicolons trailing break and continue statements. 2022-03-29 19:48:11 +02:00
Mateusz Piotrowski
b710d4c85a ifconfig.8: Document that -k can be used with -a
MFC after:	2 weeks
2022-03-29 19:37:01 +02:00
Mateusz Piotrowski
52ec8807d8 ifconfig.8: Improve -f synopsis
- There is no need to mention in the synopsis that -f can be a list of
  comma-separated type:format pairs. Let's keep it simple instead.
- Mention that -f can be supplied multiple times.
- Add -f to other entries in the synopsis where it can be used.

MFC after:	2 weeks
2022-03-29 19:32:32 +02:00
Mateusz Piotrowski
efb4f7fd09 ifconfig.8: Document the synopsis of -C
As documented, the -C flag can only be used on its own. Any other
command modifiers and flags are ignored when -C is used. Reflect that in
synopsis.

MFC after:	2 weeks
2022-03-29 19:16:07 +02:00
Mateusz Piotrowski
a9475cb389 ifconfig.8: Show that -g groupname can be used on its own
MFC after:	2 weeks
2022-03-29 19:14:20 +02:00
Mateusz Piotrowski
2e053399fc ifconfig.8: Cluster together short flags
MFC after:	2 weeks
2022-03-29 19:12:50 +02:00
Mateusz Piotrowski
d1d14f0428 ifconfig.8: Simplify -G & -g synopsis
MFC after:	1 week
2022-03-29 18:53:10 +02:00
Alfonso S. Siciliano
2617d4df52
bsdinstall mount: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34651
2022-03-29 16:54:51 +02:00
Alfonso S. Siciliano
48af6ad902
bsdinstall fetchmissingdists: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34654
2022-03-29 16:43:01 +02:00
Michael Tuexen
5d0c76c730 sctp: don't lock an already locked stcb.
Reported by:	syzbot+e8dca84da3b4b82f4400@syzkaller.appspotmail.com
MFC after:	3 days
2022-03-29 16:33:53 +02:00
Alfonso S. Siciliano
230811a883
bsdinstall/distfetch: Remove duplicate header
Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34685
2022-03-29 16:19:57 +02:00
Alfonso S. Siciliano
d6e7b1af30
release/rc.local: Replace dialog with bsddialog
Replace (LGPL) dialog utility with (BSD-2-Clause) bsddialog utility.

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34678
2022-03-29 15:21:02 +02:00
Mateusz Piotrowski
075999d3f1 Cross-reference nextboot(8) and freebsd-update(8)
MFC after:	1 week
2022-03-29 15:15:35 +02:00
Mateusz Piotrowski
15647a7106 freebsd-update.8: Fix use of mdoc(8) macros
- Use Ar for arguments.
- Use Cm for freebsd-update commands like "upgrade".
- Reference other manuals with Xr when possible.

MFC after:	1 week
2022-03-29 14:39:15 +02:00
Mateusz Piotrowski
c71a534e1c RELNOTES: Add an entry for boottrace(4)
Reviewed by:	mhorne
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara Inc.
Differential Revision: https://reviews.freebsd.org/D34432
2022-03-29 13:35:14 +02:00
Emmanuel Vadot
d69af4758b Bump __FreeBSD_version after linuxkpi updates 2022-03-29 13:19:32 +02:00
Emmanuel Vadot
1aca8a6ec6 linuxkpi: Add for_each_sgtable_dma_sg and for_each_sgtable_dma_page
Variants of for_each_sg/for_each_sg_dma_page but they operate on sgtable
structs.
Needed by drm v5.10

MFC after:	1 week
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-03-29 13:19:32 +02:00
Emmanuel Vadot
1acf9b2770 linuxkpi: Implement dma_max_mapping_size
Simply returns SCATTERLIST_MAX_SEGMENT.
Needed by drm v5.10

MFC after:	1 week
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2022-03-29 13:19:32 +02:00
Mateusz Guzik
40c911e8da zfs: use zero_region instead of allocating a dedicated page 2022-03-29 11:18:55 +00:00
Mateusz Piotrowski
05621e0b20 ifconfig.8: Add capability codes descriptions from handbook
We document capability codes (the CAPS field of "ifconfig wlan0 scan")
in both ifconfig(8) and the handbook. The list is more complete in the
manual page, while the descriptions of individual capabilities are more
detailed in the handbook.

In order to reduce content duplication and bit rot, let's move
handbook's details to the manual page and reference the manual page
whenever necessary.

Reviewed by:	debdrup
Reviewed by:	Pau Amma
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34662
2022-03-29 13:12:32 +02:00
Mateusz Piotrowski
fd126a732c locking.9: Reference lockstat(1) from this manual page
MFC after:	3 days
2022-03-29 13:12:31 +02:00
Martin Matuska
8d0b6a7d49 zfs: update zfs_config.h and zfs_gitrev.h
Update zfs_config.h and zfs_gitrev.h as missed in da5137abd
2022-03-29 12:40:41 +02:00
Martin Matuska
da5137abdf zfs: merge openzfs/zfs@bc3f12bfa (master) into main
Notable upstream pull request merges:
  #12083 libzfs: FreeBSD doesn't resize partitions for you
  #13106 add physical device size to SIZE column in 'zpool list -v'
  #13158 Allow zfs send to exclude datasets
  #13190 module: zfs: zio_inject: zio_match_handler: don't << -1
  #13219 FreeBSD: add missing replay check to an assert in zfs_xvattr_set
  #13220 module: freebsd: avoid a taking a destroyed lock in zfs_zevent bits
  #13221 Fix ACL checks for NFS kernel server

Obtained from:	OpenZFS
OpenZFS commit:	bc3f12bfac
2022-03-29 12:07:34 +02:00
Piotr Pawel Stefaniak
ae6aa2d43d uudecode: move the new uudecode test from uuencode/ to uudecode/
I don't know how that happened.

Fixes:		9f3203c003 "uudecode: correct error message"
2022-03-29 07:29:39 +02:00
Ed Maste
8276c4149b mpr/mps/mpt: verify cfg page ioctl lengths
*_CFG_PAGE ioctl handlers in the mpr, mps, and mpt drivers allocated a
buffer of a caller-specified size, but copied to it a fixed size header.
Add checks that the size is at least the required minimum.

Note that the device nodes are owned by root:operator with 0640
permissions so the ioctls are not available to unprivileged users.

This change includes suggestions from scottl, markj and mav.

Two of the mpt cases were reported by Lucas Leong (@_wmliang_) of
Trend Micro Zero Day Initiative; scottl reported the third case in mpt.
Same issue found in mpr and mps after discussion with imp.

Reported by:	Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative
Reviewed by:	imp, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34692
2022-03-28 20:35:47 -04:00
Michael Tuexen
5ac91821f5 sctp: get rid of stcb send lock
Just use the stcb lock instead to simplify locking.

Reported by:	syzbot+d00b202063150f85b110@syzkaller.appspotmail.com
Reported by:	syzbot+87f268a0a6d2d6383306@syzkaller.appspotmail.com
MFC after:	3 days
2022-03-29 01:50:17 +02:00
Rick Macklem
c1970a7eba nfscl: Fix IO_APPEND writes from kernel space
Commit 867c27c23a modified the NFS client so that
it did IO_APPEND writes directly to the NFS server
bypassing the buffer cache, via a call to
nfs_directio_write().  Unfortunately, this (very old)
function assumed that the uio iov was for user space
addresses.  As such, a IO_APPEND VOP_WRITE() that
was for system space, such as ktrace(1) does, would
write bogus data.

This patch fixes nfs_directio_write() so that it
handles kernel space uio iovs.

Reported by:	bz
Tested by:	bz
MFC after:	2 weeks
2022-03-28 15:11:52 -07:00
Piotr Pawel Stefaniak
f5138631fb uudecode: use SRCDIR in the regression test
Fixes:		9f3203c003 "uudecode: correct error message"
2022-03-28 21:01:28 +02:00
Brooks Davis
8601fca789 sysent: regen for syscallarg_t 2022-03-28 19:43:03 +01:00