Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8102977rwb; Tue, 13 Dec 2022 02:08:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf4UnmfV8Op1u08M5XcvodfrLMqPwjmkwvMp2P7ndWmKdq9nNeW7zXVDusn9HchKu+mzDTLk X-Received: by 2002:a17:902:cf06:b0:187:261a:8441 with SMTP id i6-20020a170902cf0600b00187261a8441mr22440022plg.16.1670926088264; Tue, 13 Dec 2022 02:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670926088; cv=none; d=google.com; s=arc-20160816; b=ZM61X4RXBolQQ5Yw/zkoKHN7iLf5ouTyWs1utEXx5ymjqz3oQnB6w+v1lVqvL03pRp LLkPZrNnng7lQfrkFMWjU/fon0FtqFdbpVpO9G8TEnu1IVVZrafq6iMBVf4wV/+qcfJQ Lv069evD7SNKO3j6A76tpfyJEw6Gxhl0JdFNUUPPARL1s0PxgNKQIQ/xZfogOz99ZdXD wGwl0cC9YzDWpL0fwdQHBs9WgVLXhJVeRosm1nb5wH+GOYSfgHMelw6yjiLbuWCPv0eN 0tcEyJ+NBdpgeHrpklG8yPzVOSpyBMx/4996B6sP058f+S88xpHJfSF0qIvbCZ/DNIul RATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=nTEtA1oF+7UcA8vVWVXKD+WqiYQqfYi5wKfiUtlDrNs=; b=isFt36vFfnKtnZCj6VR17a/TMwSCRPjBpJ6m09mJlWrbwTHX6M1fkexXgpZHTpGymk iSsXk28PnIA800D1v5p7YmLMeG1v42oS81cwkFfTlFdq5WWh/nW75FJlMv98/S481eeB b5X0CCT9ODJgdMxjjdCaBFTXI5lu4cZa1qokLcNTLrqQxajT0qoFFd0wrcnJxOudgVWh ddHw7rTfWKSw/LZjgcLScR3+qnk6iiJNei3NOomAfWnU0pDK2be/6CC9ZCUQtC5xUPXq OSSRilIIWGsPtJbAknVWx55F5ECXTD6NPNn1IkJ+vOH53NfNaN7knXUt1PtxcdMHJ9nJ aFug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LJsUZxxB; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a170902dad100b001897a8ae7b3si12826422plx.296.2022.12.13.02.07.58; Tue, 13 Dec 2022 02:08:08 -0800 (PST) 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=@quicinc.com header.s=qcppdkim1 header.b=LJsUZxxB; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234745AbiLMJuD (ORCPT + 73 others); Tue, 13 Dec 2022 04:50:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234524AbiLMJt5 (ORCPT ); Tue, 13 Dec 2022 04:49:57 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CA3CF5D; Tue, 13 Dec 2022 01:49:57 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BD7xMuh032620; Tue, 13 Dec 2022 09:49:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=nTEtA1oF+7UcA8vVWVXKD+WqiYQqfYi5wKfiUtlDrNs=; b=LJsUZxxBFbff5n3lQxKqeuY49jkQ+E4BAwTwrIULWHZRGH/rD2WHhNprtrJWSwmKEKEV VjpGcRQGCIh6+7FATlg7zPZaZpJgEzcuo+BdEkWS2OeWQ2QljnIq6BGaI7tfsx3gouk2 /BXl4YPXLJLQwp6+Dc9WnTv+UeVdOPKnGrPN6i/bXUcn6Gj/+xZYU3qA84nffpnZXSSZ xKMyKii4KCGurl28Q63Pv3KFuwAOAlL7/wns4rJli/T+cJIlyNjEySqnNo4cvWJgvbV+ rnoqN6Yp2pyN5VfJE04162YdAfqHpT1ohTYc2UFydjQBofkxcesCyF/nM2ji3XjbSG1H Vg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mej4w8mbe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 09:49:16 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2BD9nFtS003960 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Dec 2022 09:49:15 GMT Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 13 Dec 2022 01:49:09 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v2 1/2] remoteproc: elf_loader: Update resource table name check Date: Tue, 13 Dec 2022 15:18:48 +0530 Message-ID: <1670924929-26507-2-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1670924929-26507-1-git-send-email-quic_srivasam@quicinc.com> References: <1670924929-26507-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 0EKxPu2rAw2DXGn5eSiAi1pIyXb9c_80 X-Proofpoint-GUID: 0EKxPu2rAw2DXGn5eSiAi1pIyXb9c_80 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-13_03,2022-12-12_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 clxscore=1015 adultscore=0 priorityscore=1501 phishscore=0 impostorscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212130087 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Update the way of checking resource table name with prefix substring search instead of complete string search. In general Qualcomm DSP binary is prepared by combining different elfs, hence section header name (e.g. .resource_table), appended with elf name to differentiate with same section of different elfs. Signed-off-by: Srinivasa Rao Mandadapu --- Changes since v1: -- Update the commit message. -- Use strstarts instead of strstr. drivers/remoteproc/remoteproc_elf_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index 5a412d7..77330d6 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -272,7 +272,7 @@ find_table(struct device *dev, const struct firmware *fw) u64 offset = elf_shdr_get_sh_offset(class, shdr); u32 name = elf_shdr_get_sh_name(class, shdr); - if (strcmp(name_table + name, ".resource_table")) + if (!strstarts(name_table + name, ".resource_table")) continue; table = (struct resource_table *)(elf_data + offset); -- 2.7.4