From: Stephan Mueller Date: Tue, 26 Aug 2014 08:29:45 +0000 (+0200) Subject: crypto: drbg - fix maximum value checks on 32 bit systems X-Git-Tag: fixes-for-v3.18-merge-window~17^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9347aff91ce4789619168539f08202d8d6a1177;p=pandora-kernel.git crypto: drbg - fix maximum value checks on 32 bit systems The maximum values for additional input string or generated blocks is larger than 1<<32. To ensure a sensible value on 32 bit systems, return SIZE_MAX on 32 bit systems. This value is lower than the maximum allowed values defined in SP800-90A. The standard allow lower maximum values, but not larger values. SIZE_MAX - 1 is used for drbg_max_addtl to allow drbg_healthcheck_sanity to check the enforcement of the variable without wrapping. Reported-by: Stephen Rothwell Reported-by: kbuild test robot Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu --- Reading git-diff-tree failed