CVS: cvs.openbsd.org: src

2018-01-20 Thread Mike Belopuhov
CVSROOT:/cvs
Module name:src
Changes by: mi...@cvs.openbsd.org   2018/01/20 13:03:45

Modified files:
sys/dev/pv : if_xnf.c 

Log message:
Disable TCP and UDP transmit checksum offloading

In certain configurations, transmit checksum offloading doesn't
appear to work correctly, preventing correct TCP and UDP operation.
Some of these issues involving VLAN tagging are documented by the
Xen project.

Problem reported and fix tested by Imre Oolberg, thanks!



CVS: cvs.openbsd.org: src

2018-01-20 Thread Rob Pierce
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2018/01/20 11:49:12

Modified files:
usr.sbin/snmpd : trap.c 

Log message:
Fix uninitialized variable.

Ok jca@



CVS: cvs.openbsd.org: src

2018-01-20 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/20 11:35:41

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

Log message:
Re-enable the code that unmaps the startup code once more now that lld is
fixed.



CVS: cvs.openbsd.org: src

2018-01-20 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/01/20 11:11:31

Modified files:
distrib/sets/lists/comp: clang.armv7 

Log message:
sync



CVS: cvs.openbsd.org: src

2018-01-20 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2018/01/20 08:32:20

Modified files:
bin/ksh: tree.c 

Log message:
Remove code that has been disabled since 1999. From Michael W. Bombardieri who
also took the time to provide an excellent explanation on why the code isn't
useful on tech@.

ok jca@



CVS: cvs.openbsd.org: src

2018-01-20 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2018/01/20 05:01:56

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

Log message:
oops, no chomp, so get rid of the extra blank line by using print



CVS: cvs.openbsd.org: src

2018-01-19 Thread joshua stein
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/19 11:20:38

Modified files:
sys/dev/ic : dwiic.c dwiicvar.h 
sys/dev/acpi   : dwiic_acpi.c 

Log message:
dwiic: cleanup function prototypes after ACPI/PCI split



CVS: cvs.openbsd.org: src

2018-01-19 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/19 09:55:46

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

Log message:
sync



CVS: cvs.openbsd.org: src

2018-01-19 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/19 09:54:54

Modified files:
share/mk   : bsd.own.mk 

Log message:
Build clang on sparc64.

ok deraadt@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/19 09:17:36

Modified files:
share/mk   : bsd.own.mk 

Log message:
Switch the default compiler on armv7 to clang.

ok patrick@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/19 09:16:09

Modified files:
lib/libc/softfloat: softfloat-macros.h 

Log message:
Use static inline such that the functions are guaranteed to be present when
compiled with clang.

ok visa@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/19 08:33:27

Modified files:
sys/net: pf_ioctl.c 

Log message:
In pfioctl() a pf unlock was missing in the error path.
OK lteo@ sashan@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/19 07:23:52

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

Log message:
VMD: vioscsi - fix large ISO support in Linux

Check if n_blocks is less than UINT32_MAX and not the image size
in various places (READ_CAPACITY_* and GET_CONFIGURATION).

ok mlarkin@ and dlg@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/19 05:57:16

Modified files:
sys/net: pf.c 

Log message:
Use the pf state key linking functions in two more places instead
of doing it manually.
OK sashan@ visa@



CVS: cvs.openbsd.org: src

2018-01-19 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2018/01/19 04:34:41

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

Log message:
display the actual redirect message, as that's informative.
won't flood the terminal, since the first redirect changes the host
discussed with sthen



CVS: cvs.openbsd.org: src

2018-01-19 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/19 04:10:43

Modified files:
lib/libc/arch/arm/string: ffs.S 

Log message:
Partial revert of rev. 1.7, fixes build with clang

The error was:
--8<--
ffs.S:57:2: error: unsupported relocation on symbol
adrne r2, .L_ffs_table
^
-->8--

Minimal workaround suggested by deraadt@, ok guenther@ kettenis@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Gleydson Soares
CVSROOT:/cvs
Module name:src
Changes by: gsoa...@cvs.openbsd.org 2018/01/18 17:19:58

Modified files:
etc: changelist 

