CVS: cvs.openbsd.org: src

2021-05-16 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/16 07:09:39

Modified files:
sys/net: rtsock.c 

Log message:
In route detach we delete `rop_timeout' while `rop' is still linked to
`rtp_list' so it could be re-added by concurrent thread. Also
timeout_del(9) doesn't wait timeout proc to be finished and
timeout_del_barrier(9) should be used for that.

So use timeout_del_barrier(9) instead of timeout_del(9) and moved it
just after refcnt_finalize(9). This fixes potential use-after-free
issue in route_detach().

ok mpi@



CVS: cvs.openbsd.org: src

2021-05-16 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2021/05/16 04:58:27

Modified files:
lib/libssl : bs_ber.c bs_cbb.c bs_cbs.c bytestring.h 

Log message:
Fix formatting of multi-line license comment per style(9).



CVS: cvs.openbsd.org: src

2021-05-16 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2021/05/16 04:55:17

Modified files:
lib/libssl : ssl_locl.h tls13_client.c tls13_server.c 

Log message:
Avoid pulling ssl_sigalgs.h in via ssl_locl.h.

Forward declare struct sigalg in ssl_locl.h and avoid including
ssl_sigalgs.h. Explicitly include ssl_sigalgs.h where it is needed.



CVS: cvs.openbsd.org: src

2021-05-16 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/16 04:40:24

Modified files:
sys/arch/arm64/arm64: genassym.cf 

Log message:
remove unneeded includes



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/riscv64/riscv64: genassym.cf 

Log message:
remove unneeded includes



CVS: cvs.openbsd.org: src

2021-05-16 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/05/16 04:38:53

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

Log message:
Sync memreg_add() implementation with arm64 and powerpc64.



CVS: cvs.openbsd.org: src

2021-05-16 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2021/05/16 03:09:11

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

Log message:
Capabilities are only supported on a session when both sides announce
that capability. Change capa_neg_calc() to check always both the
ann(ounce) and peer capa struct to figure out what was negotiated.
This change affects route refersh and graceful restart (where before
setting the capability in the config to 'no' would not fully disable
the feature).
Also ignore and warn about unexpected route refresh messages.
OK benno@



CVS: cvs.openbsd.org: src

2021-05-16 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/16 02:50:59

Modified files:
sys/dev/acpi   : amdgpio.c aplgpio.c bytgpio.c chvgpio.c 
 dwgpio.c glkgpio.c pchgpio.c 

Log message:
correct prototype of acpi gpio intr_establish functions

ok kettenis@



CVS: cvs.openbsd.org: src

2021-05-16 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2021/05/16 02:32:49

Modified files:
lib/libssl : bs_ber.c bs_cbb.c bs_cbs.c bytestring.h 

Log message:
Remove unnecessary includes from the bytestring APIs.

The bytestring APIs are self contained, hence including openssl headers
here is unnecessary.



CVS: cvs.openbsd.org: src

2021-05-16 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2021/05/16 02:24:21

Modified files:
lib/libssl : d1_srtp.c s3_lib.c ssl_algs.c ssl_ciph.c 
 ssl_clnt.c ssl_err.c ssl_lib.c ssl_locl.h 
 ssl_sess.c ssl_sigalgs.c ssl_srvr.c 
 ssl_tlsext.c t1_enc.c 

Log message:
Explicitly include  in files using OPENSSL_NO_*

Where a file references to OPENSSL_NO_* conditions, ensure that we
explicitly include  before any references, rather
than relying on another header to pull this in.



CVS: cvs.openbsd.org: src

2021-05-16 Thread Paco Esteban
CVSROOT:/cvs
Module name:src
Changes by: p...@cvs.openbsd.org2021/05/16 00:46:58

Modified files:
share/man/man8 : afterboot.8 

Log message:
mention apmd(8) in afterboot(8)

input and ok jmc@



CVS: cvs.openbsd.org: src

2021-05-16 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/16 00:20:29

Modified files:
sys/arch/amd64/amd64: vm_machdep.c 
sys/arch/arm/arm: vm_machdep.c 
sys/arch/arm64/arm64: vm_machdep.c 
sys/arch/i386/i386: vm_machdep.c 
sys/arch/m88k/m88k: vm_machdep.c 
sys/arch/powerpc/powerpc: vm_machdep.c 
sys/arch/powerpc64/powerpc64: vm_machdep.c 
sys/arch/riscv64/riscv64: vm_machdep.c 
sys/arch/sh/sh : vm_machdep.c 

Log message:
b_saveaddr has a type of void * use NULL not 0



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 22:51:00

Modified files:
sys/lib/libkern: bcmp.c 

Log message:
ansi



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 22:45:58

Modified files:
sys/lib/libkern: bcmp.c memcpy.c memmove.c 

Log message:
deregister



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 22:34:47

Modified files:
sys/lib/libz   : zopenbsd.c 

Log message:
ansi



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/amd64/include: cpuvar.h 

Log message:
remove prototype for cpu_adjust_tsc_freq()
a matching function was never committed



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 21:39:28

Modified files:
sys/arch/arm/arm: arm32_machdep.c cpufunc.c stubs.c 
  sys_machdep.c syscall.c undefined.c 
sys/arch/arm/cortex: agtimer.c amptimer.c 
sys/arch/arm/include: cpufunc.h 
sys/arch/armv7/armv7: armv7_machdep.h platform.c 
sys/arch/armv7/exynos: tps65090.c 
sys/arch/armv7/omap: dmtimer.c gptimer.c omap.c 

Log message:
ansi



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 21:30:33

Modified files:
sys/arch/arm64/include: pmap.h 
sys/arch/arm64/arm64: syscall.c 

Log message:
ansi



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 21:29:36

Modified files:
sys/arch/riscv64/include: pmap.h 
sys/arch/riscv64/riscv64: syscall.c 

Log message:
ansi



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 21:23:48

Modified files:
regress/sys/kern/noexec: Makefile testfly.S 
regress/sys/kern/stackpivot: Makefile pivot.h 

Log message:
add riscv asm for these two security-feature checking regress tests
with drahn



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 20:01:33

Modified files:
sys/arch/armv7/conf: Makefile.armv7 
sys/arch/arm64/conf: Makefile.arm64 

Log message:
remove unused pre efiboot targets



CVS: cvs.openbsd.org: src

2021-05-15 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/05/15 16:06:43

Modified files:
sbin/fdisk : gpt.c 

Log message:
Nuke some Capt. Obvious and soon to be obsolete comments in
GPT_write().

Add local variables prigh and prigp, mirroring altgh and altp, to
GPT_write(), eliminating some magic numbers to make clear the
relationship between the various primary and alternative GPT lba
fields.

No intentional functional change.



CVS: cvs.openbsd.org: src

2021-05-15 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/05/15 14:51:12

Modified files:
sys/arch/riscv64/conf: Makefile.riscv64 

Log message:
Add back -mno-relax for now.  Retain the -target option but put it on
a line of its own to improve diffability with other architectures.

ok drahn@



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 14:20:35

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

Log message:
in kdata_abort, error must be initialized to 0 (like arm64)
spotted by drahn



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 14:14:05

Modified files:
sys/arch/riscv64/riscv64: copy.S copystr.S 

Log message:
In all the copyin family functions, must compare end-address against
VM_MAXUSER_ADDRESS with bgtu, signed comparison is incorrect.  Now passes
regress/sys/copy
ok drahn kettenis



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 14:12:24

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

Log message:
Reorganize kernel & user fault handling into seperate functions like on
other architectures.  During refactoring, found missing calls to important
functions and incorrect parameter passing...
ok kettenis drahn



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 14:05:05

Modified files:
sys/arch/riscv64/conf: Makefile.riscv64 
Removed files:
sys/arch/riscv64/riscv64: copyinout.S 

Log message:
copyinout.S is not used



CVS: cvs.openbsd.org: src

2021-05-15 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/05/15 13:44:15

Modified files:
sbin/fdisk : part.c 

Log message:
Keep internal representation of DOSPTYP_EFI partition sizes correct.
Translate to/from UINT32_MAX as required when translating between
on-disk MBR format and internal format.

No intentional functional change.



CVS: cvs.openbsd.org: src

2021-05-15 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2021/05/15 11:16:38

Modified files:
usr.bin/mandoc : tbl_data.c 

Log message:
When looking for the last layout row used, we need to look at the layout
row used for the previous data line containing data, not at the previous
data line outright, which might be a horizontal ruler.  If it is, do not
restart from the first layout row but still proceed to the next data row,
which may have been just read from T&.

Bug originally reported by Oliver dot Corff at email dot de
on groff at gnu dot org:
https://lists.gnu.org/archive/html/groff/2021-03/msg3.html
and forwarded to me by bentley@.

Patch OK'ed by bentley@ back in April.



CVS: cvs.openbsd.org: src

2021-05-15 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/05/15 09:59:15

Modified files:
sbin/fdisk : cmd.c 

Log message:
Add missing MBR_protective_mbr() check when writing edited GPT.

No intentional functional change.



CVS: cvs.openbsd.org: src

2021-05-15 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/05/15 09:20:17

Modified files:
sbin/fdisk : user.c 

Log message:
Shuffle USER_print_disk() code into a more rational, clearer
structure.

No intentional functional change.



CVS: cvs.openbsd.org: src

2021-05-15 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2021/05/15 09:08:31

Modified files:
usr.sbin/httpd : server_fcgi.c 

Log message:
Remove outdated comment. We got all httpd headers from the fcgi server
at this point.



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/arm64/stand/efiboot: ldscript.arm64 

Log message:
Remove OUTPUT_FORMAT and OUTPUT_ARCH from linker script.  These are
no-ops for ld.lld.

ok deraadt@



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 08:05:36

Modified files:
sys/arch/riscv64/include: pmap.h 
sys/arch/riscv64/riscv64: pmap.c trap.c 

Log message:
pmap_fault_fixup() does not need "int user"
ok kettenis



CVS: cvs.openbsd.org: src

2021-05-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/15 07:56:56

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

Log message:
improve comment regarding child_return() clearing errno-indicating flag



CVS: cvs.openbsd.org: src

2021-05-15 Thread Jan Klemkow
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/15 07:37:44

Modified files:
libexec/ftpd   : monitor.c 

Log message:
Add pledge for ftpd's user processes.

OK tobhe@



CVS: cvs.openbsd.org: src

2021-05-15 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/05/15 05:30:27

Modified files:
sys/arch/arm64/arm64: intr.c syscall.c trap.c vfp.c 
sys/arch/arm64/dev: agintc.c ampintc.c bcm2836_intr.c efi.c 
sys/arch/arm64/include: cpu.h 

Log message:
Use intr_enable()/int_disable()/intr_restore() instead of
enable_interrupts()/disable_interrupts()/restore_interrupts() and remove
the latter interfaces.

While there move a few malloc(9) and free(9) calls to run with interrupts
enabled.

ok patrick@



CVS: cvs.openbsd.org: src

2021-05-15 Thread YASUOKA Masahiko
CVSROOT:/cvs
Module name:src
Changes by: yasu...@cvs.openbsd.org 2021/05/15 02:07:20

Modified files:
sys/sys: mbuf.h 
sys/net: pipex.c 
sys/netinet: ip_input.c 
share/man/man9 : mbuf_tags.9 

Log message:
Fix IPsec NAT-T to work with pipex(4).  Introduce a new packet tag
PACKET_TAG_IPSEC_FLOWINFO to specify the IPsec flow.

ok mvs



CVS: cvs.openbsd.org: src

2021-05-14 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/14 18:04:32

Modified files:
sys/arch/riscv64/riscv64: copy.S 

Log message:
Load the fault handler into the correct register.
Having the onfault dance in a macro makes this almost unreadable.
Initial failure found by deraadt, cause finally found.



CVS: cvs.openbsd.org: src

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

Modified files:
sbin/fdisk : gpt.c 

Log message:
Shuffle GPT_read() code into a nice switch{}, eliminating
unnecesary read of primary GPT when only the secondary GPT
is requested.

No intentional functional change.



CVS: cvs.openbsd.org: src

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

Modified files:
sys/kern   : subr_disk.c 
sbin/fdisk : mbr.c 

Log message:
Whitespace tweaks and a couple of stray u_int* in gpt_chk_mbr().

No intentional functional change.



CVS: cvs.openbsd.org: src

2021-05-14 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/14 12:03:42

Modified files:
lib/libcrypto/rsa: rsa_sign.c 

Log message:
whitespace/KNF



CVS: cvs.openbsd.org: src

2021-05-14 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2021/05/14 10:44:38

Modified files:
sys/arch/amd64/include: specialreg.h 

Log message:
amd64: specialreg.h: add MSR_TSC_ADJUST

Where available, the IA32_TSC_ADJUST MSR may be used to make race-free
relative adjustments to a logical CPU's TSC.  The value in the
register is interpreted as a signed 64-bit offset and added to the
"real" value of the TSC whenever the TSC MSR is read.  That is:

RDTSC = REAL_TSC + TSC_ADJUST

and:

RDMSR TSC = REAL_TSC + TSC_ADJUST

For example, if REAL_TSC=1 and TSC_ADJUST=1, then RDTSC would yield 2.
Or if REAL_TSC=10 and TSC_ADJUST=-5, then RDTSC would yield 5.

Writing TSC_ADJUST does not change the "real" underlying value of the
TSC.  Said another way setting TSC_ADJUST to zero will always undo any
prior adjustment.  This property may be useful in fixing desynchronized
TSCs.  In particular, buggy firmware may erroneously desynchronize a
normally synchronized TSC.  If this happens, in theory we can do:

wrmsr(MSR_TSC_ADJUST, 0);

and fix any desynchronization during boot/resume with no fuss.

ok mlarkin@



CVS: cvs.openbsd.org: src

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

Modified files:
sys/kern   : subr_disk.c 
sbin/fdisk : cmd.c fdisk.c mbr.c user.c 

Log message:
Tweak the two copies of gpt_chk_mbr() to return the index of the MBR
0xEE (DOSPTYP_EFI) partition, or -1 no usable such partition is found.

Adopt a consistent idiom to capture the index for future use.

Clean up the gpt_chk_mbr() logic to make it clearer what constraints
are being applied when looking for the DOSTYP_EFI partition.

No intentional functional change.



CVS: cvs.openbsd.org: src

2021-05-14 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/05/14 07:10:20

Modified files:
share/man/man4 : mpe.4 

Log message:
Properly refer to ioctl(2)

>From Caspar Schutijser, thanks.



CVS: cvs.openbsd.org: src

2021-05-14 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2021/05/14 04:50:55

Modified files:
lib/libcrypto/objects: objxref.pl 

Log message:
Improve libcrypto obj_xref.h generator

Modify objxref.pl to output $OpenBSD$ header and
__BEGIN_HIDDEN_DECLS / __END_HIDDEN_DECLS .

ok and comment from tb@



CVS: cvs.openbsd.org: src

2021-05-14 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/14 02:10:39

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

Log message:
remove comment describing GENERIC



CVS: cvs.openbsd.org: src

2021-05-14 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/14 00:55:19

Modified files:
sys/arch/riscv64/conf: RAMDISK 

Log message:
add dwge(4) to RAMDISK as well



CVS: cvs.openbsd.org: src

2021-05-14 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/14 00:48:52

Modified files:
sys/arch/riscv64/dev: mainbus.c riscv_cpu_intc.c simplebus.c 
sys/arch/riscv64/riscv64: ast.c autoconf.c bus_dma.c conf.c 
  cpu.c intr.c machdep.c mem.c pmap.c 
  process_machdep.c sig_machdep.c 
  syscall.c trap.c vm_machdep.c 

Log message:
remove uneeded includes



CVS: cvs.openbsd.org: src

2021-05-13 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/13 23:21:00

Modified files:
distrib/sets/lists/base: md.riscv64 
distrib/sets/lists/comp: clang.riscv64 md.riscv64 

Log message:
move some files to match other archs

ok deraadt@ drahn@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2021/05/13 23:20:32

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

Log message:
fix previous: test saved no_shell_flag, not the one that just got
clobbered



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 21:49:18

Added files:
distrib/sets/lists/base: md.riscv64 
distrib/sets/lists/comp: clang.riscv64 md.riscv64 
distrib/sets/lists/etc: md.riscv64 
distrib/sets/lists/game: md.riscv64 
distrib/sets/lists/man: md.riscv64 

Log message:
Riscv64 sets. Initial attempt.



CVS: cvs.openbsd.org: src

2021-05-13 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2021/05/13 21:09:48

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

Log message:
Fix ssh started with ControlPersist incorrectly executing a shell
when the -N (no shell) option was specified. bz3290 reported by
Richard Schwab; patch from markus@ ok me



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 21:01:24

Modified files:
sys/arch/riscv64/conf: Makefile.riscv64 

Log message:
Enable riscv64 native kernel builds.
remove extra targets



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 20:29:00

Modified files:
gnu/usr.bin/clang: Makefile.inc 

Log message:
On riscv64, dynamically linked clang binary fails with:
libc++abi: Pure virtual function called!

By statically linking clang (and *-tblgen) this problem is worked around
at least for now.



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 20:21:34

Modified files:
distrib/riscv64/iso: Makefile 

Log message:
Fix bootloader name and riscv64 doesn't have bsd.mp yet.



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 19:18:52

Modified files:
distrib/riscv64/ramdisk: Makefile 

Log message:
Adjust ramdisk generation for self hosting, remove cross bits.



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 19:15:54

Modified files:
gnu/llvm/llvm/lib/Target/RISCV: RISCVISelLowering.cpp 

Log message:
Initial enablment of EMULTLS on RiscV
Uncertain if this is 100% correct, however this enables self hosting
using clang.



CVS: cvs.openbsd.org: src

2021-05-13 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2021/05/13 18:57:03

Modified files:
lib/libc/arch/riscv64/gen: _setjmp.S 

Log message:
Fix regression for _setjmp, fucntion does not use stack and adjusting
it causes restored stack to be incorrect.



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/powerpc64/powerpc64: machdep.c 

Log message:
Improve mereg_add() like I did on arm64.



CVS: cvs.openbsd.org: src

2021-05-13 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/13 13:43:11

Modified files:
sys/kern   : uipc_socket.c 

Log message:
Do `so_rcv' cleanup with sblock() held.

