CVS: cvs.openbsd.org: src

2022-11-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/10 00:08:02

Modified files:
sys/arch/sparc64/sparc64: clock.c 

Log message:
Convert sparc64 clock event counter to per-cpu and increment using
evcount_inc() rather than atomic operations.

ok kettenis@ jca@ cheloha@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2022/11/10 00:05:41

Modified files:
share/man/man9 : evcount.9 
sys/kern   : init_main.c subr_evcount.c 
sys/sys: evcount.h 

Log message:
Add support for per-cpu event counters, to be used for clock and IPI
counters where the event being counted occurs across all CPUs in the
system.  Counter instances can be made per-cpu by calling evcount_percpu()
after the counter is attached, and this can occur before or after all system
CPUs are attached.  Per-cpu counter instances should be incremented using
evcount_inc().

ok kettenis@ jca@ cheloha@



CVS: cvs.openbsd.org: src

2022-11-09 Thread ASOU Masato
CVSROOT:/cvs
Module name:src
Changes by: a...@cvs.openbsd.org2022/11/09 19:47:52

Modified files:
sys/dev/pv : xenstore.c 

Log message:
Return error number instead of call panic().

ok mpi@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Moritz Buhl
CVSROOT:/cvs
Module name:src
Changes by: mb...@cvs.openbsd.org   2022/11/09 17:44:12

Modified files:
usr.sbin/relayd: ca.c 

Log message:
In case RSA_meth_new fails, errstr would be passed to fatalx without
initialization.
OK tb



CVS: cvs.openbsd.org: src

2022-11-09 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/11/09 17:14:11

Modified files:
sys/kern   : kern_pledge.c 

Log message:
fix build after 1.298



CVS: cvs.openbsd.org: src

2022-11-09 Thread Moritz Buhl
CVSROOT:/cvs
Module name:src
Changes by: mb...@cvs.openbsd.org   2022/11/09 17:00:11

Modified files:
usr.sbin/relayd: relayd.c 

Log message:
always call va_end.
ok tb



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joshua Sing
CVSROOT:/cvs
Module name:src
Changes by: jos...@cvs.openbsd.org  2022/11/09 16:33:08

Modified files:
lib/libcrypto  : Makefile 

Log message:
Start migrating to one source file per line.

ok jsing@ tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/11/09 16:28:09

Modified files:
regress/lib/libcrypto/bn/general: Makefile bn_primes.c 

Log message:
Remove prime_t remnant and link bn_primes test statically



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 16:14:51

Modified files:
lib/libssl : bytestring.h 

Log message:
Sync CBS_strdup() documentation update from libcrypto.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Alexandr Nedvedicky
CVSROOT:/cvs
Module name:src
Changes by: sas...@cvs.openbsd.org  2022/11/09 16:00:01

Modified files:
sbin/pfctl : pfctl_parser.c 
share/man/man5 : pf.conf.5 
sys/net: pf.c pf_ioctl.c pfvar.h 

Log message:
simplify expiration of 'once' rules.
let packet to mark 'once' rule as expired. The rule
will be removed by pfctl(8) when rules are updated.

OK kn@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2022/11/09 15:56:44

Modified files:
sys/dev/fdt: gpiobl.c simplefb.c 

Log message:
Hook up gpiobl(4) to the screen burner instead of wsdisplay(4) brightness
control. This enables automatic screen blanking with X and wscons(4) once
wsfb(4) is fixed.

"this is fine for now" kettenis@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/11/09 15:52:51

Modified files:
lib/libcrypto  : Makefile 
lib/libcrypto/bn: bn_prime.c bn_prime.h bn_prime.pl 
Added files:
lib/libcrypto/bn: bn_small_primes.c 

Log message:
Move table in bn_primes.h to a .c file and get rid of prime_t

This way we deduplicate two inclusions of the same big table and eliminate
lots of stupid casts.

input and ok many



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 15:25:36

Modified files:
sys/kern   : kern_event.c 

Log message:
Remove kernel lock here since msleep() with PCATCH no longer requires it.
OK mpi@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 15:25:27

Modified files:
sbin/disklabel : editor.c 

Log message:
No more xd/xy devs.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/11/09 15:25:08

Modified files:
sys/kern   : kern_pledge.c 

Log message:
Some limited setsockopt/getsockopt are allowed in pledge "stdio".
Also allow IPPROTO_TCP:TCP_NODELAY
It is very small kernel code, and will allow some software to drop "inet"
requested by djm



CVS: cvs.openbsd.org: src

2022-11-09 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 15:18:55

Modified files:
etc/etc.alpha  : MAKEDEV 
etc/etc.amd64  : MAKEDEV 
etc/etc.arm64  : MAKEDEV 
etc/etc.armv7  : MAKEDEV 
etc/etc.hppa   : MAKEDEV 
etc/etc.i386   : MAKEDEV 
etc/etc.landisk: MAKEDEV 
etc/etc.loongson: MAKEDEV 
etc/etc.luna88k: MAKEDEV 
etc/etc.macppc : MAKEDEV 
etc/etc.octeon : MAKEDEV 
etc/etc.powerpc64: MAKEDEV 
etc/etc.riscv64: MAKEDEV 
etc/etc.sparc64: MAKEDEV 
share/man/man8/man8.alpha: MAKEDEV.8 
share/man/man8/man8.amd64: MAKEDEV.8 
share/man/man8/man8.arm64: MAKEDEV.8 
share/man/man8/man8.armv7: MAKEDEV.8 
share/man/man8/man8.hppa: MAKEDEV.8 
share/man/man8/man8.i386: MAKEDEV.8 
share/man/man8/man8.landisk: MAKEDEV.8 
share/man/man8/man8.loongson: MAKEDEV.8 
share/man/man8/man8.luna88k: MAKEDEV.8 
share/man/man8/man8.macppc: MAKEDEV.8 
share/man/man8/man8.octeon: MAKEDEV.8 
share/man/man8/man8.powerpc64: MAKEDEV.8 
share/man/man8/man8.riscv64: MAKEDEV.8 
share/man/man8/man8.sparc64: MAKEDEV.8 

Log message:
Regen



CVS: cvs.openbsd.org: xenocara

2022-11-09 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2022/11/09 15:17:12

Modified files:
.  : MODULES 3RDPARTY 

Log message:
update



CVS: cvs.openbsd.org: src

2022-11-09 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/11/09 15:15:51

Modified files:
sys/net: if.c 

Log message:
revert r1.673: replace SRP with SMR in the if_idxmap.

if the map has to be reallocated during boot, there's an smr_barrier
waiting for the old map to become unused. that barrier ends up
waiting for cpus that aren't running yet because we haven't finished
booting yet, so boot gets stuck.

found by hrvoje popovski



CVS: cvs.openbsd.org: src

2022-11-09 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 15:12:40

Modified files:
sys/dev/fdt: simplefb.c 

Log message:
Constify simplefb_formats[]; OK patrick



CVS: cvs.openbsd.org: xenocara

2022-11-09 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2022/11/09 14:55:15

Modified files:
app/xterm  : MANIFEST NEWS button.c charproc.c doublechr.c 
 fontutils.c fontutils.h main.c misc.c screen.c 
 version.h xterm.appdata.xml xterm.h 
 xterm.log.html 
app/xterm/package: xterm.spec 
app/xterm/package/debian: changelog 
app/xterm/package/freebsd: Makefile 
app/xterm/package/pkgsrc: Makefile 

Log message:
Update xterm to version 375. ok tb@
and also tested by Walter Alejandro Iglesias



CVS: cvs.openbsd.org: src

2022-11-09 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2022/11/09 13:00:05

Modified files:
sys/arch/arm64/conf: GENERIC RAMDISK 

Log message:
Enable qcpwm(4)

ok kettenis@ mlarkin@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2022/11/09 12:59:38

Modified files:
sys/dev/fdt: files.fdt 
Added files:
sys/dev/fdt: qcpwm.c 

Log message:
Add qcpwm(4), a driver for the PWM found on Qualcomm PMICs.  This is used
on the Lenovo x13s to control the display backlight brightness.

ok kettenis@ mlarkin@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/11/09 12:50:25

Modified files:
libexec/ld.so  : loader.c 

Log message:
Now that dlopen() sets object->nodelete for RTLD_NODELETE, _dl_load_dep_libs()
can consider this same as the "booting" case, and instruct lower layers to
do immutability. With this change in place, the not-yet-commited
library-immutable diff leaves 1 page of libc (malloc related) and 6
non-RTLD_NODELETE libraries mutable in chrome.
Everything else is immutable, except for the program's transient memory
allocations & file mappings.  This is an unexpected result.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 12:35:24

Modified files:
etc/etc.amd64  : MAKEDEV.md 
etc/etc.arm64  : MAKEDEV.md 
etc/etc.armv7  : MAKEDEV.md 
etc/etc.hppa   : MAKEDEV.md 
etc/etc.i386   : MAKEDEV.md 
etc/etc.landisk: MAKEDEV.md 
etc/etc.loongson: MAKEDEV.md 
etc/etc.macppc : MAKEDEV.md 
etc/etc.sparc64: MAKEDEV.md 

Log message:
Remove xy/xd. SMD left with sparc.

ok kn@ deraadt@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2022/11/09 12:25:50

Modified files:
sys/dev/fdt: qcpmicgpio.c 

Log message:
Move input/output configuration into the correct function.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 12:18:08

Modified files:
lib/libcrypto/evp: evp.h 

Log message:
Fix up indentation for EVP_PKEY_* defines.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/11/09 12:18:11

Modified files:
sys/arch/arm64/arm64: intr.c 
sys/arch/arm64/dev: aplintc.c aplmbox.c aplns.c aplrtk.c 
aplsmc.c rtkit.c rtkit.h 
sys/arch/arm64/include: intr.h 
sys/dev/ofw: ofw_misc.h 

Log message:
Implement wakeup interrupt support.  For now this is only implemented for
aplintc(4); other arm64 interrupt controllers will follow.

ok patrick@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Moritz Buhl
CVSROOT:/cvs
Module name:src
Changes by: mb...@cvs.openbsd.org   2022/11/09 12:11:14

Modified files:
usr.sbin/acme-client: netproc.c 

Log message:
nreq could leak a http get request in case a redirect without
location header was received.
OK deraadt



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 12:05:42

Modified files:
lib/libcrypto/bytestring: bytestring.h 

Log message:
Revise CBS_strdup() documentation.

CBS_strdup() now internally checks if the data contains NUL, failing if it
does.

Prompted by beck@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Moritz Buhl
CVSROOT:/cvs
Module name:src
Changes by: mb...@cvs.openbsd.org   2022/11/09 11:48:11

Modified files:
usr.sbin/apm   : apm.c 

Log message:
In do_zzz a garbage stack value could be accessed in case a read
or write in send_command failed.
Found by codechecker.
OK deraadt



CVS: cvs.openbsd.org: src

2022-11-09 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 11:46:04

Modified files:
etc: MAKEDEV.common 

Log message:
Remove xy/xd. SMD left with sparc.

ok kn@ deraadt@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/11/09 11:44:12

Modified files:
libexec/ld.so  : dlfcn.c 

Log message:
dlopen() with RTLD_NODELETE should also set the object nodelete flag,
so the mapping layer will know it can use mimmutable()



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2022/11/09 11:39:35

Modified files:
libexec/ld.so/arm: ld.script 

Log message:
Since the introduction of automatic immutable from the kernel, the munmap()
of ld.so boot.text region is now (silently) failing because the region is
contained within the text LOAD, which is immutable.  So create a new btext
LOAD with flags PF_X|PF_R|PF_OPENBSD_MUTABLE, and place all boot.text objects
in there.  This LOAD must also be page-aligned so it doesn't skip unmapping
some of the object region, previously it was hilariously unaligned.
ok kettenis and guenther seemed to like it also
This one is for 32-bit arm, tested by phessler



CVS: cvs.openbsd.org: xenocara

2022-11-09 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2022/11/09 11:33:42

Modified files:
lib/libpciaccess/src: openbsd_pci.c 

Log message:
Fix running totally unprivileged with startx(1).
Issue reported by Walter Alejandro Iglesias.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 11:25:36

Modified files:
lib/libcrypto/evp: pmeth_lib.c 

Log message:
Clean up EVP_PKEY_METHOD related tables and code.

