Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/806186/?format=api
{ "id": 806186, "url": "http://patchwork.ozlabs.org/api/patches/806186/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20170826225444.7608-3-xypron.glpk@gmx.de/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170826225444.7608-3-xypron.glpk@gmx.de>", "list_archive_url": null, "date": "2017-08-26T22:54:43", "name": "[U-Boot,22/23] efi_loader: set parent handle in efi_load_image", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5931d403b3b6b9ec84c48c1a894e1e5f3289c608", "submitter": { "id": 61270, "url": "http://patchwork.ozlabs.org/api/people/61270/?format=api", "name": "Heinrich Schuchardt", "email": "xypron.glpk@gmx.de" }, "delegate": { "id": 3400, "url": "http://patchwork.ozlabs.org/api/users/3400/?format=api", "username": "agraf", "first_name": "Alexander", "last_name": "Graf", "email": "agraf@suse.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20170826225444.7608-3-xypron.glpk@gmx.de/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/806186/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/806186/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xftwZ1ZN9z9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 27 Aug 2017 09:07:42 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid D95A2C2224B; Sat, 26 Aug 2017 22:59:50 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 65138C221E3;\n\tSat, 26 Aug 2017 22:59:48 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 4C213C2218A; Sat, 26 Aug 2017 22:55:37 +0000 (UTC)", "from mout.gmx.net (mout.gmx.net [212.227.17.20])\n\tby lists.denx.de (Postfix) with ESMTPS id 396C0C221BB\n\tfor <u-boot@lists.denx.de>; Sat, 26 Aug 2017 22:55:37 +0000 (UTC)", "from localhost.localdomain ([84.118.154.110]) by mail.gmx.com\n\t(mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id\n\t0MSq5p-1dvG5d3U05-00RoBq; Sun, 27 Aug 2017 00:54:56 +0200" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-0.7 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable\n\tautolearn_force=no version=3.4.0", "From": "Heinrich Schuchardt <xypron.glpk@gmx.de>", "To": "Alexander Graf <agraf@suse.de>", "Date": "Sun, 27 Aug 2017 00:54:43 +0200", "Message-Id": "<20170826225444.7608-3-xypron.glpk@gmx.de>", "X-Mailer": "git-send-email 2.14.1", "In-Reply-To": "<20170826225444.7608-1-xypron.glpk@gmx.de>", "References": "<20170826225110.7381-1-xypron.glpk@gmx.de>\n\t<20170826225444.7608-1-xypron.glpk@gmx.de>", "X-Provags-ID": "V03:K0:waZ+xbieC518UTfqmAXUo1l+YYd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zfdo0epmfE8UDWnb60kEIqcTfYJ7\n\t2ew6AY9iPlJRXDNyk6QLElGs/1n6w==", "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>, u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH 22/23] efi_loader: set parent handle in\n\tefi_load_image", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "The parent_handle of the loaded image must be set.\nAdd the file path protocol from the provided parameter.\nSet system table.\nAdd parameter checks.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n lib/efi_loader/efi_boottime.c | 31 +++++++++++++++++++++++++++++--\n 1 file changed, 29 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c\nindex c5a17b6252..477809e4ca 100644\n--- a/lib/efi_loader/efi_boottime.c\n+++ b/lib/efi_loader/efi_boottime.c\n@@ -774,27 +774,54 @@ static efi_status_t EFIAPI efi_load_image(bool boot_policy,\n \t};\n \tstruct efi_loaded_image *info;\n \tstruct efi_object *obj;\n+\tefi_status_t r;\n \n \tEFI_ENTRY(\"%d, %p, %p, %p, %ld, %p\", boot_policy, parent_image,\n \t\t file_path, source_buffer, source_size, image_handle);\n+\n+\t/* We do not support loading by device path, yet. */\n+\tif (!source_buffer) {\n+\t\tr = EFI_NOT_FOUND;\n+\t\tgoto out;\n+\t}\n+\tif (!parent_image || !image_handle) {\n+\t\tr = EFI_INVALID_PARAMETER;\n+\t\tgoto out;\n+\t}\n+\n \tinfo = malloc(sizeof(*info));\n+\tif (!info) {\n+\t\tr = EFI_OUT_OF_RESOURCES;\n+\t\tgoto out;\n+\t}\n \tloaded_image_info_obj.protocols[0].protocol_interface = info;\n+\tloaded_image_info_obj.protocols[1].protocol_interface = file_path;\n \tobj = malloc(sizeof(loaded_image_info_obj));\n+\tif (!obj) {\n+\t\tfree(info);\n+\t\tr = EFI_OUT_OF_RESOURCES;\n+\t\tgoto out;\n+\t}\n \tmemset(info, 0, sizeof(*info));\n \tmemcpy(obj, &loaded_image_info_obj, sizeof(loaded_image_info_obj));\n \tobj->handle = info;\n+\tinfo->system_table = &systab;\n+\tinfo->parent_handle = parent_image;\n \tinfo->file_path = file_path;\n \tinfo->reserved = efi_load_pe(source_buffer, info);\n \tif (!info->reserved) {\n \t\tfree(info);\n \t\tfree(obj);\n-\t\treturn EFI_EXIT(EFI_UNSUPPORTED);\n+\t\tr = EFI_UNSUPPORTED;\n+\t\tgoto out;\n \t}\n \n \t*image_handle = info;\n \tlist_add_tail(&obj->link, &efi_obj_list);\n \n-\treturn EFI_EXIT(EFI_SUCCESS);\n+\tr = EFI_SUCCESS;\n+out:\n+\treturn EFI_EXIT(r);\n }\n \n static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,\n", "prefixes": [ "U-Boot", "22/23" ] }