From patchwork Fri May 11 10:09:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 911887 X-Patchwork-Delegate: agraf@suse.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40j5Tf029Hz9s16 for ; Fri, 11 May 2018 20:11:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 699C6C222DC; Fri, 11 May 2018 10:10:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2CC89C2233F; Fri, 11 May 2018 10:09:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E8D2CC22292; Fri, 11 May 2018 10:09:32 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lists.denx.de (Postfix) with ESMTPS id 853DBC21FA1 for ; Fri, 11 May 2018 10:09:32 +0000 (UTC) Received: from localhost.localdomain ([89.204.154.43]) by mail.gmx.com (mrgmx001 [212.227.17.184]) with ESMTPSA (Nemesis) id 0M1nbu-1eT5dJ0uSY-00tl0a; Fri, 11 May 2018 12:09:31 +0200 From: Heinrich Schuchardt To: Alexander Graf Date: Fri, 11 May 2018 12:09:21 +0200 Message-Id: <20180511100923.29659-3-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180511100923.29659-1-xypron.glpk@gmx.de> References: <20180511100923.29659-1-xypron.glpk@gmx.de> X-Provags-ID: V03:K1:0qDjS+0k7RnBuOB5yzeJlZmyMxu5d7z6aNRjYwcf+5IYFsGDM/o zGo+UqRJMURM+lP1PJczVEh1VkBq9IPO5zoSuAUzMjHVmWch+0prwU4aIjfNhQBRkIwdEYs vaEcOuoAV/xoXlDlP/+NLc6EDDy046ypUkIKp8dN6L/fSutAp52u0GDyXFBXyEODk0Iv67j tvPj/F//dEH3+u4A4xxYQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:/I6TsurDmb0=:xE4fynFUN+Q/RCh/XthGI0 0cruz/l1F7k8UTE+2SuByuCY1TccI4tOmHDvoTq/UejLs0baDQynDSekQ1h4ciJGRj4q/OYXt 6NA+pa/lduL6T4OSAA2WZQJ7YDJpNQTFugPTQKGfSJLrPCjQymf6lRFCsjHJ47cnb8Z8YBM+H k46CRZtOx0Afois56D9/qI4zsr0EpS3180txkaMMcmW6hennOIEPY9HOzFDgA5DArx8LxOBif PCTGnOhWzVu/ZoHijUbknP1AKXKTMphiLoIimMNFKHstxqbt3v93cITBRERGQl89wirDHtsWp BadQHy+pj2f8PC/QAevXezRif4bbHjGNJ7JMcY4gcGek/kaZ8ws/5KNoScOprpvXuCTqMyZi3 lzEdJ8ni/DxvGssGobvLt0ez6i3/gWecDi6piWtQn5XrvYHtLhuNP7PFnkEqgveo3UcbMDzDK iniYvL9RK799ZJ4Xffs2iGYgax7fXervCACbl5cuG6p8z0TkP5oYDfh50SWfvLfSpkPPHMOrP tDggmb7D5AGrA/Pn036TvsiVFVL4cgUi/ctukJ6J9ARzM39xFFqv2mt1xwswFpZW5lVttIZA3 OD8NZp/yqzeucoeO36MTeP6X/d2LneTf/o/GUcF1PhmGeWSRnc/wOGBrsdybfBTEeFLONW3MR V9/PEo3UDEjy67F/8js4vhJV2ZJrBImTnOcM9IHrKjKDSIxjBLE2Gq4CqYOc5q0NxlQPmAvLN svdfNPzazG4JV5U1xZ9rWUOdWsE3dnzT23KgkPbDi54XDGckOjuK7Vu47N4= Cc: Heinrich Schuchardt , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 2/4] efi_loader: check interface when uninstalling protocol X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The interface has to be checked in UninstallProtocolInterface. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 5e4089df621..bfaef29d3e6 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -494,6 +494,8 @@ efi_status_t efi_remove_protocol(const efi_handle_t handle, return ret; if (guidcmp(handler->guid, protocol)) return EFI_INVALID_PARAMETER; + if (handler->protocol_interface != protocol_interface) + return EFI_INVALID_PARAMETER; list_del(&handler->link); free(handler); return EFI_SUCCESS;