Commit fb5eda0d authored by Feng Tang's avatar Feng Tang Committed by Vlastimil Babka
Browse files

mm/kasan: Don't store metadata inside kmalloc object when slub_debug_orig_size is on



For a kmalloc object, when both kasan and slub redzone sanity check
are enabled, they could both manipulate its data space like storing
kasan free meta data and setting up kmalloc redzone, and may affect
accuracy of that object's 'orig_size'.

As an accurate 'orig_size' will be needed by some function like
krealloc() soon, save kasan's free meta data in slub's metadata area
instead of inside object when 'orig_size' is enabled.

This will make it easier to maintain/understand the code. Size wise,
when these two options are both enabled, the slub meta data space is
already huge, and this just slightly increase the overall size.

Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
Acked-by: default avatarAndrey Konovalov <andreyknvl@gmail.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 70457385
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment