Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3222684yba; Mon, 6 May 2019 20:00:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAPq6pxwWavy1Vabw/dorRfUEuG08MoGCnutM4nQswSPIW+ymmVQqICNzTwSbLcpB4mdLn X-Received: by 2002:a65:51c5:: with SMTP id i5mr36996193pgq.189.1557198049183; Mon, 06 May 2019 20:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557198049; cv=none; d=google.com; s=arc-20160816; b=J0zVSrQS56EYLqr+rBJ6aCXPzS6HMRAOz/98eeqHKWNtMm2yy8t7uRHUfISQKsnrje RjZfIIG5pbWLPMF24SqktsK2wntrk9krHEeAQ35GL51ifiwm7k7UvF0eNaPm4hcRXrIT VVuA1XmSapK5XgMP+B+3FDIwJt0gQYwg4TTNeWFXZi15MpG/i0XjXE/t5RyM1j2FbF28 iwv6x4LX8IrdqgCML0nBn8lBdPNmTYJNCAeHFfaM+uOLBShxja86rMHCfGQ6QDeif7mM OTfqCRa/fe9xq071+pno02QfgiE792Wn+rVXyvBfNeNytgHnXj42CB/MB8zhyZjYdSzQ nsyA== 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=NGlFTEwDHwk6ahp0Afe56ts/VKw0gCdQaP79voMpAVw=; b=PDzTWcuz4CuUPzbeCdSINssHWI6AseFg5CuoB71wr6AQ6g4QBX6NrJgyZrMCixnZkZ gmRbCMdMJ2xH10da6glfzIo5ZWamopq15objj4M7lB3lfjkkD+i67byySTZzPYjS7dpl /QG1QdRMrsvYpv+Gc9gvWNcfSu9BHK+c0+ELAkr0KE5XtQ+WNrFbtxdSmq6TUMdlYApy qzof3t5QGsG+m1TLgsX8rC50t+bCEBrhboR+68R+T+sTK0DdIRzFUdRng3t6T3nW6L8F XZhWpTZrDwwdEFErLhyE9nR80ZDU/CZn9kEs96Vabw/Gb/ejBUo49qbDYA0bGZ5HheWD WPGQ== 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 v23si10609432pgi.527.2019.05.06.20.00.33; Mon, 06 May 2019 20:00:49 -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 S1726873AbfEGC6Y (ORCPT + 99 others); Mon, 6 May 2019 22:58:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:47852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbfEGC6Y (ORCPT ); Mon, 6 May 2019 22:58:24 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 0FCB920835; Tue, 7 May 2019 02:58:20 +0000 (UTC) Date: Mon, 6 May 2019 22:58:19 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Peter Zijlstra , Andy Lutomirski , Linux List Kernel Mailing , Ingo Molnar , Andrew Morton , Andy Lutomirski , Nicolai Stange , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Shuah Khan , Konrad Rzeszutek Wilk , Tim Chen , Sebastian Andrzej Siewior , Mimi Zohar , Juergen Gross , Nick Desaulniers , Nayna Jain , Masahiro Yamada , Joerg Roedel , "open list:KERNEL SELFTEST FRAMEWORK" , stable , Masami Hiramatsu Subject: Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions Message-ID: <20190506225819.11756974@oasis.local.home> In-Reply-To: References: <20190502181811.GY2623@hirez.programming.kicks-ass.net> <20190506081951.GJ2606@hirez.programming.kicks-ass.net> <20190506095631.6f71ad7c@gandalf.local.home> <20190506130643.62c35eeb@gandalf.local.home> <20190506145745.17c59596@gandalf.local.home> <20190506162915.380993f9@gandalf.local.home> <20190506174511.2f8b696b@gandalf.local.home> <20190506210416.2489a659@oasis.local.home> <20190506215353.14a8ef78@oasis.local.home> X-Mailer: Claws Mail 3.17.3 (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 Mon, 6 May 2019 19:22:06 -0700 Linus Torvalds wrote: > Notice? We'd not even have to look up any values. We'd literally just > do something like > > int offset = locked_atomic_read(ip+1); > return int3_emulate_call(ip, ip+5+offset); > > and it would be *atomic* with respect to whatever other user that > updates the instruction, as long as they update the offset with a > "xchg" instruction. Honestly, I'm not really sure what you are trying to do here. Are you talking about making the update to the code in the int3 handler? And then just returning back to the regs->ip and executing the new call (not really emulating). -- Steve