Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808885/?format=api
{ "id": 808885, "url": "http://patchwork.ozlabs.org/api/patches/808885/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20170901180029.9527-21-hjl.tools@gmail.com/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "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": "<20170901180029.9527-21-hjl.tools@gmail.com>", "list_archive_url": null, "date": "2017-09-01T17:59:51", "name": "[20/58] Hide internal regex functions [BZ #18822]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "112c5737da03f901dbde9b338c60069cc0eca95e", "submitter": { "id": 4387, "url": "http://patchwork.ozlabs.org/api/people/4387/?format=api", "name": "H.J. Lu", "email": "hjl.tools@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20170901180029.9527-21-hjl.tools@gmail.com/mbox/", "series": [ { "id": 1088, "url": "http://patchwork.ozlabs.org/api/series/1088/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=1088", "date": "2017-09-01T18:00:21", "name": "Hide internal functions in libc.so", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1088/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808885/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808885/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-return-84076-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-84076-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=\"PG8Pllcm\"; 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 3xkRyK6XJrz9s3w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Sep 2017 04:06:33 +1000 (AEST)", "(qmail 87627 invoked by alias); 1 Sep 2017 18:01:02 -0000", "(qmail 87581 invoked by uid 89); 1 Sep 2017 18:01:02 -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:from:to:subject:date:message-id:in-reply-to\n\t:references; q=dns; s=default; b=g37bGH26FiVI1wS3rgYtAOOGXELckcp\n\tVDrsPaKZiXdltpatRMCd6m/fCoXubypcAWlSORwfCedBTAmG+pR4iHy/CYyBs+OE\n\tytmuv34QFFQIqVRqIrOjNqkT+fUOhwYdGR5YnLuAbXYm7RThEoUQl6KBV9xA9b/s\n\tZwy85R34eeBI=", "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:from:to:subject:date:message-id:in-reply-to\n\t:references; s=default; bh=iyyBnJ2obpqPu/IOvzTq7up+1GI=; b=PG8Pl\n\tlcmp1ErNUHBtnCeAXIjyUtcnUUSZPCr7IV3D/h74elzWZlXYjKPcdsPrJ4qR13Uj\n\thk7xuHO4nL/2nhTIbO9uNTg0Ok1fLYO/8BFm2cq/UidYNWpPyUP1o3lohz+eL3xB\n\tDZfDrEBpymzAg2yMiRhKzf1l7FhorPZVAAZBvY=", "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=-26.2 required=5.0 tests=BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2,\n\tGIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=", "X-HELO": "mga02.intel.com", "X-ExtLoop1": "1", "From": "\"H.J. Lu\" <hjl.tools@gmail.com>", "To": "libc-alpha@sourceware.org", "Subject": "[PATCH 20/58] Hide internal regex functions [BZ #18822]", "Date": "Fri, 1 Sep 2017 10:59:51 -0700", "Message-Id": "<20170901180029.9527-21-hjl.tools@gmail.com>", "In-Reply-To": "<20170901180029.9527-1-hjl.tools@gmail.com>", "References": "<20170901180029.9527-1-hjl.tools@gmail.com>" }, "content": "Hide internal regex functions to allow direct access within libc.so and\nlibc.a without using GOT nor PLT.\n\n\t[BZ #18822]\n\t* include/regex.h (__re_compile_fastmap): Add attribute_hidden.\n\t(__regcomp): Add libc_hidden_proto.\n\t(__regexec): Likewise.\n\t(__regfree): Likewise.\n\t* posix/regcomp.c (__regcomp): Add libc_hidden_def.\n\t(__regfree): Likewise.\n\t* posix/regexec.c (__regexec): Likewise.\n---\n include/regex.h | 6 +++++-\n posix/regcomp.c | 2 ++\n posix/regexec.c | 2 ++\n 3 files changed, 9 insertions(+), 1 deletion(-)", "diff": "diff --git a/include/regex.h b/include/regex.h\nindex fd4beeff3d..24eca2c297 100644\n--- a/include/regex.h\n+++ b/include/regex.h\n@@ -8,7 +8,8 @@ extern reg_syntax_t __re_set_syntax (reg_syntax_t syntax);\n extern const char *__re_compile_pattern (const char *pattern, size_t length,\n \t\t\t\t\t struct re_pattern_buffer *buffer);\n \n-extern int __re_compile_fastmap (struct re_pattern_buffer *buffer);\n+extern int __re_compile_fastmap (struct re_pattern_buffer *buffer)\n+ attribute_hidden;\n \n extern int __re_search (struct re_pattern_buffer *buffer, const char *string,\n \t\t\tint length, int start, int range,\n@@ -33,13 +34,16 @@ extern void __re_set_registers\n unsigned num_regs, regoff_t *starts, regoff_t *ends);\n \n extern int __regcomp (regex_t *__preg, const char *__pattern, int __cflags);\n+libc_hidden_proto (__regcomp)\n \n extern int __regexec (const regex_t *__preg, const char *__string,\n \t\t size_t __nmatch, regmatch_t __pmatch[], int __eflags);\n+libc_hidden_proto (__regexec)\n \n extern size_t __regerror (int __errcode, const regex_t *__preg,\n \t\t\t char *__errbuf, size_t __errbuf_size);\n \n extern void __regfree (regex_t *__preg);\n+libc_hidden_proto (__regfree)\n #endif\n #endif\ndiff --git a/posix/regcomp.c b/posix/regcomp.c\nindex a5b46139a9..871ae2ffab 100644\n--- a/posix/regcomp.c\n+++ b/posix/regcomp.c\n@@ -517,6 +517,7 @@ regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags)\n return (int) ret;\n }\n #ifdef _LIBC\n+libc_hidden_def (__regcomp)\n weak_alias (__regcomp, regcomp)\n #endif\n \n@@ -644,6 +645,7 @@ regfree (regex_t *preg)\n preg->translate = NULL;\n }\n #ifdef _LIBC\n+libc_hidden_def (__regfree)\n weak_alias (__regfree, regfree)\n #endif\n \f\ndiff --git a/posix/regexec.c b/posix/regexec.c\nindex f46b1f71ca..a96d86d431 100644\n--- a/posix/regexec.c\n+++ b/posix/regexec.c\n@@ -224,6 +224,8 @@ regexec (const regex_t *__restrict preg, const char *__restrict string,\n }\n \n #ifdef _LIBC\n+libc_hidden_def (__regexec)\n+\n # include <shlib-compat.h>\n versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);\n \n", "prefixes": [ "20/58" ] }