Re: [PATCH] Flushing cache at exit_mmap

From: Ralf Baechle (ralf@uni-koblenz.de)
Date: Tue Jul 25 2000 - 09:20:48 EST


On Fri, Jul 21, 2000 at 12:57:26PM +0900, NIIBE Yutaka wrote:

> As he seems to be off-line these days, I submit the patch on behalf of
> him. If there's something wrong, it's due to me.
>
> SH-4 has virtually indexed and physically tagged cache, which has
> alias problem to be handled by kernel. When process exits, we need to
> flush the caches used by the process. If we don't do flush here,
> something wrong will be happened later, because of cache aliases, when
> the pages will be reused. The page will be polluted by old cache data
> in unrelated way.
>
> I don't know if TLB flush is needed, but every code has TLB flush, it
> is added.

The cache flush looks fine to me but the TLB flush is not necessary. The
kernel calls destroy_context(mm) from mmput() rsp. tlb_flush_mm(mm) from
exec_mmap which already deal with the TLB issues.

  Ralf

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



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:20 EST