From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3877DA0542 for ; Fri, 7 Feb 2020 15:28:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC4D51BFAD; Fri, 7 Feb 2020 15:28:00 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id C63981BFAD for ; Fri, 7 Feb 2020 15:27:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581085679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rTn01jJ7XCFhLksHr/8vJ+pvxtaK8vdeakqHbnSwaPI=; b=H9hvaBiL4iUSCCnfVwXY+9DU88wSeTgyxuceoLeF+Pb4rSWwN6lIquiPwzjZ4EaeLpiqrT FAAOyabaYnFOHx5pFb94uHhe7kNVUMlB/gGRZjD2z69AVbTJrGZwNl1FavG8mz5drjn1zg GKEDEq6WSLiFs0xsg3khP09+3wHjpUY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-295-RmA1nqoTOTGQFWB_NFvBuA-1; Fri, 07 Feb 2020 09:27:54 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F18F107B278; Fri, 7 Feb 2020 14:27:52 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (ovpn-123-142.rdu2.redhat.com [10.10.123.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 525B789A98; Fri, 7 Feb 2020 14:27:42 +0000 (UTC) From: Aaron Conole To: Kevin Traynor Cc: Harry van Haaren , nikhil.rao@intel.com, David Marchand , dev , Bruce Richardson , Pavan Nikhilesh , Gage Eads , Thomas Monjalon , dpdk stable References: <20191126145606.13626-1-aconole@redhat.com> <20191203211544.20285-1-aconole@redhat.com> <25df28cf-192b-046b-63b3-b8f72a5f434e@redhat.com> Date: Fri, 07 Feb 2020 09:27:41 -0500 In-Reply-To: <25df28cf-192b-046b-63b3-b8f72a5f434e@redhat.com> (Kevin Traynor's message of "Fri, 7 Feb 2020 12:04:12 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: RmA1nqoTOTGQFWB_NFvBuA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] service: don't walk out of bounds when checking services X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Kevin Traynor writes: > On 20/12/2019 14:43, David Marchand wrote: >> On Wed, Dec 4, 2019 at 9:34 AM David Marchand wrote: >>> >>> On Wed, Dec 4, 2019 at 9:33 AM David Marchand wrote: >>>> >>>> On Tue, Dec 3, 2019 at 10:15 PM Aaron Conole wrot= e: >>>>> >>>>> The service_valid call is used without properly bounds checking the >>>>> input parameter. Almost all instances of the service_valid call are >>>>> inside a for() loop that prevents excessive walks, but some of the >>>>> public APIs don't bounds check and will pass invalid arguments. >>>>> >>>>> Prevent this by using SERVICE_GET_OR_ERR_RET where it makes sense, >>>>> and adding a bounds check to one service_valid() use. >>>>> >>>>> Fixes: 8d39d3e237c2 ("service: fix race in service on app lcore funct= ion") >>>>> Fixes: e9139a32f6e8 ("service: add function to run on app lcore") >>>>> Fixes: e30dd31847d2 ("service: add mechanism for quiescing") >>> Cc: stable@dpdk.org >>> > > With the commit below, this patch will apply cleanly on 18.11. > > Seems ok to me to add below commit, wdyt? If I'm reading it correctly, the move is for an internal data structure in librte_eal, so I think it shouldn't be an ABI breakage. Looks safe to me as well. > commit e484ccddbe1b41886fef1e445ef2fdfa55086198 > Author: Nikhil Rao > Date: Mon Sep 16 15:31:02 2019 +0530 > > service: avoid false sharing on core state > > >>>>> Signed-off-by: Aaron Conole >>>> >>>> Reviewed-by: David Marchand >>=20 >> Applied, thanks. >>=20 >>=20 >> -- >> David Marchand >>=20