Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp137885rwb; Tue, 6 Dec 2022 18:31:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Oo0H8d9lG5qHslRI2aVW7kQt4sppHjVUska0KMqJx+c9KsGwUk4rbJSWQSrWH4VYuov5y X-Received: by 2002:a17:906:b811:b0:7c0:9ff2:c206 with SMTP id dv17-20020a170906b81100b007c09ff2c206mr25014688ejb.609.1670380305375; Tue, 06 Dec 2022 18:31:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670380305; cv=none; d=google.com; s=arc-20160816; b=cJy3pyaP1TLNVXOVpHq0svVFs320MmQQvNw9OGs1RuKrLcbbPRm5gVXDxOtJcXF65e YqHedNwc0s/ddI/sUcmZVqgTtIotehPNRJHpka9lT+n3DccYMfVhdmfkRVRAehLDhkGq JD6h1nIvTLgYp+qfDLDsy926kRa6r/rvHy+uEY9v/q3IAQ7n0cjQ+Qgs9FOHrGydr+qO nHtv4fhErteXLaiQR/VmCFiH4tjHp1fQL5pERACpqp+g7WrMKASUA2Ikkw6iCvfc2hsa rMQopkluVrNS7bsnV6AKoiaJ0C/Nl1+OYRWWv55nY3fORO0aNZiCATMLCp+3ZvpapCln ttaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=9gPf1c0smtvvJKefQzCjT4En/iaFZ6itMFzysD6Z4OM=; b=o+/VbHjB13WqIHR7ZQt2mcNKhwAotKyfWZdO/SPjNqerAUmRRx+eWGl+s0Jl+dKXZg 8naI6//lu/vclORBoR1o9Xwn/e0pXBMAJEuZqh0D6SIvbkhBRJd+Ic7t8S04T13yEGRp yoLT3Nr9J/KcB0ACoYdYATOmp4J59MsAlM20TZyLvgfPOwaTjxCiMfsNNM7ZvvFFrABE NIm1km6iLMWXPEK0RLxIY53vZmcJItdy7kBaTWE2EPGnH3vtiiXvgBOxmgtM9Ukl3YGO BVNXWQN33GCz0wHLXRPvJHIwydKuJaWa43tjUi8FfnRrtbp2HGOkReGx2k2EOdyTUdU2 RweA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=F5XdJ8P+; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a056402190f00b00458a650f3fasi3732728edz.409.2022.12.06.18.31.26; Tue, 06 Dec 2022 18:31:45 -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=@chromium.org header.s=google header.b=F5XdJ8P+; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229736AbiLGBzK (ORCPT + 77 others); Tue, 6 Dec 2022 20:55:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiLGBzH (ORCPT ); Tue, 6 Dec 2022 20:55:07 -0500 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0A86DAC for ; Tue, 6 Dec 2022 17:55:05 -0800 (PST) Received: by mail-lf1-x12f.google.com with SMTP id cf42so20701778lfb.1 for ; Tue, 06 Dec 2022 17:55:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=to:subject:message-id:date:user-agent:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9gPf1c0smtvvJKefQzCjT4En/iaFZ6itMFzysD6Z4OM=; b=F5XdJ8P+8uBnBb+dUBfic7nm5SikL1KNbn7ae+J0KeUhJ7YubLk0eOko+SSKw4JMIL RMowVv0fhZjZxvuuC5XCrjHqcsOTFUOkFuxnVS4R0yoybdhUosKxPSJWgXlG8BRCR4Bl qByb0+sg9hXnmrQuwKfm+1pfSWG6rpvT2eFiE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:user-agent:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9gPf1c0smtvvJKefQzCjT4En/iaFZ6itMFzysD6Z4OM=; b=yjggHGDWW7/FFoOWSUx1m9oeQAwb3uJhjUD0NZFzENmTW3DCPgZSXB5DLbLqxxQF5i YJS0Iovorijfbf6QgJuchkLOSkyHeaQgdxxuKpa+zjtACOLnXu9FX3PDMAZJzT/DGHGn w6NCBxAO/I2jB7MstkltdsWDrP1oCXJ5V7rI4vXOGK8wRXDkwrImvbgG4sucpvLGrEFK vB0PdPM97D5S5Ly02Z22r2yIM0ssIdM+mFAfYcTo3QR9NLAqHodQI3AnuKc5Aj8UoLlS 5KKcJuOBM6jy15Vs9VwfPASF/T03HlB41Y8CsaOJKJFT6SuxsWAaLg7r03sk2M8j/z5B Ak+A== X-Gm-Message-State: ANoB5plhgdnx3zgpEYnlKR8uIAyrxDNQ+4/C9aMcML20sL2WHV+FQu8o fdE11Cu7fcMdQ75eKt+eZhl9pCETzSKmbmNJd97ZfQ== X-Received: by 2002:a05:6512:33d1:b0:4b5:1c86:9267 with SMTP id d17-20020a05651233d100b004b51c869267mr15140973lfg.297.1670378104033; Tue, 06 Dec 2022 17:55:04 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 7 Dec 2022 01:55:03 +0000 MIME-Version: 1.0 In-Reply-To: <1669897248-23052-1-git-send-email-quic_srivasam@quicinc.com> References: <1669897248-23052-1-git-send-email-quic_srivasam@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Wed, 7 Dec 2022 01:55:03 +0000 Message-ID: Subject: Re: [PATCH] remoteproc: elf_loader: Update resource table name check To: Srinivasa Rao Mandadapu , agross@kernel.org, andersson@kernel.org, bgoswami@quicinc.com, broonie@kernel.org, devicetree@vger.kernel.org, judyhsiao@chromium.org, krzysztof.kozlowski@linaro.org, lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, mathieu.poirier@linaro.org, perex@perex.cz, quic_plai@quicinc.com, quic_rohkumar@quicinc.com, robh+dt@kernel.org, srinivas.kandagatla@linaro.org, tiwai@suse.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 Quoting Srinivasa Rao Mandadapu (2022-12-01 04:20:48) > Update resource table name check with sub string search instead of > complete string search. > In general Qualcomm binary contains, section header name > (e.g. .resource_table), amended with extra string to differentiate > with other sections. > So far Android adsp binaries are being authenticated using TZ, > hence this mismatch hasn't created any problem. > In recent developments, ADSP binary is being used in Chrome based > platforms, which doesn't have TZ path, hence resource table is > required for memory sandboxing. > Does this need a Fixes tag? > Signed-off-by: Srinivasa Rao Mandadapu > --- > 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..0feb120 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 (!strstr(name_table + name, ".resource_table")) Was the strcmp not working before because the 'name_table' has something else in it? It really looks like your elf file is malformed.