All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later
@ 2019-12-03  7:57 Pawel Wieczorkiewicz
  2019-12-03  9:42 ` Sergey Dyasli
  2019-12-04 14:48 ` Ross Lagerwall
  0 siblings, 2 replies; 3+ messages in thread
From: Pawel Wieczorkiewicz @ 2019-12-03  7:57 UTC (permalink / raw)
  To: xen-devel
  Cc: mpohlack, Pawel Wieczorkiewicz, Ross Lagerwall, Sergey Dyasli,
	Konrad Rzeszutek Wilk

... when all symbols have their status and include flags processed.

Processing special sections may include additional symbols. String
sections (.rodata*) are included iff they are referenced by at least
one symbol. Thus, in order to decide if string section should be
included or not, all symbols must be evaluated first.

Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reported-by: Sergey Dyasli <sergey.dyasli@citrix.com>
---
 create-diff-object.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/create-diff-object.c b/create-diff-object.c
index 1ce5c09..a516670 100644
--- a/create-diff-object.c
+++ b/create-diff-object.c
@@ -2372,8 +2372,6 @@ int main(int argc, char *argv[])
 	log_debug("Include hook elements\n");
 	num_changed += kpatch_include_hook_elements(kelf_patched);
 	log_debug("num_changed = %d\n", num_changed);
-	log_debug("Include standard string elements\n");
-	kpatch_include_standard_string_elements(kelf_patched);
 	log_debug("Include new globals\n");
 	new_globals_exist = kpatch_include_new_globals(kelf_patched);
 	log_debug("new_globals_exist = %d\n", new_globals_exist);
@@ -2390,6 +2388,8 @@ int main(int argc, char *argv[])
 
 	log_debug("Process special sections\n");
 	kpatch_process_special_sections(kelf_patched);
+	log_debug("Include standard string elements\n");
+	kpatch_include_standard_string_elements(kelf_patched);
 	log_debug("Strip undefined elements of known size\n");
 	livepatch_strip_undefined_elements(kelf_patched);
 	log_debug("Verify patchability\n");
-- 
2.16.5




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879




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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later
  2019-12-03  7:57 [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later Pawel Wieczorkiewicz
@ 2019-12-03  9:42 ` Sergey Dyasli
  2019-12-04 14:48 ` Ross Lagerwall
  1 sibling, 0 replies; 3+ messages in thread
From: Sergey Dyasli @ 2019-12-03  9:42 UTC (permalink / raw)
  To: Pawel Wieczorkiewicz, xen-devel
  Cc: mpohlack, Ross Lagerwall,
	sergey.dyasli@citrix.com >> Sergey Dyasli,
	Konrad Rzeszutek Wilk

On 03/12/2019 07:57, Pawel Wieczorkiewicz wrote:
> ... when all symbols have their status and include flags processed.
> 
> Processing special sections may include additional symbols. String
> sections (.rodata*) are included iff they are referenced by at least
> one symbol. Thus, in order to decide if string section should be
> included or not, all symbols must be evaluated first.
> 
> Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
> Reported-by: Sergey Dyasli <sergey.dyasli@citrix.com>

Tested-by: Sergey Dyasli <sergey.dyasli@citrix.com>

This fixes creation/loading of my test LP.

--
Thanks,
Sergey

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later
  2019-12-03  7:57 [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later Pawel Wieczorkiewicz
  2019-12-03  9:42 ` Sergey Dyasli
@ 2019-12-04 14:48 ` Ross Lagerwall
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Lagerwall @ 2019-12-04 14:48 UTC (permalink / raw)
  To: Pawel Wieczorkiewicz, xen-devel
  Cc: mpohlack, Sergey Dyasli, Konrad Rzeszutek Wilk

On 12/3/19 7:57 AM, Pawel Wieczorkiewicz wrote:
> ... when all symbols have their status and include flags processed.
> 
> Processing special sections may include additional symbols. String
> sections (.rodata*) are included iff they are referenced by at least
> one symbol. Thus, in order to decide if string section should be
> included or not, all symbols must be evaluated first.
> 
> Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
> Reported-by: Sergey Dyasli <sergey.dyasli@citrix.com>

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>

... and pushed. Thanks!

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-04 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03  7:57 [Xen-devel] [PATCH livepatch-build-tools] create-diff-object: Include string sections later Pawel Wieczorkiewicz
2019-12-03  9:42 ` Sergey Dyasli
2019-12-04 14:48 ` Ross Lagerwall

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.