From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbdLDWvK (ORCPT ); Mon, 4 Dec 2017 17:51:10 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:34294 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbdLDWvH (ORCPT ); Mon, 4 Dec 2017 17:51:07 -0500 Date: Mon, 4 Dec 2017 23:51:00 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: LKML , X86 ML , Linus Torvalds , Peter Zijlstra , Dave Hansen , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , Daniel Gruss Subject: Re: [patch 47/60] x86/ldt: Map LDT entries into fixmap In-Reply-To: Message-ID: References: <20171204140706.296109558@linutronix.de> <20171204150608.674502245@linutronix.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Dec 2017, Andy Lutomirski wrote: > On Mon, Dec 4, 2017 at 6:07 AM, Thomas Gleixner wrote: > > From: Thomas Gleixner > > > > LDT is not really commonly used on 64bit so the overhead of populating the > > fixmap entries on context switch for the rare LDT syscall users is a > > reasonable trade off vs. having extra dynamically managed mapping space per > > process. > > > > Hmm, I wonder just how slow this is. It might be okay. It's > certainly not the way I imagined it working. I know, it was the laziest way I could come up with. The only nasty thing here is that __set_fixmap() does a tlb flush which is pointless as that happens anyway. On my todo list was a noflush variant for set_fixmap along with a variant which takes a whole range. That would simplify other places as well. Though with the plan to map that stuff to a different place we actually can avoid the weirdness of fixmaps Thanks, tglx