Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6053960rwb; Tue, 22 Nov 2022 08:12:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf7BE7r4KQFpMal6USYap+xDg6d1X8Y4OUTKYUAFulbfzEmAJw6btCAuUvpsgYJYGwvqUclz X-Received: by 2002:a17:902:b40a:b0:188:635d:4b43 with SMTP id x10-20020a170902b40a00b00188635d4b43mr9054568plr.69.1669133529218; Tue, 22 Nov 2022 08:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669133529; cv=none; d=google.com; s=arc-20160816; b=ygsjJfRXWpROr14rXXKPx9mhWcIRDrzO/0/zIwgYJ44VizblcLYSGdYCRNRVL/kpUF wJu9UaiBtnkU7kkZHIGZmKPnly+uqm47vYjFSmzHsTI+cZDUJQG5NHZb9r7K79CGUtPp HYsCM8W0qDcJbGevBfIJR7DEwyuMU0BdGaLlzalljXMAX7zm87l75cOUF6+idR1Uj6Bu c8QD3de+qUhZumqq0PeyprfLOY0bMAyC7N7CmbP2ryZ6XFIkwApsJeVoBhpQqBLZpmT9 PU5BNgbXXjwpbfRBAweADQ05nhJGN7LRKBPPqEd6GRWebGsAniNK9fILQS5XZTI1EhHq cftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=jOw4W8GJQAfba4Gl75PFIqR6yUcnSiTb0cnPPH4IqEo=; b=OZaAEZHNZqLooKt60G8Pj1qHvNngWVTfJGWGhSRFaHk1WTjiuCcqxWFFKNGXQYLy29 H6ETbqNnPIcQlRhVd07gJkBNZyizYZwJFvKk4C/9U8g4mEhIEf35Et73+dnRqTicw8Xw Q/SaZbzvOep3nAH4jcpfT0Br7Q72MPNst45Fqv2zkoCzixgBcyn2qsvZ2YZYhkY1lm/e U/ik3iVaoEcx/Q/w/hkEcsXte91cV7JpvTnavFAnbFZI8s6MDyKiQvz4Awdk7Q6jUmYy oNUd2o25OB+6NiHfi0XIfIvYqbdndgNJyQZNOIFp5IZvOdczNZuRlV00xnQoBvdIAs5u s44g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=dU6rCfz8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 jf6-20020a170903268600b00186c3af9680si13057235plb.98.2022.11.22.08.11.52; Tue, 22 Nov 2022 08:12:09 -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=@suse.cz header.s=susede2_rsa header.b=dU6rCfz8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; 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 S234086AbiKVPwz (ORCPT + 90 others); Tue, 22 Nov 2022 10:52:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233768AbiKVPws (ORCPT ); Tue, 22 Nov 2022 10:52:48 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E0DCB854; Tue, 22 Nov 2022 07:52:47 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DDE9A1F86C; Tue, 22 Nov 2022 15:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669132365; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jOw4W8GJQAfba4Gl75PFIqR6yUcnSiTb0cnPPH4IqEo=; b=dU6rCfz81V/ZTtLlq5TSfNE338urj5f3ezv3pCwa8+XeTmdhNqxGENAIa8AyIJg0uQ50uN 298y/GacpMOMq7xA2dnMUkMjMN2Kf/nFUrFIZ4thruPBOY3SJXkDamrjlrpj7W8+RRM+U6 8PQX1F053DZt0cBhBjOTcv3/9YWq4IE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669132365; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jOw4W8GJQAfba4Gl75PFIqR6yUcnSiTb0cnPPH4IqEo=; b=wF4zwCaimH24n1jK1HXf3wizXD/+XsO6yC/79qPPgeT4blMTuPHkGnY8xaSO8f2Q0frlCX 1ItuFn+DEnlf59BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B1B6013B01; Tue, 22 Nov 2022 15:52:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id V85YKk3wfGMSJQAAMHmgww (envelope-from ); Tue, 22 Nov 2022 15:52:45 +0000 Date: Tue, 22 Nov 2022 16:52:15 +0100 From: David Sterba To: Artem Chernyshev Cc: Chris Mason , David Sterba , Josef Bacik , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH v3] btrfs: Replace strncpy() with strscpy() Message-ID: <20221122155215.GG5824@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20221121185427.GB5824@twin.jikos.cz> <20221122145108.3710710-1-artem.chernyshev@red-soft.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221122145108.3710710-1-artem.chernyshev@red-soft.ru> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SORTED_RECIPS, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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 Tue, Nov 22, 2022 at 05:51:08PM +0300, Artem Chernyshev wrote: > Using strncpy() on NUL-terminated strings are deprecated. > To avoid possible forming of non-terminated string > strscpy() could be used. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Fixes: 475f63874d73 ("btrfs: new ioctls for scrub") > Fixes: 606686eeac45 ("Btrfs: use rcu to protect device->name") > Signed-off-by: Artem Chernyshev Added to misc-next with minor adjustments, thanks.