This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001591] New: Bogus pseudo-randomness in garbage collect

Please do not reply to this email. Use the web interface provided at:

           Summary: Bogus pseudo-randomness in garbage collect
           Product: eCos
           Version: CVS
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: major
          Priority: low
         Component: Filesystem support
             Class: Advice Request

The jffs2_find_gc_block function in fs/jffs2/current/src/gc.c and
jffs2_mark_node_obsolete in nodemgmt.c try to do pseudo-random stuff by
computing jiffies % 128 and making probability decisions on the result. First I
think that this kind of pseudo-randomness is not really correct for embedded
systems that often have very predictable execution times. 

But what is much worse, compat/linux/current/include/linux/kernel.h defines
jiffies as
  #define jiffies 100

I am no expert at jffs2 and cannot say whether this can lead to major problems
or not, so I'd like someone with better understanding of jffs2 to look at it.

Also check other usage of jiffies - I found one more in

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]