#35 hostfs doesn't like /proc

open
nobody
5
2001-12-13
2001-12-13
Adam Jackson
No

try this:

- build uml with hostfs built-in
- linux jail ubd0=/ init=/bin/bash
- run w(1) at the command prompt

notice how it spins for a while. kill uml, and try
again, but this time do 'strace w' and kill the VM
again really fast. notice how w(1) attempts to open
/proc/stat and /proc/uptime, and then gets no data from
them. verify this by trying to cat any other 0-length
file in /proc. for example, on 2.4.16, cat /proc/mtrr
works, but cat /proc/cpuinfo doesn't.

somewhere, uml is believing in stat(2) when it
shouldn't. it seems to be trusting the file size
reported by the host kernel, rather than just passing
read operations through like it should.

unfortunately, arch/um/fs/hostfs seems kinda obtuse at
the moment, so i don't have any idea of where to patch
this.

Discussion