- 28 May, 2019 1 commit
-
-
Doug Moore authored
xor to find where free ranges begin and end. Tested by: pho Reviewed by:alc Approved by:markj, kib (mentors) Differential Revision: https://reviews.freebsd.org/D20256
-
- 27 May, 2019 16 commits
-
-
Alan Somers authored
* F_RDLCK, F_UNLCK, and F_WRLCK aren't flags. They're stored in the fl.l_type field. * Add F_REMOTE, added in r177633 * Add F_NOINTR, added in r180025 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
-
Cy Schubert authored
MFC after: 1 week
-
Cy Schubert authored
Reported by: lwhsu@ MFC after: 1 week
-
Cy Schubert authored
MFC after: 1 week
-
Conrad Meyer authored
MDT_MODULE info is required to be ordered before any other MDT metadata for a given kld because it serves as an implicit record boundary between distinct klds for linker.hints consumers. kldxref(8) has previously relied on the assumption that MDT_MODULE was ordered relative to other module metadata in kld objects by source code ordering. However, C does not require implementations to emit file scope objects in any particular order, and it seems that GCC 6.4.0 and/or binutils 2.32 ld may reorder emitted objects with respect to source code ordering. So: just take two passes over a given .ko's module metadata, scanning for the MDT_MODULE on the first pass and the other metadata on subsequent passes. It's not super expensive and not exactly a performance-critical piece of code. This ensures MDT_MODULE is always ordered before MDT_PNP_INFO and other MDTs, regardless of compiler/linker movement. As a fringe benefit, it removes the requirement that care be taken to always order MODULE_PNP_INFO after DRIVER_MODULE in source code. Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D20405
-
Konstantin Belousov authored
tables which affect demotion. The last last-level page table under 2M mappings below KERNend was only partially initialized. When that page was used as the hardware page table for demotion of the 2M mapping, the result was not consistent. Since pmap_demote_pde() is switched to use PG_PROMOTED as the test for the validity of the saved last level page table page, we can keep page table pages zero-initialized instead. Demotion would fill them as needed. Only map the created page tables beyond KERNend, there is no need to pre-promote PTmap after KERNend, because the extra mapping is not used. Only round up *firstaddr to 2M boundary when it is below rounded KERNend. Sometimes the allocpages() calls advance *firstaddr past the end of the last 2MB page mapping. In that case, this conditional avoids wasting an average of 1MB of physical memory. Update comments to explain action in more clean and direct language. Reported and tested by: pho In collaboration with: alc Sponsored by: The FreeBSD Foundation (kib) MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20380
-
Andrey V. Elsukov authored
bpf_mtap() can invoke catchpacket() for already detached descriptor. And this can lead to NULL pointer dereference, since bd_bif pointer was reset to NULL in bpf_detachd_locked(). To avoid this, use NET_EPOCH_WAIT() when descriptor is removed from interface's descriptors list. After the wait it is safe to modify descriptor's content. Submitted by: kib Reported by: slavash MFC after: 1 week
-
Xin LI authored
is not available. Submitted by: Ali Mashtizadeh <ali mashtizadeh.com> MFC after: 3 days
-
Andrey V. Elsukov authored
MFC after: 2 weeks
-
Kirk McKusick authored
worklist structures to help track their movement between work lists. No functional change to the operation of soft updates intended.
-
Justin Hibbits authored
Check the CTF magic number in big endian platforms. This lets DTrace FBT handle types correctly on these platforms. Submitted by: Brandon Bergren MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20413
-
Justin Hibbits authored
'.' function names exist only in ELFv1. ELFv2 does away with function descriptors, and look more like they do on powerpc(32) and most other platforms, as direct function pointers. Stop blacklisting regular function names in ELFv2. Submitted by: Brandon Bergren Differential Revision: https://reviews.freebsd.org/D20346
-
Conrad Meyer authored
The device_t always references the softc, so we can pass the device and obtain the softc instead of the other way around.
-
Conrad Meyer authored
This page could probably use further improvement.
-
Conrad Meyer authored
This fixes the kernel build with xtoolchain-gcc (6.4.0). X-MFC-With: r348268
-
Conrad Meyer authored
No functional change (except for out-of-tree C++ kmods).
-
- 26 May, 2019 5 commits
-
-
Jayachandran C. authored
acpi_config_intr() will be called when an arm64 system booted with ACPI. We do the interrupt mapping for ACPI interrupts in nexus_acpi_map_intr() on arm64, so acpi_config_intr() has to just return success without printing this error message. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D19432
-
Michael Tuexen authored
received and support for time stamps was negotiated in the SYN/SYNACK exchange, perform the PAWS check and only expand the syn cache entry if the check is passed. Without this check, endpoints may get stuck on the incomplete queue. Reviewed by: jtl@ MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D20374
-
Dimitry Andric authored
[SelectionDAG] soften assertion when legalizing narrow vector FP ops The test based on PR42010: https://bugs.llvm.org/show_bug.cgi?id=42010 ...may show an inaccuracy for PPC's target defs, but we should not be so aggressive with an assert here. There's no telling what out-of-tree targets look like. This fixes an assertion when building the graphics/mesa-dri port for PowerPC64. Reported by: Mark Millard <marklmi26-fbsd@yahoo.com> PR: 238082 MFC after: 3 days
-
Mateusz Piotrowski authored
Reviewed by: danfe, hselasky Approved by: src (hselasky) Differential Revision: https://reviews.freebsd.org/D20353
-
Alexey Dokuchaev authored
application's logic. It's possible that 'else' keyword is missing. Reviewed by: gallatin, np, pfg Approved by: pfg Differential Revision: https://reviews.freebsd.org/D20396
-
- 25 May, 2019 9 commits
-
-
Li-Wen Hsu authored
MFC after: 3 days Sponsored by: The FreeBSD Foundation
-
Mark Johnston authored
It has not been compilable in a long time and doesn't seem very useful. Suggested by: kib MFC after: 1 week
-
Li-Wen Hsu authored
MFC after: 3 days Sponsored by: The FreeBSD Foundation
-
Edward Tomasz Napierala authored
optical drives in devfs.conf(5). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
-
Rodney W. Grimes authored
-
Sean Eric Fagan authored
code. The primary client of this is probably going to be ZFS encryption. Reviewed by: jhb, cem Sponsored by: iXsystems Inc, Kithrup Enterprises Differential Revision: https://reviews.freebsd.org/D19298
-
Justin Hibbits authored
This was lost in the re-merger of ISA3 MMU into moea64_native.
-
Conrad Meyer authored
Prior to this revision, vtpci's BUS_READ_IVAR method on VIRTIO_IVAR_SUBVENDOR accidentally returned the PCI subdevice. The typo seems to have been introduced with the original commit adding VIRTIO_IVAR_{{SUB,}DEVICE,{SUB,}VENDOR} to virtio_pci. The commit log and code strongly suggest that the ivar was intended to return the subvendor rather than the subdevice; it was likely just a copy/paste mistake. Go ahead and rectify that.
-
Kirk McKusick authored
operations already in its queue were not being properly drained. The GEOM framework does the queue draining, but the module needs to wait for the draining to happen. The waiting is done by adding a g_nop_providergone() function to wait for the I/O operations to finish up. This change is similar to change -r345758 made to the memory-disk driver. Submitted by: Chuck Silvers Tested by: Chuck Silvers MFC after: 1 week Sponsored by: Netflix
-
- 24 May, 2019 9 commits
-
-
Konstantin Belousov authored
The upper bound for the valid address from the large map used LARGEMAP_MAX_ADDRESS instead of LARGEMAP_MIN_ADDRESS. Provide a function-like macro for proper upper value. Noted by: markj Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20386
-
Konstantin Belousov authored
Similar to PG_FRAME and PG_PS_FRAME, it denotes the mask of the physical address component of 1G superpage PDP entry. Reviewed by: alc, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D20386
-
Conrad Meyer authored
The ixl.4 manual page has documented that the threshold falsely detects interrupt storms on 40Gbit NICs as long ago as 2015, and we have seen similar false positives with the ioat(4) DMA device (which can push GB/s). For example, synthetic load can be generated with tools/tools/ioat 'ioatcontrol 0 200 8192 1 1000' (allocate 200x8kB buffers, generate an interrupt for each one, and do this for 1000 milliseconds). With storm-detection disabled, the Broadwell-EP version of this device is capable of generating ~350k real interrupts per second. The following historical context comes from jhb@: Originally, the threshold worked around incorrect routing of PCI INTx interrupts on single-CPU systems which would end up in a hard hang during boot. Since the threshold was added, our PCI interrupt routing was improved, most PCI interrupts use edge-triggered MSI instead of level-triggered INTx, and typical systems have multiple CPUs available to service interrupts. On the off chance that the threshold is useful in the future, it remains available as a tunable and sysctl. Reviewed by: jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D20401
-
John Baldwin authored
- Perform ifp mismatch checks (to determine if a send tag is allocated for a different ifp than the one the packet is being output on), in ip_output() and ip6_output(). This avoids sending packets with send tags to ifnet drivers that don't support send tags. Since we are now checking for ifp mismatches before invoking if_output, we can now try to allocate a new tag before invoking if_output sending the original packet on the new tag if allocation succeeds. To avoid code duplication for the fragment and unfragmented cases, add ip_output_send() and ip6_output_send() as wrappers around if_output and nd6_output_ifp, respectively. All of the logic for setting send tags and dealing with send tag-related errors is done in these wrapper functions. For pseudo interfaces that wrap other network interfaces (vlan and lagg), wrapper send tags are now allocated so that ip*_output see the wrapper ifp as the ifp in the send tag. The if_transmit routines rewrite the send tags after performing an ifp mismatch check. If an ifp mismatch is detected, the transmit routines fail with EAGAIN. - To provide clearer life cycle management of send tags, especially in the presence of vlan and lagg wrapper tags, add a reference count to send tags managed via m_snd_tag_ref() and m_snd_tag_rele(). Provide a helper function (m_snd_tag_init()) for use by drivers supporting send tags. m_snd_tag_init() takes care of the if_ref on the ifp meaning that code alloating send tags via if_snd_tag_alloc no longer has to manage that manually. Similarly, m_snd_tag_rele drops the refcount on the ifp after invoking if_snd_tag_free when the last reference to a send tag is dropped. This also closes use after free races if there are pending packets in driver tx rings after the socket is closed (e.g. from tcpdrop). In order for m_free to work reliably, add a new CSUM_SND_TAG flag in csum_flags to indicate 'snd_tag' is set (rather than 'rcvif'). Drivers now also check this flag instead of checking snd_tag against NULL. This avoids false positive matches when a forwarded packet has a non-NULL rcvif that was treated as a send tag. - cxgbe was relying on snd_tag_free being called when the inp was detached so that it could kick the firmware to flush any pending work on the flow. This is because the driver doesn't require ACK messages from the firmware for every request, but instead does a kind of manual interrupt coalescing by only setting a flag to request a completion on a subset of requests. If all of the in-flight requests don't have the flag when the tag is detached from the inp, the flow might never return the credits. The current snd_tag_free command issues a flush command to force the credits to return. However, the credit return is what also frees the mbufs, and since those mbufs now hold references on the tag, this meant that snd_tag_free would never be called. To fix, explicitly drop the mbuf's reference on the snd tag when the mbuf is queued in the firmware work queue. This means that once the inp's reference on the tag goes away and all in-flight mbufs have been queued to the firmware, tag's refcount will drop to zero and snd_tag_free will kick in and send the flush request. Note that we need to avoid doing this in the middle of ethofld_tx(), so the driver grabs a temporary reference on the tag around that loop to defer the free to the end of the function in case it sends the last mbuf to the queue after the inp has dropped its reference on the tag. - mlx5 preallocates send tags and was using the ifp pointer even when the send tag wasn't in use. Explicitly use the ifp from other data structures instead. - Sprinkle some assertions in various places to assert that received packets don't have a send tag, and that other places that overwrite rcvif (e.g. 802.11 transmit) don't clobber a send tag pointer. Reviewed by: gallatin, hselasky, rgrimes, ae Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20117
-
John Baldwin authored
This doesn't recognize any features yet, but does parse the features string. It advertises an arbitrary packet size of 4k. Reviewed by: markj, Scott Phillips <d.scott.phillips@intel.com> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20308
-
Alan Somers authored
vtruncbuf takes a "struct ucred*" argument. AFAICT, it's been unused ever since that function was first added in r34611. Remove it. Also, remove some "struct ucred" arguments from fuse and nfs functions that were only used by vtruncbuf. Reviewed by: cem MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20377
-
Piotr Kubaj authored
amd64 also has snd_hda(4) in GENERIC. Approved by: jhibbits (src committer), linimon (mentor)
-
Simon J. Gerraty authored
If the file is verified - do not allow write otherwise do not allow read. Add O_ACCMODE to stand.h Reviewed by: stevek, mindal_semihalf.com MFC after: 3 days Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D20387
-
Leandro Lupori authored
Having this option enabled by default on PowerPC64 kernels makes booting ISO images much easier when on PowerNV. With it, the ISO may simply be given to the -i flag of kexec. Better yet, the ISO may be loop mounted on PetitBoot and its kernel may be used to load itself. Without this option, booting ISOs on remote PPC64 machines usually involve preparing a separate kernel, with this option enabled.
-