From: Joakim Tjernlund <joakim.tjernlund@transmode.se>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: Disabling stack access for remote targets?
Date: Sun, 03 Jun 2012 17:21:00 -0000 [thread overview]
Message-ID: <OFB96592A6.7A0A8336-ONC1257A12.005EC63F-C1257A12.005F4F7E@transmode.se> (raw)
In-Reply-To: <20120603165813.GA20143@host2.jankratochvil.net>
Jan Kratochvil <jan.kratochvil@redhat.com> wrote on 2012/06/03 18:58:13:
>
> On Sun, 03 Jun 2012 18:42:10 +0200, Joakim Tjernlund wrote:
> > Not quite, I don't see memeor attribute "no-access", just ro, wo, and rw.
>
> There is "set mem inaccessible-by-default" for that purpose, default "on",
> just do not definy any memory area in that range you do not want to touch.
That could work, I need to test that though.
>
>
> > Testing for sp == 0 (or sp == ~0) would be much nicer. It would automatically
> > disable/enable stack access.
>
> sp == 0 or sp == ~0 are perfectly valid stack addresses on embedded targets.
In theory yes, I think you will have a very hard time finding a system using
0 or ~0(which is odd too).
If that is still a concern one could make the address configurable.
I think this feature would be really nice to have because it adapts
dynamically without the user having to know about mem regions.
Jocke
prev parent reply other threads:[~2012-06-03 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 14:29 Joakim Tjernlund
2012-06-03 15:16 ` Jan Kratochvil
2012-06-03 16:42 ` Joakim Tjernlund
2012-06-03 16:58 ` Jan Kratochvil
2012-06-03 17:21 ` Joakim Tjernlund [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFB96592A6.7A0A8336-ONC1257A12.005EC63F-C1257A12.005F4F7E@transmode.se \
--to=joakim.tjernlund@transmode.se \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).