[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7dd80420-0f3f-42e2-80e4-e47990f3b20b@virtuozzo.com>
Date: Mon, 19 Jun 2017 17:50:23 +0300
From: Dmitry Safonov <dsafonov@...tuozzo.com>
To: Russell King - ARM Linux <linux@...linux.org.uk>
Cc: Andy Lutomirski <luto@...nel.org>,
Will Deacon <will.deacon@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dmitry Safonov <0x7f454c46@...il.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCHv2] ARM32: Support mremap() for sigpage/vDSO
On 05/24/2017 07:44 PM, Andy Lutomirski wrote:
> On Wed, May 24, 2017 at 3:09 AM, Dmitry Safonov <dsafonov@...tuozzo.com> wrote:
>> + Adding back to CC x86 guys - as I've removed in ping messages.
>>
>> On 05/23/2017 11:09 PM, Russell King - ARM Linux wrote:
>>>
>>> On Thu, May 18, 2017 at 02:13:29PM +0300, Dmitry Safonov wrote:
>>>>
>>>> On 04/25/2017 08:18 PM, Dmitry Safonov wrote:
>>>>>
>>>>> On 04/14/2017 04:25 PM, Dmitry Safonov wrote:
>>>>>>
>>>>>> CRIU restores application mappings on the same place where they
>>>>>> were before Checkpoint. That means, that we need to move vDSO
>>>>>> and sigpage during restore on exactly the same place where
>>>>>> they were before C/R.
>>>>>>
>>>>>> Make mremap() code update mm->context.{sigpage,vdso} pointers
>>>>>> during VMA move. Sigpage is used for landing after handling
>>>>>> a signal - if the pointer is not updated during moving, the
>>>>>> application might crash on any signal after mremap().
>>>>>>
>>>>>> vDSO pointer on ARM32 is used only for setting auxv at this moment,
>>>>>> update it during mremap() in case of future usage.
>>>>>>
>>>>>> Without those updates, current work of CRIU on ARM32 is not reliable.
>>>>>> Historically, we error Checkpointing if we find vDSO page on ARM32
>>>>>> and suggest user to disable CONFIG_VDSO.
>>>>>> But that's not correct - it goes from x86 where signal processing
>>>>>> is ended in vDSO blob. For arm32 it's sigpage, which is not disabled
>>>>>> with `CONFIG_VDSO=n'.
>>>>>>
>>>>>> Looks like C/R was working by luck - because userspace on ARM32 at
>>>>>> this moment always sets SA_RESTORER.
>>>>>>
>>>>>> Cc: linux-arm-kernel@...ts.infradead.org
>>>>>> Cc: Russell King <linux@...linux.org.uk>
>>>>>> Cc: Will Deacon <will.deacon@....com>
>>>>>> Cc: Andy Lutomirski <luto@...capital.net>
>>>>>> Cc: Thomas Gleixner <tglx@...utronix.de>
>>>>>> Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
>>>>>> Cc: Pavel Emelyanov <xemul@...tuozzo.com>
>>>>>> Cc: Christopher Covington <cov@...eaurora.org>
>>>>>> Signed-off-by: Dmitry Safonov <dsafonov@...tuozzo.com>
>>>>>> ---
>>>>>> v2: (buildbot) Fix (unsinged long) to (void*) cast warning.
>>>>>>
>>>>>> arch/arm/kernel/process.c | 8 ++++++++
>>>>>> arch/arm/kernel/vdso.c | 18 ++++++++++++++++++
>>>>>> arch/x86/entry/vdso/vma.c | 3 ---
>>>>>> mm/mmap.c | 4 ++++
>>>>>> 4 files changed, 30 insertions(+), 3 deletions(-)
>>>>>
>>>>>
>>>>> Ping?
>>>>
>>>>
>>>> Ping?
>>>
>>>
>>> I'm mostly happy with the ARM bits, but I can't take the patch without
>>> acks from others because it touches other architectures/generic code.
>>>
>>
>> Fair enough, thanks.
>>
>> Andy, does moving of this WARN_ON() looks good to you?
>> I've done it to reuse it over arches and between vdso/sigpage mappings,
>> reducing code duplication.
>
> Acked-by: Andy Lutomirski <luto@...nel.org> # For the x86 bit
Hi Russell,
Should I resend this with ack, or send it to your patch system,
or you'll take it from mail?
Thanks,
Dmitry
Powered by blists - more mailing lists