get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1707740,
    "url": "http://patchwork.ozlabs.org/api/patches/1707740/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-um/patch/20221122100759.208290-5-benjamin@sipsolutions.net/",
    "project": {
        "id": 60,
        "url": "http://patchwork.ozlabs.org/api/projects/60/?format=api",
        "name": "User-mode Linux Development",
        "link_name": "linux-um",
        "list_id": "linux-um.lists.infradead.org",
        "list_email": "linux-um@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20221122100759.208290-5-benjamin@sipsolutions.net>",
    "list_archive_url": null,
    "date": "2022-11-22T10:07:35",
    "name": "[v2,04/28] um: Drop NULL check from start_userspace",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "23c313ddf7b920a09905579139dba87a8b63a15e",
    "submitter": {
        "id": 67525,
        "url": "http://patchwork.ozlabs.org/api/people/67525/?format=api",
        "name": "Benjamin Berg",
        "email": "benjamin@sipsolutions.net"
    },
    "delegate": {
        "id": 54851,
        "url": "http://patchwork.ozlabs.org/api/users/54851/?format=api",
        "username": "rw",
        "first_name": "Richard",
        "last_name": "Weinberger",
        "email": "richard@nod.at"
    },
    "mbox": "http://patchwork.ozlabs.org/project/linux-um/patch/20221122100759.208290-5-benjamin@sipsolutions.net/mbox/",
    "series": [
        {
            "id": 329466,
            "url": "http://patchwork.ozlabs.org/api/series/329466/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-um/list/?series=329466",
            "date": "2022-11-22T10:07:37",
            "name": "Implement SECCOMP based userland",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/329466/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1707740/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1707740/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=<UNKNOWN>)",
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WEvrNyU+;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=sipsolutions.net header.i=@sipsolutions.net\n header.a=rsa-sha256 header.s=mail header.b=hIdPrxeU;\n\tdkim-atps=neutral"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4NGg5Q0xZNz23nn\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 22 Nov 2022 21:11:21 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux))\n\tid 1oxQFF-007fsk-LS; Tue, 22 Nov 2022 10:11:13 +0000",
            "from s3.sipsolutions.net ([2a01:4f8:191:4433::2]\n helo=sipsolutions.net)\n\tby bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux))\n\tid 1oxQF0-007fex-Cp\n\tfor linux-um@lists.infradead.org; Tue, 22 Nov 2022 10:11:03 +0000",
            "by sipsolutions.net with esmtpsa\n (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim 4.96)\n\t(envelope-from <benjamin@sipsolutions.net>)\n\tid 1oxQEn-006IGn-0I;\n\tTue, 22 Nov 2022 11:10:45 +0100"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=KYTejbUBlcL5B4bhUiWERNq/tt6F5mLLmNK4lGx1jXs=; b=WEvrNyU+J49LpN\n\t01cIgTXSykPTwYwdKqIffuaavIjngnl7sfhVUxHX/gPlUtELFj8SWNH1cbhZ/LObWWiZrTinzfRlJ\n\trMgorfNyLzr2hphoYcdqMd/NYk4B2T4m5ii7rCjKSpqcF+1Yx9HbWnkaBt1MVAhdDyszWRgrFkQWJ\n\tMjvBD16m/aR+/3w8+7wsVsuFe0sc8M+hmSfJrWo1L+lGSKJobpbrske+w9yKZa5PQH6N8uYCfwKZc\n\t9fwZGJQ19DA1h09zjRF8o4e9bk+D8HRXf/nn8ph9hLNqjY4v/aZ6vq7IbQXLQ2NL5VP5cFaQ2KglF\n\t0CxjenPq2gee3c5w40sg==;",
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version:\n\tReferences:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender\n\t:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To:\n\tResent-Cc:Resent-Message-ID; bh=av462UGKtsinCGwk7vjoqMbYuXdvAp3qQw5EhZxOO5A=;\n\tt=1669111856; x=1670321456; b=hIdPrxeULpYRmECpQFpm3bJcoQnV41A+Dov6APCYxKrbe4l\n\tIk9zRQ4VEaFkG5yI2AxQRRdz5OnLSSytestWUtw4UBPt5X0IKKReEbmSA3cut46xzFvCpLd4JW91x\n\tIM6l4WGEBvH7fin8FfrLEGRsoeVvAif0h5c0wkEZoctrncyCJ0lBW4C1lS4RfWerEPJKwFxRI9igO\n\tGeKpEuWx1GP4xo+18pmgSMMyDomCMbg1JGf+wSQxyXWkMVJZoervQYZpZkzmNElKzLJ2wZ071sCSq\n\tdx4DZeB/uKTso3nOIK19KgnBw9ZwlAXGbgYUtoIpJLAEeR9gZ8VFNPMPxtY2DOSA==;"
        ],
        "From": "benjamin@sipsolutions.net",
        "To": "linux-um@lists.infradead.org",
        "Cc": "Benjamin Berg <benjamin@sipsolutions.net>",
        "Subject": "[PATCH v2 04/28] um: Drop NULL check from start_userspace",
        "Date": "Tue, 22 Nov 2022 11:07:35 +0100",
        "Message-Id": "<20221122100759.208290-5-benjamin@sipsolutions.net>",
        "X-Mailer": "git-send-email 2.38.1",
        "In-Reply-To": "<20221122100759.208290-1-benjamin@sipsolutions.net>",
        "References": "<20221122100759.208290-1-benjamin@sipsolutions.net>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20221122_021058_881595_4C7E6FC2 ",
        "X-CRM114-Status": "GOOD (  12.86  )",
        "X-Spam-Score": "-0.2 (/)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: Benjamin Berg <benjamin@sipsolutions.net>\n start_userspace\n    is only called from exactly one location, and the passed pointer for the\n   userspace process stack cannot be NULL. Remove the check, without changing\n    the control flow.\n Content analysis details:   (-0.2 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n                             author's domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily\n                             valid\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain",
        "X-BeenThere": "linux-um@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<linux-um.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-um/>",
        "List-Post": "<mailto:linux-um@lists.infradead.org>",
        "List-Help": "<mailto:linux-um-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-um\" <linux-um-bounces@lists.infradead.org>",
        "Errors-To": "linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "From: Benjamin Berg <benjamin@sipsolutions.net>\n\nstart_userspace is only called from exactly one location, and the passed\npointer for the userspace process stack cannot be NULL.\n\nRemove the check, without changing the control flow.\n\nSigned-off-by: Benjamin Berg <benjamin@sipsolutions.net>\n---\n arch/um/os-Linux/skas/process.c | 53 +++++++++++++++------------------\n 1 file changed, 24 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c\nindex 11278c30a82d..90db8add1231 100644\n--- a/arch/um/os-Linux/skas/process.c\n+++ b/arch/um/os-Linux/skas/process.c\n@@ -189,7 +189,7 @@ extern char __syscall_stub_start[];\n \n /**\n  * userspace_tramp() - userspace trampoline\n- * @stack:\tpointer to the new userspace stack page, can be NULL, if? FIXME:\n+ * @stack:\tpointer to the new userspace stack page\n  *\n  * The userspace trampoline is used to setup a new userspace process in start_userspace() after it was clone()'ed.\n  * This function will run on a temporary stack page.\n@@ -204,9 +204,13 @@ extern char __syscall_stub_start[];\n  */\n static int userspace_tramp(void *stack)\n {\n+\tstruct sigaction sa;\n \tvoid *addr;\n \tint fd;\n \tunsigned long long offset;\n+\tunsigned long segv_handler = STUB_CODE +\n+\t\t\t\t     (unsigned long) stub_segv_handler -\n+\t\t\t\t     (unsigned long) __syscall_stub_start;\n \n \tptrace(PTRACE_TRACEME, 0, 0, 0);\n \n@@ -222,34 +226,25 @@ static int userspace_tramp(void *stack)\n \t\texit(1);\n \t}\n \n-\tif (stack != NULL) {\n-\t\tfd = phys_mapping(uml_to_phys(stack), &offset);\n-\t\taddr = mmap((void *) STUB_DATA,\n-\t\t\t    UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,\n-\t\t\t    MAP_FIXED | MAP_SHARED, fd, offset);\n-\t\tif (addr == MAP_FAILED) {\n-\t\t\tprintk(UM_KERN_ERR \"mapping segfault stack at 0x%lx failed, errno = %d\\n\",\n-\t\t\t       STUB_DATA, errno);\n-\t\t\texit(1);\n-\t\t}\n+\tfd = phys_mapping(uml_to_phys(stack), &offset);\n+\taddr = mmap((void *) STUB_DATA,\n+\t\t    UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,\n+\t\t    MAP_FIXED | MAP_SHARED, fd, offset);\n+\tif (addr == MAP_FAILED) {\n+\t\tprintk(UM_KERN_ERR \"mapping segfault stack at 0x%lx failed, errno = %d\\n\",\n+\t\t       STUB_DATA, errno);\n+\t\texit(1);\n \t}\n-\tif (stack != NULL) {\n-\t\tstruct sigaction sa;\n-\n-\t\tunsigned long v = STUB_CODE +\n-\t\t\t\t  (unsigned long) stub_segv_handler -\n-\t\t\t\t  (unsigned long) __syscall_stub_start;\n-\n-\t\tset_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE);\n-\t\tsigemptyset(&sa.sa_mask);\n-\t\tsa.sa_flags = SA_ONSTACK | SA_NODEFER | SA_SIGINFO;\n-\t\tsa.sa_sigaction = (void *) v;\n-\t\tsa.sa_restorer = NULL;\n-\t\tif (sigaction(SIGSEGV, &sa, NULL) < 0) {\n-\t\t\tprintk(UM_KERN_ERR \"%s - setting SIGSEGV handler failed - errno = %d\\n\",\n-\t\t\t       __func__, errno);\n-\t\t\texit(1);\n-\t\t}\n+\n+\tset_sigstack((void *) STUB_DATA, UM_KERN_PAGE_SIZE);\n+\tsigemptyset(&sa.sa_mask);\n+\tsa.sa_flags = SA_ONSTACK | SA_NODEFER | SA_SIGINFO;\n+\tsa.sa_sigaction = (void *) segv_handler;\n+\tsa.sa_restorer = NULL;\n+\tif (sigaction(SIGSEGV, &sa, NULL) < 0) {\n+\t\tprintk(UM_KERN_ERR \"%s - setting SIGSEGV handler failed - errno = %d\\n\",\n+\t\t       __func__, errno);\n+\t\texit(1);\n \t}\n \n \tkill(os_getpid(), SIGSTOP);\n@@ -261,7 +256,7 @@ int kill_userspace_mm[NR_CPUS];\n \n /**\n  * start_userspace() - prepare a new userspace process\n- * @stub_stack:\tpointer to the stub stack. Can be NULL, if? FIXME:\n+ * @stub_stack:\tpointer to the stub stack.\n  *\n  * Setups a new temporary stack page that is used while userspace_tramp() runs\n  * Clones the kernel process into a new userspace process, with FDs only.\n",
    "prefixes": [
        "v2",
        "04/28"
    ]
}