CVS: cvs.openbsd.org: src

2021-11-22 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 23:58:36

Modified files:
share/man/man5 : resolv.conf.5 

Log message:
nameserver->name server, as the rest of the file does;



Re: CVS: cvs.openbsd.org: src

2021-11-22 Thread Anton Lindqvist
On Sun, Nov 21, 2021 at 03:15:52AM -0700, Marc Espie wrote:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   es...@cvs.openbsd.org   2021/11/21 03:15:52
> 
> Modified files:
>   usr.sbin/pkg_add/OpenBSD: PkgSpec.pm 
> 
> Log message:
> temporarily reallow "empty" flavor parts so that rsync-- works again
> (I really need to split that code off)

This broke regress:

+ . /usr/local/libexec/robsd/util.sh
+ . /usr/local/libexec/robsd/util-ports.sh
+ . /usr/local/libexec/robsd/util-regress.sh
+ regress_root usr.sbin/pkg_add
+ unpriv anton exec make -C /home/src/regress/usr.sbin/pkg_add
 pkgnames 
perl -I /home/src/regress/usr.sbin/pkg_add 
/home/src/regress/usr.sbin/pkg_add/check-name
1..26
ok 1 - flavor with number
ok 2 - before 1.0p0 came 1.0
ok 3 - 1.0 and 1.0p0 both match <=1.0p0
ok 4 - any 1.0p* matches 1.0
ok 5 - before 1.0 came 1.0rc2
ok 6 - before 1.0pl1 came 1.0
ok 7 - simple stem lookup
ok 8 - simple stem lookup with several results
ok 9 - stem lookup, no duplicates
ok 10 - stem lookup with flavor
ok 11 - complicated stem matching
ok 12 - bogus stem matching with no version
ok 13 - stem matching with no version
ok 14 - canonical names
ok 15 - invalid spec
ok 16 - pkgname without version
ok 17 - numerical flavor
ok 18 - mixed up vp
ok 19 - correct name
ok 20 - check order
ok 21 - standard spec
ok 22 - invalid spec stem->=*
ok 23 - invalid spec stem-*.3
not ok 24 - empty flavor spec
#   Failed test 'empty flavor spec'
#   at /home/src/regress/usr.sbin/pkg_add/check-name line 134.
ok 25 - empty stem
ok 26 - branch specifier not okay in specs
# Looks like you failed 1 test of 26.
*** Error 1 in . (Makefile:53 'pkgnames')
FAILED



CVS: cvs.openbsd.org: src

2021-11-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/11/22 21:11:06

Modified files:
distrib/sets/lists/comp: mi 
distrib/sets/lists/man: mi 

Log message:
sync



CVS: cvs.openbsd.org: src

2021-11-22 Thread Kevin Lo
CVSROOT:/cvs
Module name:src
Changes by: ke...@cvs.openbsd.org   2021/11/22 18:44:44

Modified files:
sys/dev/pci: if_rge.c 

Log message:
Fix mbuf leaks after reception error in rge_rxeof().

Being that rge(4) is derived from re(4) it looks like it has the same
issues as fixed in re(4) rev 1.211.

>From Brad
ok gnezdo@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/11/22 18:14:26

Modified files:
regress/sys/kern/poll: Makefile 
Added files:
regress/sys/kern/poll: pollretval.c 

Log message:
A weird little test which can expose buggy return value conditions in poll()



CVS: cvs.openbsd.org: src

2021-11-22 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/11/22 18:03:35

Modified files:
sys/arch/arm64/arm64: cpu.c 

Log message:
limit a variable to the scope inside #ifdef where it is used



CVS: cvs.openbsd.org: src

2021-11-22 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 17:17:59

Modified files:
sys/dev/ic : tea5757.c 
sys/dev/pci: fmsradio.c 

Log message:
avoid clang -Wsometimes-uninitialized warnings in fms(4)
feedback and ok millert@



CVS: cvs.openbsd.org: src

2021-11-22 Thread joshua stein
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 15:12:37

