linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Aravinda Prasad <aravinda@linux.vnet.ibm.com>,
	Jessica Yu <jeyu@kernel.org>,
	linux-kernel@vger.kernel.org,
	Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	Torsten Duwe <duwe@lst.de>, Josh Poimboeuf <jpoimboe@redhat.com>,
	live-patching@vger.kernel.org,
	"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [v4, 1/3] kernel/modules: Add REL24 relocation support of livepatch symbols
Date: Tue, 12 Dec 2017 22:39:26 +1100 (AEDT)	[thread overview]
Message-ID: <3ywyXZ6nm7z9t2f@ozlabs.org> (raw)
In-Reply-To: <20171114092910.20399-2-kamalesh@linux.vnet.ibm.com>

On Tue, 2017-11-14 at 09:29:08 UTC, Kamalesh Babulal wrote:
> Livepatch re-uses module loader function apply_relocate_add() to write
> relocations, instead of managing them by arch-dependent
> klp_write_module_reloc() function.
> 
> apply_relocate_add() doesn't understand livepatch symbols (marked with
> SHN_LIVEPATCH symbol section index) and assumes them to be local symbols
> by default for R_PPC64_REL24 relocation type. It fails with an error,
> when trying to calculate offset with local_entry_offset():
> 
>  module_64: kpatch_meminfo: REL24 -1152921504897399800 out of range!
> 
> Whereas livepatch symbols are essentially SHN_UNDEF, should be
> called via stub used for global calls. This issue can be fixed by
> teaching apply_relocate_add() to handle both SHN_UNDEF/SHN_LIVEPATCH
> symbols via the same stub. This patch extends SHN_UNDEF code to handle
> livepatch symbols too.
> 
> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
> CC: Balbir Singh <bsingharora@gmail.com>
> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> Cc: Josh Poimboeuf <jpoimboe@redhat.com>
> Cc: Jessica Yu <jeyu@kernel.org>
> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
> Cc: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
> Cc: Torsten Duwe <duwe@lst.de>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/a443bf6e8a7674b86221f4922cae82

cheers

  reply	other threads:[~2017-12-12 11:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14  9:29 [PATCH v4 0/3] ppc64le: Add REL24 relocation support of livepatch symbols Kamalesh Babulal
2017-11-14  9:29 ` [PATCH v4 1/3] kernel/modules: " Kamalesh Babulal
2017-12-12 11:39   ` Michael Ellerman [this message]
2017-11-14  9:29 ` [PATCH v4 2/3] powerpc/modules: Don't try to restore r2 after a sibling call Kamalesh Babulal
2017-11-14 10:29   ` Naveen N. Rao
2017-11-14 15:53     ` Josh Poimboeuf
2017-11-15  5:38       ` Kamalesh Babulal
2017-11-15  9:28       ` Naveen N. Rao
2017-11-16  1:26         ` Josh Poimboeuf
2017-11-16 13:09           ` Naveen N. Rao
2017-11-16 17:45             ` [PATCH v4.2] " Josh Poimboeuf
2017-11-17  8:17               ` Kamalesh Babulal
2017-11-18  8:33                 ` Naveen N. Rao
2017-12-12 11:39               ` [v4.2] " Michael Ellerman
2017-11-14  9:29 ` [PATCH v4 3/3] powerpc/modules: Improve restore_r2() error message Kamalesh Babulal
2017-12-06  4:32   ` Michael Ellerman
2017-12-12 11:39   ` [v4,3/3] " Michael Ellerman

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=3ywyXZ6nm7z9t2f@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=aravinda@linux.vnet.ibm.com \
    --cc=duwe@lst.de \
    --cc=jeyu@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=live-patching@vger.kernel.org \
    --cc=naveen.n.rao@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).