<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:29:59 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-9862] The patch that landed for LU-7890  leads to static checker errors</title>
                <link>https://jira.whamcloud.com/browse/LU-9862</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;After landing the patch for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7890&quot; title=&quot;EFBIG on 2TB singly stripped file with ZFS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7890&quot;&gt;&lt;del&gt;LU-7890&lt;/del&gt;&lt;/a&gt; Dan Carpenter ran a static checker on the lustre code and reported the following error:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;The patch 476f575cf070: &quot;staging: lustre: lov: Ensure correct
operation for large object sizes&quot; from Jul 26, 2017, leads to the
following static checker warning:

        drivers/staging/lustre/lustre/lov/lov_ea.c:207 lsm_unpackmd_common()
        warn: signed overflow undefined. &apos;min_stripe_maxbytes * stripe_count &amp;lt; min_stripe_maxbytes&apos;

drivers/staging/lustre/lustre/lov/lov_ea.c
   148  static int lsm_unpackmd_common(struct lov_obd *lov,
   149                                 struct lov_stripe_md *lsm,
   150                                 struct lov_mds_md *lmm,
   151                                 struct lov_ost_data_v1 *objects)
   152  {
   153          loff_t min_stripe_maxbytes = 0;
                ^^^^^^
loff_t is long long.

   154          unsigned int stripe_count;
   155          struct lov_oinfo *loi;
   156          loff_t lov_bytes;
   157          unsigned int i;
   158  
   159          /*
   160           * This supposes lov_mds_md_v1/v3 first fields are
   161           * are the same
   162           */
   163          lmm_oi_le_to_cpu(&amp;amp;lsm-&amp;gt;lsm_oi, &amp;amp;lmm-&amp;gt;lmm_oi);
   164          lsm-&amp;gt;lsm_stripe_size = le32_to_cpu(lmm-&amp;gt;lmm_stripe_size);
   165          lsm-&amp;gt;lsm_pattern = le32_to_cpu(lmm-&amp;gt;lmm_pattern);
   166          lsm-&amp;gt;lsm_layout_gen = le16_to_cpu(lmm-&amp;gt;lmm_layout_gen);
   167          lsm-&amp;gt;lsm_pool_name[0] = &apos;\0&apos;;
   168  
   169          stripe_count = lsm_is_released(lsm) ? 0 : lsm-&amp;gt;lsm_stripe_count;
   170  
   171          for (i = 0; i &amp;lt; stripe_count; i++) {
   172                  loi = lsm-&amp;gt;lsm_oinfo[i];
   173                  ostid_le_to_cpu(&amp;amp;objects[i].l_ost_oi, &amp;amp;loi-&amp;gt;loi_oi);
   174                  loi-&amp;gt;loi_ost_idx = le32_to_cpu(objects[i].l_ost_idx);
   175                  loi-&amp;gt;loi_ost_gen = le32_to_cpu(objects[i].l_ost_gen);
   176                  if (lov_oinfo_is_dummy(loi))
   177                          continue;
   178  
   179                  if (loi-&amp;gt;loi_ost_idx &amp;gt;= lov-&amp;gt;desc.ld_tgt_count &amp;amp;&amp;amp;
   180                      !lov2obd(lov)-&amp;gt;obd_process_conf) {
   181                          CERROR(&quot;%s: OST index %d more than OST count %d\n&quot;,
   182                                 (char *)lov-&amp;gt;desc.ld_uuid.uuid,
   183                                 loi-&amp;gt;loi_ost_idx, lov-&amp;gt;desc.ld_tgt_count);
   184                          lov_dump_lmm_v1(D_WARNING, lmm);
   185                          return -EINVAL;
   186                  }
   187  
   188                  if (!lov-&amp;gt;lov_tgts[loi-&amp;gt;loi_ost_idx]) {
   189                          CERROR(&quot;%s: OST index %d missing\n&quot;,
   190                                 (char *)lov-&amp;gt;desc.ld_uuid.uuid,
   191                                 loi-&amp;gt;loi_ost_idx);
   192                          lov_dump_lmm_v1(D_WARNING, lmm);
   193                          continue;
   194                  }
   195  
   196                  lov_bytes = lov_tgt_maxbytes(lov-&amp;gt;lov_tgts[loi-&amp;gt;loi_ost_idx]);
   197                  if (min_stripe_maxbytes == 0 || lov_bytes &amp;lt; min_stripe_maxbytes)
   198                          min_stripe_maxbytes = lov_bytes;
   199          }
   200  
   201          if (min_stripe_maxbytes == 0)
   202                  min_stripe_maxbytes = LUSTRE_EXT3_STRIPE_MAXBYTES;
   203  
   204          stripe_count = lsm-&amp;gt;lsm_stripe_count ?: lov-&amp;gt;desc.ld_tgt_count;
   205          lov_bytes = min_stripe_maxbytes * stripe_count;
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is undefined in C.

   206  
   207          if (lov_bytes &amp;lt; min_stripe_maxbytes) /* handle overflow */
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So this might be wrong.

   208                  lsm-&amp;gt;lsm_maxbytes = MAX_LFS_FILESIZE;
   209          else
   210                  lsm-&amp;gt;lsm_maxbytes = lov_bytes;
   211  
   212          return 0;
   213  }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>upstream client / standard lustre client.</environment>
        <key id="47772">LU-9862</key>
            <summary>The patch that landed for LU-7890  leads to static checker errors</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="utopiabound">Nathaniel Clark</assignee>
                                    <reporter username="simmonsja">James A Simmons</reporter>
                        <labels>
                    </labels>
                <created>Fri, 11 Aug 2017 00:19:05 +0000</created>
                <updated>Wed, 18 Mar 2020 20:05:31 +0000</updated>
                            <resolved>Fri, 12 Jul 2019 13:07:23 +0000</resolved>
                                    <version>Lustre 2.11.0</version>
                                    <fixVersion>Lustre 2.13.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="205141" author="pjones" created="Fri, 11 Aug 2017 12:18:43 +0000"  >&lt;p&gt;Hmm. Surprising. Do we know which tool Dan was using? I would have expected it to have been smatch which Oleg uses in his pre-landing testing.&lt;/p&gt;</comment>
                            <comment id="205145" author="simmonsja" created="Fri, 11 Aug 2017 13:38:48 +0000"  >&lt;p&gt;I can ask him.&lt;/p&gt;</comment>
                            <comment id="205155" author="gerrit" created="Fri, 11 Aug 2017 15:57:01 +0000"  >&lt;p&gt;Nathaniel Clark (nathaniel.l.clark@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28484&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28484&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9862&quot; title=&quot;The patch that landed for LU-7890  leads to static checker errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9862&quot;&gt;&lt;del&gt;LU-9862&lt;/del&gt;&lt;/a&gt; lov: Correct bounds checking and typing&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 3ea457b84ee5584080aba0b03dbb11968f7ec99c&lt;/p&gt;</comment>
                            <comment id="251214" author="gerrit" created="Fri, 12 Jul 2019 05:40:33 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28484/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28484/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9862&quot; title=&quot;The patch that landed for LU-7890  leads to static checker errors&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9862&quot;&gt;&lt;del&gt;LU-9862&lt;/del&gt;&lt;/a&gt; lov: Correct bounds checking&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 31ff883c7b0cb4ffbea2cffeb853ea4acc9688d6&lt;/p&gt;</comment>
                            <comment id="251233" author="pjones" created="Fri, 12 Jul 2019 13:07:23 +0000"  >&lt;p&gt;Landed for 2.13&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="35476">LU-7890</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="58119">LU-13260</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="56278">LU-12511</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzicf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>