Re: [PATCH 2/6] x86/vdso: introduce do_map_vdso() and vdso_type enum

From: Dmitry Safonov
Date: Fri Jun 03 2016 - 06:37:46 EST


On 06/03/2016 12:50 PM, Cyrill Gorcunov wrote:
On Wed, Jun 01, 2016 at 04:11:33PM +0300, Dmitry Safonov wrote:
Make in-kernel API to map vDSO blobs on x86.

Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
Signed-off-by: Dmitry Safonov <dsafonov@xxxxxxxxxxxxx>

Hi! Sorry for delay in reply. Dima, here is a moment I somehow missing:
when do_map_vdso is called it is implied that old vdso is unmapped already,
or both can be present in the system?


Both can be present. There are some limitations: if first vDSO was
32-bit, syscalls through it wouldn't work, only on the last mapped.
It's because of mm->context.vdso pointer, which for 32-bit vDSO
should point on it. (and this code make it point to a new mapped vDSO)

On RFC I did patch that unmaps previous vDSO, but I have though
it's better to simplify this code and drop unmapping.