solock() should be taken before sblock(). soreceive() grabs solock() and
then locks `so_rcv'. But later it releases solock() before call uimove(9).
So concurrent thread which performs soshutdown() could break sorecive()
loop. But `so_rcv' is still locked by sblock() so this soshutdown()
thread will sleep in sorflush() at sblock() call. soshutdown() thread
doesn't release solock() after sblock() call so it has no matter where to
release `so_rcv' - is will be locked until the solock() release.

That's why this strange looking code works fine. This sbunlock() movement
just after `so_rcv' cleanup  affects nothing but makes the code
consistent and clean to understand.

ok mpi@



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/riscv64/dev: plic.c riscv_cpu_intc.c 
sys/arch/riscv64/include: intr.h 
sys/arch/riscv64/riscv64: intr.c machdep.c pmap.c syscall.c 

Log message:
Use intr_enable()/int_disable()/intr_restore() instead of
enable_interrupts()/disable_interrupts()/restore_interrupts() and remove
the latter interfaces.

ok mlarkin@, drahn@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/13 12:06:54

Modified files:
sys/kern   : uipc_socket.c 

Log message:
Use NULL instead of 0 for mbuf(9) pointers.

ok millert@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/13 11:31:59

Modified files:
sys/kern   : uipc_syscalls.c 

