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

232717 Commits

Author SHA1 Message Date
claudio
623585da7a Increase RTR PDU limit to 48k and limit number of SPAS to 10'000.
PDU larger then 48k will result in a session reset while ASPA records
with more than 10'000 entries will be implicitly withdrawn.

Also truncate RTR error PDUs to only include 256 bytes of the faulty PDU.
It makes no sense to include more to identify the issue.
OK tb@
2024-04-09 12:09:19 +00:00
claudio
bb1a6d1a5c Check that the ASPA tas array fits in an IMSG before sending the ASPA
record over to RTR or the RDE.

The long term goal is to increase the IMSG size considerably but that
requires some additional API changes to the imsg API.
OK tb@
2024-04-09 12:05:07 +00:00
jsg
c857e3a29a reduce diff to linux 2024-04-09 11:20:10 +00:00
kettenis
5ee01a3f85 Remove the "cubie" miniroot. There are far more popular armv7 boards
with Allwinner SoCs and the presence of this particular miniroot is making
it hard to update U-Boot.

ok jsg@
2024-04-09 11:13:51 +00:00
bluhm
f46106f1f3 Plug route leak in IP output.
If no struct route is passed to ip_output() or ip6_output(), it
uses its own iproute on the stack.  In that case any route entry
in the local route cache has to be freed.  After pf decides to
reroute, struct route is reset to NULL.  Then the route reference
counter has to be released.  Call rtfree() without needless NULL
check.

OK mvs@
2024-04-09 11:05:05 +00:00
claudio
0149d23fab Add a capability enforcement integration test.
This should ensure that no / yes and enforce work the way we want.
2024-04-09 09:35:57 +00:00
claudio
08ee758494 Add capability announce enforcement test and fixup some other result files
since the role capability is now shown in more cases.
2024-04-09 09:33:46 +00:00
claudio
4b1bc0cbc5 Allow operators to enforce the presence of certain capabilities on sessions.
For simple capabilities this just adds enforce to the yes/no option of the
announce statement. For multi-protocol capabilities and add-path there is
an extra keyword. On top of this for add-path the enforcement requires the
neighbor to send a matching capability, e.g
'announce add-path recv enforce' requires the other side to send any
'announce add-path send XYZ' capability.

This is mainly to enforce as-4byte and extra multi-protocol capabilities.

OK denis@ tb@
2024-04-09 09:03:18 +00:00
beck
84f00aa441 Clean up Symbols.namespace
These did not get removed from here when they got removed
from Symbols.list after a major bump.

ok tb@
2024-04-09 01:39:27 +00:00
jsg
b226cd0be9 regen 2024-04-09 01:23:58 +00:00
jsg
6f5b1a43c0 more Intel DG2 graphics ids
from ark.intel.com and github.com/intel/compute-runtime
2024-04-09 01:22:19 +00:00
jsg
f68c75d037 drm/i915: ATS-M device ID update
From Haridhar Kalvala
5032c607e886e0c40749a05d37b835c1757d38ff in mainline linux
2024-04-09 01:14:35 +00:00
jsg
a2543b2fbe drm/i915: Add new PCI IDs to DG2 platform in driver
From Ravi Kumar Vodapalli
in drm-intel-next
2024-04-09 00:56:48 +00:00
jsg
a6c219469c drm/i915: Add new DG2 PCI IDs
From Shekhar Chauhan
d0c908d2978e0ef3c1ac1357c1c58224a153f8d4 in mainline linux
2024-04-09 00:52:10 +00:00
beck
cc34b9f085 Remove notBefore and notAfter cacheing.
This cache was added because our time conversion used timegm()
and gmtime() which aren't very cheap. These calls were noticably
expensive when profiling things like rpki-client which do many
X.509 validations.

Now that we convert times using julien seconds from the unix
epoch, BoringSSL style, instead of a julien days from a
Byzantine date, we no longer use timegm() and gmtime().

Since the julien seconds calculaitons are cheap for conversion,
we don't need to bother caching this, it doesn't have a noticable
performance impact.

While we are at this correct a bug where
x509_verify_asn1_time_to_time_t was not NULL safe.

Tested for performance regressions by tb@ and job@

ok tb@ job@
2024-04-08 23:46:21 +00:00
tb
13bba76f48 Remove spaces before tabs 2024-04-08 20:47:32 +00:00
miod
17b6725346 Stop redeclaring ENTRY, the <machine/asm.h> flavour is as good as we need it.
While there, replace inlined NENTRY by actual use of that macro.

ok kettenis@
2024-04-08 20:09:18 +00:00
miod
dab7ffbab4 Fix misplaced END() macro.
ok kettenis@
2024-04-08 20:08:19 +00:00
miod
e786f1bc9e Remove unused tf_fault and tf_kstack members from struct trapframe. These
fields were (seldom) written to but never used for anything.

ok kettenis@
2024-04-08 20:07:53 +00:00
miod
74cac49094 Remove demap code for MMU miss faults.
This code was #if 0, except for instruction misses where it had been enabled
probably by mistake... and was demapping in the data mmu anyway...
(#include <facepalm.h>)

ok kettenis@
2024-04-08 20:07:07 +00:00
miod
e1f14dc30c There is too much #ifdef DEBUG stuff cluttering locore, really. While some of
it had sense in the early days of the sparc64 port, this code has bitrotten
and is getting in the way. Time for a visit to the Attic.

This removes:
- interrupt handling debug code (forcing hz = 1, probably broken since years).
- unused or too invasive DEBUG code which noone will ever use in this state.
- #if 0 code blocks which have been this way since locore.s revision 1.1 and
  will never get enabled.

ok kettenis@
2024-04-08 20:05:51 +00:00
miod
b081b1ba77 Introduce more assembler macros to deduplicate code and improve readability:
- one macro for the inline pseg_get logic used in various MMU trap handlers.
- one macro for the TSB locking logic in various PTE update routines.
- one macro for the sun4v rwindow content saving.

ok kettenis@
2024-04-08 20:02:18 +00:00
miod
e6da68a211 Remove dead code and data, fix typos, kill wrong comments.
ok kettenis@
2024-04-08 20:00:27 +00:00
miod
def26250b1 Fix cut'n'paste error in data miss handler causing wrong label to be used in
some failure conditions.
2024-04-08 19:59:57 +00:00
miod
82f77a0dcc Fix sun4v patching of sp_tlb_flush_ctx() to pass flags in the right register.
ok kettenis@
2024-04-08 19:59:28 +00:00
beck
72c7c57a68 Make ASN1_TIME_set_string_X509 and ASN1_TIME_set_string match the man page
This makes it where people can't put dumb values in certs without
trying harder, and changes the regress to test this.

GENERALIZED times outside of the RFC5280 spec are required for OCSP
but these should be constructed with the GENERALIZED time string
setters.

ok tb@
2024-04-08 19:57:40 +00:00
tb
7e284d508f Fix capping of VAPs
The previous approach introduced a cap, but it might not always be hit as
intended (I missed this on review). Fix this to check the cap after merging
an ASPA into an already existing VAP. Also free the list of providers since
nothing should be looking at it anymore.

Count VAPs that hit the limit with a new overflowed counter. There are
still a few aspects of the accounting that probably aren't entirely right.
This will be fixed at another point. It's just statistics after all.

with/ok claudio, ok job
2024-04-08 14:02:13 +00:00
tobhe
28fef5effa Call daemon() only in parent and before proc_exec() to avoid orphaning child
processes. Synced from relayd.

ok florian@
2024-04-08 13:18:54 +00:00
tobhe
2a1b622220 Move daemon() after proc_setup() to sync with other proc.c daemons. 2024-04-08 12:50:05 +00:00
tobhe
dac1ed2549 Call daemon() only in parent and before proc_exec() to avoid orphaning child
processes. Synced from relayd.

ok mlarkin@ dv@
2024-04-08 12:48:26 +00:00
tobhe
4c131d564a Call daemon() only in parent and before proc_exec() to avoid orphaning child
processes. Synced from relayd.

ok kn@
2024-04-08 12:45:18 +00:00
jsg
146262ea79 more ansi function decls
ok deraadt@
2024-04-08 02:51:14 +00:00
jsg
e16d075e3f drm: panel-orientation-quirks: Add quirk for GPD Win Mini
From Samuel Dionne-Riel
2f862fdc0fd802e728b6ca96bc78ec3f01bf161e in mainline linux
2024-04-08 01:59:36 +00:00
jsg
9f9b03a363 drm: panel-orientation-quirks: Add quirk for Lenovo Legion Go
From Brenton Simpson
430143b0d3611f4a9c8434319e5e504244749e79 in mainline linux
2024-04-08 01:56:20 +00:00
kettenis
16c51e1a08 The RISC-V architecture has cache-coherent DMA... until it doesn't. This
is indicated by a "dma-noncoherent" property on the bus or device nodes
in the device tree.  Set the BUS_DMA_COHERENT flag on the DMA tag for
mainbus(4) and modify the flags based on the presence of "dma-coherent"
and "dma-noncoherent" properties where appropriate.

ok patrick@
2024-04-07 21:08:59 +00:00
tb
c112ccd4e9 Rework CMS_add_simple_smimecap()
This is an API to add an OID attribute to the set of SMIMECapabilities.
While attributes are complicated in general, this only supports simple
capabilities encoded as an OID with an optional integer parameter (e.g.,
the key size of a cipher).

Make this API transactional, i.e., don't leave a new empty set behind on
failure or leak the key size if setting the parameter on the X509_ALGOR
fails.

Also convert to single exit and add a doc comment with a reference.

ok beck
2024-04-07 06:34:42 +00:00
jsg
424974cc1f match another two Alder Lake-N DesignWare I2C ids
Not in the Intel datasheet but are matched by their Windows driver.
ok mglocker@ who tested on Surface Go 4.
2024-04-07 01:04:58 +00:00
jsg
8bb264d90d regen 2024-04-07 00:59:23 +00:00
jsg
18db071760 another two Alder Lake-N DesignWare I2C ids
Not in the Intel datasheet but are matched by their Windows driver.
Seen on Surface Go 4.

ok mglocker@
2024-04-07 00:58:57 +00:00
kettenis
03901979a9 Now that we support RISC-V CPUs that have MMUs with memory cachability
attributes, the "direct map" becomes problematic as it results in
mappings for the same physical memory pages with different cachability
addresses.  The RISC-V specification of the "Svpbmt" extension doesn't
outright state that this is "verboten" like on some other
architectures that we support.  But it does say that it may result in
access with the wrong attributes.  So restrict the use of the direct
map to just mapping the 64MB block that the bootloader loaded us into.
To make this possible map the device tree later like we do on arm64.
This allows us to get rid of some assembly code in locore.S as a bonus!

ok miod@, jca@
2024-04-06 18:33:54 +00:00
bluhm
85fbf21ae5 IP multicast sysctl mrtmfc must not write outside of allocation.
Reading sysctl mrt_sysctl_mfc() allocates memory to be copied back
to user.  Chunks of struct mfcinfo are copied from routing table
to linear heap memory.  If the allocated memory was not a multiple
the struct size, a struct mfcinfo could be copied to a partially
unallocated destination.  Check that the end of the struct is within
the allocation.

From Alfredo Ortega;  OK claudio@
2024-04-06 14:23:27 +00:00
mpi
c2c0b0cf71 Remove (unused) in-kernel event filtering, it's currently dead code.
All events are currently exported to userland in order to support complex
filters.  If this becomes a bottleneck it should be possible to translate
(some) user-land filters to in-kernel fitlers.

Prodded by a diff from Christian Ludwig to also trace the tracing program.

ok claudio@
2024-04-06 11:18:02 +00:00
mpi
3087914d56 Prevent accounting bug when an anon w/ swap slot is passed to uvm_anon_release()
uvm_anon_release() is always called for anon that have an associated page so
decrementing `uvmexp.swpgonly' is incorrect.  This happened because the page
was cleared before calling uvm_anfree().

Reported by many including mvs@, miod@ and robert@

ok kettenis@, miod@
2024-04-06 10:59:52 +00:00
jsg
d64d6709ea regen 2024-04-06 08:40:27 +00:00
jsg
12acdcb91f more Alder Lake-N ids
from:
Intel Processor and Intel Core i3 N-Series
Datasheet, Volume 1 of 2, Doc. No.: 759603, Rev.: 001
2024-04-06 08:39:51 +00:00
deraadt
19fef81560 ANSI functions; ok tb 2024-04-05 18:01:56 +00:00
job
cd55b6bd00 Don't emit Validated ASPAs for Customer ASIDs with more than MAX_ASPA_PROVIDERS
The number of providers in a single ASPA object already was limited to
MAX_ASPA_PROVIDERS, now also impose a limit on the total number of providers
across multiple ASPA objects. If the MAX_ASPA_PROVIDERS limit is hit, omit
the Customer ASID's entry from OpenBGPD and JSON output.

OK tb@
2024-04-05 16:05:15 +00:00
jsg
3f7c134ffe use inline functions instead of do while(0) for dev_*
avoids unused variable warning on gcc archs with ttm_tt.c rev 1.21
reported by deraadt@
2024-04-05 14:31:57 +00:00
deraadt
ad713c5691 delete msyscall stub 2024-04-05 14:16:05 +00:00
deraadt
b25a760731 sync 2024-04-05 14:15:37 +00:00