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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 12:12:45 -0800
From:   Andy Lutomirski <luto@...nel.org>
To:     Eric Biggers <ebiggers3@...il.com>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        moritz.lipp@...k.tugraz.at,
        Daniel Gruss <daniel.gruss@...k.tugraz.at>,
        michael.schwarz@...k.tugraz.at, richard.fellner@...dent.tugraz.at,
        Andrew Lutomirski <luto@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Kees Cook <keescook@...gle.com>,
        Hugh Dickins <hughd@...gle.com>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH 09/23] x86, kaiser: map dynamically-allocated LDTs

On Thu, Nov 23, 2017 at 11:42 AM, Eric Biggers <ebiggers3@...il.com> wrote:
>> diff -puN arch/x86/kernel/ldt.c~kaiser-user-map-new-ldts arch/x86/kernel/ldt.c
>> --- a/arch/x86/kernel/ldt.c~kaiser-user-map-new-ldts  2017-11-22 15:45:49.059619739 -0800
>> +++ b/arch/x86/kernel/ldt.c   2017-11-22 15:45:49.062619739 -0800
>> @@ -11,6 +11,7 @@
> [...]
>> +     ret = kaiser_add_mapping((unsigned long)new_ldt->entries, alloc_size,
>> +                              __PAGE_KERNEL | _PAGE_GLOBAL);
>> +     if (ret) {
>> +             __free_ldt_struct(new_ldt);
>> +             return NULL;
>> +     }
>>       new_ldt->nr_entries = num_entries;
>>       return new_ldt;
>
> __free_ldt_struct() uses new_ldt->nr_entries, so new_ldt->nr_entries needs to be
> set earlier.
>

I would suggest just dropping this patch and forcing MODIFY_LDT off
when kaiser is on.  I'll fix it later.

Powered by blists - more mailing lists