Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2817426imu; Thu, 29 Nov 2018 10:41:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wte3PCPgXgageHbutdIe9adDKR1NzfNfmjGc7SV5ai65butaQxhlHqyzAqw9bQzUSgtnXi X-Received: by 2002:a63:4d:: with SMTP id 74mr2243236pga.248.1543516905428; Thu, 29 Nov 2018 10:41:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543516905; cv=none; d=google.com; s=arc-20160816; b=mgaBs6IOWLCdhLWFUh+bUn/BtEJ4EVLcZeg5JJxuoqYrswNbEj520j0mXj1HJNoSDQ HPHVxNtMfESX/KQk4M9FS/KRTOjOxasGjF9vUbSQTfcG1i/WUnElrQanfTAR6wNVDosP 36i/iyTwZT7PMZXA67Cg1/Q3hyEzh6aQXBMaU9XIpZueujOWlZogKeSET17eIK+U3H8x wtXJCW+1roShZvZzLDSJC7zuhhJQW0qh1jXcy1mhTtdllX8LzV3qP9h+heqbDvaHVm1P vb3Xpl/GnDJf5vUpEnOneHWz4WGKlNb0q3MV4qeVHYGV59/qAVUdYZW9vfdI3iyvfQiv G1hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=MUZiE8+rV/Wo2EtabaQmk5Vbjtv8eLigjUYvir3lQKU=; b=OrCfX3hRaypDL+0l47swdkg+I8ncKRZrUyQsCzSFMKyh48z/Uj4eYQ8sNnYQOgisp1 7NC/iM0mFmRzCuImbw9iPnLQU/UagCuYarLfbwBknHnolEq/sG+AbrHWqC1rCCEQ639l OZFOJfQKbdunuvdiPJhR70mdfd7n4FQaJ9/u9PM3okUdtblFntHAEk/MifpiB6zVnuxe Bjo8dQy8gPXiS0ljNbtqibChyCr90q85/RdK4tIIbx4RjFaW0XXvga14/wxe2YIb3sZA A5QHTIaTb7mx7VPJ4ltD1l8yN0j2zMt//FOlJY0b73L7tEmggJVnTWtTElCLkOHz8+KH RkgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si2948792plo.217.2018.11.29.10.41.31; Thu, 29 Nov 2018 10:41:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730677AbeK3EwM (ORCPT + 99 others); Thu, 29 Nov 2018 23:52:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33922 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728255AbeK3EwM (ORCPT ); Thu, 29 Nov 2018 23:52:12 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F9975AFF5; Thu, 29 Nov 2018 17:46:02 +0000 (UTC) Received: from treble (ovpn-123-4.rdu2.redhat.com [10.10.123.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A5F4601B9; Thu, 29 Nov 2018 17:45:58 +0000 (UTC) Date: Thu, 29 Nov 2018 11:45:55 -0600 From: Josh Poimboeuf To: Andy Lutomirski Cc: Steven Rostedt , Peter Zijlstra , Andy Lutomirski , X86 ML , LKML , Ard Biesheuvel , Ingo Molnar , Thomas Gleixner , Linus Torvalds , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , julia@ni.com, jeyu@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64 Message-ID: <20181129174555.dapti2w4acrbm2jp@treble> References: <20181129094210.GC2131@hirez.programming.kicks-ass.net> <20181129143853.GO2131@hirez.programming.kicks-ass.net> <20181129163342.tp5wlfcyiazwwyoh@treble> <20181129164914.GA9027@hirez.programming.kicks-ass.net> <0FDA053D-7ADC-4F42-AEA5-99DA155FCED0@amacapital.net> <20181129171539.GD9027@hirez.programming.kicks-ass.net> <20181129122000.7fb4fb04@gandalf.local.home> <20181129122156.782e739e@gandalf.local.home> <666E3CE2-CD96-4271-8F9C-614F96D24F26@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <666E3CE2-CD96-4271-8F9C-614F96D24F26@amacapital.net> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 29 Nov 2018 17:46:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 09:41:33AM -0800, Andy Lutomirski wrote: > > > On Nov 29, 2018, at 9:21 AM, Steven Rostedt wrote: > > > > On Thu, 29 Nov 2018 12:20:00 -0500 > > Steven Rostedt wrote: > > > > > >> r8 = return address > >> r9 = function to call > >> > > > > Bad example, r8 and r9 are args, but r10 and r11 are available. > > > > -- Steve > > > >> push r8 > >> jmp *r9 > >> > >> Then have the regs->ip point to that trampoline. > > Cute. That’ll need ORC annotations and some kind of retpoline to replace the indirect jump, though. I'm going with this idea, but the BP is so rare that I really don't see why a retpoline would be needed. -- Josh