[ofa-general] [PATCH] opensm/osm_ucast_lash: fix buffer overflow

Robert Pearson rpearson at systemfabricworks.com
Sun Oct 12 16:55:49 PDT 2008


I spent a little time looking at osm_ucast_lash.c and ibsim.

It looks like ibsim reports vl_cap = 4 and op_vl = 1 by default for a
switch.

Osm_ucast_lash.c computes the minimum over all switches of op_vl as
extracted from the port info mads starting from (5 which would correspond to
VL 0-14 operational).

It then uses the encoded value as though it was an integer instead of an
encoding of an integer which seems wrong.

I am not yet sure when the SM is supposed to set the op_vl field away from
1. If later then you are using the wrong value and should be comparing to
the decoded value of vl_cap instead.

-----Original Message-----
From: general-bounces at lists.openfabrics.org
[mailto:general-bounces at lists.openfabrics.org] On Behalf Of Robert Pearson
Sent: Sunday, October 12, 2008 5:21 PM
To: 'Sasha Khapyorsky'; 'Hal Rosenstock'
Cc: 'OpenIB'
Subject: RE: [ofa-general] [PATCH] opensm/osm_ucast_lash: fix buffer
overflow

How does lash know how many VLs are available? Especially, with ibsim.
Is there a way to have lash report the number of VLs required independent of
the type of switch used?

-----Original Message-----
From: general-bounces at lists.openfabrics.org
[mailto:general-bounces at lists.openfabrics.org] On Behalf Of Sasha Khapyorsky
Sent: Thursday, October 09, 2008 2:06 PM
To: Hal Rosenstock
Cc: OpenIB
Subject: Re: [ofa-general] [PATCH] opensm/osm_ucast_lash: fix buffer
overflow

On 07:04 Wed 08 Oct     , Hal Rosenstock wrote:
> 
> Minor simplification as it seems like this could just be:
> 
> if (++lanes_needed > p_lash->vl_min)
>   goto Error_Not_Enough_Lanes;

Works for me. Thanks!

Sasha
_______________________________________________
general mailing list
general at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general
_______________________________________________
general mailing list
general at lists.openfabrics.org
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit
http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list