mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Safonov <dsafonov@virtuozzo.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Andy Lutomirski <luto@kernel.org>,
	Will Deacon <will.deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCHv2] ARM32: Support mremap() for sigpage/vDSO
Date: Mon, 19 Jun 2017 17:50:23 +0300	[thread overview]
Message-ID: <7dd80420-0f3f-42e2-80e4-e47990f3b20b@virtuozzo.com> (raw)
In-Reply-To: <CALCETrV9khCCCAu4G0nfttKV1ZfrxH6dkeSqsqwrngs-WYbpog@mail.gmail.com>

On 05/24/2017 07:44 PM, Andy Lutomirski wrote:
> On Wed, May 24, 2017 at 3:09 AM, Dmitry Safonov <dsafonov@virtuozzo.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@lists.infradead.org
>>>>>> Cc: Russell King <linux@armlinux.org.uk>
>>>>>> Cc: Will Deacon <will.deacon@arm.com>
>>>>>> Cc: Andy Lutomirski <luto@amacapital.net>
>>>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>>>> Cc: Cyrill Gorcunov <gorcunov@openvz.org>
>>>>>> Cc: Pavel Emelyanov <xemul@virtuozzo.com>
>>>>>> Cc: Christopher Covington <cov@codeaurora.org>
>>>>>> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.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@kernel.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

  reply	other threads:[~2017-06-19 14:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14 13:25 Dmitry Safonov
2017-04-25 17:18 ` Dmitry Safonov
2017-05-18 11:13   ` Dmitry Safonov
2017-05-23 20:09     ` Russell King - ARM Linux
2017-05-24 10:09       ` Dmitry Safonov
2017-05-24 16:44         ` Andy Lutomirski
2017-06-19 14:50           ` Dmitry Safonov [this message]
2017-06-19 16:10             ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dd80420-0f3f-42e2-80e4-e47990f3b20b@virtuozzo.com \
    --to=dsafonov@virtuozzo.com \
    --cc=0x7f454c46@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luto@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®