Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811212/?format=api
{ "id": 811212, "url": "http://patchwork.ozlabs.org/api/patches/811212/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20170907224219.12483-15-albert.aribaud@3adev.fr/", "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": "<20170907224219.12483-15-albert.aribaud@3adev.fr>", "list_archive_url": null, "date": "2017-09-07T22:41:41", "name": "[RFC,14/52] Y2038: add function __sigtimedwait64", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6aad1d427bb5a992d9826962f67e768320736321", "submitter": { "id": 65557, "url": "http://patchwork.ozlabs.org/api/people/65557/?format=api", "name": "Albert ARIBAUD (3ADEV)", "email": "albert.aribaud@3adev.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20170907224219.12483-15-albert.aribaud@3adev.fr/mbox/", "series": [ { "id": 2074, "url": "http://patchwork.ozlabs.org/api/series/2074/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=2074", "date": "2017-09-07T22:41:27", "name": "Make GLIBC Y2038-proof", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2074/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811212/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811212/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-return-84332-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-84332-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=\"wo1nwFRz\"; 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 3xpFsB0pm5z9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 08:45:17 +1000 (AEST)", "(qmail 72102 invoked by alias); 7 Sep 2017 22:43:29 -0000", "(qmail 71966 invoked by uid 89); 7 Sep 2017 22:43:29 -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:cc:subject:date:message-id:in-reply-to\n\t:references; q=dns; s=default; b=uHhBhP2SxWFFGmdbT8nNZ6YwVkEPU9b\n\tUa+sbKAKefcPdz4OBg2tADtjp27K/pP8QYeLR77v0dGbUgoapThHoLevnqwGvcki\n\tpeT9piJnPWvh37+6NpGXXUU6jvEVEdy75W4Z9LdAyyJISGfdPtosu4VaoEW35bAM\n\tILyP4u1Lc24I=", "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:cc:subject:date:message-id:in-reply-to\n\t:references; s=default; bh=6wSMkkDBA8ZBvHJPnmPIz5dRuI0=; b=wo1nw\n\tFRzAA6pj6wjDcw6NLmDlrD2pKJA5Mn7yOzArqaXrykOB49xoJlI/gdDLMKVLXLya\n\t+D9hg+XssX+UwWErX8axUqj+en00oBBUurfrlrePQmovGu9OQVCIthYGAUgxNykg\n\t0AtnO74kENyd/YeC0L88WRsj4AUda5UzA3GW9g=", "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.6 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY,\n\tRCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=", "X-HELO": "smtp6-g21.free.fr", "From": "\"Albert ARIBAUD (3ADEV)\" <albert.aribaud@3adev.fr>", "To": "libc-alpha@sourceware.org", "Cc": "\"Albert ARIBAUD (3ADEV)\" <albert.aribaud@3adev.fr>", "Subject": "[RFC PATCH 14/52] Y2038: add function __sigtimedwait64", "Date": "Fri, 8 Sep 2017 00:41:41 +0200", "Message-Id": "<20170907224219.12483-15-albert.aribaud@3adev.fr>", "In-Reply-To": "<20170907224219.12483-14-albert.aribaud@3adev.fr>", "References": "<20170907224219.12483-1-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-2-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-3-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-4-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-5-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-6-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-7-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-8-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-9-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-10-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-11-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-12-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-13-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-14-albert.aribaud@3adev.fr>" }, "content": "Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>\n---\n signal/sigtimedwait.c | 10 +++++\n sysdeps/unix/sysv/linux/arm/Versions | 1 +\n sysdeps/unix/sysv/linux/sigtimedwait.c | 75 ++++++++++++++++++++++++++++++++++\n 3 files changed, 86 insertions(+)", "diff": "diff --git a/signal/sigtimedwait.c b/signal/sigtimedwait.c\nindex 3b42003e26..c1e0d4375c 100644\n--- a/signal/sigtimedwait.c\n+++ b/signal/sigtimedwait.c\n@@ -30,3 +30,13 @@ libc_hidden_def (__sigtimedwait)\n weak_alias (__sigtimedwait, sigtimedwait)\n \n stub_warning (sigtimedwait)\n+\n+int\n+__sigtimedwait64 (const sigset_t *set, siginfo_t *info,\n+\t\tconst struct __timespec64 *timeout)\n+{\n+ __set_errno (ENOSYS);\n+ return -1;\n+}\n+\n+stub_warning (__sigtimedwait64)\ndiff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions\nindex 2620d81fdc..630e3f8569 100644\n--- a/sysdeps/unix/sysv/linux/arm/Versions\n+++ b/sysdeps/unix/sysv/linux/arm/Versions\n@@ -35,5 +35,6 @@ libc {\n __clock_nanosleep64;\n __futimens64;\n __utimensat64;\n+ __sigtimedwait64;\n }\n }\ndiff --git a/sysdeps/unix/sysv/linux/sigtimedwait.c b/sysdeps/unix/sysv/linux/sigtimedwait.c\nindex ab1a84ef1c..f79850dcfe 100644\n--- a/sysdeps/unix/sysv/linux/sigtimedwait.c\n+++ b/sysdeps/unix/sysv/linux/sigtimedwait.c\n@@ -18,6 +18,7 @@\n #include <errno.h>\n #include <signal.h>\n #include <string.h>\n+#include <stdint.h>\n \n #include <nptl/pthreadP.h>\n #include <sysdep-cancel.h>\n@@ -64,6 +65,80 @@ __sigtimedwait (const sigset_t *set, siginfo_t *info,\n }\n libc_hidden_def (__sigtimedwait)\n weak_alias (__sigtimedwait, sigtimedwait)\n+\n+/* 64-bit time version */\n+\n+extern int __y2038_linux_support;\n+\n+int\n+__sigtimedwait64 (const sigset_t *set, siginfo_t *info,\n+\t\tconst struct __timespec64 *timeout)\n+{\n+ int result;\n+ struct __timespec64 ts64;\n+ struct timespec ts32;\n+\n+#ifdef SIGCANCEL\n+ sigset_t tmpset;\n+ if (set != NULL\n+ && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)\n+# ifdef SIGSETXID\n+\t || __builtin_expect (__sigismember (set, SIGSETXID), 0)\n+# endif\n+\t ))\n+ {\n+ /* Create a temporary mask without the bit for SIGCANCEL set. */\n+ // We are not copying more than we have to.\n+ memcpy (&tmpset, set, _NSIG / 8);\n+ __sigdelset (&tmpset, SIGCANCEL);\n+# ifdef SIGSETXID\n+ __sigdelset (&tmpset, SIGSETXID);\n+# endif\n+ set = &tmpset;\n+ }\n+#endif\n+\n+ /* XXX The size argument hopefully will have to be changed to the\n+ real size of the user-level sigset_t. */\n+\n+ if (__y2038_linux_support)\n+ {\n+ if (timeout)\n+ {\n+ ts64.tv_sec = timeout->tv_sec;\n+ ts64.tv_nsec = timeout->tv_nsec;\n+ ts64.tv_pad = 0;\n+ result = SYSCALL_CANCEL (rt_sigtimedwait, set, info, &ts64, _NSIG / 8);\n+ }\n+ else\n+ result = SYSCALL_CANCEL (rt_sigtimedwait, set, info, NULL, _NSIG / 8);\n+ }\n+ else\n+ {\n+ if (timeout)\n+ {\n+ if (timeout->tv_sec > INT32_MAX)\n+ {\n+ errno = EOVERFLOW;\n+ return -1;\n+ }\n+ ts32.tv_sec = timeout->tv_sec;\n+ ts32.tv_nsec = timeout->tv_nsec;\n+ result = SYSCALL_CANCEL (rt_sigtimedwait, set, info, &ts32, _NSIG / 8);\n+ }\n+ else\n+ result = SYSCALL_CANCEL (rt_sigtimedwait, set, info, NULL, _NSIG / 8);\n+ }\n+\n+ /* The kernel generates a SI_TKILL code in si_code in case tkill is\n+ used. tkill is transparently used in raise(). Since having\n+ SI_TKILL as a code is useful in general we fold the results\n+ here. */\n+ if (result != -1 && info != NULL && info->si_code == SI_TKILL)\n+ info->si_code = SI_USER;\n+\n+ return result;\n+}\n #else\n # include <signal/sigtimedwait.c>\n #endif\n", "prefixes": [ "RFC", "14/52" ] }