Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808048/?format=api
{ "id": 808048, "url": "http://patchwork.ozlabs.org/api/patches/808048/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/1504161961-12190-3-git-send-email-cclaudio@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": "<1504161961-12190-3-git-send-email-cclaudio@linux.vnet.ibm.com>", "list_archive_url": null, "date": "2017-08-31T06:45:50", "name": "[02/13] libstb/stb.c: change sb_verify() to use flash_lookup_resource_name()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "cb7a2dfb9ccf2581c4218dff73ed513cc5b96152", "submitter": { "id": 69305, "url": "http://patchwork.ozlabs.org/api/people/69305/?format=api", "name": "Claudio Carvalho", "email": "cclaudio@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/1504161961-12190-3-git-send-email-cclaudio@linux.vnet.ibm.com/mbox/", "series": [ { "id": 754, "url": "http://patchwork.ozlabs.org/api/series/754/?format=api", "web_url": "http://patchwork.ozlabs.org/project/skiboot/list/?series=754", "date": "2017-08-31T06:45:48", "name": "libstb: simplify the initialization of cvc drivers", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/754/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808048/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808048/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 [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 3xjXwT3PXyz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 16:46:49 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjXwT2SHqzDqTy\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 16:46:49 +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 3xjXvv0S7yzDqTy\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 16:46:18 +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\tv7V6hlxk028469\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 02:46:16 -0400", "from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cp99y05rk-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 02:46:16 -0400", "from localhost\n\tby e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <cclaudio@linux.vnet.ibm.com>;\n\tThu, 31 Aug 2017 00:46:14 -0600", "from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18)\n\tby e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 31 Aug 2017 00:46:13 -0600", "from b03ledav004.gho.boulder.ibm.com\n\t(b03ledav004.gho.boulder.ibm.com [9.17.130.235])\n\tby b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v7V6kCHK65208540\n\tfor <skiboot@lists.ozlabs.org>; Wed, 30 Aug 2017 23:46:12 -0700", "from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 7227978047\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 00:46:12 -0600 (MDT)", "from legolas.ibm.com (unknown [9.85.193.48])\n\tby b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id C83387804D\n\tfor <skiboot@lists.ozlabs.org>; Thu, 31 Aug 2017 00:46:11 -0600 (MDT)" ], "From": "Claudio Carvalho <cclaudio@linux.vnet.ibm.com>", "To": "skiboot@lists.ozlabs.org", "Date": "Thu, 31 Aug 2017 03:45:50 -0300", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504161961-12190-1-git-send-email-cclaudio@linux.vnet.ibm.com>", "References": "<1504161961-12190-1-git-send-email-cclaudio@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17083106-0020-0000-0000-00000CA41174", "X-IBM-SpamModules-Scores": "", "X-IBM-SpamModules-Versions": "BY=3.00007640; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000226; SDB=6.00910084; UDB=6.00456503;\n\tIPR=6.00690365; \n\tBA=6.00005562; 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.00016938;\n\tXFM=3.00000015; UTC=2017-08-31 06:46:14", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17083106-0021-0000-0000-00005DF099EC", "Message-Id": "<1504161961-12190-3-git-send-email-cclaudio@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-08-31_01:, , 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-1708310102", "Subject": "[Skiboot] [PATCH 02/13] libstb/stb.c: change sb_verify() to use\n\tflash_lookup_resource_name()", "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": "Secureboot verifies only containers stored in known partitions. With the\nflash_lookup_resource_name() function, the PNOR partition information\ndon't need to be duplicated in libstb for secureboot.\n\nThis replaces stb_resource_lookup() by flash_lookup_resource_name()\nin sb_verify().\n\nSigned-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>\n---\n libstb/stb.c | 23 ++++++++---------------\n 1 file changed, 8 insertions(+), 15 deletions(-)", "diff": "diff --git a/libstb/stb.c b/libstb/stb.c\nindex 41e6505..949f81c 100644\n--- a/libstb/stb.c\n+++ b/libstb/stb.c\n@@ -275,27 +275,20 @@ int tb_measure(enum resource_id id, void *buf, size_t len)\n \n int sb_verify(enum resource_id id, void *buf, size_t len)\n {\n-\tint r;\n-\tconst char *name = NULL;\n+\tconst char *name;\n \n \tif (!secure_mode) {\n \t\tprlog(PR_INFO, \"STB: %s skipped resource %d, \"\n \t\t \"secure_mode=0\\n\", __func__, id);\n \t\treturn STB_SECURE_MODE_DISABLED;\n \t}\n-\tr = stb_resource_lookup(id);\n-\tif (r == -1)\n-\t\t/**\n-\t\t * @fwts-label STBVerifyResourceNotMapped\n-\t\t * @fwts-advice Unregistered resources can be verified, but not\n-\t\t * measured. The resource should be registered in the\n-\t\t * resource_map[] array, otherwise the resource cannot be\n-\t\t * measured if trusted mode is on.\n-\t\t */\n-\t\tprlog(PR_WARNING, \"STB: verifying the non-expected \"\n-\t\t \"resource %d\\n\", id);\n-\telse\n-\t\tname = resource_map[r].name;\n+\n+\tname = flash_map_resource_name(id);\n+\tif (!name) {\n+\t\tprlog(PR_EMERG, \"STB: container NOT VERIFIED, \"\n+\t\t \"resource_id=%d unknown\\n\", id);\n+\t\tsb_enforce();\n+\t}\n \tif (!rom_driver || !rom_driver->verify) {\n \t\tprlog(PR_EMERG, \"STB: secure boot not initialized\\n\");\n \t\tsb_enforce();\n", "prefixes": [ "02/13" ] }