Skip to contentSkip to conversation

automation: Update containers to allow HTTPS access to xenbits

PATCH Superseded Anthony PERARD 3 participants 18 messages Feb 21, 2023 – Feb 24, 2023

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover automation: Update containers to allow HTTPS access to xenbits

Patch series available in this git branch:
https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.gitlab-containers-update-v2

v2:
- Remove CentOS 7.2
- Remove Debian Jessie test, but update container recipe for the benefit of older branches.
- Fix CentOS 7 containner recipe to update all packages. (Fix missing update of HTTPS root certificates)

There is work in progress [1] to update urls in our repo to use https, but those https urls to xenbits don't work in our containers, due to an expired root certificate. So we need to update those containers.

This series update the dockerfile where just rebuilding the container isn't enough.

I've tested the new containers but didn't updated them yet. You can see the result in the following links (if you can access them). There are other containers been test which didn't need dockerfile update.
(That was with v1 of the series)

    https://gitlab.com/xen-project/people/anthonyper/xen/-/pipelines/777474218
    https://gitlab.com/xen-project/people/anthonyper/xen/-/pipelines/778218868

Building randconfig on debian unstable seems to be an issue.

[1] https://lore.kernel.org/xen-devel/75d91def8234bceb41548147ee8af5fea52bd1d6.1675889602.git.demi@invisiblethingslab.com/

Cheers,

Anthony PERARD (7):
automation: Remove CentOS 7.2 containers and builds
automation: Ensure that all packages are up-to-dates in CentOS 7
container
automation: Remove clang-8 from Debian unstable container
automation: Use EOL tag for Jessie container
automation: Add more aliases in containerize
automation: Remove testing on Debian Jessie
automation: Remove expired root certificates used to be used by let's
encrypt

 automation/build/centos/7.2.dockerfile        | 52 ----------------
 automation/build/centos/7.dockerfile          |  3 +-
 automation/build/centos/CentOS-7.2.repo       | 35 -----------
 .../build/debian/jessie-i386.dockerfile       |  7 ++-
 automation/build/debian/jessie.dockerfile     |  7 ++-
 automation/build/debian/unstable-llvm-8.list  |  3 -
 automation/build/debian/unstable.dockerfile   | 12 ----
 automation/build/ubuntu/trusty.dockerfile     |  5 ++
 automation/gitlab-ci/build.yaml               | 60 -------------------
 automation/scripts/containerize               |  3 +
 10 files changed, 22 insertions(+), 165 deletions(-)
 delete mode 100644 automation/build/centos/7.2.dockerfile
 delete mode 100644 automation/build/centos/CentOS-7.2.repo
 delete mode 100644 automation/build/debian/unstable-llvm-8.list
Signature · 1 line
Anthony PERARD
#1 lore raw

PATCH v2 1/7 automation: Remove CentOS 7.2 containers and builds

We already have a container which track the latest CentOS 7, no need for this one as well.

Also, 7.2 have outdated root certificate which prevent connection to website which use Let's Encrypt.

---

Notes:
v2:
- new patch

 automation/build/centos/7.2.dockerfile  | 52 -------------------------
 automation/build/centos/CentOS-7.2.repo | 35 -----------------
 automation/gitlab-ci/build.yaml         | 10 -----
 3 files changed, 97 deletions(-)
 delete mode 100644 automation/build/centos/7.2.dockerfile
 delete mode 100644 automation/build/centos/CentOS-7.2.repo
automation/build/centos/7.2.dockerfile deleted +0 -52
deleted file mode 100644
index 4baa097e31..0000000000
@@ -1,52 +0,0 @@
-FROM centos:7.2.1511
-LABEL maintainer.name="The Xen Project" \
-      maintainer.email="[email protected]"
-
-# ensure we only get bits from the vault for
-# the version we want
-COPY CentOS-7.2.repo /etc/yum.repos.d/CentOS-Base.repo
-
-# install EPEL for dev86, xz-devel and possibly other packages
-RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
-        yum clean all
-
-RUN mkdir /build
-WORKDIR /build
-
-# work around https://github.com/moby/moby/issues/10180
-# and install Xen depends
-RUN rpm --rebuilddb && \
-    yum -y install \
-        yum-plugin-ovl \
-        gcc \
-        gcc-c++ \
-        ncurses-devel \
-        zlib-devel \
-        openssl-devel \
-        python-devel \
-        libuuid-devel \
-        pkgconfig \
-        # gettext for Xen < 4.13
-        gettext \
-        flex \
-        bison \
-        libaio-devel \
-        glib2-devel \
-        yajl-devel \
-        pixman-devel \
-        glibc-devel \
-        # glibc-devel.i686 for Xen < 4.15
-        glibc-devel.i686 \
-        make \
-        binutils \
-        git \
-        wget \
-        acpica-tools \
-        python-markdown \
-        patch \
-        checkpolicy \
-        dev86 \
-        xz-devel \
-        bzip2 \
-        nasm \
-    && yum clean all
automation/build/centos/CentOS-7.2.repo deleted +0 -35
deleted file mode 100644
index 4da27faeb5..0000000000
@@ -1,35 +0,0 @@
-# CentOS-Base.repo
-#
-# This is a replacement file that pins things to just use CentOS 7.2
-# from the CentOS Vault.
-#
-
-[base]
-name=CentOS-7.2.1511 - Base
-baseurl=http://vault.centos.org/7.2.1511/os/$basearch/
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-#released updates 
-[updates]
-name=CentOS-7.2.1511 - Updates
-baseurl=http://vault.centos.org/7.2.1511/updates/$basearch/
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-#additional packages that may be useful
-[extras]
-name=CentOS-7.2.1511 - Extras
-baseurl=http://vault.centos.org/7.2.1511/extras/$basearch/
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
-#additional packages that extend functionality of existing packages
-[centosplus]
-name=CentOS-7.2.1511 - Plus
-baseurl=http://vault.centos.org/7.2.1511/centosplus/$basearch/
-gpgcheck=1
-gpgcheck=1
-enabled=0
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-
automation/gitlab-ci/build.yaml +0 -10
index 079e9b73f6..aed8fc0240 100644
@@ -211,16 +211,6 @@ archlinux-gcc-debug:
   variables:
     CONTAINER: archlinux:current
 
-centos-7-2-gcc:
-  extends: .gcc-x86-64-build
-  variables:
-    CONTAINER: centos:7.2
-
-centos-7-2-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: centos:7.2
-
 centos-7-gcc:
   extends: .gcc-x86-64-build
   variables:
Signature · 1 line
Anthony PERARD
Acked-by on v2 1/7
#2 lore raw

Re: [XEN PATCH v2 1/7] automation: Remove CentOS 7.2 containers and builds

Quoted 7 lines · Anthony PERARD

We already have a container which track the latest CentOS 7, no need for this one as well.

Also, 7.2 have outdated root certificate which prevent connection to website which use Let's Encrypt.

For posterity, this container exists because Doug wanted something which was roughly a XenServer build environment, but we've long since moved on.

~Andrew

#3 lore raw

PATCH v2 2/7 automation: Ensure that all packages are up-to-dates in CentOS 7 container

In reply to Anthony PERARD

This was prompt by the fact that wget https://xenbits.xenproject.org
fails with expired certificates, which turned out to be an expired root certificates. Updating all packages fix the issue.

---

Notes:
v2:
- new patch, this replace a change in "Remove expired root certificates used to be used by let's encrypt"

 automation/build/centos/7.dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
automation/build/centos/7.dockerfile +2 -1
index e688a4cece..f5264e02d9 100644
@@ -15,7 +15,8 @@ RUN rpm --rebuilddb && \
     rm -rf /var/cache/yum
 
 # install Xen depends
-RUN yum -y install \
+RUN yum -y update \
+    && yum -y install \
         gcc \
         gcc-c++ \
         ncurses-devel \
Signature · 1 line
Anthony PERARD
Acked-by on v2 2/7
#4 lore raw

Re: [XEN PATCH v2 2/7] automation: Ensure that all packages are up-to-dates in CentOS 7 container

Quoted 5 lines · Anthony PERARD

This was prompt by the fact that wget https://xenbits.xenproject.org
fails with expired certificates, which turned out to be an expired root certificates. Updating all packages fix the issue.

#5 lore raw

PATCH v2 3/7 automation: Remove clang-8 from Debian unstable container

In reply to Anthony PERARD

First, apt complain that it isn't the right way to add keys anymore, but hopefully that's just a warning.

