| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add `acpi_pwr_get_state` as a prerequisite to LPI (low-power idle)
states. Since these states define minimum D-state constraints on other
devices to be able to enter them, it will be necessary to use this
function to check them before attempting to do so.
Aside from that, this function is used to get the initial D-state of a
power consumer when registering it (previously the `ac_state` value
would be set to `ACPI_STATE_UNKNOWN`). It uses the `_PSC` method if
available (older devices), or infers the D-state through the `_PRx`
objects (cached in `ac_prx`) with `acpi_pwr_infer_state` if not.
`acpi_pwr_switch_consumer` now uses this to verify that the D-state of
a power consumer was switched correctly.
Reviewed by: imp, markj, jrm (mentor)
Approved by: markj, jrm (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
This allows e.g. Unbound to preload the bundle before chrooting.
* 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.
* We now also have tests.
Reviewed by: kevans, markj
Differential Revision: https://reviews.freebsd.org/D42320
Differential Revision: https://reviews.freebsd.org/D51896
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The power resource dependencies for each `_PRx` object are discovered
and cached in `ac_prx` on the power consumer struct
(`struct acpi_powerconsumer`) when a power consumer is registered. This
is done in `acpi_pwr_get_power_resources`. ACPI guarantees these `_PRx`
objects will evaluate to the same thing each time they are called.
This discovery process also registers those power resources, which were
previously only registered when they were referenced by the relevant
`_PRx` object for the target D-state when switching. This meant that
the first D-state switch for a power consumer would not turn off any
power resources as they wouldn't have been registered yet. This change
fixes this.
`ac_prx` will be used by subsequent patches.
Reviewed by: markj, imp, jrm (mentor)
Approved by: markj, jrm (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48385
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IFF_UP could previously only be unset via RTM_NEWLINK. Requests to set
IFF_UP, though they succeed, did not actually set the flag.
RTM_NEWLINK messages with ifi_change=0 are treated as
ifi_change=0xFFFFFFFF, modifying all the link flags (currently IFF_UP
and IFF_PROMISC) to match the behavior seen on Linux.
Reviewed by: obiwac, kp, mckusick (mentor)
Approved by: obiwac, mckusick (mentor)
Sponsored by: Google LLC (GSoC)
Differential Revision: https://reviews.freebsd.org/D51871
|
|
|
|
|
|
|
| |
Reviewed by: allanjude, markj, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51930
|
|
|
|
|
|
|
|
| |
Reported by: rmacklem
Reviewed by: allanjude, markj, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51930
|
|
|
|
|
|
|
|
|
| |
same as UFS.
Reviewed by: allanjude, markj, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51930
|
|
|
|
|
|
|
|
|
| |
PR: 288889
Reported by: bakul
Reviewed by: allanjude, markj, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51930
|
|
|
|
|
|
|
| |
Reviewed by: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D51987
|
|
|
|
| |
This reverts commit f9ff1e48cc1b77f1840fd514050ccc5904a0cac2.
|
|
|
|
|
| |
Reviewed by: aokblast
Differential Revision: https://reviews.freebsd.org/D51611
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While FIDO/U2F keys were already supported by the generic uhid(4) and
hidraw(4) drivers, this driver adds some additional features an does
steps to tighten the security of FIDO/U2F access.
- It automatically loads through devd.
- Automatically enables HQ_NO_READAHEAD for FIDO/U2F devices.
- Implements only miminum set of features.
- Do not requires external devfs configuration to set character device
permissions.
- Names character device as u2f/# to make possible capsicum or any
other pledge()-style sandboxing.
PR: 265528
Differential Revision: https://reviews.freebsd.org/D51612
|
|
|
|
|
|
|
|
|
|
| |
With factoring out of supporting code from ugen(4) driver.
The ioctl is used in FIDO/U2F security key drivers to get
USB product and manufacturer strings.
PR: 264843
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D51609
|
|
|
|
|
|
|
| |
instead of renaming uhid(4) to hidraw to make easier import of coming
u2f(4) driver which has similar option.
Differential Revision: https://reviews.freebsd.org/D51608
|
|
|
|
|
|
|
| |
We have already reserved this group ID in /etc/group file.
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D51607
|
|
|
|
|
|
| |
It is required to implement HQ_NO_READAHEAD HID quirk.
Differential revision: https://reviews.freebsd.org/D51606
|
|
|
|
|
|
|
|
|
|
|
| |
It disables interrupt emulation on poll-driven buses like USB and
forces aquiring of only one USB frame per read(2) operation.
This avoids an FIDO/U2F issue where IN endpoint data received from
the device right before the file handle is closed, gets lost.
PR: 263995
Reviewed by: aokblast
Differential revision: https://reviews.freebsd.org/D51605
|
|
|
|
|
| |
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51956
|
|
|
|
|
| |
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51955
|
|
|
|
|
| |
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51954
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We frequently need to check if a vnode refers to either a character or
block special, so we might as well have a macro for it.
We somewhat less frequently need to perform similar checks on things
that aren't vnodes (usually a struct vattr *), so add VATTR_ISDEV()
and a generic VTYPE_ISDEV() as well.
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51947
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
Instead of leaking di_db[0] (for regular files this is the index of the
first block of the file), return NODEV when not a special node.
Reported and reviewed by: des
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D51943
|
|
|
|
|
|
|
| |
This reverts commit 2abf24b3698c08c9fc906580fd5be67be65c9feb.
The la57 should be not force-enabled.
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
| |
- s/partitition/partition/
MFC after: 3 days
|
|
|
|
|
|
| |
- s/Monochome/Monochrome/
MFC after: 3 days
|
|
|
|
|
|
| |
- s/datgram/datagram/
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
- s/wit/with/
- s/Recceive/Receive/
- s/convenction/convention/
- s/metaddata/metadata/
Obtained from: OpenBSD
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
It benefits KVA. For userspace la57 is disabled by default for quite
some time, to avoid compat issues.
Reviewed by: alc, imp, olce
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D51929
|
|
|
|
|
|
| |
- s/contants/constants/
MFC after: 3 days
|
|
|
|
|
|
| |
- s/priviledged/privileged/
MFC after: 5 days
|
|
|
|
|
|
| |
- s/interupt/interrupt/
MFC after: 5 days
|
|
|
|
|
|
| |
Sponsored by: Samsung Electronics
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51507
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds UTP Task Management Request functions and revisits the
UTR/UTRM construction logic.
It also introduces ufshci_ctrlr_cmd_send_task_mgmt_request(), which
will be used for timeout handling in a follow-up commit.
Test: I temporarily added the code below to the ufshci_ctrlr_start()
function to test it on a Galaxy Book S.
```
static void
ufshci_ctrlr_start(struct ufshci_controller *ctrlr)
{
...
/* Test: Task Mangement Request */
ufshci_printf(ctrlr,
"Test: Task Mangement Request\n");
struct ufshci_completion_poll_status status;
status.done = 0;
ufshci_ctrlr_cmd_send_task_mgmt_request(ctrlr,
ufshci_completion_poll_cb, &status,
UFSHCI_TASK_MGMT_FUNCTION_QUERY_TASK, 0, 0, 0);
ufshci_completion_poll(&status);
if (status.error) {
ufshci_printf(ctrlr,
"ufshci_ctrlr_cmd_send_task_mgmt_request failed!\n");
return;
}
uint32_t service_response;
service_response =
status.cpl.response_upiu.task_mgmt_response_upiu.output_param1;
ufshci_printf(ctrlr, "Task Management Service Response = 0x%x\n",
service_response);
...
}
```
Sponsored by: Samsung Electronics
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51506
|
|
|
|
|
|
|
| |
9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) [...]") added new
versions of the getgroups(2)/setgroups(2) syscalls.
Requested by: cperciva
|
|
|
|
|
|
|
|
|
| |
See 5205b32de3fb for details.
PR: 287089
MFC after: 1 week
Reviewed by: jlduran
Differential Revision: https://reviews.freebsd.org/D51919
|
|
|
|
|
|
|
|
|
| |
The most useful comments are those that explain _why_.
Restore such an explanation dropped by commit 6d2efbb34fd.
Reviewed by: kevans
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D51918
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 5b5b7e2ca2fa changed namei()s behaviour such that it
does not free the NAMEI buffer unless returning an error.
The nfsd was not fixed for this. Fortunately, the only
leak would be one NAMEI buffer each time mountd(8) reloads
the exports. (There were also leaks in the pNFS server
configuration, but almost no one uses it.)
This patch fixes the leaks by adding NDFREE_PNBUF() macros
in the appropriate places.
MFC after: 2 weeks
Discussed with: kib
Fixes: 5b5b7e2ca2fa ("vfs: always retain path buffer after lookup")
|
|
|
|
| |
Fixes: 4757b351ea9d ("openssl: Import version 3.5.1")
|
|
|
|
| |
Fixes: e69573bc2bee ("iflib: simplify lro & use tcp_lro_queue_mbuf()")
|
|
|
|
|
|
| |
This reverts commit 7ac276298b72982189ac1a5b17461936dc00163e.
Requested by: kib
|
|
|
|
|
|
|
|
|
|
|
| |
We need to actually copyout the remainder of the groups if the egid
succeeded, not failed. My test that was designed to catch this along
with the previously-found syzkaller panic did not zero out the groups
array prior to re-fetching, so it did not catch that entries beyond the
first were not actually populated.
Pointy hat: kevans
Fixes: 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) [...]")
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Reviewed by: kib
Fixes: f1f230439fa4 ("vfs: Initial revision of inotify")
Differential Revision: https://reviews.freebsd.org/D51900
|
|
|
|
|
|
|
|
|
|
| |
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
|