Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1361098imm; Wed, 10 Oct 2018 13:18:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV62/bR30gDznGS1ZvZTdnfG8Z7rvD6q8h32R10G8qASDeqTHlCENUYL/4yXCKNH9dsEzVRGD X-Received: by 2002:a17:902:62:: with SMTP id 89-v6mr34287191pla.298.1539202700081; Wed, 10 Oct 2018 13:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539202700; cv=none; d=google.com; s=arc-20160816; b=ZRW6HhI1l5ZTS1pSJ68wsSO19VtsfaE7dEH8bA0feFWz3wu8mCCbOuI7l9aLz9BMAm cBpcJM8u8x71vkAwoK0benwHsQbB56ZosfljfH6BB2pY/KwijTsgJEB5geR8osle9Lmx P/+Rq/iDibEVdaJNxit+JlkaiFq2S1RNvtlWhcfefea1l84FbdRAGctdGOhf03vv8CFX XhgbapGFzT/AHLSuKWucd1BT7KPc7KZJf+6UWQd6lW1vdLafHOR5nYS8OhqM37tPVRmm tPwauhozKSjwxMECf4RzbrccbNIfJEoTaoePy/kO5Y9cCv3Bc+C8w+QB0nujlbC0adU1 UqGg== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ir3KebJF/UeBzFtON/PAjupPzsPj0livnowbF97Btik=; b=c+/oGvHQW6CAhKdUA8rAQajuB29wQxb0H5tuqBPv5ZnBr/OaI3MQfR0Cv52saeFOxS I6a4f+iyhZy3Nykuq3lVNFhNBvKJ1wSbmDZkly20aDSlFWGIVBWXt3WR/KkPLJ1KUWuK jeFyvYWJ212c7eslwDlOln+eyt+1/ZfqzAh+mV3VK4WAEgLQp2VcvuHxw3kYhx0ASGcU ItfPNKxK76gzgApbVVeQ4Ih3QS6u0cagEqgHfc2e7MJ880mweQ5r6GA83TPYePXQtmWc jusoClVBnSloKau8zthZsyA6LHuak72DCcRHlgdjNLixFx2l2Mu6olvtHp9PxvynmY1t 14gQ== 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 c27-v6si29975999pfk.235.2018.10.10.13.18.04; Wed, 10 Oct 2018 13:18:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727860AbeJKDkB (ORCPT + 99 others); Wed, 10 Oct 2018 23:40:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33000 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbeJKDkA (ORCPT ); Wed, 10 Oct 2018 23:40:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A62EF3082E07; Wed, 10 Oct 2018 20:16:14 +0000 (UTC) Received: from treble (ovpn-124-83.rdu2.redhat.com [10.10.124.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C341482263; Wed, 10 Oct 2018 20:16:11 +0000 (UTC) Date: Wed, 10 Oct 2018 15:16:09 -0500 From: Josh Poimboeuf To: Steven Rostedt 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: <20181010201609.3zwvzpr3ulredpek@treble> References: <20181008155757.GC5663@hirez.programming.kicks-ass.net> <20181009021710.qwt5hpntyeps44h3@treble> <20181008235750.59da83ae@gandalf.local.home> <20181010175237.e7m3sldcu2maoqcq@treble> <20181010181605.arsyjxwdztztrjih@treble> <20181010183330.ootwmz6deazg2k2n@treble> <20181010145608.2094d254@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181010145608.2094d254@gandalf.local.home> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 10 Oct 2018 20:16:15 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 10, 2018 at 02:56:08PM -0400, Steven Rostedt wrote: > 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. Yeah, I guess it depends on if we'd expect anybody (or gcc) to get a function pointer to the trampoline itself. I can just create a warning for that in objtool. -- Josh