OpenBSD cvs log

created 2022-10-23T02:47:12Z
begin 2022-10-21T00:00:00Z
end 2022-10-22T00:00:00Z
path src/sys
commits 14

date 2022-10-21T14:20:03Z
author kn
files src/sys/net/if_loop.c log diff annotate
message Grab the non-exclusive net lock to read-only traverse the interface list

Destroying lo(4) interfaces checks for other interfaces in the same
rdomain(4) first which does not modify anything, so allow other readers.

All interface ioctl(2)s currently run with the kernel lock held, so this
should not make a real difference...

OK mvs

date 2022-10-21T17:45:40Z
author kn
files src/sys/dev/ic/aic79xx.h log diff annotate
src/sys/dev/ic/aic7xxxvar.h log diff annotate
src/sys/dev/pci/ahc_pci.c log diff annotate
src/sys/dev/pci/ahd_pci.c log diff annotate
message constify global identity tables

ah{c,d}_find_pci_device() already return their members as const.

OK krw

date 2022-10-21T18:10:52Z
author deraadt
files src/sys/sys/exec.h log diff annotate
message automatically mark immutable certain regions in program&ld.so LOADs.
The large commented block in elf_load_psection explains the sitaution.
ok kettenis.

date 2022-10-21T18:10:56Z
author deraadt
files src/sys/kern/exec_elf.c log diff annotate
src/sys/kern/exec_subr.c log diff annotate
message automatically mark immutable certain regions in program&ld.so LOADs.
The large commented block in elf_load_psection explains the sitaution.
ok kettenis.

date 2022-10-21T18:11:55Z
author deraadt
files src/sys/kern/exec_subr.c log diff annotate
src/sys/kern/kern_exec.c log diff annotate
message sigaltstack() was adapted to work on mimmutable regions (an unfortunate
compromise...), but it means the stack can be marked immutable again.
ok kettenis

date 2022-10-21T18:29:37Z
author kn
files src/sys/dev/usb/uvideo.c log diff annotate
message constify quirks table

Not that big now, but quirks are likely to grow in the feature and there is
no reason to keep them writable.

OK and tested by mglocker

date 2022-10-21T18:55:42Z
author miod
files src/sys/arch/sparc64/dev/creator.c log diff annotate
src/sys/arch/sparc64/fpu/fpu.c log diff annotate
src/sys/arch/sparc64/fpu/fpu_emu.h log diff annotate
src/sys/arch/sparc64/fpu/fpu_extern.h log diff annotate
src/sys/arch/sparc64/include/cpu.h log diff annotate
src/sys/arch/sparc64/include/db_machdep.h log diff annotate
src/sys/arch/sparc64/include/frame.h log diff annotate
src/sys/arch/sparc64/include/pcb.h log diff annotate
src/sys/arch/sparc64/include/proc.h log diff annotate
src/sys/arch/sparc64/include/reg.h log diff annotate
src/sys/arch/sparc64/sparc64/db_interface.c log diff annotate
src/sys/arch/sparc64/sparc64/db_trace.c log diff annotate
src/sys/arch/sparc64/sparc64/emul.c log diff annotate
src/sys/arch/sparc64/sparc64/genassym.cf log diff annotate
src/sys/arch/sparc64/sparc64/intr.c log diff annotate
src/sys/arch/sparc64/sparc64/locore.s log diff annotate
src/sys/arch/sparc64/sparc64/machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/process_machdep.c log diff annotate
src/sys/arch/sparc64/sparc64/trap.c log diff annotate
src/sys/arch/sparc64/sparc64/vm_machdep.c log diff annotate
message Remove vestigial bits of 32-bit binaries support; drop the `64' suffix in
struct names when the matching `32' flavour got removed.

Joint work with cheloha@, all bugs mine.

date 2022-10-21T19:13:31Z
author deraadt
files src/sys/kern/exec_subr.c log diff annotate
src/sys/kern/kern_exec.c log diff annotate
message the debug "name" parameter to uvm_map_immutable() is no longer needed

date 2022-10-21T19:13:32Z
author deraadt
files src/sys/uvm/uvm_map.c log diff annotate
message the debug "name" parameter to uvm_map_immutable() is no longer needed

date 2022-10-21T19:13:33Z
author deraadt
files src/sys/uvm/uvm_map.h log diff annotate
src/sys/uvm/uvm_mmap.c log diff annotate
message the debug "name" parameter to uvm_map_immutable() is no longer needed

date 2022-10-21T20:45:51Z
author deraadt
files src/sys/uvm/uvm_map.c log diff annotate
message Recent chrome renderers try to change some immutable RW region to R.
I really want immutable to not allow such transitions either, because it will
help bring code up to the highest standard.
For now, allow this for all processes, until we find out the underlying
reason.

date 2022-10-21T20:46:40Z
author deraadt
files src/sys/kern/exec_subr.c log diff annotate
message uvm_map_immutable() takes start,end, not start,end
I juggled my trees incorrectly.

date 2022-10-21T21:26:49Z
author gkoehler
files src/sys/arch/macppc/macppc/machdep.c log diff annotate
src/sys/arch/macppc/stand/Locore.c log diff annotate
src/sys/arch/macppc/stand/cache.c log diff annotate
src/sys/arch/macppc/stand/libsa.h log diff annotate
src/sys/arch/powerpc/include/cpu.h log diff annotate
src/sys/arch/powerpc64/powerpc64/syncicache.c log diff annotate
message Change len in syncicache(_, len) from int to size_t

The powerpc64 part is under #if 0, so this change affects only macppc.
Simplify powerpc64's __syncicache (which had size_t len) and copy it
to macppc's syncicache (which had int len).

macppc was looping while ((l -= CACHELINESIZE) > 0). The loop would
be infinite if l became an unsigned type like size_t. It is simpler
to set size_t i = 0, do i += by, and loop while (i < len). It helps
that dcbst and icbi can add 2 registers, from + i.

date 2022-10-21T22:42:36Z
author gkoehler
files src/sys/arch/macppc/dev/adb.c log diff annotate
src/sys/arch/macppc/dev/pm_direct.c log diff annotate
src/sys/arch/macppc/dev/pm_direct.h log diff annotate
src/sys/arch/macppc/include/cpu.h log diff annotate
src/sys/arch/macppc/macppc/machdep.c log diff annotate
src/sys/dev/adb/adb.h log diff annotate
src/sys/dev/adb/akbd.c log diff annotate
message hw.power, machdep.lidaction, machdep.pwraction for macppc

I can now use the power button to power off my macppcs running
OpenBSD. The new sysctls machdep.lidaction and machdep.pwraction act
like acpibtn(4), but we are missing code to suspend or hibernate a
macppc. Small kernels (bsd.rd) continue to ignore the power button.

adb(4) sends an environment interrupt when I unplug my PowerBook's AC
or close its lid. Rename PMU_INT_WAKEUP to PMU_INT_ENVIRONMENT like
other BSDs and Linux. Handle PMU_ENV_LID_CLOSED as a lid sensor and
PMU_ENV_AC_POWER by setting sysctl hw.power. Power buttons can either
use PMU_ENV_POWER_BUTTON or go through akbd(4); handle both kinds of
power buttons in the same way. Other models of macppc, with different
power buttons or lids, might not work yet. The lid sensor looks like,

$ sysctl hw.sensors
hw.sensors.adb0.indicator0=On (lid open)

kettenis@ warned against calling prsignal() from interrupt context,
and pointed me to task_add(9).