1. 08 10月, 2012 1 次提交
  2. 26 5月, 2012 1 次提交
  3. 18 4月, 2012 1 次提交
    • J
      mpi: Avoid using freed pointer in mpi_lshift_limbs() · 09c79b60
      Jesper Juhl 提交于
      At the start of the function we assign 'a->d' to 'ap'. Then we use the
      RESIZE_IF_NEEDED macro on 'a' - this may free 'a->d' and replace it
      with newly allocaetd storage. In that case, we'll be operating on
      freed memory further down in the function when we index into 'ap[]'.
      Since we don't actually need 'ap' until after the use of the
      RESIZE_IF_NEEDED macro we can just delay the assignment to it until
      after we've potentially resized, thus avoiding the issue.
      
      While I was there anyway I also changed the integer variable 'n' to be
      const. It might as well be since we only assign to it once and use it
      as a constant, and then the compiler will tell us if we ever assign to
      it in the future.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      Signed-off-by: NJames Morris <james.l.morris@oracle.com>
      09c79b60
  4. 02 2月, 2012 1 次提交
  5. 09 11月, 2011 1 次提交
    • D
      crypto: GnuPG based MPI lib - source files (part 1) · cdec9cb5
      Dmitry Kasatkin 提交于
      Adds the multi-precision-integer maths library which was originally taken
      from GnuPG and ported to the kernel by (among others) David Howells.
      This version is taken from Fedora kernel 2.6.32-71.14.1.el6.
      The difference is that checkpatch reported errors and warnings have been fixed.
      
      This library is used to implemenet RSA digital signature verification
      used in IMA/EVM integrity protection subsystem.
      
      Due to patch size limitation, the patch is divided into 4 parts.
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      cdec9cb5