x86/vdso: Use .fault for the vDSO text mapping
authorAndy Lutomirski <luto@kernel.org>
Wed, 30 Dec 2015 04:12:22 +0000 (20:12 -0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 12 Jan 2016 10:59:34 +0000 (11:59 +0100)
commit05ef76b20fc4297b0d3f8a956f1c809a8a1b3f1d
tree3c9e09fc792c155064cc041efc4716473dbf45d0
parent352b78c62f27b356b182008acd3117f3ee03ffd2
x86/vdso: Use .fault for the vDSO text mapping

The old scheme for mapping the vDSO text is rather complicated.
vdso2c generates a struct vm_special_mapping and a blank .pages
array of the correct size for each vdso image.  Init code in
vdso/vma.c populates the .pages array for each vDSO image, and
the mapping code selects the appropriate struct
vm_special_mapping.

With .fault, we can use a less roundabout approach: vdso_fault()
just returns the appropriate page for the selected vDSO image.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/f886954c186bafd74e1b967c8931d852ae199aa2.1451446564.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/entry/vdso/vdso2c.h
arch/x86/entry/vdso/vma.c
arch/x86/include/asm/vdso.h