[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#850520: lintian: PT_GNU_STACK change triggers ~500 new errors



Hi Matthias,

> so you still need to update that list manually ...

I can revert commit 4c722ae9, which applied the tag to all
architectures instead of a select list (diff below). Is there a source
for the list, or a plan to implement additional architectures?

Kind regards
Felix Lechner

* * *

commit 4c722ae90d4c09542ee33aa549745879ea11465c
Author: Jakub Wilk <jwilk@debian.org>
Date:   Fri Oct 21 20:48:54 2016 +0200

    checks/shared-libs: Check for PT_GNU_STACK on all architectures

    The list of architectures that supported PT_GNU_STACK was woefully out
    of date. Hopefully this feature is supported everywhere these days.

diff --git a/checks/shared-libs.pm b/checks/shared-libs.pm
index 93dfbed28..8122aa50c 100644
--- a/checks/shared-libs.pm
+++ b/checks/shared-libs.pm
@@ -36,19 +36,6 @@ use Lintian::Util qw(fail strip);
 # one of the following names.
 my $HWCAP_DIRS = Lintian::Data->new('shared-libs/hwcap-dirs');

-# The following architectures should always have a STACK setting in shared
-# libraries to disable executable stack.  Other architectures don't always add
-# this section and therefore can't be checked.
-my %stack_arches = map { $_ => 1 }qw(
-  alpha
-  amd64
-  i386
-  m68k
-  powerpc
-  s390
-  sparc
-);
-
 # List of symbols file meta-fields.
 my %symbols_meta_fields = map { $_ => 1 }qw(
   Build-Depends-Package
@@ -162,15 +149,11 @@ sub run {
                 tag 'shlib-with-bad-permissions', $cur_file, $perms;
             }

-            # executable stack.  We can only warn about a missing
-            # section on some architectures.  Only warn if there's an
-            # Architecture field; if that's missing, we'll already be
-            # complaining elsewhere.
+            # executable stack.
             if (not defined $objdump->{$cur_file}{'PH'}{STACK}) {
                 if (defined $info->field('architecture')) {
                     my $arch = $info->field('architecture');
-                    tag 'shlib-without-PT_GNU_STACK-section', $cur_file
-                      if $stack_arches{$arch};
+                    tag 'shlib-without-PT_GNU_STACK-section', $cur_file;
                 }
             } elsif ($objdump->{$cur_file}{'PH'}{STACK}{flags} ne 'rw-'){
                 tag 'shlib-with-executable-stack', $cur_file;
diff --git a/debian/changelog b/debian/changelog
index 7b8e8411e..541ad1e73 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ lintian (2.5.49) UNRELEASED; urgency=medium
     + [JW] Don't complain about missing SONAME for position-independent
       executables.  Thanks to Reuben Thomas for the bug report.
       (Closes: #731987)
+    + [JW] Check for PT_GNU_STACK existence on all architectures.
   * checks/source-copyright.pm:
     + [RA, JW] Fix handling punctuation characters in license expressions
       in machine-readable copyright files.  (Closes: #841356)


Reply to: