All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v6] Add a test case for mmap MAP_GROWSDOWN flag
Date: Tue, 22 Sep 2020 14:36:43 +0800	[thread overview]
Message-ID: <CAEemH2f+yqe2rtNh34fkWiLtVrp=hP70qzNX1HbVt13oyoNzXQ@mail.gmail.com> (raw)
In-Reply-To: <20200921094714.GA2311@yuki.lan>

On Mon, Sep 21, 2020 at 5:46 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> ...
> > As the stack grows down, shouldn't grow from stack_bottom to stack_top?
> > which
> > means stack_bottom = start + reserved_size.
>
> That depends on the definition of top and bottom. For me it makes sense
> that the the stack grows from top to the bottom because it grows down,
> which is consistent with the MAP_GROWSDOWN flag.
>

Ok, it sounds we have different comprehension of the MAP_GROWSDOWN flag.
As I thought the flag takes effect on an area of memory and then we regard
the
region as a stack, so I said it grows from the bottom. But if we think a
stack grows
down, then the definition is reverted here.

As this is a gray zone as you said, so I don't want to stick to my own
opinion.

Reviewed-by: Li Wang <liwang@redhat.com>


>
> Also this is really the reason why I added the ASCII art to the top
> level comment of the test in order to make clear how these terms are
> used in the code.


-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200922/affc4958/attachment.htm>

  reply	other threads:[~2020-09-22  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 17:17 [LTP] [PATCH v6] Add a test case for mmap MAP_GROWSDOWN flag Cyril Hrubis
2020-09-21  4:08 ` Li Wang
2020-09-21  9:47   ` Cyril Hrubis
2020-09-22  6:36     ` Li Wang [this message]
2020-09-22 11:31       ` Cyril Hrubis

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='CAEemH2f+yqe2rtNh34fkWiLtVrp=hP70qzNX1HbVt13oyoNzXQ@mail.gmail.com' \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.