alistair23-linux/fs/crypto
Eric Biggers ff73c2c016 fscrypt: avoid data race on fscrypt_mode::logged_impl_name
The access to logged_impl_name is technically a data race, which tools
like KCSAN could complain about in the future.  See:
https://github.com/google/ktsan/wiki/READ_ONCE-and-WRITE_ONCE

Fix by using xchg(), which also ensures that only one thread does the
logging.

This also required switching from bool to int, to avoid a build error on
the RISC-V architecture which doesn't implement xchg on bytes.

Signed-off-by: Eric Biggers <ebiggers@google.com>
2019-11-06 12:33:15 -08:00
..
bio.c fscrypt: remove struct fscrypt_ctx 2019-10-21 13:22:08 -07:00
crypto.c fscrypt: remove struct fscrypt_ctx 2019-10-21 13:22:08 -07:00
fname.c fscrypt: v2 encryption policy support 2019-08-12 19:18:50 -07:00
fscrypt_private.h fscrypt: avoid data race on fscrypt_mode::logged_impl_name 2019-11-06 12:33:15 -08:00
hkdf.c fscrypt: add an HKDF-SHA512 implementation 2019-08-12 19:18:50 -07:00
hooks.c fscrypt: make fscrypt_msg() take inode instead of super_block 2019-08-12 19:04:44 -07:00
Kconfig fscrypt: add an HKDF-SHA512 implementation 2019-08-12 19:18:50 -07:00
keyring.c fscrypt: require that key be added when setting a v2 encryption policy 2019-08-12 19:18:50 -07:00
keysetup.c fscrypt: avoid data race on fscrypt_mode::logged_impl_name 2019-11-06 12:33:15 -08:00
keysetup_v1.c fscrypt: invoke crypto API for ESSIV handling 2019-10-21 13:22:08 -07:00
Makefile fscrypt: add an HKDF-SHA512 implementation 2019-08-12 19:18:50 -07:00
policy.c fscrypt: require that key be added when setting a v2 encryption policy 2019-08-12 19:18:50 -07:00