CVS: cvs.openbsd.org: src

2019-10-21 Thread Alexandr Nedvedicky
CVSROOT:/cvs
Module name:src
Changes by: sas...@cvs.openbsd.org  2019/10/21 17:02:05

Modified files:
sys/net: bpf.c bpfdesc.h 

Log message:
put bpfdesc reference counting back, revert change introduced in 1.175 as:
BPF: remove redundant reference counting of filedescriptors

Anton@ made problem crystal clear:
I've been looking into a similar bpf panic reported by syzkaller,
which looks somewhat related. The one reported by syzkaller is caused
by issuing ioctl(SIOCIFDESTROY) on the interface which the packet filter
is attached to. This will in turn invoke the following functions
expressed as an inverted stacktrace:
1. bpfsdetach()
2. vdevgone()
3. VOP_REVOKE()
4. vop_generic_revoke()
5. vgonel()
6. vclean(DOCLOSE)
7. VOP_CLOSE()
8. bpfclose()

Note that bpfclose() is called before changing the vnode type. In
bpfclose(), the `struct bpf_d` is immediately removed from the global
bpf_d_list list and might end up sleeping inside taskq_barrier(systq).
Since the bpf file descriptor (fd) is still present and valid, another
thread could perform an ioctl() on the fd only to fault since
bpfilter_lookup() will return NULL. The vnode is not locked in this path
either so it won't end up waiting on the ongoing vclean().

Steps to trigger the similar type of panic are straightforward, let there be
two processes running concurrently:

process A:
while true ; do ifconfig tun0 up ; ifconfig tun0 destroy ; done

process B:
while true ; do tcpdump -i tun0 ; done

panic happens within few secs (Dell PowerEdge 710)

OK @visa, OK @anton



CVS: cvs.openbsd.org: src

2019-10-21 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2019/10/21 16:45:40

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

Log message:
sync



CVS: cvs.openbsd.org: src

2019-10-21 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/21 14:53:11

Modified files:
share/man/man4 : Makefile 
Added files:
share/man/man4 : pwmbl.4 sxipwm.4 

Log message:
pwmbl(4) and sxipwm(4)



CVS: cvs.openbsd.org: src

2019-10-21 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/21 14:52:33

Modified files:
sys/arch/arm64/conf: GENERIC 
sys/dev/fdt: files.fdt 
Added files:
sys/dev/fdt: pwmbl.c sxipwm.c 

Log message:
Add sxipwm(4) and pwmbl(4).  Thse two drivers together add support for the
backlight controller on the Pinebook.

ok patrick@, jsg@



CVS: cvs.openbsd.org: src

2019-10-21 Thread joshua stein
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2019/10/21 10:45:48

Modified files:
sys/dev/acpi   : acpithinkpad.c 

Log message:
On newer ThinkPads reporting HKEY version > 1, don't claim wscons
backlight controls so that acpivout can.  This allows using all of
the fine-grained backlight BCL steps defined in ACPI (usually 100)
instead of the dozen or so available through acpithinkpad's
proprietary ACPI or CMOS interfaces.

This is also needed for future amdgpu work.



CVS: cvs.openbsd.org: src

2019-10-21 Thread joshua stein
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2019/10/21 10:32:51

Modified files:
sys/dev/acpi   : acpivout.c 

Log message:
When incrementing or decrementing screen brightness, don't just
adjust by 1 BCL level as there may be 100 levels.  Find the next
brightness level that is at least 5% up or down and use that.

ok kettenis



CVS: cvs.openbsd.org: src

2019-10-21 Thread Kurt Miller
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/21 07:09:52

Modified files:
gnu/usr.bin/binutils/gdb: amd64obsd-tdep.c 

Log message:
Fix backtrace across signals on amd64
okay guenther@ kettenis@



CVS: cvs.openbsd.org: src

2019-10-21 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/21 04:24:01

Modified files:
sys/sys: proc.h sched.h 
sys/kern   : kern_fork.c 

Log message:
Move `p_estcpu' to the region copied during fork & kill scheduler_fork_hook().

While here reorder some fields in 'struct proc' to avoid size grow.

ok bluhm@, visa@



CVS: cvs.openbsd.org: src

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

Modified files:
lib/librthread : synch.h 

Log message:
Use process-private futexes to avoid the uvm_map lookup overhead.

While here kill unused _wait() function.

ok visa@



CVS: cvs.openbsd.org: src

2019-10-21 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/21 04:04:19

Modified files:
lib/libc/thread: synch.h 

Log message:
Kill unused _wait() function.

ok visa@



CVS: cvs.openbsd.org: src

2019-10-21 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/21 04:02:41

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

Log message:
Mark recycled USB `xfer' as NOT_STARTED to not confuse HCD abort methods.

