Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811236/?format=api
{ "id": 811236, "url": "http://patchwork.ozlabs.org/api/patches/811236/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20170907224219.12483-36-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-36-albert.aribaud@3adev.fr>", "list_archive_url": null, "date": "2017-09-07T22:42:02", "name": "[RFC,35/52] Y2038: add function __msgctl_t64", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a6ec3869a1d1a2682e5bd79750943e486a5152f1", "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-36-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/811236/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811236/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-return-84353-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-84353-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=\"CWtUUfyo\"; 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 3xpFxj1lr5z9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 08:49:13 +1000 (AEST)", "(qmail 98567 invoked by alias); 7 Sep 2017 22:44:56 -0000", "(qmail 98335 invoked by uid 89); 7 Sep 2017 22:44:56 -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=NJBfGFaZ4HssbB20NZOqBtO6coy6h2C\n\tXuBIn/YmaTf5mOZ91gNcZq/R7OkizpgA9eupY+3wOOyQLNiKMDb2Ic65AeET9t3a\n\tcjNPFc6xDZXvbBn6zKxGmmRyKbxAi9Ez4sBaR+xPskRw/CeSux3yS9HQwODrZjnQ\n\tNMENPiZVumz4=", "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=qQgCAEFJquqApO4vJQrOpFYnay4=; b=CWtUU\n\tfyoSE1M8gMdlxJ3ndaQ2SJX8o+7XePb88qFCNWOxko5fwRRLODO5TYjhajm20RIc\n\t8E+rh3+hEWa6P/ZSs8u1SzH0JiYBAbfFkiWLqUo7c6oy2rrzH0ZhYCFLipFHzZ8j\n\tiZ8K7Dt6ZCx3ZpNWhwT55quDNA4fLXpKx7ZNjA=", "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 35/52] Y2038: add function __msgctl_t64", "Date": "Fri, 8 Sep 2017 00:42:02 +0200", "Message-Id": "<20170907224219.12483-36-albert.aribaud@3adev.fr>", "In-Reply-To": "<20170907224219.12483-35-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>\n\t<20170907224219.12483-15-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-16-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-17-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-18-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-19-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-20-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-21-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-22-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-23-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-24-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-25-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-26-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-27-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-28-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-29-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-30-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-31-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-32-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-33-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-34-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-35-albert.aribaud@3adev.fr>" }, "content": "Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>\n---\n sysdeps/unix/sysv/linux/Versions | 7 ++++\n sysdeps/unix/sysv/linux/bits/msq.h | 20 +++++++++++\n sysdeps/unix/sysv/linux/msgctl.c | 72 ++++++++++++++++++++++++++++++++++++++\n 3 files changed, 99 insertions(+)", "diff": "diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions\nindex 202ffccc29..3fcd1c252b 100644\n--- a/sysdeps/unix/sysv/linux/Versions\n+++ b/sysdeps/unix/sysv/linux/Versions\n@@ -172,4 +172,11 @@ libc {\n # functions used by nscd\n __netlink_assert_response;\n }\n+\n+ # Y2038 symbols are given their own version until they can be put in\n+ # the right place\n+\n+ GLIBC_Y2038 {\n+ __msgctl_t64;\n+ }\n }\ndiff --git a/sysdeps/unix/sysv/linux/bits/msq.h b/sysdeps/unix/sysv/linux/bits/msq.h\nindex 31c4863e7b..ba3f24f720 100644\n--- a/sysdeps/unix/sysv/linux/bits/msq.h\n+++ b/sysdeps/unix/sysv/linux/bits/msq.h\n@@ -35,6 +35,25 @@ typedef unsigned long int msglen_t;\n \n /* Structure of record for one message inside the kernel.\n The type `struct msg' is opaque. */\n+#ifdef __USE_TIME_BITS64\n+struct msqid_ds\n+{\n+ struct ipc_perm msg_perm;\t/* structure describing operation permission */\n+ __time64_t msg_stime;\t\t/* time of last msgsnd command */\n+ unsigned long int __glibc_reserved1;\n+ __time64_t msg_rtime;\t\t/* time of last msgrcv command */\n+ unsigned long int __glibc_reserved2;\n+ __time64_t msg_ctime;\t\t/* time of last change */\n+ unsigned long int __glibc_reserved3;\n+ unsigned long int __msg_cbytes; /* current number of bytes on queue */\n+ msgqnum_t msg_qnum;\t\t/* number of messages currently on queue */\n+ msglen_t msg_qbytes;\t\t/* max number of bytes allowed on queue */\n+ __pid_t msg_lspid;\t\t/* pid of last msgsnd() */\n+ __pid_t msg_lrpid;\t\t/* pid of last msgrcv() */\n+ unsigned long int __glibc_reserved4;\n+ unsigned long int __glibc_reserved5;\n+};\n+#else\n struct msqid_ds\n {\n struct ipc_perm msg_perm;\t/* structure describing operation permission */\n@@ -52,6 +71,7 @@ struct msqid_ds\n unsigned long int __glibc_reserved4;\n unsigned long int __glibc_reserved5;\n };\n+#endif\n \n #ifdef __USE_MISC\n \ndiff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c\nindex e5ae621420..d62faf71ce 100644\n--- a/sysdeps/unix/sysv/linux/msgctl.c\n+++ b/sysdeps/unix/sysv/linux/msgctl.c\n@@ -69,3 +69,75 @@ __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)\n }\n compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);\n #endif\n+\n+/* 64-bit time version */\n+\n+struct __msqid_ds_t64\n+{\n+ struct ipc_perm msg_perm;\t/* structure describing operation permission */\n+ __time64_t msg_stime;\t\t/* time of last msgsnd command */\n+ unsigned long int __glibc_reserved1;\n+ __time64_t msg_rtime;\t\t/* time of last msgrcv command */\n+ unsigned long int __glibc_reserved2;\n+ __time64_t msg_ctime;\t\t/* time of last change */\n+ unsigned long int __glibc_reserved3;\n+ unsigned long int __msg_cbytes; /* current number of bytes on queue */\n+ msgqnum_t msg_qnum;\t\t/* number of messages currently on queue */\n+ msglen_t msg_qbytes;\t\t/* max number of bytes allowed on queue */\n+ __pid_t msg_lspid;\t\t/* pid of last msgsnd() */\n+ __pid_t msg_lrpid;\t\t/* pid of last msgrcv() */\n+ unsigned long int __glibc_reserved4;\n+ unsigned long int __glibc_reserved5;\n+};\n+\n+extern int __y2038_linux_support;\n+\n+int\n+__msgctl_t64 (int msqid, int cmd, struct __msqid_ds_t64 *buf)\n+{\n+ int result;\n+ struct msqid_ds buf32, *pbuf32 = NULL;\n+\n+ if (__y2038_linux_support)\n+ {\n+ /* TODO: use 64-bit syscalls */\n+ }\n+\n+ if (cmd == IPC_SET && buf != NULL)\n+ {\n+ buf32.msg_qbytes = buf->msg_qbytes;\n+ buf32.msg_perm.uid = buf->msg_perm.uid;\n+ buf32.msg_perm.gid = buf->msg_perm.gid;\n+ buf32.msg_perm.mode = buf->msg_perm.mode;\n+ }\n+\n+ if (cmd == IPC_SET || cmd == IPC_STAT)\n+ pbuf32 = &buf32;\n+\n+#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS\n+ result = INLINE_SYSCALL_CALL (msgctl, msqid, cmd | __IPC_64, pbuf32);\n+#else\n+ result = INLINE_SYSCALL_CALL (ipc, IPCOP_msgctl, msqid, cmd | __IPC_64,\n+ 0, pbuf32);\n+#endif\n+\n+ if (cmd == IPC_STAT && result == 0 && buf != NULL)\n+ {\n+ buf->msg_perm = buf32.msg_perm;\n+ buf->msg_stime = buf32.msg_stime;\n+ buf->__glibc_reserved1 = buf32.__glibc_reserved1;\n+ buf->msg_rtime = buf32.msg_rtime;\n+ buf->__glibc_reserved2 = buf32.__glibc_reserved2;\n+ buf->msg_ctime = buf32.msg_ctime;\n+ buf->__glibc_reserved3 = buf32.__glibc_reserved3;\n+ buf->__msg_cbytes = buf32.__msg_cbytes;\n+ buf->msg_qnum = buf32.msg_qnum;\n+ buf->msg_qbytes = buf32.msg_qbytes;\n+ buf->msg_lspid = buf32.msg_lspid;\n+ buf->msg_lrpid = buf32.msg_lrpid;\n+ buf->__glibc_reserved4 = buf32.__glibc_reserved4;\n+ buf->__glibc_reserved5 = buf32.__glibc_reserved5;\n+ }\n+\n+ return result;\n+}\n", "prefixes": [ "RFC", "35/52" ] }