get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2218869/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2218869,
    "url": "http://patchwork.ozlabs.org/api/patches/2218869/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260401230513.317910-1-samuel.thibault@ens-lyon.org/",
    "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": "<20260401230513.317910-1-samuel.thibault@ens-lyon.org>",
    "list_archive_url": null,
    "date": "2026-04-01T23:05:13",
    "name": "[hurd,commited] hurd: alterations to MSG_EXAMINE interface (intr-msg.h)",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8ecd92acfe42cb0a77761190903a33a3543f054b",
    "submitter": {
        "id": 418,
        "url": "http://patchwork.ozlabs.org/api/people/418/?format=api",
        "name": "Samuel Thibault",
        "email": "samuel.thibault@ens-lyon.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260401230513.317910-1-samuel.thibault@ens-lyon.org/mbox/",
    "series": [
        {
            "id": 498407,
            "url": "http://patchwork.ozlabs.org/api/series/498407/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=498407",
            "date": "2026-04-01T23:05:13",
            "name": "[hurd,commited] hurd: alterations to MSG_EXAMINE interface (intr-msg.h)",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498407/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218869/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218869/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "libc-alpha@sourceware.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "libc-alpha@sourceware.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n dmarc=none (p=none dis=none) header.from=ens-lyon.org",
            "sourceware.org;\n spf=pass smtp.mailfrom=bounce.ens-lyon.org",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=140.77.166.138"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmLF4113vz1yGY\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 10:05:39 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 3378B4BA2E3E\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 23:05:37 +0000 (GMT)",
            "from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138])\n by sourceware.org (Postfix) with ESMTPS id 943784BA2E2A\n for <libc-alpha@sourceware.org>; Wed,  1 Apr 2026 23:05:16 +0000 (GMT)",
            "from localhost (localhost [127.0.0.1])\n by sonata.ens-lyon.org (Postfix) with ESMTP id 615C6A49BC;\n Thu,  2 Apr 2026 01:05:15 +0200 (CEST)",
            "from sonata.ens-lyon.org ([127.0.0.1])\n by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id nt0S5Ha4L4qi; Thu,  2 Apr 2026 01:05:15 +0200 (CEST)",
            "from end (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr\n [83.192.199.48])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest\n SHA256) (No client certificate requested)\n by sonata.ens-lyon.org (Postfix) with ESMTPSA id 28A7FA47DD;\n Thu,  2 Apr 2026 01:05:15 +0200 (CEST)",
            "from samy by end with local (Exim 4.99.1)\n (envelope-from <samuel.thibault@ens-lyon.org>)\n id 1w84cc-00000001Khl-2kKF; Thu, 02 Apr 2026 01:05:14 +0200"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 3378B4BA2E3E",
            "OpenDKIM Filter v2.11.0 sourceware.org 943784BA2E2A"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 943784BA2E2A",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 943784BA2E2A",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775084716; cv=none;\n b=u5Voqgy98ur6YMUqgshCuhEtU3RWiBtn+U9NewUtxWelVqvzUc3afFhttQ7IxqU2/8x6LXCcgPY2sJd+F8DHKrkZIO+CKYt335k8vzltaqjJdJo7ca2xKlshKzeAfKCEiMGAmKa9cKqIediSxCgnQVq+/qGezo2CDEWBar708uA=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775084716; c=relaxed/simple;\n bh=YO0AmN+/9+RXTCFowQeqnyf5voBgNT3bNh3kZZ/usko=;\n h=From:To:Subject:Date:Message-ID:MIME-Version;\n b=mOYlH6Wt7pbGUNYVwOyLttwT54ozwn0Umb0kGM9rJNPAt2g/jkKmf7CHlRVtehuv/N3YEov4Rq77Fok3RF1SoF7v43SysY3PDrIPo39+Z4yl52o+gtYKn4XjLDd6H/YjeqXx5M+jaVSzkMt3l5zXuU3Nr6wPjPGiXBGpvYksqvA=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "From": "Samuel Thibault <samuel.thibault@ens-lyon.org>",
        "To": "libc-alpha@sourceware.org",
        "Cc": "Mike Kelly <mike@weatherwax.co.uk>,\n\tcommit-hurd@gnu.org",
        "Subject": "[hurd,\n commited] hurd: alterations to MSG_EXAMINE interface (intr-msg.h)",
        "Date": "Thu,  2 Apr 2026 01:05:13 +0200",
        "Message-ID": "<20260401230513.317910-1-samuel.thibault@ens-lyon.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "libc-alpha@sourceware.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Libc-alpha mailing list <libc-alpha.sourceware.org>",
        "List-Unsubscribe": "<https://sourceware.org/mailman/options/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe>",
        "List-Archive": "<https://sourceware.org/pipermail/libc-alpha/>",
        "List-Post": "<mailto:libc-alpha@sourceware.org>",
        "List-Help": "<mailto:libc-alpha-request@sourceware.org?subject=help>",
        "List-Subscribe": "<https://sourceware.org/mailman/listinfo/libc-alpha>,\n <mailto:libc-alpha-request@sourceware.org?subject=subscribe>",
        "Errors-To": "libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org"
    },
    "content": "From: Mike Kelly <mike@weatherwax.co.uk>\n\nMSG_EXAMINE has been broadened to allow the signal thread (for\nexample) to access additional arguments that are passed to\ninterruptible RPCs in other threads. All architecture specific\nvariants of intr-msg.h now comply with the revised interface and the\nsingle user of MSG_EXAMINE (report-wait.c) adjusted accordingly.\nMessage-ID: <20260401194948.90428-2-mike@weatherwax.co.uk>\n---\n hurd/report-wait.c                  | 15 ++++++++++++-\n sysdeps/mach/hurd/i386/intr-msg.h   | 35 ++++++++++++++---------------\n sysdeps/mach/hurd/x86_64/intr-msg.h | 19 +++++++---------\n 3 files changed, 39 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/hurd/report-wait.c b/hurd/report-wait.c\nindex 3f141345f4..703482c6cc 100644\n--- a/hurd/report-wait.c\n+++ b/hurd/report-wait.c\n@@ -155,16 +155,29 @@ _S_msg_report_wait (mach_port_t msgport, thread_t thread,\n \t  assert (count == MACHINE_THREAD_STATE_COUNT);\n \t  if (SYSCALL_EXAMINE (&state, msgid))\n \t    {\n+\t      mach_msg_header_t* msghdr;\n \t      mach_port_t send_port, rcv_port;\n+\t      mach_msg_size_t rcv_sz;\n \t      mach_msg_option_t option;\n \t      mach_msg_timeout_t timeout;\n \n \t      /* Blocked in a system call.  */\n \t      if (*msgid == -25\n \t\t  /* mach_msg system call.  Examine its parameters.  */\n-\t\t  && MSG_EXAMINE (&state, msgid, &rcv_port, &send_port,\n+\t\t  && MSG_EXAMINE (&state, &msghdr, &rcv_port, &rcv_sz,\n \t\t\t\t  &option, &timeout) == 0)\n \t\t{\n+\t\t  if (msghdr != NULL)\n+\t\t    {\n+\t\t      send_port = msghdr->msgh_remote_port;\n+\t\t      *msgid = msghdr->msgh_id;\n+\t\t    }\n+\t\t  else\n+\t\t    {\n+\t\t      send_port = MACH_PORT_NULL;\n+\t\t      *msgid = 0;\n+\t\t    }\n+\n \t\t  if (send_port != MACH_PORT_NULL && *msgid != 0)\n \t\t    {\n \t\t      /* For the normal case of RPCs, we consider the\ndiff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h\nindex e8acf63bd0..5b9a35d526 100644\n--- a/sysdeps/mach/hurd/i386/intr-msg.h\n+++ b/sysdeps/mach/hurd/i386/intr-msg.h\n@@ -106,30 +106,29 @@ struct mach_msg_trap_args\n \n \n /* This cannot be an inline function because it calls setjmp.  */\n-#define MSG_EXAMINE(state, msgid, rcvname, send_name, opt, tmout)\t      \\\n+#define MSG_EXAMINE(state, msghdr, rcvname, rcvsz, opt, tmout)\t\t      \\\n ({\t\t\t\t\t\t\t\t\t      \\\n   const struct mach_msg_trap_args *args = (const void *) (state)->uesp;\t      \\\n-  mach_msg_header_t *msg;\t\t\t\t\t\t      \\\n-  _hurdsig_catch_memory_fault (args) ? -1 :\t\t\t\t      \\\n-    ({\t\t\t\t\t\t\t\t\t      \\\n-      msg = args->msg;\t\t\t\t\t\t\t      \\\n+  int ret = _hurdsig_catch_memory_fault (args) ? -1 : 0;\t\t      \\\n+  if (ret == 0)\t\t\t\t\t\t\t\t      \\\n+    {\t\t\t\t\t\t\t\t\t      \\\n+      mach_msg_header_t *msg = args->msg;\t\t\t\t      \\\n+      *(msghdr) = msg;\t\t\t\t\t\t\t      \\\n       *(opt) = args->option;\t\t\t\t\t\t      \\\n       *(tmout) = args->timeout;\t\t\t\t\t\t      \\\n       *(rcvname) = args->rcv_name;\t\t\t\t\t      \\\n+      *(rcvsz) = args->rcv_size;\t\t\t\t\t      \\\n       _hurdsig_end_catch_fault ();\t\t\t\t\t      \\\n-      if (msg == 0)\t\t\t\t\t\t\t      \\\n+      if (msg != NULL)\t\t\t\t\t\t\t      \\\n \t{\t\t\t\t\t\t\t\t      \\\n-\t  *(send_name) = MACH_PORT_NULL;\t\t\t\t      \\\n-\t  *(msgid) = 0;\t\t\t\t\t\t\t      \\\n+\t  ret = _hurdsig_catch_memory_fault (msg) ? -1 : 0;\t\t      \\\n+\t  if (ret == 0)\t\t\t\t\t\t\t      \\\n+\t    {\t\t\t\t\t\t\t\t      \\\n+\t      /* Access memory at msg to ensure validity */\t\t      \\\n+\t      *((volatile mach_msg_id_t *) &msg->msgh_id) = msg->msgh_id;     \\\n+\t      _hurdsig_end_catch_fault ();\t\t\t\t      \\\n+\t    }\t\t\t\t\t\t\t\t      \\\n \t}\t\t\t\t\t\t\t\t      \\\n-      else\t\t\t\t\t\t\t\t      \\\n-\t{\t\t\t\t\t\t\t\t      \\\n-\t  if (_hurdsig_catch_memory_fault (msg))\t\t\t      \\\n-\t    return -1;\t\t\t\t\t\t\t      \\\n-\t  *(send_name) = msg->msgh_remote_port;\t\t\t\t      \\\n-\t  *(msgid) = msg->msgh_id;\t\t\t\t\t      \\\n-\t  _hurdsig_end_catch_fault ();\t\t\t\t\t      \\\n-\t}\t\t\t\t\t\t\t\t      \\\n-      0;\t\t\t\t\t\t\t\t      \\\n-    });\t\t\t\t\t\t\t\t\t      \\\n+    }\t\t\t\t\t\t\t\t\t      \\\n+    ret;\t\t\t\t\t\t\t\t      \\\n })\ndiff --git a/sysdeps/mach/hurd/x86_64/intr-msg.h b/sysdeps/mach/hurd/x86_64/intr-msg.h\nindex 82cc78eeb5..6f0ea90ded 100644\n--- a/sysdeps/mach/hurd/x86_64/intr-msg.h\n+++ b/sysdeps/mach/hurd/x86_64/intr-msg.h\n@@ -92,27 +92,24 @@\n \n \n /* This cannot be an inline function because it calls setjmp.  */\n-#define MSG_EXAMINE(state, msgid, rcvname, send_name, opt, tmout)\t      \\\n+#define MSG_EXAMINE(state, msghdr, rcvname, rcvsz, opt, tmout)  \t      \\\n ({\t\t\t\t\t\t\t\t\t      \\\n   int ret = 0;\t\t\t\t\t\t\t\t      \\\n   const struct machine_thread_state *s = (state);\t\t\t      \\\n-  const mach_msg_header_t *msg = (const void *) s->rdi;\t\t\t      \\\n+  mach_msg_header_t *msg = (void *) s->rdi;\t\t\t\t      \\\n+  *(msghdr) = msg;   \t\t\t\t\t\t\t      \\\n   *(rcvname) = s->r8;\t\t\t\t\t\t\t      \\\n   *(opt) = s->rsi;\t\t\t\t\t\t\t      \\\n   *(tmout) = s->r9;\t\t\t\t\t\t\t      \\\n-  if (msg == 0)\t\t\t\t\t\t\t\t      \\\n-    {\t\t\t\t\t\t\t\t\t      \\\n-      *(send_name) = MACH_PORT_NULL;\t\t\t\t\t      \\\n-      *(msgid) = 0;\t\t\t\t\t\t\t      \\\n-    }\t\t\t\t\t\t\t\t\t      \\\n-  else\t\t\t\t\t\t\t\t\t      \\\n+  *(rcvsz) = s->r10;\t\t\t\t\t\t\t      \\\n+  if (msg != NULL)\t\t\t\t\t\t\t      \\\n     {\t\t\t\t\t\t\t\t\t      \\\n       ret = _hurdsig_catch_memory_fault (msg) ? -1 : 0;\t\t\t      \\\n       if (ret == 0)\t\t\t\t\t\t\t      \\\n         {\t\t\t\t\t\t\t\t      \\\n-          *(send_name) = msg->msgh_remote_port;\t\t\t\t      \\\n-          *(msgid) = msg->msgh_id;\t\t\t\t\t      \\\n-          _hurdsig_end_catch_fault ();\t\t\t\t\t      \\\n+\t    /* Access memory at msg to ensure validity */\t\t      \\\n+\t    *((volatile mach_msg_id_t *) &msg->msgh_id) = msg->msgh_id;       \\\n+\t    _hurdsig_end_catch_fault ();\t\t\t\t      \\\n \t}\t\t\t\t\t\t\t\t      \\\n     }\t\t\t\t\t\t\t\t\t      \\\n   ret;\t\t\t\t\t\t\t\t\t      \\\n",
    "prefixes": [
        "hurd",
        "commited"
    ]
}