From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: Re: [PATCH/cr_tests] pass a valid stack address to clone(2)
Date: Wed, 2 Sep 2009 07:53:24 -0500 [thread overview]
Message-ID: <20090902125324.GA11628@us.ibm.com> (raw)
In-Reply-To: <1251846700.23305.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Quoting Nathan Lynch (ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org):
> Off-by-one error: the stack address passed to clone() must be within
> the region allocated.
>
> Signed-off-by: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Applied, thanks.
> ---
> ns_exec.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/ns_exec.c b/ns_exec.c
> index 09574e2..1f61771 100644
> --- a/ns_exec.c
> +++ b/ns_exec.c
> @@ -272,7 +272,7 @@ int main(int argc, char *argv[])
> perror("malloc");
> return -1;
> }
> - childstack = stack + stacksize;
> + childstack = stack + stacksize - 1;
>
> printf("about to clone with %lx\n", flags);
> flags |= SIGCHLD;
> --
> 1.6.0.6
>
>
prev parent reply other threads:[~2009-09-02 12:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 23:11 [PATCH/cr_tests] pass a valid stack address to clone(2) Nathan Lynch
[not found] ` <1251846700.23305.2.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2009-09-02 12:53 ` Serge E. Hallyn [this message]
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=20090902125324.GA11628@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.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