Whamcloud - gitweb
LU-3289 ssk: fix SK_IV_REV_START on 32-bit systems 89/23089/3
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 11 Oct 2016 17:43:07 +0000 (11:43 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 13 Oct 2016 23:37:02 +0000 (23:37 +0000)
Use a 64-bit constant for SK_IV_REV_START so that it doesn't
overflow on 32-bit systems.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ie790f7ea438847b18e7b83689e3816ceffe2ddd7
Reviewed-on: http://review.whamcloud.com/23089
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/gss/gss_sk_mech.c

index f88e576..9bae7b8 100644 (file)
@@ -59,7 +59,7 @@
  * use the the negative range of a 64-bit number and regular contexts use the
  * postive range.  If the same IV/nonce combination were reused it would leak
  * information about the plaintext. */
-#define SK_IV_REV_START (1UL << 63)
+#define SK_IV_REV_START (1ULL << 63)
 
 struct sk_ctx {
        __u16                   sc_hmac;