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 882D0C05027 for ; Sun, 12 Feb 2023 20:25:50 +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: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:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mmvg3aynE6W9olooZ/qP40nvK0kMTVUZGI5SlUruyoQ=; b=lopCXWvl6q/HGM r1a0qqNaZ3UN8brfJKnWofBkvgdfPombT778BLnR/j8LgFtTtxm2NtogPDN8SI0hnN6GeqOZ/GR8C 9Dfur7yvW7/8ZeGz3MVJUkKl0WdhbhxrDSIEpFTWfuo+4jaVqi/mkgCZUVQqUya6ftzGyBLUJYwzQ dmfUNFmGupCwYBzVK/3jMt9/3LEbdbcHIkl3SiJroIuhJW1bmot+ww4ueW7mLz8ONVoEHDCmop5Vm zfe5FBOFKNHBttKwE+mt8b0oTB23tTLgBD+4Li8gLhX7NIsSDUoKXQN16B7oI+kmJ0R+HiSuJSZ41 AAHlwUW7IPG/sSeE2N2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRItZ-00CGa3-8z; Sun, 12 Feb 2023 20:24:21 +0000 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRItQ-00CGYm-Hy for linux-arm-kernel@lists.infradead.org; Sun, 12 Feb 2023 20:24:13 +0000 Received: by mail-pj1-x1032.google.com with SMTP id w20-20020a17090a8a1400b00233d7314c1cso2384702pjn.5 for ; Sun, 12 Feb 2023 12:24:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=HWFilNanFTJVAlWw1g+V6egLGtcyns2owNf2QnUOtlw=; b=xIoeiysSVuOwzvHR2WqylR52/VFPJD8QO7aSMzAG3vsUdQ6ku/KCjEFhbvyOi7gp+F ehZP+1uD9OGRznzjLNGSNa8MFEGCMwr+AKeEDDDDTslECNoGkaVzzYqYD4AHo0Y/T17K 3sRYUcwc0rvCF7OAwrk26/m9l87ytWMQoYaVv5PqPmW0VAiP3KqNg9kj4OJTFWKffF/k uMVXczGpvPNo7ev/VDa5mc2NXgrO3LUNogegQacTyz0nXFCNdpeDkDqidwZPS9KmUNGi mXVdRSnshsnkHqv56iV0s+RL1fYO6+v3AzKQapq0R4kSA+rGTU4iL23+zXFEtrLPe98a SDZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HWFilNanFTJVAlWw1g+V6egLGtcyns2owNf2QnUOtlw=; b=ntrHeFNnEzkbpiCl87saxVqF/xKk95irTsbfZ4X7rHDVQfJD6BSKAnxTCK2wvi0yoK QMZtr1nCHO4M30dZQ3BWoIp5Ihf3gm3NIvfMsLdw+QDl9VIfo6BrJAJQVphlhQjEZojb 4qymQYYZrQDxLxqZD8IWcjO/kMKhK43vkKCkivRY5S1UeHoxDVK0/EKVP5CzTaQtOjrX ig/g+K0hnIXWHBmb8XrA57ruUJ1scDZRLXa3qIuWakeoNHXMtl6cXsAkyfllBCh6NLPf RCL/RsBr58PNAhb6uvoMcQKOUMQrU9DpulJM1QFOLVbCkCJR7abZDhCaw0JI1HvqZsmN IUkg== X-Gm-Message-State: AO0yUKWe9Maxtua8+5Gpi5G4LY/x+UZht6kcMVdLBKnEGD9cA5Oh5dK1 aiqh58Z4DTEARSMHoToZO1S3YQ== X-Google-Smtp-Source: AK7set8zTR5ia6k+GSss5gMoHr+xULpIqmDtvcfml6k8ThLqQ/yaeMPpmag80oG2dnErsUif+Th3vQ== X-Received: by 2002:a05:6a20:1453:b0:c2:4766:2b59 with SMTP id a19-20020a056a20145300b000c247662b59mr25045910pzi.21.1676233449184; Sun, 12 Feb 2023 12:24:09 -0800 (PST) Received: from p14s ([2604:3d09:148c:c800:ee79:a5b1:b638:330c]) by smtp.gmail.com with ESMTPSA id j14-20020aa7928e000000b0058d8db0e4adsm6705528pfa.171.2023.02.12.12.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 12:24:08 -0800 (PST) Date: Sun, 12 Feb 2023 13:24:06 -0700 From: Mathieu Poirier To: Tinghan Shen Cc: Bjorn Andersson , Matthias Brugger , AngeloGioacchino Del Regno , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com Subject: Re: [PATCH v1] remoteproc: mediatek: Check the SCP image format Message-ID: <20230212202406.GA236598@p14s> References: <20230210031354.1335-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230210031354.1335-1-tinghan.shen@mediatek.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230212_122412_598045_8475F4BE X-CRM114-Status: GOOD ( 16.15 ) 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: , 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 On Fri, Feb 10, 2023 at 11:13:54AM +0800, Tinghan Shen wrote: > Do a sanity check on the SCP image before loading it to avoid > driver crashes. > > Signed-off-by: Tinghan Shen > --- > drivers/remoteproc/mtk_scp.c | 1 + > 1 file changed, 1 insertion(+) > I have applied this patch. Thanks, Mathieu > diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c > index d421a2ccaa1e..0861b76f185f 100644 > --- a/drivers/remoteproc/mtk_scp.c > +++ b/drivers/remoteproc/mtk_scp.c > @@ -649,6 +649,7 @@ static const struct rproc_ops scp_ops = { > .load = scp_load, > .da_to_va = scp_da_to_va, > .parse_fw = scp_parse_fw, > + .sanity_check = rproc_elf_sanity_check, > }; > > /** > -- > 2.18.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel