mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Miroslav Benes <mbenes@suse.cz>
Cc: Cheng Jian <cj.chengjian@huawei.com>,
	linux-kernel@vger.kernel.org, live-patching@vger.kernel.org,
	jpoimboe@redhat.com, mingo@redhat.com, huawei.libin@huawei.com,
	xiexiuqi@huawei.com, yangyingliang@huawei.com,
	bobo.shaobowang@huawei.com
Subject: Re: [PATCH] Revert "x86/module: Detect and skip invalid relocations"
Date: Sat, 22 Jun 2019 09:28:16 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1906220927460.5503@nanos.tec.linutronix.de> (raw)
In-Reply-To: <alpine.LSU.2.21.1906201028490.25778@pobox.suse.cz>

Miroslav,

On Thu, 20 Jun 2019, Miroslav Benes wrote:
> On Thu, 20 Jun 2019, Cheng Jian wrote:
> 
> > This reverts commit eda9cec4c9a12208a6f69fbe68f72a6311d50032.
> > 
> > Since commit (eda9cec4c9a1 'x86/module: Detect and skip invalid
> > relocations') add some sanity check in apply_relocate_add, borke
> > re-insmod a kernel module which has been patched before,
> > 
> > The relocation informations of the livepatch module have been
> > overwritten since first patched, so if we rmmod and insmod the
> > kernel module, these values are not zero anymore, when
> > klp_module_coming doing, and that commit marks them as invalid
> > invalid_relocation.
> > 
> > Then the following error occurs:
> > 
> > 	module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 2, loc (____ptrval____), val ffffffffc000236c
> > 	livepatch: failed to initialize patch 'livepatch_0001_test' for module 'test' (-8)
> > 	livepatch: patch 'livepatch_0001_test' failed for module 'test', refusing to load module 'test'
> 
> Oh yeah. First reported here 20180602161151.apuhs2dygsexmcg2@treble (LP ML 
> only and there is no archive on lore.kernel.org yet. Sorry about that.). I 
> posted v1 here 
> https://lore.kernel.org/lkml/20180607092949.1706-1-mbenes@suse.cz/ and 
> even started to work on v2 in March with arch-specific nullifying, but 
> then I got sidetracked again. I'll move it up my todo list a bit.

so we need to revert it for now, right?

Thanks,

	tglx

  reply	other threads:[~2019-06-22  7:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20  8:24 Cheng Jian
2019-06-20  8:33 ` Miroslav Benes
2019-06-22  7:28   ` Thomas Gleixner [this message]
2019-06-24 10:00     ` Miroslav Benes
2019-06-25  3:31       ` Josh Poimboeuf

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=alpine.DEB.2.21.1906220927460.5503@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bobo.shaobowang@huawei.com \
    --cc=cj.chengjian@huawei.com \
    --cc=huawei.libin@huawei.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mingo@redhat.com \
    --cc=xiexiuqi@huawei.com \
    --cc=yangyingliang@huawei.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®