Modified files:
sys/dev/usb: ubcmtp.c 

Log message:
use ISC license for ubcmtp



CVS: cvs.openbsd.org: src

2021-11-22 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2021/11/22 13:51:48

Modified files:
sbin/iked  : ikev2.c 

Log message:
MOBIKE is RFC 4555.



CVS: cvs.openbsd.org: src

2021-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/11/22 13:25:50

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

Log message:
Enable iicmux(4) and pcyrtc(4).



CVS: cvs.openbsd.org: src

2021-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/11/22 13:24:41

Modified files:
share/man/man4 : Makefile iic.4 
Added files:
share/man/man4 : pcyrtc.4 

Log message:
pcyrtc(4)



CVS: cvs.openbsd.org: src

2021-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/11/22 13:20:20

Modified files:
sys/dev/i2c: files.i2c 
Added files:
sys/dev/i2c: pcf85063.c 

Log message:
Add pcyrtc(4), a driver for the NXP PCF85063A/TP RTC chips.

ok patrick@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/11/22 13:19:23

Modified files:
sys/dev/i2c: pcf8523.c pcf8563.c 

Log message:
Remove unused header files and make some cosmetic changes.

ok patrick@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 13:18:27

Modified files:
include: resolv.h 
lib/libc/net   : res_init.3 
share/man/man5 : resolv.conf.5 
lib/libc/asr   : asr.c asr_debug.c res_mkquery.c 
 res_send_async.c 

Log message:
Implement rfc6840 (AD flag processing) if using trusted name servers

libc can't do DNSSEC validation but it can ask a "security-aware"
resolver to do so.  Let's send queries with the AD flag set when
appropriate, and let applications look at the AD flag in responses in
a safe way, ie clear the AD flag if the resolvers aren't trusted.
By default we only trust resolvers if resolv.conf(5) only lists name
servers on localhost - the obvious candidates being unwind(8) and
unbound(8).  For non-localhost resolvers, an admin who trusts *all the
name servers* listed in resolv.conf(5) *and the network path leading to
them* can annotate this with "options trust-ad".

AD flag processing gives ssh -o VerifyHostkeyDNS=Yes a chance to fetch
SSHFP records in a secure manner, and tightens the situation for other
applications, eg those using RES_USE_DNSSEC for DANE.  It should be
noted that postfix currently assumes trusted name servers by default and
forces RES_TRUSTAD if available.

RES_TRUSTAD and "options trust-ad" were first introduced in glibc by
Florian Weimer.  Florian Obser (florian@) contributed various
improvements, fixed a bug and added automatic trust for name servers on
localhost.

ok florian@ phessler@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 12:32:32

Modified files:
lib/libcrypto/man: ASN1_NULL_new.3 

Log message:
Fix typo

thanks Matthias Schmidt



CVS: cvs.openbsd.org: src

2021-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/11/22 12:22:59

Modified files:
sys/arch/arm64/arm64: cpu.c 
sys/arch/arm64/include: cpu.h 

Log message:
Hack alert!  Apple M1 systems still don't work with an MP kernel.
In order to make progress (and protect myself from things dumping cores
left and right when I run sysupgrade) abuse the hw.smt mechanism to
only schedule processes on the primary CPU.

ok deraadt@, patrick@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/11/22 11:42:16

Modified files:
regress/sys/kern/futex: futex.c 

Log message:
Add regress test for futexes in shared anonymous memory.

ok mpi@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2021/11/22 10:15:05

Modified files:
sys/kern   : sys_generic.c 

Log message:
Revert poll(2) back to the original implementation

The translation to and from kqueue still has major shortcomings.

Discussed with deraadt@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/22 09:19:54

Modified files:
lib/libcrypto/man: ASN1_item_new.3 Makefile d2i_ASN1_NULL.3 
Added files:
lib/libcrypto/man: ASN1_NULL_new.3 

Log message:
new manual page ASN1_NULL_new(3), also documenting ASN1_NULL_free(3)



CVS: cvs.openbsd.org: src

2021-11-22 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2021/11/22 07:59:03

Modified files:
sys/kern   : sys_generic.c 

Log message:
Translate POLLNVAL in ppollcollect()

This makes the kqueue-based poll(2) behave more similarly to the old
code when a monitored file descriptor is closed by another thread.

OK mpi@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2021/11/22 07:57:17

Modified files:
sys/kern   : sys_futex.c 

Log message:
Let futex_wait() run without kernel lock

The KERNEL_LOCK() is no longer necessary with rwsleep() and PCATCH
because the sleep machinery now does the locking internally.

OK mpi@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 07:00:52

Modified files:
sys/dev/pci: if_igc.c 

Log message:
avoid uninitialised variable use in igc(4)

read icr reg before testing bit in result
add missing block in rxeof from ix

ok kevlo@ patrick@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/22 07:00:27

Modified files:
lib/libcrypto/man: ASN1_OBJECT_new.3 Makefile d2i_ASN1_OBJECT.3 
Added files:
lib/libcrypto/man: a2d_ASN1_OBJECT.3 

Log message:
new manual page a2d_ASN1_OBJECT(3);
while here, add a few STANDARDS references



CVS: cvs.openbsd.org: src

2021-11-22 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2021/11/22 06:47:10

Modified files:
sys/netinet: ip_input.c 
sys/netinet6   : ip6_forward.c 

Log message:
Copy code from ip_forward() to ip6_forward() to fix Path MTU discovery
in IPsec IPv6 tunnel.  Implement sending ICMP6 packet too big
messages.  Also implement the pf error case in ip6_forward().  While
there, do some cleanup and make the IPv4 and IPv6 code look similar.
OK tobhe@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/11/22 05:56:04

Modified files:
sys/net: pf_table.c 

Log message:
move PFR_TFLAG_CONST test, missed in rev 1.138
prompted by uninitialised var found by bluhm@ running regress on sparc64
ok sashan@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2021/11/22 05:55:40

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

Log message:
vmm(4): copyout guest state on VM_EXIT_NONE

Partly related to a bug reported by kn@. We should be copying out
the guest exit state (including registers) when we succesfully
return from the vcpu run loop even if we don't require an emulation
assist from userland/vmd(8). This condition was introduced when I
removed the use of yield() and instead exit the kernel if the
scheduler says we've hogged the cpu.

ok mlarkin@



Re: CVS: cvs.openbsd.org: src

2021-11-22 Thread Marcus Glocker
On Mon, Nov 22, 2021 at 03:17:14AM -0700, Marcus Glocker wrote:

> CVSROOT:  /cvs
> Module name:  src
> Changes by:   mgloc...@cvs.openbsd.org2021/11/22 03:17:14
> 
> Modified files:
>   sys/dev/usb: ehci.c if_athn_usb.c if_otus.c if_run.c 
>if_wi_usb.c if_zyd.c ohci.c uaudio.c udl.c 
>uhci.c umass_scsi.c utvfu.c uvideo.c xhci.c 
> 
> Log message:
> Align memory allocation for USB device drivers and USB HC drivers:
> 
> * USB device drivers use M_USBDEV instead of M_DEVBUF.
> * USB HC drivers use M_USBHC instead of M_DEVBUF.
> 
> In a vanilla setup, this enlarges the USB memory pool.
> 
> ok anton@

Post ok mpi@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/11/22 05:06:51

Modified files:
lib/libcrypto/man: ASN1_OBJECT_new.3 

Log message:
document ASN1_OBJECT_create(3)



CVS: cvs.openbsd.org: src

2021-11-22 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2021/11/22 04:46:11

Modified files:
sys/dev/usb: ehci.c 

Log message:
M_USB -> M_USBHC



CVS: cvs.openbsd.org: src

2021-11-22 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2021/11/22 04:30:16

Modified files:
sys/dev/usb: uhidev.c uhidev.h 

Log message:
Drop the old problematic claim multiple report ids logic now that all
uhidev drivers have been fixed.



CVS: cvs.openbsd.org: src

