Messages in this thread Patch in this message | | | Date | Mon, 26 Apr 1999 13:36:13 +0530 (IST) | From | Sharad Agrawal <> | Subject | 2.2.6 - exec.c - CONFIG_BINFMT_MISC inconsistency . |
| |
Hi,
This is the final mail on this topici from our side. According to the response from *Linus* it is a policy to allow root users to override existing binary formats registered in the kernel via the CONFIG_BINFMT_MISC interface.
What we are trying to point out is , that this policy is not consistently followed when the support for CONFIG_BINFMT_MISC is compiled into the kernel.
When the support is compiled into the kernel , MISC handlers reach the end of the linked list, hence overriding existing formats is not possible
When the support is compiled as the module , MISC handlers are at the beginning of the linked list, hence overrides are possible.
To make this consistent we have attached the patch to exec.c , which now calls init_misc_binfmt() at the end of the initialisation sequence hence making sure that if the support for CONFIG_BINFMT_MISC is compiled into the kernel , the handlers are attached at the beginning of the linked list , making overrides possible.
This according to us is a viable solution.
Comments ??
Regards, Sharad/Suman Hughes Software Systems, India --- exec.c.orig Mon Apr 26 13:24:43 1999 +++ exec.c Mon Apr 26 13:25:03 1999 @@ -53,9 +53,6 @@ void __init binfmt_setup(void) { -#ifdef CONFIG_BINFMT_MISC - init_misc_binfmt(); -#endif #ifdef CONFIG_BINFMT_ELF init_elf_binfmt(); @@ -81,6 +78,9 @@ init_em86_binfmt(); #endif +#ifdef CONFIG_BINFMT_MISC + init_misc_binfmt(); +#endif /* This cannot be configured out of the kernel */ init_script_binfmt(); } | |