exynos-linux-stable/security/keys
Michal Hocko 0222bac3b4
treewide: use kv[mz]alloc* rather than opencoded variants
There are many code paths opencoding kvmalloc.  Let's use the helper
instead.  The main difference to kvmalloc is that those users are
usually not considering all the aspects of the memory allocator.  E.g.
allocation requests <= 32kB (with 4kB pages) are basically never failing
and invoke OOM killer to satisfy the allocation.  This sounds too
disruptive for something that has a reasonable fallback - the vmalloc.
On the other hand those requests might fallback to vmalloc even when the
memory allocator would succeed after several more reclaim/compaction
attempts previously.  There is no guarantee something like that happens
though.

This patch converts many of those places to kv[mz]alloc* helpers because
they are more conservative.

Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> # Xen bits
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Andreas Dilger <andreas.dilger@intel.com> # Lustre
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> # KVM/s390
Acked-by: Dan Williams <dan.j.williams@intel.com> # nvdim
Acked-by: David Sterba <dsterba@suse.com> # btrfs
Acked-by: Ilya Dryomov <idryomov@gmail.com> # Ceph
Acked-by: Tariq Toukan <tariqt@mellanox.com> # mlx4
Acked-by: Leon Romanovsky <leonro@mellanox.com> # mlx5
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Santosh Raspatur <santosh@chelsio.com>
Cc: Hariprasad S <hariprasad@chelsio.com>
Cc: Yishai Hadas <yishaih@mellanox.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-02-21 00:20:54 +03:00
..
encrypted-keys import G96xFXXU9ETF5 2023-02-21 00:10:23 +03:00
big_key.c KEYS: Fix race between updating and finding a negative key 2017-10-27 10:38:11 +02:00
compat.c KEYS: Add placeholder for KDF usage with DH 2016-06-03 16:14:34 +10:00
dh.c f2fs: catch up to v4.14-rc1 2017-10-13 11:27:08 +00:00
gc.c KEYS: Fix race between updating and finding a negative key 2017-10-27 10:38:11 +02:00
internal.h KEYS: prevent creating a different user's keyrings 2017-10-05 09:44:00 +02:00
Kconfig security/keys: BIG_KEY requires CONFIG_CRYPTO 2018-02-25 11:05:53 +01:00
key.c keys: Timestamp new keys 2020-01-29 10:24:16 +01:00
keyctl.c treewide: use kv[mz]alloc* rather than opencoded variants 2023-02-21 00:20:54 +03:00
keyring.c KEYS: always initialize keyring_index_key::desc_len 2019-02-27 10:07:00 +01:00
Makefile import G96xFXXU9ETF5 2023-02-21 00:10:23 +03:00
permission.c KEYS: Move the flags representing required permission to linux/key.h 2014-03-14 17:44:49 +00:00
persistent.c KEYS: Strip trailing spaces 2016-06-14 10:29:44 +01:00
proc.c KEYS: restrict /proc/keys by credentials at open time 2019-03-19 13:14:08 +01:00
process_keys.c import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00
request_key.c KEYS: always initialize keyring_index_key::desc_len 2019-02-27 10:07:00 +01:00
request_key_auth.c keys: Fix missing null pointer check in request_key_auth_describe() 2019-09-21 07:14:21 +02:00
sysctl.c security: Convert use of typedef ctl_table to struct ctl_table 2014-04-15 13:39:58 +10:00
trusted.c import G96xFXXU9ETF5 2023-02-21 00:10:23 +03:00
trusted.h keys, trusted: move struct trusted_key_options to trusted-type.h 2015-10-19 01:01:21 +02:00
user_defined.c import G965FXXU7DTAA OSRC 2020-02-04 13:50:09 +02:00