Bug 761

Summary: xdm walks /dev/mem
Product: xorg Reporter: Lon Hohberger <lhh>
Component: App/xdmAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: alan.coopersmith
Version: 6.7.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
strace of xdm running none

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.