1. 28 2月, 2016 3 次提交
    • A
      lib/mpi: use "static inline" instead of "extern inline" · 9c6bd0c2
      Arnd Bergmann 提交于
      When we use CONFIG_PROFILE_ALL_BRANCHES, every 'if()' introduces
      a static variable, but that is not allowed in 'extern inline'
      functions:
      
      mpi-inline.h:116:204: warning: '______f' is static but declared in inline function 'mpihelp_sub' which is not static
      mpi-inline.h:113:184: warning: '______f' is static but declared in inline function 'mpihelp_sub' which is not static
      mpi-inline.h:70:184: warning: '______f' is static but declared in inline function 'mpihelp_add' which is not static
      mpi-inline.h:56:204: warning: '______f' is static but declared in inline function 'mpihelp_add_1' which is not static
      
      This changes the MPI code to use 'static inline' instead, to get
      rid of hundreds of warnings.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9c6bd0c2
    • A
      lib/mpi: avoid assembler warning · c5d55248
      Arnd Bergmann 提交于
      A wrapper around the umull assembly instruction might reuse
      the input register as an output, which is undefined on
      some ARM machines, as pointed out by this assembler warning:
      
        CC      lib/mpi/generic_mpih-mul1.o
      /tmp/ccxJuxIy.s: Assembler messages:
      /tmp/ccxJuxIy.s:53: rdhi, rdlo and rm must all be different
        CC      lib/mpi/generic_mpih-mul2.o
      /tmp/ccI0scAD.s: Assembler messages:
      /tmp/ccI0scAD.s:53: rdhi, rdlo and rm must all be different
        CC      lib/mpi/generic_mpih-mul3.o
      /tmp/ccMvVQcp.s: Assembler messages:
      /tmp/ccMvVQcp.s:53: rdhi, rdlo and rm must all be different
      
      This changes the constraints to force different registers to
      be used as output.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c5d55248
    • M
      lib/mpi: Endianness fix · 3ee0cb5f
      Michal Marek 提交于
      The limbs are integers in the host endianness, so we can't simply
      iterate over the individual bytes. The current code happens to work on
      little-endian, because the order of the limbs in the MPI array is the
      same as the order of the bytes in each limb, but it breaks on
      big-endian.
      
      Fixes: 0f74fbf7 ("MPI: Fix mpi_read_buffer")
      Signed-off-by: NMichal Marek <mmarek@suse.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      3ee0cb5f
  2. 17 11月, 2015 1 次提交
  3. 20 10月, 2015 1 次提交
  4. 15 10月, 2015 1 次提交
  5. 14 10月, 2015 1 次提交
  6. 25 8月, 2015 1 次提交
  7. 16 6月, 2015 1 次提交
  8. 13 6月, 2015 1 次提交
  9. 15 1月, 2015 1 次提交
  10. 14 1月, 2015 2 次提交
  11. 26 9月, 2013 1 次提交
  12. 20 7月, 2013 1 次提交
  13. 13 6月, 2013 1 次提交
  14. 25 5月, 2013 1 次提交
    • H
      MPILIB: disable usage of floating point registers on parisc · 70ef5578
      Helge Deller 提交于
      The umul_ppmm() macro for parisc uses the xmpyu assembler statement
      which does calculation via a floating point register.
      
      But usage of floating point registers inside the Linux kernel are not
      allowed and gcc will stop compilation due to the -mdisable-fpregs
      compiler option.
      
      Fix this by disabling the umul_ppmm() and udiv_qrnnd() macros. The
      mpilib will then use the generic built-in implementations instead.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      70ef5578
  15. 01 2月, 2013 1 次提交
  16. 24 11月, 2012 1 次提交
  17. 08 10月, 2012 3 次提交
  18. 26 5月, 2012 2 次提交
  19. 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
  20. 02 2月, 2012 2 次提交
  21. 01 2月, 2012 8 次提交
  22. 19 1月, 2012 1 次提交
  23. 07 12月, 2011 1 次提交
  24. 09 11月, 2011 3 次提交
    • D
      crypto: GnuPG based MPI lib - additional sources (part 4) · 7e8dec91
      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.
      
      This code is unnecessary for RSA digital signature verification,
      but for completeness it is included here and can be compiled,
      if CONFIG_MPILIB_EXTRA is enabled.
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      7e8dec91
    • D
      crypto: GnuPG based MPI lib - make files (part 3) · d9c46b18
      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>
      d9c46b18
    • D
      crypto: GnuPG based MPI lib - header files (part 2) · 5ce3e312
      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>
      5ce3e312