From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264752AbUEKOHk (ORCPT ); Tue, 11 May 2004 10:07:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264755AbUEKOHj (ORCPT ); Tue, 11 May 2004 10:07:39 -0400 Received: from nevyn.them.org ([66.93.172.17]:27025 "EHLO nevyn.them.org") by vger.kernel.org with ESMTP id S264752AbUEKOHb (ORCPT ); Tue, 11 May 2004 10:07:31 -0400 Date: Tue, 11 May 2004 10:07:22 -0400 From: Daniel Jacobowitz To: Davide Libenzi Cc: Fabiano Ramos , OGAWA Hirofumi , Andi Kleen , Linux Kernel Mailing List Subject: Re: ptrace in 2.6.5 Message-ID: <20040511140722.GA13568@nevyn.them.org> Mail-Followup-To: Davide Libenzi , Fabiano Ramos , OGAWA Hirofumi , Andi Kleen , Linux Kernel Mailing List References: <1UlcA-6lq-9@gated-at.bofh.it> <1084220684.1798.3.camel@slack.domain.invalid> <877jvkx88r.fsf@devron.myhome.or.jp> <873c67yk5v.fsf@devron.myhome.or.jp> <20040510225818.GA24796@nevyn.them.org> <1084236054.1763.25.camel@slack.domain.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 10, 2004 at 11:41:53PM -0700, Davide Libenzi wrote: > On Mon, 10 May 2004, Davide Libenzi wrote: > > > On Mon, 10 May 2004, Davide Libenzi wrote: > > > > > On the kernel side, this would be pretty much solved by issuing a ptrace > > > op, with a modified EIP (+2) on return from a syscall (if in single-step > > > mode). > > > > Actaully, the EIP should not be changed (since it already points to the > > intruction following INT 0x80) and I believe it is sufficent to replace > > the test for _TIF_SYSCALL_TRACE with (_TIF_SYSCALL_TRACE | TIF_SINGLESTEP) > > in the system call return path. This should generate a ptrace trap with > > EIP pointing to the next instruction following INT 0x80. > > The patch below (for i386) should work. Yeah, that's what I was suggesting. I think the patch is right. -- Daniel Jacobowitz