linux-mips
[Top] [All Lists]

Re: vmalloc bugs in 2.4.5???

To: ralf@oss.sgi.com
Subject: Re: vmalloc bugs in 2.4.5???
From: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
Date: Thu, 27 Dec 2001 10:55:18 +0900 (JST)
Cc: dony.he@huawei.com, linux-mips@oss.sgi.com
In-reply-to: <20011226013221.A737@dea.linux-mips.net>
Organization: TOSHIBA Personal Computer System Corporation
References: <20011106130839.B30219@dea.linux-mips.net> <20011107.103947.74756322.nemoto@toshiba-tops.co.jp> <20011226013221.A737@dea.linux-mips.net>
Sender: owner-linux-mips@oss.sgi.com
>>>>> On Wed, 26 Dec 2001 01:32:21 -0200, Ralf Baechle <ralf@oss.sgi.com> said:
>> In somewhere between 2.4.6 and 2.4.9, the call to flush_cache_all()
>> disappered from vmalloc_area_pages().  I have a data corruption
>> problem in vmalloc()ed area without this call.  I think we still
>> need this call.

ralf> Have you ever resolved this problem?  I've just doublechecked
ralf> the vmalloc code and it seems as if it should be entirely safe
ralf> without these two calls.  The tlb is flushed on vfree so no
ralf> stale entries for a vmalloc address can ever be in the tlb at
ralf> vmalloc time, so this flush_tlb_all() is just an expensive nop.
ralf> And the same it true for flush_cache_all() no matter if caches
ralf> are physically or virtually indexed.

I am still using the patch and have not tried without the two calls
recently...

When I found this problem, I suppose that vmalloc called after
free_pages causes the data corruption.  vmalloc can re-use pages freed
by free_pages and it seems free_pages does not flush cache.  If
vmalloc is to use a page which is associated with dirty cache and has
different "color", virtual aliasing happens and data may be corrupt.
Is this wrong?

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>