Log message:
Assign NULL instead of 0 to `control' within sendit(). It's mbuf(9)
pointer.

ok deraadt@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/13 11:02:31

Modified files:
sys/kern   : uipc_syscalls.c 

Log message:
Move ktrfds() below fdpunlock(). This fixes lock order issue between
vn_lock(9) and fdplock().

Reported-by: syzbot+2300a1bedc425f6f8...@syzkaller.appspotmail.com

ok visa@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/05/13 10:08:16

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

Log message:
Make memreg_add() a bit smarter and have it merge adjacent regions.
This should reduce the number of physical memory segments that we pass
to uvm reducing the chance that we run out of physical memory segments
and should make physical memory allocation a bit more efficient.

ok patrick@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2021/05/13 09:20:48

Modified files:
sbin/iked  : config.c iked.c iked.h ikev2.c types.h vroute.c 

Log message:
Refactor iked process shutdown and cleanup. Remember configured
addresses and routes in iked_vroute_sc to not depend on ikev2
process for cleanup.

This makes sure that all flows, routes and addresses are deleted
no matter which process is killed first.

ok patrick@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/13 08:28:03

Modified files:
sbin/isakmpd   : dh.c 

Log message:
Use field independent versions of {get,set}_coordinates()

ok tobhe



CVS: cvs.openbsd.org: src

2021-05-13 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/13 08:01:35

Modified files:
sbin/iked  : dh.c 

Log message:
Use field independent version of {get,set}_affine_coordinates.

ok tobhe



CVS: cvs.openbsd.org: src

2021-05-13 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2021/05/13 05:22:15

Modified files:
usr.sbin/rad   : engine.c 

Log message:
RFC 4861 4.1 allows router solicitations from the unspecified address
(::). A short survey suggests that some systems respond with a
multicast router advertisement and other don't.

Andrew Forgue pointed out a usecase for this, booting a UEFI system
over http in an IPv6 network only. ("IPv6 support for UEFI IPv6
booting" on bugs@ a long time ago)

There is also no downside in allowing this, any host on the layer 2
network can solicit a router advertisement.

OK phessler



CVS: cvs.openbsd.org: src

2021-05-13 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/05/13 03:32:00

Modified files:
sys/arch/riscv64/dev: plic.c 

Log message:
Run handlers with interrupts enabled.

ok jsg@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/13 02:44:18

Modified files:
sys/arch/riscv64/include: signal.h 

Log message:
change sig_atomic_t from long to int matching all the other archs

ok kettenis@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/13 01:10:57

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

Log message:
acme-client: use EC_POINT_{get,set}_affine_cooordinates()

The versions with _GFp() suffix only exist for historical reasons.
Now that we have EC_POINT_{get,set}_affine_coordinates(), we should
stop using the old ones as they provide no benefit.

ok florian



CVS: cvs.openbsd.org: src

2021-05-13 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2021/05/13 00:45:23

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

Log message:
No need to disable interrupts before returning to userland.
The AST processing code will take care of doing that for us.

ok jsg@



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/riscv64/riscv64: exception.S 

Log message:
When doing AST processing:
1) block interrupts, then check for ASTs
2) if no ASTs, return with interrupts blocked, so they can be re-enabled
ATOMICALLY in the return to userspace
3) if an AST happened, then re-enable interrupts, call ast(), then goto 1

ok jsg@



CVS: cvs.openbsd.org: src

2021-05-13 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/13 00:00:53

Modified files:
lib/libcrypto/man: EVP_DigestVerifyInit.3 EVP_DigestSignInit.3 

Log message:
Add missing .Pp in HISTORY section.



CVS: cvs.openbsd.org: src

2021-05-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/12 23:52:28

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

Log message:
Add missing .Pp



CVS: cvs.openbsd.org: src

2021-05-12 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2021/05/12 20:22:33

Modified files:
sys/scsi   : scsi_base.c 

Log message:
Whitespace fix for unintentional unindenting event in r1.260.

Reported by Ashton Fagg via tech@. Thanks!



CVS: cvs.openbsd.org: src

2021-05-12 Thread YASUOKA Masahiko
CVSROOT:/cvs
Module name:src
Changes by: yasu...@cvs.openbsd.org 2021/05/12 17:17:30

Modified files:
share/man/man9 : mbuf_tags.9 

Log message:
Remove about PACKET_TAG_PIPEX, it was replaced by ph_cookie.



CVS: cvs.openbsd.org: src

2021-05-12 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2021/05/12 17:08:19

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

Log message:
print a newline after each instruction
ok kettenis



CVS: cvs.openbsd.org: src

2021-05-12 Thread Dave Voutila
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2021/05/12 14:13:00

Modified files:
usr.sbin/vmctl : vmctl.c main.c 

Log message:
vmctl(8): remove unveil from disk image creation routines

James Cook reported an issue creating images from qcow2 disks that
contained base images. Initial approach suggested was to replace the
use of realpath(3), but since this is common code used in vmd(8) the
better option is to just remove the use of unveil(1) in vmctl. (It was
added very early in vmctl's development before support for disk
conversion was added.)

This does not change existing unveil usage in vmctl for things like the
control socket or the serial console. There's no change to vmd either.

Discussed with and OK from mlarkin@



CVS: cvs.openbsd.org: src

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

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

Log message:
Build a list of memory regions and call yvm_physload(9) on those like
we do on riscv64.

ok patrick@



CVS: cvs.openbsd.org: src

2021-05-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/12 09:12:35

Modified files:
lib/libssl/man : SSL_CIPHER_get_name.3 

Log message:
Merge documentation for SSL_CIPHER_find(3) from OpenSSL 1.1.1.



CVS: cvs.openbsd.org: src

2021-05-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/12 09:05:09

Modified files:
sys/kern   : init_sysent.c syscalls.c 

Log message:
regen



CVS: cvs.openbsd.org: src

2021-05-12 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/12 09:04:48

Modified files:
sys/kern   : syscalls.master 

Log message:
Revert unlock of connect(2), bind(2), listen(2) and shutdown(2).

At least one of them cause a deadlock involving `unplock' and mbuf allocations
('mbufpl') as reported by millert@.



