OpenBSD cvs log

created 2019-02-07T02:56:45Z
begin 2019-01-03T00:00:00Z
end 2019-01-10T00:00:00Z
path src/sys
commits 47

date 2019-01-03T00:59:58Z
author dlg
files src/sys/dev/fdt/if_dwxe.c log diff annotate
message if we run out of mbufs for the rx ring, run a timeout to refill them

claudio@ (i think) hit this a while back, and i've had this diff
in my tree since then. i'm putting it in now since it empirically
solved the problem and im sick of carrying the diff around.

date 2019-01-03T08:46:40Z
author claudio
files src/sys/netinet/ip_output.c log diff annotate
message Replace a funky 'else switch' construct into something that is equal but
a lot easier to read. The if can simply return the error and so the else
branch is no longer needed.
Input and OK dhill@

date 2019-01-03T08:56:53Z
author anton
files src/sys/dev/kcov.c log diff annotate
message Favor ENOTTY for unknown ioctl commands.

date 2019-01-03T17:06:22Z
author visa
files src/sys/arch/octeon/dev/octcrypto_asm.S log diff annotate
message Fix .end symbol.

From Mikhael Skvortsov

date 2019-01-03T18:59:27Z
author deraadt
files src/sys/arch/amd64/include/vmparam.h log diff annotate
message Crank MAXTSIZ to next pow2 (256MB) because a few piggy binaries
compiled with retpoline enabled are even piggier now.
diagnosed with robert kettenis and drahn

date 2019-01-03T21:52:31Z
author beck
files src/sys/kern/kern_unveil.c log diff annotate
src/sys/kern/vfs_lookup.c log diff annotate
src/sys/kern/vfs_syscalls.c log diff annotate
src/sys/sys/proc.h log diff annotate
message Fix a collection of covering unveil bugs that prevent unveil's of upper
level directories from working when you don't traverse into them starting
from /. Most found by brynet@ and a few others.
ok brynet@ deraadt@

date 2019-01-03T23:04:51Z
author dlg
files src/sys/arch/arm64/dev/simplebus.c log diff annotate
message add a simplebus print function so unconfigured devices appear in dmesg.

this was avoided previously because during the early stages of the
port, there were mostly unsupported devices. the situation is a bit
better now, so make the missing drivers more obvious so people can
get interested.

ok kettenis@

date 2019-01-04T11:13:35Z
author benno
files src/sys/net/if_gre.c log diff annotate
message make kernel build without INET6 again.
ok dlg@

date 2019-01-04T11:16:03Z
author benno
files src/sys/net/if_gre.c log diff annotate
message make kernel build without MPLS/mpe/mpw
ok claudio@ dlg@

date 2019-01-04T23:55:29Z
author dlg
files src/sys/dev/fdt/files.fdt log diff annotate
src/sys/dev/fdt/ohci_fdt.c log diff annotate
message add support for ohci, as found on the pine64

this currently relies on the usbphy code in the ehci fdt glue to
work, but this is a work in progress. there's an extra printf of
fdt in the dmesg to make the ohci checkrev code not look terrible.

ok kettenis@

date 2019-01-04T23:56:19Z
author dlg
files src/sys/arch/arm64/conf/GENERIC log diff annotate
message enable ohci at fdt

date 2019-01-05T02:58:36Z
author jsg
files src/sys/arch/arm64/conf/RAMDISK log diff annotate
message enable ohci at fdt on RAMDISK as well
ok dlg@

date 2019-01-05T03:42:19Z
author jsg
files src/sys/arch/arm/simplebus/simplebus.c log diff annotate
message match arm64 and print unconfigured simplebus devices on armv7
ok dlg@ kettenis@

date 2019-01-05T11:49:41Z
author jsg
files src/sys/dev/pci/pcidevs log diff annotate
message add more intel core and 300 series u ids

date 2019-01-05T11:50:32Z
author jsg
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message regen

