CVS: cvs.openbsd.org: src

2019-06-10 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2019/06/11 00:46:53

Modified files:
sys/dev/pci/drm/ttm: ttm_tt.c 

Log message:
Use km_alloc() instead of mallocarray() when allocating ttm dma segments
to avoid running out of kmem space.  Suggested by and ok kettenis@



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/11 00:28:09

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

Log message:
pass what pci_intr_established returns to intr_barrier

passing a pointer to a pci_intr_handle_t doesnt work too well on
sparc64, where it faults in the guts of the scheduler. dunno why
amd64 is fine.

ok jmatthew@



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/11 00:17:23

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

Log message:
if ifiq_input says there's too much pressure, tell the rxr we're livelocked

ok jmatthew@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Martijn van Duren
CVSROOT:/cvs
Module name:src
Changes by: mart...@cvs.openbsd.org 2019/06/10 23:36:32

Modified files:
usr.sbin/snmpd : parse.y snmpd.conf.5 snmpd.h usm.c 

Log message:
Implement SHA-2 (RFC7860) support for authentication.

OK claudio@, gerhard@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Martijn van Duren
CVSROOT:/cvs
Module name:src
Changes by: mart...@cvs.openbsd.org 2019/06/10 23:33:01

Modified files:
usr.sbin/snmpd : snmpd.h usm.c 

Log message:
The digestlength is not always 12 bytes. Make this value variable in
preparation for SHA-2 support.

OK claudio@, gerhard@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Remi Locherer
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2019/06/10 23:00:09

Modified files:
usr.sbin/ospf6d: ospf6d.h ospfe.c parse.y rde.c 

Log message:
Introduce conf_clear_redist_list() (from ospfd) and use it in all 3 procs.

ok benno@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Jonathan Matthew
CVSROOT:/cvs
Module name:src
Changes by: jmatt...@cvs.openbsd.org2019/06/10 21:55:16

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

Log message:
bump up the ring sizes for dlg@



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 21:22:30

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

Log message:
records a flowid in the mbuf if the rx cqe provides an rx hash value.

jmatthew@ says we need to configure the hw to populate that, but i
can put this in now in preparation for it.



CVS: cvs.openbsd.org: src

2019-06-10 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2019/06/10 20:16:11

src/regress/sys/kern/clock_gettime

Update of /cvs/src/regress/sys/kern/clock_gettime
In directory cvs.openbsd.org:/tmp/cvs-serv87301/clock_gettime

Log Message:
Directory /cvs/src/regress/sys/kern/clock_gettime added to the repository



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 19:35:55

Modified files:
sys/arch/sparc64/conf: GENERIC 

Log message:
add mcx now that pyro and sparc64 can do msi-x

ok jmatthew@



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 18:45:31

Modified files:
sys/arch/sparc64/dev: pci_machdep.c pyro.c vpci.c 
sys/arch/sparc64/include: pci_machdep.h 

Log message:
implement msi-x support on sparc64.

this is mostly based on the stuff kettenis did on arm64 recently.
msix support is basically the same as msi support from the host
side, you just have to tell the actual device about the msi vectors
differently.

the most complicated part of this is storing the requested msix
vector between the call to pci_intr_map_msix and pci_intr_establish.
the pci_intr_handle_t for storing state between those is a scalar
type, so we reassign some bits in that int for use storing the type
of int (intx, msi, or msix) and the vector.

i took the low 8 bits for storing the vector, which gives us a max
of 256 values. technically msix supports up to 2048 vectors, but
pyro only supports 256 in total, so i don't think we're going to
miss out on much. vpci may support more, but we'll cross that bridge
when we get to it.

i tested pyro(4) with mcx(4).
vpci was tested by kettenis@

ok kettenis@



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 17:49:45

Modified files:
sys/net: bpf.c 

Log message:
use m_microtime to get the packet rx time it might be available.



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 17:48:22

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

Log message:
use m_microtime instead of microtime for SO_TIMESTAMP socketopt handling

drivers can set ph_timestamp when packets are received by the
hardware, which should be more accurate and cheaper than getting
the clock when the packet is queued on the socket.



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 17:45:19

Modified files:
sys/sys: mbuf.h 
sys/kern   : uipc_mbuf.c 

Log message:
add m_microtime for getting the wall clock time associated with a packet

if the packet has the M_TIMESTAMP csum_flag, ph_timestamp is added
to the boottime clock, otherwise it just uses microtime().



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 17:26:29

Modified files:
sys/sys: time.h 

Log message:
NSEC_TO_TIMEVAL turns nanoseconds in a uint64_t into a struct timeval

add NSEC_TO_TIMESPEC while here

ok cheloha@



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 17:05:52

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

Log message:
support hardware timestamping for received packets.

the chip has a cycle counter or something, and the value of the
counter when the packet is sent to the host is stored in the
completion queue entry.

the driver periodically checks the cycle counter and records the
time at that point, so the rx path can do some maths to figure out
what the clock time is for the cycle counter. if the driver is
calibrated with the chips counter, the rx packets are timestamped.

this is based on the changes made to freebsd, but with some
simplifications.



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 16:59:01

Modified files:
sys/sys: mbuf.h 

Log message:
add M_TIMESTAMP as a csum_flags option to say ph_timestamp is set

this is so hardware that supports timestamping can set the time and
say so for things like bpf and the SO_TIMESTAMP socket option to use.

