aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* makefs: zfs uberblock location is calculated wrongHEADmainToomas Soome8 hours3-2/+8
| | | | | | | | | | | The shift used to calculate uberblock location depends both on minimum size (UBERBLOCK_SHIFT) and MAX_UBERBLOCK_SHIFT. Since makefs defaults to use ashift 12, it incidentally does get the correct size, but ashift 9 does not work with current code. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51860
* libc: Drop incorrect qsort optimizationDag-Erling Smørgrav6 hours3-13/+114
| | | | | | | | | | | | | | | | As pointed out in the PR and the article linked below, the switch to insertion sort in the BSD qsort code is based on a misunderstanding of Knuth's TAOCP and is actually a pessimization. As demonstrated by the added test, it is trivially easy to construct pathological input which results in quadratic runtime. Without that misguided optimization, the same input runs in nearly linearithmic time. https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3 PR: 287089 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51907
* ipheth(4): Add CDC-NCM support for RXShengYi Hung8 hours2-48/+191
| | | | | | | | | | | | | | | The CDC-NCM (USB Communications Device Class – Network Control Model) protocol allows multiple Ethernet frames to be encapsulated into a single USB transfer. On iOS, CDC-NCM is currently implemented for RX only and uses a fixed number of entries (16). To maintain compatibility with older iOS versions, we attempt to enable NCM on the USB device first; if this fails, we fall back to the original behavior. Approved by: lwhsu (mentor), markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation
* build: introduce the notion of a build epochKyle Evans8 hours3-4/+93
| | | | | | | | | | | | | | | | | Idea and file format shamelessly stolen from CheriBSD, but reimplemented in terms of the standard FreeBSD build system. We'll use this in some events that call for a deeper cleansing, typically reserved for situations where the dependencies are too complicated to unwind. This notably does not preclude us from doing separate cleansing of world for specific src.conf(5) knob changes that would require a rebuild. In the FreeBSD version, we either stamp the OBJTOP we're cleaning (bootstrap or the full OBJDIR) with the current epoch and bail out for unstamped objdirs, or we compare and either `rm -rf` or `cleandir` as necessary. Reviewed by: brooks, des Differential Revision: https://reviews.freebsd.org/D51848
* sysent: regenerate after bumping setgroups/getgroupsKyle Evans9 hours12-141/+167
|
* kern: fix setgroups(2) and getgroups(2) to match other platformsKyle Evans9 hours11-98/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | On most other platforms observed, including OpenBSD, NetBSD, and Linux, these system calls have long since been converted to only touching the supplementary groups of the process. This poses both portability and security concerns in porting software to and from FreeBSD, as this subtle difference is a landmine waiting to happen. Bugs have been discovered even in FreeBSD-local sources, since this behavior is somewhat unintuitive (see, e.g., fix 48fd05999b0f for chroot(8)). Now that the egid is tracked outside of cr_groups in our ucred, convert the syscalls to deal with only supplementary groups. Some remaining stragglers in base that had baked in assumptions about these syscalls are fixed in the process to avoid heartburn in conversion. For relnotes: application developers should audit their use of both setgroups(2) and getgroups(2) for signs that they had assumed the previous FreeBSD behavior of using the first element for the egid. Any calls to setgroups() to clear groups that used a single array of the now or soon-to-be egid can be converted to setgroups(0, NULL) calls to clear the supplementary groups entirely on all FreeBSD versions. Co-authored-by: olce (but bugs are likely mine) Relnotes: yes (see last paragraph) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51648
* syslogd.8: Remove incorrect .AqLexi Winter11 hours1-1/+1
| | | | | | | | | Using .Aq is wrong here, because the protocol says the prefix must use ASCII <>. MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51880
* zfs: install zhack(1) manual pageGleb Smirnoff14 hours1-2/+5
|
* depend-cleanup: Handle tcopy moving from C to C++John Baldwin16 hours1-0/+3
|
* src.opts.mk: Style nits, remove obsolete commentDag-Erling Smørgrav17 hours1-6/+2
| | | | | Reviewed by: imp, markj, jhb Differential Revision: https://reviews.freebsd.org/D51902
* watchdog: Convert to using sbintime_t formatJustin Hibbits18 hours3-175/+143
| | | | | | | | | | | | | | Summary: Some watchdogs are now based on a countdown timer instead of a bit check. To deal with these, convert the watchdog framework to use sbintime_t instead of power-of-2-nanoseconds. This allows more precision, and more variety of watchdog timeouts. Keep the old method as a compatibility layer, so that drivers can be migrated slowly, as needed. Reviewed by: jhb Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D49183
* watchdog: Add a new "Control" ioctlJustin Hibbits18 hours3-2/+39
| | | | | | | | | | Summary: In preparation for a new watchdog timeout interface using sbintime_t, add a new control ioctl to arm, pat, and disarm the watchdog. Reviewed by: jhb, phk Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D49182
* [libm] Avoid left shift of signed integer entitiesSteve Kargl18 hours4-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | Follow-up commit d180086e6eae by fixing the left shift of signed integer entities through the use of a helper function. Specific per file changes are: * lib/msun/src/e_fmodf.c: * lib/msun/src/s_remquof.c: . Eliminate now unused variable 'i'. . Sort declaration statement. . Use subnormal_ilogbf() to avoid left shift of signed integer. * lib/msun/src/math_private.h b/lib/msun/src/math_private.h: . Implement subnormal_ilogbf() to extract an exponent of a subnormal float. This avoids left shifts of signed integers. . Update nearby comment. * lib/msun/src/s_ilogbf.c . Fix declaration of the function statement in accordance with style(9). . Use subnormal_ilogbf() to avoid left shift of signed integer. PR: 288850 MFC after: 1 week
* libutil++: Move to the utilities packageMark Johnston21 hours1-1/+0
| | | | | | | | | | | | | We should keep the clibs package as small as possible. Currently it contains some "extra" libraries, but this isn't a good argument for adding more stuff. Move it to the utilities package (the default for bsd.lib.mk consumers), since libutil++ is an INTERNALLIB and thus only installs man pages, so therefore doesn't need to be in FreeBSD-runtime. Requested by: kib Reviewed by: ivy, des Fixes: f4fd2aa07cde ("libutil++: Move to clibs") Differential Revision: https://reviews.freebsd.org/D51898
* inotify: Fix a namei path buffer leakMark Johnston21 hours1-0/+1
| | | | | | Reviewed by: kib Fixes: f1f230439fa4 ("vfs: Initial revision of inotify") Differential Revision: https://reviews.freebsd.org/D51900
* Modifications to committers-src.dot: hselasky and karelsJim Brown30 hours1-2/+2
| | | | | Approved by: imp@, cperciva@ Differential Revision: D49456
* mlx5: plug theoretical leak in vxlan rulesEric van Gyzen35 hours1-2/+2
| | | | | | | | | | Plug a theoretical memory/refcount leak when adding a vxlan rule. This is not currently an actual leak, but it could become one. PR: 287945 Reviewed by: kib Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D51883
* etc: add missing mtree entry for certctl testsKyle Evans37 hours1-0/+2
| | | | | | | | Otherwise we'll fail to create the appropriate hierarchy and blow up when we go to actually install the test. Reported by: np Fixes: 81d8827ad875 ("certctl: Reimplement in C")
* certctl: Fix bootstrap buildDag-Erling Smørgrav38 hours2-1/+10
| | | | Fixes: 81d8827ad875 ("certctl: Reimplement in C")
* Revert "certctl: Fix bootstrap build"Dag-Erling Smørgrav38 hours3-77/+30
| | | | This reverts commit 42ac41983ee184e818f6e8da791a5c6c7530f87e.
* certctl: Fix bootstrap buildDag-Erling Smørgrav38 hours3-30/+77
| | | | Fixes: 81d8827ad875 ("certctl: Reimplement in C")
* certctl: Reimplement in CDag-Erling Smørgrav39 hours8-414/+1404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes include: * We no longer forget manually untrusted certificates when rehashing. * Rehash will now scan the existing directory and progressively replace its contents with those of the new trust store. The trust store as a whole is not replaced atomically, but each file within it is. * We no longer attempt to link to the original files, but we don't copy them either. Instead, we write each certificate out in its minimal form. * We now generate a trust bundle in addition to the hashed diretory. This also contains only the minimal DER form of each certificate. * The C version is approximately two orders of magnitude faster than the sh version, with rehash taking ~100 ms vs ~5-25 s depending on whether ca_root_nss is installed. * The DISTBASE concept has been dropped; the same effect can be achieved by adjusting DESTDIR. * We now also have rudimentary tests. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42320
* tests/ci: Add missing kmods and pkgs to unskip testsSiva Mahadevan40 hours1-0/+19
| | | | | | Signed-off-by: Siva Mahadevan <me@svmhdvn.name> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51309
* tests/ci: style: canonicalize, sort, and multiline kmods/pkgsSiva Mahadevan40 hours1-11/+27
| | | | | | | | | This helps to remove ambiguity and reduce future diffs of changes to the VM_EXTRA_PACKAGES list. Also sort kld_list. Signed-off-by: Siva Mahadevan <me@svmhdvn.name> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51308
* bhyve: Support and advertise 15-bit MSI Extended Destination IDDavid Woodhouse41 hours4-1/+17
| | | | | | | | | | | To support guests with more than 255 vCPUs, allow bits 5-11 of the MSI address to be used as additional destination ID bits. This is compatible with Hyper-V, KVM and Xen's implementation of the same enlightenment, as documented at http://david.woodhou.se/ExtDestId.pdf Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1797 Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
* bhyve: Add CPUID_BHYVE_FEATURES leafDavid Woodhouse41 hours1-3/+15
| | | | | | | | | | | | | | This allows the hypervisor to advertise features to the guest. The first such feature is CPUID_BHYVE_EXT_DEST_ID which advertises that 15 bits of target APIC ID are available in MSI (and I/O APIC) interrupts, as documented in http://david.woodhou.se/ExtDestId.pdf This defines the guest ABI. The actual implementation will come in a subsequent commit. Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1797 Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
* tests/ci: Fix unescaped kld_list var in rc.confSiva Mahadevan41 hours1-16/+16
| | | | | | Signed-off-by: Siva Mahadevan <me@svmhdvn.name> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51305
* tests/ci: Add KYUA_TEST_FILTERS to allow user to select specific testsSiva Mahadevan41 hours3-1/+6
| | | | | Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51306
* Fix missed assertion update in physical rewrite patchAlexander Motin41 hours1-1/+2
| | | | | | | | Physical rewrite patch changed the meaning of BP_GET_BIRTH(), but I missed update one of its occurences, ending up asserting equal logical birth times instead of equal physical birth times. PR: 288722
* RELNOTES: Make an entry for cce64f2e6851Rick Macklem41 hours1-0/+6
|
* UPDATING: Make an entry for cce64f2e6851Rick Macklem41 hours1-0/+6
|
* nfsv4: Add support for the NFSv4.2 Clone operationRick Macklem41 hours16-92/+660
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 37b2cb5ecb0f added VFS support for block cloning. This patch uses the VFS changes to add support for the NFSv4.2 Clone operation, which copies ranges within one or two files via block cloning. The Clone operation is similar to Copy, but always completes the "copy on write". It is not allowed to return partially done. It also allows copying of bytes ranges within the same file, which the NFSv4.2 Copy operation does not allow. Unless COPY_FILE_RANGE_CLONE has been specified for copy_file_range(2), a failing Clone operation will be redone with a Copy. The Clone operation requires that offsets (and length, if it does not go to EOF in the input file) be aligned to _PC_CLONE_BLKSIZE. This is similar to what ZFS implements now. At this time, ZFS is the only exportable file system that supports block cloning. As such, the Clone operation is only supported for ZFS exports at this time. Fixes: 37b2cb5ecb0f ("vfs: Add support for file cloning to VOP_COPY_FILE_RANGE")
* systat: improve reporting of UDP statisticsMichael Tuexen43 hours1-8/+12
| | | | | | | | | Report the undelivered multi and broadcast UDP packets separately. Reviewed by: rrs, cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51884
* tcp: fix sysctl name in the gone_in() printfGleb Smirnoff44 hours1-1/+1
| | | | Fixes: c3fc0db3bc50df18a724e6e6b12ea4e060fd9255
* pathconf.2: Add an entry for _PC_CLONE_BLKSIZERick Macklem46 hours1-1/+7
| | | | | | | | | | | | | | | Commit 37b2cb5ecb0f added VFS support for cloning, including a new pathconf name to acquire the clone block size called _PC_CLONE_BLKSIZE. This patch documents this new name. This is a content change. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51851 Fixes: 37b2cb5ecb0f ("vfs: Add support for file cloning to VOP_COPY_FILE_RANGE")
* Modify nanobsd/defaults.sh to reduce buildsize, buildtime andMichael Reifenberger47 hours1-2/+7
| | | | | | | | | | | | | | | | increase imgsize to fit. Not building debug symbols and tests reduces _.w/ from 1465 to 503 MB. Increasing the mediasize to 6000000 let the image be built. Otherwise I get: ... 00:33:58 ## build code slice 00:33:58 ### log: /usr/obj/nanobsd.full/_.cs /usr/obj/nanobsd.full/_.mnt: write failed, filesystem is full Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49885
* uart: Add ns8250 ACPI entry for SPCR rev 2Justin Hibbits47 hours1-0/+1
| | | | | | | | | | | | | Summary: SPCR rev 2 adds a series of new device types, with 0x12 being "16550-compatible with parameters defined in the Generic Address Structure". Since we look for the parameters already in the GAS there's nothing extra for us to do beyond adding the entry so that it probes successfully. Reviewed by: imp, andrew Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51771
* gpio: Fix incorrect dev being passed to gpiobus_detach_busEvgenii Ivanov2 days2-6/+2
| | | | | | | | Passing in the busdev will not detach from the bus correctly leaving the /dev/gpiocN entry Reviewed by: vexeduxr, imp Differential Revision: https://reviews.freebsd.org/D51857
* acpi_gpiobus: style nitAhmad Khalifa2 days1-1/+2
| | | | | | Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51587
* bump FreeBSD_version to 1500060 for gpiobus changesAhmad Khalifa2 days2-1/+7
| | | | | | | | Bump FreeBSD_version and add UPDATING entry for gpiobus changes. Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51579
* gpio: remove gpiobus_attach_busAhmad Khalifa2 days36-55/+71
| | | | | | | | | | | | Since gpiobus_attach_bus can attach the gpiobus child along with its children in the same bus pass, the parent controller's reference to gpiobus might not be set by the time the children need it. Instead, drivers should use gpiobus_add_bus and explicitly call bus_attach_children. Reviewed by: mmel, imp (older version) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51578
* tcopy: Catch up to expand_number() now being signed.Poul-Henning Kamp2 days1-3/+3
|
* uart: Remove the unused cd_port_subtypeAndrew Turner2 days3-22/+21
| | | | | | | | | This is now unused. It was used for the SPCR interface type, but that has now been split out into a new struct. Reviewed by: imp, jhibbits Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51879
* uart: Add UART_ACPI_SPCR_CLASSAndrew Turner2 days4-6/+29
| | | | | | | | | | | We don't care about most of acpi_uart_compat_data in the spcr code. Split out the mapping from the SPCR interface type to uart class into a new struct. This allows new SPCR interface types to be added that don't have an entry in the DSDT, e.g. some PCI uarts may not. Reviewed by: imp, jhibbits Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51878
* uart: Remove UART_ACPI_CLASSAndrew Turner2 days2-16/+0
| | | | | | | | It's unused, we can remove it. Reviewed by: imp, jhibbits Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51877
* tcopy: Fix printf format for 32bit armPoul-Henning Kamp2 days1-1/+1
|
* sa(4): Dont talk about minor device numbers: We have had DEVFS for 25 years.Poul-Henning Kamp2 days1-5/+3
|
* tcopy: Refactor and add support for SIMH-TAPFILESPoul-Henning Kamp2 days4-380/+994
| | | | | | See manpage for new features. Preliminary review by: imp
* netstat: report undelivered multi and broadcast UDP packets correctlyMichael Tuexen2 days1-4/+7
| | | | | | | | | | | | | | When reporting undelivered broadcast/multicast datagrams, don't just report the undelivered broadcast ones. Actually report the sum of both. Alternatively, one could also report broadcast and multicast datagrams separately, but that would change the output format of netstat. While there, use the correct type for casting a variable printed with %ju. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51881
* IPv6: Ignore PTB packets with an MTU < 1280Eric van Gyzen3 days4-110/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 2460 section 5 paragraph 7 allowed a Packet Too Big message to report a Next-Hop MTU less than 1280 in support of 6-to-4 routers. A node receiving such a message was required to add a Fragment Header to outgoing packets, even though they were not fragmented. Almost 20 years later, RFC 8200 was published. It obsoletes RFC 2460 and removes that paragraph. UNH IOL Intact was updated to test for compliance with the new standard. Remove code supporting that obsolete paragraph. Test cases v6LC_4_1_06a and 06b failed before this change, saying: DUT processed PTB and sent a fragmented echo reply Those two test cases now pass: DUT did not process PTB and sent un-fragmented echo reply All PMTU test cases pass except v6LC_4_1_08. It fails because we ignore the MTU in RAs. Reviewed by: tuexen MFC After: 1 month Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D51835