Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1357852rwb; Fri, 19 Aug 2022 02:08:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR7NF/5VNCc/KxYKP6To6cbZvtowRblwpkhJmc6yupTGCGZ750iDXROqnuwiuHhtJJPc1/1p X-Received: by 2002:a05:6a00:a15:b0:52e:8aa:5a77 with SMTP id p21-20020a056a000a1500b0052e08aa5a77mr6827328pfh.25.1660900079944; Fri, 19 Aug 2022 02:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660900079; cv=none; d=google.com; s=arc-20160816; b=c8i/NTXSxbPr1KQH3hmKXGUQ8ObGkSGId90bUQPWLTpXz4RaY+ezoSaBjWVy1upW84 fyHICbTvsiVFp5fbv/Qxw39NpBpVFv3o4jYCYLnxzjflk3E5eYpshmeptUO2rRsLLqig nguEpqXrQrJlB8l6TY8P05yMVdeC6da3vF7/Xa1DPo+eOUyuNJl77FRed8gY+nt9zhf1 o70adkAK9DEgt15RPy2pyPQ0T4Z7C7fhXpcigaYoi86tzeSuShvm7n6bdPj0o9Z0v+dW B1mGQneF1Oxocb4x6k8FeP8N95Nj9O0LLCBQtlclsaNEQRq21pROYvVMveef/BEMbeJV S4MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=eEfW7ReoLmryNEcARNfg07Sg9GJahxErmaUt7dgovGs=; b=HzrDpynbE4acolhoA4ThF3Cqu/g1IqDRO29tDeV4f1UGXnamAPmNh8ORCsWhg4PQyT f4lNzCXD0G2+I9Iw8PwSiShUQLvXag/kzxXFP/dE4xkX5a3tolG2Fxk9xMlRHDVJe4KC iu3cqDjfqeB26Xuj99rqI8MPogohdCbh790oQFfZczMJhrtbhmMX+o+/beCpywNqcP07 EVmgDdhNg/W9kNTMcaBg2TzpW5bvvKKPDr5bVtWoQsVi/mBKni8qj0Pw5FcMna/qC4xE KkSQE9Jq/DAQCKqPIlu0mfXJqCct/jkgG6Kc/UTeihnaaR5nUgfz0iFvLS0TGA6jqtOn HELg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eV4YBgQT; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k18-20020a056a00135200b005182fb67e66si3743166pfu.159.2022.08.19.02.07.47; Fri, 19 Aug 2022 02:07:59 -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=@redhat.com header.s=mimecast20190719 header.b=eV4YBgQT; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348058AbiHSJCF (ORCPT + 99 others); Fri, 19 Aug 2022 05:02:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347335AbiHSJCE (ORCPT ); Fri, 19 Aug 2022 05:02:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23F6EF23C1 for ; Fri, 19 Aug 2022 02:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660899722; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eEfW7ReoLmryNEcARNfg07Sg9GJahxErmaUt7dgovGs=; b=eV4YBgQTeJKxgkJ4VINIRwDgyqD1nMaS837EQFNj1DpamgGWvwML5Qr91YKoGFTIEaHclx tB3rFAOPoyjPo3JZGvYBqZ38FjkGt/hAKlu4VruOlEfHBwr3FVEEsJG6sPd0XDh4u9xN9o /06qi3+xCVSt7eGBxsm0ZVqxqOO37Lo= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-374-APt0Vv2CNYmvJXisrtiNow-1; Fri, 19 Aug 2022 05:02:01 -0400 X-MC-Unique: APt0Vv2CNYmvJXisrtiNow-1 Received: by mail-ej1-f72.google.com with SMTP id nc38-20020a1709071c2600b007309af9e482so1283398ejc.2 for ; Fri, 19 Aug 2022 02:02:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=eEfW7ReoLmryNEcARNfg07Sg9GJahxErmaUt7dgovGs=; b=tXqKZvUUYOauK6kweA4LcvYUGvOne2ZFo9ztPhO/hQSGPragrlozH+Q59oEaIqxySz WEQSWNTYcXFxYIH27pdsgLdwxUpSOay5YktcWgSJlKsPzUoZdjnzRkRq5S2KOiq/wLG7 PV/OZClpeRrdagvYZfIY1cY2GgP0GaaEJibvt2S/K3CUtSKVXFH1Q7yEFkKY+LVk5+a1 p+mW6sQOliEbS8GNtZCojeArqT3gGPKZBv1buwcXmqaxY++ptURKIBrcKktA2hgFWbGn i95JJi2nUUk7B2/T9IwYGJGoCOnJs09BbtvwXsFTvWExw9RXteQG83JuuH9/34Q0nQYc 1b4w== X-Gm-Message-State: ACgBeo1vrJ/jt75aGP8qi4uio0PKbGsPR5zGo3ng+fhljPvKRKV669TH Yxz/OaSD1nHGC3MKhTzVeOnHyyFWrXko2VocvV6XqGufrdVevhOCPp/uLPAvFa+ralZv2uB7iNh aZL6ARFYd3TjAeLHj4GbSxCXy X-Received: by 2002:a17:907:87b0:b0:731:3dfd:bc8d with SMTP id qv48-20020a17090787b000b007313dfdbc8dmr4123141ejc.607.1660899719730; Fri, 19 Aug 2022 02:01:59 -0700 (PDT) X-Received: by 2002:a17:907:87b0:b0:731:3dfd:bc8d with SMTP id qv48-20020a17090787b000b007313dfdbc8dmr4123128ejc.607.1660899719497; Fri, 19 Aug 2022 02:01:59 -0700 (PDT) Received: from ?IPV6:2001:1c00:c1e:bf00:d69d:5353:dba5:ee81? (2001-1c00-0c1e-bf00-d69d-5353-dba5-ee81.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:d69d:5353:dba5:ee81]) by smtp.gmail.com with ESMTPSA id c22-20020aa7df16000000b0043bbcd94ee4sm2774290edy.51.2022.08.19.02.01.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Aug 2022 02:01:59 -0700 (PDT) Message-ID: Date: Fri, 19 Aug 2022 11:01:58 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] vboxsf: move from strlcpy with unused retval to strscpy Content-Language: en-US To: Wolfram Sang , linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org References: <20220818210154.8119-1-wsa+renesas@sang-engineering.com> From: Hans de Goede In-Reply-To: <20220818210154.8119-1-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 Hi, On 8/18/22 23:01, Wolfram Sang wrote: > Follow the advice of the below link and prefer 'strscpy' in this > subsystem. Conversion is 1:1 because the return value is not used. > Generated by a coccinelle script. > > Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ > Signed-off-by: Wolfram Sang Thanks, patch looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > fs/vboxsf/super.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c > index d2f6df69f611..1fb8f4df60cb 100644 > --- a/fs/vboxsf/super.c > +++ b/fs/vboxsf/super.c > @@ -176,7 +176,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) > } > folder_name->size = size; > folder_name->length = size - 1; > - strlcpy(folder_name->string.utf8, fc->source, size); > + strscpy(folder_name->string.utf8, fc->source, size); > err = vboxsf_map_folder(folder_name, &sbi->root); > kfree(folder_name); > if (err) {