From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Jiri Palecek <jpalecek@web.de>
Cc: Nathan T Lynch <natlynch@us.ibm.com>,
vapier@gentoo.org, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] clone tests fails
Date: Tue, 5 Jan 2010 21:26:44 -0600 [thread overview]
Message-ID: <20100106032644.GB8157@us.ibm.com> (raw)
In-Reply-To: <4B43E1CD.2050609@web.de>
Quoting Jiri Palecek (jpalecek@web.de):
> Serge E. Hallyn napsal(a):
> >Quoting Michal Simek (michal.simek@petalogix.com):
> >>Serge E. Hallyn wrote:
> >>>Quoting Michal Simek (michal.simek@petalogix.com):
> >>>>Hi Mike,
> >>>>
> >>>>I have one question about one your big patch
> >>>>
> >>>>http://git.kernel.org/?p=linux/kernel/git/galak/ltp.git;a=commitdiff;h=391dc18fe3271fbf2ca1864a5299f091c31e0018
> >>>>
> >>>>My question is why you add -1 in lib/cloner.c:65
> >>>>
> >>>>+ ret = clone(fn, (stack ? stack + stack_size - 1 : NULL),
> >>>>+ clone_flags, arg);
> >>>>
> >>>>In previous code in clone testcases was nothing like this.
> >>>>What reason have you had to add it?
> >>>
> >>>Because the same thing was done in lots of places all over the
> >>>testsuite (and done wrong). This consolidates them all.
> >>
> >>
> >>I don't have anything against consolidation. I just want to know why
> >>there is that -1 which weren't in any clone testcases. Nothing more
> >>nothing less.
> >
> >ooooh. Because if we've done stack = malloc(stack_size), then
> >stack+stack_size is 1 above the the top of stack.
>
> If the value of the parameter is the stack pointer of the created
> thread, it shouldn't matter - the address should never be used (read
> or written).
>
> Michal, I suspect the failures you see are somehow related to
> alignment (that your architecture doesn't like odd addresses). Is
> that right? Under x86, the address gets aligned (so some of the
> space is unused).
>
> Perhaps both of these behaviors should be tested by LTP?
Gah, yes, Nathan had mentioned arches where this matters (including
some power?). Nathan, did you have a generic fix for this in
userspace? Should always be safe to do
(stack + stack_size - 1) & ~0xf
?
-serge
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2010-01-06 3:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-04 16:17 [LTP] clone tests fails Michal Simek
2010-01-04 16:49 ` Serge E. Hallyn
2010-01-04 17:35 ` Michal Simek
2010-01-04 17:49 ` Serge E. Hallyn
2010-01-06 1:05 ` Jiri Palecek
2010-01-06 3:26 ` Serge E. Hallyn [this message]
2010-01-06 5:25 ` Mike Frysinger
2010-01-07 1:25 ` Jiri Palecek
2010-01-06 10:19 ` Michal Simek
2010-01-06 5:25 ` Mike Frysinger
2010-01-07 1:21 ` Jiri Palecek
2010-01-06 10:15 ` Michal Simek
2010-01-07 1:12 ` Jiri Palecek
2010-01-07 14:12 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100106032644.GB8157@us.ibm.com \
--to=serue@us.ibm.com \
--cc=jpalecek@web.de \
--cc=ltp-list@lists.sourceforge.net \
--cc=natlynch@us.ibm.com \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox