From: Keir Fraser Subject: Re: Question regarding SLAB corruption Date: Mon, 09 Jul 2007 22:33:15 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Roland Dreier Cc: Lukas Hejtmanek , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 9/7/07 22:26, "Roland Dreier" wrote: >> Oh! I take it then that the infiniband driver will call sync_single() on >> subsections of a mapped region? I haven't seen that behaviour before and it >> will kill lib/swiotlb.c (the generic Linux swiotlb implementation) just as >> surely as it does the Xen-specific swiotlb! > >> We could make the swiotlb robust to this treatment, I guess. It will involve >> initialising all covered io_tlb_orig_addr[] slots rather than just the >> first. > > Does this mean that lib/swiotlb.c's swiotlb_sync_single_range_for_cpu() > and swiotlb_sync_single_range_for_device() are broken? Given that (as > you say) io_tlb_orig_addr[] only gets one slot filled in at the end of > map_single(), I don't see any way it could work if more than one page > is mapped. Yeah, see the email I posted just one second ago. :-) So my workaround patches are quite applicable to lib/swiotlb.c as a genuine bug fix! -- Keir