This is effectively the same as done for EVP_PKEY_ASN1_METHOD, although
this table only has nine entries.

ok tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2022/11/09 11:17:23

Modified files:
usr.sbin/rpki-client: roa.c 

Log message:
Error out if a ROA payload contains too many ipAddrBlocks

The ASN.1 profile in draft-ietf-sidrops-rfc6482bis section 4 specifies
that there must not be more than 2 ipAddrBlocks (one for IPv4, and one
for IPv6). Compatible with all published ROAs.

OK tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 11:17:17

Modified files:
lib/libcrypto/asn1: ameth_lib.c 

Log message:
Clean up EVP_PKEY_ASN1_METHOD related tables and code.

Rather than messing around with an OBJ_bsearch() for a table that contains
16 entries (and a stack find for any application added methods), simply do
a reverse linear scan. This maintains the application method first
behaviour, while removing a chunk of code.

While here rename some variables and do some style clean up.

ok tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/11/09 11:17:00

Modified files:
sys/arch/arm64/dev: aplns.c rtkit.c rtkit.h 

Log message:
Add suspend/resume support to aplns(4).

ok dlg@, patrick@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 11:12:47

Modified files:
sys/kern   : spec_vnops.c 

Log message:
Simplify the overly complex VXLOCK handling in spec_close.
The code only needs to know if the vnode is exclusive locked and this
can be done on entry of the function.
OK mpi@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Bob Beck
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2022/11/09 11:11:45

Modified files:
regress/lib/libc/time/time_conversion: timetest.c 

Log message:
Add tests for boundary conditions of struct tm.

Struct tm is limited by it's year being an int.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 11:00:02

Modified files:
sbin/route : show.c 
usr.bin/netstat: show.c 
usr.sbin/ndp   : ndp.c 

Log message:
ndp, route, netstat: adjust ipv6 address width

It has been annoying me for too long that fully specififed GUAs
(2001:0db8::::::) mess up alignment.

systat(1)'s netstat is the only view that has a big enough limit and thus
never misaligns.

Unify ndp(8), route(8) and netstat(1) views to always align nicely.

Feedback OK claudio



CVS: cvs.openbsd.org: src

2022-11-09 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/11/09 10:53:12

Modified files:
sys/arch/amd64/amd64: vmm.c 
sys/arch/amd64/include: vmmvar.h 

Log message:
vmm(4): treat vcpu lists as immutable, reducing complexity.

Since vmm doesn't support hot-plug vcpus we can reduce complexity
by treating the vcpu list per vm as immutable after creation.

As a consequence, we can use the vm reference count to protect the
lifetime of the vcpus, removing the need for reference counting
individual vcpu objects. With an immutable list, we no longer need
a rwlock protecting it either.

Original diff from dlg@ that I reworked and tested.

ok dlg@, mlarkin@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 10:49:54

Modified files:
regress/lib/libcrypto/curve25519: ed25519test.c 

Log message:
Revise ED25519 regress following API changes.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 10:45:55

Modified files:
lib/libcrypto/curve25519: curve25519.c curve25519_internal.h 

Log message:
Make X25519_public_from_private() internally reachable.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 10:41:05

Modified files:
usr.bin/ftp: fetch.c 

Log message:
Before printing the redirect URI pass it through stravis since it is
untrusted input.
OK tb@ kn@ millert@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 10:40:51

Modified files:
lib/libcrypto/curve25519: curve25519.c 

Log message:
Rename public_value to public_key for consistency.

ok tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 10:39:29

Modified files:
lib/libcrypto/curve25519: curve25519.c curve25519.h 
  curve25519_internal.h 

Log message:
Rework ED25519 API.

BoringSSL implemented a compound private key, which includes a copy of the
public key as a performance optimisation for signing. However, this does
not readily match with how EVP works, makes the ED25519 API inconsistent
with the X25519 API, diverges from th RFC and does not align with the
OpenSSL API. Instead, the caller can readily compute the public key and
pass this in to the signing process.

ok tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 10:15:59

Modified files:
regress/lib/libcrypto/evp: evp_test.c 

Log message:
Add some regress coverage for EVP_PKEY_METHOD.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2022/11/09 10:12:50

Modified files:
sys/sys: timeout.h 
sys/kern   : kern_timeout.c 

