Re: using mprotect to write to .text

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

 



David Daney wrote:

> I cannot parse the meaning out of these last two sentences.  The
> cacheflush() system call both exists and works.  You want to change it?

Let me rewind a bit.  I have a multithreaded binary running on multiple
physical CPUs.  As part of a debugging mechanism, I want to make changes
to .text from a thread dedicated to the purpose.  This requires at the
least icache flushes on all CPUs but also hazard avoidance measures on
all CPUs.  So I understand anyway.

The cacheflush call will do the flush but not the hazard avoidance.  In
order to solve my particular issue I am thinking about adding the hazard
avoidance into cacheflush for my particular application.  It is not a
question of cacheflush being wrong, but of extending it to meet my
needs.  In fact, it seems like a useful change -- it will allow an
application to do exactly what I want to do, and easily so, and would
seem a logical place for the functionality to reside.

Sorry if I seem a bit muddled -- this is extremely low level and not
what I deal with day to day.

Joe Buehler



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux