Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp646227iog; Fri, 24 Jun 2022 10:53:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ukqqePyedyZnmG4EkR2TFcahieaq42yDc6fErbhRYgqcBqok8yuPtSTbBG++c8VBv+lkzi X-Received: by 2002:a05:6402:2396:b0:435:775b:b136 with SMTP id j22-20020a056402239600b00435775bb136mr308793eda.299.1656093206070; Fri, 24 Jun 2022 10:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656093206; cv=none; d=google.com; s=arc-20160816; b=cQsuUDEy3gvHWsR87x3Bchdm03jK9wacJWI+pMAu+hj8JQPsrCB4up8vttMNygF3Cr EXSEaBwuVUsuHMEMdTX0DfSUww2QtgLOvmiB7y3IEQ0OYSGwo/rdRxwr8x9obTa40NhK o6DTNI4sx6lKE/cChJAhQriCU8gk9AvxbDtpFTiskfTy82lVVbGtymYxfwHTidojhMSv DT914T+lanZjQ857V8ltSx3FdyPZ/ZVEppkNKcOgmUR8deMZpMOczWM0Sj6ZPHIRpQc3 s7XyN0vAcxUTE5mcFzo8JXllDLlrPkUnXp57OlZZyNflHXbtUw0td/WDUQnd4yIWOKZu ItmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TMGl2uGFo9WP1IR3TTIhsHP9uWyzq0KMX5Ki6ojzI4k=; b=ahvP/qdRnJLoo6ANrefyYWGegNi8mwlcvOfVQC12I/3d/RB8WjnDwrXB1azpKcCgLx TyHxUn3987wPUSEu75AKkkJNe+DCmAp8ZCCwrIT4+CYvBpqjyK8dapNTV/6J4coHwleY ozVx9nbnqyfBWPgnDbWkA02VSff97LFcjVVTsqk6KgHxwrWULL26SymrbHv2f5jfeRyE MVewNN7Nf3ESuyOnsRthYw0fTbJHy/YWoSuWXv5TqExLFn/tAzXc7UjPuO/fmAm2Ea+q n9p4PFsTe5NvTIMyDDUmW+dMD4+8IiKLxXrA2F1Gaf+b86x0cJ0yKNykZ67ntoXbhPbw mWJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z1gOC9Ms; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t19-20020a50ab53000000b004359a63823esi3538897edc.225.2022.06.24.10.52.58; Fri, 24 Jun 2022 10:53:26 -0700 (PDT) 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=@linaro.org header.s=google header.b=Z1gOC9Ms; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232479AbiFXRj2 (ORCPT + 99 others); Fri, 24 Jun 2022 13:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232471AbiFXRiV (ORCPT ); Fri, 24 Jun 2022 13:38:21 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7E6A38D84 for ; Fri, 24 Jun 2022 10:38:14 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id k14so2702111plh.4 for ; Fri, 24 Jun 2022 10:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TMGl2uGFo9WP1IR3TTIhsHP9uWyzq0KMX5Ki6ojzI4k=; b=Z1gOC9MsNTnTOKdW6JLQOA6GStPqHNdMDGNQ276jBGI4DzN2LiUlL7R0CUUAxOeO5l TbABOthK1gLVn+F+B1T+KWRK93ogMkNVrAtbVQqOPm+aGLN8+IjtKKWgw8xWU1qItG32 jwMxPswhDw1TyYKjbmaR4AxWdeJAaW/BIozkvOJ82HDAmO7E/3vytffty+BtamlS87ds 9SnOHyO4Du3UNhYj9AVaaTN54ubMSjJmtZG4g5oLAz/sJBhht2057ltozkRBGeGL5HLl ZTKC3e4DWVYxZXGt6zM2/yj5vSOqOSbqZJr+84U4/1C8wsDqxbwA/HcpBVlZsufjJVX6 7nrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TMGl2uGFo9WP1IR3TTIhsHP9uWyzq0KMX5Ki6ojzI4k=; b=ujrTU6ZNNSLOLaqha1lSoZO30i9yGgQsstR1cQo+iaiAM0FFcJyrEzIM3lQDA7YzE2 NdDlAnIpxdOR1uvcMxPOr/ikK38TLGJ+WUOlSvgqkTt8REIehMm2isNtlLzsHS8R6ArP mwxi5f4YXMAiSYbcnRkfvzDVkQUxnlj1WY3HkASzhsiCYJmCfGDVqq880wH7amS7a3X6 LdplCHi+iD7mTaiZylQklxHCeO1RvoTx9K3aAPUwtckXSontpeB2rFCHo/zCSOGJEPqs 8c1vYY4jLXYmgMbkLUS7F9WI1kOsO8ScMi/+NzX0wyq8wXLdbM7Y38pU+ZnUAOXjyeBc nnXg== X-Gm-Message-State: AJIora9Vsqdw20BYEm4tMO3n+uYjc/lDQLu+52o0gUVN+0dVvkVzVrmG mHHABoosgdiAMIwx3AxGCXarllWKTdspkQ== X-Received: by 2002:a17:902:860c:b0:16a:20a0:f6e4 with SMTP id f12-20020a170902860c00b0016a20a0f6e4mr181332plo.164.1656092293946; Fri, 24 Jun 2022 10:38:13 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id w185-20020a6262c2000000b0052523f7050bsm2002295pfb.118.2022.06.24.10.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jun 2022 10:38:12 -0700 (PDT) Date: Fri, 24 Jun 2022 11:38:10 -0600 From: Mathieu Poirier To: Saud Farooqui Cc: bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, lkp@intel.com Subject: Re: [PATCH v1] rpmsg: strcpy is not safe, use strscpy_pad() instead Message-ID: <20220624173810.GD1736477@p14s> References: <20220622174616.GD1606016@p14s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, Jun 23, 2022 at 02:20:47PM +0500, Saud Farooqui wrote: > Replace strcpy() with strscpy_pad() for copying the rpmsg > device name in rpmsg_register_device_override(). > > Reported-by: kernel test robot > Signed-off-by: Saud Farooqui > --- > drivers/rpmsg/rpmsg_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c > index 290c1f02da10..a4bad4b00414 100644 > --- a/drivers/rpmsg/rpmsg_core.c > +++ b/drivers/rpmsg/rpmsg_core.c > @@ -604,7 +604,7 @@ int rpmsg_register_device_override(struct rpmsg_device *rpdev, > int ret; > > if (driver_override) > - strcpy(rpdev->id.name, driver_override); > + strscpy_pad(rpdev->id.name, driver_override, RPMSG_NAME_SIZE); Applied. Thanks, Mathieu > > dev_set_name(dev, "%s.%s.%d.%d", dev_name(dev->parent), > rpdev->id.name, rpdev->src, rpdev->dst); > -- > 2.25.1 >