Log message:
timeout(9): remove TIMEOUT_KCLOCK flag

I never should have added the TIMEOUT_KCLOCK flag.  It is redundant
and only serves to complicate the timeout(9) logic.  In every place
where we check for the flag we can just use timeout.to_kclock.

So, remove the flag from  and rewrite all affected
logic to use the value of timeout.to_kclock instead.

ok kn@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 10:03:53

Modified files:
lib/libcrypto/evp: pmeth_lib.c 

Log message:
Sort EVP_PKEY_METHOD externs.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 09:29:58

Modified files:
usr.bin/ftp: fetch.c 

Log message:
Strip spaces at end of header lines and in chunked encoding headers.
HTTP standard allows for spaces in too many places
OK millert@ tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2022/11/09 09:23:51

Modified files:
sys/arch/arm64/dev: aplpmgr.c 

Log message:
Make aplpmgr(4) work as a reset controller.

ok patrick@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 09:14:15

Modified files:
lib/libcrypto/asn1: ameth_lib.c 

Log message:
Sort EVP_PKEY_ASN1_METHOD externs.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2022/11/09 09:13:39

Modified files:
regress/lib/libcrypto/evp: Makefile 
Added files:
regress/lib/libcrypto/evp: evp_test.c 

Log message:
Add some regress coverage for EVP_PKEY_ASN1_METHOD



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/11/09 08:33:13

Modified files:
lib/libcrypto/bn: bn_prime.c 

Log message:
Inline use of bn_is_prime_bpsw()

Instead of using the BN_is_prime_fasttime_ex() API, use a direct call to
bn_is_prime_bpsw(). This increases readability and simplifies error
handling. Also put a division by two to the natural place now that we no
longer need to do Miller-Rabin rounds.

ok beck jsing



CVS: cvs.openbsd.org: src

2022-11-09 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 08:17:28

Modified files:
sbin/disklabel : editor.c 

Log message:
Use nitems() instead of a terminating { NULL, NULL } entry.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 08:01:24

Modified files:
sys/netinet: tcp_usrreq.c 

Log message:
Add missin 'e' in comment.
OK dlg@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 07:31:31

Modified files:
regress/usr.sbin/bgpd/integrationtests: Makefile 

Log message:
Enable l3vpn test



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 07:26:14

Modified files:
usr.sbin/bgpd  : kroute.c 

Log message:
Properly handle L3VPN routes in kroute. This got broken while reworking
large part of the code.
Issue reported and fix tested by Bars Bars tutbaranov (at) gmail.com
OK tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 07:23:53

Modified files:
usr.sbin/bgpd  : util.c 

Log message:
Fix nlri parsing of L3VPN prefixes in withdrawals.

L3VPN NLRI have different encoding for updates and withdraws. The withdraw
carries one dummy MPLS label that needs to be skipped. The code doing that
did adjust the lenght but did not skip the the label in the buffer and so
the parsed prefix was off by 3 bytes.
OK tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2022/11/09 07:20:11

Modified files:
usr.sbin/bgpctl: bgpctl.h output.c output_json.c 

Log message:
Show the MPLS label of a L3VPN route in show fib output.
OK tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2022/11/09 06:46:11

Modified files:
sys/dev/fdt: qcpmicgpio.c 

Log message:
Implement reading/writing pins on qcpmicgpio(4).



CVS: cvs.openbsd.org: src

2022-11-09 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 06:09:30

Modified files:
sys/net: if.c 

Log message:
Recommit r1.669 "Unlock SIOCIFGCLONERS"

OK mvs



CVS: cvs.openbsd.org: src

2022-11-09 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 06:08:36

Modified files:
sys/net: if.c 

Log message:
Push kernel lock from ifioctl() into ifioctl_get()

Recommit these two together:
- r1.667 "Push kernel lock into ifioctl_get()"
locked before the switch() without unlocking in its cases
- r1.668 "Push kernel lock inside ifioctl_get()"
locked cases individually, as intended

I messed up splitting commits, but of course, Hrvoje managed to test a
CVS checkout right inbetween those two.

OK mpi mvs



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joshua Sing
CVSROOT:/cvs
Module name:src
Changes by: jos...@cvs.openbsd.org  2022/11/09 05:13:09

