CVS: cvs.openbsd.org: src

2020-12-07 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2020/12/07 21:37:27

Modified files:
sys/dev/ic : an.c 

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

In an_wait() we spin for up to (3 * hz) iterations awaiting AN_EV_CMD.
If we don't see it in a given iteration we block for up to 1 tick and
spin again.

jsg@ suggests instead blocking for 100ms at a time for up to 30
iterations.

Discussed with mpi@.  Idea from jsg@.  Murmurs of agreement from
claudio@ and kettenis@.

probably ok jsg@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2020/12/07 20:27:54

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

Log message:
correct ttm_tt error paths if bus_dmamap_create() fails

Avoids a double free of gtt in amdgpu_ttm_tt_create() if the
bus_dmamap_create() call in ttm_sg_tt_init() fails and ttm_tt_destroy()
calls amdgpu_ttm_backend_destroy().

feedback from and ok kettenis@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Antoine Jacoutot
CVSROOT:/cvs
Module name:src
Changes by: ajacou...@cvs.openbsd.org   2020/12/07 14:19:28

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

Log message:
When asking to install patches and none are available, return 2.

man page and inputs from schwarze@
ok sthen@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2020/12/07 13:14:36

Modified files:
usr.sbin/btrace: bt.5 bt_parse.y 

Log message:
In revision 1.18 of bt_parse.y, I missed the fact that the print()
function accepts an optional argument representing the number of map
entries to print.

ok bluhm@ mpi@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2020/12/07 13:12:04

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

Log message:
Fix calculation of "maxlen" if there are multiple MPDUs in one packet.
Calculating "remain" by subtracting the offset after every parsed MPDU
is wrong and not necessary.  "offset" always points to the current position
in the receive buffer and the maximum size of the buffer is fixed,
thus knowing "offset" is sufficient for finding "maxlen".

Found by and fix from Christian Erhardt
ok stsp@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Tobias Heider
CVSROOT:/cvs
Module name:src
Changes by: to...@cvs.openbsd.org   2020/12/07 13:09:25

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

Log message:
Fix calculation of "maxlen" if there are multiple MPDUs in one packet.
Calculating "remain" by subtracting the offset after every parsed MPDU
is wrong and not necessary.  "offset" always points to the current position
in the receive buffer and the maximum size of the buffer is fixed,
thus knowing "offset" is sufficient for finding "maxlen".

Found by and fix from Christian Erhardt
ok stsp@ phessler@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2020/12/07 11:28:09

Modified files:
usr.sbin/btrace: btrace.c ksyms.c 

Log message:
In btrace(8) handle snprintf(3) errors correctly.  If snprintf
fails, buffer is unchanged; initialize it with empty string.  snprintf
may return negative value or the length that would have been written;
check and calculate remaining size.  snprintf writes size - 1
characters; pass buffer size as length.
OK mpi@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Greg Steuck
CVSROOT:/cvs
Module name:src
Changes by: gne...@cvs.openbsd.org  2020/12/07 10:34:49

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

Log message:
Initialize handled

ok kettenis@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2020/12/07 09:55:29

Modified files:
lib/libkvm : kvm_proc2.c 
sys/kern   : exec_elf.c init_main.c kern_exit.c kern_fork.c 
 kern_proc.c kern_resource.c kern_sig.c 
 kern_synch.c kern_sysctl.c subr_witness.c 
 sys_process.c tty.c 
sys/sys: proc.h 
sys/uvm: uvm_glue.c 

Log message:
Convert the per-process thread list into a SMR_TAILQ.

Currently all iterations are done under KERNEL_LOCK() and therefor use
the *_LOCKED() variant.

>From and ok claudio@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Claudio Jeker
CVSROOT:/cvs
Module name:src
Changes by: clau...@cvs.openbsd.org 2020/12/07 06:23:01

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

Log message:
Limit the URL embedded in .cer files to only consist out of isalnum or
ispunct characters. Everything else is fishy and so block those early on.
OK millert@ job@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2020/12/07 04:15:50

Modified files:
sys/kern   : kern_event.c 
sys/sys: event.h 

Log message:
Refactor kqueue_scan() so it can be used by other syscalls.

Stop iterating in the function and instead copy the returned events to
userland after every call.

ok visa@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2020/12/07 02:46:58

Modified files:
usr.bin/tmux   : screen-redraw.c 

Log message:
Do not include the status line size when working out the character for
the pane status line. GitHub issue 2493.



CVS: cvs.openbsd.org: src

2020-12-07 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2020/12/07 02:23:58

Modified files:
usr.bin/tmux   : screen-write.c 

Log message:
Do not clear the wrapped flag on linefeeds if it is already set - this
does not appear to be what applications want. GitHub issue 2478 and 2414.



CVS: cvs.openbsd.org: src

2020-12-07 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2020/12/07 02:14:09

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

Log message:
Use 1000baseKX, 2500baseKX and 10GbaseKR media types for fixed link
connections to an onboard switch.

ok patrick@



CVS: cvs.openbsd.org: src

2020-12-07 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2020/12/07 02:10:42

Modified files:
sys/dev/pci/drm/include/linux: mm.h 

Log message:
remove unused (and wrong) page_address() macro

this is supposed to return a va for a page not pa



CVS: cvs.openbsd.org: src

2020-12-07 Thread Alexandr Nedvedicky
CVSROOT:/cvs
Module name:src
Changes by: sas...@cvs.openbsd.org  2020/12/07 01:29:41

Modified files:
sbin/pfctl : parse.y 
sys/net: pf.c 
share/man/man5 : pf.conf.5 

Log message:
synproxy should be processing incoming SYN packets only.
issue noticed by sthen@. fix discussed with bluhm@ and procter@

OK bluhm@, kn@, procter@