On Thu, May 04, 2017 at 09:43:07AM -0400, [email protected] wrote:
> 
> >Synopsis:    On 6.1/i386, config -e -u -o bsd.new bsd reports 
> >"kvm_openfiles: /dev/mem: Operation not permitted
> >Category:    system
> >Environment:
>       System      : OpenBSD 6.1
>       Details     : OpenBSD 6.1 (GENERIC) #1: Wed May  3 01:51:12 CEST 2017
>                        
> [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
> 
>       Architecture: OpenBSD.i386
>       Machine     : i386
> >Description:
>       My thinkpad is so old that it requires ACPI to be disabled in the
>       kernel, else the kernel will not boot.  It also requires clcs to
>       be disabled (the clcs probing code mistakenly thinks the hardware
>       is present on my thinkpad, which it isn't). To create a kernel 
>       (bsd.new) where acpi and clcs is disabled by default, I typically do 
>       this:
>               config -e -u -o bsd.new bsd
>       (then I interactively disable acpi and clcs and save the result). 
>       Then I rename bsd to bsd.old and bsd.new to bsd and reboot.
>       
>       However in OpenBSD 6.1, attempting to run config in this way fails,
>       with the message:
>       config: kvm_openfiles: /dev/mem: Operation not permitted
> 
> >How-To-Repeat:
>       config -e -u -o bsd.new bsd
> >Fix:
> Workaround: It's possible to work around this by manually compiling and 
>       installing a custom kernel where ACPI is disabled, or, on every boot, 
>       booting with -c and disabling ACPI.  Both workarounds are suboptimal.
> 
> 
> dmesg:
> OpenBSD 6.1 (GENERIC) #1: Wed May  3 01:51:12 CEST 2017
>     [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
> cpu0: Intel Celeron ("GenuineIntel" 686-class, 256KB L2 cache) 398 MHz
> cpu0: 
> FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PSE36,MMX,FXSR,PERF
> real mem  = 301285376 (287MB)
> avail mem = 282808320 (269MB)
> User Kernel Config
> UKC> disable acpi
> 492 acpi0 disabled
> UKC> disable clcs
>  87 clcs* disabled
> ..

The problem here is config(8) -u needs kvm(3) to access the changes made
during boot in UKC, with OpenBSD 6.1 access to /dev/{,k}mem was disabled
at securelevel > 0.

http://marc.info/?l=openbsd-cvs&m=147481705211536&w=2

You can still do, and retype the changes you require to be saved:
# config -e -o /bsd.new /bsd

Of course, sending a proper report about the issues with have with acpi
and clcs might better.

-Bryan.

Reply via email to