Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp377962rwl; Wed, 29 Mar 2023 03:16:47 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNAPOoRUQPSdqwJaeqnmUrXE4xblAV3MjgGsIHU2aCie9iHSXbBvWuLJQmAz/uk4PNd3QO X-Received: by 2002:a17:907:b60e:b0:93e:9fb9:183b with SMTP id vl14-20020a170907b60e00b0093e9fb9183bmr18529994ejc.73.1680085007323; Wed, 29 Mar 2023 03:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680085007; cv=none; d=google.com; s=arc-20160816; b=X4HNxUNFv33ZDWGVHl01bDrfnDaAjPahQXur/nDZgawocVVrNHVR23T+l9hIoAhlCi 9lKtuqB2x+Om+vUuQtQIijmY1XUAo2TKYxgfxrVdHO7n4OUJEmyHxI9kmNtewVAeLeDG vVysk9S0+QL5F5fLMaCCr3D/Jy7ethQXe2ya1LQgueSFgh54ItIzl/J+Co+g4gprNLRW gpUMxhm1WCxYPowEokR175wmzy4XkoHJTELCEiGEQsFWaamOy87e1oQIkDC54DGWHfuC J3GsWomqBAT99pmFVjnfvrFZPy1N2Qd4cWWDGTtqrZa+AGSdkvaWl5YjMhUoVx53MEGC +sZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ajUizX7gn3KHQ/zdD9oAqFu8WR+hLOJ5mu5nT7Q8EiU=; b=OopT0fOeasgXxSC1QWlWl4mQZSV67ChHwwNSDQZ2qnk8yir9AXL0ZneqbPEf6BGT4b 2YH1hekQzo080+mLDUF3nX+t3/GA/4rhFMj3qP+U4drJdwyZlrwTFKbIsyzwgAR2V3Fi pK2PO3Se3AEPpTTOjC4TMgOVm00oLD7nSCieD7tip8kSAJyLsA1BFWXZI1Vu8WTAHMpk AymtJ0zVCqnTJY/LMkAIdSyFvCSdTPRw2lWmuJlYHIMZZnHaL/m5XRFU+z0L64jY4KfV M9EBDu2OQQlhw7mGUH73wKmqQg5dChmEpLiTGOIZ5H+foRez+yZpW5QxVDIz67tNZGiq w/yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xzT3hnif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho13-20020a1709070e8d00b0093defbd6293si16223104ejc.1050.2023.03.29.03.16.23; Wed, 29 Mar 2023 03:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xzT3hnif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231124AbjC2KJt (ORCPT + 99 others); Wed, 29 Mar 2023 06:09:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbjC2KJs (ORCPT ); Wed, 29 Mar 2023 06:09:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5AAFDE; Wed, 29 Mar 2023 03:09:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3F0AC61C27; Wed, 29 Mar 2023 10:09:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2075AC433EF; Wed, 29 Mar 2023 10:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680084586; bh=w809a55v4vcQohpdyf5Egn5InyKp6z0v44dJrseoAoY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=xzT3hnifD7adIi9OAR9RZf/6fHxeVYu4gY84oA0vOZQxfuM1DBOKDFOY3VdCxB/r6 ZnRfn/LB6h85OxjEsZJusXaJd9lsqa6DCjEHEMCnm52vdB3N82vDHUQ2NvgojTR4PG bXWWLS6o7ZsBvzQL6HiIW/t0BOMSqZEsBFj2jACI= Date: Wed, 29 Mar 2023 12:09:44 +0200 From: Greg KH To: Srinivas Kandagatla Cc: Ekansh Gupta , linux-arm-msm@vger.kernel.org, ekangupt@qti.qualcomm.com, linux-kernel@vger.kernel.org, bkumar@qti.qualcomm.com, fastrpc.upstream@qti.qualcomm.com, stable Subject: Re: [PATCH v1] misc: fastrpc: Reassign memory ownership only for remote heap Message-ID: References: <1679394100-27119-1-git-send-email-quic_ekangupt@quicinc.com> <17185edd-aa6f-386b-4252-0c6eac1ddcfc@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17185edd-aa6f-386b-4252-0c6eac1ddcfc@linaro.org> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 21, 2023 at 08:53:33PM +0000, Srinivas Kandagatla wrote: > > > On 21/03/2023 10:21, Ekansh Gupta wrote: > > The userspace map request for remote heap allocates CMA memory. > > The ownership of this memory needs to be reassigned to proper > > owners to allow access from the protection domain running on > > DSP. This reassigning of ownership is not correct if done for > > any other supported flags. > > > > When any other flag is requested from userspace, fastrpc is > > trying to reassign the ownership of memory and this reassignment > > is getting skipped for remote heap request which is incorrect. > > Add proper flag check to reassign the memory only if remote heap > > is requested. > > > > Fixes: 532ad70c6d44 ("misc: fastrpc: Add mmap request assigning for static PD pool") > > Cc: stable > > Tested-by: Ekansh Gupta > > Signed-off-by: Ekansh Gupta > > Thanks for fixing this, without this fix the code inside if condition was a > dead code. > > > Reviewed-by: Srinivas Kandagatla Are you going to be collecting these and sending them on? If not, please do. thanks, greg k-h