Prevent an infinite loop when aborting ulpt(4)'s pipe after an I/O error.

Found by and ok stsp@



CVS: cvs.openbsd.org: src

2019-10-21 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2019/10/21 01:16:10

Modified files:
sbin/unwind: frontend.c parse.y printconf.c unwind.c 
 unwind.conf.5 unwind.h 

Log message:
Optionally log blocked queries when using the block list.
OK benno



CVS: cvs.openbsd.org: src

2019-10-20 Thread Ted Unangst
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2019/10/20 21:14:54

Modified files:
distrib/special/doas: doas.c 

Log message:
keep in sync with regular doas. req by millert



CVS: cvs.openbsd.org: src

2019-10-20 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2019/10/20 20:36:43

Modified files:
libexec/ld.so/hppa: Makefile.inc 
libexec/ld.so/mips64: Makefile.inc 

Log message:
Whoops: backout mips64+hppa CHECK_LDSO bits: they weren't done and weren't
part of the review.  My fail for forgetting to diff my tree against what
was reviewed

problem noted by deraadt@



CVS: cvs.openbsd.org: src

2019-10-20 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/20 16:15:08

Modified files:
sys/arch/amd64/stand/boot: boot.8 
sys/arch/hppa/stand/boot: boot.8 
sys/arch/i386/stand/boot: boot.8 
sys/arch/landisk/stand/boot: boot.8 

Log message:
Improve previous

>From and OK jmc



CVS: cvs.openbsd.org: src

2019-10-20 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/20 10:31:44

Modified files:
etc/etc.sparc64: MAKEDEV 

Log message:
regen



CVS: cvs.openbsd.org: src

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

Modified files:
etc/etc.sparc64: MAKEDEV.md 

Log message:
Add /dev/pri.



CVS: cvs.openbsd.org: src

2019-10-20 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/20 10:27:19

Modified files:
sys/arch/sparc64/include: hypervisor.h mdesc.h 
sys/arch/sparc64/sparc64: hvcall.S mdesc.c openprom.c 

Log message:
Firmware that supports the "parallel boot" feature allows us to read the PRI
using a simple hypervisor call.  Implement this.

Tested by jmatthew@



CVS: cvs.openbsd.org: src

2019-10-20 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2019/10/20 10:22:22

Modified files:
usr.sbin/slaacctl: slaacctl.c 

Log message:
Remove redundant newline.
pointed out by deraadt@



CVS: cvs.openbsd.org: src

2019-10-20 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/20 10:18:36

Modified files:
usr.sbin/ldomd : ds.c 

Log message:
Print LDC protocol version in debug message.



CVS: cvs.openbsd.org: src

2019-10-20 Thread Klemens Nanni
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/20 10:13:36

Modified files:
sys/arch/amd64/stand/boot: boot.8 
sys/arch/hppa/stand/boot: boot.8 
sys/arch/i386/stand/boot: boot.8 
sys/arch/landisk/stand/boot: boot.8 

Log message:
Document "set db_console 0|1"

OK deraadt



CVS: cvs.openbsd.org: src

2019-10-20 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2019/10/20 07:33:30

Modified files:
usr.sbin/cron  : atrun.c 

Log message:
Use strtonum(3) in atrun.  Also limit uid/gid to UID_MAX-1 and
GID_MAX-1 for good measure.  OK deraadt@



CVS: cvs.openbsd.org: src

2019-10-20 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:src
Changes by: ajacou...@cvs.openbsd.org   2019/10/20 03:10:43

Modified files:
usr.sbin/syspatch: syspatch.sh 
usr.sbin/sysupgrade: sysupgrade.sh 

Log message:
Tweak and sync comment.



CVS: cvs.openbsd.org: src

2019-10-20 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2019/10/20 03:05:58

Modified files:
usr.sbin/pkg_add/OpenBSD: PackingElement.pm 

Log message:
I didn't check robert's fix closely enough.
fix it so commands are run when several fontdirs are involved
also streamline the alias code a little bit, and have it report actual
issues in opening files



CVS: cvs.openbsd.org: src

2019-10-20 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2019/10/20 01:52:38

Modified files:
sys/dev/pci/drm/amd/amdgpu: amdgpu_ttm.c 

Log message:
unstub amdgpu_ttm_bo_eviction_valuable()

The remaining commented block of code calls amdkfd_fence_check_mm()
which does nothing when not built with CONFIG_HSA_AMD.



CVS: cvs.openbsd.org: src

2019-10-19 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2019/10/19 21:44:49

Modified files:
libexec/ld.so  : Makefile boot.c 
libexec/ld.so/aarch64: Makefile.inc 
libexec/ld.so/alpha: Makefile.inc 
libexec/ld.so/amd64: Makefile.inc 
libexec/ld.so/arm: Makefile.inc 
libexec/ld.so/hppa: Makefile.inc 
libexec/ld.so/i386: Makefile.inc 
libexec/ld.so/m88k: Makefile.inc 
libexec/ld.so/mips64: Makefile.inc 
libexec/ld.so/powerpc: Makefile.inc 
libexec/ld.so/sh: Makefile.inc 
libexec/ld.so/sparc64: Makefile.inc 
Added files:
libexec/ld.so/hppa: boot_md.c 
libexec/ld.so/mips64: boot_md.c 

Log message:
For more archs, ld.so itself only needs/uses the arch's "just add load offset"
'relative' relocation.  Take advantage of that to simplify ld.so's self-reloc
code:
* give the exceptional archs (hppa and mips64) copies of the current boot.c
as boot_md.c
* teach the Makefile to use boot_md.c when present
* reduce boot.c down to the minimum necessary to handle just relative reloc
* teach the Makefile to fail if the built ld.so has other types of relocs

ok visa@ kettenis@



CVS: cvs.openbsd.org: src

2019-10-19 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/19 13:20:14

Modified files:
usr.bin/tmux   : tmux.1 window-copy.c 

Log message:
Add formats for cursor and selection position in copy mode, from Jason Felice.



CVS: cvs.openbsd.org: src

2019-10-19 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2019/10/19 11:42:21

Modified files:
sbin/unwind: resolver.c 

Log message:
Plug mem leak when the list of dhcp resolvers didn't change. ok florian@



CVS: cvs.openbsd.org: src

2019-10-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/19 11:30:43

Modified files:
sys/scsi   : sd.c 

Log message:
Use !ISSET() for unset flag checks.



CVS: cvs.openbsd.org: src

2019-10-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/19 10:01:41

Modified files:
sys/scsi   : sd.c 

Log message:
Use ISSET() for the easier flag checks.



CVS: cvs.openbsd.org: src

2019-10-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/19 08:13:18

Modified files:
sys/scsi   : sd.c 

Log message:
Fix typo in previous, link->flag is link->flags.



CVS: cvs.openbsd.org: src

2019-10-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/19 08:01:31

Modified files:
sys/scsi   : sd.c 

Log message:
Resolve mix of '&=' and CLR() usage in favour of CLR().



CVS: cvs.openbsd.org: src

2019-10-19 Thread Kenneth R Westerback
CVSROOT:/cvs
Module name:src
Changes by: k...@cvs.openbsd.org2019/10/19 07:49:17

Modified files:
sys/scsi   : sd.c 

Log message:
Resolve mix of '|=' and SET() usage in favour of SET().



CVS: cvs.openbsd.org: src

2019-10-19 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2019/10/19 07:14:23

Modified files:
usr.sbin/syspatch: syspatch.sh 
usr.sbin/sysupgrade: sysupgrade.sh 
distrib/miniroot: install.sub 

Log message:
Determine the OS version in a way that won't break after 9.9.
Do it the same way in all three copies of the code.

Based on a patch from Chris Waddey.
with & ok ajacoutot



CVS: cvs.openbsd.org: src

2019-10-19 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/19 06:40:42

Modified files:
usr.bin/tmux   : layout-custom.c 

Log message:
Do not crash trying to fix layout size if only one cell, from Azat Khuzhin.



CVS: cvs.openbsd.org: src

2019-10-19 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2019/10/19 05:40:27

Modified files:
usr.sbin/bgpctl: bgpctl.8 

Log message:
The size limit of the shutdown reason was relaxed to 255 characters but
instead of mentioning the limit, remove it. bgpctl will properly error
out if the reason is too long.
OK job@ sthen@



CVS: cvs.openbsd.org: src

2019-10-19 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2019/10/19 00:56:18

Modified files:
sys/miscfs/deadfs: dead_vnops.c 

Log message:
Unlock the vnode in vop_inactive of deadfs. The unlock operation is
a no-op at the moment, but future work will introduce an actual lock
that has to be released.

OK mpi@ anton@



Re: CVS: cvs.openbsd.org: src

