CVS: cvs.openbsd.org: src

2021-05-13 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-13 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: www

2021-05-13 Thread T . J . Townsend
CVSROOT:/cvs
Module name:www
Changes by: t...@cvs.openbsd.org2021/05/13 19:34:14

Modified files:
faq/pf : perf.html 

Log message:
typo fix from stephane huc



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