From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56170C433E0 for ; Thu, 25 Feb 2021 09:12:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0459A64EF1 for ; Thu, 25 Feb 2021 09:12:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235991AbhBYJLW (ORCPT ); Thu, 25 Feb 2021 04:11:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235115AbhBYJHJ (ORCPT ); Thu, 25 Feb 2021 04:07:09 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D066C06174A for ; Thu, 25 Feb 2021 01:06:29 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id d12so650439pfo.7 for ; Thu, 25 Feb 2021 01:06:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F5muCWgN/fGzSabg6nu22qD5L7/WjvegxAVZGCfyJ9k=; b=vFPuPp2EUaKif3CZORpg6Mxzi8IhrUS39Km0EEJlXlMGKIunU6DyAKENqHVJ5wY5QJ fy3gHdeEwZEpJm+q0ET+XS0eWiOSMFwOvUhWVBWs6bJ0SUsAM7vikUobEBptvzEG4rac JUAwDMfC1x7dN5lmOLibJU3RGcQC2Qq/W9HgIYWyW5PrqwEIHzU7r8vNhWGwH4SdtdtK l3TcbJOWpvPt+d9mkf35h+54o++Bunu93ccMqZrK0uKVDNTc/KlMKY1mhQpMPSKBzY9q Y4pT0P0Zt2BDjSsptaLwXjBlnsXQMKJ444zk13hiC91ExGS8HH240VP1IHHGPeGi7fwS 1OVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F5muCWgN/fGzSabg6nu22qD5L7/WjvegxAVZGCfyJ9k=; b=Z9wE/ahZuQJeI2mahaw6LURFsfmKZBVtXCHKQG2YgYwUZYYqMlvolZU9ZDcLNnBv3R Ppbl66lHcsmy2OqLk9X2Cq8Ki93Lc/mAdNKlbEKod8UYAu6958pSSNUfkmJ+V9L/KfgY W1FlPGnsm6PKNIyrOcxVHCMY/dV7kvexpVhExj/Ix8Gr4OBm+kn5nY6+oeTVAgWJgS9O 7TNB5ERL5agXUZI4W0jzzSiXUS1208WhAbA+dCqk95Er/HjnsXFyrpNkvqcDGPNxYsgs v1Ypn3bF24LW4OR/MNKhT7o7Th/s/QC/wX/IXANGMp0NeCRelCiSdQkkxDpNYy9YUclD a4Qw== X-Gm-Message-State: AOAM533b5ppE1dW9HKLjL/0cz/3o3PIl6JSKIcsLgUycZ0YzEXewJw/b bdQgoeJ3QAxG+cylqnIYcegYU5hRkqE= X-Google-Smtp-Source: ABdhPJxxKlnvUkRwVovj0EQzjIlbGw9+GL7e3aKG+Nl8FikH/LcgW3lZ03PGKqWjJqRJ74EuYmo8lA== X-Received: by 2002:a65:6a0c:: with SMTP id m12mr2096492pgu.161.1614243988891; Thu, 25 Feb 2021 01:06:28 -0800 (PST) Received: from localhost.localdomain ([49.207.194.79]) by smtp.gmail.com with ESMTPSA id n11sm5098373pgm.30.2021.02.25.01.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 01:06:28 -0800 (PST) From: Allen Pais To: jens.wiklander@linaro.org, zajec5@gmail.com Cc: bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, Allen Pais Subject: [PATCH v2 0/2] optee: fix OOM seen due to tee_shm_free() Date: Thu, 25 Feb 2021 14:36:08 +0530 Message-Id: <20210225090610.242623-1-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Allen Pais The following out of memory errors are seen on kexec reboot from the optee core. [ 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() in optee core as well as bnxt firmware driver to handle the release of the buffers correctly. More info: https://github.com/OP-TEE/optee_os/issues/3637 v2: keep the .shutdown() method simple. [Jens Wiklander] Allen Pais (2): optee: fix tee out of memory failure seen during kexec reboot firmware: tee_bnxt: implement shutdown method to handle kexec reboots drivers/firmware/broadcom/tee_bnxt_fw.c | 9 +++++++++ drivers/tee/optee/core.c | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AB8AC433E0 for ; Thu, 25 Feb 2021 09:07:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E08B064F14 for ; Thu, 25 Feb 2021 09:07:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E08B064F14 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=gpVhIAiI/XPlUirSSAXwCpbAzFHAeEAp+QmV6j20wko=; b=PaNDli+HJLBLjM2ceD6CDDhPwH jSklipeEm+qJwKEPMct/7Jx94wLZkOSyheGdTdZO8T4S+JpgypcUFLCj4owPUxdHu/oYod7zVLVa9 jyMmESJW7KTblk7gRtAEMLjD1ni3+hIbqG9yaBeO4hdBvsJJueLweO9Q7ZOgTVwAL2ling45cNq8y g6MclDG+kaL4vfMPaLtOmz3qRBBVxWeLaAEO/k/OSjL25eH9XA9Ey7pBUcEnHuCGnjJhulJAqAWOZ fWJTeSJOpypPP+Ep5SWVvT/P7bOclvta+43nrwjaayahfpXXS0n+PfslHvR/TPEa2TIixOfTYnBZi Jj4yKvHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFCbT-0003kL-AT; Thu, 25 Feb 2021 09:06:35 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lFCbQ-0003jY-QA for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2021 09:06:33 +0000 Received: by mail-pf1-x42c.google.com with SMTP id v200so3201537pfc.0 for ; Thu, 25 Feb 2021 01:06:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F5muCWgN/fGzSabg6nu22qD5L7/WjvegxAVZGCfyJ9k=; b=vFPuPp2EUaKif3CZORpg6Mxzi8IhrUS39Km0EEJlXlMGKIunU6DyAKENqHVJ5wY5QJ fy3gHdeEwZEpJm+q0ET+XS0eWiOSMFwOvUhWVBWs6bJ0SUsAM7vikUobEBptvzEG4rac JUAwDMfC1x7dN5lmOLibJU3RGcQC2Qq/W9HgIYWyW5PrqwEIHzU7r8vNhWGwH4SdtdtK l3TcbJOWpvPt+d9mkf35h+54o++Bunu93ccMqZrK0uKVDNTc/KlMKY1mhQpMPSKBzY9q Y4pT0P0Zt2BDjSsptaLwXjBlnsXQMKJ444zk13hiC91ExGS8HH240VP1IHHGPeGi7fwS 1OVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F5muCWgN/fGzSabg6nu22qD5L7/WjvegxAVZGCfyJ9k=; b=jyFr7iHWbiXg4v7+09WuTsNk7CqnK0Spp1nzo+HuHp4RpjWcckqeqBfVROZoRqH2wu Pg7zzPHViszExeYKytdeTj9CuuL4+PVzt8/Uhk4Ws3gghbiOtrBqEEyVQvN3H8ANj6hl fBHg15y8UKM0mTF+K80AqT6+FVyG8U1NLxiXgv44rQM3JbWFau7RgkBKOPuZLfWYGKQ9 W/bv0Ii+7OcyhFM7sNdRj0SrRSWR7tTbUk/Lsu143ez23B2U6omAhO9pjQXK7NHlYmiU X+CppMwjL9NEnBfXkmbL3rq0afKfPMQWureHyDD+vV6oOFBH6xtzdUjjtmhlkkkNgPdK RHuQ== X-Gm-Message-State: AOAM530HmrFNEpeEYdvxcMn5lImiVnv4nOofSTR5ml3mnxf1poAW2XY9 jSPz+jxMu7BpzDvIMtMmlfw= X-Google-Smtp-Source: ABdhPJxxKlnvUkRwVovj0EQzjIlbGw9+GL7e3aKG+Nl8FikH/LcgW3lZ03PGKqWjJqRJ74EuYmo8lA== X-Received: by 2002:a65:6a0c:: with SMTP id m12mr2096492pgu.161.1614243988891; Thu, 25 Feb 2021 01:06:28 -0800 (PST) Received: from localhost.localdomain ([49.207.194.79]) by smtp.gmail.com with ESMTPSA id n11sm5098373pgm.30.2021.02.25.01.06.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 01:06:28 -0800 (PST) From: Allen Pais To: jens.wiklander@linaro.org, zajec5@gmail.com Subject: [PATCH v2 0/2] optee: fix OOM seen due to tee_shm_free() Date: Thu, 25 Feb 2021 14:36:08 +0530 Message-Id: <20210225090610.242623-1-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210225_040632_906839_850835EF X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Allen Pais , op-tee@lists.trustedfirmware.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Allen Pais The following out of memory errors are seen on kexec reboot from the optee core. [ 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() in optee core as well as bnxt firmware driver to handle the release of the buffers correctly. More info: https://github.com/OP-TEE/optee_os/issues/3637 v2: keep the .shutdown() method simple. [Jens Wiklander] Allen Pais (2): optee: fix tee out of memory failure seen during kexec reboot firmware: tee_bnxt: implement shutdown method to handle kexec reboots drivers/firmware/broadcom/tee_bnxt_fw.c | 9 +++++++++ drivers/tee/optee/core.c | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel