lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca789ce7-0983-a539-dcc9-3eddc8a347fe@list.ru>
Date:   Sat, 29 Oct 2016 00:03:34 +0300
From:   Stas Sergeev <stsp@...t.ru>
To:     Linux kernel <linux-kernel@...r.kernel.org>
Cc:     Andy Lutomirski <luto@...capital.net>
Subject: /dev/mem and PCI memory = EFAULT?

Hello.

For the long time dosemu used /dev/mem for vga pass-through.
Now it appears /dev/mem has this check:
http://lxr.free-electrons.com/source/drivers/char/mem.c#L51
which prevents an accesses to PCI memory regions if the
"high_memory" points low enough. It seems "high_memory"
just points to the end of the physical ram, so depending on
the ram size you either can access PCI devices or you get
EFAULT.
Was it wrong to use /dev/mem for accessing the PCI devices?
How should I do that now?

Note: I haven't properly tested that case. I can see the problem
only under qemu, because all my machines has enough ram for
the things to work. Still the failure under qemu makes me wonder
if I should stop using /dev/mem for accessing PCI memory.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