1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00
Commit Graph

236930 Commits

Author SHA1 Message Date
job
bf5a499ba8 If AS0 TALs are provided, by default omit VRPs derived from such AS0 TALs
AS0 TALs represent unmitigated operational risks: what if the RIR by
accident marks some IP space as 'unassigned'?

APNIC notes in their limitation of liability statement:

    """
    Depending on router configuration, errors in the AS0 ROA could
    cause unintended interruption to routing with other networks.
    For this reason, it is strongly recommended that the AS0 ROA is
    used for advisory and/ or alerting purposes only, and not for
    automatic filtering of BGP routes.
    """
    https://www.apnic.net/community/security/resource-certification/apnic-limitations-of-liability-for-rpki-2/

Guard usage of AS0 TALs behind new '-0' option

OK deraadt@ tb@
2024-12-02 14:55:02 +00:00
djm
eac0e5c0ee unbreak 2024-12-02 14:06:42 +00:00
claudio
3417aeaedd Remove global queue_buf which is no longer used.
OK compiler
2024-12-02 13:46:11 +00:00
djm
08d45e79c0 prefer AES-GCM to AES-CTR; ok deraadt markus 2024-12-02 13:37:18 +00:00
mglocker
7f98e85f65 Fix typo in comment 2024-12-01 10:38:47 +00:00
kn
347b73737b -o[arg] must not have spaces between option and argument; OK jmc
getopt(3) says so and, e.g. 'mrouted -d 1' must be 'mrouted -d1' to work.
dhcpd(8) and sed(1) got this right, our multicast programs did not.
2024-12-01 09:58:15 +00:00
landry
8e650cf52b upd(4): add PercentLoad sensor
Reports the % of the available UPS power drawed by output outlets.

tested by sthen@, matthieu@ and Walter Alejandro Iglesias
ok sthen@ as part of a larger diff
2024-12-01 09:05:05 +00:00
pascal
ac4b1d5777 Properly document TCP_SACK_ENABLE socket option.
This used to be documented in options(4), but was deleted there in 2017.
Reinstate the same text here.

ok jmc@
2024-12-01 08:11:14 +00:00
tb
a976df8d81 Meant to split the sentence in two 2024-11-30 21:21:40 +00:00
tb
8e3d34b8ce Be a bit more precise on the error conditions of CMS_get1_{certs,crls}() 2024-11-30 21:20:44 +00:00
tb
5c792f2ee6 Explain how to free the stack returned by CMS_get1_{certs,crls}()
with job
2024-11-30 21:15:19 +00:00
tb
9da94e6d4a Inline trivial EC point methods
Like most of the "group" methods these are shared between Montgomery
curves and simple curves. There's no point in five methods hanging off
the EC_METHODS struct whne they can just as well be inlined in the
public API. It makes all files involved shorter...

ok jsing
2024-11-30 21:09:59 +00:00
kirill
06a3f1899c uvideo.4: add Jabra PanaCast 20 as known to work
OK mglocker@
2024-11-30 20:15:03 +00:00
kirill
d223718e27 sys/uvideo: add quirk for Jabra PanaCast 20
Jabra PanaCast 20 needs uvideo_vs_negotiation between usbd_set_interface
and usbd_open_pipe, otherwise it doesn't work with error:

    ioctl VIDIOC_DQBUF: Invalid argument

OK mglocker@
2024-11-30 17:47:23 +00:00
kirill
9497c2578f Regen 2024-11-30 17:43:46 +00:00
kirill
94ba045ddc sys/dev/usb/usbdevs: add Jabra PanaCast 20, to be used in quirks
OK mglocker@
2024-11-30 17:41:57 +00:00
tb
970efd761c Get BNs Z coordinates from the BN_CTX
While there likely won't be enough BNs already available in the ctx, and
thus it won't greatly reduce the amount of allocated BNs, it simplifies
the exit path quite a bit.

review feedback from jsing
2024-11-30 16:34:34 +00:00
tb
adc6938b1a Improve ec_points_make_affine()
It is unclear how the original code was supposed to work. It clearly
missed a few corner cases (like handling points at infinity correctly)
and the badly mangled comment that was supposed to display a binary
search tree didn't help at all.

