| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The only use of `tlbie %rN, 0` is now explicit and covered in the block
above. Since there's no need for an explicit `tlbie %rN, 0` now, drop
this convoluted piece and let the compiler decide.
While here, a trivial optimization of the old-style tlbie block, by
clearing tlbie_lock and returning, instead of going to the end which
checks again if the lock is needed. Since it's already known to be
needed, there's no need to check again.
|
| | |
| |
| |
| |
| |
| |
| | |
+ link to return(1) like the other exclusive builtins
+ fix alphabetical sorting of list in rendered manual
MFC after: 3 days
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were a few problem here:
- TPM2_Shutdown results in a response that we need to either process
or ignore, otherwise any tpm20_write or tpm20_harvest call will
trivially hang on an `sc->pending_data_length != 0`
- We should have a matching TPM2_Startup upon resume to restore any
state that should have persisted
- We must drain the harvest task before we suspend to avoid problems
there
This commit is sufficient to avoid breaking suspend/resume.
PR: 291067
Fixes: a2d5ed9442bb ("Introduce driver for TPM 2.0 in CRB and [...]")
Fixes: 4ee7d3b0118c ("Allow using TPM as entropy source.")
Co-authored-by: markj (D53835)
Tested by: garga
Differential Revision: https://reviews.freebsd.org/D55074
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the world is built and installed with WITHOUT_ZFS, then make
-DBATCH_DELETE_OLD_FILES delete-old-dirs will give the error:
> rmdir: /etc/zfs: Directory not empty
because /etc/zfs/compatibility.d is still there. While we're here,
clean out /usr/share/zfs as well.
Co-authored-by: kevans
Differential Revision: https://reviews.freebsd.org/D54758
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The verbose message was way too verbose. Make it terse.
MFC after: 1 week
MFC with: 052a791b00 ("acpi: add Darwin OSI quirk for Apple Mac hardware")
Requested by: kib
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch removes the UIC error caused by QEMU not supporting certain
UIC command. Additionally, it removes the unused unipro_version.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D54513
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
During packet processing the descriptor is looked up using epoch(9) and it
can be accessed after bpf_detachd(). In scenario of descriptor close the
tap point is alive (it actually produces packets) and thus the pointer can
be legitimately dereferenced. This fixes a race on a bpf(4) device close
that would otherwise result in panic.
Differential Revision: https://reviews.freebsd.org/D55064
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The destination buffer is FR_GROUPLEN (16 bytes) in length. When
gname is created, the userspace utilities correctly use FR_GROUPLEN
as the buffer length. The kernel should also limit its copy operation to
FR_GROUPLEN bytes to avoid any user written code from exploiting this
vulnerability.
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| |
| | |
re-wrap the function calls in a couple of ifs in get_zfs_root so they
are more readable. They really didn't need to be wrapped like this in
the first place.
Sponsored by: Netflix
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set `ifr->ifr_name` to display gre options
for the interface.
Reviewed by: glebius, zlei
Approved by: glebius (mentor)
MFC after: 1 day
Differential Revision: https://reviews.freebsd.org/D55099
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Reviewed by: mhorne
Sponsored by: Klara, Inc.
Obtained from: Intel perfmon (JSON event definitions)
Differential Revision: https://reviews.freebsd.org/D55081
MFC after: 2 days
|
| | |
| |
| |
| |
| |
| | |
Reviewed by: jhibbits, adrian
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54814
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This change removes additional library files and tests orphaned in the
commit referenced below.
MFC with: 8b78d412a
Fixes: 8b78d412a ("zfs: world changes after 89f729dcc merge")
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
e574c2d36cbcacf2556088879be336775e80154b
Add support for RTL8125D revision 0x6890000
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D54922
MFC after: 2 weeks
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In pf_match_rule() we attempt to append matching rules to the end of
'match_rules'. We want to preserve the order to make the multiple
pflog entries easier to understand. So we keep track of the last added
rule item in 'rt'. However, that assumed that 'match_rules' was only
ever added to in that one call to pf_match_rules(). This isn't always
the case, for example if we have match rules in different anchors.
In that case we'd end up using the uninitialised 'rt' variable in the
SLIST_INSERT_AFTER call.
Instead track the match rules and the last matching rule (to enable
easy appending) in the struct pf_test_ctx.
This also allows us to reduce the number of arguments for some
functions, because we passed a ctx to most functions that needed
'match_rules'.
While here also make pf_match_rules() static, because it's only ever
used in pf.c
Add a test case to exercise the relevant code path.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When calling sysctl(3) with a null 'oldp', i.e., length discovery mode,
'oldix' can be equal to 'oldlen', and we should not fail.
More generally, let SYSCTL_OUT() and SYSCTL_IN() handle corner cases,
simply removing the comparisons between 'oldidx' and 'oldlen' and
'newidx' and 'newlen' done by hand as the test just after is an equality
that does not require to know if 'idx' is smaller than 'len'.
PR: 292917
Reported by: cy
Fixes: 406da392ef8d ("sysctl(9): Booleans: Accept integers to ease knob conversion")
Sponsored by: The FreeBSD Foundation
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Switch from using if () else to a direct return (?:) code.
No functional changes.
Suggested by: kib (D55029)
Sponosred by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste (before removing more () as suggested by him)
Differential Revision: https://reviews.freebsd.org/D55088
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
sc->vm is unconditionally dereferenced earlier in this function. No
functional change intended.
Reviewed by: bnovkov
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55069
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
vmmdev_create() increments the VM count as its last step and calls
vmmdev_destroy() if it fails. However, vmmdev_destroy() unconditionally
decrements the count.
Correct this bug by reordering operations.
Fixes: 1092ec8b3375 ("kern: Introduce RLIMIT_VMM")
Reviewed by: bnovkov
Differential Revision: https://reviews.freebsd.org/D55068
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Needed by a wireless driver.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: kib, emaste
Differential Revision: https://reviews.freebsd.org/D55029
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The rae arg is uint8_t (which we then shift over to the right bit. Pass
'1' instead of 'true' here to match the interface. While true is
promoted to (uint8_t)1, we don't use it as a bool in read_logpage().
Fixes: 5322eec86ae4 ("nvmecontrol: Always set the RAE bit on telemetry-log requests")
Sponsored by: Netflix
Reviewed by: chs
Differential Revision: https://reviews.freebsd.org/D55060
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set the Fine-grained trap registers to trap any features we don't
support. These are expected to be more useful when we support nested
virtualisation, so for now just the base features and GICv3 are not
trapped.
As nested virtualisation will require VHE we only set the fine-grained
trap registers when VHE is used.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54687
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Add the macros and detection for Fine-grained traps (FEAT_FGT and
FEAT_FGT2).
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54686
|
| | |
| |
| |
| |
| | |
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54685
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This allows us to also use the common VIRTIO_SIMPLE_PROBE and to have
devmatch load the driver when detected.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54684
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On arm64 we can use the "dc zva" instruction to zero memory. The CPU
tells software if the instruction is implemented, and if so the size
and alignment it will use.
When the size is 64-bytes the Arm Optimized Routines implementation of
memset can use dc zva to zero memory, and has a build flag to skip
checking.
Use this flag to build a version of memset that will be used when this
assumption is true.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54776
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows static binaries to only include the functions they
reference.
Reviewed by: imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54775
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
If we update Makefile.inc it may be to change the contents of these
files.
Reviewed by: imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D54774
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Another boolean, indicating hardware support, will be introduced in next commit.
Thanks to the previous commit modifying sysctl_handle_bool(), this
change is backwards-compatible with old programs using an integer in and
out of sysctl(3).
Reviewed by: obiwac
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54626
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting up the sysctl tree later:
1. Fixes not de-registering sysctl knobs on failure to attach.
2. Avoids having inconsistent knob values exposed during a brief moment.
Reviewed by: imp, obiwac
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54926
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In sysctl_handle_bool(), if the output buffer (for the old value) has
room for exactly 4 bytes (sizeof(int)), then output the current boolean
value as an integer rather than a 'uint8_t'. Conversely, if 4 bytes
exactly remain in the input buffer (for the new value), treat them as an
integer and derive the new boolean value from it.
Doing so allows to convert existing integer syscstl knobs that are
interpreted as a boolean into true boolean ones while staying
backwards-compatible.
That brings no drawback as no code currently uses sysctl_handle_bool()
as part of a series of calls to sysctl_handle_*() functions for
(de)serialization of some compound structure. If that case ever
materializes, it can be easily solved, e.g., by creating
a sysctl_handle_bool_strict() variant.
In the future, we might want to go further and generally be more liberal
in the external type of integers we accept and output, by tolerating any
kind of supported integers (8-bit to 64-bit), enabling integer type
changes of knob's internal representations without breaking the ABI for
consumers hardcoding the passed integers (instead of relying on sysctl
knob type information).
Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54925
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
While here, declare 'size' only in the relevant block.
No functional change (intended).
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sockets that implement their own socket buffers (marked with PR_SOCKBUF)
are now also responsible for initialization of socket buffer mutexes in
pr_attach and for destruction in pr_detach (or pr_close).
This removes a big bunch of reported LORs, as now WITNESS is able to see
that tcp(4) socket buffer mutex and netlink(4) socket buffer mutex are two
different things. Distinct names also improve diagnostics for blocked
threads.
This also removes a hack from unix(4), where we used to mtx_destroy().
Also removes an innocent bug from unix(4) where for accept(2)-ed socket
soreserve() was called twice. This one was innocent since first call to
soreserve() was asking for 0 bytes of space.
This slightly increased amount of pasted code in TCP's syncache_socket().
The problem is that while for sockets created with socket(2) it is
pr_attach responsible for call to soreserve() (including !PR_SOCKBUF
protocols), but for the sockets created with accept(2) it was
solisten_clone() doing soreserve(), combined with the fact that for
accept(2) TCP completely bypasses pr_attach. This all should improve once
TCP has its own socket buffers.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D54984
|
| | |
| |
| |
| |
| | |
Reviewed by: mhorne
Differential Revision: https://reviews.freebsd.org/D54969
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Due to this all the rest of the items in the Built-in Commands section
were not rendered at all.
Fixes: 2711852bd9ac ("sh.1: Provide detailed job control documentation")
MFC after: 3 days
Reviewed by: emaste, ziaee
Differential Revision: https://reviews.freebsd.org/D55080
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On AMD processors libpmc was using the topic field (based on filename) to
determine the counter's subclass. Unfortunately, the JSON definitions for
AMD Zen 1-4 have the L3 counters in files shared with other counters.
This change has libpmc to use the pmu field (which is derived from the Unit
field in JSON) to determine the correct counter subclass.
Reviewed by: mhorne
MFC after: 2 weeks
Sponsored by: Netflix
Pull Request: https://github.com/freebsd/freebsd-src/pull/1984
|
| | |
| |
| |
| |
| |
| |
| |
| | |
There are no plans to allow multiple sizes of HPT superpages, so just use a
constant for it.
MFC after: 3 weeks
Fixes: 1bc75d77e9 ("powerpc/pmap/oea64: Make PV_LOCK superpage sized")
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since ecdf4409f910 ("Rework the eventhandler locking [...]"),
EVENTHANDLER_REGISTER() can never return NULL.
Suggested by: olce
Reviewed by: olce, ziaee, zlei
Approved by: olce, zlei
Fixes: ecdf4409f910 ("Rework the eventhandler locking [...]")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55014
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When trying to unregister a fictitious range in
`vm_phys_fictitious_unreg_range()`, the function checks the properties
of the looked up segment, but it does not check if a segment was found
in the first place.
This can happen with the amdgpu DRM driver which could call
`vm_phys_fictitious_unreg_range()` without a fictitious range registered
if the initialisation of the driver failed (for example because
firmwares are unavailable).
The code in the DRM driver was improved to avoid that, but
`vm_phys_fictitious_unreg_range()` should still check the return value
of `RB_FIND()` before trying to dereference the segment pointer and
panic with a page fault.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55076
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Mainly, avoid reusing the name of one of the functions we should be
testing (but aren't) for local variables.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55054
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To be closer to AMD's official terminology, except for the "Lowest
Non-Linear Performance" field which we label as 'EFFICIENT_PERF' closer
to Intel's ("Most Efficient Performance"), and to clear possible
confusion.
No functional change (intended).
Reviewed by: aokblast
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54998
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
While here, rename an argument of BITS_VALUE() to be consistent with the
other macros.
Reviewed by: aokblast
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54997
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On MSR_OP_LOCAL and non-naturally-atomic operations (MSR_OP_ANDNOT and
MSR_OP_OR), there is no guarantee that we are not interrupted between
reading and writing the MSR, and that interruption could actually
perform some operation on that MSR, which would be lost.
Prevent that problem by temporarily disabling interrupts around MSR
manipulation.
Reviewed by: kib
Discussed with: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54996
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simplify them by moving them into more natural places, i.e., default
cases of 'switch' statements.
No functional change (intended).
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54996
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
No functional changes (intended).
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54996
|
| | |
| |
| |
| |
| |
| | |
Repprted and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| | |
These tests require the tftp client, which is not installed when
`MK_TFTP=no`. Remove them when that's not true.
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| |
| | |
factor(1) is only installed when MK_GAMES != no. Ergo, remove the tests
when that's not true.
MFC after: 1 week
|
| | |
| |
| |
| | |
MFC after: 1 week
|
| | |
| |
| |
| |
| |
| | |
No functional change intended.
MFC after: 1 week
|