Commit f5f2c9a
committed
libceph: align session_key and con_secret to 16 bytes
crypto_shash_setkey() and crypto_aead_setkey() will do a (small)
GFP_ATOMIC allocation to align the key if it isn't suitably aligned.
It's not a big deal, but at the same time easy to avoid.
The actual alignment requirement is dynamic, queryable with
crypto_shash_alignmask() and crypto_aead_alignmask(), but shouldn't
be stricter than 16 bytes for our algorithms.
Fixes: cd1a677 ("libceph, ceph: implement msgr2.1 protocol (crc and secure modes)")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>1 parent ad32fe8 commit f5f2c9a
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2033 | 2033 | | |
2034 | 2034 | | |
2035 | 2035 | | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
2036 | 2042 | | |
2037 | 2043 | | |
2038 | | - | |
2039 | | - | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
2040 | 2048 | | |
2041 | 2049 | | |
2042 | 2050 | | |
| |||
0 commit comments