Re: [PATCH 1/2] ftrace: nmi safe code modification

From: Ingo Molnar
Date: Thu Oct 30 2008 - 16:38:55 EST



* Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> > + /* make sure NMIs see the cleared bit */
> > + smp_mb();
> > +
> > + wait_for_nmi();
> > +
> > + return mod_code_status;
> > +}
>
> I guess the weakness here is that the code will only allow a single
> contiguous hunk of text to be modified. One could envisage
> situations where two or more separate areas of memory need to be
> modified atomically/together.
>
> I guess we can cross that bridge when we fall off it.

yeah - the whole 'transaction' concept can be extended easily, in just
one place.

Not that i think that it would really be useful to go beyond the
current (target,len) abstraction - the less complex code patching is
done, the better.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/