Instead do something much more straightforward: multiply all the non-zero
Z coordinates of the points not at infinity together, keeping track of the
intermediate products. Then do a single expensive modular inversion before
working backwards to compute all the inverses. Then the transformation from
Jacobian coordinates to affine coordiantes (x, y, z) -> (x/z^2, y/z^3, 1)
becomes cheap. A little bit of care has to be taken for Montgomery curves
but that's very simple compared to the mess that was there before.

ok jsing

This is a cleaned up version of:

commit 0fe73d6c3641cb175871463bdddbbea3ee0b62ae
Author: Bodo Moeller <bodo@openssl.org>
Date:   Fri Aug 1 17:18:14 2014 +0200

    Simplify and fix ec_GFp_simple_points_make_affine
    (which didn't always handle value 0 correctly).

    Reviewed-by: emilia@openssl.org
2024-11-30 16:18:01 +00:00
tb
ee8ccd1f93 openssl speed: stop trying to use small curves
secp160r1 and nistp192 are no longer available in libcrypto. Should have
been committed along with disabling these curves, but was missed.

ok jsing
2024-11-30 10:05:41 +00:00
tb
3e463d5faa Don't leak the abuf on error in PKCS7_dataFinal()
ok beck miod
2024-11-30 10:01:31 +00:00
jmc
93da23dae1 use a more readable explanation of directory creation;
from evan silberman, tweaked by millert

ok sthen (pre-tweak)
2024-11-30 06:59:12 +00:00
jmc
6f45564e3f undo unneccessary \*([GL]t sequences; balance that by adding Sq;
from evan silberman
2024-11-29 23:46:40 +00:00
anton
009b798eb1 Add support for read/write of xmm/ymm registers to lldb.
ok kettenis@, robert@
2024-11-29 18:54:39 +00:00
tb
1507347831 Remove X9.42 DH rudiments
In the unlikely event that we should ever decide to implement this after
a quarter century of not needing it, we can readily put this back. Until
then this is dead weight.

prompted by a question by djm
ok jsing
2024-11-29 15:59:57 +00:00
schwarze
47aad51186 Provide an example of signing with HMAC-SHA256 or Ed25519
because that makes it easier to see the big picture
of how EVP_PKEY_new_raw_private_key(3) is supposed to be used.
Feedback and OK tb@.
2024-11-29 12:05:06 +00:00
schwarze
a4f8957185 Mark six EVP_PKEY control constants as intentionally undocumented
that are only intended for internal use, do very little (only validity
checking), are unused in the wild, and marked obsolete in OpenSSL 3.
2024-11-29 10:19:37 +00:00
schwarze
11e77a131c Mark nine unused EVP constants as intentionally undocumented.
Fix related indentation while here.
2024-11-29 10:09:10 +00:00
tb
d2a56ad68f Remove weird pad member that was never set to zero after malloc() so
the weird thing it was supposed to be doing couldn't possibly work.

ok jsing
2024-11-29 07:42:35 +00:00
mpi
5797ad0691 Also call pmap_extract() before entering a page ahead for lower layer faults.
As for the upper layer, call pmap_update() only if, at least, a page has been
entered.

ok tb@, kettenis@
2024-11-29 06:44:57 +00:00
mpi
a52f395c21 When paging ahead, delay calling pmap_extract() after checking for a valid page.
While here call pmap_update() only if, at least, a page has been entered.

ok tb@, kettenis@
2024-11-29 06:40:57 +00:00
tb
a4ff2ce640 Garbage collect the unused imsg_hdr in imsg_close()
ok claudio
2024-11-29 04:35:13 +00:00
dtucker
f651b06a4c Import regenerated moduli. 2024-11-29 00:13:36 +00:00
gkoehler
d9a6171acb Move cpu_features to hwcap and cpu_features2 to hwcap2
ok jca@
2024-11-28 18:54:36 +00:00
aoyama
db835d3241 Replace magic numbers to macro defined values.
Also make it possible to change the amount of 3-port RAM usage by the
kernel option.
2024-11-28 13:13:03 +00:00
yasuoka
266241f92e Fix radiusd_ipcp module to check whether the type of the ipcp_address
is for pool when selecting a random address from the pools, and tweak
the code for easier understanding.  Also,  check whether the left
value of an address range configuration is smaller than the right
value.
2024-11-28 11:51:45 +00:00
yasuoka
1669612dd9 Fix warnings from gcc. found by deraadt 2024-11-28 10:42:16 +00:00
nicm
a65ab48513 Add extended keys flag for foot terminal. 2024-11-28 08:49:14 +00:00
dlg
41517b19ad avoid lock contention in __thrsleep and __thrwakeup syscalls
turns out the __thrsleep and __thrwakeup syscalls largely coordinate
using a single lock per process. if you have heavily threaded code
building locks in userland out of thrsleep, this kernel lock gets
hammered. this is true even if userland thinks it's operating on
separate locks, it all ends up serialised in the kernel. this reduces
the throughput of these heavily threaded programs.

the big change is hashing thrsleep waiters into an different
locks/lists based on their "id" to try and avoid all locks in a
process contending on a single lock. the hash is shared by all
processes though.

the change also avoids having a waiter re-take the lock to avoid
contention on the thrwakeup code which is currently holding the lock.

__thrsleep and __thrwakeup seem to be largely unused these days,
except by go. go still uses it as a backend to it's locks, and also
creates a lot of threads which end up contending on the lock. these
changes provide an improvement for go programs.

the contention was pointed out by nick owens
jsing@ and nick owens did a bit of testing
2024-11-28 02:01:57 +00:00
kirill
8fbe85f50d vmd/vioblk: add missed break
There's no value in that log message in that specific condition.

OK dv@ kn@
2024-11-27 22:32:14 +00:00
gkoehler
14cbb2b5d8 In powerpc64 pmap, when replacing a pte, put it in the correct pteg
In pte_insert(), if both the primary page table entry group and the
secondary pteg are full, then we delete an old pte and replace it with
the new pte.  We might have set "idx" wrong and inserted the new pte
into the wrong pteg (with the wrong PTE_HID bit).  This problem almost
never happened; it is rare for both ptegs to be full.

When the loop "for (try = 0; try < 16; try++)" looks for a slot for
the new pte, set "idx" to the new pte's primary pteg.  Put it in the
primary pteg "idx" or secondary pteg "idx ^ pmap_ptab_mask".  When we
delete the old pte, set "idx" to the old pte's primary pteg.

Eric Gosse reported a bug where the kernel crashed on an unexpected
fault.  I suspect that a pte fell into the wrong "idx" and got lost.

ok kettenis@
2024-11-27 20:30:15 +00:00
miod
0cd9f93052 Change getfp() to return an unBIASed stack pointer; this unbreaks
stackdump() which got broken in machdep.c 1.202.

It is much simpler to change getfp() than stackdump() which is its only
caller.
2024-11-27 20:11:32 +00:00
djm
049e6dd2cb fix argument of "Compression" directive in ssh -G config dump,
which used to work but broke in 9.8
2024-11-27 16:07:08 +00:00
stsp
21cb8457bb defer creation of ice(4) ifp until device attachment has succeeded
Otherwise we would crash when something goes wrong in ice_attach_hook().

problem found by bluhm@
2024-11-27 15:23:58 +00:00
tb
a0b977827c zap trailing whitespace from previous 2024-11-27 15:19:26 +00:00
djm
f6e19f5194 new name/link for agent I-D 2024-11-27 13:27:34 +00:00
jan
5e0634cbc7 Revert "vio: Unlock"
This causes some crashes. Revert for now

ok sf@
2024-11-27 13:26:42 +00:00
djm
0d94c36dfc mention that biometrics may be used for FIDO key user verification as
well as PIN. Prompted by Zack Newman, ok jmc@
2024-11-27 13:00:23 +00:00
jsg
4fda2ec572 remove unneeded fpu.h include to unbreak the build on archs without it
already indirectly included by reg.h on amd64
ok sthen@
2024-11-27 12:29:14 +00:00
kirill
e4c405f0a8 sys/uvideo: add missed abort of transfer pipe in uvideo_vs_close
A bulk transfer cannot timeout and must be aborted on close.

OK mpi@
2024-11-27 11:37:23 +00:00
mpi
8a2338590c Neighbor (fault ahead) pages are never mapped with the wired attribute.
Wired faults are always "narrow".  That means the fault handler do not try to
fault neighbor pages ahead.  So do not propagate the `flt->wired' attribute to
the corresponding pmap_enter(9) calls and instead assert that it is false
whenever neighbor pages are entered in a memory space.

ok tb@
2024-11-27 10:58:07 +00:00