openbsd
18 months agodrm/i915/dsi: fix DSS CTL register offsets for TGL+
jsg [Fri, 21 Apr 2023 03:36:03 +0000 (03:36 +0000)]
drm/i915/dsi: fix DSS CTL register offsets for TGL+

From Jani Nikula
8d901a336302324742bd800f8402d3c0e781c8ff in linux-6.1.y/6.1.25
6b8446859c971a5783a2cdc90adf32e64de3bd23 in mainline linux

18 months agodrm/amd/display: Pass the right info to drm_dp_remove_payload
jsg [Fri, 21 Apr 2023 03:33:39 +0000 (03:33 +0000)]
drm/amd/display: Pass the right info to drm_dp_remove_payload

From Wayne Lin
779fd2a575cc30182589e4e1da9905f20a27374a in linux-6.1.y/6.1.25
b8ca445f550a9a079134f836466ddda3bfad6108 in mainline linux

18 months agosync
deraadt [Fri, 21 Apr 2023 03:26:50 +0000 (03:26 +0000)]
sync

18 months agoclockintr_cpu_init: fix clockintr staggering
cheloha [Fri, 21 Apr 2023 03:03:50 +0000 (03:03 +0000)]
clockintr_cpu_init: fix clockintr staggering

Use reset_cq_intrclock as a stand-in for the CQ_INTRCLOCK flag when
deciding whether to stagger clockintr expirations across CPUs.

18 months agoclockintr: add clockqueue_reset_intrclock()
cheloha [Fri, 21 Apr 2023 02:41:06 +0000 (02:41 +0000)]
clockintr: add clockqueue_reset_intrclock()

If a call to clockintr_advance(), clockintr_cancel(), or
clockintr_schedule() changes which clockintr on a given queue is
expiring soonest, we need to rearm the queue's intrclock according
to that most imminent expiration.

Add clockqueue_reset_intrclock() and use it during the aforementioned
scheduling operations if the caller is running on the queue's
controlling CPU.

Scheduling operations are not currently run while CQ_INTRCLOCK is set,
so this patch changes no behavior yet.

clockqueue_reset_intrclock() is only part of the story.  At some point
we will also need to add IPIs to every architecture to handle the case
when the caller is not running on a queue's controlling CPU.

18 months agoadd -pweneighbor.
asou [Fri, 21 Apr 2023 01:15:48 +0000 (01:15 +0000)]
add -pweneighbor.

ok deraadt@

18 months agoDrop error variable and return directly; OK mvs tb
kn [Fri, 21 Apr 2023 00:41:13 +0000 (00:41 +0000)]
Drop error variable and return directly;  OK mvs tb

18 months agoI departed from RZV (open since may 2022)
kn [Fri, 21 Apr 2023 00:37:10 +0000 (00:37 +0000)]
I departed from RZV (open since may 2022)

18 months agoCall sysctl_source() with shared netlock. It performs read-only
mvs [Thu, 20 Apr 2023 21:43:17 +0000 (21:43 +0000)]
Call sysctl_source() with shared netlock. It performs read-only
access to netlock protected data.

ok kn@ bluhm@

18 months agoremove a stray macro, and fix SEE ALSO;
jmc [Thu, 20 Apr 2023 20:33:55 +0000 (20:33 +0000)]
remove a stray macro, and fix SEE ALSO;

18 months agoRevert the previous commit. The raw devices don't exist when this runs
kettenis [Thu, 20 Apr 2023 19:42:52 +0000 (19:42 +0000)]
Revert the previous commit.  The raw devices don't exist when this runs
and the block devices work just fine.

18 months agoadd viogpu, a VirtIO GPU driver
jcs [Thu, 20 Apr 2023 19:28:30 +0000 (19:28 +0000)]
add viogpu, a VirtIO GPU driver

works enough to get a console on qemu with more work to come from
others

feedback from miod
ok patrick

18 months agoFix Dt and Xr
tb [Thu, 20 Apr 2023 18:54:47 +0000 (18:54 +0000)]
Fix Dt and Xr

18 months agoFlip the default of explicitText to UTF8String
tb [Thu, 20 Apr 2023 18:29:08 +0000 (18:29 +0000)]
Flip the default of explicitText to UTF8String

While it may have been reasonable to use VisibleString back when this
code was written, it's an anachronism nowadays. In particular, configuring
BoringSSL reports that they have seen malformed certificates with exactly
the issue caused by this unfortuante default.

Reported by Alex Gaynor in OpenSSL issue 20772

ok jsing

18 months agosync
tb [Thu, 20 Apr 2023 16:21:38 +0000 (16:21 +0000)]
sync

18 months agoLink s2i_ASN1_INTEGER.3 to build
tb [Thu, 20 Apr 2023 16:19:43 +0000 (16:19 +0000)]
Link s2i_ASN1_INTEGER.3 to build

18 months agoAdd documentation for s2i_ASN1_INTEGER and related functions
tb [Thu, 20 Apr 2023 16:15:29 +0000 (16:15 +0000)]
Add documentation for s2i_ASN1_INTEGER and related functions

These functions convert strings to internal objects and vice versa.
This is a best effort, probably with a lot of room for improvement,
which can happen in tree if anyone cares. It's better than nothing.
Nothing in turn would be significantly better than the utter garbage
a related project has managed to land as part of their efforts towards
significant documentation improvements in a recent major relase.

This leaves a dangling reference to the misnamed X509V3_METHOD_get_nid(3)
which I may or may not fill in the future.

I am unsure about the HISTORY section's precision, but that's what I got
from cvs history. All these functions are about a quarter century old
(and it shows), so I don't think it matters very much.

18 months agoRework the way transit provider AID masks are built and sent to the RDE.
claudio [Thu, 20 Apr 2023 15:44:45 +0000 (15:44 +0000)]
Rework the way transit provider AID masks are built and sent to the RDE.
ASPA provider AS sets can include optional limitations to inet/inet6 these
limits are represented in the TAS_AID bit masks (2bits per AS).
Introduce a TAS_AID_SIZE() makro that returns the size in bytes of this
bit mask (rounded to the next uint32_t).
Without this change aspa objects with AID specific elements trigger a
fatal error condition when the config is loaded.
OK tb@ job@

18 months agoConsistent casing
job [Thu, 20 Apr 2023 15:12:19 +0000 (15:12 +0000)]
Consistent casing

18 months agoASPAs solely containing providers limited to one AFI, imply AS 0 for the other AFI
job [Thu, 20 Apr 2023 15:05:44 +0000 (15:05 +0000)]
ASPAs solely containing providers limited to one AFI, imply AS 0 for the other AFI

OK claudio@

18 months agoclockintr: eliminate CL_SCHEDCLOCK flag
cheloha [Thu, 20 Apr 2023 14:51:28 +0000 (14:51 +0000)]
clockintr: eliminate CL_SCHEDCLOCK flag

The CL_SCHEDCLOCK flag is set when schedhz is non-zero.  It's
redundant.  We can just check the value of schedhz directly.

18 months agoImplement bgpctl show flowspec and bgpctl flowspec flush.
claudio [Thu, 20 Apr 2023 14:01:50 +0000 (14:01 +0000)]
Implement bgpctl show flowspec and bgpctl flowspec flush.

This uses the flowspec.c file from bgpd and implements the output
for flowspec only for the text printer for now. That code uses a lot
of code from printconf.c
OK tb@

18 months agoImplement IMSG_CTL_SHOW_FLOWSPEC and IMSG_FLOWSPEC_FLUSH and add bits for
claudio [Thu, 20 Apr 2023 12:53:27 +0000 (12:53 +0000)]
Implement IMSG_CTL_SHOW_FLOWSPEC and IMSG_FLOWSPEC_FLUSH and add bits for
IMSG_FLOWSPEC_ADD and IMSG_FLOWSPEC_REMOVE received from bgpctl via SE.
OK tb@

18 months agoDocument flowspec in bgpd.conf.5
claudio [Thu, 20 Apr 2023 12:44:28 +0000 (12:44 +0000)]
Document flowspec in bgpd.conf.5
Input and OK jmc@ tb@

18 months agoMove ring buffer allocation to before calling uhidev_open(), otherwise
brynet [Thu, 20 Apr 2023 10:49:57 +0000 (10:49 +0000)]
Move ring buffer allocation to before calling uhidev_open(), otherwise
it might be NULL in uhid_intr.

fixes "b_to_q: tty has no clist" panic hit by namn@

tested by thfr@ and namn@

ok anton@

18 months agoExercise d2i_IPAddrBlocks() and X509v3_addr_subset() a little bit
tb [Thu, 20 Apr 2023 07:39:17 +0000 (07:39 +0000)]
Exercise d2i_IPAddrBlocks() and X509v3_addr_subset() a little bit

18 months agoclockintr_cpu_init: mask CQ_INTRCLOCK while advancing schedule
cheloha [Thu, 20 Apr 2023 00:24:11 +0000 (00:24 +0000)]
clockintr_cpu_init: mask CQ_INTRCLOCK while advancing schedule

Allowing the intrclock to fire in the midst of clockintr_cpu_init()
would complicate the function a lot.  However, in a future patch we
will need to enable intrclock operations in clockintr_advance(),
clockintr_cancel(), and clockintr_schedule().

We can avoid this conflict by masking CQ_INTRCLOCK while we're
updating the internal clockintrs in clockintr_cpu_init().  When we no
longer need clockintr_cpu_init(), this workaround will disappear.

18 months agomove kernel lock into multicast ioctl handlers; OK mvs
kn [Wed, 19 Apr 2023 20:03:51 +0000 (20:03 +0000)]
move kernel lock into multicast ioctl handlers;  OK mvs

18 months agoFix missing whitespace in bgpd(8) output
job [Wed, 19 Apr 2023 19:26:26 +0000 (19:26 +0000)]
Fix missing whitespace in bgpd(8) output

18 months agoForce a standard umask before adding/deleting packages. If not done and
sthen [Wed, 19 Apr 2023 18:07:43 +0000 (18:07 +0000)]
Force a standard umask before adding/deleting packages. If not done and
the user has a restrictive mask, various items (new directories, @sample'd
files, /var/db/pkg entries, mandoc databases) end up not readable.

feedback/ok espie@

18 months agoProtect rtable_setsource() and rtable_getsource() with exclusive
bluhm [Wed, 19 Apr 2023 17:42:47 +0000 (17:42 +0000)]
Protect rtable_setsource() and rtable_getsource() with exclusive
and shared netlock respectively.
OK kn@ mvs@

18 months agoFix botched line wrap
tb [Wed, 19 Apr 2023 16:36:34 +0000 (16:36 +0000)]
Fix botched line wrap

18 months agoImplement support for PT_OPENBSD_NOBTCFI in lld(1). This can be set using
kettenis [Wed, 19 Apr 2023 16:04:33 +0000 (16:04 +0000)]
Implement support for PT_OPENBSD_NOBTCFI in lld(1).  This can be set using
the -z nobtcfi option.

ok deraadt@

18 months agoAdd a new PT_OPENBSD_NOBTCFI "segment type" to indicate that the kernel
kettenis [Wed, 19 Apr 2023 15:37:36 +0000 (15:37 +0000)]
Add a new PT_OPENBSD_NOBTCFI "segment type" to indicate that the kernel
should not enforce branch target control flow integrety for a binary.
This works analoguous to PT_OPENBSD_WXNEEDED in that we will set it on
binaries that don't have the necessary landing pads (yet).  The kernel
will enforce branch target CFI by default in the near future!

This is a better match for what we want to achieve than the GNU property
note mechanism that the Linux folks came up with.  We can still use the
GNU property notes for diagnostic purposes so we won't disable their
generation in the toolchain.  But ports will need to pass an explicit
-Wl,-z,nobtcfi option to disable branch target CFI.

Like with PT_OPENBSD_WXNEEDED we convert the presence of PT_OPENBSD_NOBTCFI
into a flag in struct exec_package.  From there MD code can pick it up
and set a struct process flag or take action in setregs().

ok deraadt@

18 months agointerop: work around extreme REGRESS_SKIP_SLOW slowness
tb [Wed, 19 Apr 2023 15:34:23 +0000 (15:34 +0000)]
interop: work around extreme REGRESS_SKIP_SLOW slowness

A few years back beck introduced REGRESS_SKIP_SLOW dances with the idea
that this should speed up the interop tests for us devs because this also
checked interop between opensslX and opensslY, which we don't particularly
care about. This never really worked. On a mac m1 mini the result is this:

REGRESS_SKIP_SLOW unset
    9m56.69s real     3m42.24s user     3m00.70s system
REGRESS_SKIP_SLOW=yes
   11m04.61s real     7m29.61s user     1m40.29s system

The problem is that REGRESS_SKIP_SLOW simply wasn't designed to handle
the huge number of tests we have here. There are many nested .for loops
resulting in several thousand tests. Each test has a name of length ~80.
REGRESS_SKIP_SLOW concatenates them into a several hundred kilobytes
long string in REGRESS_SKIP_TARGETS, iterates over all regress targets and
tests with ".if ${REGRESS_SKIP_TARGETS:M${RT}}" if it should skip them.
This means that during a regress run, make spends a lot of time linearly
scanning a huge string.

I ran into this when I added OpenSSL 3.0 tests to the already existing
1.0.2 and 1.1 tests with the result that with REGRESS_SLOW_TARGTS set
it took the better part of an hour while without it it took about 15 min.

The hack here is simply to avoid using REGRESS_SLOW_TARGTES here and
handle the situation differently.

patch, REGRESS_SKIP_SLOW=yes
    5m42.32s real     2m09.98s user     1m45.21s system

The real solution would be to fix this in bsd.regress.mk, which someone
who understands make well is very welcome to do. For now, I'm happy with
this.

Debugged with jsing a few months ago

18 months agoReshuffle the flowrule yacc rules to be in a more logical and alphabetical
claudio [Wed, 19 Apr 2023 15:27:46 +0000 (15:27 +0000)]
Reshuffle the flowrule yacc rules to be in a more logical and alphabetical
order.

18 months agoclockintr: rename CL_CPU_* flags to CQ_* flags
cheloha [Wed, 19 Apr 2023 14:30:35 +0000 (14:30 +0000)]
clockintr: rename CL_CPU_* flags to CQ_* flags

The CL_CPU_* flags were originally so-named because they were set from
clockintr_cpu_init(), which was itself named before I had named the
clockintr_queue struct.  It makes more for the flag namespace to match
the struct namespace, so CQ_* is a better flag prefix than CL_CPU_*.

While we're at it, move the CQ_* flag definitions up so they
immediately follow the clockintr_queue structure definition in
sys/clockintr.h.

18 months agoremove duplicate includes
jsg [Wed, 19 Apr 2023 13:33:37 +0000 (13:33 +0000)]
remove duplicate includes

18 months agoAdd workaround for introduction of flowrib and re_rib() functional change.
claudio [Wed, 19 Apr 2023 13:25:07 +0000 (13:25 +0000)]
Add workaround for introduction of flowrib and re_rib() functional change.

18 months agoImplement a way to announce flowspec rules without hitting Adj-RIB-In
claudio [Wed, 19 Apr 2023 13:23:33 +0000 (13:23 +0000)]
Implement a way to announce flowspec rules without hitting Adj-RIB-In
and Loc-RIB. Flowspec objects are collected in a single flowrib RIB
and then directly distributed into the various Adj-RIB-Outs.
For this to work add a bypass in the filter logic (flowspec AFI/SAFI
are currently accepted without any rule). The filter language lacks
a way to allow prefixes based on AFI/SAFI which is the minimum needed.
OK tb@

18 months agoremove duplicate includes
jsg [Wed, 19 Apr 2023 12:58:15 +0000 (12:58 +0000)]
remove duplicate includes

18 months agoremove duplicate include
jsg [Wed, 19 Apr 2023 12:34:23 +0000 (12:34 +0000)]
remove duplicate include
feedback tb@

18 months agoremove duplicate includes
jsg [Wed, 19 Apr 2023 12:30:09 +0000 (12:30 +0000)]
remove duplicate includes
ok tb@

18 months agoRemove obsolete/unused disktab entries for install media
krw [Wed, 19 Apr 2023 11:20:03 +0000 (11:20 +0000)]
Remove obsolete/unused disktab entries for install media
that are no longer built.

ok miod@

18 months agoRename Hex array to hex_digits.
jsing [Wed, 19 Apr 2023 11:14:04 +0000 (11:14 +0000)]
Rename Hex array to hex_digits.

ok tb@

18 months agoMove the BN_bn2bin()/BN_bin2bn() family to bn_convert.c
jsing [Wed, 19 Apr 2023 11:12:43 +0000 (11:12 +0000)]
Move the BN_bn2bin()/BN_bin2bn() family to bn_convert.c

18 months agoReorder functions.
jsing [Wed, 19 Apr 2023 11:05:11 +0000 (11:05 +0000)]
Reorder functions.

No functional change.

18 months agoMove BN_options() from bn_convert.c to bn_lib.c
jsing [Wed, 19 Apr 2023 10:54:49 +0000 (10:54 +0000)]
Move BN_options() from bn_convert.c to bn_lib.c

18 months agounifdef BN_RECURSION
jsing [Wed, 19 Apr 2023 10:51:22 +0000 (10:51 +0000)]
unifdef BN_RECURSION

This removes a bunch of incomplete and scary code, which potentially leaks
secrets and is not constant time. A performance gain is achieved on arm64
for sizes that we care about, while a minimal decrease in performance is
noted for larger sizes on some other platforms.

While we will potentially reimplement Karatsuba (or Toom-Cook) at a later
date, it will be easier and safer to do it from a clean slate.

ok tb@

18 months agoRemove usage of fatalx() in here. This code will be shared with bgpctl.
claudio [Wed, 19 Apr 2023 09:31:58 +0000 (09:31 +0000)]
Remove usage of fatalx() in here. This code will be shared with bgpctl.
In flowspec_cmp() make sure a deterministic sort is possible. Most error
cases are unreachable if flowspec NLRI are validated first (flowspec_valid).
In flowspec_valid() replace the assert like check with an error return.
OK tb@

18 months agoAdd minimal support for flowspec in the table-mp MRT format.
claudio [Wed, 19 Apr 2023 09:03:00 +0000 (09:03 +0000)]
Add minimal support for flowspec in the table-mp MRT format.
In general people should use table-v2 which handles flowspec just fine.
OK tb@

18 months agoAdd handling for flowspec in the update path.
claudio [Wed, 19 Apr 2023 08:30:37 +0000 (08:30 +0000)]
Add handling for flowspec in the update path.

Flowspec has no nexthop so adjust up_prep_adjout() to handle a NULL nexthop.
Add the MP_REACH encoding in up_generate_mp_reach for flowspec.
OK tb@

18 months agoImplement code to pass the flowspec config over to the RDE. The parent
claudio [Wed, 19 Apr 2023 07:12:22 +0000 (07:12 +0000)]
Implement code to pass the flowspec config over to the RDE. The parent
process tracks which prefixes are added / removed and issues the
corresponding imsg calls.
Right now the RDE does nothing with the received information.
OK tb@

18 months agoExtend the pt_entry api to handle flowspec.
claudio [Wed, 19 Apr 2023 07:09:47 +0000 (07:09 +0000)]
Extend the pt_entry api to handle flowspec.
Introduce pt_get_flow() and pt_add_flow() to lookup and insert flowspec
objects. Add pt_getflowspec() which works somewhat similar to pt_getaddr()
to extract the flowspec NLRI from a pt_entry.
Make pt_getaddr() to return the destination prefix of the flowspec rule and
handle flowspec in pt_write().
OK tb@

18 months agobad indents
claudio [Wed, 19 Apr 2023 07:07:58 +0000 (07:07 +0000)]
bad indents

18 months agoRemove strict checks added in 1.22, for they break some sensors.
miod [Wed, 19 Apr 2023 04:51:53 +0000 (04:51 +0000)]
Remove strict checks added in 1.22, for they break some sensors.
Reported by Paul de Weerd on bugs@

18 months agosync
deraadt [Wed, 19 Apr 2023 04:48:07 +0000 (04:48 +0000)]
sync

18 months agodwmshc on rockchips don't support dma crossy 128M boundaries.
dlg [Wed, 19 Apr 2023 02:01:02 +0000 (02:01 +0000)]
dwmshc on rockchips don't support dma crossy 128M boundaries.

let controllers pass the dma boundaries to sdmmc as part of the
attach args so it can be used for the bus_dmamap_create. add the
boundary to sdhci so dwmshc can set it to be bassed to sdmmc.

tested on a radxa e25 booting and rooting off the onboard emmc.
before this diff some programs would fault with weird instructions.

18 months agodont advertise non-removable sdmmc devices as removable to the scsi layer.
dlg [Wed, 19 Apr 2023 01:46:10 +0000 (01:46 +0000)]
dont advertise non-removable sdmmc devices as removable to the scsi layer.

this is cosmetic more than anything cos it gets rid of "removable"
in dmesg output when sd attaches.

18 months agohandle some more manufacturer ids.
dlg [Wed, 19 Apr 2023 01:42:13 +0000 (01:42 +0000)]
handle some more manufacturer ids.

18 months agoget rid of some dead code.
dlg [Wed, 19 Apr 2023 01:41:12 +0000 (01:41 +0000)]
get rid of some dead code.

18 months agoflag the device as non-removable if the dt says it's non-removable
dlg [Wed, 19 Apr 2023 01:38:32 +0000 (01:38 +0000)]
flag the device as non-removable if the dt says it's non-removable

this may help if we end up doing suspend/resume on rk356x/rk3588.

18 months agospelling
jsg [Wed, 19 Apr 2023 00:56:10 +0000 (00:56 +0000)]
spelling

18 months agoenable dwmshc to support the emmc controller on rockchip rk356x boards.
dlg [Wed, 19 Apr 2023 00:40:24 +0000 (00:40 +0000)]
enable dwmshc to support the emmc controller on rockchip rk356x boards.

18 months agodwmshc config
dlg [Wed, 19 Apr 2023 00:19:17 +0000 (00:19 +0000)]
dwmshc config

18 months agoadd a manpage for dwqe.
dlg [Wed, 19 Apr 2023 00:13:23 +0000 (00:13 +0000)]
add a manpage for dwqe.

18 months agohave a go at a manpage for dwmshc.
dlg [Wed, 19 Apr 2023 00:07:21 +0000 (00:07 +0000)]
have a go at a manpage for dwmshc.

i have a headache, so this isn't very good.

18 months agosupport Designware Mobile Storage Host Controllers
dlg [Tue, 18 Apr 2023 23:44:21 +0000 (23:44 +0000)]
support Designware Mobile Storage Host Controllers

this is used on rk356x and rk3588 SoCs as the emmc controller.

this is actually an sdhc(4) controller, but it has a lot of extra
registers and code for dealing with clock rates. i could have added
this to sdhc_fdt.c, but the amount of this extra code and the lack
of overlap with other chips meant id be splitting the code up based
on the chip id, which is something the autoconf/device framework
already does for us.

some help and ok from patrick@
ok jmatthew@

18 months agoadd support for loading files from the EFI System Partition.
dlg [Tue, 18 Apr 2023 23:11:56 +0000 (23:11 +0000)]
add support for loading files from the EFI System Partition.

this means you can put a bsd.rd next to BOOTAA64.EFI and go "boot
esp0a:bsd.rd" (assuming bsd.rd is in the root of the boot partition).

cool! krw@
ok kettenis@ patrick@

18 months agoHoist identical privilege checks in in_ioctl*()
kn [Tue, 18 Apr 2023 22:20:16 +0000 (22:20 +0000)]
Hoist identical privilege checks in in_ioctl*()

All cases do the same check as first step, so merge it before the switch
and before grapping exclusive locks.

OK mvs

18 months agoRemove kernel lock from ifa_ifwithaddr() and ifa_ifwithdstaddr().
mvs [Tue, 18 Apr 2023 22:01:23 +0000 (22:01 +0000)]
Remove kernel lock from ifa_ifwithaddr() and ifa_ifwithdstaddr().
Netlock protects `if_list', `ifa_list' and returned `ifa' dereference,
so put netlock assertion within.

Please note, rtable_setsource() doesn't destroy data pointed by
`ar_source'. This is the `ifa_addr' data belongs to `ifa' and exclusive
netlock is required to destroy it. So the kernel lock is not required
within rt_setsource(). Take netlock by rt_setsource() caller to make
`ifa' dereference safe.

Suggestions and ok by bluhm@

18 months agoDocument `ifnetlist' locking.
mvs [Tue, 18 Apr 2023 22:00:19 +0000 (22:00 +0000)]
Document `ifnetlist' locking.

We use both kernel and net lock for protect `ifnetlist'. This means we
do modification with both locks held, but for read-only access only one
lock required. Some places doing `ifnetlist' foreach loop are protected
by kernel lock and context switch can't be introduced there. This is the
exception, so "XXXSMP:" comment added.

Proposed and ok by bluhm@

18 months agoMap MSI-X in addition to MSI and INTx on xhci(4). On Qemu apparently
patrick [Tue, 18 Apr 2023 21:22:00 +0000 (21:22 +0000)]
Map MSI-X in addition to MSI and INTx on xhci(4).  On Qemu apparently
the xHCI controller does not support MSIs, but does support MSI-X.  With
this diff running on Qemu/arm64 we switch over from shared INTx to device-
specific MSI-X interrupts.

Tested by and ok phessler@
ok dlg@

18 months agoSkip all tests that need internet connection unless they have it.
bluhm [Tue, 18 Apr 2023 19:41:50 +0000 (19:41 +0000)]
Skip all tests that need internet connection unless they have it.
Run reachability ping only once.  Fix clean files and always run
make obj.  Do not suppress messages from redirectchain test.

18 months agoUse NULL, not 0 for pointers and use an explicit comparison against NULL.
tb [Tue, 18 Apr 2023 18:29:32 +0000 (18:29 +0000)]
Use NULL, not 0 for pointers and use an explicit comparison against NULL.

18 months agoDefine net lock assertions for building kernel code in regress.
bluhm [Tue, 18 Apr 2023 16:57:44 +0000 (16:57 +0000)]
Define net lock assertions for building kernel code in regress.

18 months agoectest: Remove #if 1
tb [Tue, 18 Apr 2023 15:28:17 +0000 (15:28 +0000)]
ectest: Remove #if 1

18 months agoUnifdef OPENSSL_NO_EC_NISTP_64_GCC_128
tb [Tue, 18 Apr 2023 15:20:34 +0000 (15:20 +0000)]
Unifdef OPENSSL_NO_EC_NISTP_64_GCC_128

18 months agoRemove prototypes under OPENSSL_NO_EC_NISTP_64_GCC_128
tb [Tue, 18 Apr 2023 15:14:46 +0000 (15:14 +0000)]
Remove prototypes under OPENSSL_NO_EC_NISTP_64_GCC_128

The code was deleted a while back, the prototypes remained. We had
OPENSSL_NO_EC_NISTP_64_GCC_128 in opensslfeatures.h since forever.

discussed with jsing

18 months agoImplement a basic flowspec print function. It is not 100% compatible
claudio [Tue, 18 Apr 2023 14:11:54 +0000 (14:11 +0000)]
Implement a basic flowspec print function. It is not 100% compatible
with the parser but that is for a later time to fix.
OK tb@

18 months agoRewrite some ugly for loops
tb [Tue, 18 Apr 2023 13:31:14 +0000 (13:31 +0000)]
Rewrite some ugly for loops

This fixes a few KNF issues and ugly line wrapping by using a local
version of nitems(); fix two bsearch() on top.

ok claudio

18 months agoResolve namerefs in packages. Fixes legacy interrupts on machines that use
kettenis [Tue, 18 Apr 2023 12:39:32 +0000 (12:39 +0000)]
Resolve namerefs in packages.  Fixes legacy interrupts on machines that use
PNP0C0F PCI interrupt link devices.

ok patrick@

18 months agoImplement the parser bits to process flowspec rules. Heavily inspired by
claudio [Tue, 18 Apr 2023 12:11:27 +0000 (12:11 +0000)]
Implement the parser bits to process flowspec rules. Heavily inspired by
pfctl, in bgpd flowspec rules are written like pf rules (with a few
exceptions / extensions). As a result not all flowspec features are
available but that is OK.
OK tb@

18 months agoI somehow overlooked four more missing void...
tb [Tue, 18 Apr 2023 10:27:38 +0000 (10:27 +0000)]
I somehow overlooked four more missing void...

18 months agoRename 'art_root' structure member `source' to `ar_source' to be in
mvs [Tue, 18 Apr 2023 10:19:16 +0000 (10:19 +0000)]
Rename 'art_root' structure member `source' to `ar_source' to be in
accordance with all other 'art_root' structure members.

Proposed by bluhm@

ok bluhm@ kn@

18 months agoAdd another check to com probe
jsg [Tue, 18 Apr 2023 09:58:06 +0000 (09:58 +0000)]
Add another check to com probe

With this bentley@'s Steam Deck no longer attaches these:
com0 at isa0 port 0x3f8/8 irq 4: ns8250, no fifo
com1 at isa0 port 0x2f8/8 irq 3: ns8250, no fifo
com2 at isa0 port 0x3e8/8 irq 5: ns8250, no fifo

From Matthias Drochner in NetBSD rev 1.154
ok kettenis@

18 months agoIf rcode is SERVFAIL, there is no need to look at the packet.
florian [Tue, 18 Apr 2023 09:57:51 +0000 (09:57 +0000)]
If rcode is SERVFAIL, there is no need to look at the packet.

This pulls the check for rcode up, before we check if the answer
packet has sensible length. Since we are not touching the packet at
all, we don't care about the size and don't need to log if the size is
wrong from a DNS perspective.

With asr error reporting improved in the previous commit, this
probably gets rid of all "bad packet: too short" messages.

OK semarie

18 months agoImprove asr error handling.
florian [Tue, 18 Apr 2023 09:57:08 +0000 (09:57 +0000)]
Improve asr error handling.

