OpenBSD cvs log

created 2019-12-02T03:05:30Z
begin 2019-11-26T00:00:00Z
end 2019-11-27T00:00:00Z
path src/sys
commits 19

date 2019-11-26T00:26:36Z
author beck
files src/sys/kern/vfs_syscalls.c log diff annotate
message Don't use LOCKPARENT on namei calls for realpath(). We don't
require this anymore since we now behave like posix.

Fixes a problem where a symlink to / would return ENOTDIR because
the parent could not be locked - noticed by Raimo Niskanen

ok guenther@ deraadt@

date 2019-11-26T00:36:32Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Compute RSSI on 9k iwm(4) devices in the same way we do for previous
hardware generations. Fixes spurious > 100% signal strength values.
reported by and ok mlarkin@

date 2019-11-26T02:20:50Z
author jsg
files src/sys/arch/amd64/amd64/efifb.c log diff annotate
message When deciding if a pci device is 'primary' test if the efi fb memory
range is contained in a pci bar instead of only testing if the start
address of the efi fb is non zero.

Corrects a problem reported by Brennan Vincent on a Dell XPS 9575 with
amdgpu and inteldrm booted via efi. amdgpu would wrongly decide it was
primary on probe and as a result when encountering an unrelated error
efifb would reattach when amdgpu detached. When inteldrm would latter
attach an assert would trigger as efifb had already claimed the console.

ok kettenis@

date 2019-11-26T04:03:48Z
author dlg
files src/sys/net/if_tun.c log diff annotate
message use "sc" as the name of tun_softc variables, not "tp".

this makes the driver more like the rest of the tree. no functional change.

date 2019-11-26T05:39:11Z
author pd
files src/sys/arch/amd64/amd64/vmm.c log diff annotate
message vmm(4): fix pvclock accuracy issues

Shift math error discovered by George Koehler. Also, fix the error in tsc
multiplier which was correct only if the host timecounter was tsc.

ok mlarkin@

date 2019-11-26T06:23:30Z
author dlg
files src/sys/net/if_tun.c log diff annotate
message s/sc_arpcom/sc_ac/ to be consistent with other drivers.

no functional change

date 2019-11-26T07:37:50Z
author patrick
files src/sys/dev/pci/if_iwm.c log diff annotate
src/sys/dev/pci/if_iwmreg.h log diff annotate
src/sys/dev/pci/if_iwmvar.h log diff annotate
message Add support for MSI-X. MSI-X allows establishing a number of
interrupt vectors and mapping events (RX on queues, commands,
mgmt frames) to those vectors. For now we keep the existing
behaviour, establish a single vector and map all events to it.

Makes my Intel NUC 8i5BEH 9560 work
Tested by jcs@ on a 9560 (w/ MSI-X)
Tested by deraadt@ on a 9260 (w/ MSI-X)
Tested by phessler@ on a 8260 (w/o MSI-X)
ok stsp@

date 2019-11-26T15:27:08Z
author cheloha
files src/sys/kern/kern_tc.c log diff annotate
src/sys/kern/kern_timeout.c log diff annotate
src/sys/kern/uipc_socket.c log diff annotate
src/sys/sys/timeout.h log diff annotate
message timeout(9): switch to tickless backend

Rebase the timeout wheel on the system uptime clock. Timeouts are now
set to run at or after an absolute time as returned by nanouptime(9).
Timeouts are thus "tickless": they expire at a real time on that clock
instead of at a particular value of the global "ticks" variable.

To facilitate this change the timeout struct's .to_time member becomes a
timespec. Hashing timeouts into a bucket on the wheel changes slightly:
we build a 32-bit hash with 25 bits of seconds (.tv_sec) and 7 bits of
subseconds (.tv_nsec). 7 bits of subseconds means the width of the
lowest wheel level is now 2 seconds on all platforms and each bucket in
that lowest level corresponds to 1/128 seconds on the uptime clock.
These values were chosen to closely align with the current 100hz
hardclock(9) typical on almost all of our platforms. At 100hz a bucket
is currently ~1/100 seconds wide on the lowest level and the lowest
level itself is ~2.56 seconds wide. Not a huge change, but a change
nonetheless.

Because a bucket no longer corresponds to a single tick more than one
bucket may be dumped during an average timeout_hardclock_update() call.
On 100hz platforms you now dump ~2 buckets. On 64hz machines (sh) you
dump ~4 buckets. On 1024hz machines (alpha) you dump only 1 bucket,
but you are doing extra work in softclock() to reschedule timeouts
that aren't due yet.

