Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1169878 > unrolled thread
| Started by | Brian Gerst <brgerst@gmail.com> |
|---|---|
| First post | 2015-06-22 14:00 +0200 |
| Last post | 2015-06-22 14:00 +0200 |
| Articles | 4 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 00/12] x86/compat: Separate X32 from 32-bit compat Brian Gerst <brgerst@gmail.com> - 2015-06-22 14:00 +0200
[PATCH 07/12] x86/compat: get_gate_vma should check for both 32-bit compat and x32 Brian Gerst <brgerst@gmail.com> - 2015-06-22 14:00 +0200
[PATCH 08/12] x86/compat/perf: perf_callchain_user32 is only for 32-bit compat Brian Gerst <brgerst@gmail.com> - 2015-06-22 14:00 +0200
[PATCH 06/12] x86/compat: Don't build 32-bit vdso if not needed. Brian Gerst <brgerst@gmail.com> - 2015-06-22 14:00 +0200
| From | Brian Gerst <brgerst@gmail.com> |
|---|---|
| Date | 2015-06-22 14:00 +0200 |
| Subject | [PATCH 00/12] x86/compat: Separate X32 from 32-bit compat |
| Message-ID | <pE8ym-2Mp-5@gated-at.bofh.it> |
This patch series makes it possible to enable the X32 ABI support without the dependency on 32-bit compatability. Code that is shared between X32 and 32-bit compat is marked with CONFIG_COMPAT, but non-shared code like syscall entries, signal handling, and the VDSO are kept under separate config options. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Brian Gerst <brgerst@gmail.com> |
|---|---|
| Date | 2015-06-22 14:00 +0200 |
| Subject | [PATCH 07/12] x86/compat: get_gate_vma should check for both 32-bit compat and x32 |
| Message-ID | <pE8yn-2Mp-25@gated-at.bofh.it> |
| In reply to | #1169878 |
Change this to CONFIG_COMPAT so both 32-bit compat and x32 will do the
check.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
arch/x86/entry/vsyscall/vsyscall_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/entry/vsyscall/vsyscall_64.c b/arch/x86/entry/vsyscall/vsyscall_64.c
index 2dcc6ff..26a46f4 100644
--- a/arch/x86/entry/vsyscall/vsyscall_64.c
+++ b/arch/x86/entry/vsyscall/vsyscall_64.c
@@ -290,7 +290,7 @@ static struct vm_area_struct gate_vma = {
struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
{
-#ifdef CONFIG_IA32_EMULATION
+#ifdef CONFIG_COMPAT
if (!mm || mm->context.ia32_compat)
return NULL;
#endif
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Brian Gerst <brgerst@gmail.com> |
|---|---|
| Date | 2015-06-22 14:00 +0200 |
| Subject | [PATCH 08/12] x86/compat/perf: perf_callchain_user32 is only for 32-bit compat |
| Message-ID | <pE8yn-2Mp-29@gated-at.bofh.it> |
| In reply to | #1169878 |
perf_callchain_user32() is not needed for x32. Signed-off-by: Brian Gerst <brgerst@gmail.com> --- arch/x86/kernel/cpu/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 5801a14..1924fad 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -2206,7 +2206,7 @@ static unsigned long get_segment_base(unsigned int segment) return get_desc_base(desc + idx); } -#ifdef CONFIG_COMPAT +#ifdef CONFIG_IA32_EMULATION #include <asm/compat.h> -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Brian Gerst <brgerst@gmail.com> |
|---|---|
| Date | 2015-06-22 14:00 +0200 |
| Subject | [PATCH 06/12] x86/compat: Don't build 32-bit vdso if not needed. |
| Message-ID | <pE8yn-2Mp-35@gated-at.bofh.it> |
| In reply to | #1169878 |
Build the 32-bit vdso only for native 32-bit or 32-bit compat is
enabled. x32 should not force it to build.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
arch/x86/entry/vdso/Makefile | 6 +++---
arch/x86/entry/vdso/vma.c | 7 +++++--
arch/x86/include/asm/elf.h | 2 +-
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile
index e970320..96c0617 100644
--- a/arch/x86/entry/vdso/Makefile
+++ b/arch/x86/entry/vdso/Makefile
@@ -8,7 +8,7 @@ KASAN_SANITIZE := n
VDSO64-$(CONFIG_X86_64) := y
VDSOX32-$(CONFIG_X86_X32_ABI) := y
VDSO32-$(CONFIG_X86_32) := y
-VDSO32-$(CONFIG_COMPAT) := y
+VDSO32-$(CONFIG_IA32_EMULATION) := y
# files to link into the vdso
vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o
@@ -20,7 +20,7 @@ obj-y += vma.o
vdso_img-$(VDSO64-y) += 64
vdso_img-$(VDSOX32-y) += x32
vdso_img-$(VDSO32-y) += 32-int80
-vdso_img-$(CONFIG_COMPAT) += 32-syscall
+vdso_img-$(CONFIG_IA32_EMULATION) += 32-syscall
vdso_img-$(VDSO32-y) += 32-sysenter
obj-$(VDSO32-y) += vdso32-setup.o
@@ -126,7 +126,7 @@ $(obj)/vdsox32.so.dbg: $(src)/vdsox32.lds $(vobjx32s) FORCE
# Build multiple 32-bit vDSO images to choose from at boot time.
#
vdso32.so-$(VDSO32-y) += int80
-vdso32.so-$(CONFIG_COMPAT) += syscall
+vdso32.so-$(CONFIG_IA32_EMULATION) += syscall
vdso32.so-$(VDSO32-y) += sysenter
vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 1c9f750..4345431 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -177,7 +177,7 @@ up_fail:
return ret;
}
-#if defined(CONFIG_X86_32) || defined(CONFIG_COMPAT)
+#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
static int load_vdso32(void)
{
int ret;
@@ -219,8 +219,11 @@ int compat_arch_setup_additional_pages(struct linux_binprm *bprm,
return map_vdso(&vdso_image_x32, true);
}
#endif
-
+#ifdef CONFIG_IA32_EMULATION
return load_vdso32();
+#else
+ return 0;
+#endif
}
#endif
#else
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 2bf67c0..141c561 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -78,7 +78,7 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
#ifdef CONFIG_X86_64
extern unsigned int vdso64_enabled;
#endif
-#if defined(CONFIG_X86_32) || defined(CONFIG_COMPAT)
+#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
extern unsigned int vdso32_enabled;
#endif
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web