From: michi1@michaelblizek.twilightparadox.com (Michael Blizek)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Self modifying code in ARM 11 architectures
Date: Wed, 25 May 2011 17:18:48 +0200 [thread overview]
Message-ID: <20110525151848.GA2085@michaelblizek.twilightparadox.com> (raw)
In-Reply-To: <BANLkTimBda+ncn6_a4AFCGR1aMJLm-GE_w@mail.gmail.com>
Hi!
On 10:55 Wed 25 May , Mulyadi Santosa wrote:
> Hi...
>
> On Tue, May 24, 2011 at 17:15, Ashok Babu <ashok3d@gmail.com> wrote:
> > So here my questions/doubts :
> > 1) Is'nt it the kernel itself is self modifying code with lots of function
> > pointers ?
>
> AFAIK, yes there are many.. however, some of them, even in the form of
> pointer assignment, are rarely changing.
>
> But if it is changing, for sure cache needs to be flushed/invalidated.
> This is especially true in SMP environment ( and don't forget memory
> barrier....)
This sounds like a very interesting arch to me. I would very much like to see
any code which does cache flushing when changing a function pointer. In the
mean time, let us assume that function pointers are data, not code. ;-) Then,
you still have to think about concurrency, but not about cache flushing.
What could cause trouble:
- http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html - This requires an
executeable stack - never tested whether kernel stacks are executable. No idea
if something makes them executable.
- Assembly code in arch/ , like the tracing framework.
- ???
-Michi
--
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com
next prev parent reply other threads:[~2011-05-25 15:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 10:15 Self modifying code in ARM 11 architectures Ashok Babu
2011-05-25 3:55 ` Mulyadi Santosa
2011-05-25 15:18 ` Michael Blizek [this message]
2011-05-25 15:55 ` Mulyadi Santosa
2011-05-25 16:28 ` Peter Teoh
2011-05-26 2:53 ` Peter Teoh
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=20110525151848.GA2085@michaelblizek.twilightparadox.com \
--to=michi1@michaelblizek.twilightparadox.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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 NNTP newsgroup(s).