binfmt_misc takes precedence over binfmt_script in 2.6.30

From: Chuck Ebbert
Date: Tue Sep 15 2009 - 00:31:35 EST


Steps to Reproduce:

mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
echo ':xyzzy:E::xyzzy::/usr/bin/stat:' > /proc/sys/fs/binfmt_misc/register
echo '#!/bin/cat' > /tmp/test.xyzzy
chmod +x /tmp/test.xyzzy
/tmp/test.xyzzy

Actual results:
The test prints the output of /usr/bin/stat /tmp/test.xyzzy

Expected results:
The test prints "#!/bin/cat".

This appears to have changed in the upstream git commit 74641f5 "alpha:
binfmt_aout fix". The commit message for that commit says "Fixed by changing
the registration order of the default binfmt handlers using list_add_tail() and
introducing insert_binfmt() function which places new handler on the top of the
binfmt list. This might be generally useful for installing arch-specific
frontends for default handlers or just for overriding them."

It's not clear that the new behavior is worse or better, but it's a
regression and should at the very least be documented.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/