From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>, julien.grall@arm.com
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <JBeulich@suse.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH for-4.9 v2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations
Date: Thu, 22 Jun 2017 13:05:18 -0400 [thread overview]
Message-ID: <20170622170518.GA13933@char.us.oracle.com> (raw)
In-Reply-To: <20170622163357.GA13729@char.us.oracle.com>
On Thu, Jun 22, 2017 at 12:33:57PM -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Jun 22, 2017 at 12:10:46PM -0400, Konrad Rzeszutek Wilk wrote:
> > On Thu, Jun 22, 2017 at 11:27:50AM -0400, Konrad Rzeszutek Wilk wrote:
> > > On Wed, Jun 21, 2017 at 09:26:15PM -0400, Konrad Rzeszutek Wilk wrote:
> > > > On Wed, Jun 21, 2017 at 07:13:36PM +0100, Andrew Cooper wrote:
> > > > > A symndx of STN_UNDEF is special, and means a symbol value of 0. While
> > > > > legitimate in the ELF standard, its existance in a livepatch is questionable
> > > > > at best. Until a plausible usecase presents itself, reject such a relocation
> > > > > with -EOPNOTSUPP.
> > > > >
> > > > > Additionally, perform a safety check on elf->sym[symndx].sym before
> > > > > derefencing it, to avoid tripping over a NULL pointer when calculating val.
> > > > >
> > > > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> > > >
> > > > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > > Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [x86 right now, will do
> > > > arm32 tomorrow]
> > >
> > > I did that on my Cubietruck and I made the rookie mistake of not trying
> > > a hypervisor _without_ your changes, so I don't know if this crash
> > > (see inline) is due to your patch or something else.
> > >
> > > Also I messed up and made the livepatch test run every time it boots, so
> > > now it is stuck in a loop of crashes :-(
> > >
> > > The git tree is:
> > >
> > > git://xenbits.xen.org/people/konradwilk/xen.git staging-4.9
> > >
> > > Stay tuned.
> >
> > And I see the same thing with b38b147 (that is the top of 'origin/staging').
> >
> > So time to dig in.
>
> /me blushes.
>
> I compiled the hypervisor and the livepatches on a cross compiler.
> arm-linux-gnueabi-gcc (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
>
>
> But if I compile both on the Cubietruck (natively) it all works nicely.
> gcc (Ubuntu/Linaro 4.8.2-19ubuntu1) 4.8.2
>
> So:
>
> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [x86, arm32]
>
> for both of the patches. Sorry for the alarm.
Jan,
Do you recall perchance this thread: http://www.mail-archive.com/xen-devel@lists.xen.org/msg80633.html
I am thinking to ressurect it but to follow the same spirit as here,
that is return -ENOTSUPPO if the sh_addralign is not the correct
value.
>
> Julien, would you be OK with these two going in 4.9? Please?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-06-22 17:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 20:51 [PATCH 1/2] xen/livepatch: Clean up arch relocation handling Andrew Cooper
2017-06-13 20:51 ` [PATCH 2/2] xen/livepatch: Don't crash on encountering STN_UNDEF relocations Andrew Cooper
2017-06-13 21:13 ` Andrew Cooper
2017-06-14 10:03 ` Jan Beulich
2017-06-14 10:11 ` Jan Beulich
2017-06-14 10:13 ` Andrew Cooper
2017-06-14 10:24 ` Jan Beulich
2017-06-14 14:18 ` Konrad Rzeszutek Wilk
2017-06-14 18:33 ` Andrew Cooper
2017-06-14 18:49 ` Jan Beulich
2017-06-19 18:30 ` Konrad Rzeszutek Wilk
2017-06-19 23:05 ` Andrew Cooper
2017-06-20 7:15 ` Jan Beulich
2017-06-20 13:30 ` Konrad Rzeszutek Wilk
2017-06-14 19:08 ` Konrad Rzeszutek Wilk
2017-06-21 18:13 ` [PATCH for-4.9 v2] " Andrew Cooper
2017-06-22 1:26 ` Konrad Rzeszutek Wilk
2017-06-22 15:27 ` Konrad Rzeszutek Wilk
2017-06-22 16:10 ` Konrad Rzeszutek Wilk
2017-06-22 16:33 ` Konrad Rzeszutek Wilk
2017-06-22 17:05 ` Konrad Rzeszutek Wilk [this message]
2017-06-23 9:44 ` Jan Beulich
2017-06-22 7:40 ` Jan Beulich
2017-06-22 9:49 ` Ross Lagerwall
2017-06-14 9:25 ` [PATCH 1/2] xen/livepatch: Clean up arch relocation handling Jan Beulich
2017-06-14 13:44 ` Konrad Rzeszutek Wilk
2017-06-14 14:02 ` Jan Beulich
2017-06-14 18:28 ` Andrew Cooper
2017-06-19 18:18 ` Konrad Rzeszutek Wilk
2017-06-20 7:36 ` Jan Beulich
2017-06-20 7:39 ` Andrew Cooper
2017-06-20 7:41 ` Andrew Cooper
2017-06-20 7:56 ` Jan Beulich
2017-06-20 13:36 ` Konrad Rzeszutek Wilk
2017-06-22 1:27 ` Is [PATCH for-4.9] Was:Re: " Konrad Rzeszutek Wilk
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=20170622170518.GA13933@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien.grall@arm.com \
--cc=ross.lagerwall@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.