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: <56C74781.7020407@ti.com>
Date:	Fri, 19 Feb 2016 11:49:05 -0500
From:	Murali Karicheri <m-karicheri2@...com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
	<davem@...emloft.net>
Subject: Re: [PATCH v1 3/4] net: netcp: rename {get/set}pad_info to
 {get/set}_sw_data

On 02/19/2016 09:37 AM, Arnd Bergmann wrote:
> On Thursday 18 February 2016 14:46:16 Murali Karicheri wrote:
>> Rename the helpers to match with the updated dma desc field sw_data.
>>
>> Cc: Wingman Kwok <w-kwok2@...com>
>> Cc: Mugunthan V N <mugunthanvnm@...com>
>> CC: Arnd Bergmann <arnd@...db.de>
>> CC: Grygorii Strashko <grygorii.strashko@...com>
>> CC: David Laight <David.Laight@...LAB.COM>
>> Signed-off-by: Murali Karicheri <m-karicheri2@...com>
>> ---
>>  v1 - new patch to based on discussion at
>> 	https://patchwork.ozlabs.org/patch/580860/
>>  drivers/net/ethernet/ti/netcp_core.c | 40 +++++++++++++++++++-----------------
>>  1 file changed, 21 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
>> index 0b26e52..1d07cca 100644
>> --- a/drivers/net/ethernet/ti/netcp_core.c
>> +++ b/drivers/net/ethernet/ti/netcp_core.c
>> @@ -117,10 +117,11 @@ static void get_pkt_info(dma_addr_t *buff, u32 *buff_len, dma_addr_t *ndesc,
>>  	*ndesc = le32_to_cpu(desc->next_desc);
>>  }
>>  
>> -static void get_pad_info(u32 *pad0, u32 *pad1, struct knav_dma_desc *desc)
>> +static void get_sw_data(u32 *data0, u32 *data1, struct knav_dma_desc *desc)
>>  {
>> -	*pad0 = le32_to_cpu(desc->pad[0]);
>> -	*pad1 = le32_to_cpu(desc->pad[1]);
>> +	/* No Endian conversion needed as this data is untouched by hw */
>> +	*data0 = desc->sw_data[0];
>> +	*data1 = desc->sw_data[1];
>>  }
> 
> Actually this needs to be done together with patch 2, or you
> get a build failure if this one is not yet applied.
I have realized that. Only reason was that it belongs to drivers/soc which is
merged through Santosh. I will combine it and re-send.
> 
>> @@ -1174,7 +1176,7 @@ static int netcp_tx_submit_skb(struct netcp_intf *netcp,
>>  	}
>>  
>>  	set_words(&tmp, 1, &desc->packet_info);
>> -	set_words((u32 *)&skb, 1, &desc->pad[0]);
>> +	set_words((u32 *)&skb, 1, &desc->sw_data[0]);
>>  
>>  	if (tx_pipe->flags & SWITCH_TO_PORT_IN_TAGINFO) {
>>  		tmp = tx_pipe->switch_to_port;
>>
> 
> This seems to introduce a bug, and should produce an "sparse" warning
> about a u32 being passed into a function expecting a __le32.
> 
Ahah, this was changed recently. I will take a look.

> The other bug I originally tried to address here is the way an indirect
> pointer is converted to a 'u32' pointer, which won't work on 64-bit
> architectures when pointers are wider than u32. Maybe at least put a
> comment here that this is a known deficiency.
> 
Ok. Let me check and respond.

> 	Arnd
> 


-- 
Murali Karicheri
Linux Kernel, Keystone

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