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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Mar 2018 10:00:26 -0700
From:   Shannon Nelson <shannon.nelson@...cle.com>
To:     "Venkataramanan, Anirudh" <anirudh.venkataramanan@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH 03/15] ice: Start hardware
 initialization

On 3/14/2018 3:05 PM, Venkataramanan, Anirudh wrote:
> On Mon, 2018-03-12 at 19:05 -0700, Shannon Nelson wrote:
>> On 3/9/2018 9:21 AM, Anirudh Venkataramanan wrote:


>>> +
>>> +/**
>>> + * ice_read_sr_aq - Read Shadow RAM.
>>> + * @hw: pointer to the HW structure
>>> + * @offset: offset in words from module start
>>> + * @words: number of words to read
>>> + * @data: buffer for words reads from Shadow RAM
>>> + * @last_command: tells the AdminQ that this is the last command
>>> + *
>>> + * Reads 16-bit word buffers from the Shadow RAM using the admin
>>> command.
>>> + */
>>> +static enum ice_status
>>> +ice_read_sr_aq(struct ice_hw *hw, u32 offset, u16 words, u16
>>> *data,
>>> +	       bool last_command)
>>> +{
>>> +	enum ice_status status;
>>> +
>>> +	status = ice_check_sr_access_params(hw, offset, words);
>>> +	if (!status)
>>> +		status = ice_aq_read_nvm(hw, 0, 2 * offset, 2 *
>>> words, data,
>>
>> Why the doubling of offset and words?  If this is some general
>> adjustment made for the AQ interface, it should be made in
>> ice_aq_read_nvm().  If not, then some explanation is needed here.
> 
> ice_read_sr_aq expects a word offset and size in words. The
> ice_aq_read_nvm interface expects offset and size in bytes. The
> doubling is a conversion from word offset/size to byte offset/size.

In that case, this might be a good place for a small comment for readers 
like me who don't have the spec available.

sln

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