This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: SafeStack proposal in GCC
- From: Ian Lance Taylor <iant at google dot com>
- To: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Cc: Michael Matz <matz at suse dot de>, Rich Felker <dalias at libc dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 9 May 2016 13:41:53 -0700
- Subject: Re: SafeStack proposal in GCC
- Authentication-results: sourceware.org; auth=none
- References: <CAFA9rWPkb=eV0GhvFeOnd4pRVh=N3fSifYBwZjy9Ndh68BmBww at mail dot gmail dot com> <0d50f0ef01b24c25a79a6f18eaddfd6d at REXA dot intranet dot epfl dot ch> <CANL6WeqEwFYx2H-sv81K8CDFypiJ+ray+xPyRH+7kitTpD8bqw at mail dot gmail dot com> <20160507054212 dot GE21636 at brightrain dot aerifal dot cx> <alpine dot LSU dot 2 dot 20 dot 1605092101000 dot 13156 at wotan dot suse dot de> <20160509193503 dot GF21636 at brightrain dot aerifal dot cx> <alpine dot LSU dot 2 dot 20 dot 1605092147020 dot 13156 at wotan dot suse dot de> <c0dacbbe-dccc-8d99-be0c-7f7f2dde24a4 at oarcorp dot com>
On Mon, May 9, 2016 at 1:07 PM, Joel Sherrill <joel.sherrill@oarcorp.com> wrote:
>
> One complication on RTEMS which is a single process, multi-threaded RTOS
> is that we can no longer check the stack bounds. For threads, we know
> where the stack memory is and the range for each thread. For ucontext_t,
> it seems this knowledge is unknown to the RTOS.
>
> Thus it would become the responsibility of the run-time using ucontext_t
> to put in fence patterns and check those.
On RTEMS and similar systems, you could write makecontext to register
the stack (whose start and length are known to the function) with the
RTOS.
Ian