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: Sun, 26 Nov 2017 08:29:12 -0800 From: Andy Lutomirski <luto@...nel.org> To: Dave Hansen <dave.hansen@...ux.intel.com> Cc: Andy Lutomirski <luto@...nel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>, richard.fellner@...dent.tugraz.at, moritz.lipp@...k.tugraz.at, Daniel Gruss <daniel.gruss@...k.tugraz.at>, michael.schwarz@...k.tugraz.at, Linus Torvalds <torvalds@...ux-foundation.org>, Kees Cook <keescook@...gle.com>, Hugh Dickins <hughd@...gle.com>, X86 ML <x86@...nel.org> Subject: Re: [PATCH 05/23] x86, kaiser: unmap kernel from userspace page tables (core patch) On Sun, Nov 26, 2017 at 8:24 AM, Dave Hansen <dave.hansen@...ux.intel.com> wrote: > On 11/26/2017 08:10 AM, Andy Lutomirski wrote: >>> As a side benefit, this shouldn't have magical interactions with the >>> vsyscall page any more. >>> >>> Are there cases that this would get wrong? >>> >> Quick ping: did this get lost? > > It does drop a warning that the other version of the code has, but > that's pretty minor. > > Basically, we need two checks: > > pgd_userspace_access() (aka _PAGE_USER) and > pgdp_maps_userspace() > > The original code does pgd_userspace_access() in a top-level if and then > the pgdp_maps_userspace() checks at the second level. I think you are > basically suggesting that we flip that. > > Logically, I'm sure we can make it work. It's just a matter of needing > to look at other things first. > > BTW, this comment is, I think incorrect: > >> if (pgdp_maps_userspace(pgdp)) { > ... >> } else { >> /* >> * We can get here due to vmalloc, a vmalloc fault, memory >> hot-add, or initial setup >> * of kernelmode page tables. Regardless of which particular code >> path we're in, >> * these mappings should not be automatically propagated to the >> usermode tables. >> */ > > Since we pre-populated the entire kernel area's PGDs, I don't think > we'll ever have a valid reason to be doing a set_pgd() again on the > kernel area. Right, forgot about that. So it's just initial setup, then.
Powered by blists - more mailing lists