<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: stack corruption in jffs2 using SLUB (2.6.25 kernel) on cf5475 in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191166#M8308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I checked with an engineer here and you may have found a bug. To have it handled properly, you need to submit a Service Request on it. To enter a service request to Freescale, &lt;A href="https://www.freescale.com/webapp/servicerequest.create_SR.framework" rel="nofollow" target="_blank"&gt;click here&lt;/A&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;---Tom&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Oct 2008 23:04:18 GMT</pubDate>
    <dc:creator>J2MEJediMaster</dc:creator>
    <dc:date>2008-10-10T23:04:18Z</dc:date>
    <item>
      <title>stack corruption in jffs2 using SLUB (2.6.25 kernel) on cf5475</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191164#M8306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While trying to get the new 2.6.25 ltib working we came across very strange things while mounting larger&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(&amp;gt;20MB) jffs2 partitions on NOR-Flash. Our configuration is very similar to EVB board, the main difference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is 128MB DDR and 32MB NOR-Flash. We got u-boot as well as kernel running and everything is fine when working on nfs root.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When trying to mount a jffs2 partition we've got bad page and crash deep in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jffs2/malloc.c jffs2_alloc_inode_cache() where kmem_cache_alloc() is used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;More detailed investigation shows that this is only a follow-up symptom, things get mixed-up already when calling kmalloc() in jffs2/build.c function do_mount_fs().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;What is interesting, this crash occurs only if:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- SLUB allocator is used&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Partition is larger than ~20MB (w/ 128k erase block) which results to kmalloc of more than 8k (&amp;gt;single page)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- "compile kernel with frame pointers" is off in kernel config&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tracing down the issue we found that kmalloc() in do_mount_fs() returns a totally invalid pointer. But deeper in kmalloc code everything looks ok down to mm/page_alloc.c __get_free_pages(), only the returned pointer is mixed-up somewhere on its way. Looking at the stack content at various points shows that stack pointer is not getting back where it was before kmalloc() call, it is off by -0x10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I attached a sample stack log with some comments to document this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;We are now really concerned about using the new kernel / slub allocator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone look deeper into this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2008 21:30:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191164#M8306</guid>
      <dc:creator>Plasmasam</dc:creator>
      <dc:date>2008-10-03T21:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: stack corruption in jffs2 using SLUB (2.6.25 kernel) on cf5475</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191165#M8307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Doing some further investigation shows that this might not be related to jffs2 at all but that kmalloc is here generally broken with SLUB if size &amp;gt; PAGE_SIZE ! (I have put the same call to kmalloc outside of jffs2 code)&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Oct 2008 21:59:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191165#M8307</guid>
      <dc:creator>Plasmasam</dc:creator>
      <dc:date>2008-10-03T21:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: stack corruption in jffs2 using SLUB (2.6.25 kernel) on cf5475</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191166#M8308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I checked with an engineer here and you may have found a bug. To have it handled properly, you need to submit a Service Request on it. To enter a service request to Freescale, &lt;A href="https://www.freescale.com/webapp/servicerequest.create_SR.framework" rel="nofollow" target="_blank"&gt;click here&lt;/A&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;---Tom&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Oct 2008 23:04:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/stack-corruption-in-jffs2-using-SLUB-2-6-25-kernel-on-cf5475/m-p/191166#M8308</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2008-10-10T23:04:18Z</dc:date>
    </item>
  </channel>
</rss>

