openbsd
2 years agoDo not use defines from pfkeyv2.h in portable code.
claudio [Wed, 15 Jun 2022 14:09:30 +0000 (14:09 +0000)]
Do not use defines from pfkeyv2.h in portable code.

Instead define our own algorithm enums for the IPsec code.
OK tb@ sthen@

2 years agoAdjust after chaning F_BGPD_INSERTED to F_BGPD and removal of F_DYNAMIC
claudio [Wed, 15 Jun 2022 10:10:50 +0000 (10:10 +0000)]
Adjust after chaning F_BGPD_INSERTED to F_BGPD and removal of F_DYNAMIC

2 years agoRename F_BGPD_INSERTED to F_BGPD and use F_BGPD_INSERTED as a flag that
claudio [Wed, 15 Jun 2022 10:10:03 +0000 (10:10 +0000)]
Rename F_BGPD_INSERTED to F_BGPD and use F_BGPD_INSERTED as a flag that
indicates that the route was successfully added to the FIB.

Filter out dynamic routes, like it is already done for ARP and ND routes) and
kill F_DYNAMIC.

Also remove the protect_lo() bits. Adding dummy kroute entries does no longer
prevent bad routes to hit the FIB. Also loopback IPs are checked in a few
other places to prevent bad routes to be installed into the FIB.

OK tb@

2 years agoIn iwn(4), delay 40MHz RXON config until we have negotiated 11n mode.
stsp [Wed, 15 Jun 2022 08:43:17 +0000 (08:43 +0000)]
In iwn(4), delay 40MHz RXON config until we have negotiated 11n mode.

Enabling 40MHz too early can cause firmware sysassert 0x05 on 5300 devices
when we send the initial AUTH frame to kick off association. At this point
we haven't negotiated 11n mode yet (this happens later during the association
sequence), so perhaps firmware saw an inconsistent configuration state?
It is unclear why this problem did not seem to affect any other devices.

Reported by Christian Schulte on misc@

2 years agodrm/amdgpu: update VCN codec support for Yellow Carp
jsg [Wed, 15 Jun 2022 07:49:55 +0000 (07:49 +0000)]
drm/amdgpu: update VCN codec support for Yellow Carp

From Alex Deucher
2b7d9fd0f3725135b40571d6a44bbbaeead132fe in linux 5.15.y/5.15.47
97e50305542f384741a5b45699aba349fe9fca73 in mainline linux

2 years agodrm/atomic: Force bridge self-refresh-exit on CRTC switch
jsg [Wed, 15 Jun 2022 07:47:22 +0000 (07:47 +0000)]
drm/atomic: Force bridge self-refresh-exit on CRTC switch

From Brian Norris
cab7cd86f9e81834c407e043844779f21653ff3c in linux 5.15.y/5.15.47
e54a4424925a27ed94dff046db3ce5caf4b1e748 in mainline linux

2 years agodrm/amd/pm: use bitmap_{from,to}_arr32 where appropriate
jsg [Wed, 15 Jun 2022 07:44:36 +0000 (07:44 +0000)]
drm/amd/pm: use bitmap_{from,to}_arr32 where appropriate

From Yury Norov
b2d359f095883d10b33e74a4a404363d2312830d in linux 5.15.y/5.15.47
525d6515604eb1373ce5e6372a6b6640953b2d6a in mainline linux

2 years agodrm/amd/pm: Fix missing thermal throttler status
jsg [Wed, 15 Jun 2022 07:40:33 +0000 (07:40 +0000)]
drm/amd/pm: Fix missing thermal throttler status

From Lijo Lazar
e0199ce728fb98a96a20136a5edb11c160d3151f in linux 5.15.y/5.15.47
b0f4d663fce6a4232d3c20ce820f919111b1c60b in mainline linux

2 years agodrm/radeon: fix a possible null pointer dereference
jsg [Wed, 15 Jun 2022 07:37:40 +0000 (07:37 +0000)]
drm/radeon: fix a possible null pointer dereference

From Gong Yuanjun
7b7fba107b2c4ec7673d0f45bdbb9d1af697d9b9 in linux 5.15.y/5.15.47
a2b28708b645c5632dc93669ab06e97874c8244f in mainline linux

2 years agodrm/amd/display: Check if modulo is 0 before dividing.
jsg [Wed, 15 Jun 2022 07:34:21 +0000 (07:34 +0000)]
drm/amd/display: Check if modulo is 0 before dividing.

From David Galiffi
10ef82d6e0af5536ec64770c07f6bbabfdd6977c in linux 5.15.y/5.15.47
49947b906a6bd9668eaf4f9cf691973c25c26955 in mainline linux

2 years agoadd bitmap_to_arr32() for 5.15.47 drm
jsg [Wed, 15 Jun 2022 07:04:09 +0000 (07:04 +0000)]
add bitmap_to_arr32() for 5.15.47 drm

discussed with and partly from kettenis@

2 years agoSwitch to using TLS_INT instead of handrolling it
tb [Wed, 15 Jun 2022 06:14:59 +0000 (06:14 +0000)]
Switch to using TLS_INT instead of handrolling it

2 years agom4: use ASCII quotes `...' in man page example
naddy [Tue, 14 Jun 2022 21:31:45 +0000 (21:31 +0000)]
m4: use ASCII quotes `...' in man page example

The m4 syntax specifically requires `...' and not the pretty Unicode
quotes that the Sq macro can produce.  Use of escape sequences
clarified by schwarze@

2 years agoThe curly braces are tokens in the described language,
schwarze [Tue, 14 Jun 2022 15:49:58 +0000 (15:49 +0000)]
The curly braces are tokens in the described language,
so add the missing .Cm macros; markup error reported by espie@;
OK florian@ espie@

2 years agomy email should be @openbsd.org everywhere, and nothing else
espie [Tue, 14 Jun 2022 15:15:17 +0000 (15:15 +0000)]
my email should be @openbsd.org everywhere, and nothing else

2 years agoAdd my copyright, I think I added enough code to justify it.
claudio [Tue, 14 Jun 2022 14:06:48 +0000 (14:06 +0000)]
Add my copyright, I think I added enough code to justify it.

2 years agoDocument search order
kn [Tue, 14 Jun 2022 09:56:07 +0000 (09:56 +0000)]
Document search order

Explain when and how LD_LIBRARY_PATH, DT_RUNPATH and DT_RPATH are used.

Input OK guenther

2 years agoAdd Longreach airport (LRE), which I visited so long ago I had to check with
jmatthew [Tue, 14 Jun 2022 09:03:46 +0000 (09:03 +0000)]
Add Longreach airport (LRE), which I visited so long ago I had to check with
my parents.

2 years agoBump version to 7.4
claudio [Tue, 14 Jun 2022 07:33:58 +0000 (07:33 +0000)]
Bump version to 7.4

2 years agokf* terminfo capabilities are poorly defined and rxvt uses them in a
nicm [Tue, 14 Jun 2022 07:29:00 +0000 (07:29 +0000)]
kf* terminfo capabilities are poorly defined and rxvt uses them in a
different way from xterm, so add a feature flag for rxvt to make tmux
ignore the capabilities and instead rely on its builtin definitions.

2 years agofix logic bug in pf_find_state()
henning [Mon, 13 Jun 2022 12:48:00 +0000 (12:48 +0000)]
fix logic bug in pf_find_state()
a state in PFTM_PURGE could potentially hide another state on the same state
key that is active and we'd incorrectly block the packet
I believe that cannot happen as things are now.
ok sashan

2 years agoFix compatible strings to match the official device tree binding.
kettenis [Mon, 13 Jun 2022 12:40:30 +0000 (12:40 +0000)]
Fix compatible strings to match the official device tree binding.

ok patrick@, dlg@, jsg@

2 years agoSplit dispatch_rtmsg_addr() into a function parsing a route message
claudio [Mon, 13 Jun 2022 09:57:44 +0000 (09:57 +0000)]
Split dispatch_rtmsg_addr() into a function parsing a route message
into a struct kroute_full and then two functions to add/change or delete
that route from the kroute tree.
Cleanup some additional things and use the same parse funtion in fetchtable.
OK tb@

2 years agosync
deraadt [Mon, 13 Jun 2022 03:47:12 +0000 (03:47 +0000)]
sync

2 years agovmm(4): remove vm teardown from vcpu run path
dv [Sun, 12 Jun 2022 19:48:12 +0000 (19:48 +0000)]
vmm(4): remove vm teardown from vcpu run path

Remove the calling of vm_teardown from the code path in vm_run after
vmm has exited the vm/vcpu and is on its way back to userland/vmd(8).
vmd(8) and other vmm(4) users should use the VMM_IOC_TERM ioctl(2)
instead.

Help testing from Mischa Peters, OK mlarkin@

2 years agoaplsart(4)
kettenis [Sun, 12 Jun 2022 16:02:33 +0000 (16:02 +0000)]
aplsart(4)

2 years agoThe NVMe firmware distributed with the macOS 13 developer beta does not
kettenis [Sun, 12 Jun 2022 16:00:12 +0000 (16:00 +0000)]
The NVMe firmware distributed with the macOS 13 developer beta does not
like some of the shortcuts we've taken in the code that talks to RTKit.
In particular it does not like our NAK of the request for ioreport buffers.
So allocate the requested buffers and ACK the request instead.

However, the hardware implements a address filter between the coprocessor
that the firmware runs on and main memory.  So we have to add a mapping
into this address filter such that the firmware can access these buffers.
Support for this address filter is implemented in a new aplsart(4) driver.

ok dlg@

2 years agoAdd stftemp(4), a driver for the temperature sensor integrated on the
kettenis [Sun, 12 Jun 2022 10:51:55 +0000 (10:51 +0000)]
Add stftemp(4), a driver for the temperature sensor integrated on the
StarFive JH7100 SoC.

ok jsg@

2 years agoAllow sleeping while clearing a sleep timeout
visa [Sun, 12 Jun 2022 10:36:04 +0000 (10:36 +0000)]
Allow sleeping while clearing a sleep timeout

Since sys/kern/kern_timeout.c r1.84, timeout_barrier() has used sleeping
with soft-interrupt-driven timeouts. Adjust the sleep machinery so that
the timeout clearing can block in sleep_finish().

This adds one step of recursion inside sleep_finish(). However, the
sleep queue handling does not recurse because sleep_finish() completes
it before calling timeout_del_barrier().

This fixes the following panic:

panic: kernel diagnostic assertion "(p->p_flag & P_TIMEOUT) == 0" failed: file "sys/kern/kern_synch.c", line 373
Stopped at db_enter+0x10:  popq    %rbp
db_enter() at db_enter+0x10
panic() at panic+0xbf
__assert() at __assert+0x25
sleep_setup() at sleep_setup+0x1d8
cond_wait() at cond_wait+0x46
timeout_barrier() at timeout_barrier+0x109
timeout_del_barrier() at timeout_del_barrier+0xa2
sleep_finish() at sleep_finish+0x16d
tsleep() at tsleep+0xb2
sys_nanosleep() at sys_nanosleep+0x12d
syscall() at syscall+0x374

OK mpi@ dlg@

2 years agokqueue: Fix missing wakeup
visa [Sun, 12 Jun 2022 10:34:36 +0000 (10:34 +0000)]
kqueue: Fix missing wakeup

While one thread is running kqueue_scan(), another thread can begin
scanning the same kqueue, observe that the event queue is empty, and
go to sleep. If the first thread re-inserts a knote for re-processing,
the second thread can miss the newly pending event. Wake up the kqueue
after a re-insert to correct this.

This fixes a Go test hang that jsing@ tracked down to kqueue.

Tested in snaps for a week.

OK jsing@ mpi@

2 years agoDocument ext2fs traversal by locate.updatedb(8)
gnezdo [Sun, 12 Jun 2022 05:36:20 +0000 (05:36 +0000)]
Document ext2fs traversal by locate.updatedb(8)

From Larry Hynes

2 years agowhitespace
kettenis [Sat, 11 Jun 2022 19:12:59 +0000 (19:12 +0000)]
whitespace

2 years agoFix size of flags output buffer.
nicm [Sat, 11 Jun 2022 16:59:33 +0000 (16:59 +0000)]
Fix size of flags output buffer.

2 years agoBring back PL011 UART FIFO support to pluart(4). This time with working
anton [Sat, 11 Jun 2022 05:29:24 +0000 (05:29 +0000)]
Bring back PL011 UART FIFO support to pluart(4). This time with working
tx interrupts.

Special treatment of Server Base System Architecture (SBSA) generic UART
devices is required as presence of the interrupt trigger level register
is not guaranteed. Therefore treat such devices of having a 1-byte FIFO.

ok visa@

2 years agoMore %i vs %d cleanup
tb [Fri, 10 Jun 2022 22:00:15 +0000 (22:00 +0000)]
More %i vs %d cleanup

2 years agoImplement CPU_BUSY_CYCLE() with the ZiHintPause extension
jca [Fri, 10 Jun 2022 21:34:15 +0000 (21:34 +0000)]
Implement CPU_BUSY_CYCLE() with the ZiHintPause extension

This may help save power but also improves performance in contended
workloads.

kettenis@ helped a lot:
- pointing out the error in my newest diff
- pointing out that the ZiHintPause had been ratified in early 2021
- testing this on his visionfive board

ok kettenis@

libc make -j4 time before
17m39.06s real    22m13.85s user    34m27.88s system
17m35.60s real    22m15.01s user    34m28.51s system
17m40.78s real    22m14.89s user    34m42.91s system
17m40.61s real    22m06.99s user    34m29.58s system
17m42.79s real    22m08.04s user    34m33.19s system
17m39.21s real    22m11.27s user    34m23.18s system
17m32.81s real    22m13.84s user    34m09.67s system

libc make -j4 time after
16m35.48s real    21m57.94s user    32m05.50s system
16m49.10s real    21m58.47s user    32m42.37s system
16m42.16s real    22m00.51s user    32m22.18s system
16m41.54s real    21m53.32s user    32m19.53s system
16m45.42s real    21m52.14s user    32m37.78s system
16m46.55s real    21m58.98s user    32m36.70s system

2 years agoAdd OSW in Orsk (Аеропорт Орсрк), where I landed and departed at one of the
kn [Fri, 10 Jun 2022 20:10:24 +0000 (20:10 +0000)]
Add OSW in Orsk (Аеропорт Орсрк), where I landed and departed at one of the
two gates to have a great time in the Ural last year.

2 years agoIgnore OSC if the first argument is not properly terminated.
nicm [Fri, 10 Jun 2022 11:55:30 +0000 (11:55 +0000)]
Ignore OSC if the first argument is not properly terminated.

2 years agoUnify error messages on d2i failure for econtent
tb [Fri, 10 Jun 2022 10:41:09 +0000 (10:41 +0000)]
Unify error messages on d2i failure for econtent

2 years agoDedup econtent version checks
tb [Fri, 10 Jun 2022 10:36:43 +0000 (10:36 +0000)]
Dedup econtent version checks

Since the ASN.1 template conversions, we have three copies of mostly dead
code that validates that the econtent version is at its default value 0.
Until a new standard bumps this version and we decide to support that,
we're better off with only one copy of this code.

ok claudio

2 years agoAdd _?ENTRY_NB() macro for doing an ASM function entry without
guenther [Fri, 10 Jun 2022 01:56:02 +0000 (01:56 +0000)]
Add _?ENTRY_NB() macro for doing an ASM function entry without
setting the binding to global (NB == "no binding"), as clang 13 is
now warning about changing the binding from global to weak.  Use
them for bcopy, brk, and sbrk.

Add the '.L' prefix to internal labels in the bcopy implementation
to remove them from the symbol table

Start using the MI DEFS.h: delete the #defines from powerpc/SYS.h
that the MI DEFS.h provides and switch from SYS.h to DEFS.h in files
that don't do syscalls.  Use END_BUILTIN from the MI DEFS.h for ffs.

ok gkoehler@

2 years agodrm/i915/dsi: fix VBT send packet port selection for ICL+
jsg [Fri, 10 Jun 2022 01:21:12 +0000 (01:21 +0000)]
drm/i915/dsi: fix VBT send packet port selection for ICL+

From Jani Nikula
35511d4fdd6b82c887ef038278fd808d7c7f98de in linux 5.15.y/5.15.46
0ea917819d12fed41ea4662cc26ffa0060a5c354 in mainline linux

2 years agodrm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
jsg [Fri, 10 Jun 2022 01:19:27 +0000 (01:19 +0000)]
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.

From Dave Airlie
70276460e914d560e96bfc208695a872fe9469c9 in linux 5.15.y/5.15.46
31ab27b14daaa75541a415c6794d6f3567fea44a in mainline linux

2 years agodrm/i915: Fix CFI violation with show_dynamic_id()
jsg [Fri, 10 Jun 2022 01:17:26 +0000 (01:17 +0000)]
drm/i915: Fix CFI violation with show_dynamic_id()

From Nathan Chancellor
d50d1c703bbd8930d11e5bc01e2cc3c8dcda8f4b in linux 5.15.y/5.15.46
58606220a2f1407a7516c547f09a1ba7b4350a73 in mainline linux

2 years agodrm/edid: fix invalid EDID extension block filtering
jsg [Fri, 10 Jun 2022 01:15:31 +0000 (01:15 +0000)]
drm/edid: fix invalid EDID extension block filtering

From Jani Nikula
96db9afa4958bbaee77995eb0c84e08cdcce74ae in linux 5.15.y/5.15.46
3aefc722ff52076407203b6af9713de567993adf in mainline linux

2 years agodrm: fix EDID struct for old ARM OABI format
jsg [Fri, 10 Jun 2022 01:13:38 +0000 (01:13 +0000)]
drm: fix EDID struct for old ARM OABI format

From Linus Torvalds
710051ebb77b785d637417564be7fed4c13c6ce0 in linux 5.15.y/5.15.46
47f15561b69e226bfc034e94ff6dbec51a4662af in mainline linux

2 years agodrm/amd/pm: update smartshift powerboost calc for smu13
jsg [Fri, 10 Jun 2022 01:09:40 +0000 (01:09 +0000)]
drm/amd/pm: update smartshift powerboost calc for smu13

From Sathishkumar S
5005002b2e12e9ac4b58e59354d38a4106906f87 in linux 5.15.y/5.15.46
cdf4c8ec39872a61a58d62f19b4db80f0f7bc586 in mainline linux

2 years agodrm/amd/pm: update smartshift powerboost calc for smu12
jsg [Fri, 10 Jun 2022 01:08:09 +0000 (01:08 +0000)]
drm/amd/pm: update smartshift powerboost calc for smu12

From Sathishkumar S
c525d3385f6d34d6dcce89ebe019314d83f23873 in linux 5.15.y/5.15.46
138292f1dc00e7e0724f44769f9da39cf2f3bf0b in mainline linux

2 years agodrm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo
jsg [Fri, 10 Jun 2022 01:06:31 +0000 (01:06 +0000)]
drm/amdgpu/ucode: Remove firmware load type check in amdgpu_ucode_free_bo

From Alice Wong
b305469ed00420e53c66064b554531d6fbd98d5b in linux 5.15.y/5.15.46
ab0cd4a9ae5b4679b714d8dbfedc0901fecdce9f in mainline linux

2 years agodrm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init
jsg [Fri, 10 Jun 2022 01:05:04 +0000 (01:05 +0000)]
drm/amdgpu/psp: move PSP memory alloc from hw_init to sw_init

From Alex Deucher
a2c87348acebd9bacedfe20cf82341928751ff91 in linux 5.15.y/5.15.46
b95b5391684b39695887afb4a13cccee7820f5d6 in mainline linux

2 years agodrm/amd/pm: fix the compile warning
jsg [Fri, 10 Jun 2022 01:03:18 +0000 (01:03 +0000)]
drm/amd/pm: fix the compile warning

From Evan Quan
ae488dafe074e420ccf361b2633f7fbc314eaedf in linux 5.15.y/5.15.46
555238d92ac32dbad2d77ad2bafc48d17391990c in mainline linux

2 years agodrm/plane: Move range check for format_count earlier
jsg [Fri, 10 Jun 2022 01:00:53 +0000 (01:00 +0000)]
drm/plane: Move range check for format_count earlier

From Steven Price
978e3d023256bfaf34a0033d40c94e8a8e70cf3c in linux 5.15.y/5.15.46
4b674dd69701c2e22e8e7770c1706a69f3b17269 in mainline linux

2 years agodrm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells
jsg [Fri, 10 Jun 2022 00:59:19 +0000 (00:59 +0000)]
drm/amdgpu/sdma: Fix incorrect calculations of the wptr of the doorbells

From Haohui Mai
7719a8044bf66b9f59818e50b0c7877e1397e7f4 in linux 5.15.y/5.15.46
7dba6e838e741caadcf27ef717b6dcb561e77f89 in mainline linux

2 years agodrm/amd/pm: fix double free in si_parse_power_table()
jsg [Fri, 10 Jun 2022 00:57:24 +0000 (00:57 +0000)]
drm/amd/pm: fix double free in si_parse_power_table()

From Keita Suzuki
a5ce7051db044290b1a95045ff03c249005a3aa4 in linux 5.15.y/5.15.46
f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd in mainline linux

2 years agodrm/amd/display: Disabling Z10 on DCN31
jsg [Fri, 10 Jun 2022 00:54:53 +0000 (00:54 +0000)]
drm/amd/display: Disabling Z10 on DCN31

From Saaem Rizvi
d0d266c2f689d6113fe0d43d1b1fc105157c7443 in linux 5.15.y/5.15.46
5d5af34072c8b11f60960c3bea57ff9de5877791 in mainline linux

2 years agoadd struct kobj_attribute
jsg [Fri, 10 Jun 2022 00:50:50 +0000 (00:50 +0000)]
add struct kobj_attribute
required for 5.15.46 inteldrm

2 years agoReorganize the handling of tap inputs.
bru [Thu, 9 Jun 2022 22:17:18 +0000 (22:17 +0000)]
Reorganize the handling of tap inputs.

This change fixes bugs concerning the transition into the hold/drag state
after double taps or two- or three-finger taps.  In addition, it ensures
that button events properly match the logical button state when tap inputs
and button inputs overlap.

2 years agoProperly error out if a variable does not exist. Need to pass back
claudio [Thu, 9 Jun 2022 17:33:47 +0000 (17:33 +0000)]
Properly error out if a variable does not exist. Need to pass back
ERROR to yylex() to make the parser fail nicely.
OK tb@

2 years agoChange argument of ktable_get from ifd->ifi_rdomain to kif->k.rdomain.
claudio [Thu, 9 Jun 2022 16:53:14 +0000 (16:53 +0000)]
Change argument of ktable_get from ifd->ifi_rdomain to kif->k.rdomain.
It is the same value but using the kif seems better.

2 years agoRemove the rdomain / rtableid passed to some kroute functions.
claudio [Thu, 9 Jun 2022 16:45:19 +0000 (16:45 +0000)]
Remove the rdomain / rtableid passed to some kroute functions.

kr_nexthop_add() and kr_nexthop_delete() only operate on the main table
so just pass in the right rdomain id.
kr_shutdown() and kr_dispatch_msg() don't really need the rdomain passed.
The was done for kif_remove(), since that function needs to remove connected
routes from the rdomain table. Connected routes can only exists in the
interfaces rdomain so just use kif->k.rdomain. If such routes exist that
table exists as well. If the table does not exists there are also no
connected routes to track.
OK tb@

2 years agoHandle "broken-cd" as "non-removable" like we do in dwmmc(4). Needed on
kettenis [Thu, 9 Jun 2022 14:43:28 +0000 (14:43 +0000)]
Handle "broken-cd" as "non-removable" like we do in dwmmc(4).  Needed on
the StarFive VisionFive board.

ok patrick@

2 years agopoint developers to the other place where the remaining flags values are
espie [Thu, 9 Jun 2022 13:13:14 +0000 (13:13 +0000)]
point developers to the other place where the remaining flags values are
defined (nice gotcha when you come back to the code after a few months).

2 years agoReadd ETHERTYPE_NHRPA case.
mbuhl [Thu, 9 Jun 2022 12:56:14 +0000 (12:56 +0000)]
Readd ETHERTYPE_NHRPA case.
Found by Stefan Butz.
ok dlg@

2 years agoAdd gpiorestart(4).
kettenis [Thu, 9 Jun 2022 12:16:56 +0000 (12:16 +0000)]
Add gpiorestart(4).

2 years agoAdd gpiorestart(4), a driver that resets a SoC/board/machine using a GPIO
kettenis [Thu, 9 Jun 2022 12:13:56 +0000 (12:13 +0000)]
Add gpiorestart(4), a driver that resets a SoC/board/machine using a GPIO
pin.

ok jsg@

2 years agose more specific discrimination to know if extra data is still there after
espie [Thu, 9 Jun 2022 09:27:11 +0000 (09:27 +0000)]
se more specific discrimination to know if extra data is still there after
an update.

2 years agoIf an application gives the first parameter to OSC 52, validate and pass
nicm [Thu, 9 Jun 2022 09:12:55 +0000 (09:12 +0000)]
If an application gives the first parameter to OSC 52, validate and pass
on to outside terminal. GitHub issue 3192.

2 years agoAdd Lublin airport (LUZ), which I visited today during a day trip to Lublin.
fcambus [Wed, 8 Jun 2022 21:28:59 +0000 (21:28 +0000)]
Add Lublin airport (LUZ), which I visited today during a day trip to Lublin.

2 years agodo not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy)
djm [Wed, 8 Jun 2022 20:20:26 +0000 (20:20 +0000)]
do not refuse valid IPv6 addresses in -X connect (HTTP CONNECT proxy)
support. Identified by Wilmer van der Gaast, ok millert@

2 years agoKNF, mostly whitespace - no binary change on amd64
tb [Wed, 8 Jun 2022 20:07:31 +0000 (20:07 +0000)]
KNF, mostly whitespace - no binary change on amd64

2 years agoWhen looking for the next block to tag, we aren't interested in children
schwarze [Wed, 8 Jun 2022 16:29:12 +0000 (16:29 +0000)]
When looking for the next block to tag, we aren't interested in children
of the current block but really want the next block instead.  This fixes
a segfault reported by Evan Silberman <evan at jklol dot net> on bugs@.

2 years agorecognize @extraglob for later
espie [Wed, 8 Jun 2022 14:57:12 +0000 (14:57 +0000)]
recognize @extraglob for later
okay sthen@

2 years agoSurprisingly, every escape sequence can also be used as an argument
schwarze [Wed, 8 Jun 2022 13:08:00 +0000 (13:08 +0000)]
Surprisingly, every escape sequence can also be used as an argument
delimiter for an outer escape sequence, in which case the delimiting
escape sequence retains its syntax but usually ignores its argument
and loses its inherent effect.  Add rudimentary support for this
syntax quirk in order to improve parsing compatibility with groff.

2 years agosync
sthen [Wed, 8 Jun 2022 11:09:33 +0000 (11:09 +0000)]
sync

2 years agostfpinctrl(4)
kettenis [Wed, 8 Jun 2022 10:49:08 +0000 (10:49 +0000)]
stfpinctrl(4)

2 years agoAdd a new option which allows to set an alternative base-directory to
mglocker [Wed, 8 Jun 2022 09:03:11 +0000 (09:03 +0000)]
Add a new option which allows to set an alternative base-directory to
download the installation files to.  This is helpful if the default
base-directory /home isn't available for writing, i.e. when using auto
mounted home directories.

Discussed with and input received from
florian@, jmc@, sthen@, schwarze@, and ajacoutot@.

OK florian@, jmc@, sthen@

2 years agoAdd stfpinctrl(4).
kettenis [Wed, 8 Jun 2022 08:42:09 +0000 (08:42 +0000)]
Add stfpinctrl(4).

2 years agoAdd stfpinctrl(4), a driver for the pinctrl/gpio block found on the
kettenis [Wed, 8 Jun 2022 08:40:53 +0000 (08:40 +0000)]
Add stfpinctrl(4), a driver for the pinctrl/gpio block found on the
StarFive JH7100 SoC.

ok jsg@

2 years agosync
sthen [Wed, 8 Jun 2022 07:43:16 +0000 (07:43 +0000)]
sync

2 years agofixes potential memory leak. if_vinput() should always consume packet
sashan [Tue, 7 Jun 2022 22:18:34 +0000 (22:18 +0000)]
fixes potential memory leak. if_vinput() should always consume packet
by either passing it further or releasing it.

OK mvs@

2 years agofixes NULL pointer dereference panic triggered by relayd.
sashan [Tue, 7 Jun 2022 22:14:15 +0000 (22:14 +0000)]
fixes NULL pointer dereference panic triggered by relayd.
same panic can be triggered when address table is part
of anchor loaded by 'load anchor ... from ..,' statement.
pf_find_or_create_ruleset() function called by pfr_add_tables()
must receive ruleset name which comes from pre-allocated root
table.

OK claudio@ dlg@

2 years agoEnable stfclock(4) and make xhci(4) attach to fdt.
kettenis [Tue, 7 Jun 2022 18:55:55 +0000 (18:55 +0000)]
Enable stfclock(4) and make xhci(4) attach to fdt.

2 years agoFix format strings: change %i, %li, %lli to %d, %ld, %lld and switch to
tb [Tue, 7 Jun 2022 18:00:51 +0000 (18:00 +0000)]
Fix format strings: change %i, %li, %lli to %d, %ld, %lld and switch to
%zu for master_key_length, session_id_length and sid_ctx_length, which
are now size_t.

2 years agoChange the loop index from an unsigned int to size_t now that all
tb [Tue, 7 Jun 2022 17:55:08 +0000 (17:55 +0000)]
Change the loop index from an unsigned int to size_t now that all
upper bounds are known to be size_t.

ok jsing

2 years agoSimplify another CBS_write_bytes() call in d2i_SSL_SESSION()
tb [Tue, 7 Jun 2022 17:53:42 +0000 (17:53 +0000)]
Simplify another CBS_write_bytes() call in d2i_SSL_SESSION()

ok jsing

2 years agoSwitch sid_ctx_length in SSL, SSL_CTX and SSL_SESSION to a size_t
tb [Tue, 7 Jun 2022 17:52:00 +0000 (17:52 +0000)]
Switch sid_ctx_length in SSL, SSL_CTX and SSL_SESSION to a size_t

ok jsing

2 years agoUse CBS_write_bytes() instead of manual unpacking of a CBS and assigning
tb [Tue, 7 Jun 2022 17:49:22 +0000 (17:49 +0000)]
Use CBS_write_bytes() instead of manual unpacking of a CBS and assigning
length and using memcpy(). This also provides a missing overflow check
(which is done by the only caller, however).

ok jsing

2 years agoSimplify various CBS_write_bytes() calls
tb [Tue, 7 Jun 2022 17:45:13 +0000 (17:45 +0000)]
Simplify various CBS_write_bytes() calls

Now that session_id_length is a size_t, we can pass it directly to
CBS_write_bytes() instead of using a temporary variable.

ok jsing

2 years agoSwitch SSL_SESSION's session_id_length to a size_t
tb [Tue, 7 Jun 2022 17:42:35 +0000 (17:42 +0000)]
Switch SSL_SESSION's session_id_length to a size_t

ok jsing

2 years agoAdd missing error check call in ssl3_get_new_session_ticket()
tb [Tue, 7 Jun 2022 17:39:16 +0000 (17:39 +0000)]
Add missing error check call in ssl3_get_new_session_ticket()

EVP_Digest() can fail, so handle failure appropriately and prepare
switch of session_id_length to a size_t.

ok jsing

2 years agoAnother small readability tweak: compare explicitly against 0 and NULL,
tb [Tue, 7 Jun 2022 17:35:49 +0000 (17:35 +0000)]
Another small readability tweak: compare explicitly against 0 and NULL,
respectively

ok jsing

2 years agoTweak readability of a test: compare tmp explicitly against 0 and drop
tb [Tue, 7 Jun 2022 17:32:53 +0000 (17:32 +0000)]
Tweak readability of a test: compare tmp explicitly against 0 and drop
redundant parentheses.

ok jsing

2 years agoAdd a cast to SSL_SESSION_get_id() to indicate that session_id_length
tb [Tue, 7 Jun 2022 17:31:36 +0000 (17:31 +0000)]
Add a cast to SSL_SESSION_get_id() to indicate that session_id_length
is deliberately reduced to an unsigned int. Since the session_id is at
most 32 bytes, this is not a concern.

ok jsing

2 years agofix indent
tb [Tue, 7 Jun 2022 17:28:05 +0000 (17:28 +0000)]
fix indent

2 years agoUnindent and simplify remove_session_lock()
tb [Tue, 7 Jun 2022 17:26:39 +0000 (17:26 +0000)]
Unindent and simplify remove_session_lock()

ok jsing (who informs me he had the same diff in his jungle)

2 years agoDrop an unnecessary cast
tb [Tue, 7 Jun 2022 17:22:22 +0000 (17:22 +0000)]
Drop an unnecessary cast

ok jsing

2 years agoSimplify CBS_write_bytes() invocation
tb [Tue, 7 Jun 2022 17:20:26 +0000 (17:20 +0000)]
Simplify CBS_write_bytes() invocation

Now that master_key_length is a size_t, we no longer have to fiddle with
data_len. We can rather pass a pointer to it to CBS_write_bytes().

ok jsing

2 years agoThe master_key_length can no longer be < 0
tb [Tue, 7 Jun 2022 17:19:09 +0000 (17:19 +0000)]
The master_key_length can no longer be < 0

ok jsing

2 years agoSwitch the SSL_SESSION's master_key_length to a size_t
tb [Tue, 7 Jun 2022 17:18:21 +0000 (17:18 +0000)]
Switch the SSL_SESSION's  master_key_length to a size_t

ok jsing

2 years agoAdd error checking to tls_session_secret_cb() calls
tb [Tue, 7 Jun 2022 17:14:17 +0000 (17:14 +0000)]
Add error checking to tls_session_secret_cb() calls

Failure of this undocumented callback was previously silently ignored.
Follow OpenSSL's behavior and throw an internal error (for lack of a
better choice) if the callback failed or if it set the master_key_length
to a negative number.

Unindent the success path and clean up some strange idioms.

ok jsing