Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1279378imm; Wed, 10 Oct 2018 11:56:51 -0700 (PDT) X-Google-Smtp-Source: ACcGV62ZsyHP/h4DVKFREY0WYJ3JQIu1Fv+XbaIENDMtvI6rxofb6Llu0CWbfJCPpSfEjuum8PBA X-Received: by 2002:a62:20d8:: with SMTP id m85-v6mr35794182pfj.152.1539197811558; Wed, 10 Oct 2018 11:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539197811; cv=none; d=google.com; s=arc-20160816; b=XUokcTArvT0BwALibbnrVo20xg+cAECmefIM8hLm73n9eifVGD/T2Odr5oN6ncAGEK PMACVE7AQJzVZTEZRsS3X0wNib7SOP+KosJ5V5Q4Jq7ZInFekyKyZ/UdvfHBWvJjvmX5 KHQmA4casDikkjDTLLc5FDaHYujSJjMsl+nRt9uskAk0pO37FrODC1sQ2RO2RaR86ZXG H6Hjaa39P+Ktr2WYPa1stLoHOESOtu15xpQOZljopPX+Qc1PKbnIHmwTTvxcfXxMjDjN To0F23fO38SgETYvinX/d9VkS01iZUPJoV5urnj3SInbBJ6IToNpZQ9jyTXNGjiS7i3S PIpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=74P8ENR8SalqXNjv+wf29vh34GmkRpTjZwLm3TcymPY=; b=JvGTCooTx+4tYY8aFrNc2XgeL/1ZVpForwh0crIsnfxavfXecHaqPs8evg6G4Q9iSs 72dl6Rf8UhYtd7BsYMhZNCBxSMO56OgkKHYT5ZTmR2jaM1lFQNN+1RdjYgIqPo1/679l yhYFM/zaCE24r1YxHGWqfzPd+dLCE7thCyGaG59grw/aNUsArkXo2FnvvPiGzc7FHG6M N6N4nTitoO1j5PIHW0Qq6zwdseUkc1lBl1dQzGd0Sa/s7c6tHfKL6lQZ7LBPo0Dg0TTR wQag4UHQnfPvetUyYcAiZDddervSaEWgY8B9NP623ZkGLRUbO2o8LhtxvpC/UDWDujeu X5yg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n188-v6si23663071pfn.113.2018.10.10.11.56.35; Wed, 10 Oct 2018 11:56:51 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbeJKCTj (ORCPT + 99 others); Wed, 10 Oct 2018 22:19:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:40062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726734AbeJKCTj (ORCPT ); Wed, 10 Oct 2018 22:19:39 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F9C32085B; Wed, 10 Oct 2018 18:56:10 +0000 (UTC) Date: Wed, 10 Oct 2018 14:56:08 -0400 From: Steven Rostedt To: Josh Poimboeuf Cc: Andy Lutomirski , Peter Zijlstra , LKML , Linus Torvalds , Ingo Molnar , Andrew Morton , Thomas Gleixner , Masami Hiramatsu , Mathieu Desnoyers , Matthew Helsley , "Rafael J. Wysocki" , David Woodhouse , Paolo Bonzini , Jason Baron , Jiri Kosina , Ard Biesheuvel , Andrew Lutomirski Subject: Re: [POC][RFC][PATCH 1/2] jump_function: Addition of new feature "jump_function" Message-ID: <20181010145608.2094d254@gandalf.local.home> In-Reply-To: <20181010183330.ootwmz6deazg2k2n@treble> References: <20181006093905.46276505@vmware.local.home> <20181008072134.GB5663@hirez.programming.kicks-ass.net> <20181008155757.GC5663@hirez.programming.kicks-ass.net> <20181009021710.qwt5hpntyeps44h3@treble> <20181008235750.59da83ae@gandalf.local.home> <20181010175237.e7m3sldcu2maoqcq@treble> <20181010181605.arsyjxwdztztrjih@treble> <20181010183330.ootwmz6deazg2k2n@treble> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Oct 2018 13:33:30 -0500 Josh Poimboeuf wrote: > Re-reading your suggestion, I may have misunderstood what you're > suggesting here, but I'm thinking about doing something like what you > proposed earlier: > > GLOBAL(tramp) > jmp *current_func(%rip) > ENDPROC(tramp) > > That is, doing an indirect jump instead of the above direct jump, so > that any previous references to the trampoline would still work (and it > would also work during early boot). > > Though it should probably be a retpoline instead of an indirect jump. But do we care, as it only takes place during text_poke_bp() right? I don't think we need to worry about training trampoline branch prediction that can only be hit when something enables the jump. -- Steve