Re: [PATCH 0/7] x86 vdso32 cleanups
From: Andy Lutomirski
Date: Sat Aug 29 2015 - 12:11:37 EST
On Sat, Aug 29, 2015 at 8:20 AM, Brian Gerst <brgerst@xxxxxxxxx> wrote:
> This patch set contains several cleanups to the 32-bit VDSO. The
> main change is to only build one VDSO image, and select the syscall
> entry point at runtime.
Oh no, we have dueling patches!
I have a 2/3 finished series that cleans up the AT_SYSINFO mess
differently, as I outlined earlier. I've only done the compat and
common bits (no 32-bit native support quite yet), and it enters
successfully on Intel using SYSENTER and on (fake) AMD using SYSCALL.
The SYSRET bit isn't there yet.
Other than some ifdeffery, the final system_call.S looks like this:
The meat is (sorry for whitespace damage):
* Reshuffle regs so that all of any of the entry instructions
* will preserve enough state.
CFI_REL_OFFSET edx, 0
CFI_REL_OFFSET ecx, 0
movl %esp, %ecx
/* If SYSENTER is available, use it. */
ALTERNATIVE_2 "", "sysenter", X86_FEATURE_SYSENTER32, \
/* Enter using int $0x80 */
movl (%esp), %ecx
/* Restore ECX and EDX in case they were clobbered. */
And that's it.
What do you think? This comes with massively cleaned up kernel-side
asm as well as a test case that actually validates the CFI directives.
Certainly, a bunch of your patches make sense regardless, and I'll
review them and add them to my queue soon.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/