[Bug 2076309] Re: [SRU] xfsprogs missing frame pointer

Andreas Hasenack 2076309 at bugs.launchpad.net
Thu Nov 28 19:31:34 UTC 2024


This is introducing many more compiler and linker options than just
frame pointers.

pkg in archive:
export DEBUG=-DNDEBUG DISTRIBUTION=debian INSTALL_USER=root INSTALL_GROUP=root LDFLAGS='' LOCAL_CONFIGURE_OPTIONS="--build=x86_64-linux-gnu --with-multiarch=x86_64-linux-gnu --host=x86_64-linux-gnu --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto --enable-editline=yes --enable-blkid=yes" ; export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--build=x86_64-linux-gnu --with-multiarch=x86_64-linux-gnu --host=x86_64-linux-gnu --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto --enable-gettext=no"


package in unapproved:
export DEBUG=-DNDEBUG DISTRIBUTION=debian INSTALL_USER=root INSTALL_GROUP=root LDFLAGS='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro' CFLAGS='-g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/home/ubuntu/git/packages/xfsprogs/xfsprogs=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/home/ubuntu/git/packages/xfsprogs/xfsprogs=/usr/src/xfsprogs-6.6.0-1ubuntu2.1' CPPFLAGS='-Wdate-time -D_FORTIFY_SOURCE=3' LOCAL_CONFIGURE_OPTIONS="--build=x86_64-linux-gnu --with-multiarch=x86_64-linux-gnu --host=x86_64-linux-gnu --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto --enable-editline=yes --enable-blkid=yes" ; export OPTIMIZER=-Os LOCAL_CONFIGURE_OPTIONS="--build=x86_64-linux-gnu --with-multiarch=x86_64-linux-gnu --host=x86_64-linux-gnu --disable-ubsan --disable-addrsan --disable-threadsan --enable-lto --enable-gettext=no"

At a glance, I see at least:
- new lto flags, like -ffat-lto-objects and -flto=auto
- LDFLAGS was empty before, now it has the mentioned lto changes, and -Bsymbolic-functions
- -O2 is now used
= FORTIFY_SOURCE=3 is now used

Do we really need all these changes to enable frame pointers? What about
the risk of these other flags being introduced?

** Changed in: xfsprogs (Ubuntu Noble)
       Status: In Progress => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to xfsprogs in Ubuntu.
https://bugs.launchpad.net/bugs/2076309

Title:
  [SRU] xfsprogs missing frame pointer

Status in xfsprogs package in Ubuntu:
  Confirmed
Status in xfsprogs source package in Noble:
  Incomplete
Status in xfsprogs source package in Oracular:
  Fix Released

Bug description:
  xfsprogs missing frame pointer despite the build flags already contain
  compiler flags to enable frame pointers.

  [Impact]

  In order to help developers with profiling, Ubuntu enabled frame-
  pointers for packages in the main archive.

  https://ubuntu.com/blog/ubuntu-performance-engineering-with-frame-
  pointers-by-default

  The `Affects` packages were missed due to the packaging issues. These
  have been fixed on Oracular and can now be ported to Noble.

  [Test Plan]

  Look at the DW_AT_producer in the associated debug ELF file for flags.
  -fno-omit-frame-pointer should be present after the fix.

  The following scripts can be used as a reference
  https://gist.github.com/julian-klode/85e55553f85c410a1b856a93dce77208
  https://gist.github.com/julian-klode/95818246eaef0ac6a54588f7f368e25c

  You can also check the build logs for build flags like `-fno-omit-
  frame-pointer`.

  [Where problems could occur]

  * A distribution-specific patch was applied to fix the build with security hardening flags enabled.
  * The packaging fixes have enabled other security hardening flags. This could have unintended effects.

  [Other Info]

  changes in dpkg have been made to make sure frame-pointers are not
  enabled on s390x and ppc64el.

  Bug reference with similar SRU -
  https://bugs.launchpad.net/ubuntu/+source/ipvsadm/+bug/2071949

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/2076309/+subscriptions




More information about the foundations-bugs mailing list