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
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 6 Oct 2015 11:25:25 -0700
From:	Andy Lutomirski <>
To:	Linus Torvalds <>
Cc:	Andy Lutomirski <>,
	"the arch/x86 maintainers" <>,
	Linux Kernel Mailing List <>,
	Brian Gerst <>,
	Denys Vlasenko <>,
	Borislav Petkov <>
Subject: Re: [PATCH v2 22/36] x86/entry: Add C code for fast system call entries

On Tue, Oct 6, 2015 at 1:29 AM, Linus Torvalds
<> wrote:
> On Tue, Oct 6, 2015 at 9:25 AM, Linus Torvalds
> <> wrote:
>>> +       local_irq_enable();
>>> +       if (get_user(*(u32 *)&regs->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?
> Ok. I notice that then a later patch removes the local_irq_disable()
> and calls do_syscall_32_irqs_on().
> So I guess that "just run get_user with interrupts disabled"
> optimization is pointless, because we'll just end up enabling
> interrupts at some point anyway, and it can just be done before the
> get_user().
> So never mind.

I'll improve the changelog.  This is all clear in my head, but I could
certainly describe it better.

I tried to structure this as much as possible as simple unoptimized
changes that would be easyish to understand from a correctness
perspective and then to optimize at the end.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists