Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437751
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv10 1/2] x86/vdso: add mremap hook to vm_special_mapping |
| Date | 2016-07-06 16:10 +0200 |
| Message-ID | <rRVGx-1Ml-9@gated-at.bofh.it> (permalink) |
| References | <rOZx0-6qc-39@gated-at.bofh.it> <rRVGx-1Ml-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jun 28, 2016 at 4:35 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>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv10 0/2] mremap vDSO for 32-bit Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-06-28 13:40 +0200 Re: [PATCHv10 1/2] x86/vdso: add mremap hook to vm_special_mapping Andy Lutomirski <luto@amacapital.net> - 2016-07-06 16:10 +0200 Re: [PATCHv10 2/2] selftest/x86: add mremap vdso test Ingo Molnar <mingo@kernel.org> - 2016-07-08 14:20 +0200
csiph-web