compat_binfmt_elf Kconfig
Subsystems (5)
PATCH 1/1 compat_binfmt_elf Kconfig
In reply to a message not in the archiveThis patch should go in immediately after:
commit 5e45efc63e33ee2bae9ff4d500b53d3bf86d2b48 Author: Roland McGrath <[email protected]> compat_binfmt_elf
Thanks,
Roland
---
[PATCH] compat_binfmt_elf Kconfig
This adds Kconfig and Makefile bits to build fs/compat_binfmt_elf.c, just added. Each arch that wants to use this file needs to add a "select COMPAT_BINFMT_ELF" line in its Kconfig bits that enable COMPAT.
--- fs/Kconfig.binfmt | 4 ++++ fs/Makefile | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)
fs/Kconfig.binfmt +4 -0
@@ -23,6 +23,10 @@ config BINFMT_ELF ld.so (check the file <file:Documentation/Changes> for location and latest version). +config COMPAT_BINFMT_ELF + bool + depends on COMPAT && MMU + config BINFMT_ELF_FDPIC bool "Kernel support for FDPIC ELF binaries" default y
fs/Makefile +1 -0
@@ -39,6 +39,7 @@ obj-$(CONFIG_BINFMT_MISC) += binfmt_misc obj-y += 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 obj-$(CONFIG_BINFMT_SOM) += binfmt_som.o obj-$(CONFIG_BINFMT_FLAT) += binfmt_flat.o
PATCH 1/1 x86 compat_binfmt_elf
This patch replaces the earlier patch by the same title already in x86/mm:
commit a9014d2dfcb253fb3ce5f4e3318849f743b85427 Author: Roland McGrath <[email protected]> x86 compat_binfmt_elf
It requires the new patch I just posted, titled "compat_binfmt_elf Kconfig".
Thanks,
Roland
---
x86 compat_binfmt_elf
This switches x86-64's 32-bit ELF support to use the shared fs/compat_binfmt_elf.c code instead of our own ia32_binfmt.c.
--- arch/x86/Kconfig | 1 + arch/x86/ia32/Makefile | 3 +- arch/x86/vdso/vdso32-setup.c | 33 ++++++++++++++++ include/asm-x86/elf.h | 88 ++++++++++++++++++++++++++++++----------- 4 files changed, 99 insertions(+), 26 deletions(-)
arch/x86/Kconfig +1 -0
@@ -1546,6 +1546,7 @@ source "fs/Kconfig.binfmt" config IA32_EMULATION bool "IA32 Emulation" depends on X86_64 + select COMPAT_BINFMT_ELF help Include code to run 32-bit programs under a 64-bit kernel. You should likely turn this on, unless you're 100% sure that you don't have any
arch/x86/ia32/Makefile +1 -2
@@ -2,8 +2,7 @@ # Makefile for the ia32 kernel emulation subsystem. # -obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o \ - ia32_binfmt.o +obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o sysv-$(CONFIG_SYSVIPC) := ipc32.o obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
arch/x86/vdso/vdso32-setup.c +33 -0
@@ -377,6 +377,39 @@ int arch_setup_additional_pages(struct l__initcall (sysenter_setup); +#ifdef CONFIG_SYSCTL +/* Register vsyscall32 into the ABI table */ +#include <linux/sysctl.h> + +static ctl_table abi_table2[] = { + { + .procname ="vsyscall32" , + .data = &sysctl_vsyscall32, + .maxlen =sizeof (int ), + .mode =0644 , + .proc_handler = proc_dointvec + }, + {} +}; + +static ctl_table abi_root_table2[] = { + { + .ctl_name =CTL_ABI , + .procname ="abi" , + .mode =0555 , + .child = abi_table2 + }, + {} +}; + +static __init int ia32_binfmt_init (void ) +{ +register_sysctl_table (abi_root_table2); +return 0 ; +} +__initcall (ia32_binfmt_init); +#endif +#else /* CONFIG_X86_32 */ const char *arch_vma_name (struct vm_area_struct *vma)
include/asm-x86/elf.h +64 -24
142 lines not on this page · raw message
PATCH 1/1 powerpc compat_binfmt_elf
In reply to Roland McGrathThis replaces my earlier patch of the same title, posted with:
Subject: [PATCH -mm 18/43] powerpc compat_binfmt_elf Date: Thu, 20 Dec 2007 03:58:16 -0800 (PST)
This requires all the powerpc patches in that series from late December and also requires the new patch I just posted, titled "compat_binfmt_elf Kconfig".
Thanks,
Roland
---
powerpc compat_binfmt_elf
This switches the CONFIG_PPC64 support for 32-bit ELF to use the generic fs/compat_binfmt_elf.c implementation instead of our own binfmt_elf32.c. Since so much is the same between 32/64, there is only one macro we have to define to make the generic support work out of the box.
--- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/binfmt_elf32.c | 69 ------------------------------------ include/asm-powerpc/elf.h | 1 + 4 files changed, 3 insertions(+), 70 deletions(-)
arch/powerpc/Kconfig +1 -0
@@ -92,6 +92,7 @@ config EARLY_PRINTK config COMPAT bool default y if PPC64 + select COMPAT_BINFMT_ELF config SYSVIPC_COMPAT bool
arch/powerpc/kernel/Makefile +1 -1
@@ -15,7 +15,7 @@ obj-y := semaphore.o cputable.o ptrac init_task.o process.o systbl.o idle.o \ signal.o obj-y += vdso32/ -obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ +obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ signal_64.o ptrace32.o \ paca.o cpu_setup_ppc970.o \ cpu_setup_pa6t.o \
arch/powerpc/kernel/binfmt_elf32.c deleted +0 -69
69 lines not on this page · raw message
include/asm-powerpc/elf.h +1 -0
@@ -165,6 +165,7 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF* This is used to ensure we don't load something for the wrong architecture. */ #define elf_check_arch (x) ((x)->e_machine == ELF_ARCH) +#define compat_elf_check_arch (x) ((x)->e_machine == EM_PPC)#define USE_ELF_CORE_DUMP #define ELF_EXEC_PAGESIZE PAGE_SIZE
Quoted 43 lines · Roland McGrath
This patch should go in immediately after:
commit 5e45efc63e33ee2bae9ff4d500b53d3bf86d2b48 Author: Roland McGrath <[email protected]> compat_binfmt_elfThanks,
Roland---
[PATCH]compat_binfmt_elfKconfigThis adds
KconfigandMakefilebits to buildfs/compat_binfmt_elf.c, just added. Each arch that wants to use this file needs to add a "selectCOMPAT_BINFMT_ELF" line in itsKconfigbits that enable COMPAT.Signed-off-by Roland McGrath <[email protected]>--- fs/Kconfig.binfmt | 4 ++++ fs/Makefile | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)fs/Kconfig.binfmt +4
-0@@ -23,6 +23,10 @@ config BINFMT_ELF ld.so (check the file <file:Documentation/Changes> for location and latest version). +config COMPAT_BINFMT_ELF + bool + depends on COMPAT && MMU + config BINFMT_ELF_FDPIC bool "Kernel support for FDPIC ELF binaries" default yfs/Makefile +0
-0
fs/Makefile obj-$(CONFIG_BINFMT_MISC) += binfmt_misc · line 45
Quoted 7 lines
fs/Makefile +1
-0@@ -39,6 +39,7 @@ obj-$(CONFIG_BINFMT_MISC) += binfmt_misc obj-y += 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 obj-$(CONFIG_BINFMT_SOM) += binfmt_som.o obj-$(CONFIG_BINFMT_FLAT) += binfmt_flat.o
You totally missed the point of having selectable features noted by a config symbol named "HAVE_*".
When you see such a "HAVE_*" you know it is supposed to be selected and thus you need to be much more careful about the dependencies.
And my patch was purely a cooked up example btw and not at all tested. Should have been clear about that.
Sam
Ingo Molnar
AppliedQuoted 7 lines · Roland McGrath
This patch should go in immediately after:
commit 5e45efc63e33ee2bae9ff4d500b53d3bf86d2b48 Author: Roland McGrath <[email protected]> compat_binfmt_elf
Quoted 5 lines
Thanks,
Roland---
[PATCH]compat_binfmt_elfKconfig
thanks, applied.
Ingo
Ingo Molnar
AppliedRe: [PATCH -mm] x86 compat_binfmt_elf
In reply to Roland McGrathQuoted 10 lines · Roland McGrath
This patch replaces the earlier patch by the same title already in x86/mm:
commit a9014d2dfcb253fb3ce5f4e3318849f743b85427 Author: Roland McGrath <[email protected]> x86 compat_binfmt_elfIt requires the new patch I just posted, titled "
compat_binfmt_elfKconfig".
thanks, applied.
Ingo
Quoted 57 lines · Sam Ravnborg
Quoted 43 lines · Roland McGrath
This patch should go in immediately after:
commit 5e45efc63e33ee2bae9ff4d500b53d3bf86d2b48 Author: Roland McGrath <[email protected]> compat_binfmt_elfThanks,
Roland---
[PATCH]compat_binfmt_elfKconfigThis adds
KconfigandMakefilebits to buildfs/compat_binfmt_elf.c, just added. Each arch that wants to use this file needs to add a "selectCOMPAT_BINFMT_ELF" line in itsKconfigbits that enable COMPAT.Signed-off-by Roland McGrath <[email protected]>--- fs/Kconfig.binfmt | 4 ++++ fs/Makefile | 1 + 2 files changed, 5 insertions(+), 0 deletions(-)fs/Kconfig.binfmt +4
-0@@ -23,6 +23,10 @@ config BINFMT_ELF ld.so (check the file <file:Documentation/Changes> for location and latest version). +config COMPAT_BINFMT_ELF + bool + depends on COMPAT && MMU + config BINFMT_ELF_FDPIC bool "Kernel support for FDPIC ELF binaries" default yfs/Makefile +0
-0fs/Makefile obj-$(CONFIG_BINFMT_MISC) += binfmt_misc · line 45
Quoted 7 lines
fs/Makefile +1
-0@@ -39,6 +39,7 @@ obj-$(CONFIG_BINFMT_MISC) += binfmt_misc obj-y += 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 obj-$(CONFIG_BINFMT_SOM) += binfmt_som.o obj-$(CONFIG_BINFMT_FLAT) += binfmt_flat.oYou totally missed the point of having selectable features noted by a config symbol named "HAVE_*".
When you see such a "HAVE_*" you know it is supposed to be selected and thus you need to be much more careful about the dependencies.
Quoted 2 lines
And my patch was purely a cooked up example btw and not at all tested. Should have been clear about that.
My comment refer to a private mail - but I saw this hit lkml so a bit out of context.
Sam
I have no opinions about the config symbol names. Among the existing precedents for internal/descriptionless symbols I find more not using the HAVE_ prefix than those using it. The patch versions I've sent now work fine, fix the parallel build problem people were seeing, and AFAICT follow the style of what's already in common use. At this point, I think it would be easiest just to keep them and have you send symbol-renaming patches for any and all symbols of this sort that concern you as separate cleanups.
Thanks,
Roland
Quoted 3 lines · Roland McGrath
I have no opinions about the config symbol names. Among the existing precedents for internal/descriptionless symbols I find more not using the
HAVE_prefix than those using it.
The convention is newly established - so no suprise.
Quoted 5 lines
The patch versions I've sent now work
fine, fix the parallel build problem people were seeing, and AFAICT follow the style of what's already in common use. At this point, I think it would be easiest just to keep them and have you send symbol-renaming patches for any and all symbols of this sort that concern you as separate cleanups.
Would love to - but the pile of other kbuild stuff only gets bigger..
Sam