2019-10-18 Thread Florian Obser
Welcome to the world of tomorrow!
Also, didn't we fix this ages ago?! I distinctly remember this coming up 
before...

On 18 October 2019 20:35:32 CEST, Sebastian Benoit  wrote:
>CVSROOT:   /cvs
>Module name:   src
>Changes by:be...@cvs.openbsd.org   2019/10/18 12:35:32
>
>Modified files:
>   sys/netinet6   : nd6_nbr.c 
>
>Log message:
>Don't check that the ipv6 source address of a neighbor advertisment is
>from a neighbor's address. Sthen@ dug out RFC 4861 4.4 that says that
>the source address is "An address assigned to the interface from which
>the advertisement is sent." -- which can be from a network that the
>receiver does not know about. Indeed my provider sends such a neighbor
>advertisment for my default gateway, which breaks my uplink.
>
>Claudio@ added this check for symetry with NetBSD code when he added
>the same check to nd6_ns_input(), where it is needed to fix
>CVE-2008-2476. See also OpenBSD 4.2 errata 15.
>
>ok claudio@, kn@

-- 
Sent from a mobile device. Please excuse poor formating.



CVS: cvs.openbsd.org: src

2019-10-18 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2019/10/18 12:35:32

Modified files:
sys/netinet6   : nd6_nbr.c 

Log message:
Don't check that the ipv6 source address of a neighbor advertisment is
from a neighbor's address. Sthen@ dug out RFC 4861 4.4 that says that
the source address is "An address assigned to the interface from which
the advertisement is sent." -- which can be from a network that the
receiver does not know about. Indeed my provider sends such a neighbor
advertisment for my default gateway, which breaks my uplink.

Claudio@ added this check for symetry with NetBSD code when he added
the same check to nd6_ns_input(), where it is needed to fix
CVE-2008-2476. See also OpenBSD 4.2 errata 15.

ok claudio@, kn@



CVS: cvs.openbsd.org: src

2019-10-18 Thread Ted Unangst
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2019/10/18 11:15:45

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

Log message:
add some checks to avoid UID_MAX (-1) here. this is not problematic with
the current code, but it's probably safer this way.
ok deraadt



CVS: cvs.openbsd.org: src

2019-10-18 Thread Ted Unangst
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2019/10/18 11:14:08

Modified files:
lib/libc/gen   : login_cap.c 

Log message:
setting uid to -1 won't work with setresuid, so detect that condition
and return an error instead. may prevent some unset/missing confusion.
ok deraadt millert



CVS: cvs.openbsd.org: src

2019-10-18 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2019/10/18 01:07:53

Modified files:
sys/dev/pci: if_iwm.c if_iwmreg.h if_iwmvar.h 

Log message:
Add support for dynamic queue allocation (DQA) to iwm(4).

Required for new firmware images because the command queue index has changed.
The driver remains compatible with our current firmware images for now.

Tested by benno, jan, kevlo, florian, jmatthew, Tracey Emery
ok jmatthew



CVS: cvs.openbsd.org: src

2019-10-18 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2019/10/18 00:03:25

Modified files:
sbin/unwind: parse.y 
usr.sbin/rad   : parse.y 

Log message:
Plug mem leak in error path; ok florian@ who also spotted the rad case



CVS: cvs.openbsd.org: src

2019-10-18 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2019/10/18 00:00:47

Modified files:
sbin/unwind: parse.y 

Log message:
Another case of using yacc effectively to avoid repeating code; ok florian@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2019/10/17 22:53:22

Modified files:
sbin/unwind: parse.y 

Log message:
Reafctor forwarder clause to avoid having to write out the same code
a couple of times by declaring optional stuff the proper way. ok @florian



CVS: cvs.openbsd.org: src

2019-10-17 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2019/10/17 21:40:22

Modified files:
etc/etc.loongson: login.conf 
etc/etc.octeon : login.conf 
etc/etc.sgi: login.conf 

Log message:
Bump datasize-cur for pbuild on mips64, to make room for modernity.

OK deraadt@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2019/10/17 20:57:25

Modified files:
.  : Makefile.cross 

Log message:
Add mips64el to LP64_ARCH.

OK patrick@



CVS: cvs.openbsd.org: src

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

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

Log message:
Enable sxidog(4).

ok jsg@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/17 16:26:32

Modified files:
sys/dev/fdt: sxidog.c 

Log message:
Avoid including an armv7 MD header.

ok jsg@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2019/10/17 16:19:36

