From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17009 invoked by alias); 10 Mar 2004 18:19:11 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 16990 invoked from network); 10 Mar 2004 18:19:10 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 10 Mar 2004 18:19:10 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i2AG7xnd010534; Wed, 10 Mar 2004 17:07:59 +0100 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i2AG7wJg010530; Wed, 10 Mar 2004 17:07:58 +0100 Date: Wed, 10 Mar 2004 18:19:00 -0000 From: Jakub Jelinek To: davidm@hpl.hp.com Cc: Andreas Schwab , Ulrich Drepper , Glibc hackers Subject: Re: [PATCH] getpid/vfork/raise fix Message-ID: <20040310160758.GZ3822@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: <20040308110105.GN3822@sunsite.ms.mff.cuni.cz> <404D76CA.4010500@redhat.com> <20040309115038.GO3822@sunsite.ms.mff.cuni.cz> <20040310101515.GS3822@sunsite.ms.mff.cuni.cz> <16463.17524.280448.143159@napali.hpl.hp.com> <20040310145052.GX3822@sunsite.ms.mff.cuni.cz> <16463.21532.841079.452596@napali.hpl.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16463.21532.841079.452596@napali.hpl.hp.com> User-Agent: Mutt/1.4i X-SW-Source: 2004-03/txt/msg00053.txt.bz2 On Wed, Mar 10, 2004 at 09:45:00AM -0800, David Mosberger wrote: > >>>>> On Wed, 10 Mar 2004 15:50:52 +0100, Jakub Jelinek said: > > >> Most scratch registers are _not_ preserved across system calls. > >> You could spill the register onto the memory stack though. If it > >> uses at most 16 bytes, you won't have to adjust the stack pointer > >> even. > > Jakub> But as soon as you spill something into memory the vfork > Jakub> child can clobber it and you restore in the parent something > Jakub> different from what you saved. > > How many registers need to be preserved? Just one? (Sorry, I could > read the code but I'm a bit preoccupied with other stuff at the > moment.) If it's just one, I think you could use r11 because that one > is required to be preserved for the light-weight syscall convention. One (plus b0) is needed. But first of all I'd like to understand the differences between NPTL pt-vfork.S and libc vfork.S on IA-64. Why does one use DO_CALL_VIA_BREAK and the other one DO_CALL, one has gas workarounds and one does not? Jakub