lkml.org 
[lkml]   [2008]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH]: iommu fix potential overflow in alloc_iommu()


FUJITA Tomonori wrote:
> On Mon, 21 Jul 2008 11:21:39 -0400
> Prarit Bhargava <prarit@redhat.com> wrote:
>
>
>> FUJITA Tomonori wrote:
>>
>>> On Mon, 21 Jul 2008 10:15:22 -0400
>>> Prarit Bhargava <prarit@redhat.com> wrote:
>>>
>>>
>>>
>>>> (This didn't appear on LKML or any of the mirrors ... trying again)
>>>>
>>>> It is possible that alloc_iommu()'s boundary_size overflows as
>>>> dma_get_seg_boundary can return 0xffffffff. In that case, further usage of
>>>> boundary_size triggers a BUG_ON() in the iommu code.
>>>>
>>>>
>>> Did you actually hit this? pci-gart_64.c is used only by X86_64.
>>>
>>>
>> I hit this by declaring a device struct and not declaring a value for
>> dev->dma_parms->segment_boundary_mask.
>>
>
> What do you mean? You set dev->dma_params but does't set
> dev->dma_parms->segment_boundary_mask? If so, you need to fix your
> code. If you set dev->dma_parms, dma_parms needs to be initialized
> properly.
>

No, I didn't set dev->dma_params.

P.



\
 
 \ /
  Last update: 2008-07-21 17:51    [W:0.036 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site