From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934095AbbEMKqg (ORCPT ); Wed, 13 May 2015 06:46:36 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:36207 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933516AbbEMKqf (ORCPT ); Wed, 13 May 2015 06:46:35 -0400 Date: Wed, 13 May 2015 12:46:30 +0200 From: Ingo Molnar To: Borislav Petkov Cc: Linus Torvalds , "H. Peter Anvin" , Thomas Gleixner , Andy Lutomirski , Denys Vlasenko , lkml Subject: Re: [RFC PATCH] Drop some asm from copy_user_64.S Message-ID: <20150513104630.GA7751@gmail.com> References: <20150512205750.GJ3497@pd.tnic> <20150512215320.GK3497@pd.tnic> <20150513095248.GD1517@pd.tnic> <20150513103140.GA5113@gmail.com> <20150513104330.GG1517@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150513104330.GG1517@pd.tnic> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > On Wed, May 13, 2015 at 12:31:40PM +0200, Ingo Molnar wrote: > > So why should an alternatives-CALL, inlined directly into call sites, > > cost more kernel space? > > Not the alternatives CALL alone but inlining _copy_*_user with all > the preparation glue around it would. Basically what we're doing > currently. So I reacted to this comment of yours: > > > The disadvantage is that we have CALL after CALL [...] Is the CALL after CALL caused by us calling an alternatives patched function? If yes then we probably should not do that: alternatives switching should IMHO happen at the highest possible level. Thanks, Ingo