When an upstream nameserver is not available asr is not synthesizing a
SERVFAIL rcode (duh), but sets ar_errno. When we need SERVFAIL further
down,we need to set the rcode ourselves.

While here, don't complain about a too short packet when asr already
told us that resolving did not work out in check_dns64_done.

OK semarie

18 months agoCall sysctl_dumpentry() with shared netlock. It performs read-only
mvs [Tue, 18 Apr 2023 09:56:54 +0000 (09:56 +0000)]
Call sysctl_dumpentry() with shared netlock. It performs read-only
access to netlock protected data. Please note, kernel lock is still
taken, as required by rtable_getsource() or BFD subsystem.

ok kn@ bluhm@

18 months agoCall sysctl_iflist() with shared netlock. It performs read-only access
mvs [Tue, 18 Apr 2023 09:55:34 +0000 (09:55 +0000)]
Call sysctl_iflist() with shared netlock. It performs read-only access
to netlock protected data.

ok kn@ bluhm@

18 months agoCall sysctl_ifnames() with shared netlock. It performs read-only access
mvs [Tue, 18 Apr 2023 09:54:53 +0000 (09:54 +0000)]
Call sysctl_ifnames() with shared netlock. It performs read-only access
to netlock protected data.

ok kn@ bluhm@

18 months agoMove x509.h inclusion into alphabetical order
tb [Tue, 18 Apr 2023 09:10:44 +0000 (09:10 +0000)]
Move x509.h inclusion into alphabetical order

18 months agochangelist: remove dhclient(8) files
semarie [Tue, 18 Apr 2023 08:50:37 +0000 (08:50 +0000)]
changelist: remove dhclient(8) files

as currently dhclient(8) is a (sort of) alias to "ifconfig inet autoconf", these
files aren't used anymore.

ok tb@

18 months agochangelist: add unbound-control files
semarie [Tue, 18 Apr 2023 08:48:17 +0000 (08:48 +0000)]
changelist: add unbound-control files

ok tb@

18 months agoBring includes into canonical order
tb [Tue, 18 Apr 2023 08:47:28 +0000 (08:47 +0000)]
Bring includes into canonical order

Requested by jsing

18 months agoSigh cvs... Also drop OPENSSL_NO_DEPRECATED from ec.h
tb [Tue, 18 Apr 2023 08:46:08 +0000 (08:46 +0000)]
Sigh cvs... Also drop OPENSSL_NO_DEPRECATED from ec.h

18 months agoSupport upstreamed AP806/CP110 bindings in mvtemp(4). Apparently older EDK2
patrick [Tue, 18 Apr 2023 08:35:02 +0000 (08:35 +0000)]
Support upstreamed AP806/CP110 bindings in mvtemp(4).  Apparently older EDK2
versions shipped bindings compatible with the Armada 380, but when the ARM64
SoCs were upstreamed from the vendor fork to Linux, those apparently were
adjusted.

With this diff mvtemp(4) now tries and use the parent as syscon regmap in case
the legacy binding cannot be used.  Furthermore this adds some initialization
as apparently the new EDK2 does less of that work during bootup.

Noticed by mbuhl@ who's running an updated EDK2 on the MACCHIATObin.
ok kettenis@

18 months agoMove some includes out of OPENSSL_NO_DEPRECATED
tb [Tue, 18 Apr 2023 08:33:43 +0000 (08:33 +0000)]
Move some includes out of OPENSSL_NO_DEPRECATED

Some headers were included conditionally on OPENSSL_NO_DEPRECATED in hopes
that eventually the mess of everything includes everything will magically
resolve itself. Of course everyone would end up building openssl with
OPENSSL_NO_DEPRECATED over time... Right.

Surprisingly, the ecosystem has come to rely on these implicit inclusions,
so about two dozen ports would fail to build because of this. Patching this
would be easy but really not worth the effort.

ok jsing

18 months agoectest: drop a broken #if 0 /* optional */ piece of code
tb [Tue, 18 Apr 2023 08:17:49 +0000 (08:17 +0000)]
ectest: drop a broken #if 0 /* optional */ piece of code

This places a point at infinity and then fails. Fix some wacky indentation
in the vicinity.

18 months agoec_point_conversion: drop test for sect571k1
tb [Tue, 18 Apr 2023 08:05:18 +0000 (08:05 +0000)]
ec_point_conversion: drop test for sect571k1

Maybe it should be replaced by another test, although P-256 seems enough.