[LTP] [PATCH v6] Add a test case for mmap MAP_GROWSDOWN flag
Li Wang
liwang@redhat.com
Tue Sep 22 08:36:43 CEST 2020
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>
More information about the ltp
mailing list