From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 593EF426D5; Fri, 6 Oct 2023 20:38:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 06B37402E6; Fri, 6 Oct 2023 20:38:08 +0200 (CEST) Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id E907C402E1; Fri, 6 Oct 2023 20:38:06 +0200 (CEST) Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 396HuVbo024129; Fri, 6 Oct 2023 18:38:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=RfFrm+hzEFr7UIyA1OZcXVyYPfbKja/t9KdmsGaOKfM=; b=bE57ePiLm6VBuzGDfIJGlgb9g9JJ5FgKFjl2mLWPUYn3u+zH0SpWywUWVnsABhh7rPUm fzTMu3bKnu/lE83dQuqBmQQhBvjcT1EXuyXuYVkKioC3cvWxztaej0dt15u834hvQ3Yn CTvPNAZjaIB0STW6Zxnfs+JDGjO00yW1k5r3OFtfO3KcuUoTvaWol6kuHZxbB0Sp7w1p qbpmZluqnU8YAf+PDUhjg7/a+IVIrXYa8G9LQV/r8iZP035NBssC1XwRQe74bHaQ2EhT S4NYQJQb9V+YuWP5uR9YrcEDVrHBYP4eU247xoAiKf+LsHdSckF34qyRCPHwKXDvPjGM HA== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tjq3291nq-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 18:38:04 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 396IBbkJ005924; Fri, 6 Oct 2023 18:31:44 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3tex0ucav9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 18:31:42 +0000 Received: from smtpav02.wdc07v.mail.ibm.com (smtpav02.wdc07v.mail.ibm.com [10.39.53.229]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 396IVUEG7406122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Oct 2023 18:31:30 GMT Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82F9A5805E; Fri, 6 Oct 2023 18:31:30 +0000 (GMT) Received: from smtpav02.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD5695805B; Fri, 6 Oct 2023 18:31:29 +0000 (GMT) Received: from [9.61.119.22] (unknown [9.61.119.22]) by smtpav02.wdc07v.mail.ibm.com (Postfix) with ESMTPS; Fri, 6 Oct 2023 18:31:29 +0000 (GMT) Message-ID: <76a65428-5c3b-0a26-a8c5-cc66799e9375@linux.vnet.ibm.com> Date: Fri, 6 Oct 2023 11:31:28 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2] net/tap: resolve stringop-overflow with gcc 12 on ppc64le Content-Language: en-US To: Ferruh Yigit , Stephen Hemminger Cc: dev@dpdk.org, stable@dpdk.org References: <20230322212439.524725-1-drc@linux.vnet.ibm.com> <20230323170145.129901-1-drc@linux.vnet.ibm.com> <165a233b-b41b-3a65-1866-5b7c94993b40@amd.com> <20230515162032.36a4f3ec@hermes.local> <20230515182838.08e49a7c@hermes.local> <44fb2571-8f96-570d-cb35-210fa5f52d9f@amd.com> <0eccde0d-6fdd-4351-87c5-930b22ac2d0d@amd.com> From: David Christensen In-Reply-To: <0eccde0d-6fdd-4351-87c5-930b22ac2d0d@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KvQoFsilP7rtOYziFxxQEfse5nob1LaP X-Proofpoint-ORIG-GUID: KvQoFsilP7rtOYziFxxQEfse5nob1LaP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-06_15,2023-10-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1011 priorityscore=1501 mlxlogscore=655 bulkscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 mlxscore=0 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310060140 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 9/29/23 6:48 AM, Ferruh Yigit wrote: > On 6/7/2023 7:47 PM, Ferruh Yigit wrote: >> On 5/16/2023 10:55 AM, Ferruh Yigit wrote: >>> On 5/16/2023 2:28 AM, Stephen Hemminger wrote: >>>> On Tue, 16 May 2023 00:35:56 +0100 >>>> Ferruh Yigit wrote: >>>> >>>>> Yes only some scripts and possible applications that hotplug tap >>>>> interface with hardcoded parameters may impacted, don't know how big is >>>>> this amount but this ends up breaking something that was working before >>>>> upgrading DPDK for them. >>>>> >>>>> And I believe the motivation is weak to break the behavior. >>>>> >>>>> Won't it be better to update 'rte_ether_unformat_addr()' to accept more >>>>> flexible syntax, and use it? Is there any disadvantage of this approach? >>>> >>>> It is already more flexible than the standard ether_aton(). >>> >>> I mean to accept single chars, as 'tap' currently does, like "a:a:a:a:a:a". >>> >>> Agree that impact of tap change is small, but if we can eliminate it >>> completely without any side affect, why not? >>> >>> >>> As accepting single char will be expanding 'rte_ether_unformat_addr()' >>> capability, it will be backward compatible, am I missing anything? >>> >> >> Hi David, >> >> If API update is not planned, what do you think to just solve the build >> error without changing functionality with a change something like below: >> >> ``` >> - (strlen(mac_byte) == strspn(mac_byte, >> - ETH_TAP_CMP_MAC_FMT))) { >> + (strlen(mac_byte) == strspn(mac_byte, ETH_TAP_CMP_MAC_FMT)) && >> + index < RTE_ETHER_ADDR_LEN) { >> >> ``` > > Hi David, > > If you can confirm above fixes the issue, I can send a patch for it. Confirmed that your proposed change resolves the build issue on ppc64le. Appreciate if you can submit the patch. Dave