[dpdk-dev] [PATCH v2] service: don't walk out of bounds when checking services

Aaron Conole aconole at redhat.com
Fri Feb 7 15:27:41 CET 2020


Kevin Traynor <ktraynor at redhat.com> writes:

> On 20/12/2019 14:43, David Marchand wrote:
>> On Wed, Dec 4, 2019 at 9:34 AM David Marchand <david.marchand at redhat.com> wrote:
>>>
>>> On Wed, Dec 4, 2019 at 9:33 AM David Marchand <david.marchand at redhat.com> wrote:
>>>>
>>>> On Tue, Dec 3, 2019 at 10:15 PM Aaron Conole <aconole at redhat.com> wrote:
>>>>>
>>>>> 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 function")
>>>>> Fixes: e9139a32f6e8 ("service: add function to run on app lcore")
>>>>> Fixes: e30dd31847d2 ("service: add mechanism for quiescing")
>>> Cc: stable at 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 <nikhil.rao at intel.com>
> Date:   Mon Sep 16 15:31:02 2019 +0530
>
>     service: avoid false sharing on core state
>
>
>>>>> Signed-off-by: Aaron Conole <aconole at redhat.com>
>>>>
>>>> Reviewed-by: David Marchand <david.marchand at redhat.com>
>> 
>> Applied, thanks.
>> 
>> 
>> --
>> David Marchand
>> 



More information about the dev mailing list