Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp5447rda; Fri, 20 Oct 2023 17:53:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKp5SbkxPAOIoFo1N0ggIl3Melr4SRqzHZxGMyxfWB96RnZG9+SzrVDxg9DxNloPsoh4zw X-Received: by 2002:a05:6a00:845:b0:68f:dcc1:4bef with SMTP id q5-20020a056a00084500b0068fdcc14befmr3865111pfk.7.1697849630896; Fri, 20 Oct 2023 17:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697849630; cv=none; d=google.com; s=arc-20160816; b=gEivh8g1Fh8+CMmAu+6MVtkAxh3Gv5AF32A9qOdDHJImuH+vsXnfc8J1b3MGzuTAnH cNwyaoKMGFv4apXofF/ZOQb1g24wOJMcPRJYcrRzRfZS6NHOfDemwB2HZkMNhSaodByb DiFRUiJjrms5jh73uSjILs/NupF4CKpIlBI7fAmzkmzciTKKEvBuKamOgnXP7TaDjf02 SxLrhm/RZS52bGdoFxHiq8/py/W+ov6FzW3YfQcLAiG+6w6jOfLwxTwHnF9eo1XJi64R Xd6K6mDd1A0dFtTk3lv05sCKRsfmO0O00+q0t3bF0fNxvib8SEpxgPDUzXqNfQcGdG7R fK4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=5MRU1+e95XgDKMMJTaugmXm8tJ5TZKvOAmprlPE7A/E=; fh=99Ip3VeEKWStP8h2IHV7VEScOr5coUmUuhXJp8WxueA=; b=B1pe4T8VCjqFjahWIUeovX0JOqmwvqViFHClywwfoRLR/omPvV54shUMX9H17Uv4Nq JyzgcL9paYocPaUdHTgiP9VvwdEll+mWXhb6VVGFYE53i6BZTfmj19HyZb79sPzJaTlk CKny0Nm9yiWIe4re8pYIizMB8vq3fwAsYM3TV4WyDpKHPU8ZM4ztcOf/8t0Z6UIMApru uZUTDPtVzbvY2/33HCHqHWQtc2igI5e3EwpvsPRigYDnGTz8X77CrrdhpXJFLG8bu6pa U4p1S+z8MaYgvXCoB/tomDbIqw+kRFwtp42t2xW9Sh1+ezE/Vaod+QOv7ckvJHevE4T2 AfWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WoVUZj7A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ck22-20020a056a02091600b00573f885c4easi2794850pgb.753.2023.10.20.17.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 17:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WoVUZj7A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C14A18342198; Fri, 20 Oct 2023 17:53:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233202AbjJUAxh (ORCPT + 99 others); Fri, 20 Oct 2023 20:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233029AbjJUAx2 (ORCPT ); Fri, 20 Oct 2023 20:53:28 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4BEAD69; Fri, 20 Oct 2023 17:53:22 -0700 (PDT) Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id DE8546607355; Sat, 21 Oct 2023 01:53:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697849597; bh=95P2EWFUKRCbCZzx5BnicmzGP6FSI+AsQsx9+1qnEVo=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=WoVUZj7Ab9vIsbbb/vgpCdm//2z2FvhRZHBzt+0paEKhVmgfsj1YHwvc8JCK9rWLA lWuah8qoeJiNPoLMkq9jpztZiYECDfkb+uF4vSqu/30DeDx9819ZYUVuGqefClWfEM yMqb6TU3AYYcIQhk81T3w2ke9OydOGRhvNsRz0BtfOpW7ThsNEFK6jLsapWffbTezI TMXXzDSxpxo6u2KA5wtpB7sXvCNbeXTRpv970fi3SCSAcn4g4EC5PUoTPMdD6eCDyV xEZj4GCmB3B56W3X7rwQQ3l1hrodYgpL/xqBZPUycRmoqJ5A8ptUX6IlXzx18Mrq5L A3c8PBPqFt0Rw== Received: by mercury (Postfix, from userid 1000) id 3C9C11066143; Sat, 21 Oct 2023 02:53:11 +0200 (CEST) From: Sebastian Reichel To: Maximilian Luz , Sebastian Reichel , Justin Stitt Cc: linux-pm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org In-Reply-To: <20231020-strncpy-drivers-power-supply-surface_battery-c-v2-1-29ed16b2caf1@google.com> References: <20231020-strncpy-drivers-power-supply-surface_battery-c-v2-1-29ed16b2caf1@google.com> Subject: Re: [PATCH v2] power: supply: surface_battery: replace deprecated strncpy with strscpy Message-Id: <169784959123.1512524.16039657676124942354.b4-ty@collabora.com> Date: Sat, 21 Oct 2023 02:53:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 20 Oct 2023 17:53:50 -0700 (PDT) On Fri, 20 Oct 2023 19:39:02 +0000, Justin Stitt wrote: > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We expect bat->name to be NUL-terminated based on its usage with > strcmp(): > > [...] Applied, thanks! [1/1] power: supply: surface_battery: replace deprecated strncpy with strscpy commit: 81f07d2b0c4db3b6e53d90419db915c75beb6326 Best regards, -- Sebastian Reichel