Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8992838rwd; Wed, 21 Jun 2023 01:18:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5IswsZHKG8LZOrcJm6OeA1LARmEZr+ZM2flz7tI0ITZd6j9G8e9DnjYwwvHIh4NoX7I/7L X-Received: by 2002:a17:902:ea01:b0:1b0:3576:c2a9 with SMTP id s1-20020a170902ea0100b001b03576c2a9mr11989198plg.33.1687335533418; Wed, 21 Jun 2023 01:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687335533; cv=none; d=google.com; s=arc-20160816; b=NDRsbCpuuOWe33ApucH3Qzm5oc/1e9CzALd/6khlUwnV++yJFCleYURiWPutoCv/ar 955E5D+8aZkf1LMqmLH6DpXKjNz26Xv/uUYlsSTc7MhAl/q+HUZBjTdO9BazMMQbKxDo q0ACLDSCPnnzmD7p+HpeyulUs+fSBnvBJhAHIOL0QzEexIHd7bqCMdeNqZXCkMGsIWiZ vFrszf+pSJXUt5YrDQq9G+2ltMfLv5n8cuyxDHBsgQxvFzFI7nypJ/uKwF4Fh40UzkMI 8tAhVBc+TyqiSYavS9Lynx+e7MphGbBSxlnPB0J2F6gPva6w9wtyMWUM7OVOSRj+nYg+ /vgA== 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:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=q78sq2YhM22Z00OGiJGLqB9JmI8Evj5dQU327NtR4YU=; b=qJbPNlBI9C9N+nScA4fqy2UxRyeky3REjHnurw1EhGUYGeSXMcrr869AkWfrQzgDd0 AGYhpp2a2/818gAfyTT9eDBNIi7iudPvPxp0/oZKrMNRczFRUwSe1TfP/0pD89z+y3NF h3DN9ZYUqyrUPAOtOSao1sxMBX/H2beFjfdjgnwkvz8iPizPfbiAH/VO27iAm/01PXS3 rNPRGSacAmvMlFYGdBsQQOY9nEZx2ROsvvSS+qfRhM3cGjUzyUfrR5kIlEIYdauxTDUk /+TQZy45olsJW0zPDKjZlzvZEGHDry3/sSBt5tCVIUFL8aeSsLbGDrYjU5rPasl0eM1J byKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=VPa39nsP; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a170902ecd100b001b025685062si3948282plh.574.2023.06.21.01.18.44; Wed, 21 Jun 2023 01:18:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@yandex.ru header.s=mail header.b=VPa39nsP; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjFUIIx (ORCPT + 59 others); Wed, 21 Jun 2023 04:08:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229813AbjFUIIw (ORCPT ); Wed, 21 Jun 2023 04:08:52 -0400 Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d502]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D8F10D5 for ; Wed, 21 Jun 2023 01:08:49 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:150a:0:640:1aa5:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id 19A275E5FF; Wed, 21 Jun 2023 11:08:47 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id k8dXGX3WuiE0-P5X9g9uo; Wed, 21 Jun 2023 11:08:46 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1687334926; bh=q78sq2YhM22Z00OGiJGLqB9JmI8Evj5dQU327NtR4YU=; h=Subject:From:In-Reply-To:Cc:Date:References:To:Message-ID; b=VPa39nsPVxwdcOEcHig6L83zVARKOsQkzOmBdzi8FNehiPWDM1jgi8tjpHV7oMDwD BnD9iAYFhnmSnfKw0rZYekaSNRqndv1JKwy5dFS/Nvi1JpnC6v7tQXA0qeT/uVn61q hpzPwuLaPwCJa3GimeOyys1/0dszopOGT0tbxoZE= Authentication-Results: mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: Date: Wed, 21 Jun 2023 11:08:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Brian Norris Cc: Christophe Jaillet , Kalle Valo , linux-wireless@vger.kernel.org References: <20230620100803.519926-1-dmantipov@yandex.ru> From: Dmitry Antipov Subject: Re: [PATCH 1/2] [v2] wifi: mwifiex: avoid strlcpy() and use strscpy() where appropriate In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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-wireless@vger.kernel.org On 6/20/23 19:08, Brian Norris wrote: > I'm not sure how a compile-time constant makes this "unsafe" at all, but > if you feel the need to change this, then sure, this works too. The only reason is to avoid strlcpy() which is now considered deprecated. > FWIW, this 'firmware' pointer is all derived from compile-time constants > too. So the commit messages seems misleading ("all other calls [...] > should be safe" --> well, *all* calls are safe). Indeed. So I think we can stay with strcpy() everywhere except strlcpy() to strscpy() replacement (just to follow https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy rather than to fix something). Dmitry