date 2019-01-05T11:55:46Z
author jsg
files src/sys/dev/pci/if_em_hw.h log diff annotate
message Add em_pch_cnp to IS_ICH8 macro. Missed when adding em_pch_cnp.

date 2019-01-05T11:59:39Z
author jsg
files src/sys/arch/octeon/dev/simplebus.c log diff annotate
message match arm64 and armv7 and print unconfigured simplebus devices on octeon
ok and tested by visa@

date 2019-01-05T12:16:59Z
author visa
files src/sys/arch/mips64/mips64/tlbhandler.S log diff annotate
message Replace two-operand instruction aliases that clang does not
understand with the three-operand instructions.

No binary change with gas.

date 2019-01-05T12:18:13Z
author visa
files src/sys/arch/mips64/mips64/tlbhandler.S log diff annotate
message Expand a macro instruction for clang. Unlike gas, the integrated
assembler does not handle the large immediate value automatically.

date 2019-01-05T18:46:36Z
author kettenis
files src/sys/dev/pci/if_em_hw.h log diff annotate
message fix previous commit

"please commit asap" deraadt@

date 2019-01-06T02:15:40Z
author mlarkin
files src/sys/arch/amd64/amd64/pmap.c log diff annotate
message remove some old comments that were inherited from i386 (and wrong)

date 2019-01-06T11:05:09Z
author claudio
files src/sys/netinet/ip_output.c log diff annotate
message Rewrite ip_pcbopts() to fill a fresh mbuf with the ip options instead
of fiddling with the user supplied mbuf and then copy it at the end.
OK visa@

date 2019-01-06T12:59:45Z
author visa
files src/sys/kern/kern_exit.c log diff annotate
src/sys/kern/kern_fork.c log diff annotate
src/sys/kern/kern_resource.c log diff annotate
src/sys/kern/sched_bsd.c log diff annotate
src/sys/sys/proc.h log diff annotate
src/sys/sys/resourcevar.h log diff annotate
message Fix unsafe use of ptsignal() in mi_switch().

ptsignal() has to be called with the kernel lock held. As ensuring the
locking in mi_switch() is not easy, and deferring the signaling using
the task API is not possible because of lock order issues in
mi_switch(), move the CPU time checking into a periodic timer where
the kernel can be locked without issues.

With this change, each process has a dedicated resource check timer.
The timer gets activated only when a CPU time limit is set. Because the
checking is not done as frequently as before, some precision is lost.

Use of timers adapted from FreeBSD.

OK tedu@


date 2019-01-06T14:59:56Z
author kn
files src/sys/dev/softraidvar.h log diff annotate
message Unbreak SR_DEBUG builds

In arch/amd64/amd64/machdep.c r1.239 (21.02.2018) guenther added DPRINTF,
redefining the one from dev/softraidvar.h. softraid(4) has been using
DNPRINTF exclusively since import in 2007, so simply remove the DPRINTF
macro definition from there.

OK krw

date 2019-01-06T18:33:26Z
author kettenis
files src/sys/kern/kern_unveil.c log diff annotate
message Clear ps_uvpcwd when we free ps_uvpaths. Fixes a crash seen by kn@ and me
where ps_uvpcwd obviously contains a dangling pointer.

ok deraadt@, krw@

date 2019-01-06T18:35:55Z
author tedu
files src/sys/kern/kern_pledge.c log diff annotate
message fold a bunch of similar sysctl cases into a switch.
ok deraadt mestre

date 2019-01-06T21:43:19Z
author mlarkin
files src/sys/arch/amd64/include/pmap.h log diff annotate
message Increase L2 PTE reservation for the kernel

Bump the number of L2 page table entries reserved for the kernel from 16
to 64, to allow for larger kernels. This diff was in snaps for 21 days
without any reported fallout.

ok deraadt

