1. 25 11月, 2011 1 次提交
  2. 05 11月, 2011 1 次提交
    • J
      netlink: validate NLA_MSECS length · c30bc947
      Johannes Berg 提交于
      L2TP for example uses NLA_MSECS like this:
      policy:
              [L2TP_ATTR_RECV_TIMEOUT]        = { .type = NLA_MSECS, },
      code:
              if (info->attrs[L2TP_ATTR_RECV_TIMEOUT])
                      cfg.reorder_timeout = nla_get_msecs(info->attrs[L2TP_ATTR_RECV_TIMEOUT]);
      
      As nla_get_msecs() is essentially nla_get_u64() plus the
      conversion to a HZ-based value, this will not properly
      reject attributes from userspace that aren't long enough
      and might overrun the message.
      
      Add NLA_MSECS to the attribute minlen array to check the
      size properly.
      
      Cc: Thomas Graf <tgraf@suug.ch>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c30bc947
  3. 03 11月, 2011 1 次提交
  4. 01 11月, 2011 13 次提交
  5. 27 10月, 2011 3 次提交
  6. 20 10月, 2011 1 次提交
  7. 19 10月, 2011 3 次提交
  8. 06 10月, 2011 1 次提交
  9. 04 10月, 2011 5 次提交
  10. 02 10月, 2011 1 次提交
    • A
      ARM: always use ARM_UNWIND for thumb2 kernels · 89bace65
      Arnd Bergmann 提交于
      Thumb2 kernels cannot be built with frame pointers, but can use the
      ARM_UNWIND feature for unwinding instead. This makes sure that all
      features that rely on unwinding includeing CONFIG_LATENCYTOP and
      FAULT_INJECTION_STACKTRACE_FILTER do not enable frame pointers
      when the unwinder is already selected, and we always build with
      the unwinder when we want a thumb2 kernel, to make sure we do not
      get the frame pointers instead.
      
      A different option would be to redefine the CONFIG_FRAME_POINTERS
      option on ARM to mean builing with either frame pointers or
      the unwinder, and then select which one to use based on the
      CPU architecture or another user option. That would still allow
      building thumb2 kernels without the unwinder but would also be
      more confusing.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      89bace65
  11. 22 9月, 2011 1 次提交
    • L
      XZ: Fix incorrect XZ_BUF_ERROR · 9c1f8594
      Lasse Collin 提交于
      xz_dec_run() could incorrectly return XZ_BUF_ERROR if all of the
      following was true:
      
       - The caller knows how many bytes of output to expect and only provides
         that much output space.
      
       - When the last output bytes are decoded, the caller-provided input
         buffer ends right before the LZMA2 end of payload marker.  So LZMA2
         won't provide more output anymore, but it won't know it yet and thus
         won't return XZ_STREAM_END yet.
      
       - A BCJ filter is in use and it hasn't left any unfiltered bytes in the
         temp buffer.  This can happen with any BCJ filter, but in practice
         it's more likely with filters other than the x86 BCJ.
      
      This fixes <https://bugzilla.redhat.com/show_bug.cgi?id=735408> where
      Squashfs thinks that a valid file system is corrupt.
      
      This also fixes a similar bug in single-call mode where the uncompressed
      size of a block using BCJ + LZMA2 was 0 bytes and caller provided no
      output space.  Many empty .xz files don't contain any blocks and thus
      don't trigger this bug.
      
      This also tweaks a closely related detail: xz_dec_bcj_run() could call
      xz_dec_lzma2_run() to decode into temp buffer when it was known to be
      useless.  This was harmless although it wasted a minuscule number of CPU
      cycles.
      Signed-off-by: NLasse Collin <lasse.collin@tukaani.org>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9c1f8594
  12. 21 9月, 2011 1 次提交
    • M
      lib: add error checking to hex2bin · b7804983
      Mimi Zohar 提交于
      hex2bin converts a hexadecimal string to its binary representation.
      The original version of hex2bin did not do any error checking.  This
      patch adds error checking and returns the result.
      
      Changelog v1:
      - removed unpack_hex_byte()
      - changed return code from boolean to int
      
      Changelog:
      - use the new unpack_hex_byte()
      - add __must_check compiler option (Andy Shevchenko's suggestion)
      - change function API to return error checking result
        (based on Tetsuo Handa's initial patch)
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Acked-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      b7804983
  13. 15 9月, 2011 2 次提交
  14. 14 9月, 2011 2 次提交
  15. 13 9月, 2011 4 次提交