All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Dyasli <sergey.dyasli@citrix.com>
To: "Wieczorkiewicz, Pawel" <wipawel@amazon.de>
Cc: "sergey.dyasli@citrix.com >> Sergey Dyasli"
	<sergey.dyasli@citrix.com>,
	"Paraschiv, Andra-Irina" <andraprs@amazon.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	"Pohlack, Martin" <mpohlack@amazon.de>,
	Ross Lagerwall <ross.lagerwall@citrix.com>,
	"Manthey, Norbert" <nmanthey@amazon.de>,
	Martin Mazein <amazein@amazon.de>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	"Doebel, Bjoern" <doebel@amazon.de>
Subject: Re: [Xen-devel] livepatch-build-tools regression
Date: Wed, 27 Nov 2019 15:56:00 +0000	[thread overview]
Message-ID: <26495d21-1b4b-1712-e09d-9d4abc2c7a48@citrix.com> (raw)
In-Reply-To: <B621C71F-0798-4CAC-8201-484D17A93888@amazon.com>

On 27/11/2019 15:22, Wieczorkiewicz, Pawel wrote:
> 
> 
>> On 27. Nov 2019, at 12:16, Sergey Dyasli <sergey.dyasli@citrix.com> wrote:
>>
>> On 26/11/2019 18:37, Wieczorkiewicz, Pawel wrote:
>>> It looks like gcc plays the usual dirty tricks with local variables renaming:
>>>
>>> - xen-syms
>>>  7529: ffff82d0805fed50     8 OBJECT  LOCAL  DEFAULT 4230 lastpage.22857
>>> - livepatch
>>>   289: 0000000000000000     8 OBJECT  GLOBAL DEFAULT  UND hvm.c#lastpage.22856
>>>
>>> Then, symbols resolution by name fails..
>>>
>>> Can you please try to build the livepatch module with additional option '—prelink' and give it a try ?
>>
>> My LP loading error is:
>>
>>    (XEN) livepatch: lp: Unknown symbol: .LC7
>>
>> When I pass --prelink to livepatch-build, it complains in a similar way:
>>
>>    livepatch-build-tools/prelink: ERROR: output.o: livepatch_resolve_symbols: 80: lookup_local_symbol .LC7 (p2m.c)
>>
> 
> Could you give this testing patch a try?
> 
> diff --git a/create-diff-object.c b/create-diff-object.c
> index 8d63940..10807d2 100644
> --- a/create-diff-object.c
> +++ b/create-diff-object.c
> @@ -839,8 +839,10 @@ static void kpatch_compare_symbols(struct list_head *symlist)
>         list_for_each_entry(sym, symlist, list) {
>                 if (sym->twin)
>                         kpatch_compare_correlated_symbol(sym);
> -               else
> +               else {
>                         sym->status = NEW;
> +                       sym->include = 1;
> +               }
> 
>                 log_debug("symbol %s is %s\n", sym->name, status_str(sym->status));
>         }
> 

Looks like this change fixed the issue for me!
One thing to notice is that the size of a stripped LP binary increased
from 45K to 60K.

--
Thanks,
Sergey

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-11-27 15:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18 16:42 [Xen-devel] livepatch-build-tools regression Sergey Dyasli
2019-11-18 16:47 ` Wieczorkiewicz, Pawel
2019-11-18 17:09   ` Sergey Dyasli
2019-11-18 17:28     ` Wieczorkiewicz, Pawel
2019-11-18 17:41       ` Sergey Dyasli
2019-11-19 17:21         ` Wieczorkiewicz, Pawel
2019-11-20 11:42           ` Sergey Dyasli
2019-11-26 17:51             ` Wieczorkiewicz, Pawel
2019-11-26 18:37               ` Wieczorkiewicz, Pawel
2019-11-27 11:16                 ` Sergey Dyasli
2019-11-27 15:22                   ` Wieczorkiewicz, Pawel
2019-11-27 15:56                     ` Sergey Dyasli [this message]
2019-12-02  8:26                       ` Wieczorkiewicz, Pawel

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=26495d21-1b4b-1712-e09d-9d4abc2c7a48@citrix.com \
    --to=sergey.dyasli@citrix.com \
    --cc=amazein@amazon.de \
    --cc=andraprs@amazon.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=doebel@amazon.de \
    --cc=konrad.wilk@oracle.com \
    --cc=mpohlack@amazon.de \
    --cc=nmanthey@amazon.de \
    --cc=ross.lagerwall@citrix.com \
    --cc=wipawel@amazon.de \
    --cc=xen-devel@lists.xenproject.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.