Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2411662rwb; Fri, 9 Dec 2022 01:35:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf7wJf4mkIqxwkrXQnMiyZYwc7FfHWvjkeIUeGVlLZ1dbQY5UwvZvV7As4XkUYM6/N+0yC3l X-Received: by 2002:a17:907:9712:b0:78d:f459:7186 with SMTP id jg18-20020a170907971200b0078df4597186mr8728944ejc.49.1670578514899; Fri, 09 Dec 2022 01:35:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670578514; cv=none; d=google.com; s=arc-20160816; b=vb4cGWab0R3btdcTZJSzt38aFf1IeYH8mOD9V2pydpE7pyx8Voe78hLp1oIdGa3uFD NFvDP0sKckZ9NjqTGCnxMGCpK2KFJcFLWcW2nWb1SGkRq5fExxmM/PQBB3vr57cmMVCS hIX43hTUOpVsBDlTt2Jae16cBRSjZkr/8rzbG51YgMLLeiv7J4JnA97eIoKhzLXY+mc3 2UDvBCsAPGUa3YnpOkfm3EPIP9UWCPeOB63MwBnN9CLReCeEPL6kho+sdTfEfRJ7JQLW ++0Q0K2SjEW1Lfwl5jQhq8aj3BRbb/wt5CGM8kEhxFG1LamhXo3kkXMTkU+tqKkEZMfp J9pQ== 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=ml4uQdL2LKYdwrPVo83/jU4ECyqWWVioxy8YQNnT+VY=; b=GabzC3KwMJBBm4kErRKzz59tntI4n0akuYjdKzhtgGEFPCn+w4BogeCKfPxlxGhulQ KaRAeAnYxPgT30C9QV7lEPJqSXgy5nHbFqe1E7rReIexH5ZAFRYInEXay7sY8pCMBcfN VGed2Vt9zS6RRA/N+/qBRYUb2ubkiKMSqDtWd/Ea4c9hdK4EJKD1hxu9k+qpGgLpTxqf YrPLadGGjW8npT877ejkWlTIhAt/rwbkB2e7Q+b+NZwwte7BJc99NRD1ZdMB3gWqhKGC rt6iTG4R6ZhD3fD08x91NGYpYGWVZBil17RIPHi+AUlP4IqQv+UMV4oPCgDfJJD5wJeU nobA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=nh4kgLU1; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs18-20020a170906f19200b0072ef52514f6si675399ejb.629.2022.12.09.01.34.57; Fri, 09 Dec 2022 01:35:14 -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=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=nh4kgLU1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229932AbiLIJDN (ORCPT + 73 others); Fri, 9 Dec 2022 04:03:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230046AbiLIJCr (ORCPT ); Fri, 9 Dec 2022 04:02:47 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCADF9588 for ; Fri, 9 Dec 2022 01:02:44 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id ud5so9996500ejc.4 for ; Fri, 09 Dec 2022 01:02:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; 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=ml4uQdL2LKYdwrPVo83/jU4ECyqWWVioxy8YQNnT+VY=; b=nh4kgLU1fvGyfQXiNVbiwBL5S6HGfrA3MKIcKYxklaF/kZle50Ivua9dSIeZfdN8A4 OK6MkEd4xG8Yi4PMYk9d96G5UST5rsE+BdbigsZ0JaUpPMh9KlPyNz+Mm24my4YWrA6a mwT4GYxdfdd9UQ70QEtxnKdyYZW1VJ0dVpMzWqY+nsrkPSb1jrs/I5RfKRA94KKWLsH3 geW6/PN5dNTRimPmKktXV10ZinWHAtB/4b92KamM6BIrA/qcCwQXHF9oPCP4n9xzrlfc oJiSCT+K1b1RPMwaWaZsXcee0H1+uk/2sQ1bDXejsqb/plkHhC1FUZ6wU1xZ/l7mWtrX ZC7g== 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=ml4uQdL2LKYdwrPVo83/jU4ECyqWWVioxy8YQNnT+VY=; b=Dku2FmClswQePnko0gLirOV1mcHEtFfaLjy31i8lMlAvu0jdmu44545fhpdJs7xlVp oZYbDxKSPwexfXt9jYnXpU9T1bhS8zGAetHRYuwd/UixNKP/OKBJpHhRtV+yBnKucPVm K22x1/i+ACAN8GGqiwwmptIaND9UXkbgrT1O+xACdjzK9q5ObByyFD8Dq3TouXCkivpV zaCBOx8IeyMNV53xDpfbSblvMvleN5QpwUNGkJif3/oghmkQ0JCmnkaLo9nlav1mA9/O IhH6vfrRUM1ZRwmgIgStP7TGFgZ3FNE44SQBNwFKpX+Zwj1xag3dXP0fF4Ae5SbDCwfz NcFQ== X-Gm-Message-State: ANoB5pkA+4QwqtZfMprxWB4Tizxe7yi9djw5KHbAiVR5lYHROXlm/eFN iZ89QvZubHhMYNCW7gMMjdJmD+/5O2wV/ty8l9Q= X-Received: by 2002:a17:907:9712:b0:78d:f459:7186 with SMTP id jg18-20020a170907971200b0078df4597186mr8592530ejc.49.1670576563293; Fri, 09 Dec 2022 01:02:43 -0800 (PST) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id sh39-20020a1709076ea700b007bb32e2d6f5sm295193ejc.207.2022.12.09.01.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 01:02:42 -0800 (PST) Date: Fri, 9 Dec 2022 10:02:41 +0100 From: Jiri Pirko To: yang.yang29@zte.com.cn Cc: salil.mehta@huawei.com, yisen.zhuang@huawei.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, brianvv@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, xu.panda@zte.com.cn Subject: Re: [PATCH net-next] net: hns3: use strscpy() to instead of strncpy() Message-ID: References: <202212091538591375035@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202212091538591375035@zte.com.cn> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 Fri, Dec 09, 2022 at 08:38:59AM CET, yang.yang29@zte.com.cn wrote: >From: Xu Panda > >The implementation of strscpy() is more robust and safer. >That's now the recommended way to copy NUL terminated strings. > >Signed-off-by: Xu Panda >Signed-off-by: Yang Yang Reviewed-by: Jiri Pirko