From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbbE0SJj (ORCPT ); Wed, 27 May 2015 14:09:39 -0400 Received: from mail.phunq.net ([184.71.0.62]:50528 "EHLO starbase.phunq.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660AbbE0SJf convert rfc822-to-8bit (ORCPT ); Wed, 27 May 2015 14:09:35 -0400 From: Daniel Phillips To: Pavel Machek Cc: Rik van Riel , , , , OGAWA Hirofumi , , Andrea Arcangeli , Peter Zijlstra Subject: Re: [FYI] tux3: Core changes Date: Wed, 27 May 2015 11:09:25 -0700 User-Agent: Trojita/v0.5-14-g8a2496c; Qt/4.8.6; X11; Linux; Ubuntu 14.04.2 LTS MIME-Version: 1.0 Message-ID: <29109394-30ee-48be-b2e9-dd26e5aa9e28@phunq.net> In-Reply-To: <20150527074137.GA1254@amd> References: <8f886f13-6550-4322-95be-93244ae61045@phunq.net> <55545C2F.8040207@phunq.net> <55549C2F.6000103@redhat.com> <5555388F.5010909@phunq.net> <555562AE.9020204@redhat.com> <5555BE99.1030803@phunq.net> <20150527074137.GA1254@amd> Organization: tux3.org Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, May 27, 2015 12:41:37 AM PDT, Pavel Machek wrote: > On Fri 2015-05-15 02:38:33, Daniel Phillips wrote: >> On 05/14/2015 08:06 PM, Rik van Riel wrote: ... > > Umm. Why do you think it is only issue for executable files? I meant: files with code in them, that will be executed. Please excuse me for colliding with the chmod sense. I will say "code files" to avoid ambiguity. > I'm free to mmap() any file, and then execute from it. > > /lib/ld-linux.so /path/to/binary > > is known way to exec programs that do not have x bit set. So... why would I write to a code file at the same time as stepping through it with ptrace? Should I expect ptrace to work perfectly if I do that? What would "work perfectly" mean, if the code is changing at the same time as being traced? Regards, Daniel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Phillips Subject: Re: [FYI] tux3: Core changes Date: Wed, 27 May 2015 11:09:25 -0700 Message-ID: <29109394-30ee-48be-b2e9-dd26e5aa9e28@phunq.net> References: <8f886f13-6550-4322-95be-93244ae61045@phunq.net> <55545C2F.8040207@phunq.net> <55549C2F.6000103@redhat.com> <5555388F.5010909@phunq.net> <555562AE.9020204@redhat.com> <5555BE99.1030803@phunq.net> <20150527074137.GA1254@amd> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Cc: Andrea Arcangeli , Rik van Riel , Peter Zijlstra , tux3@tux3.org, linux-kernel@vger.kernel.org, mgorman@suse.de, linux-fsdevel@vger.kernel.org, OGAWA Hirofumi To: Pavel Machek Return-path: In-Reply-To: <20150527074137.GA1254@amd> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tux3-bounces@phunq.net Sender: "Tux3" List-Id: linux-fsdevel.vger.kernel.org On Wednesday, May 27, 2015 12:41:37 AM PDT, Pavel Machek wrote: > On Fri 2015-05-15 02:38:33, Daniel Phillips wrote: >> On 05/14/2015 08:06 PM, Rik van Riel wrote: ... > > Umm. Why do you think it is only issue for executable files? I meant: files with code in them, that will be executed. Please excuse me for colliding with the chmod sense. I will say "code files" to avoid ambiguity. > I'm free to mmap() any file, and then execute from it. > > /lib/ld-linux.so /path/to/binary > > is known way to exec programs that do not have x bit set. So... why would I write to a code file at the same time as stepping through it with ptrace? Should I expect ptrace to work perfectly if I do that? What would "work perfectly" mean, if the code is changing at the same time as being traced? Regards, Daniel