Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2020 15:04:18 +0200 (CEST)
From:      Paul FLOYD <pjfloyd@wanadoo.fr>
To:        "toolchain@freebsd.org" <toolchain@freebsd.org>
Subject:   Re: x86 process memory map
Message-ID:  <964111370.6209.1585659858192.JavaMail.www@wwinf1g01>
In-Reply-To: <20200330075428.GG1992@kib.kiev.ua>
References:  <E933CC5C-756E-4C0B-96FE-EA1A70CC3139@wanadoo.fr> <20200330075428.GG1992@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
> It is the stack grow area and the guard, combined. Read the mmap(2), in> =
particular explanation of MAP_STACK and MAP_GUARD.
I see from the mmap man page that this appeared in FreeBSD 11.1.
=C2=A0
Do you know where the size of the stack guard gets defined? I tried searchi=
ng on google for stuff like 'stack MAP_GUARD size' but didn't find anything=
.
=C2=A0
(I need this to fix setting up the client stack on Valgrind x86, which is c=
urrently broken)
=C2=A0
A+
Paul
=C2=A0
From owner-freebsd-toolchain@freebsd.org  Tue Mar 31 15:20:15 2020
Return-Path: <owner-freebsd-toolchain@freebsd.org>
Delivered-To: freebsd-toolchain@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 660D126098C
 for <freebsd-toolchain@mailman.nyi.freebsd.org>;
 Tue, 31 Mar 2020 15:20:15 +0000 (UTC)
 (envelope-from kostikbel@gmail.com)
Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3])
 by mx1.freebsd.org (Postfix) with ESMTP id 48sCgZ1dfWz3PJn
 for <freebsd-toolchain@freebsd.org>; Tue, 31 Mar 2020 15:20:10 +0000 (UTC)
 (envelope-from kostikbel@gmail.com)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 4D340260989; Tue, 31 Mar 2020 15:20:02 +0000 (UTC)
Delivered-To: toolchain@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2233C260988
 for <toolchain@mailman.nyi.freebsd.org>; Tue, 31 Mar 2020 15:20:02 +0000 (UTC)
 (envelope-from kostikbel@gmail.com)
Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 server-signature RSA-PSS (4096 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 48sCg858y7z3PCR
 for <toolchain@freebsd.org>; Tue, 31 Mar 2020 15:19:48 +0000 (UTC)
 (envelope-from kostikbel@gmail.com)
Received: from tom.home (kib@localhost [127.0.0.1])
 by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 02VFJTwr076556
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO);
 Tue, 31 Mar 2020 18:19:32 +0300 (EEST)
 (envelope-from kostikbel@gmail.com)
DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 02VFJTwr076556
Received: (from kostik@localhost)
 by tom.home (8.15.2/8.15.2/Submit) id 02VFJTjM076555;
 Tue, 31 Mar 2020 18:19:29 +0300 (EEST)
 (envelope-from kostikbel@gmail.com)
X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com
 using -f
Date: Tue, 31 Mar 2020 18:19:28 +0300
From: Konstantin Belousov <kostikbel@gmail.com>
To: Paul FLOYD <pjfloyd@wanadoo.fr>
Cc: "toolchain@freebsd.org" <toolchain@freebsd.org>
Subject: Re: x86 process memory map
Message-ID: <20200331151928.GI1992@kib.kiev.ua>
References: <E933CC5C-756E-4C0B-96FE-EA1A70CC3139@wanadoo.fr>
 <20200330075428.GG1992@kib.kiev.ua>
 <964111370.6209.1585659858192.JavaMail.www@wwinf1g01>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <964111370.6209.1585659858192.JavaMail.www@wwinf1g01>
X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00,
 DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM,
 NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home
X-Rspamd-Queue-Id: 48sCg858y7z3PCR
X-Spamd-Bar: -
Authentication-Results: mx1.freebsd.org; dkim=none;
 dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com
 (policy=none); 
 spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor
 denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com
X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[];
 TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[];
 FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[];
 FREEMAIL_FROM(0.00)[gmail.com];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain];
 HAS_XAW(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_SPF_SOFTFAIL(0.00)[~all]; IP_SCORE_FREEMAIL(0.00)[];
 TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2];
 IP_SCORE(0.00)[ip: (-3.13), ipnet: 2001:470::/32(-4.66), asn: 6939(-3.60),
 country: US(-0.05)]; FREEMAIL_TO(0.00)[wanadoo.fr];
 FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[];
 MIME_TRACE(0.00)[0:+];
 ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US];
 RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com];
 DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]
X-BeenThere: freebsd-toolchain@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Maintenance of FreeBSD's integrated toolchain
 <freebsd-toolchain.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-toolchain>, 
 <mailto:freebsd-toolchain-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-toolchain/>;
List-Post: <mailto:freebsd-toolchain@freebsd.org>
List-Help: <mailto:freebsd-toolchain-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain>, 
 <mailto:freebsd-toolchain-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Mar 2020 15:20:15 -0000

On Tue, Mar 31, 2020 at 03:04:18PM +0200, Paul FLOYD wrote:
> > It is the stack grow area and the guard, combined. Read the mmap(2), in> particular explanation of MAP_STACK and MAP_GUARD.
> I see from the mmap man page that this appeared in FreeBSD 11.1.
>  
> Do you know where the size of the stack guard gets defined? I tried searching on google for stuff like 'stack MAP_GUARD size' but didn't find anything.

Guard fills the rest of the stack region, so that [guard; mapped stack]
fill the whole area as requested by mmap.  Start of the guard is at the
starting address requested from mmap (or auto-selected), end of the mapped
area is at guard start + total len.

I believe it is explained in the man page.

>  
> (I need this to fix setting up the client stack on Valgrind x86, which is currently broken)
>  
> A+
> Paul
>  
> _______________________________________________
> freebsd-toolchain@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
> To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?964111370.6209.1585659858192.JavaMail.www>