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]
Date: Tue, 19 Dec 2023 11:59:52 +0000
From: Simon Horman <horms@...nel.org>
To: Wen Gu <guwen@...ux.alibaba.com>
Cc: wintera@...ux.ibm.com, wenjia@...ux.ibm.com, hca@...ux.ibm.com,
	gor@...ux.ibm.com, agordeev@...ux.ibm.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	kgraul@...ux.ibm.com, jaka@...ux.ibm.com, borntraeger@...ux.ibm.com,
	svens@...ux.ibm.com, alibuda@...ux.alibaba.com,
	tonylu@...ux.alibaba.com, raspl@...ux.ibm.com,
	schnelle@...ux.ibm.com, guangguan.wang@...ux.alibaba.com,
	linux-s390@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v7 07/10] net/smc: compatible with 128-bits
 extended GID of virtual ISM device

On Tue, Dec 19, 2023 at 04:45:33PM +0800, Wen Gu wrote:
> According to virtual ISM support feature defined by SMCv2.1, GIDs of
> virtual ISM device are UUIDs defined by RFC4122, which are 128-bits
> long. So some adaptation work is required. And note that the GIDs of
> existing platform firmware ISM devices still remain 64-bits long.
> 
> Signed-off-by: Wen Gu <guwen@...ux.alibaba.com>
> Reviewed-by: Alexandra Winter <wintera@...ux.ibm.com>

...

> @@ -1023,9 +1041,12 @@ smcd_clc_prep_confirm_accept(struct smc_connection *conn,
>  	if (version == SMC_V1) {
>  		clc->hdr.length = htons(SMCD_CLC_ACCEPT_CONFIRM_LEN);
>  	} else {
> -		clc->d1.chid = htons(smc_ism_get_chid(smcd));
> +		chid = smc_ism_get_chid(smcd);
> +		clc->d1.chid = htons(chid);
>  		if (eid && eid[0])
>  			memcpy(clc->d1.eid, eid, SMC_MAX_EID_LEN);
> +		if (__smc_ism_is_virtual(chid))
> +			clc->d1.gid_ext = htonll(smcd_gid.gid_ext);

Hi Wen Gu,

The type of clc->d1.gid_ext is u64 (host byte-order)
but here it is being assigned a big endian value.
This does not seem correct.

Flagged by Smatch.

>  		len = SMCD_CLC_ACCEPT_CONFIRM_LEN_V2;
>  		if (first_contact) {
>  			*fce_len = smc_clc_fill_fce_v2x(fce_v2x, ini);

...

-- 
pw-bot: changes-requested

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