date 2019-01-06T22:09:55Z
author deraadt
files src/sys/kern/kern_pledge.c log diff annotate
message the pledge handing for access(2) of /var/run/ypbind.lock is artificially
tough (so that non-YP using developers don't break the tree for YP/LDAP
users). This check failed to handle the newish RPATH+UNVEIL_INSPECT namei
discovered by florian, ok beck

date 2019-01-07T03:41:06Z
author dlg
files src/sys/arch/loongson/dev/ohci_voyager.c log diff annotate
src/sys/arch/octeon/dev/octohci.c log diff annotate
src/sys/dev/cardbus/ohci_cardbus.c log diff annotate
src/sys/dev/fdt/ohci_fdt.c log diff annotate
src/sys/dev/pci/ohci_pci.c log diff annotate
src/sys/dev/usb/ohci.c log diff annotate
message tweak ohci_checkrev so it doesnt print a leading comma and space.

it assumes that it always followed an interrupt string, but we don't
print that on fdt. having the bus responsible for the whitespace
means the fdt glue can print a colon to separate the bus info from
checkrev output, while every other glue keeps the comma.

ok deraadt@

date 2019-01-07T07:49:38Z
author claudio
files src/sys/kern/uipc_mbuf.c log diff annotate
message It is possible to call m_zero with a read-only cluster. In that case just
return. Hopefully the other reference holder has the M_ZEROIZE flag set as
well. Triggered by syzkaller. OK deradt@ visa@


date 2019-01-07T07:54:25Z
author claudio
files src/sys/netinet/raw_ip.c log diff annotate
message Validate the version, and all length fields of IP packets passed to a raw socket
with INP_HDRINCL. There is no reason to allow badly constructed packets through
our network stack. Especially since they may trigger diagnostic checks further
down the stack. Now EINVAL is returned instead which was already used for some
checks that happened before.
OK florian@


date 2019-01-07T14:24:22Z
author mpi
files src/sys/dev/usb/uhub.c log diff annotate
message Use the `iface' argument from the *attach() function instead of calling

ok visa@

date 2019-01-07T20:24:59Z
author anton
files src/sys/arch/amd64/conf/Makefile.amd64 log diff annotate
message Enabling both kcov and retguard is now possible due to the recent bump of
NKL2_KIMG_ENTRIES on amd64, allowing larger kernels.

ok mpi@; "that's great!" deraadt@

date 2019-01-07T23:44:11Z
author bluhm
files src/sys/arch/i386/pci/pci_machdep.c log diff annotate
message Extents code has its own set of flags and does not use malloc's.
The code in pci_init_extents() accidently passed M_NOWAIT which is
EX_FAST and does no harm. Replace it with EX_NOWAIT.
from Christian Ludwig; OK kettenis@

date 2019-01-08T01:47:55Z
author claudio
files src/sys/netinet/raw_ip.c log diff annotate
message Botched up an if conditional in the last commit. The IP length needs to
bigger than the IP header len to be valid. With this I can traceroute again.

date 2019-01-08T13:01:50Z
author bluhm
files src/sys/kern/uipc_mbuf.c log diff annotate
message If the mbuf cluster in m_zero() is read only, propagate the M_ZEROIZE
flag to the other references. Then the final m_free() will clear
the memory.
OK claudio@

date 2019-01-08T13:49:47Z
author uaa
files src/sys/dev/usb/ehci.c log diff annotate
message RL (NAK count reload) field in QH should be zero when using periodic
(interrupt) transfer.

When RL is not zero, interrupt transfer cannot work correctly.
It causes USB2.0 hub cannot detect device attach/detach.

ok by mpi@

date 2019-01-08T16:23:01Z
author sf
files src/sys/dev/pv/if_vio.c log diff annotate
src/sys/dev/pv/vioblk.c log diff annotate
src/sys/dev/pv/viocon.c log diff annotate
src/sys/dev/pv/viomb.c log diff annotate
message virtio: Don't include feature strings without VIRTIO_DEBUG

They are only used if VIRTIO_DEBUG is enabled.
This should make the kernel slightly smaller.

date 2019-01-08T16:24:09Z
author sf
files src/sys/dev/pv/viocon.c log diff annotate
message viocon: Remove obsolete handling of sc_intrhand

date 2019-01-09T01:14:21Z
author dlg
files src/sys/net/if.c log diff annotate
src/sys/net/if_var.h log diff annotate
message split if_enqueue up so drivers can replace ifq handling if needed

if_enqueue() still makes sure packets get handled by pf on the way
out, and seen by bridge if needed. however instead of falling through
to ifq mapping and output, it now calls a function pointer in the
ifnet struct. that pointer defaults to the ifq handling, but drivers
can override it to bypass ifq processing.

the most obvious users of the function pointer will be virtual
interfaces, eg, vlan(4). ifqs are good if you need to serialise
access to the thing that transmits packets (like hardware rings on
nics), or mitigate the number of times you do ring processing, but
neither of those things are desirable on vlan interfaces. ideally
vlan could transmit on any cpu without having packets serialised
by it's own ifq before being pushed down to an arbitrary number of
rings on the parent interface. bypassing ifqs means the driver can
push the vlan tag on concurrently and push down to the parent frmo
any cpu.

ok mpi@
no objection from claudio@

date 2019-01-09T01:17:09Z
author dlg
files src/sys/net/if_vlan.c log diff annotate
message implement an if_enqueue handler for vlan(4)

this allows vlan packets to bypass the ifq handling, which allows
packets to be encapsulated concurrently by any context. the code
falls back to ifqs if hfsc is enabled on the vlan interface, otherwise
it encaps the packet immedate and enqueues it on the parent interface.

hrove popovski has seen a performance bump in certain configurations
from this change.

ok mpi@
no objections claudio@

date 2019-01-09T11:23:32Z
author fcambus
files src/sys/dev/rasops/rasops.c log diff annotate
src/sys/dev/wsfont/wsfont.c log diff annotate
message Enable Spleen in wsfont and modify the font selection logic at runtime
in rasops(9) to allow selecting larger fonts when available.

Summary of the changes:

- Enable spleen8x16 for all architectures, replacing bold8x16_iso1.
- Enable spleen12x24 on all arches but sparc64, replacing gallant12x22.
- Enable spleen16x32 and spleen32x64 on amd64, i386, and arm64 for
GENERIC kernels.
- Modify the font selection logic in rasops(9) so the 16x32 and 32x64
fonts are selected if at least 120 columns can be displayed. Screens
with widths equal or larger than 1920px will use the 16x32 font, and
screens with widths equal or larger than 3840px the 32x64 one.

OK kettenis@, ratchov@, deraadt@

date 2019-01-09T12:10:37Z
author mpi
files src/sys/dev/usb/usb.c log diff annotate
message No need to call usbd_fill_deviceinfo() from a task, it doesn't generate I/O.

ok visa@

date 2019-01-09T12:11:38Z
author mpi
files src/sys/crypto/cryptosoft.c log diff annotate
src/sys/crypto/xform_ipcomp.c log diff annotate
message free(9) sizes.

ok visa@

date 2019-01-09T13:18:50Z
author yasuoka
files src/sys/arch/arm64/arm64/autoconf.c log diff annotate
src/sys/arch/arm64/stand/efiboot/efidev.c log diff annotate
src/sys/arch/arm64/stand/efiboot/exec.c log diff annotate
message Make arm64 efiboot can boot from partitions other than "a".

ok kettenis

date 2019-01-09T16:37:27Z
author visa
files src/sys/kern/uipc_mbuf.c log diff annotate
message Eliminate an else branch from m_extunref().

OK millert@ bluhm@

date 2019-01-09T18:11:22Z
author bluhm
files src/sys/ddb/db_examine.c log diff annotate
message Printing hex values with right adjustment makes it easier to compare
corresponding digits. So the change the ddb x/x output.
OK sashan@ deraadt@ visa@ mpi@