Modified files:
sys/dev/pci/drm/amd/display/dc/dce100: dce100_resource.c 
sys/dev/pci/drm/amd/display/dc/dce110: dce110_resource.c 
sys/dev/pci/drm/amd/display/dc/dce112: dce112_resource.c 
sys/dev/pci/drm/amd/display/dc/dce120: dce120_resource.c 
sys/dev/pci/drm/amd/display/dc/dce80: dce80_resource.c 
sys/dev/pci/drm/amd/display/dc/dcn10: dcn10_resource.c 
sys/dev/pci/drm/amd/display/dc/inc: resource.h 

Log message:
drm/amd/display: num of sw i2c/aux engines less than num of connectors

>From Hersen Wu
0e8e4fbf8d8905071c045f2922de55adbe1a6abe in mainline linux

Avoids a NULL deref of aux_engine in dc_link_aux_transfer() with
'ASRock A320M-HDV R4.0' and Raven Ridge reported by semarie@ on bugs@.
ok semarie@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2019/10/17 15:54:29

Modified files:
sbin/pfctl : parse.y pfctl_parser.c 
usr.bin/systat : pftop.c 
usr.sbin/pwd_mkdb: pwd_mkdb.c 
usr.sbin/user  : user.c 

Log message:
Use -1 to indicate an invalid uid/gid, not UID_MAX and GID_MAX.
This is the userland portion.  OK deraadt@ sashan@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2019/10/17 12:37:38

Modified files:
sbin/ifconfig  : brconfig.c ifconfig.c sff.c 
Added files:
sbin/ifconfig  : ifconfig.h 
Removed files:
sbin/ifconfig  : brconfig.h 

Log message:
Fix some compiler warings in ifconfig(8).  Move all prototypes and
variables used in multiple .c files into common ifconfig.h.  Basically
this renames brconfig.h to ifconfig.h and also uses it for sff.c.
Fix missing prototypes.  Global variable name s is bad as it shadows
local variables.  Call it sock and use it everywhere.
OK deraadt@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Dale Rahn
CVSROOT:/cvs
Module name:src
Changes by: dr...@cvs.openbsd.org   2019/10/17 09:38:56

Modified files:
sys/arch/arm64/arm64: trap.c 
sys/arch/arm64/include: armreg.h 

Log message:
Cache flush operations on arm64 were being incorrectly treated as write
operations, however they should be treated as read per the design.
Switch to using bit defines, correct said defines.
Fixes cache flushing causing Firefox to abort.
ok kettenis@ kurt@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2019/10/17 08:31:56

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

Log message:
Sync RSA_padding_check_PKCS1_OAEP_mgf1().

Update RSA_padding_check_PKCS1_OAEP_mgf1() with code from OpenSSL 1.1.1d
(with some improvements/corrections to comments).

This brings in code to make the padding check constant time.

ok inoguchi@ tb@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Bob Beck
CVSROOT:/cvs
Module name:src
Changes by: b...@cvs.openbsd.org2019/10/17 08:29:24

Modified files:
usr.bin/nc : netcat.c 

Log message:
Fix -N flag to actually shut down the (entire) socket when the input
goes away. This allows for using nc in cases where the network server
will no longer expect anything after eof, instead of hanging waiting
for more input from our end.

Additionaly, shut down if tls is in use if either side of the socket
goes away, since we higher level TLS operations (tls_read and write)
will require the socket to be both readable and writable as we can
get TLS_WANT_POLLIN or TLS_WANT_POLLOUT on either operation.

deraadt@ buying it.  found by sthen@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Joel Sing
CVSROOT:/cvs
Module name:src
Changes by: js...@cvs.openbsd.org   2019/10/17 08:28:53

Modified files:
lib/libcrypto  : constant_time_locl.h 
lib/libcrypto/err: err.c 

Log message:
Provide err_clear_last_constant_time() as a way of clearing an error from
the top of the error stack in constant time.

This will be used by upcoming RSA changes.

>From OpenSSL 1.1.1d.

ok inoguchi@ tb@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2019/10/17 07:42:15

Modified files:
sys/arch/sgi/dev: iockbc.c mkbc.c 

Log message:
sgi: iockbc(4), mkbc(4): tsleep(9) -> tsleep_nsec(9); ok kn@ visa@



CVS: cvs.openbsd.org: src

2019-10-17 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2019/10/17 05:23:49

Modified files:
sys/net: if_pflog.c pf.c 
sys/tmpfs  : tmpfs_subr.c 

Log message:
Use -1 to indicate an invalid uid/gid, not UID_MAX and GID_MAX.
This is clearer and more consistent with the rest of the kernel.
OK deraadt@ sashan@



