public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Compaq Alpha: missing i-cache invalidates in ptrace (2.2.18, 2.4.0) ?
@ 2001-02-15 12:23 James Cownie
  0 siblings, 0 replies; 2+ messages in thread
From: James Cownie @ 2001-02-15 12:23 UTC (permalink / raw)
  To: linux-kernel


I've been seeing some peculiar effects on Alpha boxes (particularly on
SMPs) where threads run right past breakpoints planted by a debugger.
(This on 2.2 series kernels).

Looking at the code in arch/alpha/kernel/ptrace.c there appears to be
nowhere where flush_icache_range is called. According to the Alpha
architecture manual you must execute a "call_pal imb" (which is what
flush_icache_range turns into) after changing the I-stream.

So :-

1) Anyone agree with me that flush_icache_range ought to be called
   after any ptrace write which modifies an executable page ?
   (Or have I missed something which has this effect ?)

2) If so, would patches be accepted ?

The same problem also appears to exist in 2.4...

Thanks

-- Jim 

James Cownie	<jcownie@etnus.com>
Etnus, LLC.     +44 117 9071438
http://www.etnus.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Compaq Alpha: missing i-cache invalidates in ptrace (2.2.18, 2.4.0) ?
       [not found] <Pine.LNX.3.96.1010215062856.5873D-100000@mandrakesoft.mandrakesoft.com>
@ 2001-02-15 13:32 ` James Cownie
  0 siblings, 0 replies; 2+ messages in thread
From: James Cownie @ 2001-02-15 13:32 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-kernel


Jeff Garzik asked :-

> Does the same Alpha problem exist in 2.4.1-AC patches?  (Alan Cox's
> patchkit)

It looks as if there's a very suitable fix in kernel/ptrace.c .

In access_one_page we have 

	if (write) {
		maddr = kmap(page);
		memcpy(maddr + (addr & ~PAGE_MASK), buf, len);
		flush_page_to_ram(page);
		flush_icache_page(vma, page);
		kunmap(page);
	}

which looks ideal to me...

That still leaves 2.2 broken, though :-(

-- Jim 

James Cownie	<jcownie@etnus.com>
Etnus, LLC.     +44 117 9071438
http://www.etnus.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-15 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-15 12:23 Compaq Alpha: missing i-cache invalidates in ptrace (2.2.18, 2.4.0) ? James Cownie
     [not found] <Pine.LNX.3.96.1010215062856.5873D-100000@mandrakesoft.mandrakesoft.com>
2001-02-15 13:32 ` James Cownie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox