Re: [PATCH v10 06/17] mm: slub: introduce metadata_access_enable()/metadata_access_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/30/2015 02:12 AM, Andrew Morton wrote:
> On Thu, 29 Jan 2015 18:11:50 +0300 Andrey Ryabinin <a.ryabinin@xxxxxxxxxxx> wrote:
> 
>> Wrap access to object's metadata in external functions with
>> metadata_access_enable()/metadata_access_disable() function calls.
>>
>> This hooks separates payload accesses from metadata accesses
>> which might be useful for different checkers (e.g. KASan).
>>
>> --- a/mm/slub.c
>> +++ b/mm/slub.c
>> @@ -467,13 +467,23 @@ static int slub_debug;
>>  static char *slub_debug_slabs;
>>  static int disable_higher_order_debug;
>>  
>> +static inline void metadata_access_enable(void)
>> +{
>> +}
>> +
>> +static inline void metadata_access_disable(void)
>> +{
>> +}
> 
> Some code comments here would be useful.  What they do, why they exist,
> etc.  The next patch fills them in with
> kasan_disable_local/kasan_enable_local but that doesn't help the reader
> to understand what's going on.  The fact that
> kasan_disable_local/kasan_enable_local are also undocumented doesn't
> help.
> 

Ok, How about this?

/*
 * This hooks separate payload access from metadata access.
 * Useful for memory checkers that have to know when slub
 * accesses metadata.
 */


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]