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] [day] [month] [year] [list]
Message-ID: <8c13e026-b496-d3bd-8d8d-8a4fd607b43a@linux.ibm.com>
Date:   Tue, 17 Nov 2020 16:39:53 -0800
From:   Tyrel Datwyler <tyreld@...ux.ibm.com>
To:     Brian King <brking@...ux.vnet.ibm.com>,
        james.bottomley@...senpartnership.com
Cc:     martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        brking@...ux.ibm.com
Subject: Re: [PATCH 4/6] ibmvfc: add FC payload retrieval routines for
 versioned vfcFrames

On 11/17/20 2:21 PM, Brian King wrote:
> On 11/17/20 4:14 PM, Brian King wrote:
>> On 11/11/20 7:04 PM, Tyrel Datwyler wrote:
>>> The FC iu and response payloads are located at different offsets
>>> depending on the ibmvfc_cmd version. This is a result of the version 2
>>> vfcFrame definition adding an extra 64bytes of reserved space to the
>>> structure prior to the payloads.
>>>
>>> Add helper routines to determine the current vfcFrame version and
>>> returning pointers to the proper iu or response structures within that
>>> ibmvfc_cmd.
>>>
>>> Signed-off-by: Tyrel Datwyler <tyreld@...ux.ibm.com>
>>> ---
>>>  drivers/scsi/ibmvscsi/ibmvfc.c | 76 ++++++++++++++++++++++++----------
>>>  1 file changed, 53 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
>>> index aa3445bec42c..5e666f7c9266 100644
>>> --- a/drivers/scsi/ibmvscsi/ibmvfc.c
>>> +++ b/drivers/scsi/ibmvscsi/ibmvfc.c
>>> @@ -138,6 +138,22 @@ static void ibmvfc_tgt_move_login(struct ibmvfc_target *);
>>>  
>>>  static const char *unknown_error = "unknown error";
>>>  
>>> +static struct ibmvfc_fcp_cmd_iu *ibmvfc_get_fcp_iu(struct ibmvfc_host *vhost, struct ibmvfc_cmd *vfc_cmd)
>>> +{
>>> +	if (be64_to_cpu(vhost->login_buf->resp.capabilities) & IBMVFC_HANDLE_VF_WWPN)
>>
>> Suggest adding a flag to the vhost structure that you setup after login in order to
>> simplify this check and avoid chasing multiple pointers along with a byte swap.
>>
>> Maybe something like:
>>
>> vhost->is_v2
> 
> Even better might be vhost->version which you'd set to 1 or 2 and then you could directly
> use that to set the field in the command structures later.

So, the problem is that now a MADs version is determined by capability and not
an over arching protocol version. So, we will still have some MAD's that are v1
while other are v2 with a certain capability. The solution could work in the
short term since targetWWPN is the only feature that has v2 MADs, but I suspect
more versioning down the pipeline which may lead to some MADs whose v2 form has
nothing to do with targetWWPN support.

-Tyrel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