CVS: cvs.openbsd.org: src

2019-10-16 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2019/10/16 20:38:32

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

Log message:
sync



CVS: cvs.openbsd.org: src

2019-10-16 Thread David Gwynne
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/10/16 18:51:29

Modified files:
sys/netinet: in_pcb.h 
sys/netinet6   : in6_pcb.c 

Log message:
in6_setsockaddr and in6_setpeeraddr can't fail, so let them return void.

this also brings them in line with the AF_INET equivalents.

ok visa@ bluhm@



CVS: cvs.openbsd.org: src

2019-10-16 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/16 16:24:45

Modified files:
share/man/man4 : Makefile 
share/man/man4/man4.armv7: Makefile 
Added files:
share/man/man4 : sxidog.4 
Removed files:
share/man/man4/man4.armv7: sxidog.4 

Log message:
Make sxidog(4) MI.



CVS: cvs.openbsd.org: src

2019-10-16 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2019/10/16 16:11:17

Modified files:
sys/arch/armv7/sunxi: files.sunxi 
sys/dev/fdt: files.fdt 
Added files:
sys/dev/fdt: sxidog.c 
Removed files:
sys/arch/armv7/sunxi: sxidog.c 

Log message:
Move sxidog(4) such that we can use it on arm64.

ok patrick@



CVS: cvs.openbsd.org: src

2019-10-16 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2019/10/16 15:43:41

Modified files:
usr.sbin/rpki-client: main.c rpki-client.8 

Log message:
tweak previous; help/ok claudio



CVS: cvs.openbsd.org: src

2019-10-16 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2019/10/16 14:17:39

Modified files:
regress/sbin   : Makefile 

Log message:
Link regress ifconfig to build.



CVS: cvs.openbsd.org: src

2019-10-16 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2019/10/16 14:13:52

Log message:
Test various combinations of setting interface addresses with
ifconfig and check the expected result.  This covers the ifconfig(8)
program and the SIOCAIFADDR and SIOCDIFADDR ioctl(2).

Status:

Vendor Tag: bluhm
Release Tags:   bluhm_20191016

N src/regress/sbin/ifconfig/Makefile

No conflicts created by this import



CVS: cvs.openbsd.org: src

2019-10-16 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2019/10/16 11:43:29

Modified files:
usr.sbin/rpki-client: Makefile extern.h main.c rpki-client.8 
Added files:
usr.sbin/rpki-client: output-bird.c output-csv.c 

Log message:
Add an output format for bird and one doing CSV. Also update the manpage
to include all the changes.



CVS: cvs.openbsd.org: src

2019-10-16 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2019/10/16 11:38:46

Modified files:
usr.sbin/rpki-client: output-json.c output-bgpd.c 

Log message:
Clean up header includes. Most are no longer required.



CVS: cvs.openbsd.org: src

2019-10-16 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2019/10/16 11:37:46

Modified files:
usr.sbin/rpki-client: roa.c 

Log message:
Set the maxlength to either the prefixlen itself or the value from the ROA.
This way maxlength will always be set to a reasonable value and there is
no need to use a conditional to print the value.



CVS: cvs.openbsd.org: src

2019-10-16 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/16 04:22:01

Modified files:
sys/netinet: if_ether.c 

Log message:
tsleep(9) -> tsleep_nsec(9)

ok cheloha@, visa@



CVS: cvs.openbsd.org: src

2019-10-16 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/16 04:20:48

Modified files:
sys/net: if_tun.c switchctl.c 

Log message:
tsleep(9) -> tsleep_nsec(9)

ok cheloha@, visa@, akoshibe@



CVS: cvs.openbsd.org: src

2019-10-16 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/10/16 00:05:39

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

Log message:
potential NULL dereference for revoked hostkeys; reported by
krishnaiah bommu



CVS: cvs.openbsd.org: src

2019-10-16 Thread Damien Miller
CVSROOT:/cvs
Module name:src
Changes by: d...@cvs.openbsd.org2019/10/16 00:03:30

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

Log message:
free buf before return; reported by krishnaiah bommu



CVS: cvs.openbsd.org: src

2019-10-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2019/10/15 20:47:34

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

Log message:
vmd(8): provide some additional info in a debug msg

Print the guest %rip when it tries to do I/O to a nonexistent port.
Also convert the message to a DPRINTF so that it doesn't leak
guest address information into any logging the host might be doing
under normal non-debug conditions.



CVS: cvs.openbsd.org: src

2019-10-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2019/10/15 19:43:50