CVS: cvs.openbsd.org: src

2021-05-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/12 08:19:30

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

Log message:
sync



CVS: cvs.openbsd.org: src

2021-05-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/12 08:17:27

Modified files:
lib/libssl/man : Makefile 

Log message:
Install SSL_SESSION_get0_cipher.3



CVS: cvs.openbsd.org: src

2021-05-12 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2021/05/12 08:16:25

Added files:
lib/libssl/man : SSL_SESSION_get0_cipher.3 

Log message:
Document SSL_SESSION_get0_cipher(3)

Based on the OpenSSL 1.1.1 manual written by Rich Salz with a healthy
dose of improvements by schwarze.

ok schwarze



CVS: cvs.openbsd.org: src

2021-05-12 Thread Darren Tucker
CVSROOT:/cvs
Module name:src
Changes by: dtuc...@cvs.openbsd.org 2021/05/12 05:34:30

Modified files:
usr.bin/ssh: ssh-keygen.1 

Log message:
Clarify language about moduli.  While both ends of the connection do need
to use the same parameters (ie groups), the DH-GEX protocol takes care
of that and both ends do not need the same contents in the moduli file,
which is what the previous text suggested.  ok djm@ jmc@



CVS: cvs.openbsd.org: src

2021-05-12 Thread Mark Lumsden
CVSROOT:/cvs
Module name:src
Changes by: l...@cvs.openbsd.org2021/05/12 05:13:23

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