Log message:
/etc/snmpd.conf may contain passwords or other sensitive
data. diff provided by alf 
ok millert



CVS: cvs.openbsd.org: src

2018-01-18 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/01/18 16:42:13

Modified files:
lib/libc/arch/sparc64/string: ffs.S 

Log message:
Wow, it cannot even be in .data...



CVS: cvs.openbsd.org: src

2018-01-18 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2018/01/18 13:06:16

Modified files:
lib/libc/stdlib: malloc.c 

Log message:
Zap the rotor, it was a wrong idea. Cluebat applied by kshe who
came also up with this diff. Simple, no bias and benchmarks show the extra
random calls disappear in te measurement noise.



CVS: cvs.openbsd.org: src

2018-01-18 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/01/18 11:21:01

Modified files:
lib/libc/arch/sparc64/string: ffs.S 

Log message:
Sorry, the PIC macros cannot reach to .rodata



CVS: cvs.openbsd.org: src

2018-01-18 Thread Alexandre Ratchov
CVSROOT:/cvs
Module name:src
Changes by: ratc...@cvs.openbsd.org 2018/01/18 11:09:38

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

Log message:
Remove quirk matching all Yamaha devices, as this prevents non-MIDI
devices from attaching (ex uaudio devices).

ok mpi



CVS: cvs.openbsd.org: src

2018-01-18 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/18 11:08:51

Modified files:
sys/kern   : kern_malloc.c subr_pool.c 
sys/uvm: uvm_pdaemon.c 

Log message:
While booting it does not make sense to wait for memory, there is
no other process which could free it.  Better panic in malloc(9)
or pool_get(9) instead of sleeping forever.
tested by visa@ patrick@ Jan Klemkow
suggested by kettenis@;  OK deraadt@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Job Snijders
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/18 10:23:15

Modified files:
distrib/miniroot: install.sub 

Log message:
Make URL redirection sticky in the installer

Ensures that when URL redirection takes place, the rest of the install/upgrade
session will stick to that redirected location. This should help ensure that
the fetched set of files is coherent when a load balancer emits 301/302.

With feedback from rpe@

OK sthen@ rpe@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/01/18 07:28:11

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

Log message:
Discard all but the last line when reading from a #() command - the
callback is just going to be fired again straight away to go through all
the lines, it is better just to use the last one straight away.



CVS: cvs.openbsd.org: src

2018-01-18 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2018/01/18 07:04:04

Modified files:
distrib/octeon/ramdisk: install.md 

Log message:
Make the installer use the multiprocessor kernel if there is more
than one core available.

When bsd.mp is used, bsd.sp is not copied to the boot partition.
Old installations might not have enough space for all bsd.mp, bsd.sp
and bsd.rd.

OK deraadt@, krw@, pirofti@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2018/01/18 07:02:54

Modified files:
sys/arch/octeon/include: cpu.h 
sys/arch/octeon/octeon: machdep.c 

Log message:
Fix the computation of `ncpusfound' on !MULTIPROCESSOR kernels so that
the value matches with the number of cores that GENERIC.MP uses.

OK deraadt@, krw@, pirofti@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Mike Belopuhov
CVSROOT:/cvs
Module name:src
Changes by: mi...@cvs.openbsd.org   2018/01/18 04:43:20

Modified files:
sys/dev/pv : pvbus.c 

Log message:
Fix an off-by-one uncovered by the recent free(9) change

>From canacar@, thanks!



Re: CVS: cvs.openbsd.org: src

2018-01-18 Thread Anthony J. Bentley
Anthony J. Bentley writes:
> CVSROOT:  /cvs
> Module name:  src
> Changes by:   bent...@cvs.openbsd.org 2018/01/18 01:57:12
>
> Modified files:
>   sbin/mount : mount.8 
>
> Log message:
> Mark up mount(8) options with Cm.

ok jmc@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Anthony J . Bentley
CVSROOT:/cvs
Module name:src
Changes by: bent...@cvs.openbsd.org 2018/01/18 01:57:12

Modified files:
sbin/mount : mount.8 

Log message:
Mark up mount(8) options with Cm.



CVS: cvs.openbsd.org: src

2018-01-18 Thread Otto Moerbeek
CVSROOT:/cvs
Module name:src
Changes by: o...@cvs.openbsd.org2018/01/18 01:37:28

Modified files:
lib/libc/stdlib: malloc.c 

Log message:
Move to ffs(3) for bitmask scanning. I played with this earlier,
but at that time ffs function calls were generated instead of the
compiler inlining the code.  Now that ffs is marked protected in
libc this is handled better.  Thanks to kshe who prompted me to
look at this again.



CVS: cvs.openbsd.org: src

2018-01-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2018/01/18 01:23:44

Modified files:
lib/libc/include: namespace.h 
lib/libc/string: ffs.c 
lib/libc/hidden: string.h 
lib/libc/arch/alpha/string: ffs.S 
lib/libc/arch/amd64/string: ffs.S 
lib/libc/arch/arm/string: ffs.S 
lib/libc/arch/i386/string: ffs.S 
lib/libc/arch/mips64/string: ffs.S 
lib/libc/arch/sh/string: ffs.S 
lib/libc/arch/sparc64/string: ffs.S 

Log message:
Instead of trying to handle ffs() with the normal rename-mark-hidden-and-alias
dance, mark it protected.  This works better for both gcc and clang: gcc
blocks overriding of internal calls, while clang permits inlining again.

ok otto@



CVS: cvs.openbsd.org: src

2018-01-18 Thread Philip Guenther
CVSROOT:/cvs
Module name:src
Changes by: guent...@cvs.openbsd.org2018/01/18 01:17:39

Modified files:
sys/sys: exec_elf.h 
libexec/ld.so/mips64: rtld_machine.c 

Log message:
Unlike other archs, mips64 needs ld.so to know about symbol visibility and
skip symbol lookup on protected symbols.  Add visibility #defines to
 to support that.

ok kettenis@ visa@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/01/18 00:10:53

Modified files:
usr.bin/tmux   : hooks.c tmux.h 

Log message:
Remove unused hooks_run function, from Thomas Adam.



CVS: cvs.openbsd.org: src

2018-01-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/01/17 10:59:58

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

Log message:
sync



CVS: cvs.openbsd.org: src

2018-01-17 Thread Frederic Cambus
CVSROOT:/cvs
Module name:src
Changes by: fcam...@cvs.openbsd.org 2018/01/17 09:54:19

Modified files:
sys/dev/wscons : wsdisplay.c wskbd.c 

Log message:
Add sizes for free() in wscons(4).

OK deraadt@, visa@, mpi@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/01/17 09:33:33

Modified files:
sys/arch/amd64/amd64: aes_intel.S 

Log message:
Found a .data variable that can be in .rodata
ok mibek



CVS: cvs.openbsd.org: src

2018-01-17 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2018/01/17 08:52:34

Modified files:
sys/arch/sparc64/dev: vcctty.c vdsk.c vdsp.c vldcp.c vnet.c 

Log message:
In cbus(4) drivers, make it easier to identify which driver is doing
debug printfs about LDC link state changes. No functional change.

ok kettenis@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2018/01/17 06:35:52

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

Log message:
Remove erreneous and leftover slash that was part of the regex before
we switched to compiled regexes.  Fixes fw_update(1).

Noticed by deraadt@
ok sthen@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Marc Espie
CVSROOT:/cvs
Module name:src
Changes by: es...@cvs.openbsd.org   2018/01/17 06:25:36

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

Log message:
Process redirection messages from http.
This will help for round-robin sites in anchoring a pkg_add session to
a single site, thus removing shearing effects.
Initial idea from job@, reworked a lot by me,
enthusiastic okay sthen@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/17 03:22:25

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

Log message:
Defend agains branch predictor target injection (Spectre "variant 2")
attacks by flushing the branch predictor cache (BTB) on context switches
and page faults in kkernel address space.  Note that this relies on the
presence of firmware (such as Arm Trusted Firmware) that provides PSCI
services that flush the BTB on entry as described in Arm Trusted Firmware
Security Advisory TFV 6.

ok patrick@, visa@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/17 03:17:33

Modified files:
sys/dev/fdt: files.fdt psci.c 
Added files:
sys/dev/fdt: pscivar.h 

Log message:
Implement support for the PSCI_VERSION call and export the function such that
we can use it to defend against branch target injection attacks.

ok patrick@, visa@



CVS: cvs.openbsd.org: src

2018-01-17 Thread Patrick Wildt
CVSROOT:/cvs
Module name:src
Changes by: patr...@cvs.openbsd.org 2018/01/17 01:46:15

Modified files:
sys/lib/libsa  : printf.c 

Log message:
Implement basic padding support in libsa so we can do zero-padding
in bootloader printfs.

Feedback from and ok gerhard@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Anthony J . Bentley
CVSROOT:/cvs
Module name:src
Changes by: bent...@cvs.openbsd.org 2018/01/17 00:40:29

Modified files:
sys/dev/acpi   : acpidev.h acpiec.c 

Log message:
Disable ACPI burst mode on the 2015 Chromebook Pixel, where it freezes.

Diff from jcs@, ok pirofti@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/16 16:04:42

Modified files:
lib/libcompiler_rt: Makefile 

Log message:
On armv7, remove symbols that are also present in our libc.  Because of the
EABI aliases these can lead to duplicate symbol errors, especially when
mixing code compiled with gcc and clang.  The intention is to revert this
once we convert armv7 to hardfloat.

ok patrick@, guenther@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/16 15:52:32

Modified files:
bin/ksh: alloc.c c_ksh.c c_ulimit.c edit.c eval.c exec.c 
 io.c jobs.c main.c misc.c sh.h shf.c table.c 
 trap.c tree.c var.c vi.c 

Log message:
Introduce internal_warningf() and mark internal_errorf() as noreturn

This helps tools like scan-build, and follows the example of warningf()
and errorf().  ok anton@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Christian Weisgerber
CVSROOT:/cvs
Module name:src
Changes by: na...@cvs.openbsd.org   2018/01/16 14:42:40

Modified files:
usr.bin/signify: crypto_api.h 

Log message:
g/c unused defines that were only used by nacl's SHA-512 implementation
ok tedu@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2018/01/16 13:40:43

Modified files:
bin/ksh: c_ulimit.c 

Log message:
Stop constructing the ulimit optstring passed to ksh_getopt() at runtime since
it's rarely subject to change. While here, unifdef RLIMIT_VMEM.

ok jca@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Sebastian Benoit
CVSROOT:/cvs
Module name:src
Changes by: be...@cvs.openbsd.org   2018/01/16 12:44:34

Modified files:
sys/kern   : uipc_mbuf.c 

Log message:
garbage collect an unused variable
ok dlg@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/16 10:17:18

Modified files:
bin/ksh: emacs.c 

Log message:
One minor scan-build warning

emacs.c:1041:2: warning: Value stored to 'cp' is never read



CVS: cvs.openbsd.org: src

2018-01-16 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2018/01/16 10:07:49

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

Log message:
Use the monotonic clock to compute the session duration.

Ensures the correct duration is logged even if the system
time is changed during the session.

ok jca@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/01/16 10:03:18

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

Log message:
Fix drawing of ACS characters (they need to go character-at-a-time),
accidentally broken in last commit.



CVS: cvs.openbsd.org: src

2018-01-16 Thread Scott Soule Cheloha
CVSROOT:/cvs
Module name:src
Changes by: chel...@cvs.openbsd.org 2018/01/16 08:57:51

Modified files:
sbin/init  : init.8 

Log message:
GETTY_SLEEP is 30 seconds, not 10

ok deraadt@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2018/01/16 08:50:28

Modified files:
sys/arch/octeon/dev: octxctlreg.h 

Log message:
Fix bit.



CVS: cvs.openbsd.org: src

2018-01-16 Thread Visa Hankala
CVSROOT:/cvs
Module name:src
Changes by: v...@cvs.openbsd.org2018/01/16 08:22:14

Modified files:
sys/arch/octeon/dev: octxctl.c 

Log message:
Fix return value.



CVS: cvs.openbsd.org: src

2018-01-16 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/16 07:51:19

Modified files:
regress/sys/net/pf_forward: Makefile 

Log message:
Enable traceroute test for incoming reply-to rule.



CVS: cvs.openbsd.org: src

2018-01-16 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/16 07:48:39

Modified files:
sys/net: pf.c 

Log message:
If pf route-to is used for locally generated packets, they may have
an invalid source address.  As pf route-to happens after IP source
selection based on a different route, the address should be corrected
after pf has allocated the new route.  Especially loopback addresses
must not appear at outgoing packets.
OK sashan@ visa@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2018/01/16 03:33:55

Modified files:
sys/net: if.h 
sys/netinet: if_ether.c 
sbin/ifconfig  : brconfig.h ifconfig.8 ifconfig.c 
sbin/route : route.c 
usr.sbin/route6d: route6d.c 

Log message:
Recycle IFF_NOTRAILERS into IFF_STATICARP and document ownerhsip
of IFF* flags.

inputs from jmc@, ok bluhm@, visa@



CVS: cvs.openbsd.org: src

2018-01-16 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/01/16 02:00:38

Modified files:
usr.bin/tmux   : cmd-pipe-pane.c tmux.1 

Log message:
Add -I to pipe-pane to connect pane stdin as well as stdout, suggested
by Kristof Kovacs in GitHub issue 1186.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/15 23:10:45

Modified files:
usr.sbin/vmd   : vioscsi.c vioscsi.h 

Log message:
VMD: vioscsi - add support for REPORT_LUNS opcode

ok mlarkin@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/15 16:58:43

Modified files:
regress/sys/kern/mount: Makefile disktemplate 

Log message:
Add tests that unmount a file system while it is busy.  On a vnd
device "cp -r" and "rm -rf" are working in the background while
"umount -f" or "mount -ur" are executed.  Then "fsck -f" is used
to verify that the file system is clean.
Currently this triggers a bug quite reliably.  After the mount point
has been changed to read-only, the file system check shows that not
everything was flushed and synced properly.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/15 15:30:38

Modified files:
bin/ksh: history.c 

Log message:
Don't try to open HISTFILE if the variable is unset.

str_val returns null, not NULL, if the variable isn't set.  The
erroneous check means that we later tried to open("").

ok millert@ tb@ anton@ benno@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/15 15:24:17

Modified files:
sys/dev/pci/drm: drm_linux.c drm_linux.h 
sys/dev/pci/drm/i915: i915_drv.h intel_i2c.c 

Log message:
Switch the inteldrm(4) i2c code over to the Linux code base.  This gives us
several quirks that wre absent in the old OpenBSD-specific reimplementation.
Fixes several issues with external connectors on several generations of
hardware.

ok deraadt@, benno@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2018/01/15 14:30:49

Modified files:
sys/uvm: uvm_mmap.c 

Log message:
mask out (ie. ignore) the bit which will be MAP_STACK in the future,
so diffs in snapshots can exercise the change in a less disruptive way
idea with sthen, ok kettenis tom others



CVS: cvs.openbsd.org: src

2018-01-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/15 13:38:47

Modified files:
share/mk   : bsd.regress.mk 

Log message:
We have no deprecated regress variables in our tree.  Remove the
compatibility layer.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Bryan Steele
CVSROOT:/cvs
Module name:src
Changes by: bry...@cvs.openbsd.org  2018/01/15 12:45:51

Modified files:
usr.bin/file   : Makefile file.c 

Log message:
Revert my changes in r1.60 back to nicm@'s latest for now.

Fixes "file *|grep" breakage reported by espie@

ok nicm, deraadt



CVS: cvs.openbsd.org: src

2018-01-15 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2018/01/15 11:57:59

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

Log message:
tabs vs spaces



CVS: cvs.openbsd.org: src

2018-01-15 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/01/15 08:30:03

Modified files:
usr.bin/tmux   : cmd-find.c 

Log message:
Another redundant check, GitHub issue 1219.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2018/01/15 08:27:03

Modified files:
usr.bin/tmux   : cfg.c cmd-find.c cmd-load-buffer.c 

Log message:
Some unused code, GitHub issue 1219.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/15 07:58:05

Modified files:
bin/ksh: c_ksh.c config.h edit.c exec.c history.c lex.c 
 lex.h main.c misc.c sh.h var.c 

Log message:
Stop pretending we support building ksh without EDIT/HISTORY support

ok anton@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/15 07:11:16

Modified files:
sys/arch/arm/arm: cpu.c cpufunc_asm_armv7.S fault.c 
sys/arch/arm/include: cpu.h cpufunc.h 

Log message:
Improve defense against branch predictor target injection (Spectre "variant 2")
attacks.  OpenBSD/armv7 is already in pretty good shape as we have always
been flushing the branch predictor cache on context switches.  This diff adds
additional flushes to page faults in kernel address space.  The impact on
performance should be minimal as these page faults should only happen when
userland (deliberately or accidentally) tries to access kernel addres space
which would lead to a fatal signal (SIGSEGV or SIGBUS).

Loosely based on changes made by Marc Zyngier in Linux and based on
information in Arm Trusted Firmware Security Advisory TFV 6.

Note that for Cortex-A15 (and Cortex-A72) you will need firmware that sets
the ACTRL[0] bit for this diff to be effective.  Also note that with this
diff Cortex-A57 is still vulnerable.

ok jsg@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/15 06:48:32

Modified files:
sys/netinet: if_ether.c 
sys/netinet6   : nd6.c 

Log message:
There was an issue that dynamic path MTU discovery together with
ARP or ND timeout could delete local routes.  Put an assert into
arptfree() and nd6_free() so this cannot happen again.
OK mpi@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/15 05:27:45

Modified files:
regress/sys/net/pf_forward: Makefile 

Log message:
Enable traceroute test for incoming route-to rule.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/15 05:25:03

Modified files:
sys/net: pf.c 

Log message:
When pf(4) forwards incoming packets with route-to or reply-to,
decrement the time-to-live or hop-limit field to prevent routing
loops.  Sending an ICMP time exceeded error makes traceroute work.
For outgoing packets ip_forward() has already done this.
OK visa@ sashan@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Inoguchi Kinichiro
CVSROOT:/cvs
Module name:src
Changes by: inogu...@cvs.openbsd.org2018/01/15 04:02:07

Modified files:
usr.bin/openssl: s_cb.c 

Log message:
Add s_server and s_client -tlsextdebug messages

ok sthen@ jsing@



CVS: cvs.openbsd.org: src

2018-01-15 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2018/01/15 02:54:48

Modified files:
sbin/isakmpd   : connection.c crypto.c dnssec.c exchange.c 
 exchange.h ike_aggressive.c ike_auth.c 
 ike_main_mode.c ike_quick_mode.c init.c ipsec.c 
 isakmp_cfg.c isakmpd.c log.c message.h 
 monitor.c policy.c sa.h transport.h 
sbin/isakmpd/sysdep/openbsd: sysdep.c 

Log message:
Spacing, no object change.



CVS: cvs.openbsd.org: src

2018-01-15 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2018/01/15 01:48:40

Modified files:
usr.sbin/smtpd : spfwalk.c 

Log message:
fix parsing of RDATA for TXT records

ok gilles@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/15 00:47:46

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

Log message:
sync



CVS: cvs.openbsd.org: src

2018-01-14 Thread Mike Larkin
CVSROOT:/cvs
Module name:src
Changes by: mlar...@cvs.openbsd.org 2018/01/14 23:53:02

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

Log message:
Add some AVX512 CPUID flags.

discussed with sf and kettenis



CVS: cvs.openbsd.org: src

2018-01-14 Thread Carlos Cardenas
CVSROOT:/cvs
Module name:src
Changes by: ccarde...@cvs.openbsd.org   2018/01/14 21:26:58

Modified files:
usr.sbin/vmd   : vioscsi.c virtio.h 

Log message:
VMD: vioscsi refactor

Each opcode is now handled in the respective function (vioscsi_handle_xxx)
which allows more functionality to be added easier.

No functional changes confirmed by guest testing.

ok mlarkin@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/14 15:04:47

Modified files:
regress/bin: Makefile 

Log message:
Link ed regress to build.



CVS: cvs.openbsd.org: src

2018-01-14 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/14 15:01:48

Log message:
Run the tests provided in /usr/src/bin/ed/test with the regress
framework.  Three ed tests are currently failing for unknown reasons.
They are marked as disabled for now.
from Sergey Bronnikov

Status:

Vendor Tag: bluhm
Release Tags:   bluhm_20180114

N src/regress/bin/ed/Makefile

No conflicts created by this import



CVS: cvs.openbsd.org: src

2018-01-14 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/14 14:47:10

Modified files:
lib/libc   : shlib_version 
lib/libc/arch/arm: Symbols.list 

Log message:
Add two more ARM EABI aliases that I missed in the previous libc minor
bump.

"just go  ahead -- crank" deraadt@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/14 13:15:37

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

Log message:
Make cpu_ucode_debug non static so it can be changed from ddb.
OK patrick@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Anton Lindqvist
CVSROOT:/cvs
Module name:src
Changes by: an...@cvs.openbsd.org   2018/01/14 09:04:21

Modified files:
bin/ksh: config.h emacs.c eval.c main.c misc.c sh.h 

Log message:
unifdef BRACE_EXPAND; ok jca@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Robert Peichaer
CVSROOT:/cvs
Module name:src
Changes by: r...@cvs.openbsd.org2018/01/14 05:12:52

Modified files:
distrib/miniroot: install.sub 

Log message:
Prefetched sets are stored by root, but are read by an unprivileged
user during the actual install phase. Add a check to the selection
of the prefetch area to ensure the unprivleged user can read files
from there.

Move the selection logic to its own function prefetcharea_fs_list()
which returns a unique list of candidate filesystems, or with rc=1.
While at it, remove /var/tmp from the potential list of candidates
because it's a symbolic link to /tmp since 2014.

Change install_files() to loop over the candidates and check if it
can read a test file, otherwise clean up and skip this filesystem.

Problem found by benno@ whose upgrade failed due to /usr/obj being
owned by build:wobj and permissions that prevented the unprivileged
user to read the prefetched set files from there.

discussed with and OK benno@ halex@ tb@



CVS: cvs.openbsd.org: src

2018-01-14 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2018/01/14 04:51:34

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

Log message:
Pass our currently configured SSID to iwm(4) scan commands.

This makes connecting to silly "hidden" networks work, which was a long
standing problem with iwm(4). My past observations where other SSIDs were
filtered from scan results while associated can no longer be reproduced.

ok robert phessler



CVS: cvs.openbsd.org: src

2018-01-14 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2018/01/14 02:32:09

Modified files:
regress/sys/net/rtable: kern_compat.h 

Log message:
Fix after recent mutex change.



CVS: cvs.openbsd.org: src

2018-01-13 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/13 17:53:11

Modified files:
regress/usr.sbin/syslogd: args-client-tcp-octet-maxline.pl 

Log message:
Unlocking the TCP stack resulted in smaller TCP segments sent out
early on some machines.  Use the TCP_NOPUSH socket option to get
reliable regress results and syslogd(8) debug messages for grep.



CVS: cvs.openbsd.org: src

2018-01-13 Thread Alexander Bluhm
CVSROOT:/cvs
Module name:src
Changes by: bl...@cvs.openbsd.org   2018/01/13 17:33:09

Modified files:
sys/arch/amd64/amd64: powernow-k8.c 

Log message:
Use signed values to compare absolute difference.  The variables
fid and cfid are signed, so the FID_TO_VCO_FID() macro creates
signed results.  Keep the sign when passing to abs() although the
implicit conversions created the same binary.
OK deraadt@



CVS: cvs.openbsd.org: src

2018-01-13 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2018/01/13 13:40:43

Modified files:
usr.sbin/nsd   : configure.ac 

Log message:
Add descriptions for HAVE_B64_NTOP and HAVE_B64_PTON so autoheader
will run.  OK florian@



CVS: cvs.openbsd.org: src

2018-01-13 Thread Mark Kettenis
CVSROOT:/cvs
Module name:src
Changes by: kette...@cvs.openbsd.org2018/01/13 11:08:20

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

Log message:
Make things work when using the official device tree bindings used by the
Linux kernel.



CVS: cvs.openbsd.org: src

2018-01-13 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/13 10:13:12

Modified files:
lib/libc/sys   : kqueue.2 

Log message:
tweak previous;



CVS: cvs.openbsd.org: src

2018-01-13 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2018/01/13 08:57:58

Modified files:
sys/ufs/ext2fs : ext2fs_readwrite.c 

Log message:
In ext2fs_write(), clear the buffer on uiomove() failure unless it
was cleared on alloc just like we do in ffs_write().



CVS: cvs.openbsd.org: src

2018-01-13 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2018/01/13 08:56:02

Modified files:
sys/ufs/ffs: ffs_vnops.c 

Log message:
Add comment describing why we need to clear the buffer if uiomove()
fails, adapted from FreeBSD.  Also avoid clearing the buffer if it
was cleared when allocated.  OK deraadt@ otto@



CVS: cvs.openbsd.org: src

2018-01-13 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2018/01/13 08:43:39

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

Log message:
Adjust comment to reflect '%F' addition.



CVS: cvs.openbsd.org: src

2018-01-13 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2018/01/13 08:18:11

Modified files:
sys/arch/alpha/include: intr.h mutex.h 
sys/arch/amd64/include: intrdefs.h mutex.h 
sys/arch/arm64/include: intr.h mutex.h 
sys/arch/hppa/include: intr.h mutex.h 
sys/arch/i386/include: intrdefs.h mutex.h 
sys/arch/luna88k/include: intr.h 
sys/arch/m88k/include: mutex.h 
sys/arch/powerpc/include: intr.h mutex.h 
sys/arch/sparc64/include: intr.h mutex.h 

Log message:
Define and use IPL_MPFLOOR in our common mutex implementation.

ok kettenis@, visa@



CVS: cvs.openbsd.org: src

2018-01-13 Thread Stefan Sperling
CVSROOT:/cvs
Module name:src
Changes by: s...@cvs.openbsd.org2018/01/13 08:10:02

Modified files:
sys/arch/sparc64/dev: vldcp.c 

Log message:
In vldcp(8) fix a race between vldcpread() and vldcp_rx_intr() which
was overlooked by my previous fix.

Keep SPL at TTY in vldcpread() while manipulating the rx queue head.
Otherwise we could end up in a situation where:
1: vldcpread() reads rx_head
2: vldcpread() calls splx()
3: vldcp_rx_intr() fires, finds rx link is down, and sets rx_head = rx_tail
4: vlcdpread() resumes and sets rx_head to the value it read in step 1
-> same interrupt storm problem as described in my previous commit

ok kettenis@ mpi@



CVS: cvs.openbsd.org: src

2018-01-13 Thread Theo Buehler
CVSROOT:/cvs
Module name:src
Changes by: t...@cvs.openbsd.org2018/01/13 08:09:49

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

Log message:
Allow printf '%F' format specifier.

ok millert



CVS: cvs.openbsd.org: src

2018-01-13 Thread Jonathan Gray
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2018/01/13 07:15:07

Modified files:
sys/dev/pci/drm: drm_linux.h 

Log message:
Add a linux compatible request_firmware() wrapper around loadfirmware(9).
ok deraadt@ kettenis@



CVS: cvs.openbsd.org: src

2018-01-13 Thread Robert Nagy
CVSROOT:/cvs
Module name:src
Changes by: rob...@cvs.openbsd.org  2018/01/13 06:03:42

Modified files:
sys/dev/pci/drm: drmP.h drm_drv.c drm_linux.c 
sys/sys: conf.h 

Log message:
add kqueue support to drm(4) by making the drm_sysfs_hotplug_event()
available on OpenBSD well and by notifying listeners of a device
state change using EVFILT_DEVICE and NOTE_CHANGE.

drm_sysfs_hotplug_event() gets called when a state change of the device
occured, like an hdmi cable has been plugged, this in the future will
be used by the modesetting xorg driver to notify desktop environments
via randr events to update their screen configuration

ok kettenis@



  1   2   3   4   5   6   7   8   9   10   >