To avoid changing current behavior all timeout_add*(9) interfaces
convert their timeout interval into ticks, compute an equivalent
timespec interval, and then add that interval to the timestamp of
the most recent timeout_hardclock_update() call to determine an
absolute deadline. So all current timeouts still "use" ticks,
but the ticks are faked in the timeout layer.

A new interface, timeout_at_ts(9), is introduced here to bypass this
backwardly compatible behavior. It will be used in subsequent diffs
to add absolute timeout support for userland and to clean up some of
the messier parts of kernel timekeeping, especially at the syscall
layer.

Because timeouts are based against the uptime clock they are subject to
NTP adjustment via adjtime(2) and adjfreq(2). Unless you have a crazy
adjfreq(2) adjustment set this will not change the expiration behavior
of your timeouts.

Tons of design feedback from mpi@, visa@, guenther@, and kettenis@.
Additional amd64 testing from anton@ and visa@. Octeon testing from visa@.
macppc testing from me.

Positive feedback from deraadt@, ok visa@

date 2019-11-26T16:14:45Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Eliminate some code duplication in iwm(4) 7k/8k vs. 9k Rx code paths.
Tested by mlarkin@ on 9560 and myself on 8265.
ok mlarkin@

date 2019-11-26T17:16:19Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Fix previous: Don't use an uninitialized variable in iwm_rx_frame().

date 2019-11-26T18:19:40Z
author mlarkin
files src/sys/uvm/uvm_map.c log diff annotate
message Fix a bunch of lines that had trailing whitespace.

No code change.

date 2019-11-26T18:23:48Z
author mlarkin
files src/sys/uvm/uvm_map.c log diff annotate
message Fix a panic string that had the wrong function name and an improperly
wrapped line.

No code change.

date 2019-11-26T18:50:29Z
author sashan
files src/sys/net/pf_ioctl.c log diff annotate
message fix kernel crash in pf_ioctl with WITH_PF_LOCK and NET_TASKQ > 1

the problem was introduced with a "mechanical" patch, which
replaced all "breaks;" with "PF_UNLOCK(); break;" This is wrong
for case of DIOCGETRULESETS.

issue analyzed and patch created by Joerg Goltermann

OK tb@

date 2019-11-26T19:08:01Z
author bluhm
files src/sys/arch/amd64/stand/efi32/efipxe.c log diff annotate
message Several functions expect that bootdev_dip is not NULL and can be
dereferenced. But there is no boot disk when EFI bootloader has
been received via TFPT. Fake a disk info that never maches a real
disk. Fixes a hang in run_loadfile() during HP Elitebook UEFI boot.
OK patrick@

date 2019-11-26T19:08:02Z
author bluhm
files src/sys/arch/amd64/stand/efi64/efipxe.c log diff annotate
src/sys/arch/amd64/stand/efiboot/efipxe.c log diff annotate
message Several functions expect that bootdev_dip is not NULL and can be
dereferenced. But there is no boot disk when EFI bootloader has
been received via TFPT. Fake a disk info that never maches a real
disk. Fixes a hang in run_loadfile() during HP Elitebook UEFI boot.
OK patrick@

date 2019-11-26T19:57:52Z
author kn
files src/sys/net/pf_ioctl.c log diff annotate
message Use proper NUL byte not zero with strings

No object change
OK sashan

date 2019-11-26T20:48:03Z
author krw
files src/sys/scsi/scsi_base.c log diff annotate
src/sys/scsi/st.c log diff annotate
message Don't zero existing values for density, block_count and block_size in
scsi_do_mode_sense(). Just update the values when valid data is
available. Initialize the variables passed to scsi_do_mode_sense() in
the one instance where they weren't already set.

Fixes issue with softraid crypto volumes on 4K-sector disks.

Found, fix tested, and ok tim@

date 2019-11-26T20:51:20Z
author krw
files src/sys/scsi/sd.c log diff annotate
message Reinitialize 'err' to ensure we are not checking a stale value.

Discovered by and ok tim@

date 2019-11-26T23:04:28Z
author claudio
files src/sys/dev/usb/if_umb.c log diff annotate
message When there is no network around the state timeout fires over and over again.
Change the printf into a log and only under IFF_DEBUG to reduce dmesg spam.
Loudly requested by beck@ OK deraadt@