[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cbc963d5-6c4b-7e69-4a9b-3d66b95affab@linux.microsoft.com>
Date: Tue, 23 Feb 2021 21:56:13 +0530
From: Allen Pais <apais@...ux.microsoft.com>
To: Jens Wiklander <jens.wiklander@...aro.org>
Cc: Dhananjay Phadke <dphadke@...ux.microsoft.com>,
allen.lkml@...il.com, zajec5@...il.com,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
op-tee@...ts.trustedfirmware.org,
linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH 1/2] optee: fix tee out of memory failure seen during
kexec reboot
>>>> - /*
>>>> - * 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()?
>
There is no problem, I just thought it would be more cleaner/readable
with this approach. If you'd like to keep it simple by just calling
optee_remove() for shutdown() too, I could quickly send out V2.
Thanks for the review.
- Allen
Powered by blists - more mailing lists