Package Details: xen 4.17.2pre-2

Git Clone URL: https://aur.archlinux.org/xen.git (read-only, click to copy)
Package Base: xen
Description: Open-source type-1 or baremetal hypervisor
Upstream URL: https://xenproject.org/
Keywords: hypervisor virtualization xen
Licenses: GPL2
Submitter: sergej
Maintainer: Refutationalist
Last Packager: Refutationalist
Votes: 184
Popularity: 0.068981
First Submitted: 2009-11-09 11:22 (UTC)
Last Updated: 2023-07-11 22:01 (UTC)

Latest Comments

1 2 3 4 5 6 .. 101 Next › Last »

lapuglisi commented on 2023-09-12 00:43 (UTC) (edited on 2023-09-12 00:45 (UTC) by lapuglisi)

@Refutationalist

We need to change the file 'add-stubdom-fuxes.patch' to contain a new line, so it looks like this:

diff -Naur orig.xen-4.16.1/stubdom/Makefile xen-4.16.1/stubdom/Makefile
--- orig.xen-4.16.1/stubdom/Makefile    2022-05-16 09:41:38.409898784 -0700
+++ xen-4.16.1/stubdom/Makefile 2022-05-16 09:43:31.891076356 -0700
@@ -241,6 +241,7 @@
    patch -d $@ -p1 < vtpm_extern.patch
    patch -d $@ -p1 < vtpm-microsecond-duration.patch
    patch -d $@ -p1 < vtpm-command-duration.patch
+   patch -d $@ -p1 < vtpm-gcc12-fixes.patch
    patch -d $@ -p1 < vtpm-tpm_bn_t-addr.patch
    mkdir $@/build
    cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
    touch $@

Add line patch -d $@ -p1 < vtpm-tpm_bn_t-addr.patch right after + patch -d $@ -p1 < vtpm-gcc12-fixes.patch to match the contents of src/xen/stubdom/Makefile (the target file for the patch).

Refutationalist commented on 2023-07-11 22:05 (UTC)

Most recent change removes OCaml, as it was supposed to be doing that anyway. Building issues are gone.

lapuglisi commented on 2023-07-03 14:04 (UTC)

For those of you facing the issue below:

xentoollog_stubs.c: In function ‘stub_xtl_ocaml_vmessage’: xentoollog_stubs.c:36:1: error: ‘caml_local_roots’ undeclared (first use in this function); did you mean ‘caml_local_roots_ptr’? 36 | caml_local_roots = caml__frame; \ | ^~~~~~~~~~~~~~~~
xentoollog_stubs.c:114:9: note: in expansion of macro ‘CAMLdone’ 114 | CAMLdone;
| ^~~~~~~~
xentoollog_stubs.c:36:1: note: each undeclared identifier is reported only once for each function it appears in 36 | caml_local_roots = caml__frame; \ | ^~~~~~~~~~~~~~~~
xentoollog_stubs.c:114:9: note: in expansion of macro ‘CAMLdone’ 114 | CAMLdone;
| ^~~~~~~~
xentoollog_stubs.c: In function ‘stub_xtl_ocaml_progress’: xentoollog_stubs.c:36:1: error: ‘caml_local_roots’ undeclared (first use in this function); did you mean ‘caml_local_roots_ptr’? 36 | caml_local_roots = caml__frame; \ | ^~~~~~~~~~~~~~~~ xentoollog_stubs.c:140:9: note: in expansion of macro ‘CAMLdone’ 140 | CAMLdone; | ^~~~~~~~

One workaround is to add the option '--disable-ocamltools' to the './configure' command line in the 'build' function inside PKGBUILD.

Finebread commented on 2023-06-19 18:00 (UTC)

I experience a same problem like manueljben posted here. During installation I get the same error. I tried older Xen version and I got the same error. I tried to change caml_local_roots to caml_local_roots_ptr, didn't work out.

manueljben commented on 2023-06-13 17:11 (UTC) (edited on 2023-06-13 17:11 (UTC) by manueljben)

new problem arised to me today... :-(

xentoollog_stubs.c: In function ‘stub_xtl_ocaml_vmessage’: xentoollog_stubs.c:36:1: error: ‘caml_local_roots’ undeclared (first use in this function); did you mean ‘caml_local_roots_ptr’? 36 | caml_local_roots = caml__frame; \ | ^~~~~~~~~~~~~~~~
xentoollog_stubs.c:114:9: note: in expansion of macro ‘CAMLdone’ 114 | CAMLdone;
| ^~~~~~~~
xentoollog_stubs.c:36:1: note: each undeclared identifier is reported only once for each function it appears in 36 | caml_local_roots = caml__frame; \ | ^~~~~~~~~~~~~~~~
xentoollog_stubs.c:114:9: note: in expansion of macro ‘CAMLdone’ 114 | CAMLdone;
| ^~~~~~~~
xentoollog_stubs.c: In function ‘stub_xtl_ocaml_progress’: xentoollog_stubs.c:36:1: error: ‘caml_local_roots’ undeclared (first use in this function); did you mean ‘caml_local_roots_ptr’? 36 | caml_local_roots = caml__frame; \ | ^~~~~~~~~~~~~~~~ xentoollog_stubs.c:140:9: note: in expansion of macro ‘CAMLdone’ 140 | CAMLdone; | ^~~~~~~~

Refutationalist commented on 2023-05-15 03:12 (UTC)

personal update: It's going to be a bit before I can really look at these changes as I've had hand surgery and typing is not recommended at the moment. Feel free to keep submitting patches here or PRs at my github and I'll update the package itself as soon as I can.

Serus commented on 2023-05-06 16:30 (UTC)

I observed the code and it seems to be a false positive in GCC. I wrote a little patch that silences the warning:

From a033f9c535e41140a3138edbb0d6a89be0e80564 Mon Sep 17 00:00:00 2001
From: Xen Arch <user@xen-arch>
Date: Sat, 6 May 2023 17:58:47 +0200
Subject: [PATCH] Silence false positive use after free warning

---
 tools/libs/guest/xg_offline_page.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/libs/guest/xg_offline_page.c b/tools/libs/guest/xg_offline_page.c
index ccd0299f0f..96f197a801 100644
--- a/tools/libs/guest/xg_offline_page.c
+++ b/tools/libs/guest/xg_offline_page.c
@@ -182,9 +182,11 @@ static int backup_ptes(xen_pfn_t table_mfn, int offset,
     if (backup->max == backup->cur)
     {
         void *orig = backup->entries;
+       // silence false positive warning
+       void *orig2 = orig;

         backup->entries = realloc(
-            orig, backup->max * 2 * sizeof(struct pte_backup_entry));
+            orig2, backup->max * 2 * sizeof(struct pte_backup_entry));

         if (backup->entries == NULL)
         {
--
2.40.1

Simply save it as a .patch file, and drop it in the same folder as the PKGBUILD. Run sha512sum on it and put the patch file in the _patches list and the sha512 sum in the _patch_sums list.

Sven commented on 2023-05-06 11:56 (UTC)

xen fails to build with gcc 13.1.1 with -Werror=use-after-free error. Can we disable -Werror? New gcc versions typically bring new warnings. I respect the decision by the xen devs to treat them as errors. It keeps the code base clean. But it's not really convenient for us users.