Modified files:
sys/dev/acpi   : dsdt.c 

Log message:
Add a few newer _OSI strings to the parser.

Early in the release cycle is the right time to do this.

"yes please" jcs@.  ok deraadt@



CVS: cvs.openbsd.org: src

2019-10-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2019/10/15 19:40:21

Modified files:
sys/dev/pci: pcidevs.h pcidevs_data.h 

Log message:
regen



CVS: cvs.openbsd.org: src

2019-10-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2019/10/15 19:39:32

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

Log message:
Fix a bunch of lines that had whitespace at the end



CVS: cvs.openbsd.org: src

2019-10-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2019/10/15 19:39:56

Modified files:
sys/dev/pci: pcidevs 

Log message:
Fix a bunch of lines that had whitespace at the end



CVS: cvs.openbsd.org: src

2019-10-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2019/10/15 19:27:59

Modified files:
sys/dev/acpi   : acpicpu.c 

Log message:
Remove trailing whitespace from a line



CVS: cvs.openbsd.org: src

2019-10-15 Thread Daniel Dickman
CVSROOT:/cvs
Module name:src
Changes by: dan...@cvs.openbsd.org  2019/10/15 18:16:35

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

Log message:
Fix reversed gotos; CID 1453190.

ok jmatthew@



CVS: cvs.openbsd.org: src

2019-10-15 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/15 04:27:25

Modified files:
usr.bin/ctfconv: ctfstrip 

Log message:
Include the .SUNW_ctf section in bsd.gdb

Once the section has been built from the DWARF symbols also add it to
the debug kernel.  That makes ddb(4) print the correct number of args
in function backtraces in such kernel as well.

While here make comment fit in 80 columns.

ok jasper@



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/sparc64/sparc64: db_trace.c 

Log message:
Fix db_stack_dump() w/ custom addr & implement db_save_stack_trace().

Substract the BIAS from the `addr' argument since the unwinding
algorithm assumes the given frame address doesn't include it.

In other words, account for the BIAS added by __builtin_frame_address().

Inputs from and ok kettenis@



CVS: cvs.openbsd.org: src

2019-10-15 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2019/10/15 04:05:43

Modified files:
sys/arch/m88k/m88k: m88k_machdep.c 
sys/kern   : kern_fork.c kern_sched.c kern_synch.c 
 sched_bsd.c 
sys/sys: sched.h 

Log message:
Reduce the number of places where `p_priority' and `p_stat' are set.

This refactoring will help future scheduler locking, in particular to
shrink the SCHED_LOCK().

No intended behavior change.

ok visa@



CVS: cvs.openbsd.org: src

2019-10-15 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/15 02:30:36

Modified files:
usr.bin/tmux   : options.c window-tree.c 

Log message:
Rewrite options_array_set to be clearer and remove a spurious warning
with newer GCC. From Ben Boeckel.



CVS: cvs.openbsd.org: src

2019-10-15 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/15 02:25:37

Modified files:
usr.bin/tmux   : cmd-join-pane.c cmd-resize-pane.c 
 cmd-split-window.c tmux.1 

Log message:
Add support for percentage sizes for resize-pane ("-x 10%"). Also change
split-window and join-pane -l to accept similar percentages and
deprecate -p. From Anindya Mukherjee.



CVS: cvs.openbsd.org: src

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

Modified files:
sys/arch/sparc64/sparc64: autoconf.c 

Log message:
Try to match the devid against the bootpath if link->port_wwn doesn't
work.  mpii(4) controllers tend not to provide the right wwn for sata devices,
so this helps if we happen to be booting off one of those.

ok dlg@ kettenis@



CVS: cvs.openbsd.org: src

2019-10-14 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2019/10/14 21:31:35

Modified files:
sys/dev/usb: xhcireg.h 

Log message:
Fix compiler's view of the alignment of xhci structs. Because the struct
fields are naturally aligned, it is enough to remove __packed.

This lets the compiler generate saner machine code. In particular, now
the compiler does not use lwl/lwr and swl/swr instructions on mips64
for changing xhci descriptors. The descriptors are properly aligned in
memory, so lwl/lwr and swl/swr end up doing a redundant load or store.

Feedback from guenther@ deraadt@
Tested on amd64 by krw@
OK mpi@ krw@ kettenis@



CVS: cvs.openbsd.org: src

2019-10-14 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2019/10/14 19:24:07

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

Log message:
When setting the modification time on the retrieved file, use utimensat()
with UTIME_OMIT for the atime, instead of setting the atime to the current
time.

ok jca@ cheloha@



