Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 2015 02:02:51 +0200
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Wojciech Puchar <wojtek@puchar.net>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: stack pointer on 64-bit architecture
Message-ID:  <CAPQ4fft%2BUt-ZiNM9=q3V-G9Pm3ppzqZGKJ0JS3Sw-i7mQRhUTQ@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.20.1504122119100.18539@laptop.wojtek.intra>
References:  <alpine.BSF.2.20.1504122119100.18539@laptop.wojtek.intra>

next in thread | previous in thread | raw e-mail | index | archive | help
The stack address come from this code:

https://github.com/freebsd/freebsd/blob/master/sys/kern/kern_exec.c#L1065
where sv->sv_usrstack depends on architecture and on image activator.

and this the other place, where the stack address is "hardcoded":
https://github.com/freebsd/freebsd/blob/master/sys/kern/kern_exec.c#L1240


Just grep against sv_psstrings and sv_usrstack to see what depend on
current hardcoded stack address. ;)

On Sun, Apr 12, 2015 at 9:19 PM, Wojciech Puchar <wojtek@puchar.net> wrote:
> what decides where stack is located when process starts on 64-bit machine
> (x86-64)?
>
> it starts normally below 0x0000800000000000
>
> can starting address be set to different (smaller) value?
>
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4fft%2BUt-ZiNM9=q3V-G9Pm3ppzqZGKJ0JS3Sw-i7mQRhUTQ>