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  linux-cve-announce  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]
Message-ID: <CALCETrVeWs7DvM0TDTb+0-Twk=n7Pvf7XEVrHS0kKXvX-v0n8g@mail.gmail.com>
Date:   Sun, 27 Nov 2016 10:57:31 -0800
From:   Andy Lutomirski <luto@...capital.net>
To:     Alexnader Kuleshov <kuleshovmail@...il.com>
Cc:     open list <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Andy Lutomirski <luto@...nel.org>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Jan Beulich <jbeulich@...e.com>,
        Tony Luck <tony.luck@...el.com>,
        Jianyu Zhan <nasa4836@...il.com>
Subject: Re: Question: goal of twice disabling of preemption in exception handlers

On Sun, Nov 20, 2016 at 9:52 AM, Alexnader Kuleshov
<kuleshovmail@...il.com> wrote:
> Hello everyone,
>
> Exception handlers which may run on IST stack disable and enable preemption
> twice. For example do_int3() [1]. This one calls ist_enter() which
> disables preemption with preempt_disable() every time without any conditions.
> And later do_int3() calls preempt_disable() again [2] before do_trap().
>
> Of course we decrement preemption counter in the end of such exception
> handlers twice too. But what's actual purpose of doing this two times?
>
> [1] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/x86/kernel/traps.c?id=refs/tags/next-20161117#n530
> [2] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/x86/kernel/traps.c?id=refs/tags/next-20161117#n566
>
> Thank you.

You could submit a patch to get rid of the extra one if you like.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