Second, we can't install clang-8:
The following packages have unmet dependencies:
clang-8 : Depends: libstdc++-8-dev but it is not installable
Depends: libgcc-8-dev but it is not installable
Depends: libobjc-8-dev but it is not installable
Recommends: llvm-8-dev but it is not going to be installed
Recommends: libomp-8-dev but it is not going to be installed
libllvm8 : Depends: libffi7 (>= 3.3~20180313) but it is not installable
E: Unable to correct problems, you have held broken packages.

clang on Debian unstable is now version 14.0.6.

---

This change will break "staging-*" branches as they would still test clang-8. So patch needs to be backported. (at least build.yaml change)

Current container have:

root@f3d1fc4f58c7:/build# clang --version
clang version 8.0.1- (branches/release_80)
root@113cb5730b2a:/build# clang-8 --version
clang version 8.0.1- (branches/release_80)

(built about 3years ago)

---
 automation/build/debian/unstable-llvm-8.list |  3 ---
 automation/build/debian/unstable.dockerfile  | 12 ------------
 automation/gitlab-ci/build.yaml              | 10 ----------
 3 files changed, 25 deletions(-)
 delete mode 100644 automation/build/debian/unstable-llvm-8.list
automation/build/debian/unstable-llvm-8.list deleted +0 -3
deleted file mode 100644
index dc119fa0b4..0000000000
@@ -1,3 +0,0 @@
-# Unstable LLVM 8 repos
-deb http://apt.llvm.org/unstable/ llvm-toolchain-8 main
-deb-src http://apt.llvm.org/unstable/ llvm-toolchain-8 main
automation/build/debian/unstable.dockerfile +0 -12
index 9de766d596..b560337b7a 100644
@@ -51,15 +51,3 @@ RUN apt-get update && \
         apt-get autoremove -y && \
         apt-get clean && \
         rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
-
-RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add -
-COPY unstable-llvm-8.list /etc/apt/sources.list.d/
-
-RUN apt-get update && \
-    apt-get --quiet --yes install \
-        clang-8 \
-        lld-8 \
-        && \
-        apt-get autoremove -y && \
-        apt-get clean && \
-        rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
automation/gitlab-ci/build.yaml +0 -10
index aed8fc0240..22ce1c45e7 100644
@@ -329,16 +329,6 @@ debian-unstable-clang-debug:
   variables:
     CONTAINER: debian:unstable
 
-debian-unstable-clang-8:
-  extends: .clang-8-x86-64-build
-  variables:
-    CONTAINER: debian:unstable
-
-debian-unstable-clang-8-debug:
-  extends: .clang-8-x86-64-build-debug
-  variables:
-    CONTAINER: debian:unstable
-
 debian-unstable-gcc:
   extends: .gcc-x86-64-build
   variables:
Signature · 1 line
Anthony PERARD
#6 lore raw

Re: [XEN PATCH v2 3/7] automation: Remove clang-8 from Debian unstable container

Quoted 13 lines · Anthony PERARD

First, apt complain that it isn't the right way to add keys anymore, but hopefully that's just a warning.

Second, we can't install clang-8:
The following packages have unmet dependencies:
clang-8 : Depends: libstdc++-8-dev but it is not installable
Depends: libgcc-8-dev but it is not installable
Depends: libobjc-8-dev but it is not installable
Recommends: llvm-8-dev but it is not going to be installed
Recommends: libomp-8-dev but it is not going to be installed
libllvm8 : Depends: libffi7 (>= 3.3~20180313) but it is not installable
E: Unable to correct problems, you have held broken packages.

Quoted 8 lines

clang on Debian unstable is now version 14.0.6.

---

This change will break "staging-*" branches as they would still test clang-8. So patch needs to be backported. (at least build.yaml change)

Well - it means we should backport this to all trees before rebuilding the container.  Which is fine, but we need to be aware of this going in.

CC'ing Jan just so he's aware.

~Andrew

#7 lore raw

PATCH v2 4/7 automation: Use EOL tag for Jessie container

In reply to Anthony PERARD

As Jessie is EOL, the official tag isn't supported anymore. Also, the GPG key for the packages on the repository on the official image are expired and it isn't possible to update or install packages.

But we can use the image from "debian/eol" tag which use repositories from archive.debian.org and have workaround to ignore the validity date of the keys.

There isn't a dedicated i386 tag for jessie, but we can ask docker to pull the i386 image of the "debial/eol:jessie" tag.

---

Notes:
v2:
- new patch, this replace "automation: Ignore package authentification issue in Jessie container"

