Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5758108rdb; Wed, 13 Dec 2023 20:31:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqGn7y4nBOKPO+08eKI20esNhTke1YxQSVrDh9n6g8/cLVmDTOnzsuu4ltRwwYKzJ7aHtV X-Received: by 2002:a05:6a00:2303:b0:6ce:945d:80eb with SMTP id h3-20020a056a00230300b006ce945d80ebmr13607994pfh.2.1702528265128; Wed, 13 Dec 2023 20:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702528265; cv=none; d=google.com; s=arc-20160816; b=oBSlWIc71yY548jdnrBbIaIo/TI8zWQRAsr3FOTBHjBl2aC2cNU7zX1op8UjozJmm9 QNMZm7yeGOD73XS12HaDzYGrXHxi9jyLfc73s7dE2bUwiCwpR/AG5NnIA9TmAzIopekH 8KjVhkUqr5ZQPFb3YwUAh48+gvuXcduhtceC8Y5B0x4bnQ8elqOnRsTIVRUyKyrNVDM5 zfISoHcMtQOpFAZnbcox4qH/2xqxI2M/WK8dsdfJsfkChJssiPR7e32qbLxY1N0oYH17 74m99vdUr5MzdfwZiTDvCoGxKPEbrBRQpAJJBDswKtR24IjADP16uJZGWc6C6hfZJlAA iFlQ== 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=BL+jEWPqSu1ilxcp2/QmDgZNNAak2wmbX40ipukDeZs=; fh=drMYKujFEWn5jsjahZeY98AZaZhPCWlp3F6/ttT7dF8=; b=SWmdp5athrVOCVcfhrw/uAjLlgvVClVcLosBrdm5NsWXt0Tg3ofBWsrpPhpz7GFpFt UeT8H/uBFb5v2OtTYTqONpV32cic1veYJBAMa+GRpIcjL/2YGn27CFWOuyOOsjf8iaXq H8dyrUtCyTrojhIHd256nThPh33abL7xnq8pAgDZfTlJRwzh6FiPXdEFsnhXKZPiCbhz iENbaq9pL2GVdiIAVn3AZiCwhN3LFKnkU3/M9gMHM7+mc4Ocau0nwroYiwAx+qQIwn5Y az/UC4xseE4CcCK5PfvzFYdtTtvlgl0gMGRpsvJE/WzKFrig/UGL01EsbY1nJHsCWYZv ODfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=foS05MMc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id du23-20020a056a002b5700b006cdf3e98118si10235297pfb.118.2023.12.13.20.31.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 20:31:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=foS05MMc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 56CFF807AFD6; Wed, 13 Dec 2023 20:30:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443197AbjLNE3v (ORCPT + 99 others); Wed, 13 Dec 2023 23:29:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443111AbjLNE3h (ORCPT ); Wed, 13 Dec 2023 23:29:37 -0500 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5BA0135; Wed, 13 Dec 2023 20:29:43 -0800 (PST) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BE0SBvn026933; Thu, 14 Dec 2023 04:29:30 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-11-20; bh=BL+jEWPqSu1ilxcp2/QmDgZNNAak2wmbX40ipukDeZs=; b=foS05MMcxgfC1i8uMnJLn4lX24WEuPYDWhxmBF1BlncNDrlsyLYVcbdnbupDotDPEtc9 mz7kPnAYT8IybiiY69Urkuq81s/U+VP9rAowb3FdXuQ8Y7MqZloUQ25Bv2I4Asf3mZcm Suj3LPypAyr+D2scRtWRSapknt3zo1OhspXtv+61/wNg0KgKbNpLnIPoDpN9StfkFAA0 8TI2EYm4FoFWP2bgXwwXK+qgtUBNTd5+nEcJwoUzFP64dBtpxTWf5jvv7smdycUkxEIY TUeHvMsgtlrcE3zBlEuUg2qi29BRcaFCw99BK09gU5wLILHnDh+vKyvyrPgcR+3ZieWD qA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3uvfuu9u2k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Dec 2023 04:29:30 +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 3BE34tcw010087; Thu, 14 Dec 2023 04:29:29 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3uvep9ev3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Dec 2023 04:29:29 +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 3BE4TQMI035965; Thu, 14 Dec 2023 04:29:29 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 3uvep9ev0g-8; Thu, 14 Dec 2023 04:29:29 +0000 From: "Martin K. Petersen" To: Tyrel Datwyler , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "James E.J. Bottomley" , Justin Stitt Cc: "Martin K . Petersen" , linux-scsi@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] scsi: ibmvscsi: replace deprecated strncpy with strscpy Date: Wed, 13 Dec 2023 23:29:13 -0500 Message-ID: <170205513099.1790765.10945483067909366845.b4-ty@oracle.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231030-strncpy-drivers-scsi-ibmvscsi-ibmvscsi-c-v1-1-f8b06ae9e3d5@google.com> References: <20231030-strncpy-drivers-scsi-ibmvscsi-ibmvscsi-c-v1-1-f8b06ae9e3d5@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.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-14_01,2023-12-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxlogscore=808 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312140024 X-Proofpoint-GUID: VGQd4_DpBw1G4uTkYROxWDOQcZE0Nij2 X-Proofpoint-ORIG-GUID: VGQd4_DpBw1G4uTkYROxWDOQcZE0Nij2 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 13 Dec 2023 20:30:34 -0800 (PST) On Mon, 30 Oct 2023 20:40:48 +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 partition_name to be NUL-terminated based on its usage with > format strings: > | dev_info(hostdata->dev, "host srp version: %s, " > | "host partition %s (%d), OS %d, max io %u\n", > | hostdata->madapter_info.srp_version, > | hostdata->madapter_info.partition_name, > | be32_to_cpu(hostdata->madapter_info.partition_number), > | be32_to_cpu(hostdata->madapter_info.os_type), > | be32_to_cpu(hostdata->madapter_info.port_max_txu[0])); > ... > | len = snprintf(buf, PAGE_SIZE, "%s\n", > | hostdata->madapter_info.partition_name); > > [...] Applied to 6.8/scsi-queue, thanks! [1/1] scsi: ibmvscsi: replace deprecated strncpy with strscpy https://git.kernel.org/mkp/scsi/c/712b3f43ba0e -- Martin K. Petersen Oracle Linux Engineering