the intention is that ph_timestamp will store the nanosecond since
the system booted, which is in line with how fq_codel (the only
user of the field at the moment) uses it.



CVS: cvs.openbsd.org: src

2019-06-10 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/06/10 15:55:16

Modified files:
sys/net: if_tun.c 

Log message:
don't allow userland to change if_type.

if_type is now immutable in tun(4) and tap(4)

ok claudio@ mpi@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Mark Lumsden
CVSROOT:/cvs
Module name:src
Changes by: l...@cvs.openbsd.org2019/06/10 12:55:15

Modified files:
usr.bin/mg : log.c 

Log message:
Fix not checking correct fprintf return value.



CVS: cvs.openbsd.org: src

2019-06-10 Thread Ted Unangst
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2019/06/10 12:11:27

Modified files:
usr.bin/doas   : doas.c 

Log message:
use getpwuid_r to avoid problems with hidden static storage.
ok deraadt lteo martijn



CVS: cvs.openbsd.org: src

2019-06-10 Thread Mark Lumsden
CVSROOT:/cvs
Module name:src
Changes by: l...@cvs.openbsd.org2019/06/10 10:48:59

Modified files:
usr.bin/mg : log.c log.h 

Log message:
Add 'undo' logging (same output as undo-list command). Also, add
'undo' data to a separate file from line logging.



CVS: cvs.openbsd.org: src

2019-06-10 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2019/06/10 10:33:02

Modified files:
sys/net80211   : ieee80211.c ieee80211_node.c 

Log message:
Revised version of 'ifconfig mode' command fix.

The 'mode' command is supposed to force a wireless interface into 11a/b/g/n
media mode. This stopped working some time ago, probably during my work on
background scanning. Problem spotted by mlarkin@ who noticed that interfaces
were using 11g mode while forced to 11b mode.

ok phessler, jmatthew  (earlier version)
relentless testing by krw@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/06/10 10:32:51

Modified files:
sys/net: if_pfsync.c if_vxlan.c 
sys/netinet: ip_carp.c ip_output.c 
sys/netinet6   : ip6_output.c 

Log message:
Use mallocarray(9) & put some free(9) sizes for M_IPMOPTS allocations.

ok semarie@, visa@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/06/10 09:06:03

Modified files:
sys/arch/i386/i386: esm.c 

Log message:
Use PWAIT instead of PUSER in tsleep(9).

It doesn't matter in this case and reducing the number of PUSER makes
the scheduler logic easier to understand.

ok kettenis@, visa@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2019/06/10 08:58:48

Modified files:
lib/libcrypto/man: ASN1_generate_nconf.3 BN_CTX_new.3 
   BN_add_word.3 BN_bn2bin.3 BN_generate_prime.3 
   BN_rand.3 DH_generate_key.3 
   DH_generate_parameters.3 DH_new.3 
   DSA_SIG_new.3 DSA_do_sign.3 DSA_dup_DH.3 
   DSA_generate_key.3 DSA_generate_parameters.3 
   DSA_new.3 DSA_sign.3 EVP_DigestSignInit.3 
   EVP_DigestVerifyInit.3 EVP_SignInit.3 
   EVP_VerifyInit.3 PEM_read.3 PKCS7_decrypt.3 
   PKCS7_encrypt.3 PKCS7_sign.3 PKCS7_verify.3 
   RSA_check_key.3 RSA_generate_key.3 RSA_new.3 
   RSA_private_encrypt.3 RSA_public_encrypt.3 
   RSA_sign.3 RSA_sign_ASN1_OCTET_STRING.3 
   SMIME_read_PKCS7.3 X509_PUBKEY_new.3 
   X509_new.3 

Log message:
delete references to ERR pages from SEE ALSO where such
references were already given below RETURN VALUES right above



CVS: cvs.openbsd.org: src

2019-06-10 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/06/10 08:38:06

Modified files:
sys/dev/acpi   : acpi.c acpireg.h acpivar.h 

Log message:
Print proper ACPI version number.

ok mlarkin@



CVS: cvs.openbsd.org: src

2019-06-10 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2019/06/10 08:22:12

Modified files:
regress/usr.bin/openssl: appstest.sh 

Log message:
Add pkcs12 options and smime tests for appstest.sh

- Add some options to pkcs12 test.
- Add smime tests for encrypt, decrypt and pk7out.



CVS: cvs.openbsd.org: src

2019-06-10 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2019/06/10 03:49:48

Modified files:
lib/libcrypto/man: ASN1_TYPE_get.3 BIO_new.3 BN_new.3 
   CRYPTO_get_mem_functions.3 DH_new.3 DSA_new.3 
   ECDSA_SIG_new.3 EC_GROUP_new.3 ENGINE_new.3 
   ERR.3 OCSP_REQUEST_new.3 OPENSSL_cleanse.3 
   OPENSSL_config.3 OPENSSL_malloc.3 PEM_read.3 
   PKCS12_create.3 PKCS7_new.3 RSA_new.3 
   STACK_OF.3 UI_new.3 evp.3 lh_new.3 

Log message:
add links back to crypto(3) to function group entry pages
and to isolated obsolete pages;
OK bcook@ jmc@



CVS: cvs.openbsd.org: xenocara

2019-06-10 Thread Matthieu Herrb
CVSROOT:/cvs
Module name:xenocara
Changes by: matth...@cvs.openbsd.org2019/06/10 03:40:56

Modified files:
.  : MODULES 3RDPARTY 

Log message:
update