| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
Reviewed by: imp, markj, jhb
Differential Revision: https://reviews.freebsd.org/D51902
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Reviewed by: kib
Fixes: f1f230439fa4 ("vfs: Initial revision of inotify")
Differential Revision: https://reviews.freebsd.org/D51900
|
|
|
|
|
| |
Approved by: imp@, cperciva@
Differential Revision: D49456
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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")
|
|
|
|
| |
Fixes: 81d8827ad875 ("certctl: Reimplement in C")
|
|
|
|
| |
This reverts commit 42ac41983ee184e818f6e8da791a5c6c7530f87e.
|
|
|
|
| |
Fixes: 81d8827ad875 ("certctl: Reimplement in C")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51309
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51305
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51306
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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")
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fixes: c3fc0db3bc50df18a724e6e6b12ea4e060fd9255
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D51587
|
|
|
|
|
|
|
|
| |
Bump FreeBSD_version and add UPDATING entry for gpiobus changes.
Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D51579
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
It's unused, we can remove it.
Reviewed by: imp, jhibbits
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D51877
|
| |
|
| |
|
|
|
|
|
|
| |
See manpage for new features.
Preliminary review by: imp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|