OpenBSD cvs log

created 2021-07-01T16:19:50Z
begin 2021-06-01T00:00:00Z
end 2021-06-02T00:00:00Z
path src/sys
commits 7

date 2021-06-01T09:57:11Z
author dlg
files src/sys/net/pf.c log diff annotate
message a couple of minor whitespace tweaks. no functional change.

am i a pf hacker now?

date 2021-06-01T12:33:54Z
author stsp
files src/sys/dev/pci/if_iwx.c log diff annotate
message Fix iwx(4) firmware reloading after a failure to parse the firmware file.

Noticed by Peter N. M. Hansteen

This issue will also be fixed in iwm(4) soon, along with a firmware update.

date 2021-06-01T13:21:08Z
author stsp
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 Switch iwm(4) to new firmware images available in iwm-firmware-20210512.

This updates firmware for 3165, 3168, 7265, 8260, 8265, 9260, 9560 devices.
Other devices did not receive firmware updates from Intel.
New firmware images should contain revelant fixes for fragattacks:
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00473.html

Running fw_update(1) may be required before rebooting into a new kernel.
sysupgrade(8) will take care of this.

When reporting issues (I am sure there will be new "fatal firmware errors"
for some people) please enable 'ifconfig iwm0 debug', reproduce the error
once more, and include the full dmesg in your bug report.

Important changes required for new firmware:
- Support new variants of several existing firmware commands just
because Intel loves adding new features and changing the commands.
- Implement the 'clear persistence bit' workaround for 9k devices to
avoid potential issues during suspend/resume.
- Recognize Mobile Country Code update notifications for the regulatory
domain, like iwx(4) does.
- Handle PHY context updates more like the Linux iwlwifi driver does.
Some devices need an add/remove dance if the band has changed.
- For 9560, configure SoC latency parameters after booting firmware.
- Handle critical temperature notifications by shutting the device down.
- Use only antenna B for single-antenna Tx on 9k devices (matches what
Linux and FreeBSD do; Likely only matters if Bluetooth is active, but
who knows, Git logs and comments are the only documentation we have).

Other small fixes:
- Fix various scan command parameters. Some fixes were taken from iwx(4).
- Don't send probe requests when scanning passive channels. Experimentation
has shown that this will make 9k devices crash after associating to an AP.
This same fix does not seem to work on iwx(4) devices, where active scan
is disabled for the same reason, and it is not yet clear why.
- Fix firmware reloading after parsing the firmware image has failed.
- Flushing Tx rings will fail if the AP disappears. Don't make any noise
about that in dmesg, instead gracefully reset the device and continue.

Tested:
7260: florian
3168: kevlo
7265: stsp, mlarkin
8260: bket
8265: stsp, benno
9560: stsp, steven

date 2021-06-01T14:23:34Z
author mvs
files src/sys/net/rtsock.c log diff annotate
message Check `so_state' in rtm_senddesync() and return if SS_ISCONNECTED or
SS_CANTRCVMORE bits are set.

The first check required to prevent timeout_add(9) reschedule
`rop_timeout', otherwise timeout_del_barrier(9) can't help us.

The second check is for the case when shutdown(2) with SHUT_RD argument
occurred on this socket and we should not receive anything include
RTM_DESYNC packets.

ok claudio@

date 2021-06-01T18:03:56Z
author stsp
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 Revert iwm(4) firmware updates for now; robert@ reports stalled Tx on 9260

date 2021-06-01T21:12:11Z
author guenther
files src/sys/arch/amd64/amd64/locore.S log diff annotate
message Don't clear the cpu's bit in the old pmap's pm_cpus until we're off
the old one and set it in the new pmap's pm_cpus before loading
%cr3 with the new value. In particular, do neither if %cr3 isn't
changing.

This eliminates a window where, when switching between threads in
a single a process, the pmap wouldn't have this cpu's bit set even
though we didn't change %cr3. With more of uvm unlocked, it was
possible for another cpu to update the page tables but not see a
need to send an IPI to this cpu, leading to crashes when TLB entries
that should have been invalidated were used.

malloc_duel testing by abluhm@
ok abluhm@ kettenis@ mlarkin@

date 2021-06-01T22:54:43Z
author krw
files src/sys/kern/subr_disk.c log diff annotate
message Make spoofed disklabel boundstart and boundend default to the bounds
of the usable LBA range defined by the GPT header. And then shrink
them to the bounds of the first OpenBSD partition if one is found.

While here simplify the logic, eliminate some superfluous variables
and reduce use of magic numbers.

Improvement suggested by sobrado@ ok kettenis@