From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.74) (envelope-from ) id 1Psywn-00007t-SG for ltp-list@lists.sourceforge.net; Fri, 25 Feb 2011 14:47:09 +0000 Received: from service87.mimecast.com ([94.185.240.25]) by sog-mx-4.v43.ch3.sourceforge.com with smtp (Exim 4.74) id 1Psywh-0001V7-KH for ltp-list@lists.sourceforge.net; Fri, 25 Feb 2011 14:47:09 +0000 From: "Will Deacon" References: <000a01cbd4dc$be7a97b0$3b6fc710$@deacon@arm.com> <20110225144159.GE27985@hannu-debian.research.nokia.com> In-Reply-To: <20110225144159.GE27985@hannu-debian.research.nokia.com> Date: Fri, 25 Feb 2011 14:46:51 -0000 Message-ID: <000b01cbd4fa$d675ada0$836108e0$@deacon@arm.com> MIME-Version: 1.0 Content-Language: en-gb Subject: Re: [LTP] ltp_clone List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: 'Hannu Heikkinen' Cc: ltp-list@lists.sourceforge.net Hi Hannu, > > I believe the __arm__ case is to ensure that we pass an aligned > > stack pointer to the syscall (as required by the architecture). > > What I don't understand, is why we pass an unaligned address in > > the #else case? Given that a stack push decrements the sp before > > writing on every architecture I know of, it seems that the __arm__ > > case should be used as the default rather than forcing a misaligned > > stack on other architectures. > > > > Will > > > > Hi, > > have you fetched the latest from the git tree: > git://ltp.git.sourceforge.net/gitroot/ltp/ltp ? > > Lines are: > > int > ltp_clone(unsigned long clone_flags, int (*fn)(void *arg), void *arg, > size_t stack_size, void *stack) > { > int ret; > > #if defined(__hppa__) > ret = clone(fn, stack, clone_flags, arg); > #elif defined(__ia64__) > ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, > NULL); > #else > /* > * For archs where stack grows downwards, stack points to the topmost > * address of the memory space set up for the child stack. > */ > ret = clone(fn, (stack ? stack + stack_size : NULL), > clone_flags, arg); > #endif > > return ret; > } Wahey - that's much better! I was accidently looking in my checkout of the October stable release, where ARM is special-cased. Thanks for pointing this out. Will ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list