The patch titled Subject: fs: make binfmt support for #! scripts modular and removable has been added to the -mm tree. Its filename is fs-make-binfmt-support-for-scripts-modular-and-removable.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Josh Triplett <josh@xxxxxxxxxxxxxxxx> Subject: fs: make binfmt support for #! scripts modular and removable Add a new configuration option CONFIG_BINFMT_SCRIPT to configure support for interpreted scripts starting with "#!"; allow compiling out that support, or building it as a module. Embedded systems running exclusively compiled binaries could leave this support out, and systems that don't need scripts before mounting the root filesystem can build this as a module. Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/Kconfig.binfmt | 14 ++++++++++++++ fs/Makefile | 5 +---- 2 files changed, 15 insertions(+), 4 deletions(-) diff -puN fs/Kconfig.binfmt~fs-make-binfmt-support-for-scripts-modular-and-removable fs/Kconfig.binfmt --- a/fs/Kconfig.binfmt~fs-make-binfmt-support-for-scripts-modular-and-removable +++ a/fs/Kconfig.binfmt @@ -65,6 +65,20 @@ config CORE_DUMP_DEFAULT_ELF_HEADERS This config option changes the default setting of coredump_filter seen at boot time. If unsure, say Y. +config BINFMT_SCRIPT + tristate "Kernel support for scripts starting with #!" + default y + help + Say Y here if you want to execute interpreted scripts starting with + #! followed by the path to an interpreter. + + You can build this support as a module; however, until that module + gets loaded, you cannot run scripts. Thus, if you want to load this + module from an initramfs, the portion of the initramfs before loading + this module must consist of compiled binaries only. + + Most systems will not boot if you say M or N here. If unsure, say Y. + config BINFMT_FLAT bool "Kernel support for flat binaries" depends on !MMU && (!FRV || BROKEN) diff -puN fs/Makefile~fs-make-binfmt-support-for-scripts-modular-and-removable fs/Makefile --- a/fs/Makefile~fs-make-binfmt-support-for-scripts-modular-and-removable +++ a/fs/Makefile @@ -34,10 +34,7 @@ obj-$(CONFIG_COMPAT) += compat.o compat obj-$(CONFIG_BINFMT_AOUT) += binfmt_aout.o obj-$(CONFIG_BINFMT_EM86) += binfmt_em86.o obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o - -# binfmt_script is always there -obj-y += binfmt_script.o - +obj-$(CONFIG_BINFMT_SCRIPT) += binfmt_script.o obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o obj-$(CONFIG_COMPAT_BINFMT_ELF) += compat_binfmt_elf.o obj-$(CONFIG_BINFMT_ELF_FDPIC) += binfmt_elf_fdpic.o _ Patches currently in -mm which might be from josh@xxxxxxxxxxxxxxxx are fs-dont-compile-in-drop_cachesc-when-config_sysctl=n.patch fs-make-binfmt-support-for-scripts-modular-and-removable.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html