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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 DE8E5C433E0 for ; Tue, 23 Feb 2021 08:21:04 +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 7BFA364DF3 for ; Tue, 23 Feb 2021 08:21:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BFA364DF3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K3g1pt0BuN4zUewkFEf2CFw0FLVDAzS1iYgQVDrj6eY=; b=z0BN0BZmniLNsiuxcNYAU/Teu +0l8VkKYMzRNktZfaDy7ujiTJ4I4yKQ7Nb81BffaeaxICXUAxagPUEvLXLJyKFQeCfL9GI9WvJDwe SRrwbeIb8AvnM54yWt/Mpvn7W+OtEnE9tXSFX+yIeEszgWjitM56nVGaHvFOVRgWbHUc3Yxd2nn6l MK9MTo0NMp3Sn3aIovnUqlatRYsq5wxRZh0qjBpslMWJoSq5oYEUOuSvtA5kzDoEKOO7I7hSTyuOF Cs96TPTA6ZozYSbGbFvZ27G9YzZS944j2rTpYpXreMkfZUPmZfzdKpxiEV8CTqqq3k7h72sERs421 4Vkof9Aww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lESvC-0007DY-R0; Tue, 23 Feb 2021 08:19:54 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lESvA-0007Ct-UI for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2021 08:19:54 +0000 Received: by mail-lj1-x22f.google.com with SMTP id g1so56118207ljj.13 for ; Tue, 23 Feb 2021 00:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ziKu9fCgZMMDJu51DNLFllZqOxNQ3wrYaiXyRSckVtY=; b=p/MGW4fux+raA1lacKYcNWVbXKqUFMqEe0TZK1tdZDrw65OmouBhYUWRNnbftp0AZ5 Z2xQeEZrpQ9wiZ7TIx/SaoVrxllrVkk7x3V9ISEnPEpAm92ZYAVQ5CyprTuHT1V3c7QS 6nx92MGt5IIOY1/tCVUk0z8+x8YwJjnSS72dWlM/2iV+v3TpjAiBrQIctSpFAeZasSjA tZXBl3P9/y8i+sLakv+sWS9V2afmWMt9OzmqjE8E3I3etPOFQOiG2SqSYyiIm/aT/BaO pdeQRVcay/Kq/i8h4WWePbUdBmnlflnKAWiqGRq6dm7u9B2oWHjhcBmK+wdjBD1mkitI o/ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ziKu9fCgZMMDJu51DNLFllZqOxNQ3wrYaiXyRSckVtY=; b=mrV0upNe49UC1XVJvLYABcZ1Kyja4h4/F2OHqikuXLlEZ/okDueZSi2mHABVlkrlWK aZMs/Kx9hpRFR27P/fVZbaRwOmngoc2QE3xJbiNgnAqgYUZv8WTQPnXlEBRyHW5rIlnd jnEFkJGAlGkXS0oJZeaW9fWBw+uPWWaxnFVAPlGT8FA1McNNw7nk0+C9ld5/eNS2i1b0 tEN/9+JTiw5Tj26g+3oWFQ9c9/DTqp4HSFdoxjxcBb7HoQL7nrED3eXRddVkQcdhwWzT 5KJapfJv87XO9vOrs5wAvKioiqdFedVij/p+X7fz4c452jvBiELMrVFySQDsTHWXxb51 rE4Q== X-Gm-Message-State: AOAM533wnY+U1uLNr6gcta8rgCR34DKJqaFqqrXmL7sAj157RwKWoSQb VVE/5/anh8U291IFASi0FmxKmg== X-Google-Smtp-Source: ABdhPJwJ9JpH7dAZolmZr9u0otMtqyysvc+TS7zWZCkH2j9OhjcmRyz/GZb6SqB2dv7txM9yYrb9JA== X-Received: by 2002:a2e:b051:: with SMTP id d17mr24922ljl.255.1614068390673; Tue, 23 Feb 2021 00:19:50 -0800 (PST) Received: from jade (h-249-223.A175.priv.bahnhof.se. [98.128.249.223]) by smtp.gmail.com with ESMTPSA id r16sm2474986lfr.223.2021.02.23.00.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Feb 2021 00:19:50 -0800 (PST) Date: Tue, 23 Feb 2021 09:19:48 +0100 From: Jens Wiklander To: Allen Pais Subject: Re: [PATCH 1/2] optee: fix tee out of memory failure seen during kexec reboot Message-ID: <20210223081948.GA1836717@jade> References: <20210217092714.121297-2-allen.lkml@gmail.com> <20210217092714.121297-2-allen.lkml@gmail.com> <8d87655f-27c6-6a66-6eb0-9244279fbf2c@linux.microsoft.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8d87655f-27c6-6a66-6eb0-9244279fbf2c@linux.microsoft.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210223_031953_049378_AB1DEF45 X-CRM114-Status: GOOD ( 17.15 ) 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: zajec5@gmail.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, op-tee@lists.trustedfirmware.org, bcm-kernel-feedback-list@broadcom.com, Dhananjay Phadke , allen.lkml@gmail.com, 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 On Mon, Feb 22, 2021 at 06:15:08PM +0530, Allen Pais wrote: > > > On Wed, 17 Feb 2021 14:57:12 +0530, Allen Pais wrote: > > > - /* > > > - * Ask OP-TEE to free all cached shared memory objects to decrease > > > - * reference counters and also avoid wild pointers in secure world > > > - * into the old shared memory range. > > > - */ > > > - optee_disable_shm_cache(optee); > > > + if (shutdown) { > > > + optee_disable_shm_cache(optee); > > > + } else { > > > + /* > > > + * Ask OP-TEE to free all cached shared memory > > > + * objects to decrease reference counters and > > > + * also avoid wild pointers in secure world > > > + * into the old shared memory range. > > > + */ > > > + optee_disable_shm_cache(optee); > > Calling optee_disable_shm_cache() in both if and else. It could be > > put in front of if(). > > > > Ideally, I could just use optee_remove for shutdown() too. > But it would not look good. Hence this approach. What is the problem with using optee_remove() for shutdown()? Cheers, Jens _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel