diff options
author | Feng Tang <feng.tang@intel.com> | 2024-09-11 14:45:31 +0800 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2024-10-29 10:43:23 +0100 |
commit | fb5eda0dfe2256b468fc4e95207a4df88457274f (patch) | |
tree | baf6e79edd6c08dd02fd3f985507a5b1323397f5 /drivers/of | |
parent | 704573851b51808b45dae2d62059d1d8189138a2 (diff) |
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: Feng Tang <feng.tang@intel.com>
Acked-by: Andrey Konovalov <andreyknvl@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'drivers/of')
0 files changed, 0 insertions, 0 deletions