<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 21, 2020 at 5:46 PM Cyril Hrubis <<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small">...</span><br>
> As the stack grows down, shouldn't grow from stack_bottom to stack_top?<br>
> which<br>
> means stack_bottom = start + reserved_size.<br>
<br>
That depends on the definition of top and bottom. For me it makes sense<br>
that the the stack grows from top to the bottom because it grows down,<br>
which is consistent with the MAP_GROWSDOWN flag.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Ok, it sounds we have different comprehension of the MAP_GROWSDOWN flag.</div><div class="gmail_default" style="font-size:small">As I thought the flag takes effect on an area of memory and then we regard the</div><div class="gmail_default" style="font-size:small">region as a stack, so I said it grows from the bottom. But if we think a stack grows</div><div class="gmail_default" style="font-size:small">down, then the definition is reverted here.</div></div><div class="gmail_default" style="font-size:small"><br></div>As this is a gray zone as you said, so I don't want to stick to <span class="gmail_default" style="font-size:small">my</span> own opinion<span class="gmail_default" style="font-size:small"></span>.</div><div class="gmail_quote"><br></div><div class="gmail_quote"><div class="gmail_default" style="font-size:small">Reviewed-by: Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Also this is really the reason why I added the ASCII art to the top<br>
level comment of the test in order to make clear how these terms are<br>
used in the code.</blockquote></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>