aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ipmi: Remove some dead code for unsupported BMCs.John Baldwin2023-04-101-5/+1
| | | | | | Reviewed by: emaste Reported by: GCC Differential Revision: https://reviews.freebsd.org/D39351
* procfs: Document the content of /proc/$PID/map.Joseph Koshy2023-04-101-2/+88
| | | | | Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D39484
* Implement GEOM::rotation_rate for gmirrorAlan Somers2023-04-102-0/+30
| | | | | | | | | | | If all of the mirror's children have the same rotation rate, report that. But if they have mixed rotation rates, or if any child has an unknown rotation rate, report "Unknown". MFC after: 2 weeks Sponsored by: Axcient Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39458
* ofw: fix memory leak in ofwbus_attach()Christos Margiolis2023-04-101-0/+1
| | | | | | | | PR: 269509 Reported by: Jaroslaw Pelczar <jarek@jpelczar.com> Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38903
* dtrace: handle NOP instructions in the riscv invop handlerChristos Margiolis2023-04-101-0/+3
| | | | | | | | | This will be used by a forthcoming port of the kinst provider. Reviewed by: markj MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39481
* bridge: Add support for emulated netmap modeMark Johnston2023-04-105-10/+134
| | | | | | | | | | | | | | | | | | | | | | | | | if_bridge receives packets via a special interface, if_bridge_input, rather than by if_input. Thus, netmap's usual hooking of ifnet routines does not work as expected. Instead, modify bridge_input() to pass packets directly to netmap when it is enabled. This applies to both locally delivered packets and forwarded packets. When a netmap application transmits a packet by writing it to the host TX ring, the mbuf chain is passed to if_input, which ordinarily points to ether_input(). However, when transmitting via if_bridge, bridge_input() needs to see the packet again in order to decide whether to deliver or forward. Thus, introduce a new protocol flag, M_BRIDGE_INJECT, which 1) causes the packet to be passed to bridge_input() again after Ethernet processing, and 2) avoids passing the packet back to netmap. The source MAC address of the packet is used to determine the original "receiving" interface. Reviewed by: vmaffione MFC after: 2 months Sponsored by: Zenarmor Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38066
* makefs: simplify filename conversion handlingEd Maste2023-04-101-24/+5
| | | | | Obtained from: OpenBSD 4095a2e01d18 Sponsored by: The FreeBSD Foundation
* epair tests: test PCP tagged packetsKristof Provost2023-04-102-0/+66
| | | | | | | PR: 270736 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39483
* if_epair: also remove vlan metadata from mbufsKristof Provost2023-04-101-0/+6
| | | | | | | | | | | | | We already remove mbuf tags from packets transitting an if_epair, but we didn't remove vlan metadata. In certain configurations this could lead to unexpected vlan tags turning up on the rx side. PR: 270736 Reviewed by: markj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39482
* makefs: remove some unused cd9660 types and definesEd Maste2023-04-101-23/+0
| | | | | Obtained from: OpenBSD Sponsored by: The FreeBSD Foundation
* bridge.4: Document the net.link.bridge.log_mac_flap sysctl variableZhenlei Huang2023-04-101-1/+10
| | | | | | | | It was introduced in 2d3614fb132b (bridge: Log MAC address port flapping). Reviewed by: gbe (manpages) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39465
* stress2: Update the exclude listPeter Holm2023-04-101-2/+1
|
* DEBUG_VFS_LOCKS: use witness if availableKonstantin Belousov2023-04-093-3/+15
| | | | | | | | | | | | The assert_vop_locked messages are ignored, and file/line information is not too useful. Fixing this without changing both witness and VFS asserts KPIs is not possible. Reviewed by: markj (previous version) Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39464
* netlink: improve source ifa selection algorithm when adding routes.Alexander V. Chernikov2023-04-091-1/+13
| | | | | | | | | | Use route destination sockaddr when the gateway is eiter AF_LINK or has the different family (IPv4 over IPv6). This change ensures the nexthop IFA has the same family as the destination. Reported by: Dmitriy Smirnov <fox@sage.su> Tested by: Dmitriy Smirnov <fox@sage.su> MFC after: 3 days
* route: remove always-true expressionAlexander V. Chernikov2023-04-091-2/+1
|
* netlink: set prefix-related flags to the created nexthop.Alexander V. Chernikov2023-04-091-1/+3
| | | | | | | This fixes incorrect flag combinations when adding IPv4/IPv6 host routes. MFC after: 3 days
* netlink: do not print "unknown sa family" warnings at the default debugAlexander V. Chernikov2023-04-081-1/+1
| | | | | | level. MFC after: 2 weeks
* netlink: fix !INET6 warningAlexander V. Chernikov2023-04-081-0/+2
| | | | | Reported by: Gary Jennejohn <garyj@gmx.de> MFC after: 2 weeks
* route: switch transport protocol to Netlink.Alexander V. Chernikov2023-04-081-0/+4
| | | | All known bugs have been fixed, try to enable Netlink once again.
* Bump __FreeBSD_version to 1400086 for vn_lock_pair arg changeMateusz Guzik2023-04-081-1/+1
| | | | Sponsored by: Rubicon Communications, LLC ("Netgate")
* usb(4): Separate the fast path and the slow path to avoid races and ↵Hans Petter Selasky2023-04-084-41/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | use-after-free for the USB FS interface. Bad behaving user-space USB applicatoins may crash the kernel by issuing USB FS related ioctl(2)'s out of their expected order. By default the USB FS ioctl(2) interface is only available to the administrator, root, and driver applications like webcamd(8) needs to be hijacked in order for this to happen. The issue is the fast-path code does not always see updates made by the slow-path code, and may then work on freed memory. This is easily fixed by using an EPOCH(9) type of synchronization mechanism. A SX(9) lock will be used as a substitute for EPOCH(9), due to the need for sleepability. In addition most calls going into the fast-path originate from a single user-space process and the need for multi-thread performance is not present. Differential Revision: https://reviews.freebsd.org/D39373 Reviewed by: markj@ Reported by: C Turt <ecturt@gmail.com> admbugs: 994 MFC after: 1 week Sponsored by: NVIDIA Networking
* usb(4): Code refactoring as a pre-step for adding missing synchronization ↵Hans Petter Selasky2023-04-081-227/+226
| | | | | | | | | | | | | | mechanism. Move code in switch cases into own functions to make later changes easier to track. No functional change, except for removing a superfluous break statement when range checking USB_FS_MAX_FRAMES, in the USB_FS_OPEN case. It should not have been there at all. Suggested by: emaste@ MFC after: 1 week Sponsored by: NVIDIA Networking
* route: fix netlink route operations with link-local gw / dst.Alexander V. Chernikov2023-04-081-1/+18
| | | | | Extract ifindex from either gw or dst sockaddr and add it as a dedicated RTA_OIF attribute.
* stress2: Tune MAXVNODES to avoid excessive run timePeter Holm2023-04-081-2/+2
|
* openzfs: adopt to the new vn_lock_pair() interfaceKonstantin Belousov2023-04-071-1/+2
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* vn_lock_pair(): allow to request shared lockingKonstantin Belousov2023-04-076-36/+71
| | | | | | | | | | | If either of vnodes is shared locked, lock must not be recursed. Requested by: rmacklem Reviewed by: markj, rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39444
* zfs: disable kernel fpu usage on arm and aarc64Mateusz Guzik2023-04-072-2/+2
| | | | | | | | | It is not implemented and causes panics on boot. This is a temporary measure until someone(tm) sorts it out. Reported by: many Sponsored by: Rubicon Communications, LLC ("Netgate")
* vfs: extend vn_printf with vop vectorMateusz Guzik2023-04-071-1/+2
|
* vfs: more informative panic for missing fplookup opsMateusz Guzik2023-04-073-6/+45
|
* ufs: add missing vop_fplookup ops to fifo vectorsMateusz Guzik2023-04-072-0/+6
| | | | Reported-by: syzbot+a324b64ef9a933659c1c@syzkaller.appspotmail.com
* nfscl: Fix support for doing Null RPCsRick Macklem2023-04-071-0/+5
| | | | | | | | | Although the NFS client does not currently perform Null RPCs, this fix is needed if/when it might do so. Found during testing of experimental code that uses Null RPCs to maintain/monitor TCP connections for "nconnect" mounts. MFC after: 3 months
* nfsd: Add support for the SP4_MACH_CRED case in ExchangeIDRick Macklem2023-04-076-21/+215
| | | | | | | | | | | | | | | Commit f4179ad46fa4 added support for operation bitmaps for NFSv4.1/4.2. This commit uses those to implement the SP4_MACH_CRED case for the NFSv4.1/4.2 ExchangeID operation since the Linux NFSv4.1/4.2 client is now using this for Kerberized mounts. The Linux Kerberized NFSv4.1/4.2 mounts currently work without support for this because Linux will fall back to SP4_NONE, but there is no guarantee this fallback will work forever. This commit only affects Kerberized NFSv4.1/4.2 mounts from Linux at this time. MFC after: 3 months
* tcp: pass tcpcb in the tfb_tcp_ctloutput() method instead of inpcbGleb Smirnoff2023-04-074-35/+30
| | | | | | | Just matches rest of the KPI. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D39435
* tcp: reduce argument list to functions that pass a segmentGleb Smirnoff2023-04-078-50/+45
| | | | | | | | The socket argument is superfluous, as a tcpcb always has one and only one socket. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D39434
* tcp: retire tfb_tcp_hpts_do_segment()Gleb Smirnoff2023-04-072-8/+3
| | | | | | | Isn't in use anymore. Correct comments that mention it. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D39433
* netinet tests: test carp source MAC addressKristof Provost2023-04-072-0/+55
| | | | | | | | | Ensure that (multicast) CARP packets are sent with the expected source MAC address. Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39454
* zfs: try to fallback early if can't do optimized copyMateusz Guzik2023-04-071-0/+8
| | | | | | Not complete, but already shaves on some locking. Sponsored by: Rubicon Communications, LLC ("Netgate")
* zfs: fix up EXDEV handling for clone_rangeMateusz Guzik2023-04-071-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | API contract requires VOPs to handle EXDEV internally, worst case by falling back to the generic copy routine. This broke with the recent changes. While here whack custom loop to lock 2 vnodes with vn_lock_pair, which provides the same functionality internally. write start/finish around it plays no role so got eliminated. One difference is that vn_lock_pair always takes an exclusive lock on both vnodes. I did not patch around it because current code takes an exclusive lock on the target vnode. zfs supports shared-locking for writes, so this serializes different calls to the routine as is, despite range locking inside. At the same time you may notice the source vnode can get some traffic if only shared-locked, thus once more this goes the safer route of exclusive-locking. Note this should be patched to use shared-locking for both once the feature is considered stable. Technically the switch to vn_lock_pair should be a separate change, but it would only introduce churn immediately whacked by the rest of the patch. [note: technically the review is still in progress, but so is the active breakage] Sponsored by: Rubicon Communications, LLC ("Netgate")
* bridge: Log MAC address port flappingZhenlei Huang2023-04-071-2/+30
| | | | | | | | | | | | | | | | | | MAC flapping occurs when a bridge receives packets with the same source MAC address on different member interfaces. The common reasons are: - user roams from one bridge port to another - user has wrong network setup, bridge loops e.g. - someone set duplicated ethernet address on his/her nic - some bad guy / virus / trojan send spoofed packets if_bridge currently updates the bridge routing entry silently hence it is hard to diagnose. Emit logs when MAC address port flapping occurs to make it easier to diagnose. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D39375
* ifconfig: Fix configuring if_bridge with additional operating parametersZhenlei Huang2023-04-071-1/+1
| | | | | | | | | | | For clone create and rename operations, the interface name get back can be different from the one passed to ioctl(). Use the interface name we get back so that ifconfig will not return unexpected ENXIO. PR: 270618 Reviewed by: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39396
* tcp: misc cleanup of options for rack as well as socket option logging.Randall Stewart2023-04-078-124/+65
| | | | | | | | | | Both BBR and Rack have the ability to log socket options, which is currently disabled. Rack has an experimental SaD (Sack Attack Detection) algorithm that should be made available. Also there is a t_maxpeak_rate that needs to be removed (its un-used). Reviewed by: tuexen, cc Sponsored by: Netflix Inc Differential Revision: https://reviews.freebsd.org/D39427
* Fix style.Ganbold Tsagaankhuu2023-04-071-4/+2
|
* Improve RK3568 pcie phy handling codes a bit.Ganbold Tsagaankhuu2023-04-071-32/+55
| | | | | | Move phy bifurcation code to a separate function that can be called during the attach phase. Also initialize both pcie lanes accordingly.
* zfsd: add support for hotplugging sparesAlan Somers2023-04-069-11/+271
| | | | | | | | | | | | | | If you remove an unused spare and then reinsert it, zfsd will now online it in all pools. Do not MFC without 2a58b312b62 (but it's ok to MFC that one without this one). Submitted by: Ameer Hamza <ahamza@ixsystems.com> (zfsd), Me (tests) MFC after: 2 weeks MFC with: 2a58b312b62f908ec92311d1bd8536dbaeb8e55b Sponsored by: iX Systems, Axcient Pull Request: https://github.com/freebsd/freebsd-src/pull/697
* makefs: avoid uninitialized memory in root directory dateEd Maste2023-04-061-7/+3
| | | | | | | | | | | Move date setting into cd9660_populate_iso_dir_record so there is no path that leaves it unset. PR: 203531 Reported by: Thomas Schmitt <scdbackup@gmx.net> Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39258
* Mark EENTRY as .textAndrew Turner2023-04-061-1/+1
| | | | | | | | | | To allow it to be used before ENTRY we need to ensure the symbol is in the .text section. It also needs to be aligned correctly. While here mark the symbol type as a function as in the ENTRY macro. Reported by: jrtc27 Sponsored by: Arm Ltd
* vfs: validate that a mount point with FPLOOKUP has vop_fplookup opsMateusz Guzik2023-04-061-0/+4
|
* vfs: only allow doomed vnodes to return EOPNOTSUPP for fplookup vopsMateusz Guzik2023-04-061-1/+8
| | | | | This helps asserting that they are provided by filesystems indicating they do it.
* vfs: validate that vop vectors provide all or none fplookup vopsMateusz Guzik2023-04-063-0/+37
| | | | In order to prevent later susprises.
* deadfs: consistently return EOPNOTSUPP for fplookup vopsMateusz Guzik2023-04-061-1/+1
|