lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <497F9CC5.8080807@s5r6.in-berlin.de>
Date:	Wed, 28 Jan 2009 00:46:13 +0100
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
CC:	linux1394-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: swiotlb default size (64 MB) too small?

FUJITA Tomonori wrote:
> On Tue, 27 Jan 2009 18:03:40 +0100 (CET)
> Stefan Richter <stefanr@...6.in-berlin.de> wrote:
>> +static void sbp2_unmap_scatterlist(struct device *card_device,
>> +				   struct sbp2_command_orb *orb)
>> +{
>> +	if (scsi_sg_count(orb->cmd))
>> +		dma_unmap_sg(card_device, scsi_sglist(orb->cmd),
>> +			     scsi_sg_count(orb->cmd),
>> +			     orb->cmd->sc_data_direction);
>> +
>> +	if (orb->page_table_bus)
>> +		dma_unmap_single(card_device, orb->page_table_bus,
>> +				 sizeof(orb->page_table), DMA_TO_DEVICE);
> 
> Well, this does not look correct since zero can be a valid dma
> address.

Hmm.

> static void sbp2_unmap_scatterlist(struct device *card_device,
> 				   struct sbp2_command_orb *orb)
> {
> 	if (scsi_sg_count(orb->cmd))
> 		dma_unmap_sg(card_device, scsi_sglist(orb->cmd),
> 			     scsi_sg_count(orb->cmd),
> 			     orb->cmd->sc_data_direction);
> 
> 	if (scsi_sg_count(orb->cmd) > 1)
> 		dma_unmap_single(card_device, orb->page_table_bus,
> 				 sizeof(orb->page_table), DMA_TO_DEVICE);
> 
> 
> Well, looks cranky a bit but firewire is cranky for me :)

Even if scsi_sg_count(cmd) > 1, the outcome of dma_map_sg() could have
been 1, couldn't it?  So I need to take note of that in another way.
-- 
Stefan Richter
-=====-==--= ---= ===--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