From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757281AbdLQDZm (ORCPT ); Sat, 16 Dec 2017 22:25:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:51272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757244AbdLQDZk (ORCPT ); Sat, 16 Dec 2017 22:25:40 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 448E7218C5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: ACJfBotBVwAJ/KJiGoECfPPSwFOkAPfs54NJBFjP/+1c/cHT3K3cFOfS+Op3tQmB3O5U90OBc2ujn9vfG0XxajHYA4I= MIME-Version: 1.0 In-Reply-To: <20171215160735.p47cymimxcezfds7@gmail.com> References: <20171215154308.ixj3wwvy2gajmtpn@gmail.com> <20171215160735.p47cymimxcezfds7@gmail.com> From: Andy Lutomirski Date: Sat, 16 Dec 2017 19:25:19 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] x86 fixes To: Ingo Molnar Cc: Andy Lutomirski , Linus Torvalds , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "H. Peter Anvin" , Peter Zijlstra , Andrew Morton , Josh Poimboeuf , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 15, 2017 at 8:07 AM, Ingo Molnar wrote: > > * Andy Lutomirski wrote: > >> On Fri, Dec 15, 2017 at 7:43 AM, Ingo Molnar wrote: >> > Linus, >> >> > >> > - two 5-level paging related fixes >> >> Which reminds me: can you grab this one, too? >> >> https://lkml.kernel.org/r/24c898b4f44fdf8c22d93703850fb384ef87cfdc.1513035461.git.luto@kernel.org > > Yeah, done - it's now in x86/urgent as: > > c739f930be1d: x86/espfix/64: Fix espfix double-fault handling on 5-level systems > > Will push it out soon. Linus will get it with the next x86/urgent batch, as > there's no production 5-level paging CPUs out there yet, right? > > I'm also picking up your pending PTI fixes/updates over the weekend, but I spent > today mostly to make sure that the system call trampoline bits and its > dependencies were robust in practice. > > Could you please have a good look at that tree: > > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp > > This includes the preparatory merges and cherry-picks, and some other low risk > preparatory bits related to PTI. > > Is this tree looking good to you standalone? I think this stuff is looking okay, although I'm a bit mystified by the whole merge base thing. But if the backporters and Linus like it, then whatever. I few things I noticed in the PTI tree: "x86/mm/pti: Map ESPFIX into user space" has a leftover pr_err(). Sorry, my bad, I've spent *way* too long looking at this crap to retain my sanity. Also, if you're feeling like being super tidy, the init/main.c change in their could be folded in to whatever patch adds pti_init() in the first place, but it doesn't really matter. "x86/pti: Map the vsyscall page if needed" has a change to pgtable_64.h that could be folded into an earlier patch. This is probably my fault for applying Dave Hansen's cleanup request to the wrong patch. "x86/mm/64: Make a full PGD-entry size hole in the memory map" would benefit from a mention of "5-level" somewhere in the subject or changelog. In "x86/fixmap: Add debugstore entries to cpu_entry_area", I think the function "set_percpu_fixmap_ptes" is misnamed. It should be something like "allocate_percpu_fixmap_ptes", perhaps, and it should either warn or do nothing if the PTE is already present, I think. As it stands, it's a wee bit dangerous. X86_BUG_CPU_SECURE_MODE_PTI should be added to DISABLED_FEATURES or DISABLED_BUGS or whatever if it's not configured in, which will reduce bloat. Borislav, that's kind of up your alley, since I don't think the appropriate mask even exists right now. Anyway, I stuck a few minor fixups here: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/log/?h=x86/pti