Bug 761 - xdm walks /dev/mem
Summary: xdm walks /dev/mem
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/xdm (show other bugs)
Version: 6.7.0
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-17 08:05 UTC by Lon Hohberger
Modified: 2004-07-19 17:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
strace of xdm running (44.46 KB, text/plain)
2004-06-17 08:07 UTC, Lon Hohberger
no flags Details

Description Lon Hohberger 2004-06-17 08:05:57 UTC
As I understand it, this is to gather random data.  Shouldn't it use /dev/random
or /dev/urandom?
Comment 1 Lon Hohberger 2004-06-17 08:07:02 UTC
Created attachment 378 [details]
strace of xdm running

Here's an strace of xdm, including reading pieces of /dev/mem.
Comment 2 Lon Hohberger 2004-06-17 08:08:05 UTC
Note that walking physical memory pages on architectures which have holes in
physical RAM causes severe problems.
Comment 3 Lon Hohberger 2004-06-17 08:14:48 UTC
Clarification: Reading from a hole in physical memory on architectures which
support holes in physical memory (e.g. ia64) causes severe problems.
Comment 4 Alan Coopersmith 2004-06-17 09:37:49 UTC
xdm has code in for using /dev/random, but it's only used if the Imake
configuration for your OS is set to use it.  Right now, only NetBSD.cf & sun.cf
set HasDevRandom.   To activate it in your build, try adding this line to
xc/config/cf/host.def :
#define HasDevRandom          YES

To add it for your platform in general, look at the existing bits in NetBSD.cf and
sun.cf and the bits in X11.tmpl that translate them to flags used to compile xdm.
Comment 5 Søren Sandmann Pedersen 2004-07-20 10:48:47 UTC
I have enabled it by default on Linux

Tue Jul 20 18:23:32 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* config/cf/linux.cf: Use /dev/urandom on Linux.(#761).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.