From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754069AbdKIOEU (ORCPT ); Thu, 9 Nov 2017 09:04:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752580AbdKIOET (ORCPT ); Thu, 9 Nov 2017 09:04:19 -0500 Date: Thu, 9 Nov 2017 15:04:16 +0100 From: Oleg Nesterov To: Yonghong Song Cc: mingo@kernel.org, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, x86@kernel.org, netdev@vger.kernel.org, ast@fb.com, kernel-team@fb.com Subject: Re: [PATCH] uprobes/x86: emulate push insns for uprobe on x86 Message-ID: <20171109140416.GA11186@redhat.com> References: <20171109080155.359718-1-yhs@fb.com> <20171109134423.GA8746@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171109134423.GA8746@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 09 Nov 2017 14:04:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/09, Oleg Nesterov wrote: > > And. Do you really need ->post_xol() method to emulate "push"? Why we can't > simply execute it out-of-line if copy_to_user() fails? > > branch_post_xol_op() is needed because we can't execute "call" out-of-line, > we need to restart and try again if copy_to_user() fails, but I don not > understand why it is needed to emulate "push". If I wasn't clear, please see the comment in branch_clear_offset(). Oleg.