OpenBSD cvs log

created 2020-11-21T19:31:34Z
begin 2020-07-09T00:00:00Z
end 2020-07-10T00:00:00Z
path src/sys
commits 22

date 2020-07-09T01:08:55Z
author dlg
files src/sys/dev/pci/if_mcx.c log diff annotate
message a couple of small tweaks that shrink the kstat code.

saves a few hundred bytes on both amd64 and sparc64

date 2020-07-09T01:38:36Z
author deraadt
files src/sys/arch/powerpc/include/Attic/timetc.h log diff annotate
message do not need this one either

date 2020-07-09T02:17:07Z
author cheloha
files src/sys/kern/kern_time.c log diff annotate
message adjfreq(2): limit adjustment to [-500000, +500000] ppm

When we recompute the scaling factor during tc_windup() there is an
opportunity for arithmetic overflow if the active timecounter's
adjfreq(2) adjustment is too large. If we limit the adjustment to
[-500000, +500000] ppm the statement in question cannot overflow.

In particular, we are concerned with the following bit of code:

scale = (u_int64_t)1 << 63;
scale += \
((th->th_adjustment + th->th_counter->tc_freq_adj) / 1024) * 2199;
scale /= th->th_counter->tc_frequency;
th->th_scale = scale * 2;

where scale is an int64_t. Overflow when we do:

scale += (...) / 1024 * 2199;

as th->th_counter->tc_freq_adj is currently unbounded.
th->th_adjustment is limited to [-5000ppm, 5000ppm].

To see that overflow is prevented with the new bounds, consider the
new edge case where th->th_counter->tc_freq_adj is 500000ppm and
th->th_adjustment is 5000ppm. Both are of type int64_t. We have:

int64_t th_adjustment = (5000 * 1000) << 32; /* 21474836480000000 */
int64_t tc_freq_adj = 500000000LL << 32; /* 2147483648000000000 */


scale = (u_int64_t)1 << 63; /* 9223372036854775808 */
scale += (th_adjustment + tc_freq_adj) / 1024 * 2199;
/* scale += 2168958484480000000 / 1024 * 2199; */
/* scale += 4657753620480000000; */

9223372036854775808 + 4657753620480000000 = 13881125657334775808,
which less than 18446744073709551616, so we don't have overflow.

On the opposite end, if th->th_counter->tc_freq_adj is -500000ppm and
th->th_adjustment is -5000ppm we would have -4657753620480000000.

9223372036854775808 - 4657753620480000000 = 4565618416374775808.
Again, no overflow.

500000ppm and -500000ppm are extreme adjustments. otto@ says ntpd(8)
would never arrive at them naturally, so we are not at risk of breaking
a working setup by imposing these restrictions.

Documentation input from kettenis@.

No complaints from otto@.

date 2020-07-09T07:45:13Z
author fcambus
files src/sys/dev/wsfont/wsfont.c log diff annotate
message Enable spleen16x32 and spleen32x64 on armv7 for GENERIC kernels.

OK kettenis@, deraadt@, patrick@

date 2020-07-09T10:14:28Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c log diff annotate
message drm/amd/display: Fix incorrectly pruned modes with deep color

From Stylon Wang
60c60af1adffdc4a34f4b13acc44a02ec33169b1 in linux 5.7.y/5.7.8
cbd14ae7ea934fd9d9f95103a0601a7fea243573 in mainline linux

date 2020-07-09T10:16:53Z
author jsg
files src/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c log diff annotate
message drm/amd/display: Fix ineffective setting of max bpc property

From Stylon Wang
b903524c8a60a3e9d5eede7fc87f1012332b929f in linux 5.7.y/5.7.8
fa7041d9d2fc7401cece43f305eb5b87b7017fc4 in mainline linux

date 2020-07-09T10:19:44Z
author jsg
files src/sys/dev/pci/drm/i915/gt/intel_timeline.c log diff annotate
message drm/i915/gt: Mark timeline->cacheline as destroyed after rcu grace period

From Chris Wilson
18ad3ad0b9b35370182ae4a7dbd89a77168df19e in linux 5.7.y/5.7.8
8e87e0139aff59c5961347ab1ef06814f092c439 in mainline linux

date 2020-07-09T10:25:28Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c log diff annotate
src/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c log diff annotate
src/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.h log diff annotate
message drm/amdgpu: disable ras query and iject during gpu reset

From John Clements
50a8cfb0e71644f2882dbfaf93150184094245bd in linux 5.7.y/5.7.8
61380faa4b4cc577df8a7ff5db5859bac6b351f7 in mainline linux

date 2020-07-09T10:28:27Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c log diff annotate
message drm/amdgpu: fix non-pointer dereference for non-RAS supported

From Evan Quan
9c33bf981fab14ffbde2635d6e3d7d0818bac5a8 in linux 5.7.y/5.7.8
a9d82d2f91297679cfafd7e61c4bccdca6cd550d in mainline linux

date 2020-07-09T10:31:13Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c log diff annotate
message drm/amdgpu: fix kernel page fault issue by ras recovery on sGPU

From Guchun Chen
18b1cf2968e1baa883dbdf6adef6213626beaa0f in linux 5.7.y/5.7.8
12c17b9d62663c14a5343d6742682b3e67280754 in mainline linux

date 2020-07-09T10:40:57Z
author jsg
files src/sys/dev/pci/drm/i915/gt/shaders/README log diff annotate
src/sys/dev/pci/drm/i915/gt/shaders/clear_kernel/hsw.asm log diff annotate
src/sys/dev/pci/drm/i915/gt/shaders/clear_kernel/ivb.asm log diff annotate
message drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.c

From Rodrigo Vivi
95e961c6c23c35bb9f190f8d6bd13f1606de5a48 in linux 5.7.y/5.7.8
55fd7e0222ea01246ef3e6aae28b5721fdfb790f in mainline linux

date 2020-07-09T10:45:36Z
author jsg
files src/sys/dev/pci/drm/amd/powerplay/smumgr/vega20_smumgr.c log diff annotate
message drm/amd/powerplay: Fix NULL dereference in lock_bus() on Vega20 w/o RAS

From Ivan Mironov
13b2fe391cac70c7746e2cb68e73d99002f1cd00 in linux 5.7.y/5.7.8
7e89e4aaa9ae83107d059c186955484b3aa6eb23 in mainline linux

date 2020-07-09T10:49:23Z
author jsg
files src/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c log diff annotate
message drm/amd/display: Only revalidate bandwidth on medium and fast updates

From Nicholas Kazlauskas
fcb408a7282302bd8b8afc6ef8db42b4eece23ee in linux 5.7.y/5.7.8
6eb3cf2e06d22b2b08e6b0ab48cb9c05a8e1a107 in mainline linux

date 2020-07-09T10:51:31Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_pm.c log diff annotate
message drm/amdgpu: use %u rather than %d for sclk/mclk

From Alex Deucher
c337fc540bb99e476e33153a9196eba4749a707a in linux 5.7.y/5.7.8
beaf10efca64ac824240838ab1f054dfbefab5e6 in mainline linux

date 2020-07-09T10:54:39Z
author jsg
files src/sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c log diff annotate
message drm/amdgpu/atomfirmware: fix vram_info fetching for renoir

From Alex Deucher
fceff9423f428a62a20bb8fb8f66e6a9f906f12c in linux 5.7.y/5.7.8
d7a6634a4cfba073ff6a526cb4265d6e58ece234 in mainline linux

date 2020-07-09T14:42:54Z
author deraadt
files src/sys/arch/sh/include/Attic/timetc.h log diff annotate
message another excess file

date 2020-07-09T19:17:19Z
author millert
files src/sys/lib/libsa/bcrypt_pbkdf.c log diff annotate
message Fix a warning false positive from clang 10.
blf_enc() takes a number of 64-bit blocks to encrypt, but using
sizeof(uint64_t) in the calculation triggers a warning from clang
10 because the actual data type is uint32_t. Pass BCRYPT_WORDS / 2
for the number of blocks like libc bcrypt(3) does. OK kettenis@

date 2020-07-09T21:01:08Z
author jcs
files src/sys/dev/hid/hidmt.c log diff annotate
message Some touchpads don't have the "maximum number of contacts" or
"button type" usages, so assume some reasonable defaults rather than
failing to attach.

Fixes two Dell Latitude laptops and tested in snaps for a bit.

date 2020-07-09T21:01:55Z
author jcs
files src/sys/dev/i2c/ihidev.c log diff annotate
message On some laptops that have a Windows Precision Touchpad (imt) and
also a trackstick or separate physical buttons, imt was claiming all
report ids of the ihidev device preventing the trackstick/buttons
from attaching as a separate ims device on other report ids.

Just claim the report ids that imt needs and let ims attach to
others it may find.

Fixes two Dell Latitude laptops and tested in snaps for a bit.

date 2020-07-09T21:01:56Z
author jcs
files src/sys/dev/i2c/ihidev.h log diff annotate
src/sys/dev/i2c/imt.c log diff annotate
message On some laptops that have a Windows Precision Touchpad (imt) and
also a trackstick or separate physical buttons, imt was claiming all
report ids of the ihidev device preventing the trackstick/buttons
from attaching as a separate ims device on other report ids.

Just claim the report ids that imt needs and let ims attach to
others it may find.

Fixes two Dell Latitude laptops and tested in snaps for a bit.

date 2020-07-09T22:34:25Z
author krw
files src/sys/dev/ic/adv.c log diff annotate
message Move sc->sc_link initialization closer to config_found() invocation
like all the cool drivers do.

date 2020-07-09T22:48:05Z
author krw
files src/sys/dev/pci/mpii.c log diff annotate
message Move sc->sc_link initialization closer to config_found() invocation
like all the cool drivers do.