1. 23 May, 2012 1 commit
  2. 18 May, 2012 2 commits
  3. 17 May, 2012 1 commit
  4. 15 May, 2012 1 commit
  5. 14 May, 2012 1 commit
  6. 13 May, 2012 4 commits
  7. 12 May, 2012 1 commit
    • Mark Brown's avatar
      Merge tag 'regmap-3.4' into regmap-stride · 25061d28
      Mark Brown authored
      regmap: Last minute bug fix for 3.4
      
      This is a last minute bug fix that was only just noticed since the code
      path that's being exercised here is one that is fairly rarely used.  The
      changelog for the change itself is extremely clear and the code itself
      is obvious to inspection so should be pretty safe.
      
      Conflicts:
      	drivers/base/regmap/regmap.c (overlap between the fix and stride code)
      25061d28
  8. 09 May, 2012 1 commit
    • Laxman Dewangan's avatar
      regmap: fix possible memory corruption in regmap_bulk_read() · 6560ffd1
      Laxman Dewangan authored
      The function regmap_bulk_read() calls the regmap_read() for
      each register if set of register has volatile and cache is
      enabled. In this case, last few register read makes the memory
      corruption if the register size is not the size of unsigned int.
      The regam_read() takes argument as unsigned int for returning
      value and it update the value as
      	*val = map->format.parse_val(map->work_buf);
      This causes complete 4 bytes (size of unsigned int) to get written.
      Now if client pass the memory pointer for value which is equal to the
      required size of register count in regmap_bulk_read() then last few
      register read actually update the memory beyond passed pointer size.
      
      Avoid this by using local variable for read and then do memcpy()
      for actual byte copy to passed pointer based on register size.
      
      I allocated one pointer ptr and take first 16 bytes dump of that
      pointer then call regmap_bulk_read() with pointer which is just
      on top of this allocated pointer and register count of 128. Here
      register size is 1 byte.
      The memory trace of last 5 register read are as follows:
      
      [    5.438589] regmap_bulk_read after regamp_read() for register 122
      [    5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.467535] regmap_bulk_read after regamp_read() for register 123
      [    5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.496425] regmap_bulk_read after regamp_read() for register 124
      [    5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.525372] regmap_bulk_read after regamp_read() for register 125
      [    5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 126
      [    5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 127
      [    5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001
      
      Here it is observed that the memory content at first word started changing
      on last 3 regmap_read() and so corruption happened.
      Signed-off-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      6560ffd1
  9. 08 May, 2012 1 commit
  10. 06 May, 2012 5 commits
  11. 05 May, 2012 10 commits
  12. 04 May, 2012 12 commits