1. 10 1月, 2012 8 次提交
  2. 21 9月, 2011 1 次提交
  3. 11 9月, 2011 8 次提交
  4. 25 5月, 2011 2 次提交
  5. 17 1月, 2011 1 次提交
    • A
      mtd: mtdpart: disallow reading OOB past the end of the partition · 154bf89f
      Artem Bityutskiy 提交于
      This patch fixes the mtdpart bug which allows users reading OOB past the
      end of the partition. This happens because 'part_read_oob()' allows reading
      multiple OOB areas in one go, and mtdparts does not validate the OOB
      length in the request.
      
      Although there is such check in 'nand_do_read_oob()' in nand_base.c, but
      it checks that we do not read past the flash chip, not the partition,
      because in nand_base.c we work with the whole chip (e.g., mtd->size
      in nand_base.c is the size of the whole chip). So this check cannot
      be done correctly in nand_base.c and should be instead done in mtdparts.c.
      
      This problem was reported by Jason Liu <r64343@freescale.com> and reproduced
      with nandsim:
      
      $ modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 \
                         fourth_id_byte=0x15 parts=0x400,0x400
      $ modprobe nandsim mtd_oobtest.ko dev=0
      $ dmesg
      = snip =
      mtd_oobtest: attempting to read past end of device
      mtd_oobtest: an error is expected...
      mtd_oobtest: error: read past end of device
      = snip =
      mtd_oobtest: finished with 2 errors
      Reported-by: NJason Liu <liu.h.jason@gmail.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      154bf89f
  6. 06 1月, 2011 1 次提交
  7. 04 12月, 2010 1 次提交
  8. 25 10月, 2010 1 次提交
  9. 09 8月, 2010 2 次提交
  10. 02 8月, 2010 1 次提交
  11. 20 9月, 2009 1 次提交
  12. 16 9月, 2009 1 次提交
  13. 26 5月, 2009 2 次提交
  14. 06 4月, 2009 1 次提交
  15. 04 4月, 2009 1 次提交
    • D
      [MTD] driver model updates · 1f24b5a8
      David Brownell 提交于
      Update driver model support in the MTD framework, so it fits
      better into the current udev-based hotplug framework:
      
       - Each mtd_info now has a device node.  MTD drivers should set
         the dev.parent field to point to the physical device, before
         setting up partitions or otherwise declaring MTDs.
      
       - Those device nodes always map to /sys/class/mtdX device nodes,
         which no longer depend on MTD_CHARDEV.
      
       - Those mtdX sysfs nodes have a "starter set" of attributes;
         it's not yet sufficient to replace /proc/mtd.
      
       - Enabling MTD_CHARDEV provides /sys/class/mtdXro/ nodes and the
         /sys/class/mtd*/dev attributes (for udev, mdev, etc).
      
       - Include a MODULE_ALIAS_CHARDEV_MAJOR macro.  It'll work with
         udev creating the /dev/mtd* nodes, not just a static rootfs.
      
      So the sysfs structure is pretty much what you'd expect, except
      that readonly chardev nodes are a bit quirky.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      1f24b5a8
  16. 24 3月, 2009 1 次提交
  17. 10 12月, 2008 1 次提交
    • A
      [MTD] update internal API to support 64-bit device size · 69423d99
      Adrian Hunter 提交于
      MTD internal API presently uses 32-bit values to represent
      device size.  This patch updates them to 64-bits but leaves
      the external API unchanged.  Extending the external API
      is a separate issue for several reasons.  First, no one
      needs it at the moment.  Secondly, whether the implementation
      is done with IOCTLs, sysfs or both is still debated.  Thirdly
      external API changes require the internal API to be accepted
      first.
      
      Note that although the MTD API will be able to support 64-bit
      device sizes, existing drivers do not and are not required
      to do so, although NAND base has been updated.
      
      In general, changing from 32-bit to 64-bit values cause little
      or no changes to the majority of the code with the following
      exceptions:
          	- printk message formats
          	- division and modulus of 64-bit values
          	- NAND base support
      	- 32-bit local variables used by mtdpart and mtdconcat
      	- naughtily assuming one structure maps to another
      	in MEMERASE ioctl
      Signed-off-by: NAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      69423d99
  18. 16 10月, 2008 1 次提交
  19. 12 8月, 2008 1 次提交
  20. 25 7月, 2008 4 次提交