[opensuse-kernel] [PATCH] unwind: update for vdso32 compat changes
Jan - Can you take a quick look at this? I don't have any 32-bit x86 machines to test with (or more accurately, I don't really want to have a 32-bit install *just* to test this.) The 32-bit builds are failing because of the removal of FIX_VDSO and I'd rather not "fix" it with the wrong thing. Thanks, -Jeff --- Commit b0b49f2673f (x86, vdso: Remove compat vdso support) removed the FIX_VDSO macro defining the vdso area. This patch updates it to use the vdso pointer and size to define the area instead. --- arch/x86/include/asm/elf.h | 1 + arch/x86/include/asm/unwind.h | 5 +++-- arch/x86/vdso/vdso32-setup.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) --- a/arch/x86/include/asm/elf.h +++ b/arch/x86/include/asm/elf.h @@ -76,6 +76,7 @@ typedef struct user_fxsr_struct elf_fpxr #include <asm/vdso.h> extern unsigned int vdso_enabled; +extern unsigned int vdso32_size; /* * This is used to ensure we don't load something for the wrong architecture. --- a/arch/x86/include/asm/unwind.h +++ b/arch/x86/include/asm/unwind.h @@ -141,8 +141,9 @@ static inline int arch_unw_user_mode(/*c #else return user_mode_vm(&info->regs) || info->regs.ip < PAGE_OFFSET - || (info->regs.ip >= __fix_to_virt(FIX_VDSO) - && info->regs.ip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) + || (info->mm->context.vdso && + info->regs.ip >= info->mm->context.vdso && + info->regs.ip < info->mm_context.vdso + vdso32_size) || info->regs.sp < PAGE_OFFSET; #endif } --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c @@ -71,7 +71,7 @@ EXPORT_SYMBOL_GPL(vdso_enabled); #endif static struct page **vdso32_pages; -static unsigned vdso32_size; +unsigned int vdso32_size; #ifdef CONFIG_X86_64 -- Jeff Mahoney SUSE Labs -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On 27.04.14 at 22:18, <jeffm@suse.com> wrote: Can you take a quick look at this? I don't have any 32-bit x86 machines to test with (or more accurately, I don't really want to have a 32-bit install *just* to test this.)
The 32-bit builds are failing because of the removal of FIX_VDSO and I'd rather not "fix" it with the wrong thing.
Conceptionally it looks right, but I suppose this wasn't compile tested and/or is stale, because ...
--- a/arch/x86/include/asm/unwind.h +++ b/arch/x86/include/asm/unwind.h @@ -141,8 +141,9 @@ static inline int arch_unw_user_mode(/*c #else return user_mode_vm(&info->regs) || info->regs.ip < PAGE_OFFSET - || (info->regs.ip >= __fix_to_virt(FIX_VDSO) - && info->regs.ip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) + || (info->mm->context.vdso && + info->regs.ip >= info->mm->context.vdso && + info->regs.ip < info->mm_context.vdso + vdso32_size)
... struct unwind_frame_info has no member "mm" or "mm_context", and the patch also doesn't add one. Depending on what your intentions here really were, ->mm (or, if you meant info->task->mm->, ->task and ->task->mm) may additionally need checking to be non-NULL here. Additionally I think this tells us that we may need to adjust older trees in this way too, to account for the VDSO_ENABLED case. Jan -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (2)
-
Jan Beulich
-
Jeff Mahoney