Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1217519rdg; Fri, 13 Oct 2023 14:04:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQ0UUdpD5B1jw/8ECHW505/sgsGvzFRfEQ5Yx6NIUNyNabKIsxcPqfaemzoT1iVGjub5D8 X-Received: by 2002:a6b:ea15:0:b0:790:a010:4c42 with SMTP id m21-20020a6bea15000000b00790a0104c42mr31523297ioc.13.1697231068278; Fri, 13 Oct 2023 14:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697231068; cv=none; d=google.com; s=arc-20160816; b=nHZdY7CoFeYiRQb19m/hJ7nSRAhF7cK/j4cp7iNScJrEA+WpzQMIGExyWjWr25giLC aGtU2JDU/qcDKiK7lwMp+zgQWWO1A09nDTySXVbYSFxRREMygBApJE/9oEjJ6c7FBjQo zClLbvVcvi7+S3Rx9oPxX14A4yBcZg1WfpXn79kV8CM2RAyGpB5kita9adMfqCxRHMdy X32mcYKjZG8btVYY5E2qtSHYGHTVDTWjc/e0Fdb7P9gH3ZTNy1zJ229ceHmGwL7J61Sa a6zHTAVZ+toXwkeBvWyiqMtwl5m4lTrr6wIqApp3hYa5K4SdrdXdaK7UXqfM4r61SozP MCsw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1ckC/D2af9B1OxbwAKPUry84euwDZtXoEbOMk2pCkW0=; fh=6vtZsvQD87AiQ/BfiFQmgXqSLDIsCCE6OizpKGuvxmo=; b=bLly37GKkqvZPwWIFN1IYCBInE/8VgFA1CqGhQ7/kiEG4tQFGoXi831cZUK8j2u6nM eDFdDRpiKUT2cq3PSkTrpuZx4xIXVGBvOxvd+OC5Pav4PZ/etyJ/sAKCFjp9Ug+loQ+g F+PBpzaYZisTTyAOMI0dyQRAIsdm2wRYa/TkR4cAljvg7ZyMihEvA0hFC6pRQufTB4h/ lDHpRpUCVvsCoyJ5/7cPKsTp3mGEeFQzGy5hgL2Xj6lIWI0HGhsLtOpY36pTS5hvMsyd zr2fEw3yYybHjc53lJBSPs+tpXcdTtIOhMBOgO35VBa/szcmr0U5KTpH+K/BHBnHSlCj YCjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=YUsYhhST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bq1-20020a056a02044100b00565f182839asi2292855pgb.28.2023.10.13.14.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 14:04:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=YUsYhhST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EC12A82EA145; Fri, 13 Oct 2023 14:04:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232159AbjJMVEF (ORCPT + 99 others); Fri, 13 Oct 2023 17:04:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjJMVED (ORCPT ); Fri, 13 Oct 2023 17:04:03 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70BC7B7; Fri, 13 Oct 2023 14:04:02 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39DKwuVw006388; Fri, 13 Oct 2023 21:03:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2023-03-30; bh=1ckC/D2af9B1OxbwAKPUry84euwDZtXoEbOMk2pCkW0=; b=YUsYhhSTpKiO+rHnFTmq2Cyf+COTP02aKgiVy0LImDaWNe8NKdunFhVl78y5SPY+Uejn 90vzm1AZnjdFTWW09+LNX0bVk9mlXxVJpL9u4rSHquCIDx+qstI1N+TuHa7DGDyElAMb vdPaHwT4Ao5SbSEyNgXPDir09ilzZ7/fTGnr6HKyxcxlYQi3Zu98xaiK8epopiSvSBED p1XmQ66tIleW2hsykVxwMRwNM6/Bym8EoHQ4248D8Ram35yP6j/WFgK6eoo6dHfuT5sT FcbNZtmhXgY8dFNgrnz2WPbW7eFoG8zbM3DsqjKhsaq3w8uJC7fY9RaubeTUYAO7L+AH ZA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3tjycdx194-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Oct 2023 21:03:58 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 39DKLtrn037518; Fri, 13 Oct 2023 21:03:58 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3tpt0uxn7m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Oct 2023 21:03:57 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39DL1kdj003704; Fri, 13 Oct 2023 21:03:57 GMT Received: from ca-mkp2.ca.oracle.com.com (mpeterse-ol9.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.251.135]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3tpt0uxn63-3; Fri, 13 Oct 2023 21:03:57 +0000 From: "Martin K. Petersen" To: Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , Justin Stitt Cc: "Martin K . Petersen" , MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Kees Cook Subject: Re: [PATCH] scsi: message: fusion: replace deprecated strncpy with strscpy_pad Date: Fri, 13 Oct 2023 17:03:51 -0400 Message-Id: <169721547124.1657123.15010949284795786278.b4-ty@oracle.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230927-strncpy-drivers-message-fusion-mptctl-c-v1-1-bb2eddc1743c@google.com> References: <20230927-strncpy-drivers-message-fusion-mptctl-c-v1-1-bb2eddc1743c@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-13_12,2023-10-12_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310130183 X-Proofpoint-ORIG-GUID: HCwqWy4GZ3wpgE7XDZrOzLhtIPr6oBFN X-Proofpoint-GUID: HCwqWy4GZ3wpgE7XDZrOzLhtIPr6oBFN X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 13 Oct 2023 14:04:23 -0700 (PDT) On Wed, 27 Sep 2023 04:06:09 +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. > > Since all these structs are copied out to userspace let's keep them > NUL-padded by using `strscpy_pad` which guarantees NUL-termination of > the destination buffer while also providing the NUL-padding behavior > that strncpy has. > > [...] Applied to 6.7/scsi-queue, thanks! [1/1] scsi: message: fusion: replace deprecated strncpy with strscpy_pad https://git.kernel.org/mkp/scsi/c/4280a0a70170 -- Martin K. Petersen Oracle Linux Engineering