get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816482,
    "url": "http://patchwork.ozlabs.org/api/patches/816482/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1505940337-79069-15-git-send-email-keescook@chromium.org/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1505940337-79069-15-git-send-email-keescook@chromium.org>",
    "list_archive_url": null,
    "date": "2017-09-20T20:45:20",
    "name": "[v3,14/31] vxfs: Define usercopy region in vxfs_inode slab cache",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "cd5ac57b738913a4db7d74ae57d011d9c57adc62",
    "submitter": {
        "id": 10641,
        "url": "http://patchwork.ozlabs.org/api/people/10641/?format=api",
        "name": "Kees Cook",
        "email": "keescook@chromium.org"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1505940337-79069-15-git-send-email-keescook@chromium.org/mbox/",
    "series": [
        {
            "id": 4231,
            "url": "http://patchwork.ozlabs.org/api/series/4231/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4231",
            "date": "2017-09-20T20:45:22",
            "name": "Hardened usercopy whitelisting",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/4231/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816482/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816482/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"EIV44FSh\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyBd006V9z9s4s\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 06:47:16 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752055AbdITUq5 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 20 Sep 2017 16:46:57 -0400",
            "from mail-pf0-f171.google.com ([209.85.192.171]:52811 \"EHLO\n\tmail-pf0-f171.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751826AbdITUqN (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 20 Sep 2017 16:46:13 -0400",
            "by mail-pf0-f171.google.com with SMTP id p87so2103722pfj.9\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 13:46:13 -0700 (PDT)",
            "from www.outflux.net\n\t(173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133])\n\tby smtp.gmail.com with ESMTPSA id\n\te20sm7966779pgn.68.2017.09.20.13.46.01\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 13:46:08 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=DaDd4yc4IlPMUJsl+NYmyankzTRdIIRePDn0+bmi6SI=;\n\tb=EIV44FSh0JNMu0OSL4SSmhdIAdzrg6tBPPOSx9szrlxeyYOuezsIvPLpV/PDQRyXla\n\tZ9mUc0NQZva8X3aFzj8K2NYaj9tBWL3f9nDwk1Y9CUZMd+KKc1QnUy/PuYsH9upJUjF4\n\t1mXfSG7z+9uysVqb885v9sW4sFLW9lCwt0mHg=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=DaDd4yc4IlPMUJsl+NYmyankzTRdIIRePDn0+bmi6SI=;\n\tb=fG8v5yFwfqAlAZ3f2nGN6Ly5VNBloGxq+DXvKcxLnfJ1e3klElwe5zG6Z17X1SPVvF\n\t2tPlGttMUiulLkmLt7h3ejRomVndOLsjn1PEQj27UrwU0Ux8Wa9yMlOVLze4L7JgY/d9\n\teQ+T/tzNgRuz31fNLM1lkgC93hDw7iEvVD7Tubn8liZRluS6UycJfubFaVi2EhE4noIh\n\tp35FgvmEwPtg5/hF6Ht9TKyRqRyxw//1DK6yHdU94JORgmCkvd5aOxh61xI8kQXaaaqP\n\tgEoHcg4Vvtqjs/BEA39Wt/gWEJH4QHrt+Vs9fNck9v26IyysPwL4hQO1VQXqCekg3YSn\n\tFJyg==",
        "X-Gm-Message-State": "AHPjjUjkwypp0P5Hr56Ne6rNYmzivIZLxQGP3gBQd2iPgX1ruPGrwfiA\n\tstdrysjAizRn8y8St464M+INjQ==",
        "X-Google-Smtp-Source": "AOwi7QBudTs6+9IokAgC0t94vW1UuTut8UTpOKHtxDrxTNGgs9P862/RfSJ9M5Sf09tj7XhRwV69ug==",
        "X-Received": "by 10.98.100.206 with SMTP id y197mr3424359pfb.53.1505940372688; \n\tWed, 20 Sep 2017 13:46:12 -0700 (PDT)",
        "From": "Kees Cook <keescook@chromium.org>",
        "To": "linux-kernel@vger.kernel.org",
        "Cc": "Kees Cook <keescook@chromium.org>, David Windsor <dave@nullcore.net>,\n\tChristoph Hellwig <hch@infradead.org>,\n\tlinux-fsdevel@vger.kernel.org, netdev@vger.kernel.org,\n\tlinux-mm@kvack.org, kernel-hardening@lists.openwall.com",
        "Subject": "[PATCH v3 14/31] vxfs: Define usercopy region in vxfs_inode slab\n\tcache",
        "Date": "Wed, 20 Sep 2017 13:45:20 -0700",
        "Message-Id": "<1505940337-79069-15-git-send-email-keescook@chromium.org>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1505940337-79069-1-git-send-email-keescook@chromium.org>",
        "References": "<1505940337-79069-1-git-send-email-keescook@chromium.org>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "From: David Windsor <dave@nullcore.net>\n\nvxfs symlink pathnames, stored in struct vxfs_inode_info field\nvii_immed.vi_immed and therefore contained in the vxfs_inode slab cache,\nneed to be copied to/from userspace.\n\ncache object allocation:\n    fs/freevxfs/vxfs_super.c:\n        vxfs_alloc_inode(...):\n            ...\n            vi = kmem_cache_alloc(vxfs_inode_cachep, GFP_KERNEL);\n            ...\n            return &vi->vfs_inode;\n\n    fs/freevxfs/vxfs_inode.c:\n        cxfs_iget(...):\n            ...\n            inode->i_link = vip->vii_immed.vi_immed;\n\nexample usage trace:\n    readlink_copy+0x43/0x70\n    vfs_readlink+0x62/0x110\n    SyS_readlinkat+0x100/0x130\n\n    fs/namei.c:\n        readlink_copy(..., link):\n            ...\n            copy_to_user(..., link, len);\n\n        (inlined in vfs_readlink)\n        generic_readlink(dentry, ...):\n            struct inode *inode = d_inode(dentry);\n            const char *link = inode->i_link;\n            ...\n            readlink_copy(..., link);\n\nIn support of usercopy hardening, this patch defines a region in the\nvxfs_inode slab cache in which userspace copy operations are allowed.\n\nThis region is known as the slab cache's usercopy region. Slab caches can\nnow check that each copy operation involving cache-managed memory falls\nentirely within the slab's usercopy region.\n\nThis patch is modified from Brad Spengler/PaX Team's PAX_USERCOPY\nwhitelisting code in the last public patch of grsecurity/PaX based on my\nunderstanding of the code. Changes or omissions from the original code are\nmine and don't reflect the original grsecurity/PaX code.\n\nSigned-off-by: David Windsor <dave@nullcore.net>\n[kees: adjust commit log, provide usage trace]\nCc: Christoph Hellwig <hch@infradead.org>\nSigned-off-by: Kees Cook <keescook@chromium.org>\n---\n fs/freevxfs/vxfs_super.c | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/fs/freevxfs/vxfs_super.c b/fs/freevxfs/vxfs_super.c\nindex 455ce5b77e9b..c143e18d5a65 100644\n--- a/fs/freevxfs/vxfs_super.c\n+++ b/fs/freevxfs/vxfs_super.c\n@@ -332,9 +332,13 @@ vxfs_init(void)\n {\n \tint rv;\n \n-\tvxfs_inode_cachep = kmem_cache_create(\"vxfs_inode\",\n+\tvxfs_inode_cachep = kmem_cache_create_usercopy(\"vxfs_inode\",\n \t\t\tsizeof(struct vxfs_inode_info), 0,\n-\t\t\tSLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);\n+\t\t\tSLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,\n+\t\t\toffsetof(struct vxfs_inode_info, vii_immed.vi_immed),\n+\t\t\tsizeof_field(struct vxfs_inode_info,\n+\t\t\t\tvii_immed.vi_immed),\n+\t\t\tNULL);\n \tif (!vxfs_inode_cachep)\n \t\treturn -ENOMEM;\n \trv = register_filesystem(&vxfs_fs_type);\n",
    "prefixes": [
        "v3",
        "14/31"
    ]
}