Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1098644rdb; Tue, 19 Sep 2023 22:21:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkOULe/3TyrTXIIuz54yEPUj93ZXyg8ZD7/SC+CF3wdiqETRIGYL0oR3EntKvdeLT3N/aJ X-Received: by 2002:a05:6870:7006:b0:1d6:1668:db8a with SMTP id u6-20020a056870700600b001d61668db8amr1645274oae.39.1695187301903; Tue, 19 Sep 2023 22:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695187301; cv=none; d=google.com; s=arc-20160816; b=ETgnVBgNiQS9fqrVcHXMk3A2skrp2iUEF8SFOjM0ZfIWjSMr5tIkzDAvpezui7hA3G KLNcVihEP42EESPG/vHJ2ysK7TDIa47lXAAWajl/MGSMkeu49w7w+rREeh4CLJQtiR7m 5o4Ioank/ZwxDhBMzNz7JUWqQ1QcFCe/y4VcBjK8DxQQ8oLg/BbF3zQTuXmfPaCBqX9M 2ycVZXZjn5Fhwp0ihMyh4YOeSO9ZlRqdxUkcJZiQ2eF6mWdIaJp0idHtv9WKP6uAD+V6 fOwHRgX/mWZHdHOL4t4vOvc30ZzbAYzza4bUuhzOcJ5XFhMhBAKVUfy0wNxMdoRmxQhQ JGbw== 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; bh=qHFSpqVExKkkNozUwSbNlpc3FWQ8PhuD9GdWNVEkZ1s=; fh=YLzxHhAmIb1O0kwHI3bcebNWnQR05XvO/bKg1xUIF+A=; b=ZEjv6su6gDQS53OpXGDNcWh3glhA1wClx0bW+wnRBlNWRUaZB2w2LO5Bnq5pJgFP0T 7FZPqRd9q6/Egzrty0Mjg0DPtyqF7C8lASreoCNd88rPcxOzluU9yIOmUak1HD0LEy39 oFzBk+RNaT9hPIXVhcfDQ9dS5he2fCeF/NcTWExgPkhMyLIqcSP/oJ+eO32jU8xWicT7 1zG/bhA8fV8txlVSHknWAOWUffn9C63SdFEWqsLg5XrjydpT8X3wcZAwpBLT8HB9o3oV 07kjTnts7Ki9E8qbovgya1WnwXFqrDfM18jLxpkZc6Lpzu13x6/8BKzt2k7QTDmXqych 8kpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id j26-20020a633c1a000000b0056f8b436856si2688999pga.75.2023.09.19.22.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 22:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 55F2482AE915; Tue, 19 Sep 2023 22:21:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232327AbjITFVl (ORCPT + 99 others); Wed, 20 Sep 2023 01:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232305AbjITFVf (ORCPT ); Wed, 20 Sep 2023 01:21:35 -0400 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB192C2; Tue, 19 Sep 2023 22:21:26 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1qipeG-00GD3o-67; Wed, 20 Sep 2023 13:21:17 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Wed, 20 Sep 2023 13:21:19 +0800 Date: Wed, 20 Sep 2023 13:21:19 +0800 From: Herbert Xu To: Justin Stitt Cc: Giovanni Cabiddu , "David S. Miller" , qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] crypto: qat - refactor deprecated strncpy Message-ID: References: <20230913-strncpy-drivers-crypto-intel-qat-qat_common-qat_uclo-c-v1-1-88a6c07fc924@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230913-strncpy-drivers-crypto-intel-qat-qat_common-qat_uclo-c-v1-1-88a6c07fc924@google.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 19 Sep 2023 22:21:39 -0700 (PDT) On Wed, Sep 13, 2023 at 12:51:05AM +0000, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `buf` is expected to be NUL-terminated for its eventual use in > `kstrtoul()` and NUL-padding is not required. > > Due to the above, a suitable replacement is `strscpy` [2] due to the > fact that it guarantees NUL-termination on the destination buffer. > > Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] > Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] > Link: https://github.com/KSPP/linux/issues/90 > Cc: linux-hardening@vger.kernel.org > Signed-off-by: Justin Stitt > --- > Note: build-tested only. > --- > drivers/crypto/intel/qat/qat_common/qat_uclo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt