mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-09 16:12:21 +00:00
usercopy: Allow strict enforcement of whitelists
This introduces CONFIG_HARDENED_USERCOPY_FALLBACK to control the behavior of hardened usercopy whitelist violations. By default, whitelist violations will continue to WARN() so that any bad or missing usercopy whitelists can be discovered without being too disruptive. If this config is disabled at build time or a system is booted with "slab_common.usercopy_fallback=0", usercopy whitelists will BUG() instead of WARN(). This is useful for admins that want to use usercopy whitelists immediately. Suggested-by: Matthew Garrett <mjg59@google.com> Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
afcc90f862
commit
2d891fbc3b
5 changed files with 28 additions and 2 deletions
|
@ -135,6 +135,8 @@ struct mem_cgroup;
|
|||
void __init kmem_cache_init(void);
|
||||
bool slab_is_available(void);
|
||||
|
||||
extern bool usercopy_fallback;
|
||||
|
||||
struct kmem_cache *kmem_cache_create(const char *name, size_t size,
|
||||
size_t align, slab_flags_t flags,
|
||||
void (*ctor)(void *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue