Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/804855/?format=api
{ "id": 804855, "url": "http://patchwork.ozlabs.org/api/patches/804855/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20170823072123.18769-8-stewart@linux.vnet.ibm.com/", "project": { "id": 44, "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api", "name": "skiboot firmware development", "link_name": "skiboot", "list_id": "skiboot.lists.ozlabs.org", "list_email": "skiboot@lists.ozlabs.org", "web_url": "http://github.com/open-power/skiboot", "scm_url": "http://github.com/open-power/skiboot", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170823072123.18769-8-stewart@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2017-08-23T07:21:17", "name": "[07/13] hdata/iohub: fix load of misaligned address for type 'long unsigned int', which requires 8 byte alignment", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d77aac276985f08f5295e39139dc04be66d4e3ee", "submitter": { "id": 48041, "url": "http://patchwork.ozlabs.org/api/people/48041/?format=api", "name": "Stewart Smith", "email": "stewart@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20170823072123.18769-8-stewart@linux.vnet.ibm.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/804855/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/804855/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "skiboot@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\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 3xcf7T5x6Rz9s3w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 17:24:21 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xcf7T471hzDrFM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 17:24:21 +1000 (AEST)", "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xcf4G5xDrzDqjB\n\tfor <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 17:21:34 +1000 (AEST)", "from pps.filterd (m0098399.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv7N7KEEH050218\n\tfor <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 03:21:32 -0400", "from e38.co.us.ibm.com (e38.co.us.ibm.com [32.97.110.159])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2ch1u1c9tc-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Wed, 23 Aug 2017 03:21:32 -0400", "from localhost\n\tby e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <stewart@linux.vnet.ibm.com>;\n\tWed, 23 Aug 2017 01:21:31 -0600", "from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17)\n\tby e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tWed, 23 Aug 2017 01:21:29 -0600", "from b03ledav005.gho.boulder.ibm.com\n\t(b03ledav005.gho.boulder.ibm.com [9.17.130.236])\n\tby b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7N7LSeC1835400; Wed, 23 Aug 2017 00:21:28 -0700", "from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id C1289BE042;\n\tWed, 23 Aug 2017 01:21:28 -0600 (MDT)", "from birb.localdomain (unknown [9.83.2.72])\n\tby b03ledav005.gho.boulder.ibm.com (Postfix) with SMTP id 2246CBE03A; \n\tWed, 23 Aug 2017 01:21:27 -0600 (MDT)", "by birb.localdomain (Postfix, from userid 1000)\n\tid 7344D332AFD; Wed, 23 Aug 2017 17:21:24 +1000 (AEST)" ], "From": "Stewart Smith <stewart@linux.vnet.ibm.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Wed, 23 Aug 2017 17:21:17 +1000", "X-Mailer": "git-send-email 2.13.5", "In-Reply-To": "<20170823072123.18769-1-stewart@linux.vnet.ibm.com>", "References": "<20170823072123.18769-1-stewart@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17082307-0028-0000-0000-0000083FED1D", "X-IBM-SpamModules-Scores": "", "X-IBM-SpamModules-Versions": "BY=3.00007595; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000223; SDB=6.00906370; UDB=6.00454276;\n\tIPR=6.00686572; \n\tBA=6.00005550; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016821;\n\tXFM=3.00000015; UTC=2017-08-23 07:21:30", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17082307-0029-0000-0000-000037426648", "Message-Id": "<20170823072123.18769-8-stewart@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-23_02:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1708230108", "Subject": "[Skiboot] [PATCH 07/13] hdata/iohub: fix load of misaligned address\n\tfor type 'long unsigned int', which requires 8 byte alignment", "X-BeenThere": "skiboot@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>", "List-Post": "<mailto:skiboot@lists.ozlabs.org>", "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org", "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>" }, "content": "UBSan caught this:\n\nhdata/test/../iohub.c:83:2: runtime error: load of misaligned address 0x7f1dc7b0210a for type 'long unsigned int', which requires 8 byte alignment\n0x7f1dc7b0210a: note: pointer points here\n 31 4c 58 08 31 00 04 01 00 30 00 42 50 46 02 00 00 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n ^\n #0 0x41470a in io_get_lx_info hdata/test/../iohub.c:83\n #1 0x41759f in io_add_p8_cec_vpd hdata/test/../iohub.c:450\n #2 0x417d35 in io_parse_fru hdata/test/../iohub.c:538\n #3 0x41812a in io_parse hdata/test/../iohub.c:600\n #4 0x425aa2 in parse_hdat hdata/test/../spira.c:1337\n #5 0x43d9f8 in main hdata/test/hdata_to_dt.c:358\n #6 0x7f1dcb868509 in __libc_start_main (/lib64/libc.so.6+0x20509)\n #7 0x4019e9 in _start (/home/stewart/skiboot/hdata/test/hdata_to_dt+0x4019e9)\n\nSigned-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>\n---\n hdata/iohub.c | 11 +++++++----\n 1 file changed, 7 insertions(+), 4 deletions(-)", "diff": "diff --git a/hdata/iohub.c b/hdata/iohub.c\nindex aecb64085faf..79a6b07bf6c9 100644\n--- a/hdata/iohub.c\n+++ b/hdata/iohub.c\n@@ -63,6 +63,7 @@ static bool io_get_lx_info(const void *kwvpd, unsigned int kwvpd_sz,\n {\n \tconst void *lxr;\n \tchar recname[5];\n+\tuint32_t lxrbuf[2] = { 0, 0 };\n \n \t/* Find LXRn, where n is the index passed in*/\n \tstrcpy(recname, \"LXR0\");\n@@ -80,16 +81,18 @@ static bool io_get_lx_info(const void *kwvpd, unsigned int kwvpd_sz,\n \t\treturn false;\n \t}\n \n-\tprlog(PR_DEBUG, \"CEC: LXRn=%d LXR=%016lx\\n\", lx_idx,\n-\t lxr ? *(unsigned long *)lxr : 0);\n+\tif (lxr)\n+\t\tmemcpy(lxrbuf, lxr, sizeof(uint32_t)*2);\n+\n+\tprlog(PR_DEBUG, \"CEC: LXRn=%d LXR=%08x%08x\\n\", lx_idx, lxrbuf[0], lxrbuf[1]);\n \tprlog(PR_DEBUG, \"CEC: LX Info added to %llx\\n\", (long long)hn);\n \n \t/* Add the LX info */\n \tif (!dt_has_node_property(hn, \"ibm,vpd-lx-info\", NULL)) {\n \t\tdt_add_property_cells(hn, \"ibm,vpd-lx-info\",\n \t\t\t\t lx_idx,\n-\t\t\t\t ((uint32_t *)lxr)[0],\n-\t\t\t\t ((uint32_t *)lxr)[1]);\n+\t\t\t\t lxrbuf[0],\n+\t\t\t\t lxrbuf[1]);\n \t}\n \n \treturn true;\n", "prefixes": [ "07/13" ] }