Cover Letter Detail
Show a cover letter.
GET /api/covers/814458/?format=api
{ "id": 814458, "url": "http://patchwork.ozlabs.org/api/covers/814458/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/cover/20170916035347.19705-1-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": "<20170916035347.19705-1-sergey.senozhatsky@gmail.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170916035347.19705-1-sergey.senozhatsky@gmail.com/", "date": "2017-09-16T03:53:42", "name": "[0/5,RFC] printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers", "submitter": { "id": 3905, "url": "http://patchwork.ozlabs.org/api/people/3905/?format=api", "name": "Sergey Senozhatsky", "email": "sergey.senozhatsky@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/cover/20170916035347.19705-1-sergey.senozhatsky@gmail.com/mbox/", "series": [ { "id": 3413, "url": "http://patchwork.ozlabs.org/api/series/3413/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3413", "date": "2017-09-16T03:53:42", "name": "printk/ia64/ppc64/parisc64: let's deprecate %pF/%pf printk specifiers", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/3413/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/814458/comments/", "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 3xvJTB38Ltz9t16\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 16 Sep 2017 14:00:30 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xvJTB1tJgzDrp7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 16 Sep 2017 14:00:30 +1000 (AEST)", "from mail-pg0-x241.google.com (mail-pg0-x241.google.com\n\t[IPv6:2607:f8b0:400e:c05::241])\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 3xvJR73YWfzDrcb\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 16 Sep 2017 13:58:43 +1000 (AEST)", "by mail-pg0-x241.google.com with SMTP id d8so2241083pgt.3\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 15 Sep 2017 20:58:43 -0700 (PDT)", "from localhost.localdomain ([121.137.63.184])\n\tby smtp.gmail.com with ESMTPSA id\n\t76sm4448230pfp.158.2017.09.15.20.58.34\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 20:58:39 -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=\"BPPEvoeE\"; 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=\"BPPEvoeE\"; dkim-atps=neutral", "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c05::241; helo=mail-pg0-x241.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=\"BPPEvoeE\"; 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;\n\tbh=3LyocXL/F+TnOW70AVWYu0vMw52S2BQRtenOiZmaFUE=;\n\tb=BPPEvoeEbD71A6Vocme8iK7KEnx2aG21JfA9WfPpns6uG336fIL2VtDefvNrfJuSqq\n\tsySH1VsiayiX5SC1kWZhoZ0KmzjjZyIXCoXc7MtahsF9By2gNs5Eum4ZaT3sWOSQ4z8Y\n\tWYaKh3fY/duHk6xMbu5xGE+qgrIjm+BQ7sFCfi6Z67W+e15/p1jiB1W3OgqbDv+RgJXY\n\t8uNA1bNZJQqdgM0HkllPwH1bi0rl9VBycqPtZFlfSRX6nqVju4PvmI9LSr4TUrhHyWqu\n\tOjIakNtPVK0wdbqJ9RrDO4xIaJFuT80D92A772jZ7QGObLCbak43z+HjddCtxQVLZpBh\n\tWqtg==", "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;\n\tbh=3LyocXL/F+TnOW70AVWYu0vMw52S2BQRtenOiZmaFUE=;\n\tb=rwr7Y3AF2f2u3rRdKRHzre8NH/Rh/88DBHoPzl6+aGhGYpvcjrFB+FiCGHbw2uYUBt\n\tTJWuH9qsOHWcRnhCfFimgEroiGeMoYyCq8X/rKnoJp1i47lsI1O5dcjipbxVwbXzNHHg\n\twxQR1grSb2pIgTcue0trPRwd/X5MoC9IGQamOQoqWsxAcd3OKA6qQYwXbq2xU3Yi+0da\n\tloRp/XB3BSXbkNfZBS/XjqIgGLPLW3FvxTceh92ZtqkQ+Ilu7n+qoYtkQ6EepXEg4cWi\n\tKv2CsMAqRTPzg02Yss638xCroA+ZHkeGaFNP2lvyDDVFsDMEIBr3bE6Mm2rTt2mRd3dI\n\tDNAw==", "X-Gm-Message-State": "AHPjjUiVksveZ3WN3cnptJh/PIDWZDp6HmoKup6XISKj0dYvKpStgfQE\n\tks1G1YQASqGW+w==", "X-Google-Smtp-Source": "ADKCNb4vXVwMTAEbadKPubgBafWLluhD1ExZywGikAtWtcmqORCwNhDL/tvc+4rlgIHaqQSwaVadyQ==", "X-Received": "by 10.98.15.208 with SMTP id 77mr26471621pfp.318.1505534320521; \n\tFri, 15 Sep 2017 20:58:40 -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\t\"James E . J . Bottomley\" <jejb@parisc-linux.org>,\n\tHelge Deller <deller@gmx.de>", "Subject": "[PATCH 0/5] [RFC] printk/ia64/ppc64/parisc64: let's deprecate\n\t%pF/%pf printk specifiers", "Date": "Sat, 16 Sep 2017 12:53:42 +0900", "Message-Id": "<20170916035347.19705-1-sergey.senozhatsky@gmail.com>", "X-Mailer": "git-send-email 2.14.1", "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": "Hello\n\n\tRFC\n\n\tOn some arches C function pointers are indirect and point to\na function descriptor, which contains the actual pointer to the code.\nThis mostly doesn't matter, except for cases when people want to print\nout function pointers in symbolic format, because the usual '%pS/%ps'\ndoes not work on those arches as expected. That's the reason why we\nhave '%pF/%pf', but since it's here because of a subtle ABI detail\nspecific to some arches (ppc64/ia64/parisc64) it's easy to misuse\n'%pF/%pf' and '%pS/%ps' (see [1], for example).\n\t\n\tThis patch set attempts to move ia64/ppc64/parisc64 C function\npointer ABI details out of printk() to arch code. Function dereference\ncode now checks if a pointer belongs to a .opd ELF section and dereferences\nthat pointer only if it does. The kernel and modules have their own .opd\nsections that's why I use two different ARCH functions: for kernel and\nfor module pointer dereference.\n\n\tI planned to remove dereference_function_descriptor() entirely,\nbut then I discovered a bunch other uses cases (kgdbts, init/main.c,\nextable, etc.), so I decided to keep dereference_function_descriptor()\naround because the main point of this patch set is to deprecate %pF/%pf.\nBut at the same time, I think I can go further and handle both kernel\nand module descriptor dereference in dereference_function_descriptor().\nWe need a module pointer for module .opd check, so that will come at an\nextra cost of module lookup (may be there will some other issues along\nthe way, haven't checked it).\n\nRight now we've got:\n\n- dereference_function_descriptor(addr)\n\ta generic (old) function. it simply attempts to dereference\n\twhatever pointer we give it.\n\n- dereference_kernel_function_descriptor(addr)\n\tdereferences a kernel pointer if it's within the kernel's .opd\n\tsection.\n\n- dereference_module_function_descriptor(module, addr)\n\tdereference a module pointer if it's within the module's .opd\n\tsection.\n\n\n*** A BIG NOTE ***\n\tI don't own ia64/ppc64/parisc64 hardware, so the patches are not\n\ttested. Sorry about that!\n\n\nAnother note:\n\tI need to check what is BPF symbol lookup and do we need to\n\tdo any dereference there.\n\n\n[1] https://marc.info/?l=linux-kernel&m=150472969730573\n\nSergey Senozhatsky (5):\n sections: split dereference_function_descriptor()\n ia64: Add .opd based function descriptor dereference\n powerpc64: Add .opd based function descriptor dereference\n parisc64: Add .opd based function descriptor dereference\n symbol lookup: use new kernel and module dereference functions\n\n Documentation/printk-formats.txt | 15 +++++----------\n arch/ia64/include/asm/sections.h | 14 +++++++++++++-\n arch/ia64/kernel/module.c | 13 +++++++++++++\n arch/ia64/kernel/vmlinux.lds.S | 2 ++\n arch/parisc/boot/compressed/vmlinux.lds.S | 2 ++\n arch/parisc/include/asm/sections.h | 3 +++\n arch/parisc/kernel/module.c | 14 ++++++++++++++\n arch/parisc/kernel/process.c | 10 ++++++++++\n arch/parisc/kernel/vmlinux.lds.S | 2 ++\n arch/powerpc/include/asm/module.h | 3 +++\n arch/powerpc/include/asm/sections.h | 13 +++++++++++++\n arch/powerpc/kernel/module_64.c | 16 ++++++++++++++++\n arch/powerpc/kernel/vmlinux.lds.S | 2 ++\n include/asm-generic/sections.h | 4 ++--\n include/linux/moduleloader.h | 4 ++++\n kernel/kallsyms.c | 1 +\n kernel/module.c | 7 +++++++\n lib/vsprintf.c | 5 +----\n 18 files changed, 113 insertions(+), 17 deletions(-)" }