lkml.org 
[lkml]   [2016]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv2 3/6] x86/arch_prctl/vdso: add ARCH_MAP_VDSO_*
From
Date
On 08/10/2016 11:35 AM, Andy Lutomirski wrote:
> On Tue, Aug 2, 2016 at 3:59 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
>> On 07/12/2016 05:14 PM, Oleg Nesterov wrote:
>>>
>>> On 07/11, Andy Lutomirski wrote:
>>>>
>>>> I'm starting to wonder if we should finally suck it up and give
>>>> special mappings a non-NULL vm_file so we can track them properly.
>>>> Oleg, weren't you thinking of doing that for some other reason?
>>>
>>>
>>> Yes, uprobes. Currently we can't probe vdso page(s).
>>
>>
>> So, to make sure, that I've understood correctly, I need to:
>> o add vm_file to vdso/vvar vmas, __install_special_mapping will init
>> them;
>> o place array pages[] inside f_mapping;
>> o create f_inode for each file -- for this we need some mount point, so
>> I'll create something like vdsofs, register this filesystem and mount
>> it in initcall (or like do_basic_setup - as it's done by shmem, i.e).
>>
>> Is this the idea, or I got it wrong?
>>
>> And maybe the idea is to create fake vm_file for just reference
>> counting, but do not treat/init it like file with inode, etc?
>> So with fake file I can also check if vdso is mapped already, but
>> I'm sure the fake file will not help Oleg with uprobes.
>
> This would work, but it might be complicated. I'm not an expert at mm
> internals.

Ok, thanks on answer!
I'll try to prepare patches in near days -- they will help to track
vdso and for uprobes. If this will become too complex, I'll just
iterate over vmas.

>
> Another approach would be to just iterate over all vmas and look for
> old copies of the special mapping.

Thanks,
Dmitry

\
 
 \ /
  Last update: 2016-08-10 23:01    [W:0.054 / U:3.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site