Re: [PATCH 0/5] Slab objects identifiers

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

 



On 10/13/2011 11:12 AM, Pekka Enberg wrote:
> On Mon, Oct 10, 2011 at 1:20 PM, Pavel Emelyanov <xemul@xxxxxxxxxxxxx> wrote:
>>> If two tasks share an mm_struct then the mm_struct pointer (task->mm) will
>>> point to the same address. Objects are already uniquely identified by
>>> their address.
>>
>> Yes of course, but ...
>>
>>> If you store the physical address with the object content
>>> when transferring then you can verify that they share the mm_struct.
>>
>> ... are we all OK with showing kernel addresses to the userspace? I thought the %pK
>> format was invented specially to handle such leaks.
> 
> I don't think it's worth it to try to hide kernel addresses for
> checkpoint/restart.

We don't need to know anything about kernel internals for checkpoint-restart, that's
why I said, that abstract identifiers are just fine.

>> If we are, then (as I said in the first letter) we should just show them and forget
>> this set. If we're not - we should invent smth more straightforward and this set is
>> an attempt for doing this.
> 
> Does this ID thing need to happen in the slab layer?

Not necessarily, of course, but if we're going to show some identifier of an object
we have 2 choices - either we generate this ID independently (with e.g. IDA), but
this is slow, or we use some knowledge of an object as a bunch of bytes in memory.
These slab IDs thing is an attempt to implement the 2nd approach.


The question I'm trying to answer with this is - do task A and task B have their mm
shared or not? Showing an ID answers one. Maybe there exists another way, but I haven't
invented it yet and decided to send this set out for discussion (the "release early"
idiom). If slab maintainers say "no, we don't accept this at all ever", then of course
I'll have to think further, but if the concept is suitable, but needs some refinement - 
let's do it.

>                               Pekka
> .
> 

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]