dlg [Thu, 6 Apr 2023 00:09:39 +0000 (00:09 +0000)]
better handle "phy-mode" properties, in particular around clk delays.
the phy mode can encode whether rk3568 mac should be doing the
delays when talking to the phy, or whether it should ignore them
and let the phy handle them. turns out this will probably be needed
by kettenis to get working ethernet on another rk3568 based system.
tweaks and ok kettenis@
kn [Wed, 5 Apr 2023 23:01:03 +0000 (23:01 +0000)]
Push kernel lock into nd6_resolve()
Tested as part of bigger unlock diffs, commit now as tiny first step.
OK bluhm
bluhm [Wed, 5 Apr 2023 21:51:47 +0000 (21:51 +0000)]
ARP has a sysctl to show the number of packets waiting for an arp
response. Implement analog sysctl net.inet6.icmp6.nd6_queued for
ND6 to reduce places where mbufs can hide within the kernel.
Atomic operations operate on unsigned int. Make the type of total
hold queue length consistent.
Use atomic load to read the value for the sysctl. This clarifies
why no lock around sysctl_rdint() is needed.
OK mvs@ kn@
bluhm [Wed, 5 Apr 2023 19:35:23 +0000 (19:35 +0000)]
ARP has a queue of packets that should be sent after name resolution.
ND6 did only hold a single packet. Unify the logic and add a mbuf
hold queue to struct llinfo_nd6. This is MP safe and queue limits
are tracked with atomic operations. New function if_mqoutput() has
common code for ARP and ND6. ln_saddr6 holds the source address
of the requesting packet. That is easier than fiddling with mbuf
queue in nd6_ns_output().
OK kn@
schwarze [Wed, 5 Apr 2023 18:34:37 +0000 (18:34 +0000)]
Import the first of the new libevent manual pages
written by Ted Bullock <tbullock at comlore dot com>
in order to polish it in the tree.
Not yet linked to the build.
In particular, this documents the so far undocumented functions
event_base_new(3) and event_reinit(3) and provides lots of new
information regarding event_init(3) and event_base_free(3).
Also using input from nicm@, jmc@, and myself, OK nicm@ jmc@.
mglocker [Wed, 5 Apr 2023 17:23:30 +0000 (17:23 +0000)]
Enable Force Unit Access (FUA) for write commands. This seems to fix
intermittent data corruptions which I faced. The documentation says about
FUA for write commands:
"The Device Server shall write the logical blocks to the medium, and shall
not complete the command with GOOD status until all the logical blocks have
been written on the medium without error."
krw [Wed, 5 Apr 2023 14:07:08 +0000 (14:07 +0000)]
Add (inside #if 0 blocks) #define's and gpt_types[] entries for
all the GPT partition types known to mankind. a.k.a. Wikipedia,
Linux, and various BSD's.
Makes it easier to discuss/add/remove/check GUID's known to
fdisk(8).
No functional change.
bluhm [Wed, 5 Apr 2023 13:56:41 +0000 (13:56 +0000)]
If ndp -d did not find a neigbor entry, it removed the cloning route
instead. Comparing the arp(8) and ndp(8) code shows that the latter
has a fallthrough to delete. Return an error also in this case.
OK kn@
kn [Wed, 5 Apr 2023 13:56:31 +0000 (13:56 +0000)]
Call getuptime(9) once for consistency; OK bluhm
tb [Wed, 5 Apr 2023 11:31:38 +0000 (11:31 +0000)]
Add a few missing braces
ok jsing
tb [Wed, 5 Apr 2023 11:30:12 +0000 (11:30 +0000)]
Set up the RSA's _method_mod_n before the initial blinding
As observed by Bernd Edlinger, the main part of the RSA timing leak that was
recently made public is that the initial blinding isn't done with Montgomery
exponentiation but rather with plain exponentiation.
Pull up the initialization of the cached Montgomery context to ensure we use
Montgomery exponentiation. Do this for private_{de,en}crypt(). Interestingly,
the latter was fixed in OpenSSL a while ago by Andy Polyakov as part of the
"smooth CRT-RSA" addition.
If this code was anything but completely insane this would never have been
an issue in the first place. But it's libcrypto...
ok jsing
kettenis [Wed, 5 Apr 2023 11:07:40 +0000 (11:07 +0000)]
Sprinkle a few BTI instructions into the arm64 assembly files and pass
-mmark-bti-property to indicate those now have BTI support.
ok jsing@, deraadt@
tb [Wed, 5 Apr 2023 11:03:11 +0000 (11:03 +0000)]
bn_mod_sqrt: Improve a handful of comments and a printf
kettenis [Wed, 5 Apr 2023 10:48:12 +0000 (10:48 +0000)]
Call dwpcie_link_config() when initializing the RK3568 PCIe controllers.
This makes sure the PCIe link runs at the maximum possible speed.
Prompted by a diff from dlg@, who also tested this alternative diff.
ok dlg@
tb [Wed, 5 Apr 2023 10:47:00 +0000 (10:47 +0000)]
Improve regress coverage for BN_mod_sqrt()
This now covers all the main branches of both the old and new
BN_mod_sqrt() implementation except for negative p.
kettenis [Wed, 5 Apr 2023 10:45:07 +0000 (10:45 +0000)]
Implement software control for the internal delays of the RTL8211F PHY.
Since we need to retain the hardware/firmware configuration of the delays
in most existing hardware that uses rgephy(4) (such as PCIe NICs), add a
bew MIIF_SETDELAY flag that controls the software configuration of the
delays.
ok dlg@, jsg@
kn [Wed, 5 Apr 2023 10:40:37 +0000 (10:40 +0000)]
Call getuptime(9) once for consistency, sync with ARP
Feedback OK bluhm
jsg [Wed, 5 Apr 2023 10:34:36 +0000 (10:34 +0000)]
sync
edd [Wed, 5 Apr 2023 09:46:27 +0000 (09:46 +0000)]
bsd.port.mk: Fix documentation on PATCHORIG.
The default recently changed to `.orig.port`.
OK sthen@, tb@, op@, thanks!
tb [Wed, 5 Apr 2023 08:43:31 +0000 (08:43 +0000)]
Simplify mod_sqrt_test() a bit
claudio [Wed, 5 Apr 2023 08:37:21 +0000 (08:37 +0000)]
Refactor port definitions to also support service names like bgp.
OK tb@
claudio [Wed, 5 Apr 2023 08:04:28 +0000 (08:04 +0000)]
Rename family with af to follow pfctl/parse.y a bit more.
OK tb@
tb [Wed, 5 Apr 2023 07:52:25 +0000 (07:52 +0000)]
bn_mod_sqrt test: Use a #define rather than hard coded 100
tb [Wed, 5 Apr 2023 07:17:44 +0000 (07:17 +0000)]
Add coverage for the truly non-deterministic path of Tonelli-Shanks
Regress coverage of all of BN_mod_sqrt() is still lacking after this.
This will improve in forthcoming commits.
otto [Wed, 5 Apr 2023 06:25:38 +0000 (06:25 +0000)]
Introduce variation in location of junked bytes; ok tb@
cheloha [Wed, 5 Apr 2023 00:23:06 +0000 (00:23 +0000)]
clockintr: add clockintr_cancel()
As the name suggests, clockintr_cancel() cancels any pending
expiration of the given clockintr.
I think we will need this in the near future.
cheloha [Tue, 4 Apr 2023 21:49:10 +0000 (21:49 +0000)]
clockintr: add clockintr_cancel_locked()
Move the CLST_PENDING check and TAILQ_REMOVE() in
clockintr_schedule_locked() into a dedicated function,
clockintr_cancel_locked(). clockintr_schedule_locked() no longer
implicitly cancels a pending clockintr: it is the caller's
responsibility to check for CLST_PENDING and cancel any pending
expiration before calling clockintr_schedule_locked(). We can skip
the CLST_PENDING check during the dispatch loop because we know for
certain the clockintr in question is pending.
This is more verbose but I think it is less surprising. Both
functions do one thing.
krw [Tue, 4 Apr 2023 21:43:06 +0000 (21:43 +0000)]
Adopt a more compact idiom when initializing gpt_types[]. Group
entries with attributes together.
No intentional functional change.
bluhm [Tue, 4 Apr 2023 21:18:04 +0000 (21:18 +0000)]
Remove stylistic differences between arp(8) and ndp(8) delete()
function. This makes it easier to spot real changes in behavior.
OK kn@
anton [Tue, 4 Apr 2023 18:14:32 +0000 (18:14 +0000)]
A refactoring back in 2016 in which magic numbers where extracted into
named constants accidentally dropped an instruction causing detection of
eXtended operations (XOP) on AMD hardware to break.
ok miod@ tb@
schwarze [Tue, 4 Apr 2023 17:10:37 +0000 (17:10 +0000)]
In preparation for better documenting BIO info callbacks, improve the
description of BIO_ctrl(3) and its three siblings. Given the vast range
of effects these functions can have, the text is unavoidably still
vague, but at least some information can be provided.
While here, fix one wrong parameter type and three inconsistent
parameter names in the SYNOPSIS.
claudio [Tue, 4 Apr 2023 16:01:54 +0000 (16:01 +0000)]
Cleanup parse.y a bit. Move global defines a bit down. Move mrtdump and
network rules up into the grammar and switch the order of restricted
to be more like the rest.
OK tb@
tb [Tue, 4 Apr 2023 15:32:02 +0000 (15:32 +0000)]
Clean bn_mod_sqrt up a little
This makes it look a bit more like other tests and also prepares the
addition of further test cases and different tests.
bluhm [Tue, 4 Apr 2023 10:12:03 +0000 (10:12 +0000)]
When sending IP packets to userland with divert-packet rules, the
checksum may be wrong. Locally generated packets diverted by pf
out rules may have no checksum due to to hardware offloading.
Calculate the checksum in that case.
OK mvs@ sashan@
kn [Tue, 4 Apr 2023 08:39:40 +0000 (08:39 +0000)]
Enable guided disk encryption support on arm64
All board specific quirks inside the installer (and other bugs) relating to
root on softraid are fixed, so that install media with the new question
just works for plain as well as encrypted installs.
Tested on Pinebook Pro, Raspberry Pi 4b, SolidRun CEX7.
kn [Tue, 4 Apr 2023 08:31:35 +0000 (08:31 +0000)]
Make root on softraid installations boot out of the box on Raspberry Pis
Various files are put onto a pi's ESP, assuming root disk means boot disk,
which is not true for root on softraid(4).
Wrap the code in a loop over chunks (if any) or the single disk as before,
just like installboot(8) does.
OK mbuhl
jsg [Tue, 4 Apr 2023 00:38:37 +0000 (00:38 +0000)]
Synopsis Designware -> Synopsys DesignWare
tb [Mon, 3 Apr 2023 21:43:43 +0000 (21:43 +0000)]
Compress euclid() a little
This function is spread out over way too many lines and has too much
repetition. Once this is made a little more compact, it becomes clearer
that this is a somewhat obfuscated version of binary gcd (it is not
constant time therefore cryptographically unsound. It is not used
internally). This will likely go away later.
ok jsing
tb [Mon, 3 Apr 2023 21:33:16 +0000 (21:33 +0000)]
Link bn_gcd test to regress
tb [Mon, 3 Apr 2023 21:32:44 +0000 (21:32 +0000)]
Add regress coverage for BN_gcd() and BN_gcd_ct()
miod [Mon, 3 Apr 2023 18:59:47 +0000 (18:59 +0000)]
Fix stupid bug in previous.
cheloha [Mon, 3 Apr 2023 17:40:51 +0000 (17:40 +0000)]
clockintr: clockintr_cpu_init(): isolate struct clockintr_queue setup
We will always need to initialize the clockintr_queue struct.
However, the hardclock, schedclock, and statclock will not always be a
part of that struct. Move the clockintr_establish() calls in
clockintr_cpu_init() away from the other initialization steps to make
the dependency relationship more obvious. We need to intialize a
struct clockintr_queue before we can establish clock interrupts.
millert [Mon, 3 Apr 2023 13:38:18 +0000 (13:38 +0000)]
acpibtn_notify: ignore duplicate ACPI lid transitions
A Dell Precision 5510 produces two _LID events when the lid is closed.
This results in acpibtn_notify() adding two sleep tasks. The laptop
suspends and resumes successfully, but on resume the second sleep
task runs and it goes right back to sleep. Making the lid transition
a no-op when the existing value matches new _LID value works around
the problem. OK miod@ jcs@
claudio [Mon, 3 Apr 2023 11:57:50 +0000 (11:57 +0000)]
Reduce indent in single_thread_check_locked() by inverting initial
if () check which just returns.
OK mpi@
kn [Mon, 3 Apr 2023 10:51:50 +0000 (10:51 +0000)]
Stop writing pine64 firmware to disk
pine64 happens to be the first board "we ran on", as kettenis explains, and
this code tries to handle the situation of installing to the same disk the
installer booted from.
Similar boards like the Pinebook Pro don't get special treatment and work;
INSTALL.arm64 already explains how to flash required firmware onto disks or
install media -- Allwinner SoCs like the pine64 included.
Spotted through md_installboot() dd'ing blobs onto the root disk,
which does not fly with root on softraid and is in the way of arm64 getting
support for guided disk encryption.
Suggested by kettenis patrick
Feedback jsg patrick
OK patrick
claudio [Mon, 3 Apr 2023 10:48:00 +0000 (10:48 +0000)]
Add first step of flowspec support. This adds the bits to establish a
connection with SAFI 133. Right now any sent UPDATE with SAFI 133 is
simply ignored. At the moment SAFI 134 (flowspec for L3VPN) is unsupported.
OK tb@
dtucker [Mon, 3 Apr 2023 08:10:54 +0000 (08:10 +0000)]
Move null check up and simplify process_escapes. Based on Coverity CID
291863 which points out we check the channel pointer for NULLness after
dereferencing it. Move this to the start of the function, and while
there simplify initialization of efc a bit. ok djm@
nicm [Mon, 3 Apr 2023 07:39:37 +0000 (07:39 +0000)]
Clarify text for new -A slightly, GitHub issue 3508.
dlg [Mon, 3 Apr 2023 05:58:56 +0000 (05:58 +0000)]
enable rkusbphy(4)
dlg [Mon, 3 Apr 2023 01:57:41 +0000 (01:57 +0000)]
try using a standard phy drivers registered with ofw/fdt first.
this allows ehci to enable rkusbphy(4), which in means the port and
port gets turned onto the port.
tested on a radxa e25 and nanopi r5s without any usb or usb phy
support in the boot loader.
ok kettenis@
dlg [Mon, 3 Apr 2023 01:55:00 +0000 (01:55 +0000)]
add support for enabling both the usb2 and usb3 phys.
the code tried enabling the 0th phy in the usb-phy proplist, which
is the usb2 phy, and if that didn't exist it would try usb3-phy in
the standard phys/phy-names properties. it now tries to enable the
usb2 and usb3 phys independently.
further, support using standard phy drivers registered with the
ofw/fdt code, not just the ones handled inside the xhci driver.
ok kettenis@
dlg [Mon, 3 Apr 2023 01:46:18 +0000 (01:46 +0000)]
register mvneta so the interface can be found by node/phandle later.
dlg [Mon, 3 Apr 2023 01:40:32 +0000 (01:40 +0000)]
add phy_enable_prop_idx() to work with phys under props other than "phy".
eg, the snps,dwc3 device tree bindings say that it uses a usb2 and
usb3 phy, and they can be listed either "usb2-phy" and "usb3-phy"
under the standard "phys" and "phy-names" properties supported by
phy_enable(), or as slots 0 and 1 under a "usb-phy" properties. the
latter would be supported by phy_enable_idx(), but it hardcodes
"phys" as the property it looks at. phy_enable_prop_idx() is the
same as phy_enable_prop_idx, but it lets you specify which property
you're indexing into.
ok kettenis@
dlg [Mon, 3 Apr 2023 01:34:06 +0000 (01:34 +0000)]
special case phandle 0 and return NULL when looking up network interfaces.
not all interfaces will have a phandle (ie, it will be 0), so don't
let phandle 0 be used to find any of these.
discussed with miod@
dlg [Mon, 3 Apr 2023 01:30:32 +0000 (01:30 +0000)]
add glue for network interfaces to be found by fdt/ofw node or phandle.
if we're going to support switch chips (eg, marvell link street
switches as found on a3700 boards like the espressobin), then the
device tree for switch ports identifies which network interface
they're connected by by a reference (phandle) across the device
tree. this lets network drivers register the ifnet struct with the
associated node and phandle so the switch can find it and configure
it for use with the switch.
ok kettenis@
dlg [Mon, 3 Apr 2023 01:21:31 +0000 (01:21 +0000)]
do actual init of the phy itself when needed.
turn the phy clock on and take the port out of suspend when something
(eg, xhci or ehci) wants to use the port.
before this the code just enabled power on the phy port regulators.
ok kettenis@
cheloha [Mon, 3 Apr 2023 00:20:24 +0000 (00:20 +0000)]
clockintr: protect struct clockintr_queue with a mutex
Add a mutex (cq_mtx) to stuct clockintr_queue so that arbitrary CPUs
can manipulate clock interrupts established on arbitrary CPU queues.
Refactor the bulk of clockintr_schedule() into clockintr_schedule_locked()
so we can reuse it from within the mutex.
Tested by mlarkin@. Neat bug found by mlarkin@. With tweaks from
kettenis@.
ok kettenis@
dlg [Sun, 2 Apr 2023 23:57:57 +0000 (23:57 +0000)]
fill out the list of quectel devices that should be supported.
the list comes from the Quectel LTE&5G Linux USB Driver User Guide V2.0
and claims that all these devices function the same as each other.
ok miod@
dlg [Sun, 2 Apr 2023 23:56:19 +0000 (23:56 +0000)]
regen
dlg [Sun, 2 Apr 2023 23:55:12 +0000 (23:55 +0000)]
add more quectel usb device ids
this list comes from the Quectel LTE&5G Linux USB Driver User Guide v2.0
ok miod@
tb [Sun, 2 Apr 2023 23:33:42 +0000 (23:33 +0000)]
Fix table by using strings of proper lengths instead of bogus
scaling widths.
ok schwarze
miod [Sun, 2 Apr 2023 18:44:13 +0000 (18:44 +0000)]
Use #define instead of `char * const' for the repeated GUID strings. Ugly,
but restores compilability with older compilers such as gcc.
No intentional functional change.
miod [Sun, 2 Apr 2023 17:03:14 +0000 (17:03 +0000)]
Add support for TEMPerGold 3.4 to ugold(4).
ok landry@
miod [Sun, 2 Apr 2023 17:02:08 +0000 (17:02 +0000)]
Regen
miod [Sun, 2 Apr 2023 17:01:48 +0000 (17:01 +0000)]
New TEMPerGold device.
sthen [Sun, 2 Apr 2023 16:43:42 +0000 (16:43 +0000)]
add Ryuichi Sakamoto. rest in peace.
tb [Sun, 2 Apr 2023 15:36:53 +0000 (15:36 +0000)]
Revert r1.9 and reinstate r1.6
The argument change to x5519_ge_scalarmult_base() was made to match the
prototype in the header. More recent compilers warn about such ptr vs
array mismatches.
jsg [Sun, 2 Apr 2023 11:32:48 +0000 (11:32 +0000)]
add Windows 11 _OSI strings
ok mlarkin@
kettenis [Sun, 2 Apr 2023 11:28:23 +0000 (11:28 +0000)]
Add support for the RTL8211F-VD PHY.
ok kevlo@
anton [Sun, 2 Apr 2023 08:53:01 +0000 (08:53 +0000)]
zap excessive semicolons; ok mglocker@
kevlo [Sun, 2 Apr 2023 03:41:38 +0000 (03:41 +0000)]
sync
kevlo [Sun, 2 Apr 2023 03:40:54 +0000 (03:40 +0000)]
nable ngbe(4) on install media. Passes 'make release' build.
Pointed out by miod@, patrick@
dv [Sun, 2 Apr 2023 02:04:10 +0000 (02:04 +0000)]
vmd(8): migrate vmd_vm.vm_ttyname to char array.
Other structs use a fixed length array already. This allows a vmd_vm
object to be transmitted over an ipc channel, too.
Additionally, solves a segfault caused by a strlcpy(3) in an error
path.
ok mlarkin@
dlg [Sun, 2 Apr 2023 01:40:52 +0000 (01:40 +0000)]
manpage for rkusbphy(4)
dlg [Sun, 2 Apr 2023 01:21:39 +0000 (01:21 +0000)]
add rkusbphy(4), a driver for the usb2phy on rockchip SoCs.
the rkusbphy device has children nodes in the device tree which are
the actual phys. this driver mostly exists to wire those children
up as PHYs and turn the associated regulators on when a host
controller enables the PHYs. in the future it should enable clocks
and take ports out of suspend too.
i'm not enabling this yet because it's useless without some tweaks
in the usb host controller drivers.
ok kettenis@
kn [Sun, 2 Apr 2023 00:58:07 +0000 (00:58 +0000)]
Rename get_softraid_{disks -> chunk}() and CRYPTO{DISK -> CHUNK}
"disk" can mean both "chunk" and "volume" and a future diff for better
softraid volumes handling will benefit from this distinction.
No functional change.
cheloha [Sun, 2 Apr 2023 00:02:26 +0000 (00:02 +0000)]
tc_init.9: miscellaneous cleanup and rewrites
- In DESCRIPTION, try to more fully describe what kern_tc.c does.
Clean up the wording.
- Mention *all* the requirements for timekeeping hardware. Describe
the rollover margin in plainer language.
- Revise field descriptions for struct timecounter. Don't mention
fields the driver doesn't need to initialize. Document the tc_user
field.
- Add a CONTEXT section.
- In SEE ALSO, switch to an https URI on the main freebsd.org website.
- In HISTORY, note that the timecounting code first reached end users
in FreeBSD 3.0. This commit is probably the first one:
"Replace TOD clock code with more systematic approach."
https://cgit.freebsd.org/src/commit/sys/sys/timetc.h?id=
7ec73f64179417aeda085c1c338385559fb49c23
- Add an AUTHORS section.
With input from Poul-Henning Kamp.
Link: https://marc.info/?l=openbsd-tech&m=168004968214914&w=2
ok jmc@
kn [Sat, 1 Apr 2023 23:24:46 +0000 (23:24 +0000)]
Limit IFS scope to effect parsing code only
Set to split `hw.disknames' strings is neat, but functionn-wide means the
bsort() invocation honours it, i.e. it'll output newlines not spaces.
Break the one-liner into the same multi-line idom occuring elsewhere and
contain IFS in the subshell that needs it.
This was never visible due how the output of was consumed by the shell.
The only visual, but otherwise effectless bug due to this appeared with the
new disk encryption question double-quoting get_dkdevs() output, i.e.
multiple disks printed across multiple lines; this yields one, as inteded.
OK afresh1
otto [Sat, 1 Apr 2023 18:47:51 +0000 (18:47 +0000)]
Check all chunks in the delayed free list for write-after-free.
Should catch more of them and closer (in time) to the WAF. ok tb@
krw [Sat, 1 Apr 2023 14:18:29 +0000 (14:18 +0000)]
Use char * const for the rest of the repeated GUID strings. More
readable, less prone to typos.
No intentional functional change.
tb [Sat, 1 Apr 2023 12:44:56 +0000 (12:44 +0000)]
Pull static const data out of BN_value_one()
Also use C99 initializers for readability.
discussed with jsing
tb [Sat, 1 Apr 2023 11:10:55 +0000 (11:10 +0000)]
Indent labels
tb [Sat, 1 Apr 2023 11:08:43 +0000 (11:08 +0000)]
Group the non-constant time gcd functions together
The only consumer of euclid() is BN_gcd(), which, in turn is only
used by BN_gcd_nonct(). Group them together rather than having
parts of the constant time implementation separate them.
This moves two functions to a different place in the file.
kettenis [Sat, 1 Apr 2023 08:48:04 +0000 (08:48 +0000)]
rkiovd(4)
kettenis [Sat, 1 Apr 2023 08:39:54 +0000 (08:39 +0000)]
Enable rkiovd(4)
kettenis [Sat, 1 Apr 2023 08:39:05 +0000 (08:39 +0000)]
Add rkiovd(4), a driver for the IO voltage domains on Rockchip SoCs. This
driver makes sure the SoC IO voltage domains stay in sync with the voltage
provided by the regulator associated with the domain.
ok dlg@
kettenis [Sat, 1 Apr 2023 08:37:23 +0000 (08:37 +0000)]
Implement regulator notifiers which get called when the voltage/current
for a regulator is changed or when the regulator gets initialized when it
attaches for the first time. The latter makes it possible to register
a notifier for a regulator that hasn't attached yet.
ok dlg@
jsg [Sat, 1 Apr 2023 06:39:03 +0000 (06:39 +0000)]
avoid use of uninitialised memory
ok mlarkin@
tb [Sat, 1 Apr 2023 05:27:44 +0000 (05:27 +0000)]
horrible whitespace, mostly on non-code lines. no object change
dlg [Sat, 1 Apr 2023 00:04:40 +0000 (00:04 +0000)]
follow quectel guidance on which usb interfaces umsm should match.
the Quectel LTE&5G Linux USB Driver User Guide V2.0 says umsm should
only attach to usb interfaces 0 to 3 using the interface class
UICLASS_VENDOR. their doco uses magic numbers, but this is what
they mean.
interfaces 4 and above provide network (not serial) via qmi, ecm,
or mbim. preventing umsm from attaching to the high interfaces
allows the appropriate network driver to use it instead. eg, umb
is now able to attach to the network interface because it presents
a standard mbim class.
discussed with and tested by kevlo@
ok patric@ sthen@ kevlo@
dlg [Fri, 31 Mar 2023 23:55:45 +0000 (23:55 +0000)]
shuffle the code in umsm_match a bit.
if umsm_lookup doesnt return anything, return early and leave the
rest of umsm_match to handling specific devices.
no functional change.
dlg [Fri, 31 Mar 2023 23:53:49 +0000 (23:53 +0000)]
dont match quectel ec25 by vendor+product id
quectel seem to provide a sane and consistent set of functionality
built on top of the qualcomm qmi stuff. their linux drivers guide
says quectel modems provide a set of umsm usb interfaces and a
network interface that can be in qmi, ecm, or mbim mode.
if the modem is in mbim mode, it will present the mbim classes which
umb should be able to attach to without this explicit vendor+product
match (assuming umsm doesn't claim the interface first).
based on info in the Quectel LTE&5G Linux USB Driver User Guide V2.0
discussed with and tested by kevlo@
ok patrick@ sthen@ kevlo@
kn [Fri, 31 Mar 2023 20:31:35 +0000 (20:31 +0000)]
regen after "BE-M1000" addition
kn [Fri, 31 Mar 2023 20:28:48 +0000 (20:28 +0000)]
Add "Baikal Electronics" and their "BE-M1000" SoC
OK kettenis
tb [Fri, 31 Mar 2023 20:16:55 +0000 (20:16 +0000)]
Add missing NULL check after group_get()
Otherwise dh_getlen() will dereference ie->group and crash.
looks correct to hshoexer
mglocker [Fri, 31 Mar 2023 19:50:45 +0000 (19:50 +0000)]
Enable ufshci(4).
ok kettenis@
bluhm [Fri, 31 Mar 2023 19:43:32 +0000 (19:43 +0000)]
Fix white space.
tb [Fri, 31 Mar 2023 19:40:08 +0000 (19:40 +0000)]
Add regress coverage for the new behavior of BN_copy() with respect to
flags.
tb [Fri, 31 Mar 2023 19:39:15 +0000 (19:39 +0000)]
Copy BN_FLG flags in BN_copy()
BN_copy() forgot to copy the flags from the source to the target. Fix
this by copying the flags. In fact, only copy BN_FLG_CONSTTIME since
propagating BN_FLG_MALLOCED and BN_FLG_STATIC_DATA is wrong. Ignore the
BN_FLG_FREE flag "used for debugging" which of course means "unused"
like a lot of other debug code that somehow ended up in public headers.
Also: make BN_FLG_CONSTTIME sticky on the target, i.e., don't clear the
flag when copying from a non-constant time BIGNUM to a constant time one
for the following reason: if a is constant time, BN_sqr(a, a, ctx) would
use a BIGNUM without the flag internally, then copy the result to a in
which process a would lose its constant time flag.
Fixing this would be a lot of pointless work since someone had the good
sense of not relying on a fragile flag for something this important.
Rather, libcrypto always uses the constant time paths instead of the
faster, cryptographically inadequate paths.
Before this was changed, this was a pretty bad bug. The RSA code uses the
horrible BN_with_flags() function to create local versions of the private
moduli and set BN_FLG_CONSTTIME on them. If the RSA_FLAG_CACHE_PRIVATE for
caching moduli is set on the RSA, which it is by default, it attempts to
set these constant time versions on the RSA's internal Montgomery contexts.
Since it is called BN_MONT_CTX_set(), the setter doesn't set a BIGNUM on
the BN_MONT_CTX, rather it copies it over, losing the BN_FLG_CONSTTIME flag
in the process and make all the horrible leaky RSA code leak some more.
Good job.
This is all harmless and is mostly a cosmetic fix. BN_FLG_CONSTTIME should
be removed internally. It will be kept since various language bindings of
course picked it up and expose it.
ok beck jsing
krw [Fri, 31 Mar 2023 19:12:32 +0000 (19:12 +0000)]
Refactor partition type menu code, disentangling mbr and gpt
partition types from menu building and display.
Some GPT partition names change to match their MBR bretheren.
No intentional functional change.