Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1846571pxb; Mon, 20 Sep 2021 06:42:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2Z78PlgOg1BlmJJi8SG4VUn6iQjVG6nEk8buklMYRG4mMgH9UGEq1NrvHR9PVmObnnLMR X-Received: by 2002:a17:906:16cd:: with SMTP id t13mr27938218ejd.140.1632145378573; Mon, 20 Sep 2021 06:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632145378; cv=none; d=google.com; s=arc-20160816; b=lIuNa9Y5cJ6TrTIoz5a5601nEbqtquDBmDca8iHcmwdDuP4nS13tgspLOy9hg2CObG qXOKBdUoks6wgqMRIQf8Mpvcfvat5lvIzSnllnMOjoKzAosCXnb0vra5vCQxpQzJZ3Ab de2rF+obkfG04JPMeKVsgrOo66sTcZdsIiU9yljwXXuBxC+J8xzNUzFZ/8+ZTi3FnuzS 0QEFp0JAyGStzS+D9btbj85yIuDXjHw+qfWt24xMUxV4gB4gEP4Dy2b1jEbKAOW1GwzY OWSP2HKzMFoOeGymiSKHQuubGaKdD5uP/gNNs7a+cvCYLhIYbZcQCjBE9PHyMm3ljCs4 +4wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=rArp1RA0/MIPIrJ9K0lLkQd4he/8EHpqu1s9srPsVr0=; b=brm1OpxD/kFY6q6I5u5U0PWgpm4GO2UPhse8735114xzXJTKgXOlYDHCisFlEu7jHq BA9ByuPu9tFIvuYn2Yx1mQ7SAUwrgzv4Tv81KxMz73HuT9MC5xN30x/Bi9LNk/ON1SaU q7aJ5raxisAl5fl3IHO23GujonZ2I69vvQQeFn8jjqfhaKGir7klry8IqCOrg9mFo2sD 25zio3uJfbhWi9oNb5fCTrRIunj0NrufcunewZEX13c4Zb9ZzR1xpst/LpzBpFJsrshE i6+8DdvB6Q241P5eIIf4EH/UfAneX3c+U0mQOngEhxc1pzUz06/ajkoShTJzb10fkJCF hwlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b="NJ/QdPax"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 9si6282134ejf.632.2021.09.20.06.42.32; Mon, 20 Sep 2021 06:42:58 -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=@mg.codeaurora.org header.s=smtp header.b="NJ/QdPax"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233955AbhITJc5 (ORCPT + 99 others); Mon, 20 Sep 2021 05:32:57 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:38501 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233719AbhITJc5 (ORCPT ); Mon, 20 Sep 2021 05:32:57 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1632130290; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=rArp1RA0/MIPIrJ9K0lLkQd4he/8EHpqu1s9srPsVr0=; b=NJ/QdPaxd9PmuyN+9KXYNseJMLgIrzjGq7twYJa+rRxA95EMtQnLOXejTio26tkOZ6AbBlBg BKuyZAicO5DUhP407th1Cfh2L7xSk/U5Ip6yXG2OkDdyXnLVPV+tJFzRxb9KFRm3Q0PZufsy c8D9Pnc9S5PfY+HV2ayNd8AzkmQ= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-east-1.postgun.com with SMTP id 614854dcec62f57c9a028217 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 20 Sep 2021 09:31:08 GMT Sender: jeyr=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1F469C4360C; Mon, 20 Sep 2021 09:31:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jeyr) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8547BC4338F; Mon, 20 Sep 2021 09:31:07 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 20 Sep 2021 15:01:07 +0530 From: jeyr@codeaurora.org To: Greg KH Cc: linux-arm-msm@vger.kernel.org, srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org, fastrpc.upstream@qti.qualcomm.com Subject: Re: [PATCH] misc: fastrpc: fix improper packet size calculation In-Reply-To: References: <1632125731-18768-1-git-send-email-jeyr@codeaurora.org> Message-ID: <6b3663fcadfdc5bc0cc82eedce533905@codeaurora.org> X-Sender: jeyr@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-09-20 14:38, Greg KH wrote: > On Mon, Sep 20, 2021 at 01:45:31PM +0530, Jeya R wrote: >> The buffer list is sorted and this is not being >> considered while calculating packet size. This >> would lead to improper copy length calculation >> for non-dmaheap buffers which would eventually >> cause sending improper buffers to DSP. > > You do have the full 72 columns to use :) Thanks, will update the commit message considering this. > >> >> Signed-off-by: Jeya R >> --- >> drivers/misc/fastrpc.c | 13 +++++++++---- >> 1 file changed, 9 insertions(+), 4 deletions(-) > > What commit does this fix? > > thanks, > > greg k-h Payload calculation function was modified to handle buffer overlapping calculation in this commit: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/misc/fastrpc.c?h=v5.15-rc2&id=25e8dfb83cda0a123bb1e091d6c3599cde050d76 Here during buffer overlap calculation, the buffer list is getting sorted. This needs to be considered during the calculation of payload size also by using unsorted buffer index "raix".