lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 6 Oct 2015 09:25:08 +0100 From: Linus Torvalds <torvalds@...ux-foundation.org> To: Andy Lutomirski <luto@...nel.org> Cc: "the arch/x86 maintainers" <x86@...nel.org>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Brian Gerst <brgerst@...il.com>, Denys Vlasenko <dvlasenk@...hat.com>, Borislav Petkov <bp@...en8.de> Subject: Re: [PATCH v2 22/36] x86/entry: Add C code for fast system call entries On Tue, Oct 6, 2015 at 1:48 AM, Andy Lutomirski <luto@...nel.org> wrote: > This handles both SYSENTER and SYSCALL. The asm glue will take care > of the differences. This seems non-optimal. > +__visible void do_fast_syscall_32(struct pt_regs *regs) .. so this is the fast case on 32-bit, but: > + local_irq_enable(); > + if (get_user(*(u32 *)®s->cx, > + (u32 __user __force *)(unsigned long)(u32)regs->sp)) { ... > + local_irq_disable(); this is expensive. Since we now do it in C code and can easily do this, why does the code not do this all with interrupts disabled, which is valid for user accesses but disables page faults, and then in the unlikely situation where that fails, we do it the slow and careful way? It would be nice to see this patch series not just get rid of asm code, but also do things to optimize cases that used to be annoyingly hard to do in user space. No? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists