treewide: Make all debug_obj_descriptors const
This should make it harder for the kernel to corrupt the debug object descriptor, used to call functions to fixup state and track debug objects, by moving the structure to read-only memory. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20200815004027.2046113-3-swboyd@chromium.org
This commit is contained in:

committed by
Thomas Gleixner

parent
aedcade6f4
commit
f9e62f318f
@@ -81,7 +81,7 @@ static void *active_debug_hint(void *addr)
|
||||
return (void *)ref->active ?: (void *)ref->retire ?: (void *)ref;
|
||||
}
|
||||
|
||||
static struct debug_obj_descr active_debug_desc = {
|
||||
static const struct debug_obj_descr active_debug_desc = {
|
||||
.name = "i915_active",
|
||||
.debug_hint = active_debug_hint,
|
||||
};
|
||||
|
Reference in New Issue
Block a user