From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5C0475595; Thu, 29 Sep 2016 15:16:26 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 29 Sep 2016 06:16:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,415,1470726000"; d="scan'208";a="767188612" Received: from nikhilr-mobl6.amr.corp.intel.com (HELO [10.106.152.89]) ([10.106.152.89]) by FMSMGA003.fm.intel.com with ESMTP; 29 Sep 2016 06:16:16 -0700 To: Christian Ehrhardt , stable@dpdk.org References: <1475184293-18298-1-git-send-email-nikhil.rao@intel.com> Cc: dev From: "Rao, Nikhil" Message-ID: <57ED141F.8020302@intel.com> Date: Thu, 29 Sep 2016 18:46:15 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] eal: fix bug in x86 cmpset X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 13:16:26 -0000 On 9/29/2016 6:35 PM, Christian Ehrhardt wrote: > The patch misses a fixed: line which it should get I think. The bug has existed from the day the DPDK was open-sourced, i.e, there wasn't a specific commit that introduced this feature/bug, hence wasn't sure if it needed the fixes tag. > > But in general If applied -> stable for this one? > Yes. > > On Thu, Sep 29, 2016 at 11:24 PM, Nikhil Rao > wrote: > > The original code used movl instead of xchgl, this caused > rte_atomic64_cmpset to use ebx as the lower dword of the source > to cmpxchg8b instead of the lower dword of function argument "src". > > Reported-by: Job Abraham > > Tested-by: Job Abraham > > Signed-off-by: Nikhil Rao > > --- > lib/librte_eal/common/include/arch/x86/rte_atomic_32.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > index 2e04c75..fb3abf1 100644 > --- a/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > +++ b/lib/librte_eal/common/include/arch/x86/rte_atomic_32.h > @@ -81,7 +81,7 @@ rte_atomic64_cmpset(volatile uint64_t *dst, uint64_t exp, uint64_t src) > : "memory" ); /* no-clobber list */ > #else > asm volatile ( > - "mov %%ebx, %%edi\n" > + "xchgl %%ebx, %%edi;\n" > MPLOCKED > "cmpxchg8b (%[dst]);" > "setz %[res];" > -- > 2.7.4 > > > > > -- > Christian Ehrhardt > Software Engineer, Ubuntu Server > Canonical Ltd