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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 440CBC05027 for ; Fri, 10 Feb 2023 06:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AtXgQS2jSoMzOXc5LKoHCiXSmPtEszQJolR3oYKVw1A=; b=T4FcJ5WMcsci6w sA5qYzkKrJ3qp1xK6zOmwe2hZ4gMn++agbtJfmcAK/cK8KhCfRu/dibunQrKr+IvXxjBJN6HprwJM 00EBw44fUTgcpIg62S91DcOLtMYP8XCeHqIz456qiCVtzZCSzs/B27BCAVNI0Mo8wlq+1LvmHiNEO YNhSgpq81aGT4Cw8ff5KW6RU9PtbDJo0eKl5mg3rNY8wLELgPu+0HaFiwYXUmPS7sTCXpVAVO8Y9J ezuno4e/dGC1+4jW/vUR0watIMUarbjj8AWgfWOr5kPd0FV7w9/41yhvcJ18YAUcb05/1rcRATlgn 9DwLzOrygf8CmH19xsYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQNJE-004X6l-15; Fri, 10 Feb 2023 06:55:00 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQNJ3-004X2w-HM for linux-arm-kernel@lists.infradead.org; Fri, 10 Feb 2023 06:54:50 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31A4ksLA024712; Fri, 10 Feb 2023 06:54:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : reply-to : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=IPKsikILGiKtIOXLCRM6M9vTPDt+OJ5Hn8C5Py/YUMk=; b=KexBYyMi3ObszOScLNvmgkPzNm229UoK1jk0o3bnCzkxBTh9nSmL593wU98ExNkNWds4 uZb0izCuG2qOKV1KpDqwqsENU0VIyL5a0MEBsyT12lJMWZTEW1yEGL90MCd5PLQWlqOT kGf3iLLFjMH4w57yvTB+eIHWb/NpmeCJntEqLnLdPjNWqITtbUX5tlMXVl5ALQGb0lMM wMhoPAPhbvAx5P/VSTTo+uGg7Qz+vaRbm7CGaUBRS1VAoiszH9aocICAv2V3aLc9HvZU Yvh0OS7gm1mCuTj5P5F2FFN0nDNAxLS/0Pw9PaSafIPjsu8OmU7cMAz2F8xNqQhh6RjU UQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3nn0uka3h1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 06:54:37 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 31A6saqg009498 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Feb 2023 06:54:36 GMT Received: from quicinc.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 9 Feb 2023 22:54:29 -0800 Date: Fri, 10 Feb 2023 12:24:24 +0530 From: Srivatsa Vaddagiri To: Elliot Berman CC: Bjorn Andersson , Alex Elder , Murali Nalajala , "Jonathan Corbet" , Catalin Marinas , "Will Deacon" , Trilok Soni , "Carl van Schaik" , Prakruthi Deepak Heragu , Dmitry Baryshkov , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , "Krzysztof Kozlowski" , Bagas Sanjaya , Marc Zyngier , Jassi Brar , Sudeep Holla , , , , , Subject: Re: [PATCH v9 24/27] virt: gunyah: Add proxy-scheduled vCPUs Message-ID: <20230210065424.GK332@quicinc.com> References: <20230120224627.4053418-1-quic_eberman@quicinc.com> <20230120224627.4053418-25-quic_eberman@quicinc.com> <20230209103955.GJ332@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230209103955.GJ332@quicinc.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: iiX5OxnzuUHk_xCJivKsrZH5vp15QV8m X-Proofpoint-ORIG-GUID: iiX5OxnzuUHk_xCJivKsrZH5vp15QV8m X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-10_03,2023-02-09_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 mlxlogscore=794 priorityscore=1501 adultscore=0 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302100059 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230209_225449_597360_58041B2D X-CRM114-Status: GOOD ( 14.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Srivatsa Vaddagiri 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 * Srivatsa Vaddagiri [2023-02-09 16:10:06]: > * Elliot Berman [2023-01-20 14:46:23]: > > > +static void gh_handle_mmio_return(struct gunyah_vcpu *vcpu, u64 *state) > > +{ > > + if (!vcpu->vcpu_run->mmio.is_write) > > + memcpy(&state[0], vcpu->vcpu_run->mmio.data, vcpu->vcpu_run->mmio.len); > > Would be good to do a bound check on length of memcpy I think (in case > vcpu_run_resp->state_data[1] is wrong for example). Sorry I meant to comment that for the other memcpy you had! + memcpy(vcpu->vcpu_run->mmio.data, &vcpu_run_resp->state_data[2], + vcpu_run_resp->state_data[1]); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel