On Tue, Feb 21, 2012 at 7:16 PM, David Miller <davem@davemloft.net> wrote:>> It's just a real fd, and there is no way to tell the compat'ness for> that. The mount operation literally passes in an integer attribute as> the pipefd mount option, and that's what it seems to use to send these> events.

Sure.

But I'm sure that the autofs daemon does something simple that we candepend on in practice. It's fine if we default to the current "nativesize" but then just have some heuristic that notices "oh, but we seemto be running a compat daemon". After all, this is very much a specialcase, I don't think we need to worry about people doing crazy thingsin *general*, the only thing we need to worry about is a legacy x86-32install that has been updated with a 64-bit kernel.

Where is that autofs daemon source code so that I can see what it does?

> The only way to fix this cess pool completely is to override the> read() fop on that pipe, and translate the event stream in-situ.>> What we could do is just manage the autofs messages as a linked list> of events, f.e. the packets in native format, then in the overridden> read() handler we either pass it along as is (for non-compat tasks) or> translate to compat format and copy that to userspace instead.