From: Andy Lutomirski <luto@amacapital.net>
To: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: Ingo Molnar <mingo@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, X86 ML <x86@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Dmitry Safonov <0x7f454c46@gmail.com>,
Shuah Khan <shuahkh@osg.samsung.com>,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCHv8 resend 2/2] selftest/x86: add mremap vdso test
Date: Mon, 16 May 2016 11:25:12 -0700 [thread overview]
Message-ID: <CALCETrWCPNF8njicMutsWkeHRheDjh14x+Np=pAhMojm2_6AJw@mail.gmail.com> (raw)
In-Reply-To: <512f4c9c-7edc-0d12-df96-9708df5f498d@virtuozzo.com>
On Mon, May 16, 2016 at 9:24 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
> On 05/16/2016 04:54 PM, Ingo Molnar wrote:
>>
>>
>> * Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
>>
>>> Should print on success:
>>> [root@localhost ~]# ./test_mremap_vdso_32
>>> AT_SYSINFO_EHDR is 0xf773f000
>>> [NOTE] Moving vDSO: [f773f000, f7740000] -> [a000000, a001000]
>>> [OK]
>>> Or segfault if landing was bad (before patches):
>>> [root@localhost ~]# ./test_mremap_vdso_32
>>> AT_SYSINFO_EHDR is 0xf774f000
>>> [NOTE] Moving vDSO: [f774f000, f7750000] -> [a000000, a001000]
>>> Segmentation fault (core dumped)
>>
>>
>> Can the segfault be caught and recovered from, to print a proper failure
>> message?
>
>
> Will add segfault handler, thanks.
>
It may be more complicated that that. Glibc is likely to explode if
this happens, and the headers are sufficiently screwed up that it's
awkward to bypass glibc and call rt_sigaction directly. I have a test
that does the latter, though, so it's at least possible, but I'm
unconvinced it's worth it just for an error message.
--
Andy Lutomirski
AMA Capital Management, LLC
next prev parent reply other threads:[~2016-05-16 18:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 13:29 [PATCHv8 resend 1/2] x86/vdso: add mremap hook to vm_special_mapping Dmitry Safonov
2016-05-10 13:29 ` [PATCHv8 resend 2/2] selftest/x86: add mremap vdso test Dmitry Safonov
2016-05-16 13:54 ` Ingo Molnar
2016-05-16 16:24 ` Dmitry Safonov
2016-05-16 18:25 ` Andy Lutomirski [this message]
2016-05-17 10:25 ` Dmitry Safonov
2016-05-16 9:38 ` [PATCHv8 resend 1/2] x86/vdso: add mremap hook to vm_special_mapping Dmitry Safonov
2016-05-16 10:54 ` Ingo Molnar
2016-05-16 11:14 ` Dmitry Safonov
2016-05-16 13:55 ` Ingo Molnar
2016-05-16 16:23 ` Dmitry Safonov
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='CALCETrWCPNF8njicMutsWkeHRheDjh14x+Np=pAhMojm2_6AJw@mail.gmail.com' \
--to=luto@amacapital.net \
--cc=0x7f454c46@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dsafonov@virtuozzo.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=shuahkh@osg.samsung.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).