Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp169636rbe; Wed, 28 Feb 2024 16:21:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU+VshttDzKmP7DJFgqe02R8c6IAjBFtGmFZAMO4gmLWWhjiuqmwwTIfmuhHTR1QBLJ+jXcL4R93PHaKB1Vjnm9D/15wSJYaZseAVnaIg== X-Google-Smtp-Source: AGHT+IFx0AQg2OiaHJid2WeVNGxJ7Ts0PCACByUxXP5pdYP1PFLlRNkvqKwsUHVU7p0Hd7oVf9c7 X-Received: by 2002:ac8:5dcb:0:b0:42e:74bc:2177 with SMTP id e11-20020ac85dcb000000b0042e74bc2177mr513222qtx.61.1709166109385; Wed, 28 Feb 2024 16:21:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709166109; cv=pass; d=google.com; s=arc-20160816; b=NJya3ib+pyLB0mCPm/rHkg3o64UjByPzre6EGue0iR7hz8NZq3uLEZ6Aoppt/K+2HZ qrD461yjy6oRkxslmyuzzDm3YwLfwonrF2IcM3p47FG0yP7egDjMdZ4LzHMWoq2NLdCi pXqh1XESxHdb/cZgWTQHtSrijveDe5/K+odcYT+m2X35n8bvc0XnEI5yvDlYeU5wcY4/ uFCuCwRoYGOlQNtkUk92+0oKShFyI4zM4RI2iioGLzjn9rfXF53VMJvSI47difF9CBEW CmSHn54AzK+SBJQ7mJ+lSXTN/uH6RzMHuuMBgSpy8Dul7UESDoeIaN+1AoXJ6QKLl/1T GsJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=K5uqn8jk7ThAKtuWvpjc6qdSbK1EvuBbH6icwTpGIW4=; fh=9aJi/bPv/EdNmdbwdk91URHzusySUYdDCkaOrdClMac=; b=VSOIj3ggbt9+zNMq5KBpThxWXsRyQ66FHNI8Ztdv1O6E3Jx8Dbz4vYSML/m0+JKVRu v7GqhH4sRHUKagHkia85X4LQrBPmjIA0V9NM3GKyFXdwN0CNknLXz45nqp4Dm0WQzqVd KoitVn2V4eTkATw34YAwTc1FRYxRKW9dUdEdXwIZNp8dVGyoAEsWZrwJmo8TWQHLJ5L0 Du6NpZxir2RKk6x2UEvQwBR+DJpBw0B51L3kBDT9wd6qBjlp+5tVB6siPKbsfEEVLEcP +Ba01M9HOH9CTjzYNFxAWPwX4xzzbPWMTdKzXGO9TqPfwgdHb3qWday0dczkcpKBQogO yl/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zd6FsrbG; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-85903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f14-20020ac85d0e000000b0042e7e274203si359307qtx.21.2024.02.28.16.21.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 16:21:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Zd6FsrbG; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-85903-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85903-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DD55A1C20E85 for ; Thu, 29 Feb 2024 00:21:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A14485A7AA; Thu, 29 Feb 2024 00:18:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Zd6FsrbG" Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 601B557333 for ; Thu, 29 Feb 2024 00:18:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709165930; cv=none; b=Z+fVG4TGtyw5xYlRmKeZ0MmlOuVST0r85tVT0W4JHTK+lb5v5IBMmrXjQZWkj+cFJLMGmOsaPxiBJ3GWoqVj7C2WxMOZR2Wj7PqG+C894ryh5oIa9p9PpHKvOpQaM0Z42oDd+UaKBxQWFTs0Ypp9BqtC5CHIiWORP8NkROvwwwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709165930; c=relaxed/simple; bh=9DJj6YTz0ZZOl6MAUN9AsplTyADMYRPheFd4FjREcq0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TNHhjwIF/Ejr2OlRThlzitIUarV8uOCjcquy2kpNcbWBCRbptjEfM1dmCQBPEZyZAPxcvLu+YQBiMnPEkZaG1xRXsSD90Kn2oVgU8jcdCEP4jnPI66QF4HyG5LtXRp/+wqafyPR4vwbJLCtyX2mw/F/CJ2UqkyAu5vIgD3gABvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Zd6FsrbG; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-299e0271294so191902a91.3 for ; Wed, 28 Feb 2024 16:18:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1709165929; x=1709770729; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=K5uqn8jk7ThAKtuWvpjc6qdSbK1EvuBbH6icwTpGIW4=; b=Zd6FsrbGvnNHW8S/xTkaP8iOt0/OYTPNpeWEampDlCmOtdciZpBKQacdXgA3W8WqKd je2ed3pek8hzLO8jLXSAiCfElrc/dD2tOLHFMyF0P5JuV1g+AZaU0I40tkMAVPEhCjEU kbIf/NuBfZz5rKsXoMemtF89f69aO0mt0e9/4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709165929; x=1709770729; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=K5uqn8jk7ThAKtuWvpjc6qdSbK1EvuBbH6icwTpGIW4=; b=fQCuF3+Wcyck4szZhvKJRiLxVAf9KXCevPQwW3Aw8AIRunDs/Hk0QhZRz4umZuLAd5 OIgCsyjyi/7G4IbLjGRdnEq9DQt3y2VOmpYIS5A+WsHax3wd2Wkbi2cbXFAdjCYSQByL RGCesoOqrRHyUisv8GjTmoAB64g2ZLScmDs22PmMa/bTscGZqB56Ip2tdFSDsxvScJRs QNpz9+KSvb9vJ39btygOXVZC9mqacDppjxR14PwxJHTGSUFZwmOPJjz1+LBLYliV1Kxp tsmx3T9MKytQeTCa3tjtH5i1xk6kor7e/qMcfcPZPNORVKoKzB/zDXkyxYN0dqsIIq3O uDKQ== X-Forwarded-Encrypted: i=1; AJvYcCXX9ufnGLJW8Dkl6Lk0tnUH/Z7N/jVLjRE0eeOtT4iuDDdzCU46/BzndFgFHxJSospRgzdjhuSTwIoGhib1f1tJ/z6u8pM+LUFCAPcv X-Gm-Message-State: AOJu0YzRRmzFJZf8eE4TQC9pni49wHTUcPs2b5Oicwv+COyvqzL+2FR9 N8uu+LuC3gBNUaSCHo+96ViOq1FitsDuVHG30C4rmJhlxaDe4apXAjEljY85mg== X-Received: by 2002:a17:90b:3905:b0:299:6848:28c1 with SMTP id ob5-20020a17090b390500b00299684828c1mr834549pjb.26.1709165928724; Wed, 28 Feb 2024 16:18:48 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id su7-20020a17090b534700b002973162eca1sm2292760pjb.17.2024.02.28.16.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 16:18:48 -0800 (PST) Date: Wed, 28 Feb 2024 16:18:47 -0800 From: Kees Cook To: Justin Stitt Cc: Sathya Prakash Veerichetty , Kashyap Desai , Sumit Saxena , Sreekanth Reddy , "James E.J. Bottomley" , "Martin K. Petersen" , Suganath Prabu Subramani , Ariel Elior , Manish Chopra , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Saurav Kashyap , Javed Hasan , GR-QLogic-Storage-Upstream@marvell.com, Nilesh Javali , Manish Rangankar , Don Brace , mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, MPT-FusionLinux.pdl@broadcom.com, netdev@vger.kernel.org, storagedev@microchip.com Subject: Re: [PATCH v2 0/7] scsi: replace deprecated strncpy Message-ID: <202402281617.807B1B7@keescook> References: <20240228-strncpy-drivers-scsi-mpi3mr-mpi3mr_fw-c-v2-0-dacebd3fcfa0@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240228-strncpy-drivers-scsi-mpi3mr-mpi3mr_fw-c-v2-0-dacebd3fcfa0@google.com> On Wed, Feb 28, 2024 at 10:59:00PM +0000, Justin Stitt wrote: > This series contains multiple replacements of strncpy throughout the > scsi subsystem. > > strncpy() is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. The details of each replacement will be in their respective > patch. > > --- > Changes in v2: > - for (1/7): change strscpy to simple const char* assignments > - Link to v1: https://lore.kernel.org/r/20240223-strncpy-drivers-scsi-mpi3mr-mpi3mr_fw-c-v1-0-9cd3882f0700@google.com I think you lost my tags for the later patches. I re-reviewed a few and then remembered I'd already reviewed these and they were unchanged. :) Please run: b4 trailers -u 20240223-strncpy-drivers-scsi-mpi3mr-mpi3mr_fw-c-v1-0-9cd3882f0700@google.com :) -Kees -- Kees Cook