get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816365,
    "url": "http://patchwork.ozlabs.org/api/patches/816365/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170920162910.32053-7-sergey.senozhatsky@gmail.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20170920162910.32053-7-sergey.senozhatsky@gmail.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170920162910.32053-7-sergey.senozhatsky@gmail.com/",
    "date": "2017-09-20T16:29:08",
    "name": "[RFC,v2,6/7] symbol lookup: use new kernel and module dereference functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": false,
    "hash": "276bb54be9915d5755560fc73c8525bb943230c7",
    "submitter": {
        "id": 3905,
        "url": "http://patchwork.ozlabs.org/api/people/3905/?format=api",
        "name": "Sergey Senozhatsky",
        "email": "sergey.senozhatsky@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170920162910.32053-7-sergey.senozhatsky@gmail.com/mbox/",
    "series": [
        {
            "id": 4171,
            "url": "http://patchwork.ozlabs.org/api/series/4171/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=4171",
            "date": "2017-09-20T16:29:02",
            "name": "printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/4171/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816365/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816365/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xy5Cw5ffQz9t2Q\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 02:43:40 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xy5Cw47Q8zDqZx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 02:43:40 +1000 (AEST)",
            "from mail-pf0-x244.google.com (mail-pf0-x244.google.com\n\t[IPv6:2607:f8b0:400e:c00::244])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xy4w90jxBzDqXp\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tThu, 21 Sep 2017 02:30:01 +1000 (AEST)",
            "by mail-pf0-x244.google.com with SMTP id g65so1389011pfe.1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 20 Sep 2017 09:30:01 -0700 (PDT)",
            "from localhost.localdomain ([121.137.63.184])\n\tby smtp.gmail.com with ESMTPSA id\n\tc185sm8890567pfb.57.2017.09.20.09.29.54\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 09:29:58 -0700 (PDT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fltd/ZWD\"; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fltd/ZWD\"; dkim-atps=neutral",
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c00::244; helo=mail-pf0-x244.google.com;\n\tenvelope-from=sergey.senozhatsky@gmail.com; receiver=<UNKNOWN>)",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"fltd/ZWD\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=30RxeibIpppgxPJFamU/flTAJbbcbNLVZYc2OxGBx3k=;\n\tb=fltd/ZWDfFQgKDb39L6MufWzOXkvFpeHcYb5c4/fkoApb//tB0itZgkzPHvGW3Iev4\n\tgH3l84Hj8UbaHAZ3AwW6IZCjo3HDbnitfj2jj0SFc4QVZ9r3jCf5YcSvHzA35h30kjcq\n\tOESIQO2dW55h73rXNzLA2+JmfUi8C9iT+CwBJxtYL8HnIU9PhkgaUwzAhawfCPuO9GnO\n\tLG/B/8zGRUK73BF2W6nHvV77O2ij5UdNrhfFF1qN12QmgMLdE+M3Pe86o7j3+ijC1q5I\n\tENP2j/8gCzs673UrvA4MH5k8ULAt3hm5ulXbOx7CI4tFXi9/6H5pTLwtLB8DPlhTP60I\n\tAQjw==",
        "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=30RxeibIpppgxPJFamU/flTAJbbcbNLVZYc2OxGBx3k=;\n\tb=axocLr6vtRaMk5lRz6PWvpM8d9T3tvChwf1tjJidbgQ1q7/lNL7o+rXjvTVCOAxPqW\n\t4IUL7YTPZgrr/SIcs+zgEkT0Z3l573Nmm7iS4mwidncE0JFuwcUYNh8VHk0T178JKtNF\n\tMhsjZoYlDuYt1PPHuAmM/gRFkxG38qiGLuSG+sECXZMnwrFMwVT7lRHlMcI0Brn4vq1t\n\tItYHRVs06Ifjtp5jGctSV63+zLPKrGqr1tM3je/OUwRj7HcYUURAiYD9Z9gO0dJIAtb+\n\ttAPI7DReNaG8y+CAlF7wVvfL+tSq7CLB7UB19y+muSpf8KE8/PK6iqF321IPBqdjwvtE\n\tP0EQ==",
        "X-Gm-Message-State": "AHPjjUiIdP6bQq9EUCIyLylQIrammsz56hgetAz3WSs0YxS8OW/rkoUB\n\tolo8F1W9QjcgGJG69+VFW4E=",
        "X-Google-Smtp-Source": "AOwi7QAS/LY8NebR6RlNDYDehU4J8ng99i6q5cGaVpwzRrnUzZRHXAsLmOJEEx3YN67u1zQyFBzbew==",
        "X-Received": "by 10.84.216.21 with SMTP id m21mr2650982pli.273.1505924999357; \n\tWed, 20 Sep 2017 09:29:59 -0700 (PDT)",
        "From": "Sergey Senozhatsky <sergey.senozhatsky@gmail.com>",
        "To": "Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>,\n\tPaul Mackerras <paulus@samba.org>,\n\tMichael Ellerman <mpe@ellerman.id.au>, \n\tJames Bottomley <jejb@parisc-linux.org>, Helge Deller <deller@gmx.de>",
        "Subject": "[RFC][PATCH v2 6/7] symbol lookup: use new kernel and module\n\tdereference functions",
        "Date": "Thu, 21 Sep 2017 01:29:08 +0900",
        "Message-Id": "<20170920162910.32053-7-sergey.senozhatsky@gmail.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170920162910.32053-1-sergey.senozhatsky@gmail.com>",
        "References": "<20170920162910.32053-1-sergey.senozhatsky@gmail.com>",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "Petr Mladek <pmladek@suse.com>, linux-ia64@vger.kernel.org,\n\tlinux-parisc@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,\n\tSteven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org,\n\tSergey Senozhatsky <sergey.senozhatsky@gmail.com>,\n\tJessica Yu <jeyu@kernel.org>, Andrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Call appropriate function descriptor dereference ARCH callbacks:\n- dereference_kernel_function_descriptor() if the pointer is a\n  kernel symbol;\n\n- dereference_module_function_descriptor() if the pointer is a\n  module symbol.\n\nThis patch also removes dereference_function_descriptor() from\n'%pF/%pf' vsprintf handler, because it has the same behavior with\n'%pS/%ps' now.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\n---\n Documentation/printk-formats.txt | 15 +++++----------\n kernel/kallsyms.c                |  1 +\n kernel/module.c                  |  1 +\n lib/vsprintf.c                   |  5 +----\n 4 files changed, 8 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt\nindex 361789df51ec..b2afafc84638 100644\n--- a/Documentation/printk-formats.txt\n+++ b/Documentation/printk-formats.txt\n@@ -50,26 +50,23 @@ Symbols/Function Pointers\n \n ::\n \n+\t%pS\tversatile_init+0x0/0x110\n+\t%ps\tversatile_init\n \t%pF\tversatile_init+0x0/0x110\n \t%pf\tversatile_init\n-\t%pS\tversatile_init+0x0/0x110\n \t%pSR\tversatile_init+0x9/0x110\n \t\t(with __builtin_extract_return_addr() translation)\n-\t%ps\tversatile_init\n \t%pB\tprev_fn_of_versatile_init+0x88/0x88\n \n-The ``F`` and ``f`` specifiers are for printing function pointers,\n-for example, f->func, &gettimeofday. They have the same result as\n-``S`` and ``s`` specifiers. But they do an extra conversion on\n-ia64, ppc64 and parisc64 architectures where the function pointers\n-are actually function descriptors.\n-\n The ``S`` and ``s`` specifiers can be used for printing symbols\n from direct addresses, for example, __builtin_return_address(0),\n (void *)regs->ip. They result in the symbol name with (``S``) or\n without (``s``) offsets. If KALLSYMS are disabled then the symbol\n address is printed instead.\n \n+Note, that the ``F`` and ``f`` specifiers are identical to ``S`` (``s``)\n+and thus deprecated.\n+\n The ``B`` specifier results in the symbol name with offsets and should be\n used when printing stack backtraces. The specifier takes into\n consideration the effect of compiler optimisations which may occur\n@@ -77,8 +74,6 @@ when tail-call``s are used and marked with the noreturn GCC attribute.\n \n Examples::\n \n-\tprintk(\"Going to call: %pF\\n\", gettimeofday);\n-\tprintk(\"Going to call: %pF\\n\", p->func);\n \tprintk(\"%s: called from %pS\\n\", __func__, (void *)_RET_IP_);\n \tprintk(\"%s: called from %pS\\n\", __func__,\n \t\t\t\t(void *)__builtin_return_address(0));\ndiff --git a/kernel/kallsyms.c b/kernel/kallsyms.c\nindex 127e7cfafa55..e2fc09ea9509 100644\n--- a/kernel/kallsyms.c\n+++ b/kernel/kallsyms.c\n@@ -322,6 +322,7 @@ const char *kallsyms_lookup(unsigned long addr,\n \tif (is_ksym_addr(addr)) {\n \t\tunsigned long pos;\n \n+\t\taddr = dereference_kernel_function_descriptor(addr);\n \t\tpos = get_symbol_pos(addr, symbolsize, offset);\n \t\t/* Grab name */\n \t\tkallsyms_expand_symbol(get_symbol_offset(pos),\ndiff --git a/kernel/module.c b/kernel/module.c\nindex b792e814150a..63361de377ad 100644\n--- a/kernel/module.c\n+++ b/kernel/module.c\n@@ -3948,6 +3948,7 @@ const char *module_address_lookup(unsigned long addr,\n \tpreempt_disable();\n \tmod = __module_address(addr);\n \tif (mod) {\n+\t\taddr = dereference_module_function_descriptor(mod, addr);\n \t\tif (modname)\n \t\t\t*modname = mod->name;\n \t\tret = get_ksymbol(mod, addr, size, offset);\ndiff --git a/lib/vsprintf.c b/lib/vsprintf.c\nindex bcd906a39010..bf04b4f5d8e7 100644\n--- a/lib/vsprintf.c\n+++ b/lib/vsprintf.c\n@@ -40,7 +40,6 @@\n #include \"../mm/internal.h\"\t/* For the trace_print_flags arrays */\n \n #include <asm/page.h>\t\t/* for PAGE_SIZE */\n-#include <asm/sections.h>\t/* for dereference_function_descriptor() */\n #include <asm/byteorder.h>\t/* cpu_to_le16 */\n \n #include <linux/string_helpers.h>\n@@ -1721,10 +1720,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,\n \t}\n \n \tswitch (*fmt) {\n-\tcase 'F':\n+\tcase 'F': /* %pF and %pf are kept for compatibility reasons only */\n \tcase 'f':\n-\t\tptr = (void *)dereference_function_descriptor((unsigned long)ptr);\n-\t\t/* Fallthrough */\n \tcase 'S':\n \tcase 's':\n \tcase 'B':\n",
    "prefixes": [
        "RFC",
        "v2",
        "6/7"
    ]
}