runtime: fix stackFromSystem returning memory
runtime: fix stackFromSystem returning memory

The stackFromSystem debug mode has two problems:

1) It rounds the stack allocation to _PageSize. If the physical page
size is >8K, this can cause unmapping the memory later to either
under-unmap or over-unmap.

2) It doesn't return the rounded-up allocation size to its caller, so
when we later unmap the memory, we may pass the wrong length.

Fix these problems by rounding the size up to the physical page size
and putting that rounded-up size in the returned stack bounds.

Fixes #17289.

Change-Id: I6b854af3b06bb16e3750798397bb5e2a722ec1cb
Reviewed-on: https://go-review.googlesource.com/43636
Reviewed-by: Keith Randall <8c99c3a9284e493be632950b84cd789d08ed3e9d@golang.org>

derekmarcotte/go,josharian/go,derekmarcotte/go,golang/go,ImJasonH/go,vsekhar/elastic-go,vsekhar/elastic-go,ImJasonH/go,golang/go,nawawi/go,vsekhar/elastic-go,nawawi/go,cloudflare/go,CAFxX/go,codestation/go,polyverse-security/go,Cofyc/go,ImJasonH/go,cloudflare/go,vsekhar/elastic-go,codestation/go,CAFxX/go,nawawi/go,vsekhar/elastic-go,akutz/go,Cofyc/go,akutz/go,josharian/go,vsekhar/elastic-go,Cofyc/go,derekmarcotte/go,polyverse-security/go,polyverse-security/go,cloudflare/go,ImJasonH/go,akutz/go,golang/go,josharian/go,ImJasonH/go,polyverse-security/go,josharian/go,golang/go,josharian/go,derekmarcotte/go,codestation/go,CAFxX/go,CAFxX/go,ImJasonH/go,codestation/go,Cofyc/go,akutz/go,josharian/go,derekmarcotte/go,nawawi/go,codestation/go,akutz/go,golang/go,ImJasonH/go,Cofyc/go,ImJasonH/go,golang/go,golang/go,cloudflare/go,polyverse-security/go,akutz/go,CAFxX/go,nawawi/go,golang/go,codestation/go,CAFxX/go,polyverse-security/go,vsekhar/elastic-go,nawawi/go,nawawi/go,CAFxX/go,josharian/go,polyverse-security/go,Cofyc/go,cloudflare/go,cloudflare/go,polyverse-security/go,akutz/go,derekmarcotte/go,akutz/go,cloudflare/go,cloudflare/go,josharian/go,CAFxX/go,derekmarcotte/go,nawawi/go,vsekhar/elastic-go,derekmarcotte/go,codestation/go,christopher-henderson/Go,codestation/go,Cofyc/go,Cofyc/go