[Bug 2059059] Re: Problem with -fno-stack-clash-protection flag on armhf

Daniel Richard G. 2059059 at bugs.launchpad.net
Thu Aug 8 04:20:18 UTC 2024


The -fno-stack-clash-protection flag appears to have been dropped from
Debian.pm at some point after I filed this report. Closing.

** Changed in: dpkg (Ubuntu)
       Status: New => Fix Released

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

Title:
  Problem with -fno-stack-clash-protection flag on armhf

Status in dpkg package in Ubuntu:
  Fix Released

Bug description:
  This concerns libdpkg-perl 1.22.4ubuntu5 in Ubuntu noble.

  In /usr/share/perl5/Dpkg/Vendor/Ubuntu.pm, there is this bit:

      # Debian enables -fstack-clash-protection but it causes troubles on armhf
      # (which are not fully analyzed as of writing this); disable it there in
      # order to have time to investigate
      if ($arch eq 'armhf') {
          # Stack clash protector only available on amd64 and arm.
          $flags->set_feature('hardening', 'stackclash', 0);
      }

  Then in /usr/share/perl5/Dpkg/Vendor/Debian.pm, this logic:

      # Stack clash
      if ($flags->use_feature('hardening', 'stackclash')) {
          my $flag = '-fstack-clash-protection';
          $flags->append($_, $flag) foreach @compile_flags;
      } else {
          my $flag = '-fno-stack-clash-protection';
          $flags->append($_, $flag) foreach @compile_flags;
      }

  Which causes -fno-stack-clash-protection to be added to the package
  build flags.

  Unfortunately, in building Chromium for armhf on noble, I see this
  (build log excerpt):

      [27780/60083] CXX obj/net/third_party/quiche/quiche/qpack_decoder_stream_receiver.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27781/60083] CXX obj/net/third_party/quiche/quiche/qpack_encoder_stream_receiver.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27782/60083] CXX obj/net/third_party/quiche/quiche/qpack_decoder_stream_sender.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27783/60083] CXX obj/net/third_party/quiche/quiche/qpack_index_conversions.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27784/60083] CXX obj/net/third_party/quiche/quiche/qpack_encoder_stream_sender.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27785/60083] CXX obj/net/third_party/quiche/quiche/qpack_encoder.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27786/60083] CXX obj/net/third_party/quiche/quiche/qpack_instruction_decoder.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27787/60083] CXX obj/net/third_party/quiche/quiche/qpack_header_table.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27788/60083] CXX obj/net/third_party/quiche/quiche/qpack_instruction_encoder.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]
      [27789/60083] CXX obj/net/third_party/quiche/quiche/qpack_instructions.o
      clang++-16: warning: argument unused during compilation: '-fno-stack-clash-protection' [-Wunused-command-line-argument]

  Basically, *every* invocation of the C or C++ compiler gives this
  warning.

  I think the flag needs to be dropped altogether for armhf, not just
  negated.

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




More information about the foundations-bugs mailing list