Log message:
Count the number of arguments in each expression as we initially go
through the expression. To be used in checking function parameter
profiles later.



CVS: cvs.openbsd.org: src

2021-05-12 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/12 04:59:43

Modified files:
share/man/man7 : mdoc.7 

Log message:
fix broken escape; ok schwarze



CVS: cvs.openbsd.org: src

2021-05-12 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2021/05/12 04:39:14

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

Log message:
Modify cms test in appstest.sh to work with ec cert/key



CVS: cvs.openbsd.org: src

2021-05-12 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2021/05/12 04:24:39

Modified files:
lib/libcrypto/objects: obj_xref.h obj_xref.txt 

Log message:
Add obj_xref for ECDH schemes in RFC 5753

Found missing sigoid_srt record in crypto/objects/obj_xref.h, and
this causes error while executing openssl cms -encrypt with EC key/cert.
Added required definitions to obj_xref.txt and obj_xref.h.

Issue reported by Theodore Wynnychenko (tmw  uchicago.edu) on misc.

ok tb@



CVS: cvs.openbsd.org: src

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

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

Log message:
Fix several issues introduced with iwm(4) Tx aggregation support.

Keep station queues marked as enabled until the device gets reset.
The firmware becomes unhappy if it finds some queues enabled but missing
from the station's queue mask, even across removals and re-additions of the
station which occur during re-associations and while roaming between APs.
Fixes "could not add sta (error 35)" fatal firmware errors.

