Re: Self modifying code in ARM 11 architectures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On 10:55 Wed 25 May     , Mulyadi Santosa wrote:
> Hi...
> 
> On Tue, May 24, 2011 at 17:15, Ashok Babu <ashok3d@xxxxxxxxx> 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


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux