Hi trondd,

Thanks for your answer!

I try to use "sysctl" command to modify "kern.allowkmem"'s value:

# sysctl kern.allowkmem=1
sysctl: kern.allowkmem: Operation not permitted

Since it doesn't work. So I create a "/etc/sysctl.conf" and add
follwing value:

kern.allowkmem=1

After referring the manuals of sysctl(https://man.openbsd.org/sysctl.8)
and sysctl.conf(https://man.openbsd.org/sysctl.conf.5), I can't find
how to reload the sysctl.conf, so I have no choine but to reboot it and
it takes effect.

So the only method of reloading sysctl.conf is just reboot? Sorry for
my further question.

Thank very much in advance!

Best Regards
Nan Xiao
Best Regards
Nan Xiao


On Tue, Sep 12, 2017 at 9:19 AM, trondd <tro...@kagu-tsuchi.com> wrote:
> On Mon, September 11, 2017 8:58 pm, Nan Xiao wrote:
>> Hi all,
>>
>> Greetings from me!
>>
>> I want to run dmidecode (https://github.com/mirror/dmidecode) on OpenBSD
>> 6.1, but executing it will report following errors:
>>
>> # ./dmidecode
>> # dmidecode 3.1
>> Scanning /dev/mem for entry point.
>> /dev/mem: Operation not permitted
>>
>> After single-step debugging, I find the error is from open /dev/mem:
>>
>>     if ((fd = open(filename, O_RDONLY)) == -1)
>>     {
>>          if (errno != ENOENT)
>>              perror(filename);
>>          return NULL;
>>     }
>>
>> I execute program as a root, and the attributes of `/dev/mem`:
>>
>> # ls -lt /dev/mem
>> crw-r-----  1 root  kmem    2,   0 Aug 25 18:38 /dev/mem
>>
>> So it should open successfully. Could anyone give some clues of this
>> issue?
>>
>> Thanks very much in advance!
>>
>> Best Regards
>> Nan Xiao
>>
>
> /dev/mem and /dev/kmem were locked down.
>
> https://marc.info/?l=openbsd-cvs&m=147481705211536&w=2
>
> I can't recall if it's been further closed since last year.
>

Reply via email to