| To: | Joe Buehler <aspam@cox.net> |
|---|---|
| Subject: | Re: using mprotect to write to .text |
| From: | David Daney <david.daney@cavium.com> |
| Date: | Tue, 11 Oct 2011 11:43:20 -0700 |
| Cc: | linux-mips@linux-mips.org |
| In-reply-to: | <4E948C62.3000802@cox.net> |
| References: | <loom.20111010T215444-70@post.gmane.org> <4E9470A1.8020309@cavium.com> <4E947D8A.9090409@cox.net> <4E948593.6030604@cavium.com> <4E948C62.3000802@cox.net> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 |
Two points you may not be aware of: 1) cacheflush() clears all hazards. 2) There are no hazards on Octeon. On 10/11/2011 11:35 AM, Joe Buehler wrote: 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 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: using mprotect to write to .text, Joe Buehler |
|---|---|
| Next by Date: | Re: using mprotect to write to .text, Ralf Baechle |
| Previous by Thread: | Re: using mprotect to write to .text, Joe Buehler |
| Next by Thread: | Re: using mprotect to write to .text, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |