[PATCH v4 02/13] eal: replace strtok with reentrant version
fengchengwen
fengchengwen at huawei.com
Tue Oct 29 01:56:20 CET 2024
On 2024/10/28 23:31, Stephen Hemminger wrote:
> On Mon, 28 Oct 2024 21:04:08 +0800
> fengchengwen <fengchengwen at huawei.com> wrote:
>
>> On 2024/10/27 11:00, Stephen Hemminger wrote:
>>> On Sat, 26 Oct 2024 18:14:40 +0800
>>> Jie Hai <haijie1 at huawei.com> wrote:
>>>
>>>> Multiple threads calling the same function may cause condition
>>>> race issues, which often leads to abnormal behavior and can cause
>>>> more serious vulnerabilities such as abnormal termination, denial
>>>> of service, and compromised data integrity.
>>>>
>>>> The strtok() is non-reentrant, it is better to replace it with a
>>>> reentrant version.
>>>>
>>>> Fixes: 2054f31a1fcd ("mem: add memseg info in telemetry")
>>>> Cc: stable at dpdk.org
>>>>
>>>> Signed-off-by: Jie Hai <haijie1 at huawei.com>
>>>> Acked-by: Chengwen Feng <fengchengwen at huawei.com>
>>>> Acked-by: Amit Prakash Shukla <amitprakashs at marvell.com>
>>>> Acked-by: Morten Brørup <mb at smartsharesystems.com>
>>>
>>> This doesn't need to go to stable. parse_params is always single threaded.
>>
>> I recommend replacing all, based on:
>> 1\ almost at no cost.
>> 2\ reduce analysis costs, if don't we have to analyze the callers of strtok when you encounter it.
>>
>
> Yes but. The replacement should not go to stable.
> One of the rules of stable is that changes should be minimized, and fixes should
> not be accepted for things that can not ever happen with current code.
Hope more opinion from TB members.
More information about the dev
mailing list