Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751678AbeAPS7E (ORCPT + 1 other); Tue, 16 Jan 2018 13:59:04 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:39662 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbeAPS7C (ORCPT ); Tue, 16 Jan 2018 13:59:02 -0500 X-Google-Smtp-Source: ACJfBouYM8eiRj5Knhu1I8X3WkVnmfsqgJ/gEydjZqTpPWUvutV/+f/9GswWuq0DV6HbON35Yzqyd+XQhF0UBlBlGtY= MIME-Version: 1.0 In-Reply-To: <1516120619-1159-1-git-send-email-joro@8bytes.org> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> From: Linus Torvalds Date: Tue, 16 Jan 2018 10:59:01 -0800 X-Google-Sender-Auth: T4To39vhDeOLpW8HlVWFfaZMd-E Message-ID: Subject: Re: [RFC PATCH 00/16] PTI support for x86-32 To: Joerg Roedel Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , "the arch/x86 maintainers" , Linux Kernel Mailing List , linux-mm , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Joerg Roedel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, Jan 16, 2018 at 8:36 AM, Joerg Roedel wrote: > > here is my current WIP code to enable PTI on x86-32. It is > still in a pretty early state, but it successfully boots my > KVM guest with PAE and with legacy paging. The existing PTI > code for x86-64 already prepares a lot of the stuff needed > for 32 bit too, thanks for that to all the people involved > in its development :) Yes, I'm very happy to see that this is actually not nearly as bad as I feared it might be, Some of those #ifdef's in the PTI code you added might want more commentary about what the exact differences are. And maybe they could be done more cleanly with some abstraction. But nothing looked _horrible_. > The code has not run on bare-metal yet, I'll test that in > the next days once I setup a 32 bit box again. I also havn't > tested Wine and DosEMU yet, so this might also be broken. .. and please run all the segment and syscall selfchecks that Andy has written. But yes, checking bare metal, and checking the "odd" applications like Wine and dosemu (and kvm etc) within the PTI kernel is certainly a good idea. > One of the things that are surely broken is XEN_PV support. > I'd appreciate any help with testing and bugfixing on that > front. Xen PV and PTI don't work together even on x86-64 afaik, the Xen people apparently felt it wasn't worth it. See the if (hypervisor_is_type(X86_HYPER_XEN_PV)) { pti_print_if_insecure("disabled on XEN PV."); return; } in pti_check_boottime_disable(). Linus