| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.
Reported by: siva
Reviewed by: kib
Approved by: markj (mentor)
Fixes: 9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Try to make the RETURN VALUES section flow better.
* Add basename(3), dirname(3), free(3) to the SEE ALSO section.
* Drop the CAVEATS section, which was obsolete the moment realpath(3)
was added to the Single Unix Specification in 1994.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55928
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Save prev_len after having checked for and appended a trailing slash,
not before. This requires us to back up if we end up returning a
partial result, but previously we would sometimes return a partial
result with a trailing slash and sometimes without.
* Replace strlcat() with a faster strlcpy() since we know exactly how
far into the buffer we are.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55914
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This change allows for fine-grained capabilities per counter index. This
is particularly useful for AMD where subclasses are not exposed to the
general PMC code, but other architectures also have asymmetric behaviors
when it comes to specific counter indices.
A new PMC_OP_GETCAPS op is added to the hwpmc(4) ioctl interface.
Reviewed by: mhorne
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/2058
|
| |
|
|
|
|
|
|
| |
A small enhancement.
Reviewed by: Ali Mashtizadeh <ali@mashtizadeh.com>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55830
|
| |
|
|
|
|
|
|
|
| |
Changes: https://raw.githubusercontent.com/the-tcpdump-group/libpcap/89e982c37c36ad0bf9f10b7ded421cb42422effa/CHANGES
Reviewed by: bms, emaste
Obtained from: https://www.tcpdump.org/release/libpcap-1.10.6.tar.gz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55545
Differential Revision: https://reviews.freebsd.org/D55858
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The thread_local variable may creates another thread_local variable
inside its dtor. This new object is immediately be registered in
__cxa_thread_atexit() and need to be freed before processing another
variable.
This fixes the libcxx test thread_local_destruction_order.pass.cpp.
Reported by: kib
Approved by: lwhsu (mentor)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55826
|
| |\
| |
| |
| |
| | |
Relnotes: yes
MFC after: 2 weeks
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove mention of the longjmp(3), which does not use sigreturn.
Try to be more precise when describing the syscall effects.
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D55750
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These features are available in all supported linkers, and we can expect
that they'll be supported by any GNU-compatible linker that we'd use to
link FreeBSD.
Reviewed by: imp, kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55676
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds all missing Intel fields and turns jevents.c into an explicit white
list mechanism so that we no longer ignore important fields that often
invalidate the counter. The json event parser must now parse every
field on each architecture that we support. This has been tested by
running tinderbox and manually running jevent against our current json
repository. As a bonus I fixed spelling errors in the AMD JSON
definitions.
Sponsored by: Netflix
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2055
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We were saving SIGINT twice instead of SIGINT and SIGQUIT.
Also restore original order of operations (SIGINT then SIGQUIT), which
matches the order in which they're discussed in the POSIX description
of system(3).
MFC after: 1 week
Sponsored by: Klara, Inc.
Fixes: 48368f702423 ("system(3): Address test robustness issue")
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't assume that SIGINT and SIGQUIT are set to SIG_DFL at the start
of the test. Instead, retrieve their current dispositions and verify
that they are restored at the end of the test.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55709
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
developed
strnlen() doesn't seem to cope well with a length argument such that
string pointer plus length overflows past the end of the address space.
Reviewed by: fuz
MFC after: 1 week
PR: 293353, 293296
Differential Revision: https://reviews.freebsd.org/D55714
|
| | |
| |
| |
| |
| | |
Without this lib32 libc.so.7 would be missing critical symbols,
including malloc / free and all syscall wrappers.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55539
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
FreeBSD UFS does not support hardlinks to directories.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55539
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D55539
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This more closely mirrors libc/quad/Makefile.inc and is easier to
read.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D55658
|
| | |
| |
| |
| |
| |
| |
| | |
lld doesn't notice, but ld.bfd complains.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D55657
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The alloca() interface has been a macro expanding to __builtin_alloca()
since 2003 (commit 79806b4cdce0, included in FreeBSD 5.2). Even before
that virtually every compiler version I was able to test replaced
alloca() with compiler generated code when targeting C.
Hide it to prevent future (mis)use.
Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D51858
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove a bunch of complexity at the cost of 4 bytes of storage per
thread.
Reviewed by: jhb
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D55310
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no need to call execl(), which will allocate an array and copy
our arguments into it, when we can use a static array and call execve()
directly.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55648
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
memchr(3) will happily believe we've passed in a valid object, but
hostsize could easily exceed the bounds of fullhost. Clamp it down to
the string size to be safe and avoid UB. This plugs a potential
overread noted in the compat shim that was just added.
Reviewed by: des
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54623
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
INT_MAX is already larger than a reasonable hostname might be, but
size_t makes some of this easier to reason about as we do arithmetic
with it. This would maybe not be worth it if we had to bump the
soversion because of it, but libutil does symbol versioning now so we
can provide a compat shim.
While we're here, fix some inconsistencies in argument names in the
manpage.
Reviewed by: des
Obtained from: https://github.com/apple-oss-distributions/libutil
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54622
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These were obtained from IBM specs and actual tapes/drives.
Standard LTO-10 cartriges hold 30TB raw, 75TB with 2.5:1 compression.
Premium LTO-10 cartridges hold 40TB raw, 100TB with 2.5:1 compression.
LTO-10 tape drives are not backward compatible with previous generation
LTO tapes. (This is a change from older generation drives.)
Since the Premium tape is a new thing for LTO, we'll call this density
code LTO-10P vs. the standard LTO-10. The barcode identifier for LTO-10
tapes is "LA"; the barcode identifier for LTO-10P tapes is "PA".
LTO-10 cartridges contain 1035m of tape, while LTO-10 Premium
cartridges contain 1337m of tape and have slightly higher density.
(Obtained from MAM data on actual tape cartridges and the density
report, obtained via 'mt getdensity'.) LTO-10 cartridges use a
polyethylene naphthalate (PEN) film substrate. LTO-10 Premium
cartridges use an Aramid (aromatic polyamide) substrate that is thinner
and stronger, allowing a longer tape to fit in the same cartridge form
factor.
usr.bin/mt/mt.1:
Add density codes and specs for LTO-10 and LTO-10P.
lib/libmt/mtlib.c:
Add density codes for LTO-10 and LTO-10P.
Sponsored by: Spectra Logic
MFC after: 3 days
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
MFC after: 3 days
Fixes: 6378393308bc ("Add an internal libiscsiutil library.")
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D55596
|
| | |
| |
| |
| |
| |
| |
| | |
Sponsored by: Netflix
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2049
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pmu event definitions for AMD Zen 5 was updated since it was
imported into the tree. As a bonus I also updated the recommended json
counters for Zen 1-3 even though we do not use that file yet.
Sponsored by: Netflix
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2048
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds support for AMD IBS. It adds a new class of performance
counter that cotains two events: ibs-fetch and ibs-op events. Unlike
most existing sampled events, IBS events provide a number of values
containing extra information regarding the sample. To support this we
use the existing callchain event, and introduce a new flag for multipart
payloads. The first 8 bytes of the pc_sample contains a header that
defines up to four payloads.
Sponsored by: Netflix
Reviewed by: imp,mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/2022
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The PMC flags available for DF and L3 counters were not all implemented.
More importantly, the field encodings for the L3 counters changed in an
incompatible way between Family 17h and Family 19h. Similarly, the
field encodings for the DF coutners changed between Family 19h and 1Ah.
I also added the precise retire flag for the 3rd core counter.
Lastly, I added a warning in the jevent parser because ignoring the
unknown fields results in counters incorrectly programmed. We should
not just ignore that.
Sponsored by: Netflix
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2040
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These macros are used by some of the NetBSD tests which calculate the
size of types, e.g., `__type_max(time_t)`.
This wraps up the set of macros needed in order to update to the a
netbsd-tests snapshot from this past month.
Obtained from: https://github.com/netbsd/src (55b4b44)
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When kernel external errors are available they are included in the
err(3) library function messages. In addition to the extended error
itself, the kernel also tracks the kernel file and line number at
which the error was generated. This additional information is not
included in the err(3) messages unless the EXTERROR_VERBOSE environment
variable is present. Currently, when EXTERROR_VERBOSE is present,
all the internal extended error information associated with the
error is printed most of which is redundant with the formatted error
message printed by err(3). This change will add only the kernel
file and line number to the err(3) message when EXTERROR_VERBOSE
is present and set to "brief".
Sample output with bad protection bits to mmap:
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8)
guest_16 % setenv EXTERROR_VERBOSE
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 errno 22 category 1 (src sys/vm/vm_mmap.c:200) p1 0x8 p2 0)
guest_16 % setenv EXTERROR_VERBOSE brief
guest_16 % ./Example bigfile
Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 (src sys/vm/vm_mmap.c:200))
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D55494
MFC-after: 1 week
Sponsored-by: Netflix
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- `math.h`: `isinff(..)`
- `sys/time.h`: `timespec*(x)`
These two headers are used by tests in newer snapshots of
`contrib/netbsd-tests`.
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our manual page states that if given a null pointer, system() returns
non-zero if the shell is available and zero if it is not. This is
consistent with the C standard's description of system(), but it is not
what we actually do. What we actually do is always return non-zero, as
required by POSIX.
As the POSIX rationale explains, implementing the logic required by the
C standard does not violate POSIX, since a conforming system always has
a shell, therefore the logic will always return non-zero.
Since our libc is commonly used in non-conforming situations such as
chroots or thin jails, we should implement the full logic required by
the C standard.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: obiwac, bnovkov, kevans
Differential Revision: https://reviews.freebsd.org/D55484
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our manual page currently states that system() will return 127 if it
fails to execute the shell. The actual return value is, to quote POSIX,
“as if the command language interpreter had terminated using exit(127)
or _exit(127)”.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, kevans
Differential Revision: https://reviews.freebsd.org/D55483
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace the somewhat perfunctory NetBSD tests with our own.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, kevans
Differential Revision: https://reviews.freebsd.org/D55482
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ignore SIGINT and SIGQUIT and block SIGCHLD, as POSIX requires.
To deal with the concurrency problem described in POSIX, we keep track
of the count of concurrent invocations. We ignore and block signals
only when the counter was zero before we incremented it, and restore
them only when the counter reaches zero after we decrement it.
Note that this does not address the issue of thread cancellation.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, sef, kevans
Differential Revision: https://reviews.freebsd.org/D55471
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
POSIX.1-2024 states that the 'free' function "shall not modify errno if
ptr is a null pointer or a pointer previously returned as if by malloc()
and not yet deallocated". However this is a fairly recent addition
and non-compliant allocators might still clobber 'errno', causing
'mpool_get' to return the wrong error code. Fix this by saving
and restoring 'errno' after calling 'free'.
Sponsored by: Klara, Inc.
Reviewed by: obiwac
Differential Revision: https://reviews.freebsd.org/D55463
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Detaching the bhyve(4) ppt driver from an unsupported PCI device
should not raise a "Device not configured" error. We do not expect
that a new driver must take over the device in this case.
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D52050
|
| | |
| |
| |
| |
| |
| |
| | |
As written, we'll repeatedly jps_free() the first element, which is
obviously bogus. Fix it to index appropriately.
Fixes: db3b39f063d9f ("libjail: extend struct handlers [...]")
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This manual used the library macro to mark up a header file, causing
pollution in the apropos database for libraries, as well as omission
from the apropos database for headers. This also renders differently,
enclosing the header in angle brackets.
MFC after: 3 days
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No need to have 4 separate manpages for these functions. Use opportunity
to change parameter names in the source from j -> i to reflect the name
used in POSIX. (The ISO C standard uses j but i is a better name
anyway.)
Reviewed by: des, rpokala
Approved by: rpokala
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55361
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
No need to have 4 separate manpages for these functions.
Reviewed by: ziaee, rpokala, des
Approved by: rpokala, des
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D55360
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
If socket() fails because the address family or protocol is unsupported,
just continue with the next address.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55407
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes an issue where the first address that DNS returns is blocked
by a packet filter, so we hang for a while, then the user hits Ctrl-C,
interrupting connect(2), whereupon we move on to the next address, get
a connection, request the file, and return to fetch(1), which sees that
SIGINT was caught and bails.
Note that we make no attempt to enforce fetchTimeout in the connection
phase, and never have. It's feasible, but non-trivial, so we'll leave
it as an exercise for future us.
PR: 293312
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55406
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Provide a wrapper for the common if (verbose) fetch_info(...) idiom.
* Replace remaining instances of fprintf(stderr, ...) with fetch_info().
* Fix a few style nits.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55405
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
These compile-time assert macros are similar to `Static_assert` on FreeBSD.
These macros are in use in newer versions of `contrib/netbsd-tests`.
Obtained from: https://github.com/NetBSD/src (c26cc77b3a0b26b95a2)
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For now, just describe the error where an unprivileged user attempts to
run a VM without DESTROY_ON_CLOSE semantics, i.e., monitor mode.
Reviewed by: bnovkov
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D54743
|