From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751741AbdLGId1 (ORCPT ); Thu, 7 Dec 2017 03:33:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:34917 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbdLGId0 (ORCPT ); Thu, 7 Dec 2017 03:33:26 -0500 Date: Thu, 7 Dec 2017 09:33:15 +0100 From: Borislav Petkov To: Thomas Gleixner Cc: LKML , x86@kernel.org, Linus Torvalds , Andy Lutomirsky , Peter Zijlstra , Dave Hansen , Greg KH , keescook@google.com, hughd@google.com, Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Rik van Riel , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , daniel.gruss@iaik.tugraz.at, Dave Hansen Subject: Re: [patch 31/60] x86/mm/kpti: Add mapping helper functions Message-ID: <20171207083315.ccvdhywyd45gkz7t@pd.tnic> References: <20171204140706.296109558@linutronix.de> <20171204150607.391576490@linutronix.de> <20171205160134.dhrc5oata2hqln3a@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171205160134.dhrc5oata2hqln3a@pd.tnic> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 05, 2017 at 05:01:34PM +0100, Borislav Petkov wrote: > > +/* > > + * Take a PGD location (pgdp) and a pgd value that needs to be set there. > > + * Populates the user and returns the resulting PGD that must be set in > > + * the kernel copy of the page tables. > > + */ > > +static inline pgd_t kpti_set_user_pgd(pgd_t *pgdp, pgd_t pgd) > > +{ > > Btw, do we want to inline a relatively big function like that? I see at > least 20-ish callsites of set_pgd() only. Yap, looking at Hugh's version, he has moved it to kaiser.c. I guess in our case, that should be arch/x86/mm/kpti.c respectively. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --