<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:19:03 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-1714] crash upon loading libcfs module</title>
                <link>https://jira.whamcloud.com/browse/LU-1714</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;RIP: 0010:[&amp;lt;ffffffffa06a2807&amp;gt;]  [&amp;lt;ffffffffa06a2807&amp;gt;] cfs_crypto_hash_digest+0xf6/0x166 [libcfs]
RSP: 0018:ffff88007c5fbda8  EFLAGS: 00010293
RAX: ffffea0001a55e00 RBX: ffff880078640000 RCX: 0000000087654321
RDX: 0000000000000000 RSI: ffffffffa06c6398 RDI: ffff880078640000
RBP: ffff88007c5fbe28 R08: 0000000000000000 R09: d84156c5635688c0
R10: d84156c5635688c0 R11: 0000000000000020 R12: 0000000000000000
R13: ffff88007c5fbe78 R14: 0000000000020000 R15: ffff88007c5fbe74
FS:  00007f2ef3eb6700(0000) GS:ffff880005000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f4777fa5000 CR3: 000000007c62c000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process insmod (pid: 8489, threadinfo ffff88007c5fa000, task ffff88007c6f00c0)
Stack:
 0000000000000000 0000000000000000 0000000000000000 0000000000000000
&amp;lt;0&amp;gt; 0000000000000000 0000000000000000 ffff88007c321988 0000000000000000
&amp;lt;0&amp;gt; 00007f2ef1eee010 ffffffffa06c6390 ffff88007c5fbe28 0000000000000000
Call Trace:
 [&amp;lt;ffffffffa06a29c8&amp;gt;] cfs_crypto_register+0x151/0x35a [libcfs]
 [&amp;lt;ffffffff8151cbcb&amp;gt;] ? _spin_unlock+0x2b/0x40
 [&amp;lt;ffffffffa06b3120&amp;gt;] ? cfs_wi_sched_create+0x3bf/0x4d4 [libcfs]
 [&amp;lt;ffffffffa06a5d34&amp;gt;] ? init_libcfs_module+0x0/0x377 [libcfs]
 [&amp;lt;ffffffffa06a5d34&amp;gt;] ? init_libcfs_module+0x0/0x377 [libcfs]
 [&amp;lt;ffffffffa06a5f5f&amp;gt;] init_libcfs_module+0x22b/0x377 [libcfs]
 [&amp;lt;ffffffff8100204c&amp;gt;] do_one_initcall+0x3c/0x1d0
 [&amp;lt;ffffffff810c1333&amp;gt;] sys_init_module+0xe3/0x260
 [&amp;lt;ffffffff8100b0b2&amp;gt;] system_call_fastpath+0x16/0x1b
Code: c1 e8 0c 48 8d 0c c5 00 00 00 00 48 c1 e0 06 48 29 c8 48 b9 00 00 00 00 00 ea ff ff 48 8d 04 08 b9 21 43 65 87 48 39 4d 80 74 04 &amp;lt;0f&amp;gt; 0b eb fe f6 c2 01 74 04 0f 0b eb fe 83 e2 03 48 09 c2 48 89 
RIP  [&amp;lt;ffffffffa06a2807&amp;gt;] cfs_crypto_hash_digest+0xf6/0x166 [libcfs]
 RSP &amp;lt;ffff88007c5fbda8&amp;gt;
---[ end trace 90f8b1994767d769 ]---
Kernel panic - not syncing: Fatal exception
Pid: 8489, comm: insmod Tainted: G      D    ----------------   2.6.32-220.7.1.el6.lustre.2015.x86_64.debug #1
Call Trace:
 [&amp;lt;ffffffff81518f20&amp;gt;] ? panic+0x78/0x148
 [&amp;lt;ffffffff8151e564&amp;gt;] ? oops_end+0xe4/0x100
 [&amp;lt;ffffffff8100f3bb&amp;gt;] ? die+0x5b/0x90
 [&amp;lt;ffffffff8151dc54&amp;gt;] ? do_trap+0xc4/0x160
 [&amp;lt;ffffffff8100d005&amp;gt;] ? do_invalid_op+0xa5/0xb0
 [&amp;lt;ffffffff8100cff5&amp;gt;] ? do_invalid_op+0x95/0xb0
 [&amp;lt;ffffffffa06a2807&amp;gt;] ? cfs_crypto_hash_digest+0xf6/0x166 [libcfs]
 [&amp;lt;ffffffff8151c661&amp;gt;] ? trace_hardirqs_off_thunk+0x3a/0x3c
 [&amp;lt;ffffffff8100bf9b&amp;gt;] ? invalid_op+0x1b/0x20
 [&amp;lt;ffffffffa06a2807&amp;gt;] ? cfs_crypto_hash_digest+0xf6/0x166 [libcfs]
 [&amp;lt;ffffffffa06a27d7&amp;gt;] ? cfs_crypto_hash_digest+0xc6/0x166 [libcfs]
 [&amp;lt;ffffffffa06a29c8&amp;gt;] ? cfs_crypto_register+0x151/0x35a [libcfs]
 [&amp;lt;ffffffff8151cbcb&amp;gt;] ? _spin_unlock+0x2b/0x40
 [&amp;lt;ffffffffa06b3120&amp;gt;] ? cfs_wi_sched_create+0x3bf/0x4d4 [libcfs]
 [&amp;lt;ffffffffa06a5d34&amp;gt;] ? init_libcfs_module+0x0/0x377 [libcfs]
 [&amp;lt;ffffffffa06a5d34&amp;gt;] ? init_libcfs_module+0x0/0x377 [libcfs]
 [&amp;lt;ffffffffa06a5f5f&amp;gt;] ? init_libcfs_module+0x22b/0x377 [libcfs]
 [&amp;lt;ffffffff8100204c&amp;gt;] ? do_one_initcall+0x3c/0x1d0
 [&amp;lt;ffffffff810c1333&amp;gt;] ? sys_init_module+0xe3/0x260
 [&amp;lt;ffffffff8100b0b2&amp;gt;] ? system_call_fastpath+0x16/0x1b
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment>debug kernel &amp;amp; lustre with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1201&quot; title=&quot;Lustre crypto hash cleanup&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1201&quot;&gt;&lt;strike&gt;LU-1201&lt;/strike&gt;&lt;/a&gt;</environment>
        <key id="15427">LU-1714</key>
            <summary>crash upon loading libcfs module</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="emoly.liu">Emoly Liu</assignee>
                                    <reporter username="aboyko">Alexander Boyko</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Tue, 7 Aug 2012 04:11:04 +0000</created>
                <updated>Wed, 4 Feb 2015 23:17:38 +0000</updated>
                            <resolved>Wed, 20 Feb 2013 08:56:54 +0000</resolved>
                                                    <fixVersion>Lustre 2.4.0</fixVersion>
                    <fixVersion>Lustre 2.1.5</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="42800" author="aboyko" created="Tue, 7 Aug 2012 04:22:52 +0000"  >&lt;p&gt;&lt;a href=&quot;http://review.whamcloud.com/3552&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3552&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="42801" author="adilger" created="Tue, 7 Aug 2012 04:38:56 +0000"  >&lt;p&gt;This is the same as &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2427&quot; title=&quot;Hit &amp;quot;kernel BUG&amp;quot; when running on debug kernel during recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2427&quot;&gt;&lt;del&gt;ORI-722&lt;/del&gt;&lt;/a&gt;, recently found on the Orion development branch.  Please see &lt;a href=&quot;http://review.whamcloud.com/3423&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3423&lt;/a&gt; for the current patch.&lt;/p&gt;</comment>
                            <comment id="42802" author="aboyko" created="Tue, 7 Aug 2012 05:25:55 +0000"  >&lt;p&gt;Sure, check for sg_init_table looks the same. &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2427&quot; title=&quot;Hit &amp;quot;kernel BUG&amp;quot; when running on debug kernel during recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2427&quot;&gt;&lt;del&gt;ORI-722&lt;/del&gt;&lt;/a&gt; and  &lt;a href=&quot;http://review.whamcloud.com/3423&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3423&lt;/a&gt; relate to the lnet fix. And this issue and &lt;a href=&quot;http://review.whamcloud.com/3552&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3552&lt;/a&gt; - relate to libcfs crypto hash fix. Both has the similar change at autoconf. &lt;/p&gt;</comment>
                            <comment id="42851" author="adilger" created="Tue, 7 Aug 2012 19:29:43 +0000"  >&lt;p&gt;OK, looking more closely, this has the same cause as &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2427&quot; title=&quot;Hit &amp;quot;kernel BUG&amp;quot; when running on debug kernel during recovery&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2427&quot;&gt;&lt;del&gt;ORI-722&lt;/del&gt;&lt;/a&gt;, but affects different code.&lt;/p&gt;

&lt;p&gt;Alexander and Prakash, could you please get together to make a single common patch that fixes these issues, or at least have a single autoconf check.  I prefer the approach in &lt;a href=&quot;http://review.whamcloud.com/3423&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3423&lt;/a&gt; that has a wrapper that can be used in all the code, instead of #ifdefs inline in the code as in &lt;a href=&quot;http://review.whamcloud.com/3552&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3552&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="42854" author="prakash" created="Tue, 7 Aug 2012 21:06:09 +0000"  >&lt;p&gt;Sure, I&apos;m open to merging the two or landing one and reworking the other. It&apos;s probably a good idea to scan the rest of the code for areas which need similar fixes as well.&lt;/p&gt;</comment>
                            <comment id="43400" author="aboyko" created="Fri, 17 Aug 2012 05:16:42 +0000"  >&lt;p&gt;Prakash Surya, how about merging? Or you did not do it?&lt;/p&gt;</comment>
                            <comment id="43416" author="prakash" created="Fri, 17 Aug 2012 11:56:25 +0000"  >&lt;p&gt;Alexander, sure I&apos;ll merge your fix into mine. I&apos;ll update this ticket when I push the new version and add you to the review list. I should be able to do that later today.&lt;/p&gt;</comment>
                            <comment id="43419" author="prakash" created="Fri, 17 Aug 2012 12:51:52 +0000"  >&lt;p&gt;Some other places which &lt;em&gt;may&lt;/em&gt; need similar fixes:&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;lnet/klnds/o2iblnd/o2iblnd_cb.c:730
lnet/klnds/o2iblnd/o2iblnd_cb.c:773
lustre/obdclass/capa.c:266
lustre/obdclass/capa.c:308
lustre/obdclass/capa.c:311
lustre/obdclass/capa.c:261
lustre/obdclass/capa.c:364
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Those locations all make a direct call to sg_set_page which might need to change to sg_init_one.&lt;/p&gt;</comment>
                            <comment id="43420" author="prakash" created="Fri, 17 Aug 2012 12:54:33 +0000"  >&lt;p&gt;Please see: &lt;a href=&quot;http://review.whamcloud.com/3709&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3709&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43430" author="aboyko" created="Fri, 17 Aug 2012 14:41:04 +0000"  >&lt;p&gt;I think it`s better to add something like this to libcfs headers.&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;#ifndef HAVE_SCATTERLIST_INITTABLE
#define sg_init_table(sg, nents) memset(sg, 0, sizeof(*(sg))*(nents))
#endif
#ifndef HAVE_SCATTERLIST_SETPAGE
sg_set_page(sg, p, len, off)   sg_set_buf(sg, page_address(p) + (off &amp;amp; ~CFS_PAGE_MASK), len)
#endif
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Or maybe cfs_ prefix for this functions.&lt;br/&gt;
lnet/klnds/o2iblnd/o2iblnd_cb.c already use initialized sg, and set_page is faster then set_buf, because it skip addr to page conversion.&lt;/p&gt;</comment>
                            <comment id="43441" author="prakash" created="Fri, 17 Aug 2012 16:47:20 +0000"  >&lt;p&gt;I decided to drop the &quot;cfs_&quot; prefix since there are other &quot;sg_&quot; calls in the code which do not use any &quot;cfs_&quot; wrappers. So to be consistent with those calls, I think it&apos;s best to leave them with the &quot;sg_&quot; prefix.&lt;/p&gt;</comment>
                            <comment id="44130" author="pjones" created="Tue, 4 Sep 2012 10:26:15 +0000"  >&lt;p&gt;Yujian&lt;/p&gt;

