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

[lintian] 03/03: checks/shared-libs: Check for PT_GNU_STACK on all architectures



This is an automated email from the git hooks/post-receive script.

jwilk pushed a commit to branch master
in repository lintian.

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.
---
 checks/shared-libs.pm | 21 ++-------------------
 debian/changelog      |  1 +
 2 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/checks/shared-libs.pm b/checks/shared-libs.pm
index 93dfbed..8122aa5 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 7b8e841..541ad1e 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)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: