Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1170216pxf; Fri, 19 Mar 2021 00:07:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlW79yp6Cw6eL2UQvBLpDeiipnm/XGKxu+flgQWJNKFbaVw5AMybogswh8Xu91urKORtoL X-Received: by 2002:a17:906:814b:: with SMTP id z11mr2679364ejw.290.1616137623329; Fri, 19 Mar 2021 00:07:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616137623; cv=none; d=google.com; s=arc-20160816; b=dn2tFYN3iSrR+7R2bOhVL7jtyN5ES9icL8HsyUSwHBq6nH0lmEMg8P7qmdaRffe+q6 TwlLYV570LgSoR1FoK5/SPBjIXIYupv5SuoJbyfA1PrlNVHwL1mBbpszfj+dxkce1sab 8wWjyVNvM6MaAscvTxnHIxcRkqxKj0qSxL8eOnJmbSTvvwe+8KNcUxgNYhOSDUEI//RM pTfJQ04U9sGb07o2nvy4cLZvDBmNIQLH8AGNsG0QlnmHUgc791ALnsBPHzibqhmp8z26 NiDxoynEH/oU9O5PH4PEpsQKKiTDmLmo3dBMUQ8W3VmCOPw3udjEC9e7t0/nI8Twb12l cGNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FPOK1V0xQBgz/LvuEDvlEdlMHvA8U+a3mNRXD1kRc/g=; b=fHz2DXRXsJznHts/n0w4SeEZmuBqUKycIKsq8PyOsFLabryceM83iwqIcAP1qEVG+v 5vpt+gRib/CZFTQgo38RsR4K2It9bfjquXwl4knihc7rWKWVXe2UR7Ia0i9ktdQIe93e VazuGJPMdU1RMlF0UKzAksTVgU7bEpgvHS7CENBhBrho3TspGrP7Hjx97ky4LQgmIqcF fSb8nqbuU7E/gd8qobToIi6M7L2rRHQVifGmsDdcpiJSGhbDU7fV6WFSIMYO4MrXpuY/ BT4buTadeRPP9MIjwtCrXWIdOcrvQ3c+mVY9M8Nkn3mVi65oO/bJ8kYNQrqPqoD8BqNB EzcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T30jMH3N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh28si3431378ejb.580.2021.03.19.00.06.40; Fri, 19 Mar 2021 00:07:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T30jMH3N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234120AbhCSHAo (ORCPT + 99 others); Fri, 19 Mar 2021 03:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234136AbhCSHAf (ORCPT ); Fri, 19 Mar 2021 03:00:35 -0400 Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 339F6C06174A for ; Fri, 19 Mar 2021 00:00:34 -0700 (PDT) Received: by mail-oo1-xc2d.google.com with SMTP id c12-20020a4ae24c0000b02901bad05f40e4so2054034oot.4 for ; Fri, 19 Mar 2021 00:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FPOK1V0xQBgz/LvuEDvlEdlMHvA8U+a3mNRXD1kRc/g=; b=T30jMH3NuD7ezkxsdYCLGtrzrz28ROF2x0krK025Nm5sFbRsJ4/TtMYqlhCExImOSU 42kMZFncvT6EQzsAb8Hs0GzYWDZePhDFrAOfPmltTYoGfjX4WBHEYvhq1NF9JmHxSr0t PQP4aDH23wR/wldGJDfAcLL/TFhzGnDuRNXEvlDZs1JrLQFCysPspVfutuTKOMfB+bOu NcgarfGoYXV8l62Nx6IM5CP2yv933KaZqYzmjpLel/nM+mtEMVeMB0Nha1BrFPNuTSp3 6bA+4PUorMGp2jDsIXGbV+n29KfTUgfoO2B6GAxqAPLpaFvFpIFe5yBzFHkeLPwL3KjC IaIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FPOK1V0xQBgz/LvuEDvlEdlMHvA8U+a3mNRXD1kRc/g=; b=fTKLeTrEORhyt+pHlKlWfDm1KlzwfWo7q93JWDXfdcKJ4Ecvw/bTaRqj84yQCtZGvE +JWcdIinc3pOfmqAgkrDx0zW2N/1RB3kuT1f+OkgFZKOCvjaVzvQBLs2FJwHgTerfQwJ I0WKiuudMZ/A0e0MivfafOYMqpeYDK5EDtoiiSzqB9ZUCsWDKhr4Yq0Tj4ZMjFrUjA+Z vlkuG4x/3AFcDfyzvooqADNwue+uZiZhQsUhE8WD/axN50pyAKGoKmQjFQ8jt2sMgyjb YOUrJ2qT+ur7YCipnsWsAV/dIcpgI2dqsMmwqBOT1+KNnJK/F/hBUIN02I6v/Rp89tHx r4Gg== X-Gm-Message-State: AOAM530kfhmkFMNE7dlAq/TcWtx7pOpuu3iv89RvbzRusoqpqY1digTD kixRESoPBB8M8q2PLlgq+HVGXIuZBnyx4h9WQsignOfiwrcziQ== X-Received: by 2002:a05:6820:3c8:: with SMTP id s8mr22284ooj.49.1616137233541; Fri, 19 Mar 2021 00:00:33 -0700 (PDT) MIME-Version: 1.0 References: <20210225090610.242623-1-allen.lkml@gmail.com> <20210225090610.242623-2-allen.lkml@gmail.com> <9a6c017c-d156-f939-f907-d6dfe83c41ac@linux.microsoft.com> In-Reply-To: <9a6c017c-d156-f939-f907-d6dfe83c41ac@linux.microsoft.com> From: Jens Wiklander Date: Fri, 19 Mar 2021 08:00:22 +0100 Message-ID: Subject: Re: [PATCH v2 1/2] optee: fix tee out of memory failure seen during kexec reboot To: Allen Pais Cc: Allen Pais , zajec5@gmail.com, bcm-kernel-feedback-list@broadcom.com, Linux ARM , Linux Kernel Mailing List , OP-TEE TrustedFirmware Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 2:21 PM Allen Pais wrote: > > > > >> > >> [ 0.368428] tee_bnxt_fw optee-clnt0: tee_shm_alloc failed > >> [ 0.368461] tee_bnxt_fw: probe of optee-clnt0 failed with error -22 > >> > >> tee_shm_release() is not invoked on dma shm buffer. > >> > >> Implement .shutdown() method to handle the release of the buffers > >> correctly. > >> > >> More info: > >> https://github.com/OP-TEE/optee_os/issues/3637 > >> > >> Signed-off-by: Allen Pais > >> --- > >> drivers/tee/optee/core.c | 20 ++++++++++++++++++++ > >> 1 file changed, 20 insertions(+) > > > > This looks good to me. Do you have a practical way of testing this on > > QEMU for instance? > > > > Jens, > > I could not reproduce nor create a setup using QEMU, I could only > do it on a real h/w. > > I have extensively tested the fix and I don't see any issues. I did a few test runs too, seems OK. Thanks, Jens