When stopping a BA session, properly set the bit corresponding to the
session's TID in the node's tid_disable_ampu bitmask.

During dis- and re-associations all Tx block ack sessions are torn down,
so clear the bitmask which identifies queues with active Tx BA sessions.

Don't byte-swap values written to host-side variables.

Problems reported and fixes tested by Matthias Schmidt and kettenis@.
Additional testing by phessler@, mlarkin@, and Mikolaj Kucharski.



CVS: cvs.openbsd.org: src

2021-05-12 Thread Vitaliy Makkoveev
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2021/05/12 02:09:33

Modified files:
sys/netinet: ip_output.c 
sys/netinet6   : ip6_output.c 
sys/sys: proc.h 

Log message:
Use local copy of `ps_rtableid' in ip{,6}_ctloutput() and mark
`ps_rtableid' as atomic. This allows us to unlock setrtable(2).

ok claudio@ mpi@



CVS: cvs.openbsd.org: src

2021-05-12 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/12 00:50:33

Modified files:
etc: services 

Log message:
The official service name of tcp/465 is "submissions"

Keep "smtps" as an alias.
https://datatracker.ietf.org/doc/html/rfc8314#section-7.3

ok sthen@ florian@ kmos@



CVS: cvs.openbsd.org: src

2021-05-12 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/12 00:45:30

Modified files:
etc: services 

Log message:
Drop swat (tcp/901)

The Samba Web Administration Tool has been dropped by the samba project and
TCP port 901 is not registered at IANA.  ok sthen@ florian@ kmos@



CVS: cvs.openbsd.org: src

2021-05-11 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2021/05/11 22:00:46

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

Log message:
KNF



CVS: cvs.openbsd.org: src

2021-05-11 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2021/05/11 20:28:25

Modified files:
sys/arch/riscv64/include: fenv.h 
lib/libm/arch/riscv64: fenv.c 

Log message:
Correct defines for fenv rounding modes and change fenv_t and fexcept_t
from unsigned long long to unsigned int.

ok kettenis@



CVS: cvs.openbsd.org: src

2021-05-11 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2021/05/11 20:24:56

Modified files:
usr.sbin/vmd   : config.c 

Log message:
vmd(8): omit a possibly uninitialized var in a log_warnx

Don't print 'base' since it might not be initialized in all code paths.

>From James Cook



  1   2   3   4   5   6   7   8   9   10   >