In 454adf0fa4 some of the issues reported in the
PR where addressed. This commit adds a clarification about how the prefix of the
directories to be sourced actually behave.
PR: 197152
Reported by: jason.mann+freebsd@gmail.com
Approved by: manpages (bcr@)
Differential Revision: https://reviews.freebsd.org/D38627
Commit 9d329bbc9a converted a lot of accesses to nfsstatsv1
to use nfsstatsv1_p instead. However, the accesses in
nfs_commonkrpc.c are for client side and should not be
converted. This patch puts them back in the correct
pre-commit 9d329bbc9a form.
MFC after: 3 months
Currently LLVM is more or less set up to use ELFv2, but it still defaults to
ELFv1 in some places. This causes lld to generate broken binaries when used
with LTO.
PR: 269455
Approved by: dim
MFC after: 3 days
Since svcpool_create() is now called from an initialization function,
!jailed() no longer works. Replace it with IS_DEFAULT_VNET().
MFC after: 3 months
The interrupt counts may have been valuable in the past, but now DDB can
readily provide them via 'show intrcnt'. This is one of the only
consumers of these counter arrays outside of the interrupt code itself,
and this should be avoided.
Reviewed by: mhorne, fuz
Differential Revision: https://reviews.freebsd.org/D37870
Sponsored by: The FreeBSD Foundation
Fixes: d1c7405ef6 ("PCBGROUP.9: remove obsolete man page")
Fixes: 52f9a2823c ("rtalloc.9: remove obsolete man page")
We need these to be assignments, error out if they're not.
While we're here, tag errout as __printflike so that the compiler will
sanity check the format string + args.
CID: 1505293
Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D38642
Every caller path()s its arguments anyways, just simplify these and push
path() into moveifchanged(). This fixes a number of memory leaks in the
process since path() allocates memory, which we will now free().
While we're here, make sure we close from_fd/to_fd appropriately.
CID: 1471040, 1471714, 1472045, 1006907, 1006908
Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D38641
None of the callers check that the allocation in path() failed, so let's
check in path() and abort instead of failing.
Along those lines, none of the callers seem to acknowledge that the
returned string needs to be free()d -- let's do that as well. There are
a couple not addressed in this commit that will be addressed in a future
commit by pushing the path() call down into moveifchanged() instead and
freeing it properly there.
CID: 1505271, 1505250, 1505279
Reviewed by: emaste, imp
The patch introduced a behavior change coming from getopt_long, namely
the entire argument array would be parsed looking for opts, which
affected uses spawning new processes without passing '--' to delimit
where cpuset arguments end. [1]
Apart from that turns out the change had a bug: using CPU_LEVEL_ROOT
instead of CPU_LEVEL_WHICH, returning a different cpuset than intended.
[2]
The intended functionality is provided with nproc(1), which landed after
this change.
As such, revert for the time being.
This reverts commit d9d5f2c042.
Reported by: Mark Millard [1]
Reported by: jbeich [2]
The prior code mistakently thought that the g_consumer that hung off the
provider we found were the right thing to use to find all the glabel
aliases for this node. However, the only way to find that is to iterate
through all the geoms that belong to the glabel geom class, looking for
those geoms with the same name as the provider with the right efimedia.
Do this in a way that caches glabel class, and allows for it to be
absent. Tighten the filter for mounted filesystems to only look
for the ones that are mounted on /dev/.. since the rest of the code
assumes that.
MFC After: 3 days
Sponsored by: Netflix
Reviewed by: corvink, asomers
Differential Revision: https://reviews.freebsd.org/D38619
"efibootmgr --efidev unix-path" will return the UEFI device-path to the
file or device specified by unix-path. It's useful for debugging, but
may also be useful for scripting.
Sponsored by: Netflix
Reviewed by: corvink, manu
Differential Revision: https://reviews.freebsd.org/D38617
In path_to_dp, allow passing in either the actual device path "eg
/dev/foo/bar" or the path where the device is mounted (say
/mnt/baz/bing). In the former case we'll assume the path within the
device is nothing (the relpath). In the latter, we'll take from the
mount point on down as the relpath.
Sponsored by: Netflix
Reviewed by: corvink, manu, asomers
Differential Revision: https://reviews.freebsd.org/D38616
Allow there to be NULL paths in buildp. This lets us return the device
path to the partition, as well as to files on the partition.
Sponsored by: Netflix
Reviewed by: corvink, manu, asomers
Differential Revision: https://reviews.freebsd.org/D38615
If there's no efimedia attribute on the provider, and the provider's a
glabel, then find the 'parent' geom. In this case, the provider's name
is label-type/name, but the geom's label will that of the underlying
device (eg ada0p1). If it is, recurisvely call find_geom_efimedia with
the geom's name, which shuold have the efimedia attribute.
Sponsored by: Netflix
Reviewed by: corvink, manu, asomers
Differential Revision: https://reviews.freebsd.org/D38614
In the past, we modified pcap/pcap.h to include the system net/bpf.h
rather than libpcap's own pcap/bpf.h. However, starting around 1.10.2,
libpcap requires a few extern functions defined in pcap/bpf.h to build.
Simply reverting that local change and pulling in pcap/bpf.h is not a
solution, because some ports with '#include <pcap.h>' such as mail/spamd
and net/xprobe require the system net/bpf.h to be pulled in. To
accommodate both requirements, make pcap/bpf.h a wrapper around the
system net/bpf.h, but retain the extern function definitions. This is
in preparation for libpcap 1.10.3.
Approved by: cy, philip, emaste, delphij (earlier revision)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38575
The current code missed interface addition when reallocating
temporary buffer.
Tweak the code to perform the reallocation first and add
interface afterwards unconditionally.
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 3 days
When we send out a deferred packet we must make sure to call
ip6_output() for IPv6 packets. If not we might end up attempting to
ip_fragment() an IPv6 packet, which could lead to us reading outside of
the mbuf.
PR: 268246
Reviewed by: melifaro, zlei
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D38586
to limit cache-line bouncing.
Note that as there is no atomic_store we are hoping the compiler wont
speculatively do the store. It is not employed because the size depends
on target arch.
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D38433
They don't provide any value and are quite arbitrary.
Note arm64 GENERIC-MMCCAM was already excluded, just not the NODEBUG
variant.
The option is already build-tested with arm64 LINT kernel.
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D38458
Summary:
Coverity reports the use of two uninitialized variables in the hyperv
driver. Examination shows the variables can be accessed while
uninitialized in error cases. Fix both.
CID: 1365235
CID: 1365236
Sponsored by: Dell Technologies
MFC after: 1w
Test Plan: Changes in use at $WORK
Reviewers: robert.herndon_dell.com, vangyzen, bret_ketchum_dell.com
Subscribers: imp, badger
Differential Revision: https://reviews.freebsd.org/D38551
Commit 7344856e3a6d added a lot of macros that will front end
vnet macros so that nfsd(8) can run in vnet prison.
The nfsstatsv1_p variable got missed. This patch wraps all
uses of nfsstatsv1_p with the NFSD_VNET() macro.
The NFSD_VNET() macro is still a null macro.
MFC after: 3 months
The read buffer in cnt() is 64 kB, which is a bit excessive for a stack variable. MAXBSIZE has grown since this code was originally written, and it might grow again in the future. Since the program is single-threaded and cnt() does not recurse, we can safely make the buffer static.
While there, constify p since it is only used to read.
Sponsored by: Klara, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38608
* Add a test that causes mbrtowc() to return 0.
* Add a test that causes mbrtowc() to return -2.
Sponsored by: Klara, Inc.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D38605
Commit 7344856e3a6d added a lot of macros that will front end
vnet macros so that nfsd(8) can run in vnet prison.
This patch adds similar macros named KGSS_VNETxxx so that
the gssd(8) daemon can run in a vnet prison, once the
macros front end the vnet ones. For now, they are null macros.
This is the last commit that adds macros. The next step is
to change the macros to front end the vnet ones.
MFC after: 3 months
Add a note about why we need these extra compiler flags to suppress
warnings. EDK2 upstream code is being used verbatim and as of the last
update these issuse persist, but are benign.
Sponsored by: Netflix
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D38613
Extend SFP+ cage crosstalk fix by re-checking link state after 5ms delay
to filter out spurious link up indication by transceiver with no fiber
cable connected.
Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Tested by: Gowtham Kumar Ks <gowtham.kumar.ks@intel.com>
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D38395
- Account for a filter required to enable reception of untagged frames
while registering and unregistering VLANs to avoid trying to add more
filters than HW supports
- While adding MAC/VLAN filters, pre-set matching method field in the
Admin Queue Command response buffer to expected error value to work
around an issue with some FW versions, which do not update that field if
operation fails, and be able correctly track which filters were
configured in HW.
- Remove unused IXL_MAX_FILTERS macro definition
- Update number of available MAC/VLAN filters as in newer FW versions it
was decreased by one.
- Simplify i40e_dma_mem structure
Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
Tested by: Gowtham Kumar Ks <gowtham.kumar.ks@intel.com>
MFC after: 3 days
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D37457
It's the same as `strscpy()` except that it fills the rest of the
destination buffer with zeroes if the source buffer is shorter.
Reviewed by: manu
Approved by: manu
- Use atomic_store to set job->error. atomic_set does an or
operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensures proper memory barriers are present so that the last bio
won't see a possibly stale value of job->error.
- Don't re-read job->error after reading it via atomic_load.
Reported by: markj (1)
Reviewed by: mjg, markj
Differential Revision: https://reviews.freebsd.org/D38611
On Linux _NPROCESSORS_CONF reports CPU threads disabled by the kernel,
while it does not on FreeBSD.
Flip _NPROCESSORS_ONLN to _NPROCESSORS_CONF. While it keeps reporting
the same value, it will automagically unbreak should someone change the
above.
Netlink customers rely on admin and operational state when
working with interfaces. The current implementation retuns
"unknown" operstate for all interface types except IFT_ETHER
and IFT_LOOP.
This change updates the code to fetch vlan operstate in the same way
as for the ether interfaces. For the rest of the interface types,
operstate is now mapped to the admin state.
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 3 days
profil(II) is in the scanned 3rd edition manual that we have. We don't
have the 3rd edition sources, nor do we have the 4th edition souces. We
have a mostly complete (missing pipes) 4th edition C rewrite where
profil system call number is reserved, but it's not implemented (it's in
the manx section for things that apeared to have been in 3rd edition but
weren't yet part of the reimplemented 4th edition). The 5th edition
sources we have do have it, however. For other items that have appeared
in earlier manuals, we've added the simple verbage to the manual and
relegated the rest of the data for that file to the commit message.
Use atomic_fetchadd in place of separate atomic_subtract / atomic_load.
Reviewed by: markj
Sponsored by: HPE TidalScale
Differential Revision: https://reviews.freebsd.org/D38559
Do the cast from sockaddr to either IPv4 or IPv6 sockaddr in the
protocol's pr_bind method and from there on go down the call
stack with family specific argument.
Reviewed by: zlei, melifaro, markj
Differential Revision: https://reviews.freebsd.org/D38601
Apply zero padding for checksums consistently. The SNPRINTF_BLKPTR
macro was not updated in commit ac7648179c which results in the
`cli_root/zdb/zdb_checksum.ksh` test case reliably failing.
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Akash B <akash-b@hpe.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes#14497
Commit 7344856e3a6d added a lot of macros that will front end
vnet macros so that nfsd(8) can run in vnet prison.
This patch adds similar macros named KRPC_VNETxxx so that
the rpc.tlsservd(8) daemon can run in a vnet prison, once the
macros front end the vnet ones. For now, they are null macros.
MFC after: 3 months