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 0B40843685; Wed, 6 Dec 2023 04:04:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89A9240EE5; Wed, 6 Dec 2023 04:04:44 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2086.outbound.protection.outlook.com [40.107.22.86]) by mails.dpdk.org (Postfix) with ESMTP id F084340ED1; Wed, 6 Dec 2023 04:04:42 +0100 (CET) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=eGAkmlfppRFhHIIc8xSCJUMMjy6EZCgTdD1nv42MrrlKjV+iWJ6vjp1og/2xdMRvaOUkHwUpVrZVzs/rqbc9uCAuZhWLDDH5BwGnf5HPNXZXW4M2j0KL3JeXA+B/l+Oa1IAlwuq/uSrQo4R4c6ig0FQS6mDE9l/cGZmft3GDLeZGowy7FvVJB5LLW0WNkG9888sjd+oBAcU9DlsTX0GITja3zh9l/MLp3ZJFRpdoB2QLX49viQSfk3V11tKinNlEtpJ74TnHrLoOlheaaVlp5Y3A8XhIlnpu25LwUEVK7RNjo6Db2DavPjMHkLVhW6fjKpTPVtwOD7Ia6GSGfoNNaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WHO8rw9r5Wq/DH/9kri9joJS1eYzMdqXvIz6UrzX6jw=; b=mVPo13Ty1jaqHvnXHMIM/Doop/ehr0vCHps1nS5jBNDOLw+tLaYa/TwOFdh4d0Mvh2c3knSRnFIx/q6y1j1eRsKNEF83kOcHAd53BvJrrAnEGVOgGCJIz0IZxRcYJ1iZDW3g99tPdxvzqtTOukwoPLMxTDVvAhruxi9h2bHKd5xU0PCechHoIdYqFNZ+C2R+3P0YFf85drwIdnecs6gQ02aG2PDkn0E4+2dJhrFzliWbTxvRdkVCnE0/7SuUlACFCSW/PsuA5fMnh293SE4QGm/wk/G0pvQgh3RyDscdstVXy44PZvtjqCzGj5qmuvtyyj5KMHDKRHJlAQ16xMD+9w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WHO8rw9r5Wq/DH/9kri9joJS1eYzMdqXvIz6UrzX6jw=; b=U3fJmCqPrPwwWxYdyKhyiXaGdvPOYyaShRVe9FIBFRnwU0sC0v2tZ+dBhHf1QkQydX9A1u87wla8ZiEgrkn2Y5g+qE+SX/yyFnqw8mUZaD0d8oSsm+JIhOAifDsn82LPNp0jt9BSX7zXJMxj0mzA/l4gT9XF8zIljSvu4eoH/vc= Received: from AS9PR05CA0187.eurprd05.prod.outlook.com (2603:10a6:20b:495::26) by GV1PR08MB10642.eurprd08.prod.outlook.com (2603:10a6:150:167::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 03:04:40 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:495:cafe::c3) by AS9PR05CA0187.outlook.office365.com (2603:10a6:20b:495::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.32 via Frontend Transport; Wed, 6 Dec 2023 03:04:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.20 via Frontend Transport; Wed, 6 Dec 2023 03:04:40 +0000 Received: ("Tessian outbound 7671e7ddc218:v228"); Wed, 06 Dec 2023 03:04:39 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 37561d2feea9c843 X-CR-MTA-TID: 64aa7808 Received: from 2c4be60658c3.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BEC0EF47-4A02-48C6-BBCD-809653498846.1; Wed, 06 Dec 2023 03:04:33 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2c4be60658c3.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Dec 2023 03:04:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ta7yxa36z3HMI8bD9ScVwEJy7mZMRXFXvXHX6Pi5zf72CpZt+PEv6O5rZCKo7KBs1bBk3ZuUuFzM6vzuSOjrjNYL4v+lfYDmt/0jx3XSYCg/vujQFIJJzA8qifQw2+MCy6TINSEaHMUMmb0bdiGwqxZwSlHKycWfuvFyfISj1sJnqSWYDmvxRxutqeJ/jRzlB084Jpb4cJQfMGRkQfIkb/869Gnf2jnaXB7azSSWG3Pgun3D+PmaNAyPiE05t37eOG5OgL2oFm2F7cUwnrBgHhdnALFjX18Vqe+yKga4tLcbvgElH/f5DShJhQ2E8n1MGAK7EtV8zy6UAdLBW0OMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WHO8rw9r5Wq/DH/9kri9joJS1eYzMdqXvIz6UrzX6jw=; b=Dt1eDpF4F03356GxYc+z8Z8UeC1tmRbRDcuIJm/EfDKpUUMzLDYPQJQTuBo1wfXIfQi1kUWJOzy4nCFkaFmPSOZT0H6x1VL724Gmqc+LhhVQRP0suRyXcootyZEXMRQK8FAvgfUY8EE2V1V2gMKrIRVR1LxcY0jQliaYRJMf9BdgEv07yf3m+bqWVZXJ1ZwlfEf3eoYNfdghDWt3K5pW9Rq8ZpKT1G18J3uYCqGbLNksy98pr3LbNo/jitLa5DB6A6Uy+h552rFu7go2l5h/pWPF3LhHpAPP9ECd7bNDuazYDg2OzvFExxqPLQc78srrO/Oc0BNa12tT/ecNtJ4sng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WHO8rw9r5Wq/DH/9kri9joJS1eYzMdqXvIz6UrzX6jw=; b=U3fJmCqPrPwwWxYdyKhyiXaGdvPOYyaShRVe9FIBFRnwU0sC0v2tZ+dBhHf1QkQydX9A1u87wla8ZiEgrkn2Y5g+qE+SX/yyFnqw8mUZaD0d8oSsm+JIhOAifDsn82LPNp0jt9BSX7zXJMxj0mzA/l4gT9XF8zIljSvu4eoH/vc= Received: from AS4PR08MB7712.eurprd08.prod.outlook.com (2603:10a6:20b:513::6) by DU0PR08MB7860.eurprd08.prod.outlook.com (2603:10a6:10:3b0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Wed, 6 Dec 2023 03:04:29 +0000 Received: from AS4PR08MB7712.eurprd08.prod.outlook.com ([fe80::4bd:9642:ea78:a9a9]) by AS4PR08MB7712.eurprd08.prod.outlook.com ([fe80::4bd:9642:ea78:a9a9%5]) with mapi id 15.20.7068.025; Wed, 6 Dec 2023 03:04:29 +0000 From: Joyce Kong To: Stephen Hemminger CC: Jakub Grajciar , =?iso-8859-1?Q?Morten_Br=F8rup?= , Ruifeng Wang , "dev@dpdk.org" , nd , "stable@dpdk.org" , Liangxing Wang Subject: RE: [PATCH v1] net/memif: fix segfault with Tx burst larger than 255 Thread-Topic: [PATCH v1] net/memif: fix segfault with Tx burst larger than 255 Thread-Index: AQHaJzBRp5xJZrMEi0CS5fU1RkAdcLCbBMEAgACNuZA= Date: Wed, 6 Dec 2023 03:04:29 +0000 Message-ID: References: <20231205040524.3525473-1-joyce.kong@arm.com> <20231205103340.05563ee9@hermes.local> In-Reply-To: <20231205103340.05563ee9@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AS4PR08MB7712:EE_|DU0PR08MB7860:EE_|AMS0EPF000001A8:EE_|GV1PR08MB10642:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f0583ca-ae1a-48ba-fd06-08dbf6081681 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: amSWghBDtat5URyQ7uxMwAyjINcawCpl1BMozqZliBrL+rHhTIGBK7g93qkvvUcczPZj4CrNI5ayYb/0SNiUKDN8GVxWPbklihU+9Xj8743hevCWFn9D2xpLxup4TDv+7D8i58fjMfQGorbzDsOhDyonQSFfOrWMfJqsmdLR54nqw6mVhXK2PraEQRx9r5gQA3IY4odbzgbPTGBNMcCL0Po7PPcKB4hlHwChYwDKoUdKdzcHgkCePhx8+LfhK/i0jUgT+jwlPKXOu8FGIbi24nqgB6+FvkTMmoQFWoYM/yOc3SLSaF/WPYgUvBCr+y2oz3Tky+Scf0L0neOnr5OAu/5JVN/R68S44KzFZhmyMHmLaMP6KBMQ9+heDD/MCT2svYrBnzpoRxtYD8vdnb9xKd3suQcYvEUPsVPwuck48Rpycjrrjp8PU7DjH6i2hDJncnqeyrizLaEOI8QtgpTF1GokkIGGDi78dc7iSUy4nG83PDlwlNW0lRr4aXBtmzyZoiq/tH9EhzjTTo4UNkAlwYxClkBGZbbiDIXPTSO/X4zaKwUMDvzxuFV+vHsl9Gh81xF+qdVW3FnfQc7aA9taAzaT/+I7t2uvVYkfWDezI74= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS4PR08MB7712.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(366004)(136003)(39860400002)(346002)(376002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(2906002)(52536014)(5660300002)(4744005)(38070700009)(33656002)(86362001)(41300700001)(7696005)(6506007)(478600001)(9686003)(71200400001)(53546011)(55016003)(38100700002)(122000001)(83380400001)(26005)(66574015)(76116006)(8676002)(4326008)(8936002)(6916009)(66946007)(64756008)(66476007)(66556008)(66446008)(54906003)(316002); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7860 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b5862fb3-a312-40ab-8b96-08dbf6081018 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FHoAUZTHVzuBVy32PgLsmnKA5sc/zTUBQm4r1Sieilf9kVyrRNljHTDcX12Kmn1jGjexuLUZNgQPSbMeD1YOgIVCK4PXUe9naj3f0trSO6L+k8qOYVaJYNoYE943+LINcfFTB+e/crUETrH0CAdhdI2uhjnOLknpP20hImcjgO9/GKudKweFAOqQuwRIbQEgq/AvtU9aeNPu/ZBWtG2Vq3klu0cJtQtKyUk+78jz6RLc6mBCytosdL3Pscb/NQbjQ8nvr/jm5TFeiwGHzf3W3/hfFV8WZg2/09MIAEVj7QvxPdotO2NFHI0BT3WH8m9Or2qaI1WEL628rABRjoCW9JTGFJ5mhlgO1WCbRS8I88o0NqDhsY5PNzvp0l/8tHX4TH7SKoTV2+rdsdsIOI3TFapZaVSkY/71ItFJDEkK+RNpLeul+hcFJ33xWerC/C8jyQBQ8HLpm+VxY8z4aCYTMSptE9yxvg+zU3h+vkkOwbNLNuu9++W3j5NuQkRP/u67MQmBaB23S1TcH/RHON9buW5z29FC8NG9bahi6qApzeAbCpcq2eDgn8IDSvRva7dGcNWG0PhkqDvOswVbsrYP0ENNkkHpKuc2eHMRg8YsKnepiBn0r8r0zevN24zFLsRhSwcpM+627Iss3yahZBDzt1ZwHp61pvYiqZk9asPbk4XIgVaaxSaNtm6ABx+6Fq5z4W4U80JQskxk2I/yroTOQ/HNMvrq4GdHCD+47X3+BTE= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(136003)(376002)(346002)(230922051799003)(82310400011)(64100799003)(186009)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(40460700003)(316002)(81166007)(82740400003)(5660300002)(2906002)(41300700001)(36860700001)(86362001)(33656002)(356005)(47076005)(336012)(53546011)(66574015)(26005)(6862004)(478600001)(6506007)(7696005)(8676002)(52536014)(450100002)(70586007)(9686003)(4326008)(70206006)(54906003)(83380400001)(8936002)(40480700001)(55016003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Dec 2023 03:04:40.0064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0f0583ca-ae1a-48ba-fd06-08dbf6081681 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB10642 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, December 6, 2023 2:34 AM > To: Joyce Kong > Cc: Jakub Grajciar ; Morten Br=F8rup > ; Ruifeng Wang ; > dev@dpdk.org; nd ; stable@dpdk.org; Liangxing Wang > > Subject: Re: [PATCH v1] net/memif: fix segfault with Tx burst larger than= 255 >=20 > On Tue, 5 Dec 2023 04:05:24 +0000 > Joyce Kong wrote: >=20 > > There will be a segfault when tx burst size is larger than 256. This > > is because eth_memif_tx uses an index i which is uint8_t to count > > transmitted nb_pkts. Extend i to uint16_t, the same size as nb_pkts. > > > > Fixes: b5613c8f9d0a ("net/memif: add a Tx fast path") > > Cc: stable@dpdk.org > > > > Reported-by: Liangxing Wang > > Signed-off-by: Joyce Kong > > Reviewed-by: Ruifeng Wang > > --- >=20 > I wonder if other drivers have same bug? I don't think this is a common bug. This is a special case as the bug is introduced for whether choosing the me= mif Tx fast path.=20 >=20 > Reviewed-by: Stephen Hemminger