Your message dated Mon, 08 Jul 2024 11:34:48 +0000
with message-id <e1sqmds-004o9e...@fasolo.debian.org>
and subject line Bug#1055711: fixed in gcc-13 13.3.0-2
has caused the Debian Bug report #1055711,
regarding gcc-13: Please build gcc with -mbranch-protection=standard to enable 
PAC/BTI support on arm64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1055711: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055711
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: gcc-13
Version: 13.2.0-6
Severity: normal

Dear Maintainer,

On arm64 dpkg-dev adds -mbranch-protection=standard to the default build
flags since version 1.22.0. However, the flag is not used in Debian and
Ubuntu when building GCC. This means that the feature does not work as
intended when building programs. A simple test case to check for
functioning gcc support is:

 printf '#include <stdio.h>\n\nint main() {}' > /tmp/test.c
 gcc -mbranch-protection=standard -z force-bti /tmp/test.c

On systems where PAC/BTI support in GCC is working as intended, the
following output is produced:

  [root@eniac ~]# gcc -mbranch-protection=standard -z force-bti /tmp/test.c

  [root@eniac ~]# readelf -n a.out 2>/dev/null | grep Properties
        Properties: AArch64 feature: BTI, PAC

  [root@eniac ~]# gcc --version | head -1 
  gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)

In Sid the following happens instead:

  (sid-arm64)root@eniac:~# gcc -mbranch-protection=standard -z force-bti 
/tmp/test.c
  /usr/bin/ld: 
/usr/lib/gcc/aarch64-linux-gnu/13/../../../aarch64-linux-gnu/Scrt1.o: warning: 
BTI turned on by -z force-bti when all inputs do not have BTI in NOTE section.
  /usr/bin/ld: 
/usr/lib/gcc/aarch64-linux-gnu/13/../../../aarch64-linux-gnu/crti.o: warning: 
BTI turned on by -z force-bti when all inputs do not have BTI in NOTE section.
  /usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/13/crtbeginS.o: warning: BTI 
turned on by -z force-bti when all inputs do not have BTI in NOTE section.
  /usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/13/crtendS.o: warning: BTI turned 
on by -z force-bti when all inputs do not have BTI in NOTE section.
  /usr/bin/ld: 
/usr/lib/gcc/aarch64-linux-gnu/13/../../../aarch64-linux-gnu/crtn.o: warning: 
BTI turned on by -z force-bti when all inputs do not have BTI in NOTE section.

  (sid-arm64)root@eniac:~# readelf -n a.out 2>/dev/null | grep Properties
        Properties: AArch64 feature: BTI

  (sid-arm64)root@eniac:~# gcc --version | head -1
  gcc (Debian 13.2.0-6) 13.2.0

It seems that Ubuntu Mantic is affected as well:

  (ubuntu-arm64)root@eniac:/home/ema# gcc -mbranch-protection=standard -z 
force-bti /tmp/test.c
  /usr/bin/ld: 
/usr/lib/gcc/aarch64-linux-gnu/13/../../../aarch64-linux-gnu/Scrt1.o: warning: 
BTI turned on by -z force-bti when all inputs do not have BTI in NOTE section.
  [...]

  (ubuntu-arm64)root@eniac:/home/ema# gcc --version | head -1
  gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0

On Debian amd64, GCC is built with the -fcf-protection flag on:

  x86_64-linux-gnu-gcc-12 -c -DHAVE_CONFIG_H -g  -I. 
-I../../src/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat 
-Wstrict-prototypes -Wshadow=local -pedantic  -D_GNU_SOURCE -fcf-protection 
-fpic ../../src/libiberty/dyn-string.c -o pic/dyn-string.o; \

Analogously, on arm64 it should be built with -mbranch-protection=standard.

Thanks,
  Emanuele

--- End Message ---
--- Begin Message ---
Source: gcc-13
Source-Version: 13.3.0-2
Done: Matthias Klose <d...@debian.org>

We believe that the bug you reported is fixed in the latest version of
gcc-13, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1055...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Matthias Klose <d...@debian.org> (supplier of updated gcc-13 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 08 Jul 2024 12:53:33 +0200
Source: gcc-13
Architecture: source
Version: 13.3.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <d...@debian.org>
Closes: 1055711 1074577
Changes:
 gcc-13 (13.3.0-2) unstable; urgency=medium
 .
   * Update to git 20240707 from the gcc-13 branch.
     - Fix PR target/106069 (PPC), PR target/115355 (PPC),
       PR target/103100 (AArch64), PR target/115618 (AArch64),
       PR target/114846 (PPC), PR driver/115440, PR fortran/83865,
       PR libstdc++/115668, PR libstdc++/115454, PR libstdc++/115575,
       PR target/87376 (AVR), PR target/115475 (AArch64),
       PR target/115457 (AArch64), PR target/115691 (PARISC),
       PR target/98762 (AVR), PR target/106069 (PPC), PR target/115355 (PPC),
      PR target/88236 (AVR), PR target/115726 (AVR).
   * Disable running the tests on the Ubuntu arm64 buildds (times out).
   * Starting with Ubuntu 24.10, stop building s390x multilibs.
   * d/p/0006-Ada-select-64-bits-time-functions-from-GNU-libc-when-.diff
     Adjust for the new glibc behaviour of defining __USE_TIME_BITS64 also
     on native 64-bits platforms (Simon Chopin). Closes: #1074577. LP: #2071605.
   * Pass --package-metadata on distros with supporting linkers (starting
     with Debian trixie and Ubuntu noble).
     The package metadata is constructed from the environment variables
     DEB_BUILD_OS_RELEASE_ID, DEB_SOURCE, DEB_VERSION and DEB_HOST_ARCH.
     Setting NO_PKG_METADATA=1 disables the generation of the package metadata.
   * Build target libraries with -mbranch-protection=standard to enable PAC/BTI
     support on arm64 (Emanuele Rocca). Closes: #1055711.
   * Build target libraries with -fno-omit-frame-pointer, when enabled in
     dpkg-buildflags.
Checksums-Sha1:
 d594a7aae4e90120711f8800a87aa1cedd2d8b3b 39089 gcc-13_13.3.0-2.dsc
 ca64967f426f9516150de10bcb9e01f5d9230271 617836 gcc-13_13.3.0-2.debian.tar.xz
 5a30235538bc9dda118e67553c9274622db0cd21 8385 gcc-13_13.3.0-2_source.buildinfo
Checksums-Sha256:
 9b57c87d825cf0164220565dbfe6a13a4eff906aa6524a14c57e88c05cc816d7 39089 
gcc-13_13.3.0-2.dsc
 7c297608df8bc0b077ebdb3d493490cbcb317327a346dedd3ee547ccc3874b97 617836 
gcc-13_13.3.0-2.debian.tar.xz
 d51e07851230d43133d0dd3ba02d61ed48cf61c11db60595803aef4da5c73791 8385 
gcc-13_13.3.0-2_source.buildinfo
Files:
 701ffa14fa90c4a3a74b4d99bc7586b0 39089 devel optional gcc-13_13.3.0-2.dsc
 231158e35c76ba04f8573b36d129cb38 617836 devel optional 
gcc-13_13.3.0-2.debian.tar.xz
 344127582d5658eaee4694bfef145205 8385 devel optional 
gcc-13_13.3.0-2_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJEBAEBCgAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAmaLxiMQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9bpoEACypSlNnlhoCpxmYWBO0AgnGyn9Xbh7BdvL
ttN4Y5zMFhZuTcXcM1jxXzcMeSs4YBH1cz4lcBwi7OvN5q2qfreJ2ivoM7ONjDMu
4OmWmB+1toQDwk+GH49xqUk9TIDLZu3IQTLJ7bmXHDH7GV8g3d0e2H++0expfEdV
69PyvdaYokCdfwCkF5+3Zw0eVKWK3ykuJ6Qk4TtuxmQFKalONRjmIOYxY/lTKY9t
6yAi7mTfD9QMncAlzk0HT2rmfiQaQG31Aj6zj7zBjX8ymZA/9MPwy45F8syQ6A81
btvYDTAlun6nB2c2Gf8V3sdQ5XKPAWcTUYm0XE7Xn47Xl9Xa0KX1Wsn/HnI8euxR
lejvwZVkL784ion5TIQdd5AXMcyzt17FRAuUHplhIY6pmVTH+x7lPWh+FOLy38MZ
mJ4juKWpyRI5Eyn+uLZnvT6PKNzTSf10CX2+iZyr/Fv4fsGTe5T2wKjSJxqFysDH
5TgUjSFcI7+z1haTW8gN9UcqOaE/rj6sbsaBzgchhTydeotn6LbVcUhRxCJN+/ft
yeDZnluqJSI7Lh3kJO0w1mVJFFruYXP/hr1/jtpZMO4QDAkI/RrgUMEEsB7HUVcY
4IAfZ3W4HEU2YPmr/sdyE6nPVV9ilmeoBoCKFa1VFofXSQOSPg78nMdgdsTtLdj/
9X6AwyA3Qg==
=N7mW
-----END PGP SIGNATURE-----

Attachment: pgpBEnaVktxqX.pgp
Description: PGP signature


--- End Message ---

Reply via email to