Modified files:
regress/lib/libcrypto/rc2: rc2_test.c 

Log message:
Remove unnecessary sizeof

ok jsing@ tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Joshua Sing
CVSROOT:/cvs
Module name:src
Changes by: jos...@cvs.openbsd.org  2022/11/09 05:10:17

Modified files:
regress/lib/libcrypto/rc4: rc4_test.c 

Log message:
Remove unnecessary sizeof

ok jsing@ tb@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2022/11/09 04:31:51

Modified files:
lib/libcrypto/bn: bn_prime.c 

Log message:
Next pass of bn_prime.c cleanup

Garbage collect a few pointless variables and remove a loop that wasn't
really a loop. Simplify BN_CTX handling and drop some stupid comments.

ok jsing miod



CVS: cvs.openbsd.org: src

2022-11-09 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/11/09 03:41:18

Modified files:
sys/net: if.c 

Log message:
replace SRP with SMR in the if_idxmap.

when i first wrote if_idxmap i didn't realise (and no one thought
to tell me) that index 0 was special and means "no interface", so
while here use the 0th slot in the interface map to store the length
of the map instead of prepending the map with a length field.
if_get() now special cases index 0 and returns NULL directly. this
also means the size of the map is now always a power of 2, which
is a nicer fit with what the kernel malloc aprovides.

tweaks and ok visa@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2022/11/09 03:27:01

Modified files:
sys/kern   : init_sysent.c syscalls.c 
sys/sys: syscall.h syscallargs.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2022-11-09 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2022/11/09 03:26:37

Modified files:
sys/kern   : subr_disk.c 

Log message:
gpt_get_fstype() doesn't modify its parameter so make said
parameter const.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2022/11/09 03:26:28

Modified files:
sys/kern   : syscalls.master 

Log message:
Mark sched_yield(2) as NOLOCK.

All the fields accessed in this syscall are protected by the SCHED_LOCK()
so it isn't necessary to wait for another CPU to release the KERNEL_LOCK()
before that.

ok claudio@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Stuart Henderson
CVSROOT:/cvs
Module name:src
Changes by: st...@cvs.openbsd.org   2022/11/09 03:23:01

Modified files:
sbin/route : route.8 

Log message:
add an example for adding a cloning host route to reach a gateway which is
outside the subnet, some hosting providers use this. info from Eric JACQUOT
ok florian kn phessler



CVS: cvs.openbsd.org: src

2022-11-09 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2022/11/09 03:19:20

Modified files:
sys/arch/amd64/amd64: vmm.c 

Log message:
vmm on !MULTIPROCESSOR kernels should still mark vpus with pending intrs.

the #ifdef MULTIPROCESSOR was a little broad.

still grateful to anton and stsp for unbreaking the tree though.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2022/11/09 03:10:53

Modified files:
usr.sbin/pkg_add: pkg_create.1 

Log message:
document '=' as a pkgspec



CVS: cvs.openbsd.org: src

2022-11-09 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2022/11/09 03:05:18

Modified files:
sys/arch/arm64/dev: aplhidev.c 
sys/dev/hid: hidkbd.c hidkbdsc.h 

Log message:
translate Fn+(1-10,-,=) keys to F1-F12 on M1 laptops with a touchbar

ok kettenis@, miod@



CVS: cvs.openbsd.org: src

2022-11-09 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2022/11/09 03:03:22

Modified files:
sys/dev/usb: usbdevs.h usbdevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2022-11-09 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2022/11/09 03:03:04

Modified files:
sys/dev/usb: usbdevs 

Log message:
add a USB ID for WELLSPRINGM1_J293 to be used by aplhidev(4) to identify
M1 laptops with touchbars



CVS: cvs.openbsd.org: src

2022-11-09 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2022/11/09 02:04:12

Modified files:
usr.bin/ssh: sftp-server.c 

Log message:
Fix typo in fatal error message.  Patch from vapier at chromium.org.



CVS: cvs.openbsd.org: src

2022-11-09 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2022/11/09 02:01:52

Modified files:
usr.bin/ssh: misc.c 

Log message:
Remove errant colon and simplify format string in error messages.
Patch from vapier at chromium.org.