Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1395057 > unrolled thread

Re: [PATCHv8 1/2] x86/vdso: add mremap hook to vm_special_mapping

Started byIngo Molnar <mingo@kernel.org>
First post2016-05-05 14:00 +0200
Last post2016-05-05 14:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCHv8 1/2] x86/vdso: add mremap hook to vm_special_mapping Ingo Molnar <mingo@kernel.org> - 2016-05-05 14:00 +0200
    Re: [PATCHv8 1/2] x86/vdso: add mremap hook to vm_special_mapping Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-05-05 14:00 +0200

#1395057 — Re: [PATCHv8 1/2] x86/vdso: add mremap hook to vm_special_mapping

FromIngo Molnar <mingo@kernel.org>
Date2016-05-05 14:00 +0200
SubjectRe: [PATCHv8 1/2] x86/vdso: add mremap hook to vm_special_mapping
Message-ID<rvq6J-7IA-1@gated-at.bofh.it>
* Dmitry Safonov <dsafonov@virtuozzo.com> wrote:

> On 04/26/2016 12:38 AM, Andy Lutomirski wrote:
> >On Mon, Apr 25, 2016 at 4:37 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
> >>Add possibility for userspace 32-bit applications to move
> >>vdso mapping. Previously, when userspace app called
> >>mremap for vdso, in return path it would land on previous
> >>address of vdso page, resulting in segmentation violation.
> >>Now it lands fine and returns to userspace with remapped vdso.
> >>This will also fix context.vdso pointer for 64-bit, which does not
> >>affect the user of vdso after mremap by now, but this may change.
> >>
> >>As suggested by Andy, return EINVAL for mremap that splits vdso image.
> >>
> >>Renamed and moved text_mapping structure declaration inside
> >>map_vdso, as it used only there and now it complement
> >>vvar_mapping variable.
> >>
> >>There is still problem for remapping vdso in glibc applications:
> >>linker relocates addresses for syscalls on vdso page, so
> >>you need to relink with the new addresses. Or the next syscall
> >>through glibc may fail:
> >>   Program received signal SIGSEGV, Segmentation fault.
> >>   #0  0xf7fd9b80 in __kernel_vsyscall ()
> >>   #1  0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
> >Acked-by: Andy Lutomirski <luto@kernel.org>
> >
> >Ingo, can you apply this?
> 
> Hm, so I'm not sure - should I resend those two?
> Or just ping?

Please send a clean series with updated Acked-by's, etc.

Thanks!

	Ingo

[toc] | [next] | [standalone]


#1395059

FromDmitry Safonov <dsafonov@virtuozzo.com>
Date2016-05-05 14:00 +0200
Message-ID<rvq6K-7IA-13@gated-at.bofh.it>
In reply to#1395057
On 05/05/2016 02:52 PM, Ingo Molnar wrote:
>
> * Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
>
>> On 04/26/2016 12:38 AM, Andy Lutomirski wrote:
>>> On Mon, Apr 25, 2016 at 4:37 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
>>>> Add possibility for userspace 32-bit applications to move
>>>> vdso mapping. Previously, when userspace app called
>>>> mremap for vdso, in return path it would land on previous
>>>> address of vdso page, resulting in segmentation violation.
>>>> Now it lands fine and returns to userspace with remapped vdso.
>>>> This will also fix context.vdso pointer for 64-bit, which does not
>>>> affect the user of vdso after mremap by now, but this may change.
>>>>
>>>> As suggested by Andy, return EINVAL for mremap that splits vdso image.
>>>>
>>>> Renamed and moved text_mapping structure declaration inside
>>>> map_vdso, as it used only there and now it complement
>>>> vvar_mapping variable.
>>>>
>>>> There is still problem for remapping vdso in glibc applications:
>>>> linker relocates addresses for syscalls on vdso page, so
>>>> you need to relink with the new addresses. Or the next syscall
>>>> through glibc may fail:
>>>>   Program received signal SIGSEGV, Segmentation fault.
>>>>   #0  0xf7fd9b80 in __kernel_vsyscall ()
>>>>   #1  0xf7ec8238 in _exit () from /usr/lib32/libc.so.6
>>> Acked-by: Andy Lutomirski <luto@kernel.org>
>>>
>>> Ingo, can you apply this?
>>
>> Hm, so I'm not sure - should I resend those two?
>> Or just ping?
>
> Please send a clean series with updated Acked-by's, etc.


Thanks, Ingo, will do.
Sorry for html in the last email - mail agent got an
update and I overlooked html composing become turned on.

-- 
Regards,
Dmitry Safonov

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web