CVS: cvs.openbsd.org: src

2021-07-26 Thread Kevin Lo
CVSROOT:/cvs
Module name:src
Changes by: ke...@cvs.openbsd.org   2021/07/26 19:44:55

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

Log message:
Fix Rx hash type
This matches what Linux and FreeBSD do.

ok jmatthew@



CVS: cvs.openbsd.org: src

2021-07-26 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/07/26 17:17:07

Modified files:
sys/net: pfkeyv2_convert.c 
sys/netinet: ip_ah.c ip_esp.c ip_ipcomp.c ip_ipsp.c 
 ip_ipsp.h ip_output.c ipsec_input.c 
 ipsec_output.c 
sys/netinet6   : ip6_output.c 

Log message:
Use per-CPU counters for tunnel descriptor block (tdb) statistics.
'tdb_data' struct became unused and was removed.

ok bluhm@



CVS: cvs.openbsd.org: src

2021-07-26 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/07/26 16:13:19

Modified files:
sys/arch/riscv64/riscv64: trap.c 

Log message:
Print a few more registers in dump_regs().



CVS: cvs.openbsd.org: src

2021-07-26 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2021/07/26 15:27:57

Modified files:
sys/crypto : crypto.c cryptodev.h 
sys/netinet: ip_ah.c ip_esp.c ip_ipcomp.c ipsec_input.c 
 ipsec_output.c 

Log message:
Do not queue crypto operations for IPsec.  The packet entries in
task queues were unlimited and could overflow during havy traffic.
Even if we still use hardware drivers that sleep, softnet task
instead of soft interrupt can handle this now.  Without queues net
lock is inherited and kernel lock is only needed once per packet.
This results in less lock contention and faster IPsec.
Also protect tdb drop counters with net lock and avoid a leak in
crypto dispatch error handling.
intense testing Hrvoje Popovski; OK mpi@



CVS: cvs.openbsd.org: src

2021-07-26 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2021/07/26 14:44:44

Modified files:
sys/netinet: ip_icmp.c 
sys/netinet6   : icmp6.c 

Log message:
The mbuf header cleanup in revision 1.173 of ip_icmp.c was too
strict.  ICMP error packets generated by pf were not passed
immediately, but could be blocked.  Preserve PF_TAG_GENERATED flag
in icmp_reflect() and icmp6_reflect().
reported by sf@; OK patrick@ kn@



CVS: cvs.openbsd.org: src

2021-07-26 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2021/07/26 14:38:18

Modified files:
regress/sbin/newfs: checknewfs 

Log message:
Fix typo.
from alf schlichting



CVS: cvs.openbsd.org: src

2021-07-26 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/07/26 10:54:20

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

Log message:
Add error checks for i2d_X509_NAME()

This avoids potential malloc(-1) and malloc(0), spotted by schwarze
while documenting X509_ocspid_print().

ok schwarze



CVS: cvs.openbsd.org: src

2021-07-26 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/07/26 10:47:52

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

Log message:
Adjust driver for device tree binding changes.



CVS: cvs.openbsd.org: src

2021-07-26 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2021/07/26 08:15:40

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

Log message:
Fix accounting of the number of frames queued on an iwx(4) Tx ring.

Stop decrementing ring->queued inside the if-statement which guards
maintenance of the OACTIVE flag. This is wrong and resulted in a negative
counter value (visible in firmware error traces). The counter is already
decremented in the loop above where frames are taken off the ring.



CVS: cvs.openbsd.org: src

2021-07-26 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/07/26 08:03:43

Modified files:
lib/libcrypto/man: Makefile POLICYINFO_new.3 X509_new.3 
Added files:
lib/libcrypto/man: X509_policy_tree_level_count.3 

Log message:
new manual page X509_policy_tree_level_count(3)
documenting the X509_POLICY_TREE object and its sub-objects



CVS: cvs.openbsd.org: src

2021-07-26 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/07/26 07:05:14

Modified files:
sbin/fdisk : disk.c disk.h gpt.c mbr.c 

Log message:
Report write() and ioctl() errors encountered when writing GPT or MBR to disk.

Consolidate GPT/MBR read()/write() operations into DISK_writesectors() and
DISK_readsectors(), producing clearer logic and consistent handling of i/o and
errors.

Add some DPRINTF() and #ifdef DEBUG sections to allow more detailed error
reporting when desired.



CVS: cvs.openbsd.org: src

2021-07-26 Thread Stuart Henderson
CVSROOT:/cvs
Module name:src
Changes by: st...@cvs.openbsd.org   2021/07/26 06:59:41

Modified files:
sbin/dhcpleased: dhcpleased.conf.5 

Log message:
small tweaks to dhcpleased.conf(5), ok jmc florian



CVS: cvs.openbsd.org: src

2021-07-26 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/07/26 06:47:47

Modified files:
distrib/alpha/miniroot: Makefile 
distrib/amd64/ramdiskA: Makefile 
distrib/amd64/ramdisk_cd: Makefile 
distrib/arm64/ramdisk: Makefile 
distrib/armv7/ramdisk: Makefile 
distrib/hppa/ramdisk: Makefile 
distrib/i386/ramdisk: Makefile 
distrib/i386/ramdisk_cd: Makefile 
distrib/landisk/ramdisk: Makefile 
distrib/loongson/ramdisk: Makefile 
distrib/luna88k/ramdisk: Makefile 
distrib/macppc/ramdisk: Makefile 
distrib/octeon/ramdisk: Makefile 
distrib/powerpc64/ramdisk: Makefile 
distrib/riscv64/ramdisk: Makefile 
distrib/sparc64/miniroot: Makefile 
distrib/sparc64/ramdisk: Makefile 
distrib/sparc64/ramdiskB: Makefile 

Log message:
Pass make flags to kernel and lib builds

Running `make -j4' in /usr/src/distrib/amd64/ramdisk_cd/ et al. executes
make(1) to both build the RAMDISK kernel and build libraries.

Doing so does not propagate the flags specified to the ramdisk_cd
invocation, which in turn means `-j4' for example is ignored and both kernel
and libraries will not be built in parallel.

Pass make(1)'s MFLAGS along to retain relevant flags;  make is clever enough
to separate flags, variable assignments and targets from each other and only
pass along things to `MFLAGS' that'd make sense, i.e. `make -C. -j4 foo=bar'
does *not* pass `-C.' to change directories.
(can be easily tested with `make -p ... | grep MFLAGS'.)

This makes hacking on ramdisks/the installer much faster, espescially since
the `bsd' target does `make clean' and therefore builds a new kernel every
time.

OK deraadt



CVS: cvs.openbsd.org: src

2021-07-26 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/07/26 05:06:36

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

Log message:
fix an mbuf leak with m_len 0 mbufs

from niklas@ via mikeb@



CVS: cvs.openbsd.org: src

2021-07-26 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2021/07/26 03:26:36

Modified files:
sbin/dhcpleased: Makefile control.c dhcpleased.8 dhcpleased.c 
 dhcpleased.h engine.c frontend.c 
usr.sbin/dhcpleasectl: dhcpleasectl.c parser.c parser.h 
Added files:
sbin/dhcpleased: dhcpleased.conf.5 parse.y printconf.c 

Log message:
Implement possibility to send vendor class identifier (option 60) and
client identifier (option 61). Some dhcp servers expect these options
and refuse to hand out a lease without them.
Need for vendor class identifier pointed out & tested by bket
Need for client identifier pointed out by sthen
Input & reads OK sthen (as part of a larger diff)
OK kn (as part of a larger diff)



CVS: cvs.openbsd.org: src

2021-07-26 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2021/07/26 03:22:00

Modified files:
sbin/dhcpleased: dhcpleased.c 

Log message:
The SIOCAIFADDR ioctl could lose a race against another process
configuring the same IP.
Found the hard way by afresh1



CVS: cvs.openbsd.org: src

2021-07-26 Thread Rafael Sadowski
CVSROOT:/cvs
Module name:src
Changes by: rsadow...@cvs.openbsd.org   2021/07/26 01:37:05

Modified files:
share/man/man5 : port-modules.5 

Log message:
Qt4 cleanup

Drop all references to qt4 and replace by qt5/6.

Tweaks and OK espie@



CVS: cvs.openbsd.org: www

2021-07-26 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:www
Changes by: be...@cvs.openbsd.org   2021/07/26 00:44:28

Modified files:
.  : errata69.html 

Log message:
but 009_bgpd was in June



CVS: cvs.openbsd.org: src

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

Modified files:
sys/dev/pci/drm: drm_linux.c 

Log message:
retry i2c transfers on -EAGAIN up to the number of times specified in
struct i2c_adapter

inteldrm gmbus returns -EAGAIN to fallback to gpio bitbanging



CVS: cvs.openbsd.org: src

2021-07-26 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2021/07/26 00:10:07

Modified files:
lib/libc/arch/mips64/string: Tag: OPENBSD_6_8 strchr.S strrchr.S 

Log message:
On mips64, the strchr/index/strrchr/rindex functions in libc handled
signed characters incorrectly.

Original commit in current:

Modified files:
lib/libc/arch/mips64/string/strchr.S (1.4)
lib/libc/arch/mips64/string/strrchr.S (1.4)

Fix strchr() and strrchr() on mips64

Truncate the character arguments of strchr() and strrchr() to eight bits
so that the implied char conversion would work correctly. Otherwise the
functions would always return NULL when the character argument is
negative.

OK miod@

This is patches/6.8/common/026_strchr.patch.sig



CVS: cvs.openbsd.org: src

2021-07-26 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2021/07/26 00:09:05

Modified files:
lib/libc/arch/mips64/string: Tag: OPENBSD_6_9 strchr.S strrchr.S 

Log message:
On mips64, the strchr/index/strrchr/rindex functions in libc handled
signed characters incorrectly.

Original commit in current:

Modified files:
lib/libc/arch/mips64/string/strchr.S (1.4)
lib/libc/arch/mips64/string/strrchr.S (1.4)

Fix strchr() and strrchr() on mips64

Truncate the character arguments of strchr() and strrchr() to eight bits
so that the implied char conversion would work correctly. Otherwise the
functions would always return NULL when the character argument is
negative.

OK miod@

This is patches/6.9/common/011_strchr.patch.sig



CVS: cvs.openbsd.org: www

2021-07-26 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:www
Changes by: be...@cvs.openbsd.org   2021/07/26 00:08:33

Modified files:
.  : errata68.html 

Log message:
publish errata 026_strchr



CVS: cvs.openbsd.org: www

2021-07-26 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:www
Changes by: be...@cvs.openbsd.org   2021/07/26 00:07:49

Modified files:
.  : errata69.html 

Log message:
publish errata 011_strchr



CVS: cvs.openbsd.org: src

2021-07-26 Thread ASOU Masato
CVSROOT:/cvs
Module name:src
Changes by: a...@cvs.openbsd.org2021/07/26 00:00:37

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

Log message:
Add mtx_enter/mtx_leave in kvp_pool_keys().

ok mikeb