2021-11-22 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2021/11/22 04:29:18

Modified files:
sys/dev/usb: ukbd.c ums.c umstc.c utpms.c uwacom.c 

Log message:
Add missing claim multiple report ids conditionals to uhidev drivers.



CVS: cvs.openbsd.org: src

2021-11-22 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2021/11/22 04:17:39

Modified files:
share/man/man5 : bsd.port.mk.5 

Log message:
explain about the new defaults for PKGNAME-sub



CVS: cvs.openbsd.org: src

2021-11-22 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2021/11/22 04:07:50

Modified files:
share/man/man5 : bsd.port.mk.5 

Log message:
gc parts that reference "describe"



CVS: cvs.openbsd.org: src

2021-11-22 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/11/22 04:01:12

Modified files:
sys/dev/pci: if_iwx.c 

Log message:
Make iwx(4) update an Rx BA session's last_rx timestamp when a frame
is received which matches the session.

Same change as just made in iwm(4).



CVS: cvs.openbsd.org: src

2021-11-22 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/11/22 04:00:50

Modified files:
sys/dev/pci: if_iwm.c 

Log message:
Make iwm(4) update an Rx BA session's last_rx timestamp when a frame
is received which matches the session.

Tested by myself and bket@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/11/22 03:54:36

Modified files:
sys/dev/pci: if_iwx.c if_iwxvar.h 

Log message:
Let iwx(4) use per-Tx-queue interface timers to ensure that the interface
watchdog will trigger a device timeout if a particular Tx queue gets stuck
while other Tx queues keep working.

The Linux driver is using a similar workaround for "stuck queues".

Tested by myself and jmc@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/11/22 03:47:55

Modified files:
sys/dev/pci: if_iwx.c 

Log message:
In iwx(4), fix off-by-one errors during TID value bounds checks.

The TID is used as an array index and, according to the Linux driver,
must be smaller than IWX_MAX_TID_COUNT (8). The AP might request an Rx
aggregation session using TID 8. Our driver uses the TID as an index into
an array of IEEE80211_NUM_TID (16) elements, and hence would not crash.
However, the index is exposed to firmware which could potentially crash
or raise an assertion failure for values >= 8.

ok kettenis@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/11/22 03:31:58

Modified files:
sys/dev/pci: if_iwxreg.h if_iwxvar.h 

Log message:
Fix iwx(4) Tx ring array size which was one entry too short.

Fortunately, this bug was harmless. The last Tx agg queue is never used
because ieee80211_classify() only returns TID values in the range 0 - 3.
And iterations over the txq array use nitems() to find the upper bound.

The possiblity of shrinking the txq array by 4 elements to get rid of
unused Tx agg queues could be investigated later.
For now, just fix the off-by-one error.

ok kettenis@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/11/22 03:23:42

Modified files:
sys/dev/pci: if_iwm.c 

Log message:
Let iwm(4) resume directly in DVACT_WAKEUP instead of running the init task.

Same change as made for iwx(4) some time ago.

tested by myself and bket@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Marcus Glocker
CVSROOT:/cvs
Module name:src
Changes by: mgloc...@cvs.openbsd.org2021/11/22 03:17:14

Modified files:
sys/dev/usb: ehci.c if_athn_usb.c if_otus.c if_run.c 
 if_wi_usb.c if_zyd.c ohci.c uaudio.c udl.c 
 uhci.c umass_scsi.c utvfu.c uvideo.c xhci.c 

Log message:
Align memory allocation for USB device drivers and USB HC drivers:

* USB device drivers use M_USBDEV instead of M_DEVBUF.
* USB HC drivers use M_USBHC instead of M_DEVBUF.

In a vanilla setup, this enlarges the USB memory pool.

ok anton@



CVS: cvs.openbsd.org: src

2021-11-22 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/11/22 01:26:08

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

Log message:
acme-client: use BIO_number_written(bio) instead of bio->num_write.
Avoid awkward line wrapping by removing awkward else if chaining.

ok claudio florian