Make it possible to search for literal two colons (::) and actually
find something. Make the "x"/"x:"/"x::" examples more explicit and
more visibile.
Signed-off-by: Simon Wollwage <rootnode+freebsd@wollwage.com>
Obtained from: NetBSD, nbuwe <uwe@stderr.spb.ru>, 856d5b6
PR: 291374
Reviewed by: imp, jlduran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1923
This avoids e.g. utilities or ssh depending on the full blocklist
package just because they link against libblocklist.
This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.
MFC after: never
Reviewed by: bapt
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53605
This was previously in runtime, because pam_unix uses it and we don't
want to pull in the entire yp package as a dependency of runtime.
However, we can now use LIB_PACKAGE here to create a yp-lib package
to contain the library, which is a much more reasonable dependency.
Since libypclnt clearly belongs in the yp package, move it there.
This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.
MFC after: never
Reviewed by: bapt
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53600
Zstd is a discrete, self-contained system component. To match how we
package zlib, bzip2 and xz, move it to its own package, with a separate
lib package.
Add the new package to the minimal set, since this is a core component
that users expect to be installed.
This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.
MFC after: never
Reviewed by: bapt
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D53603
The previous fix introduced a regression on machines without the BMI1
instruction set extension. The TZCNT instruction used in this function
behaves different on old machines when the source operand is zero, but
the code was originally designed to never trigger this case. The bug
fix caused this case to be possible, leading to a regression on
sufficiently old hardware.
Fix the code by messing with things such that the source operand is
never zero.
PR: 291720
Fixes: 66eb78377b
Tested by: cy
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D54303
When resolving references, assert that the type of the object we find
is what we expect. This will help prevent memory corruption if two
objects of different types somehow end up with the same identifier.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54454
We were using strtoul() to parse object identifiers, which are kernel
pointers. This works fine as long as the kernel and userland match,
but in a 32-bit libgeom on a 64-bit kernel this will return ULONG_MAX
for all objects, resulting in memory corruption when we later pick the
wrong object while resolving consumer-producer references.
MFC after: 1 week
PR: 292127
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54452
ioctls can fail with EACCES, see sys/kern/tty.c
PR: 239504
MFC after: 3 days
Reviewed by: ziaee
Reported by: Brennan Vincent <brennan@umanwizard.com>
Differential Revision: https://reviews.freebsd.org/D49072
This fixes a segfault on i386 and armv7 and numerous style violations.
PR: 292008
Fixes: 4f809ffec6 ("gpart: add libxo support for "show" subcommand + man page updates")
Reviewed by: js
Differential Revision: https://reviews.freebsd.org/D54393
, related functions, and the EXTERROR_VERBOSE environment variable.
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
If the variable is set and the process is not suid, __uexterr_format(),
used by err(3), prints errno/category/source line/pX always, not only
when there is no kernel message provided.
Requested by: mckusick
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
Note that we trust kernel code to only request the printout of integer
types, and use the 'j' modifier always.
Reviewed by: emaste, mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54380
In commit 2e47f35be5 libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.
However, this also comes at the cost of some performance, since the
dynamic libraries are quite large, and contain lots of long symbols
(mangled C++ identifiers).
Add a WITH_LLVM_LINK_STATIC_LIBRARIES build knob that can be used to go
back to the previous behavior: libllvm, libclang and liblldb are built
as internal static libraries, i.e. only available during buildworld, and
fully linked into the various executables such as clang, lld, etc.
PR: 287447
Reviewed by: emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50956
In commit 2e47f35be5 libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.
However, upstream builds the shared libraries using several visibility
options, which reduces the number of external symbols, and makes the
libraries a bit smaller.
On my test machine:
* libprivatellvm.so goes from 75643 to 34706 symbols (~54% reduction)
* libprivateclang.so goes from 53250 to 33531 symbols (~37% reduction)
* libprivatelldb.so goes from 27242 to 18798 symbols (~31% reduction)
Note: to get the full benefit, a clean build is required. Incremental
builds should still work, but I didn't want to force a full rebuild on
everybody.
MFC after: 1 week
The mq_getfd_np function appeared in FreeBSD 11 with no documentation.
This function dereferences the mqd_t as a pointer to an int.
Relnotes: yes
MFC after: 3 days
Reviewed by: kib (previous), markj, ziaee
Differential Revision: https://reviews.freebsd.org/D43947
Added libxo support to `gpart show`, also updated the man
pages for geom and gpart to show where you can expect
libxo formatted output.
PR: 290629
MFC after: 1 week
Sponsored by: ConnectWise
Reviewed by: asomers, mckusick, phil
Approved by: asomers (mentor)
Differential Revision: https://reviews.freebsd.org/D53950
Modeled directly after the method used by the zfs/zpool commands: flag
commands with a "please log me" flag, and when there, reconstruct the
command line. On success, call the library function to add it to the
log.
(Majority of the change by Rob; minor edits by kevans@)
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Co-authored-by: Kyle Evans <kevans@FreeBSD.org>
Sponsored by: Modirum MDPay
Sponsored by: Klara, Inc.
This change adds the ability to tie a virtual machine's lifecycle to
a /dev/vmmctl file descriptor. A user can request `vmmctl` to destroy a
virtual machine on close using the `VMMCTL_CREATE_DESTROY_ON_CLOSE` flag
when creating the virtual machine. `vmmctl` tracks such virtual machines
in per-descriptor lists.
Differential Revision: https://reviews.freebsd.org/D53729
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
MFC after: 3 months
These are the remaining trivial xfail cases where no other
test logic changes are necessary.
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
PR: 290099
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid
unexpected aborts.
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
PR: 290099
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
Replace ATF_CHECK_* with ATF_REQUIRE_* to fail fast and avoid
unexpected abort.
PR: 290099
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
This fixes broken test reports with the following message:
lib/msun/fe_round_test:fe_round -> broken: Test result contains
multiple lines: expected_failure:
/usr/src/contrib/netbsd-tests/lib/libm/t_fe_round.c:95: Didn't get the
same rounding mode out!<<NEWLINE>>(index 0) fed in 64 rounding mode, got
0 out<<NEWLINE>> [0.079s]
Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
Since the initializer is used in other places where we can't just
replace it with a char-by-char initializer, this adds a macro for the
nonstring attribute (match the linuxkpi definition).
Reviewed by: emaste, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52535
This defaults to an error in clang HEAD, use a char-by-char
initializer instead.
Reviewed by: emaste, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52532
This implementation appears to be broken on some CPUs. Disable it
until the issue can be investigated and fixed.
PR: 291720
Fixes: 66eb78377b ("libc/amd64: fix overread conditions in stpncpy()")
Fixes: 90253d49db ("lib/libc/amd64/string: add stpncpy scalar, baseline implementation")