Hi, From: David Marchand [mailto:david.march...@redhat.com] Sent: Friday, December 21, 2018 2:58 PM To: Burakov, Anatoly <anatoly.bura...@intel.com>; Vemula, Hari KumarX <hari.kumarx.vem...@intel.com> Cc: dev@dpdk.org; Pattan, Reshma <reshma.pat...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com>; sta...@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: fix core number validation
On Fri, Dec 21, 2018 at 10:19 AM Burakov, Anatoly <anatoly.bura...@intel.com<mailto:anatoly.bura...@intel.com>> wrote: On 21-Dec-18 8:27 AM, David Marchand wrote: > Since you have identified a potential crash, can you give an example of > such a crash ? > Besides, we have tests that check arguments, so an update of the test would > be nice. I believe these lcore numbers are used to index the lcore list later, which would cause out-of-bounds access, which may or may not cause a crash, depending on how lucky you get. Sure, that and the fact that my testpmd was doing nothing with them :-). Anyway, the unit tests missed this case, so we need an update. And the more I look at those string parsing, the more I think that the service cores parsing has the same issue (copy/paste yay ;-)). DPDK EAL doesn’t have eal parameter valid/invalid core number check. For example, if we use following command to launch dpdk testpmd sample, it will return segmentation fault directly: ./x86_64-native-linuxapp-gcc/app/testpmd -l 9999999 -n 4 –-i EAL: Detected 48 lcore(s) EAL: Detected 2 NUMA nodes Segmentation fault (core dumped) UT is present for -l command line option to validate core number, but there is no check for higher core list number like above. -- Hari. -- David Marchand -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.