Re: CVS: cvs.openbsd.org: src

2019-10-14 Thread Damien Miller
also ok deraadt@

On Mon, 14 Oct 2019, Damien Miller wrote:

> CVSROOT:  /cvs
> Module name:  src
> Changes by:   d...@cvs.openbsd.org2019/10/14 00:00:02
> 
> Modified files:
>   usr.bin/ssh: sshkey-xmss.c 
> 
> Log message:
> memleak in error path; spotted by oss-fuzz, ok markus@
> 
> 



CVS: cvs.openbsd.org: src

2019-10-14 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2019/10/14 13:22:17

Modified files:
usr.bin/vmstat : vmstat.c 
usr.sbin/iostat: iostat.c 
usr.bin/systat : main.c 

Log message:
pledge() won't work but we can use unveil() to reduce filesystem access
in these 3 related programs (they borrow parts of each other using .PATH)
Hopefully no regressions, ktrace checks by myself and mestre



CVS: cvs.openbsd.org: src

2019-10-14 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2019/10/14 09:23:44

Modified files:
.  : Makefile.cross 

Log message:
Re-sort the if-sequence which sets COMPILER_VERSION to be the same
as bsd.own.mk, otherwise on transitioning architectures the wrong
compiler is chosen.  Also make sure BUILD_CLANG is forced for the
libcompiler_rt directory since cross-compiling with two possible
compilers would create too much headache.



CVS: cvs.openbsd.org: src

2019-10-14 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2019/10/14 08:40:00

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

Log message:
some knf, preparing for other changes



CVS: cvs.openbsd.org: src

2019-10-14 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2019/10/14 08:38:07

Modified files:
.  : Makefile.cross 

Log message:
Fix whitespace issues



CVS: cvs.openbsd.org: src

2019-10-14 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2019/10/14 08:36:49

Modified files:
.  : Makefile.cross 

Log message:
powerpc cross-compilation on 64-bit hosts also appears to be safe.



CVS: cvs.openbsd.org: src

2019-10-14 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2019/10/14 08:32:26

Modified files:
.  : Makefile.cross 

Log message:
Pass LINKER_VERSION to binutils and clang cross-build so that they
know who the system linker is.



CVS: cvs.openbsd.org: src

2019-10-14 Thread Florian Obser
CVSROOT:/cvs
Module name:src
Changes by: flor...@cvs.openbsd.org 2019/10/14 05:07:08

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

Log message:
httpd(8) sent a 408 response every time a connection request timeout
was reached. This is not what other servers are doing, it leads to
ugly log messages and might confuse some clients.
benno@ analyzed that the correct behavior is (probably) to send a 408
when we are in the middle of receiving headers and time out there and
just close the connection in all other cases.
In particular, if a connection gets opened and no request is received
at all just close the connection. If a connection is set to keep-alive
and a request was handled and no further request is coming in just
close the connection. The later is the usual cause for spurious log
messages and client confusion.

Reported over the years by many.
Input, explanations and OK benno



CVS: cvs.openbsd.org: src

2019-10-14 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/14 03:24:06

Modified files:
usr.bin/tmux   : format.c 

Log message:
Do not crash with pane_current_command if the pane is newly created and
has no shell set, from Thomas Adam.



CVS: cvs.openbsd.org: src

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

Modified files:
sys/dev/usb: uvideo.c utvfu.c 

Log message:
Convert tsleep(9) to tsleep_nsec(9).

ok visa@, kn@



CVS: cvs.openbsd.org: src

2019-10-14 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/14 03:19:40

Modified files:
usr.bin/tmux   : input.c 

Log message:
Turn automatic-rename back on if the rename escape sequence is used with
an empty name, GitHub issue 1921.



CVS: cvs.openbsd.org: src

2019-10-14 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/14 03:16:48

Modified files:
usr.bin/tmux   : cmd-list-keys.c layout-custom.c 

Log message:
Some old tmux versions can sometimes generate layout strings which have
the incorrect size for the top cell. Previously tmux didn't care but now
that panes can be partly hidden, the size matters and is checked more
strictly. So add some code to fix up the most common problem and a
sanity check to reject layouts with any other size problems. Reported by
Aleksandrs Ledovskis in GitHub issue 1930.



CVS: cvs.openbsd.org: src

2019-10-14 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2019/10/14 02:38:07

Modified files:
usr.bin/tmux   : cmd-parse.y options.c tmux.c 

Log message:
Memory leaks, from Igor Wong in GitHub issue 1934.



  1   2   3   4   5   6   7   8   9   10   >