From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH][v3] uprobes/x86: emulate push insns for uprobe on x86 Date: Wed, 15 Nov 2017 18:07:34 +0100 Message-ID: <20171115170734.GA12415@redhat.com> References: <20171113221139.1516536-1-yhs@fb.com> <20171114155124.GB17667@redhat.com> <20171114160304.GA19323@redhat.com> <946788b4-e57b-c7c2-9ba8-3c6fe87c4af8@fb.com> <20171115154707.GB21275@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 To: Yonghong Song Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38718 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932380AbdKORHi (ORCPT ); Wed, 15 Nov 2017 12:07:38 -0500 Content-Disposition: inline In-Reply-To: <20171115154707.GB21275@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On 11/15, Oleg Nesterov wrote: > > So please, check if uprobe_init_insn() fails or not in this case. After that > we will know whether your patch needs the additional is_64bit_mm() check in > push_setup_xol_ops() or not. OK, I did the check for you. uprobe_init_insn() doesn't fail but insn_init(x86_64 => 0) parse it as single-byte insn with OPCODE1 == 0x41, so push_setup_xol_ops() doesn't need to worry about compat tasks. In short, your "V2" should be fine except you can factor out auprobe->push.ilen initialization (as you did in V3). Please send V4. Oleg.