get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2202502,
    "url": "http://patchwork.ozlabs.org/api/patches/2202502/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20260227183851.2113417-4-adhemerval.zanella@linaro.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": "<20260227183851.2113417-4-adhemerval.zanella@linaro.org>",
    "list_archive_url": null,
    "date": "2026-02-27T18:37:45",
    "name": "[v7,3/5] Use _dl_writev on __libc_message_impl",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ba68941090ba738154685aabd3dd1204df28a29c",
    "submitter": {
        "id": 66065,
        "url": "http://patchwork.ozlabs.org/api/people/66065/?format=api",
        "name": "Adhemerval Zanella",
        "email": "adhemerval.zanella@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20260227183851.2113417-4-adhemerval.zanella@linaro.org/mbox/",
    "series": [
        {
            "id": 493795,
            "url": "http://patchwork.ozlabs.org/api/series/493795/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=493795",
            "date": "2026-02-27T18:37:42",
            "name": "elf: Allow RPATH/RUNPATH for static-pie (BZ 33326)",
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/493795/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2202502/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2202502/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\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=vfn4Dvqh;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org\n (client-ip=38.145.34.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\tdkim=pass (2048-bit key,\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=vfn4Dvqh",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=linaro.org",
            "sourceware.org; spf=pass smtp.mailfrom=linaro.org",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=2607:f8b0:4864:20::934"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4fMxvg0ydBz1xxV\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Feb 2026 05:39:59 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 11BC74B9DB61\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Feb 2026 18:39:57 +0000 (GMT)",
            "from mail-ua1-x934.google.com (mail-ua1-x934.google.com\n [IPv6:2607:f8b0:4864:20::934])\n by sourceware.org (Postfix) with ESMTPS id 8A7214BA23FF\n for <libc-alpha@sourceware.org>; Fri, 27 Feb 2026 18:39:05 +0000 (GMT)",
            "by mail-ua1-x934.google.com with SMTP id\n a1e0cc1a2514c-94b07fddecbso1478953241.1\n for <libc-alpha@sourceware.org>; Fri, 27 Feb 2026 10:39:05 -0800 (PST)",
            "from ubuntu-vm.. ([191.54.27.153]) by smtp.gmail.com with ESMTPSA id\n ada2fe7eead31-5ff1ea6ea19sm6283369137.12.2026.02.27.10.39.02\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 27 Feb 2026 10:39:03 -0800 (PST)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 11BC74B9DB61",
            "OpenDKIM Filter v2.11.0 sourceware.org 8A7214BA23FF"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 8A7214BA23FF",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 8A7214BA23FF",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1772217545; cv=none;\n b=hlQU8NPwKbj0wmKdGp+E8phqs6Dx8QihACeckrn1g2UmAB7thE6a2fyKTmPH9qkRqD0r78H/o7JFlbkQAICBEIykJZz/Pc1QkqAdoBfRqlM8hOo9BjOdEf7q/JvAD4OO/witen9d6Oaxipt/ZMuSONEvFPmq2Y/o2xShpKv/GLg=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1772217545; c=relaxed/simple;\n bh=QAfxGXvxePAZKAEdFJR2ddWLYOQrH62cyFj3y6rd/bU=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=ABV0wAgmz7B3bvpSQt2qNqsHo54Id8Ry8u90klcZv0kQejkyub32Poy2Yy4SXhtHZBy+fVeK4UKuNf/GHX6YjQglTC+9dNvvJKiaUfJjc1nHjVoIjeftr/pkR73D4EUGt/58GlUk7x7zV5adoSgDvVwhPvkTKFWXKGOSomymN/U=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1772217544; x=1772822344; darn=sourceware.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=gPwpKfxM7s3snpZFFuAp0zWNRAdOBfbKZca7h29wtTw=;\n b=vfn4DvqhnX0LdJlIH8xr+pGD2uga11lA4xYBfGbrob2Kgr4vQVlA1SFSlqPf6sx6rM\n M6+4LEJ9PAb9KZexqqSH4V6DRtFq83pcxY7F/CLyjrVit0RTuDiylH1RPgKqtJH+mkAL\n GwT4rNJLiXPfj4dRfTzcV7d7yOKcWZwttnZZTFTjuqqbRrzFtXQkx3tXTCQkzZ/90kAd\n Qg9JZ1wEN2kXJ+ACdo2Amguz826/rfkMLP+VBq7CmcM3sZZxhzsoD/vr6e4IVzL7OiXF\n gdc1rx/4+F04FfQNe6syJpepvmWsseEUIBHily+OJKqsusk4rR9XTzazMGUiCSC1geaE\n ZIRg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1772217544; x=1772822344;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=gPwpKfxM7s3snpZFFuAp0zWNRAdOBfbKZca7h29wtTw=;\n b=FGPBpZ/VrfyGTGhKSEGqlACDzEj4ldUgTPdtcWHcaql8AX4zo+Wih9GCyuHQSBqoGY\n FFhjUp5xi+uJrPZPYIoIqAoykZEAu8AVeAFC9HQMXKxWfy58TQHiU27Vo/bfQ0FzaRZV\n ysVUsNOd3E9o7POzjGYP77x/Noqo4f9hfioCq5k+RzjZOW+VJXuIxACpESMPnK412PJX\n iWjYUGnu36z2OKHy0FR4WuD/zuFAYtlfhWwbeAcXztis5SzUCUQQu5biBPdf5tLUdk+g\n xNrmbETnDr6xcvMEgzslzrBpj/cA+iexv/Ijp9WvnhNQIwWCbpiD6QNTuFGO9674M5/w\n 1vJw==",
        "X-Gm-Message-State": "AOJu0YyoesM78CfHBgV60jXD59GIOOxi2Tad/dE6wmcZ8DOPGbIsko3k\n StgZ5+qT0IT2bMOpZYAePxBD3CtaCyxFQ8BG2kUmJF5VwhJ4pSleffJqVjNnJjJHAnqqH9UErmE\n BrQk8",
        "X-Gm-Gg": "ATEYQzzSODrjf95/STPt1mfbnjJcYAHNGGU6xe9TKeG/wO4WCBOibxYUIsQtm+kENrJ\n k2MiZcs5mqyyMDWxuima/b9rAlAQLpHHXjgJYbkODuKQP4Gd+9h3n5nQkgDSaPbKHzLN0rod12U\n Cl97xV89PXeAgQReN53epzJCvczKaBY8MR1zGvo1xp3DE6g0M0tXSOE7RjzYFvNY99E2jXDnFw2\n tDsjlqvF+cC+H49Wgwl6cvZyJgo3Nk+YPxRcjJQK6PyIrRAvfYlYW4Z5N9zQrRRBMOxT/5sNYvE\n OYBGroOoAeak61/NfeXO6Rm4oBycqLzzMVmwtXDMCm8tAnxBF8w8XOBX6r7dA7eEjVvl2CQw5Q+\n 6r8ZXVRiBSs6w69Ii0D0+nGOrW3Izjzt8CmcylARyDG4gkS7NwWTmfr1rG5fSB0/+xJp6+KEcpJ\n VebuA64xWU2voHv4Wle9Yi1372uPmxjfhfNFO962Ekh6yXsg==",
        "X-Received": "by 2002:a05:6102:3ec9:b0:5e5:6360:1f60 with SMTP id\n ada2fe7eead31-5ff3258b948mr2370847137.41.1772217544416;\n Fri, 27 Feb 2026 10:39:04 -0800 (PST)",
        "From": "Adhemerval Zanella <adhemerval.zanella@linaro.org>",
        "To": "libc-alpha@sourceware.org",
        "Cc": "Florian Weimer <fweimer@redhat.com>",
        "Subject": "[PATCH v7 3/5] Use _dl_writev on __libc_message_impl",
        "Date": "Fri, 27 Feb 2026 18:37:45 +0000",
        "Message-ID": "<20260227183851.2113417-4-adhemerval.zanella@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260227183851.2113417-1-adhemerval.zanella@linaro.org>",
        "References": "<20260227183851.2113417-1-adhemerval.zanella@linaro.org>",
        "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": "And change _dl_writev to return a negative errno in case of failure.\nThis keeps the required semantics for not setting errno on failure\nand allows removing the Linux libc_fatal.c implementation.\n\nIt also makes it simple to use the writev syscall during process\nstartup, especially on i386, where it requires disabling vDSO.\n\nChecked on x86_64-linux-gnu and i686-linux-gnu.\nReviewed-by: Florian Weimer <fweimer@redhat.com>\n---\n {elf => sysdeps/generic}/dl-writev.h | 18 +++++++-------\n sysdeps/posix/libc_fatal.c           | 15 ++++++------\n sysdeps/unix/sysv/linux/dl-writev.h  | 12 ++++------\n sysdeps/unix/sysv/linux/libc_fatal.c | 36 ----------------------------\n 4 files changed, 20 insertions(+), 61 deletions(-)\n rename {elf => sysdeps/generic}/dl-writev.h (80%)\n delete mode 100644 sysdeps/unix/sysv/linux/libc_fatal.c",
    "diff": "diff --git a/elf/dl-writev.h b/sysdeps/generic/dl-writev.h\nsimilarity index 80%\nrename from elf/dl-writev.h\nrename to sysdeps/generic/dl-writev.h\nindex a235942605..024b780bf2 100644\n--- a/elf/dl-writev.h\n+++ b/sysdeps/generic/dl-writev.h\n@@ -20,37 +20,35 @@\n #include <ldsodefs.h>\n #include <libc-lock.h>\n \n-/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf.\n-   Hence it's in a header with the expectation it will be inlined.\n-\n-   This is writev, but with a constraint added and others loosened:\n+/* This is writev, but with a constraint added and others loosened:\n \n    1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno\n       when another thread holds the dl_load_lock.\n-   2. It is not obliged to detect and report errors at all.\n-   3. It's not really obliged to deliver a single atomic write\n+   2. It's not really obliged to deliver a single atomic write\n       (though it may be preferable).  */\n \n-static inline void\n+static inline ssize_t\n _dl_writev (int fd, const struct iovec *iov, size_t niov)\n {\n   /* Note that if __writev is an implementation that calls malloc,\n      this will cause linking problems building the dynamic linker.  */\n \n+  ssize_t r;\n #if RTLD_PRIVATE_ERRNO\n   /* We have to take this lock just to be sure we don't clobber the private\n      errno when it's being used by another thread that cares about it.\n      Yet we must be sure not to try calling the lock functions before\n      the thread library is fully initialized.  */\n   if (__glibc_unlikely (_dl_starting_up))\n-    __writev (fd, iov, niov);\n+    _r = _writev (fd, iov, niov);\n   else\n     {\n       __rtld_lock_lock_recursive (GL(dl_load_lock));\n-      __writev (fd, iov, niov);\n+      r = __writev (fd, iov, niov);\n       __rtld_lock_unlock_recursive (GL(dl_load_lock));\n     }\n #else\n-  __writev (fd, iov, niov);\n+  r = __writev (fd, iov, niov);\n #endif\n+  return r == -1 ? -errno : r;\n }\ndiff --git a/sysdeps/posix/libc_fatal.c b/sysdeps/posix/libc_fatal.c\nindex 4f11315c2a..3f0e302b5e 100644\n--- a/sysdeps/posix/libc_fatal.c\n+++ b/sysdeps/posix/libc_fatal.c\n@@ -16,6 +16,7 @@\n    License along with the GNU C Library; if not, see\n    <https://www.gnu.org/licenses/>.  */\n \n+#include <dl-writev.h>\n #include <assert.h>\n #include <ldsodefs.h>\n #include <setvmaname.h>\n@@ -28,14 +29,14 @@\n #include FATAL_PREPARE_INCLUDE\n #endif\n \n-#ifndef WRITEV_FOR_FATAL\n-# define WRITEV_FOR_FATAL\twritev_for_fatal\n-static bool\n-writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)\n+static void\n+writev_for_fatal (int fd, const struct iovec *iov, size_t niov)\n {\n-  return TEMP_FAILURE_RETRY (__writev (fd, iov, niov)) == total;\n+  ssize_t cnt;\n+  do\n+    cnt = _dl_writev (fd, iov, niov);\n+  while (cnt == -EINTR);\n }\n-#endif\n \n /* At most a substring before each conversion specification and the\n    trailing substring (the plus one).  */\n@@ -108,7 +109,7 @@ __libc_message_impl (const char *vma_name, const char *fmt, ...)\n \n   if (iovcnt > 0)\n     {\n-      WRITEV_FOR_FATAL (fd, iov, iovcnt, total);\n+      writev_for_fatal (fd, iov, iovcnt);\n \n       total = ALIGN_UP (total + sizeof (struct abort_msg_s) + 1,\n \t\t\tGLRO(dl_pagesize));\ndiff --git a/sysdeps/unix/sysv/linux/dl-writev.h b/sysdeps/unix/sysv/linux/dl-writev.h\nindex 89f69f8ab1..ceb98a35e6 100644\n--- a/sysdeps/unix/sysv/linux/dl-writev.h\n+++ b/sysdeps/unix/sysv/linux/dl-writev.h\n@@ -19,19 +19,15 @@\n #include <sys/uio.h>\n #include <sysdep.h>\n \n-/* This is used from only one place: dl-misc.c:_dl_debug_vdprintf.\n-   Hence it's in a header with the expectation it will be inlined.\n-\n-   This is writev, but with a constraint added and others loosened:\n+/* This is writev, but with a constraint added and others loosened:\n \n    1. Under RTLD_PRIVATE_ERRNO, it must not clobber the private errno\n       when another thread holds the dl_load_lock.\n-   2. It is not obliged to detect and report errors at all.\n-   3. It's not really obliged to deliver a single atomic write\n+   2. It's not really obliged to deliver a single atomic write\n       (though it may be preferable).  */\n \n-static inline void\n+static inline ssize_t\n _dl_writev (int fd, const struct iovec *iov, size_t niov)\n {\n-  INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);\n+  return INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);\n }\ndiff --git a/sysdeps/unix/sysv/linux/libc_fatal.c b/sysdeps/unix/sysv/linux/libc_fatal.c\ndeleted file mode 100644\nindex 120cdffaf9..0000000000\n--- a/sysdeps/unix/sysv/linux/libc_fatal.c\n+++ /dev/null\n@@ -1,36 +0,0 @@\n-/* Catastrophic failure reports.  Linux version.\n-   Copyright (C) 1993-2026 Free Software Foundation, Inc.\n-   This file is part of the GNU C Library.\n-\n-   The GNU C Library is free software; you can redistribute it and/or\n-   modify it under the terms of the GNU Lesser General Public\n-   License as published by the Free Software Foundation; either\n-   version 2.1 of the License, or (at your option) any later version.\n-\n-   The GNU C Library is distributed in the hope that it will be useful,\n-   but WITHOUT ANY WARRANTY; without even the implied warranty of\n-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n-   Lesser General Public License for more details.\n-\n-   You should have received a copy of the GNU Lesser General Public\n-   License along with the GNU C Library; if not, see\n-   <https://www.gnu.org/licenses/>.  */\n-\n-#include <errno.h>\n-#include <sys/uio.h>\n-#include <stdbool.h>\n-#include <sysdep.h>\n-\n-static bool\n-writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)\n-{\n-  ssize_t cnt;\n-  do\n-    cnt = INTERNAL_SYSCALL_CALL (writev, fd, iov, niov);\n-  while (INTERNAL_SYSCALL_ERROR_P (cnt)\n-         && INTERNAL_SYSCALL_ERRNO (cnt) == EINTR);\n-  return cnt == total;\n-}\n-#define WRITEV_FOR_FATAL\twritev_for_fatal\n-\n-#include <sysdeps/posix/libc_fatal.c>\n",
    "prefixes": [
        "v7",
        "3/5"
    ]
}