From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753768Ab1LLRgf (ORCPT ); Mon, 12 Dec 2011 12:36:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34102 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753611Ab1LLRgd (ORCPT ); Mon, 12 Dec 2011 12:36:33 -0500 Date: Mon, 12 Dec 2011 18:30:19 +0100 From: Oleg Nesterov To: Srikar Dronamraju Cc: Peter Zijlstra , Linus Torvalds , Andrew Morton , LKML , Linux-mm , Ingo Molnar , Andi Kleen , Christoph Hellwig , Steven Rostedt , Roland McGrath , Thomas Gleixner , Masami Hiramatsu , Arnaldo Carvalho de Melo , Anton Arapov , Ananth N Mavinakayanahalli , Jim Keniston , Stephen Wilson , Josh Stone Subject: Re: [PATCH RFC 0/5] uprobes: kill xol vma Message-ID: <20111212173019.GA25226@redhat.com> References: <20111118110631.10512.73274.sendpatchset@srdronam.in.ibm.com> <20111128190614.GA4602@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111128190614.GA4602@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/28, Oleg Nesterov wrote: > > On top of this series, not for inclusion yet, just to explain what > I mean. May be someone can test it ;) > > This series kills xol_vma. Instead we use the per_cpu-like xol slots. > > This is much more simple and efficient. And this of course solves > many problems we currently have with xol_vma. > > For example, we simply can not trust it. We do not know what actually > we are going to execute in UTASK_SSTEP mode. An application can unmap > this area and then do mmap(PROT_EXEC|PROT_WRITE, MAP_FIXED) to fool > uprobes. > > The only disadvantage is that this adds a bit more arch-dependant > code. > > The main question, can this work? OK, it almost works. But, this way we can't probe the compat tasks. A __USER32_CS task can't access the fix_to_virt() area, so it can't use uprobe_xol_slots[]. Many thanks to Josh who noticed this. I'll try to think more, but so far I do not see any simple solution. Oleg.