Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2124105rwo; Thu, 3 Aug 2023 05:12:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHUPNpmjmyFhrqqgIsNBjH/Sy5DvQqcdnfspnUKH8LYjM86HjboWQ/F+FtHXswZ6uuHRXM X-Received: by 2002:a17:906:3297:b0:99b:e03b:3968 with SMTP id 23-20020a170906329700b0099be03b3968mr7061974ejw.64.1691064749365; Thu, 03 Aug 2023 05:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691064749; cv=none; d=google.com; s=arc-20160816; b=gD6qZ5Vdw2WW6mZFUAHftDC4eOokoXDOCTXe6uUR8P0d4itPYSYBgLtI5GDJ1p7ABN WhII2ps2jpCDDNL/q2Krfm4EoTNXvHgAU3Qo4/dXnZ1feMS2FiFOABsC19PawTJ4lR1x JIhW7l7CNjIRXhDbSFd+1x9D9E40tl82qyuh0rPKhLxi0NMZ8ykPqg7bWv5Uy7Osza7S cfCdYlxxqjYXQHP+6sn83jXCaPAiSPYx2ASxcAsDml7FEfbNMVnSCsAKe3fPnGJxr4bD t2+6s2e4EApFSWhmzzU93p05J0XSBZDznJLiBQFXlV8nPUG6A4TGhQYAdnqtbodw+VHr vwqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=JgVWl7R2giFuD6NMMTCcJuA2wMZFAtFbQgf2szKzLgo=; fh=xc271MWd1COmQlI2JtN3FS1tCmUhys3noJn3LVXZ+CM=; b=xQcG6H3D519rVKrmW2p4kQrU3L/cYw3wMCTyWdH5qpu1T0unevLp6siU2I/wnbd3kR S39W+CHfJTGQziz37Dy3RNvwQavrxLPp3gyaEnHiJ9TCOwfuFBpTe/+4822rgA5UoGhd U+ZIoCo5C2lM2QF69GX2pp7GX7Yix2Hqmo8zjLY3546k/Mh/qQMq+847Mk+C6+1LNmQS jcX4ENUcwdkbNUxX9X0or25Z0EuzFKqLr09+jrKzGOUJW2eN23Uq3NDbkJz4ifMmSB7x G8OORJy74pe5hErRI/Pug5fT+rUznTMM+W1hgSrHAt87aOifITff4n8M3D6TBSN4n1MA 7xXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PtPJeh1W; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a17090681cd00b00992ee6da8e7si11617625ejx.740.2023.08.03.05.12.11; Thu, 03 Aug 2023 05:12:29 -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=@kernel.org header.s=k20201202 header.b=PtPJeh1W; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235709AbjHCMBP (ORCPT + 58 others); Thu, 3 Aug 2023 08:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235702AbjHCMBN (ORCPT ); Thu, 3 Aug 2023 08:01:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64BD8273E; Thu, 3 Aug 2023 05:01:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ECF1C61BDF; Thu, 3 Aug 2023 12:01:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4EDAC433C8; Thu, 3 Aug 2023 12:01:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691064071; bh=VdVcZMd++gEDJ3fMlMp1laSbmWflsqIZsBMFRJzcdrA=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=PtPJeh1WMsC5tgpZ6HA3D3pHneTw+XpYfBmoUK6R0HOXaXqcynDoSXhcRMqhlZ1EY VKdKD5o8tRWakwwrVgPto1UVbFxYiCJtMY7rD3bFTMAIhP7GWqEkjIbTVo3lLeQc72 EzGR3j9Tj/2shuxqU2mF7wzW48CvvBupLphgSp7tQcTVPQGZbDfE1zei0luf3RaWAx oB0hG2yiPwvWnBYhYyydLzqaV5k4UAlIj4eRp79iaU+Ay5xmSSMTfABsh0ZMsFa2+l eqrgT17t112YUGivd+/4lQmftGbg3dOosmlGvQJfvcp9rSBIfKNCgYjnUULG51CqrQ oxfhu7jGNSRgw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] wifi: ipw2x00: refactor to use kstrtoul From: Kalle Valo In-Reply-To: <20230802-wifi-ipw2x00-refactor-v2-1-d33f765e9cd5@google.com> References: <20230802-wifi-ipw2x00-refactor-v2-1-d33f765e9cd5@google.com> To: Justin Stitt Cc: Stanislav Yakovlev , Kees Cook , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Justin Stitt User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169106406791.1024854.15683351104405009219.kvalo@kernel.org> Date: Thu, 3 Aug 2023 12:01:09 +0000 (UTC) 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, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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-wireless@vger.kernel.org Justin Stitt wrote: > The current implementation seems to reinvent what `kstrtoul` already does > in terms of functionality and error handling. Remove uses of `simple_strtoul()` > in favor of `kstrtoul()`. > > There is the following note at `lib/vsprintf.c:simple_strtoull()` which > further backs this change: > | * This function has caveats. Please use kstrtoull (or kstrtoul) instead. > > And here, simple_str* are explicitly deprecated [3]. > > This patch also removes an instance of the deprecated `strncpy` which helps [2]. > > Link: https://lore.kernel.org/all/202308011602.3CC1C0244C@keescook/ [1] > Link: https://github.com/KSPP/linux/issues/90 [2] > Link: https://docs.kernel.org/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull [3] > Cc: linux-hardening@vger.kernel.org > Suggested-by: Kees Cook > Signed-off-by: Justin Stitt I assume this is just compile tested? In that case it's always good to add "Compile tested only." to the commit log. But I can add that this time. -- https://patchwork.kernel.org/project/linux-wireless/patch/20230802-wifi-ipw2x00-refactor-v2-1-d33f765e9cd5@google.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches