{"id":815535,"url":"http://patchwork.ozlabs.org/api/1.2/patches/815535/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/patch/alpine.DEB.2.20.1709191345040.2962@digraph.polyomino.org.uk/","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/1.2/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<alpine.DEB.2.20.1709191345040.2962@digraph.polyomino.org.uk>","list_archive_url":null,"date":"2017-09-19T13:46:49","name":"Fix hppa/ia64/microblaze executable stack default (bug 22156)","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ef22f896a5f8ec34843c3cfe752bc9c87cb8b59f","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/1.2/people/4349/?format=json","name":"Joseph Myers","email":"joseph@codesourcery.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/alpine.DEB.2.20.1709191345040.2962@digraph.polyomino.org.uk/mbox/","series":[{"id":3880,"url":"http://patchwork.ozlabs.org/api/1.2/series/3880/?format=json","web_url":"http://patchwork.ozlabs.org/project/glibc/list/?series=3880","date":"2017-09-19T13:46:49","name":"Fix hppa/ia64/microblaze executable stack default (bug 22156)","version":1,"mbox":"http://patchwork.ozlabs.org/series/3880/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/815535/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/815535/checks/","tags":{},"related":[],"headers":{"Return-Path":"<libc-alpha-return-84736-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84736-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"IlnAE1bh\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxPLh0QpBz9t16\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 23:47:07 +1000 (AEST)","(qmail 6068 invoked by alias); 19 Sep 2017 13:47:01 -0000","(qmail 5822 invoked by uid 89); 19 Sep 2017 13:47:01 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:message-id\n\t:mime-version:content-type; q=dns; s=default; b=UYqeeHHhd3j5t9ZU\n\t3LeiciV7TYJTjPLqDlvQInWHgIIJ+XMdLfi/L6DWCpdPOA3y635iA+3Tfi68igcs\n\tyV+Swf8QCe0Esq4jakjGd0ta0sL5ip1U57pnU7whnABSMBXcVRbYnwa8m2/2uwOV\n\tjhLmceARVpnM2s2p/N5XDIQKAf8=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:cc:subject:message-id\n\t:mime-version:content-type; s=default; bh=ohi7AlquQDcF1LUAF8y6Te\n\tyEUvM=; b=IlnAE1bhbqd+PIi8NoXizPQj42ezi8vlV4LWv9DDTua9vlN8UncxH/\n\t6HPV6Hag2CQntIESkhTOEe7Wg6P0Az+vmFZ8YyvN1UZGexXHKSehEO9Wc9P+wqTD\n\tOt9oRpl8xzyBdbo2kzrCz4uci6aCuOX5ZR+iExXNB/TN9amgtjO6U=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-24.5 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=","X-HELO":"relay1.mentorg.com","Date":"Tue, 19 Sep 2017 13:46:49 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"<libc-alpha@sourceware.org>","CC":"<vapier@gentoo.org>, <carlos@redhat.com>, <dave.anglin@bell.net>","Subject":"Fix hppa/ia64/microblaze executable stack default (bug 22156)","Message-ID":"<alpine.DEB.2.20.1709191345040.2962@digraph.polyomino.org.uk>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"},"content":"As per https://gcc.gnu.org/ml/gcc-patches/2017-09/msg01220.html hppa,\nia64 and microblaze default to non-executable stacks in the Linux\nkernel.  glibc however defines DEFAULT_STACK_PERMS to include PF_X for\nthose architectures, meaning (a) elf/check-execstack fails and (b)\n(from code inspection, not tested, but this is why I think this is a\nuser-visible bug) thread stacks are unnecessarily mapped with execute\npermission.  This patch fixes the DEFAULT_STACK_PERMS definitions in\nquestion.\n\nTested (compilation only) with build-many-glibcs.py for those\nconfigurations.  This fixes the check-execstack failure (hppa still\nhas a check-textrel failure as the only remaining issue stopping that\narchitecture having clean build-many-glibcs.py results; hopefully\narchitecture maintainers can help resolve that).\n\n2017-09-19  Joseph Myers  <joseph@codesourcery.com>\n\n\t[BZ #22156]\n\t* sysdeps/hppa/stackinfo.h (DEFAULT_STACK_PERMS): Remove PF_X.\n\t* sysdeps/ia64/stackinfo.h (DEFAULT_STACK_PERMS): Likewise.\n\t* sysdeps/microblaze/stackinfo.h (DEFAULT_STACK_PERMS): Likewise.","diff":"diff --git a/sysdeps/hppa/stackinfo.h b/sysdeps/hppa/stackinfo.h\nindex 83b1da1..a3af38f 100644\n--- a/sysdeps/hppa/stackinfo.h\n+++ b/sysdeps/hppa/stackinfo.h\n@@ -23,9 +23,8 @@\n \n #include <elf.h>\n \n-/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is\n- * present, but it is presumed absent.  */\n-#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)\n+/* Default to a non-executable stack.    */\n+#define DEFAULT_STACK_PERMS (PF_R|PF_W)\n \n /* On PA the stack grows up.  */\n #define _STACK_GROWS_UP\t1\ndiff --git a/sysdeps/ia64/stackinfo.h b/sysdeps/ia64/stackinfo.h\nindex 87e1448..a50e727 100644\n--- a/sysdeps/ia64/stackinfo.h\n+++ b/sysdeps/ia64/stackinfo.h\n@@ -27,8 +27,7 @@\n    here.  */\n #define _STACK_GROWS_DOWN\t1\n \n-/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is\n- * present, but it is presumed absent.  */\n-#define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)\n+/* Default to a non-executable stack.  */\n+#define DEFAULT_STACK_PERMS (PF_R|PF_W)\n \n #endif\t/* stackinfo.h */\ndiff --git a/sysdeps/microblaze/stackinfo.h b/sysdeps/microblaze/stackinfo.h\nindex 3062b1e..05755c7 100644\n--- a/sysdeps/microblaze/stackinfo.h\n+++ b/sysdeps/microblaze/stackinfo.h\n@@ -27,8 +27,7 @@\n /* On MicroBlaze the stack grows down.  */\n # define _STACK_GROWS_DOWN\t1\n \n-/* Default to an executable stack.  PF_X can be overridden if PT_GNU_STACK is\n- * present, but it is presumed absent.  */\n-# define DEFAULT_STACK_PERMS (PF_R|PF_W|PF_X)\n+/* Default to a non-executable stack.  */\n+# define DEFAULT_STACK_PERMS (PF_R|PF_W)\n \n #endif\t/* stackinfo.h.  */\n","prefixes":[]}