All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viktor Mitin <viktor.mitin.19@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	Viktor Mitin <viktor.mitin.19@gmail.com>
Subject: [PATCH v2] coverage: filter out libfdt.o and libelf.o
Date: Thu, 16 May 2019 16:20:16 +0300	[thread overview]
Message-ID: <20190516132016.8032-1-viktor.mitin.19@gmail.com> (raw)

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore.
The build system explicitly compiles any .init binary without gcov option.
The problem is coming from libfdt and libelf.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@
So we need to tell the top Makefile to filter out libfdt and libelf.

Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com>
Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Viktor Mitin <viktor.mitin.19@gmail.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com>

---

Changes from v1:

 - coverage: filtered out libelf as well
---
 xen/common/libelf/Makefile | 1 +
 xen/common/libfdt/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile
index 5bf8f764f1..3d9e38f27e 100644
--- a/xen/common/libelf/Makefile
+++ b/xen/common/libelf/Makefile
@@ -1,4 +1,5 @@
 obj-bin-y := libelf.o
+nocov-y += libelf.o
 
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 
diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile
index d81f54b6b8..c075bbf546 100644
--- a/xen/common/libfdt/Makefile
+++ b/xen/common/libfdt/Makefile
@@ -3,6 +3,7 @@ include Makefile.libfdt
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 
 obj-y += libfdt.o
+nocov-y += libfdt.o
 
 CFLAGS += -I$(BASEDIR)/include/xen/libfdt/
 
-- 
2.17.1


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

WARNING: multiple messages have this Message-ID (diff)
From: Viktor Mitin <viktor.mitin.19@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>,
	Viktor Mitin <viktor.mitin.19@gmail.com>
Subject: [Xen-devel] [PATCH v2] coverage: filter out libfdt.o and libelf.o
Date: Thu, 16 May 2019 16:20:16 +0300	[thread overview]
Message-ID: <20190516132016.8032-1-viktor.mitin.19@gmail.com> (raw)
Message-ID: <20190516132016.McnBMirjyXtY7_vU5W4h3kit1O0M7wL7aTmo6l2uFaI@z> (raw)

The patch resolves 'xencov' crashes in case of Aarch64.

All the .init.* sections are stripped after boot,
it means that anything in .init.data cannot be accessed anymore.
The build system explicitly compiles any .init binary without gcov option.
The problem is coming from libfdt and libelf.
The entire library is moved to .init using:
$(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@
So we need to tell the top Makefile to filter out libfdt and libelf.

Reported-by: Viktor Mitin <viktor.mitin.19@gmail.com>
Suggested-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Viktor Mitin <viktor.mitin.19@gmail.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Viktor Mitin <viktor.mitin.19@gmail.com>

---

Changes from v1:

 - coverage: filtered out libelf as well
---
 xen/common/libelf/Makefile | 1 +
 xen/common/libfdt/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/xen/common/libelf/Makefile b/xen/common/libelf/Makefile
index 5bf8f764f1..3d9e38f27e 100644
--- a/xen/common/libelf/Makefile
+++ b/xen/common/libelf/Makefile
@@ -1,4 +1,5 @@
 obj-bin-y := libelf.o
+nocov-y += libelf.o
 
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 
diff --git a/xen/common/libfdt/Makefile b/xen/common/libfdt/Makefile
index d81f54b6b8..c075bbf546 100644
--- a/xen/common/libfdt/Makefile
+++ b/xen/common/libfdt/Makefile
@@ -3,6 +3,7 @@ include Makefile.libfdt
 SECTIONS := text data $(SPECIAL_DATA_SECTIONS)
 
 obj-y += libfdt.o
+nocov-y += libfdt.o
 
 CFLAGS += -I$(BASEDIR)/include/xen/libfdt/
 
-- 
2.17.1


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

             reply	other threads:[~2019-05-16 13:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 13:20 Viktor Mitin [this message]
2019-05-16 13:20 ` [Xen-devel] [PATCH v2] coverage: filter out libfdt.o and libelf.o Viktor Mitin
2019-05-16 17:40 ` Julien Grall
2019-05-16 17:40   ` [Xen-devel] " Julien Grall
2019-05-17  6:47   ` Viktor Mitin
2019-05-17  6:47     ` [Xen-devel] " Viktor Mitin
2019-05-20 10:33     ` Julien Grall
2019-05-20 10:33       ` [Xen-devel] " Julien Grall
2019-05-20 11:09       ` Viktor Mitin
2019-05-20 11:09         ` [Xen-devel] " Viktor Mitin
2019-05-20 12:28         ` Julien Grall
2019-05-20 12:28           ` [Xen-devel] " Julien Grall

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=20190516132016.8032-1-viktor.mitin.19@gmail.com \
    --to=viktor.mitin.19@gmail.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --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.