workaround I've seen in the debian/eol:jessie:
'Acquire::Check-Valid-Until "false";' in /etc/apt/apt.conf.d/
And a script to replace the "gpgv" binary used by apt, which check that the only issue with a signature is that the key has expired.

 automation/build/debian/jessie-i386.dockerfile | 2 +-
 automation/build/debian/jessie.dockerfile      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
automation/build/debian/jessie-i386.dockerfile +1 -1
index 3f86d91f63..276b640ec9 100644
@@ -1,4 +1,4 @@
-FROM i386/debian:jessie
+FROM --platform=linux/i386 debian/eol:jessie
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
automation/build/debian/jessie.dockerfile +1 -1
index 2f19adcad3..06128d1a40 100644
@@ -1,4 +1,4 @@
-FROM debian:jessie
+FROM debian/eol:jessie
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="[email protected]"
 
Signature · 1 line
Anthony PERARD
#8 lore raw

PATCH v2 5/7 automation: Add more aliases in containerize

In reply to Anthony PERARD
---
 automation/scripts/containerize | 3 +++
 1 file changed, 3 insertions(+)
automation/scripts/containerize +3 -0
index 9e508918bf..9b1a302d05 100755
@@ -33,9 +33,12 @@ case "_${CONTAINER}" in
     _fedora) CONTAINER="${BASE}/fedora:29";;
     _focal) CONTAINER="${BASE}/ubuntu:focal" ;;
     _jessie) CONTAINER="${BASE}/debian:jessie" ;;
+    _jessie-i386) CONTAINER="${BASE}/debian:jessie-i386" ;;
     _stretch|_) CONTAINER="${BASE}/debian:stretch" ;;
+    _stretch-i386) CONTAINER="${BASE}/debian:stretch-i386" ;;
     _buster-gcc-ibt) CONTAINER="${BASE}/debian:buster-gcc-ibt" ;;
     _unstable|_) CONTAINER="${BASE}/debian:unstable" ;;
+    _unstable-i386) CONTAINER="${BASE}/debian:unstable-i386" ;;
     _unstable-arm32-gcc) CONTAINER="${BASE}/debian:unstable-arm32-gcc" ;;
     _unstable-arm64v8) CONTAINER="${BASE}/debian:unstable-arm64v8" ;;
     _trusty) CONTAINER="${BASE}/ubuntu:trusty" ;;
Signature · 1 line
Anthony PERARD
#9 lore raw

PATCH v2 6/7 automation: Remove testing on Debian Jessie

In reply to Anthony PERARD

Jessie as rearch EOL in 2020.

Even if we update the containers, we would still not be able to reach HTTPS webside with Let's Encrypt certificates and thus would need more change to the container.

---

Notes:
HTTPS would fail unless we commit "automation: Remove expired root certificates used to be used by let's encrypt", that is. Patch still in the series, and fix Jessie.

 automation/gitlab-ci/build.yaml | 40 ---------------------------------
 1 file changed, 40 deletions(-)
automation/gitlab-ci/build.yaml +0 -40
index 22ce1c45e7..2be1b05d5c 100644
@@ -221,46 +221,6 @@ centos-7-gcc-debug:
   variables:
     CONTAINER: centos:7
 
-debian-jessie-clang:
-  extends: .clang-x86-64-build
-  variables:
-    CONTAINER: debian:jessie
-
-debian-jessie-clang-debug:
-  extends: .clang-x86-64-build-debug
-  variables:
-    CONTAINER: debian:jessie
-
-debian-jessie-gcc:
-  extends: .gcc-x86-64-build
-  variables:
-    CONTAINER: debian:jessie
-
-debian-jessie-gcc-debug:
-  extends: .gcc-x86-64-build-debug
-  variables:
-    CONTAINER: debian:jessie
-
-debian-jessie-32-clang:
-  extends: .clang-x86-32-build
-  variables:
-    CONTAINER: debian:jessie-i386
-
-debian-jessie-32-clang-debug:
-  extends: .clang-x86-32-build-debug
-  variables:
-    CONTAINER: debian:jessie-i386
-
-debian-jessie-32-gcc:
-  extends: .gcc-x86-32-build
-  variables:
-    CONTAINER: debian:jessie-i386
-
-debian-jessie-32-gcc-debug:
-  extends: .gcc-x86-32-build-debug
-  variables:
-    CONTAINER: debian:jessie-i386
-
 debian-stretch-clang:
   extends: .clang-x86-64-build
   variables:
Signature · 1 line
Anthony PERARD
#10 lore raw

Re: [XEN PATCH v2 6/7] automation: Remove testing on Debian Jessie

Quoted 7 lines · Anthony PERARD

Jessie as rearch EOL in 2020.

Even if we update the containers, we would still not be able to reach HTTPS webside with Let's Encrypt certificates and thus would need more change to the container.

How is this interact with the other patches in the series?

I presume we do want to take patch 4 and rebuild the containers, for the older branches.  And that's fine.

And IMO we should be dropping jessie testing, so this is almost fine for staging.

Except, jessie-32 is the only x86-32 build test we've got, so I think we want to replace it with a newer container before dropping the jessie*.

Quoted 5 lines

---
Notes:
HTTPS would fail unless we commit "automation: Remove expired root certificates used to be used by let's encrypt", that is. Patch still in the series, and fix Jessie.

If we're dropping the jessie containers, do we really need that change too?  Because we really shouldn't be playing around with URLs on older branches.

~Andrew

#11 lore raw

Re: [XEN PATCH v2 6/7] automation: Remove testing on Debian Jessie

Quoted 10 lines · Andrew Cooper
Quoted 7 lines · Anthony PERARD

Jessie as rearch EOL in 2020.

Even if we update the containers, we would still not be able to reach HTTPS webside with Let's Encrypt certificates and thus would need more change to the container.

How is this interact with the other patches in the series?

Quoted 8 lines

I presume we do want to take patch 4 and rebuild the containers, for the older branches.  And that's fine.

And IMO we should be dropping jessie testing, so this is almost fine for staging.

Except, jessie-32 is the only x86-32 build test we've got, so I think we want to replace it with a newer container before dropping the jessie*.

Further to this, I really don't think we need to have a 4-wide matrix of {clang,gcc}{debug,release} for just a 32bit tools userspace.  Debug clang+gcc will do, and save on some testing cycles.

~Andrew

Quoted 11 lines
Quoted 6 lines

---
Notes:
HTTPS would fail unless we commit "automation: Remove expired root certificates used to be used by let's encrypt", that is. Patch still in the series, and fix Jessie.

If we're dropping the jessie containers, do we really need that change too?  Because we really shouldn't be playing around with URLs on older branches.

~Andrew

#12 lore raw

Re: [XEN PATCH v2 6/7] automation: Remove testing on Debian Jessie

Quoted 11 lines · Andrew Cooper
Quoted 10 lines · Andrew Cooper
Quoted 7 lines · Anthony PERARD

Jessie as rearch EOL in 2020.

Even if we update the containers, we would still not be able to reach HTTPS webside with Let's Encrypt certificates and thus would need more change to the container.

How is this interact with the other patches in the series?

Quoted 8 lines
Quoted 8 lines

I presume we do want to take patch 4 and rebuild the containers, for the older branches.  And that's fine.

And IMO we should be dropping jessie testing, so this is almost fine for staging.

Except, jessie-32 is the only x86-32 build test we've got, so I think we want to replace it with a newer container before dropping the jessie*.

Actually, we have two mores: debian-unstable-32-* and debian-stretch-32-*. So an old distrib and a very new. So there's probably no need to add more.

Quoted 3 lines

Further to this, I really don't think we need to have a 4-wide matrix of {clang,gcc}{debug,release} for just a 32bit tools userspace.  Debug clang+gcc will do, and save on some testing cycles.

I guess we could remove debian-{stretch,unstable}-32-{clang,gcc}. I'll add a patch for that.

Quoted 11 lines

~Andrew

Quoted 9 lines
Quoted 6 lines

---
Notes:
HTTPS would fail unless we commit "automation: Remove expired root certificates used to be used by let's encrypt", that is. Patch still in the series, and fix Jessie.

If we're dropping the jessie containers, do we really need that change too?  Because we really shouldn't be playing around with URLs on older branches.

No, there's no need to change it. It's just a bit confusing to both update and delete. In the patch that remove the debian-jessie jobs, I kind of want to also remove the dockerfile, but if the dockerfile is updated in the series it is weird to remove it in that same series.

Thanks,

Signature · 1 line
Anthony PERARD
#13 lore raw

PATCH v2 7/7 automation: Remove expired root certificates used to be used by let's encrypt

In reply to Anthony PERARD

While the Let's Encrypt root certificate ISRG_Root_X1.crt is already present, openssl seems to still check for the root certificate DST_Root_CA_X3.crt which has expired. This prevent https connections.

Removing DST_Root_CA_X3 fix the issue.

---

Notes:
v2:
- remove unneeded changes to CentOS containers

 automation/build/debian/jessie-i386.dockerfile | 5 +++++
 automation/build/debian/jessie.dockerfile      | 5 +++++
 automation/build/ubuntu/trusty.dockerfile      | 5 +++++
 3 files changed, 15 insertions(+)
automation/build/debian/jessie-i386.dockerfile +5 -0
index 276b640ec9..e04b43f32f 100644
@@ -49,3 +49,8 @@ RUN apt-get update && \
         apt-get autoremove -y && \
         apt-get clean && \
         rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
+
+# Remove expired certificate that Let's Encrypt certificates used to relie on.
+# (Not needed anymore)
+RUN sed -i '/mozilla\/DST_Root_CA_X3\.crt/d' /etc/ca-certificates.conf && \
+    update-ca-certificates
automation/build/debian/jessie.dockerfile +5 -0
index 06128d1a40..e8aa0183ee 100644
@@ -48,3 +48,8 @@ RUN apt-get update && \
         apt-get autoremove -y && \
         apt-get clean && \
         rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
+
+# Remove expired certificate that Let's Encrypt certificates used to relie on.
+# (Not needed anymore)
+RUN sed -i '/mozilla\/DST_Root_CA_X3\.crt/d' /etc/ca-certificates.conf && \
+    update-ca-certificates
automation/build/ubuntu/trusty.dockerfile +5 -0
index b4b2f85e73..16d08ca931 100644
@@ -49,3 +49,8 @@ RUN apt-get update && \
         apt-get autoremove -y && \
         apt-get clean && \
         rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
+
+# Remove expired certificate that Let's Encrypt certificates used to relie on.
+# (Not needed anymore)
+RUN sed -i 's#mozilla/DST_Root_CA_X3\.crt#!\0#' /etc/ca-certificates.conf && \
+    update-ca-certificates
Signature · 1 line
Anthony PERARD
#14 lore raw

Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

In reply to Anthony PERARD
Quoted 1 line · Anthony PERARD

Building randconfig on debian unstable seems to be an issue.

You're talking about
https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/3769926509 ?

+ gcc --version
gcc (Debian 12.2.0-14) 12.2.0

arch/x86/extable.c: In function 'search_pre_exception_table':
arch/x86/extable.c:200:27: error: array subscript -1 is outside array bounds of 'struct exception_table_entry[1152921504606846975]' [-Werror=array-bounds]
  200 |     unsigned long fixup = search_one_extable(
      |                           ^~~~~~~~~~~~~~~~~~~
  201 |         __start___pre_ex_table, __stop___pre_ex_table-1, addr); |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/extable.c:8:
./arch/x86/include/asm/uaccess.h:414:37: note: at offset -8 into object '__stop___pre_ex_table' of size [0, 9223372036854775807]
  414 | extern struct exception_table_entry __stop___pre_ex_table[]; |                                     ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Rules.mk:246: arch/x86/extable.o] Error 1

Jan: do we need some more gcc-wrap sprinkled around?

~Andrew

#15 lore raw

Re: Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

Quoted 25 lines · Andrew Cooper
Quoted 1 line · Anthony PERARD

Building randconfig on debian unstable seems to be an issue.

You're talking about
https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/3769926509 ?

+ gcc --version
gcc (Debian 12.2.0-14) 12.2.0

arch/x86/extable.c: In function 'search_pre_exception_table':
arch/x86/extable.c:200:27: error: array subscript -1 is outside array bounds of 'struct exception_table_entry[1152921504606846975]' [-Werror=array-bounds]
  200 |     unsigned long fixup = search_one_extable(
      |                           ^~~~~~~~~~~~~~~~~~~
  201 |         __start___pre_ex_table, __stop___pre_ex_table-1, addr); |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/extable.c:8:
./arch/x86/include/asm/uaccess.h:414:37: note: at offset -8 into object '__stop___pre_ex_table' of size [0, 9223372036854775807]
  414 | extern struct exception_table_entry __stop___pre_ex_table[]; |                                     ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Rules.mk:246: arch/x86/extable.o] Error 1

Quoted 1 line

Jan: do we need some more gcc-wrap sprinkled around?

I think we can get away without, but first of all I'm curious why gcc12 spots an issue there, but not in my (and perhaps also your) local builds. Being a randconfig failure, is this tied to a specific setting in .config? Off the top of my head I can't think of any which might affect this code.

To work around this, instead of adding gcc-wrap-ery, I'd favor simply changing search_one_extable()'s 2nd parameter's meaning from "last" to "end" (i.e. the range passed in from [,] to [,) in mathematical spelling).

Jan

#16 lore raw

Re: Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

Quoted 26 lines · Jan Beulich
Quoted 25 lines · Andrew Cooper
Quoted 1 line · Anthony PERARD

Building randconfig on debian unstable seems to be an issue.

You're talking about
https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/3769926509 ?

+ gcc --version
gcc (Debian 12.2.0-14) 12.2.0

arch/x86/extable.c: In function 'search_pre_exception_table':
arch/x86/extable.c:200:27: error: array subscript -1 is outside array bounds of 'struct exception_table_entry[1152921504606846975]' [-Werror=array-bounds]
  200 |     unsigned long fixup = search_one_extable(
      |                           ^~~~~~~~~~~~~~~~~~~
  201 |         __start___pre_ex_table, __stop___pre_ex_table-1, addr); |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/extable.c:8:
./arch/x86/include/asm/uaccess.h:414:37: note: at offset -8 into object '__stop___pre_ex_table' of size [0, 9223372036854775807]
  414 | extern struct exception_table_entry __stop___pre_ex_table[]; |                                     ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Rules.mk:246: arch/x86/extable.o] Error 1

Quoted 6 lines
Quoted 1 line

Jan: do we need some more gcc-wrap sprinkled around?

I think we can get away without, but first of all I'm curious why gcc12 spots an issue there, but not in my (and perhaps also your) local builds. Being a randconfig failure, is this tied to a specific setting in .config? Off the top of my head I can't think of any which might affect this code.

Looks to be the combination of DEBUG=n and COVERAGE=y.

Quoted 3 lines

To work around this, instead of adding gcc-wrap-ery, I'd favor simply changing search_one_extable()'s 2nd parameter's meaning from "last" to "end" (i.e. the range passed in from [,] to [,) in mathematical spelling).

I'll make a patch along these lines then, I guess. Should I credit Anthony, you, or both of you as the reporter?

Jan

#17 lore raw

Re: Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

Quoted 31 lines · Jan Beulich
Quoted 25 lines · Jan Beulich
Quoted 24 lines · Andrew Cooper
Quoted 1 line · Anthony PERARD

Building randconfig on debian unstable seems to be an issue.

You're talking about
https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/3769926509 ?

+ gcc --version
gcc (Debian 12.2.0-14) 12.2.0

arch/x86/extable.c: In function 'search_pre_exception_table':
arch/x86/extable.c:200:27: error: array subscript -1 is outside array bounds of 'struct exception_table_entry[1152921504606846975]' [-Werror=array-bounds]
  200 |     unsigned long fixup = search_one_extable(
      |                           ^~~~~~~~~~~~~~~~~~~
  201 |         __start___pre_ex_table, __stop___pre_ex_table-1, addr); |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from arch/x86/extable.c:8:
./arch/x86/include/asm/uaccess.h:414:37: note: at offset -8 into object '__stop___pre_ex_table' of size [0, 9223372036854775807]
  414 | extern struct exception_table_entry __stop___pre_ex_table[]; |                                     ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Rules.mk:246: arch/x86/extable.o] Error 1

Quoted 5 lines
Quoted 1 line

Jan: do we need some more gcc-wrap sprinkled around?

I think we can get away without, but first of all I'm curious why gcc12 spots an issue there, but not in my (and perhaps also your) local builds. Being a randconfig failure, is this tied to a specific setting in .config? Off the top of my head I can't think of any which might affect this code.

Quoted 7 lines

Looks to be the combination of DEBUG=n and COVERAGE=y.

Quoted 3 lines

To work around this, instead of adding gcc-wrap-ery, I'd favor simply changing search_one_extable()'s 2nd parameter's meaning from "last" to "end" (i.e. the range passed in from [,] to [,) in mathematical spelling).

I'll make a patch along these lines then, I guess. Should I credit Anthony, you, or both of you as the reporter?

Yeah, I did wonder about changing the final parameter after sending this email.  It stands a reasonable change of simplifying search_one_extable() anyway.

Probably Anthony.  All I did was look through some logs.

~Andrew