Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2408742rwb; Fri, 9 Dec 2022 01:32:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf6o1lCY6xI3VfqTCdbdY9zuYY67XosOoveVJ1U+mFsNMhiafmav0VP4ksSMoOJcEeFW+6xU X-Received: by 2002:a05:6402:1491:b0:46c:e615:9f61 with SMTP id e17-20020a056402149100b0046ce6159f61mr4760701edv.25.1670578355867; Fri, 09 Dec 2022 01:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670578355; cv=none; d=google.com; s=arc-20160816; b=enDNBuzO98Qke4kcMVctIwgQOrxSaFcjtxzjN/gB8qiCCIQu7Cbg3/9QOzSHLzbeTd APj51AhIFsOryB+sS/uNDNJb9DiZb/mnsOpy1l+Uy5wudWzvPXwInj/8mXxzzwpZB2tN 7Jt/V+uKhGeLcdKjoHFZxvE55lVCXahparO8NFtgFckkk0t7KQ0AX6OhUvvBdWNn6mXQ +Q8DyUHlSXt3YEx9+KnLR7Wf/9sahyhv+O0+3Gjjfi1xnq58j/N6yXXHRRnFpJq4mRJo wXP0SC2iN+9eNR3ZzX3hVtfVp9SNXEWm7gbmW18RnBuJTc4vI4qzKbuplv1xyqrqY0qK raFQ== 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=7r/p52z3rraaXKdt3yxbWGkrklyO1CuvC2km7HS31WQ=; b=pIL4ZbEqjKX1lHkQQEY4Qso6/47XF4PrBT/sRxxl3Ify+fkTIV7/gI8AabJh3mtAVW aoXtyC2Q8PTD4qkw8I+EUaY+tTWQ6N2rU1rCiJsJvmz2CBEzmPDeFw+B0zOPDTWPmsSy Hu1EJ3FpwyG4A0dljw3LCB0NNdn0X+oPKcjqJodmClKcSzGd5DCfYDyskz4iYX1cFp2l +pcU/3iZ5MzA6JDNFuwE4M8JbhRWQMZV6Xu2o9cFiJ9YG5kcRvgMkqvqr+j3ost0YHRO 5tLnEp5oCNMkbay+y18cy3EpUKnvX3Kq+Rr6fE5BR0i98bss7UiNjazuBjlshfsEHBSt vJbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20210112.gappssmtp.com header.s=20210112 header.b=BsXH5AnA; 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 d36-20020a056402402400b0046b692e8c79si1011871eda.610.2022.12.09.01.32.13; Fri, 09 Dec 2022 01:32:35 -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=BsXH5AnA; 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 S229571AbiLIJBV (ORCPT + 73 others); Fri, 9 Dec 2022 04:01:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbiLIJBT (ORCPT ); Fri, 9 Dec 2022 04:01:19 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E38B349B56 for ; Fri, 9 Dec 2022 01:01:16 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id x22so9947527ejs.11 for ; Fri, 09 Dec 2022 01:01:16 -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=7r/p52z3rraaXKdt3yxbWGkrklyO1CuvC2km7HS31WQ=; b=BsXH5AnAwI81PZvi2GwUE1RPRFgwMjpxrH6CdZr2Cgvo5q9vJflP4tE0W4RAH5o/O+ HBiak3XRoOQk5hPQcxZDK2L6WmR1U7693ZMJlKCCRFoJ2/qoERBMZRqIjBpoOW2g5T9g /Fv3BAe9cLNjGs+WaGNM86Dsg5mfdfUNDWZzsCQNm/6aDJqs8OBtTxNTTADLZ4GdVTym D9uqJSXVsxmkxGbXYv+kY1XTV8IecJHDjrPuknylxT1NfKVG6CsOJ5/ShpsW7LwcKjes 0SyUMWhGxCUxMWsgS1r5PquZ/hSTyivj4HKzEu5KFIpTTOMZjDfIWcCtfmvurgsgd9r+ ul8Q== 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=7r/p52z3rraaXKdt3yxbWGkrklyO1CuvC2km7HS31WQ=; b=wwOG9l+ks4eidjJJMCrb0sGxBLahisr3IDsT0euguDz12kVVr1vHMrAB1SeSoEqrfe HqPtHjwW+lfd9JWcS5QooIAkLDon4UzcOSAHmufGl5iJdKlBFpTvFv+LMoriKk7GN/Wa W3rXG5q/KTJ41TA/26fuKZAANj6q+1zZdOmcq18hb9rA1LwPlpjqL3gXvm1Ipxs53LA0 2DJ4Q51nxavgEeT1y8qmLrWxYar5ISG9gsdWBvxBY1ReXYZDvshOMCnLKKJCVuUpv3O5 DFSMELy5jSign3tnaf4DXBdohO5Bm1sOuu7uv80uhq+f67CgMWtvuXJSY67cMLkbo0Op TYZw== X-Gm-Message-State: ANoB5pkZom0FHoCUtUO+KBhJG05wghFzSNfA5rvhv12MFIvPqSFohEwN bxeC9HcKJJZrlnq9nHqSIqtfbA== X-Received: by 2002:a17:907:208d:b0:7c0:fe60:be12 with SMTP id pv13-20020a170907208d00b007c0fe60be12mr4251455ejb.25.1670576475322; Fri, 09 Dec 2022 01:01:15 -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 fu38-20020a170907b02600b007ae32daf4b9sm317942ejc.106.2022.12.09.01.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 01:01:14 -0800 (PST) Date: Fri, 9 Dec 2022 10:01:13 +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 v2] hns: use strscpy() to instead of strncpy() Message-ID: References: <202212091533253334827@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202212091533253334827@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:33:25AM 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