* Calgary and bad_dma_address
@ 2008-09-10 3:19 Pete Zaitcev
2008-09-10 3:37 ` David Miller
2008-09-10 3:38 ` FUJITA Tomonori
0 siblings, 2 replies; 4+ messages in thread
From: Pete Zaitcev @ 2008-09-10 3:19 UTC (permalink / raw)
To: jdmason, muli; +Cc: zaitcev, linux-kernel
Hi, guys:
I was reading arch/x86/kernel/pci-calgary_64.c today, and noticed that
apparently nothing prevents iommu_area_alloc from returning a zero.
But bad_dma_address is zero too. Doesn't it concern anyone?
If the first allocation asks for a page-aligned buffer to be mapped,
a spurious bad address will result, if I understand this right.
The simplest way to avoid the problem is to lose a page and set a bit
in tce_table_setparms():
set_bit(tbl->it_map, bad_dma_address);
But I don't see anything like that done anywhere.
-- Pete
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Calgary and bad_dma_address
2008-09-10 3:19 Calgary and bad_dma_address Pete Zaitcev
@ 2008-09-10 3:37 ` David Miller
2008-09-10 3:57 ` Pete Zaitcev
2008-09-10 3:38 ` FUJITA Tomonori
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2008-09-10 3:37 UTC (permalink / raw)
To: zaitcev; +Cc: jdmason, muli, linux-kernel
From: Pete Zaitcev <zaitcev@redhat.com>
Date: Tue, 9 Sep 2008 21:19:41 -0600
> I was reading arch/x86/kernel/pci-calgary_64.c today, and noticed that
> apparently nothing prevents iommu_area_alloc from returning a zero.
> But bad_dma_address is zero too. Doesn't it concern anyone?
> If the first allocation asks for a page-aligned buffer to be mapped,
> a spurious bad address will result, if I understand this right.
Won't the device range reserves done by calls of calgary_reserve_mem_region()
take care of this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Calgary and bad_dma_address
2008-09-10 3:19 Calgary and bad_dma_address Pete Zaitcev
2008-09-10 3:37 ` David Miller
@ 2008-09-10 3:38 ` FUJITA Tomonori
1 sibling, 0 replies; 4+ messages in thread
From: FUJITA Tomonori @ 2008-09-10 3:38 UTC (permalink / raw)
To: zaitcev; +Cc: jdmason, muli, linux-kernel
On Tue, 9 Sep 2008 21:19:41 -0600
Pete Zaitcev <zaitcev@redhat.com> wrote:
> Hi, guys:
>
> I was reading arch/x86/kernel/pci-calgary_64.c today, and noticed that
> apparently nothing prevents iommu_area_alloc from returning a zero.
> But bad_dma_address is zero too. Doesn't it concern anyone?
> If the first allocation asks for a page-aligned buffer to be mapped,
> a spurious bad address will result, if I understand this right.
Does calgary_reserve_regions() prevent that?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Calgary and bad_dma_address
2008-09-10 3:37 ` David Miller
@ 2008-09-10 3:57 ` Pete Zaitcev
0 siblings, 0 replies; 4+ messages in thread
From: Pete Zaitcev @ 2008-09-10 3:57 UTC (permalink / raw)
To: David Miller; +Cc: jdmason, muli, linux-kernel
On Tue, 09 Sep 2008 20:37:28 -0700 (PDT), David Miller <davem@davemloft.net> wrote:
> > I was reading arch/x86/kernel/pci-calgary_64.c today, and noticed that
> > apparently nothing prevents iommu_area_alloc from returning a zero.
> > But bad_dma_address is zero too. Doesn't it concern anyone?
> Won't the device range reserves done by calls of calgary_reserve_mem_region()
> take care of this?
Sorry, my mistake. Indeed it does, thanks.
-- Pete
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-09-10 4:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10 3:19 Calgary and bad_dma_address Pete Zaitcev
2008-09-10 3:37 ` David Miller
2008-09-10 3:57 ` Pete Zaitcev
2008-09-10 3:38 ` FUJITA Tomonori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®