&lt;p&gt;Could you please help out with this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="46777" author="lustre-bull" created="Fri, 19 Oct 2012 12:22:34 +0000"  >&lt;p&gt;Prakash,&lt;br/&gt;
there are 5 calls to sg_set_page() in lustre/obdclass/capa.c&lt;br/&gt;
I think you should also insert a call to sg_init_table() above each of them.&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;
Index: b/lustre/obdclass/capa.c
===================================================================
--- a/lustre/obdclass/capa.c
+++ b/lustre/obdclass/capa.c
@@ -265,6 +265,7 @@ int capa_hmac(__u8 *hmac, struct lustre_
         }
         keylen = alg-&amp;gt;ha_keylen;

+        sg_init_table(&amp;amp;sl, 1);
         sg_set_page(&amp;amp;sl, virt_to_page(capa),
                     offsetof(struct lustre_capa, lc_hmac),
                     (unsigned long)(capa) % CFS_PAGE_SIZE);
@@ -306,9 +307,11 @@ int capa_encrypt_id(__u32 *d, __u32 *s,
                 GOTO(out, rc);
         }

+        sg_init_table(&amp;amp;sd, 1);
         sg_set_page(&amp;amp;sd, virt_to_page(d), 16,
                     (unsigned long)(d) % CFS_PAGE_SIZE);

+        sg_init_table(&amp;amp;ss, 1);
         sg_set_page(&amp;amp;ss, virt_to_page(s), 16,
                     (unsigned long)(s) % CFS_PAGE_SIZE);
         desc.tfm   = tfm;
@@ -358,9 +361,11 @@ int capa_decrypt_id(__u32 *d, __u32 *s,
                 GOTO(out, rc);
         }

+        sg_init_table(&amp;amp;sd, 1);
         sg_set_page(&amp;amp;sd, virt_to_page(d), 16,
                     (unsigned long)(d) % CFS_PAGE_SIZE);
+        sg_init_table(&amp;amp;ss, 1);
         sg_set_page(&amp;amp;ss, virt_to_page(s), 16,
                     (unsigned long)(s) % CFS_PAGE_SIZE);

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You have also added the following new definition for sg_set_page() in libcfs/include/libcfs/linux/libcfs.h&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;
#ifndef HAVE_SCATTERLIST_SETPAGE
#define sg_set_page(sg, p, len, off) \
       sg_set_buf(sg, page_address(p) + ((off) &amp;amp; ~CFS_PAGE_MASK), len)
#endif

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This file also includes libcfs/include/libcfs/linux/kp30.h in which there was already an older definition for sg_set_page()&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;
#ifndef HAVE_SCATTERLIST_SETPAGE
static inline void sg_set_page(struct scatterlist *sg, struct page *page,
                               unsigned int len, unsigned int offset)
{
        sg-&amp;gt;page = page;
        sg-&amp;gt;offset = offset;
        sg-&amp;gt;length = len;
}
#endif

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think this older definition should be removed.&lt;/p&gt;
</comment>
                            <comment id="48215" author="nrutman" created="Wed, 21 Nov 2012 17:15:37 +0000"  >&lt;p&gt;Xyratex-bug-id: &lt;a href=&quot;http://jira-nss.xy01.xyratex.com:8080/browse/MRP-611&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MRP-611&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="52589" author="emoly.liu" created="Mon, 18 Feb 2013 00:21:16 +0000"  >&lt;p&gt;b2_1 port is at &lt;a href=&quot;http://review.whamcloud.com/5452&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5452&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="52740" author="pjones" created="Wed, 20 Feb 2013 08:56:54 +0000"  >&lt;p&gt;The existing patches have landed for 2.1.5 and 2.4. Please open a new ticket to track any further changes needed in this area of code.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="15246">LU-2427</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="27878">LU-6020</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|hzvqan:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8136</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>