#
fcfb19cd |
| 03-Jul-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
eal/linux: hide some local signal handler code
Only used in one file, and not an exported symbol should be static.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
#
5821a384 |
| 10-Nov-2023 |
Chengwen Feng <fengchengwen@huawei.com> |
eal: verify strdup return
Add verify strdup() return value logic.
Fixes: 293c53d8b23c ("eal: add telemetry callbacks") Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process") Cc: stable@dpd
eal: verify strdup return
Add verify strdup() return value logic.
Fixes: 293c53d8b23c ("eal: add telemetry callbacks") Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process") Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|
#
ae67895b |
| 08-Dec-2023 |
David Marchand <david.marchand@redhat.com> |
lib: add more logging helpers
Add helpers for logging messages in libraries instead of calling RTE_LOG() directly. Those helpers take care of adding a \n: this will make the transition to RTE_LOG_LI
lib: add more logging helpers
Add helpers for logging messages in libraries instead of calling RTE_LOG() directly. Those helpers take care of adding a \n: this will make the transition to RTE_LOG_LINE trivial.
Note: - for acl and sched libraries that still has some debug multilines messages, a direct call to RTE_LOG is used: this will make it easier to notice such special cases,
Signed-off-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
a04322f6 |
| 28-Jul-2022 |
David Marchand <david.marchand@redhat.com> |
bus: hide bus object
Make rte_bus opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition an
bus: hide bus object
Make rte_bus opaque for non internal users. This will make extending this object possible without breaking the ABI.
Introduce a new driver header and move rte_bus definition and helpers. Update drivers and library to use the internal header.
Some applications may have been dereferencing rte_bus objects, mark this object's accessors as stable.
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
72b452c5 |
| 27-Aug-2022 |
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> |
eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directl
eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>, because they are not used by this file. Include the needed headers directly from the files that need them.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|
#
4e3582ab |
| 11-Feb-2022 |
Wenxuan Wu <wenxuanx.wu@intel.com> |
eal/linux: fix device monitor stop return
The ret value in rte_dev_event_monitor_stop stands for whether the monitor has been successfully closed, and should not bind with rte_intr_callback_unregist
eal/linux: fix device monitor stop return
The ret value in rte_dev_event_monitor_stop stands for whether the monitor has been successfully closed, and should not bind with rte_intr_callback_unregister, so once it goes to the right exit point of rte_dev_event_monitor, the ret value should be set to 0.
Also, the refmonitor count has been carefully evaluated, the value change from 1 to 0, so there is no potential memory leak failure.
Fixes: 1fef6ced07f3 ("eal/linux: allow multiple starts of event monitor") Cc: stable@dpdk.org
Signed-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>
show more ...
|
#
1a287fc9 |
| 23-Feb-2022 |
Steve Yang <stevex.yang@intel.com> |
eal/linux: fix illegal memory access in uevent handler
'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer. But as coverity warns 'recv()' doesn't guarantee that 'buf' is null-
eal/linux: fix illegal memory access in uevent handler
'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer. But as coverity warns 'recv()' doesn't guarantee that 'buf' is null-terminated, but 'strlcpy()' requires it.
Enlarge 'buf' size to 'EAL_UEV_MSG_LEN + 1' and ensure the last one can be set to 0 when received buffer size is EAL_UEV_MSG_LEN.
CID 375864: Memory - illegal accesses (STRING_NULL) Passing unterminated string "buf" to "dev_uev_parse", which expects a null-terminated string.
Coverity issue: 375864 Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process") Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
show more ...
|
#
30a1de10 |
| 15-Feb-2022 |
Sean Morrissey <sean.morrissey@intel.com> |
lib: remove unneeded header includes
These header includes have been flagged by the iwyu_tool and removed.
Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
|
#
7e2083e4 |
| 01-Nov-2021 |
Harman Kalra <hkalra@marvell.com> |
eal/linux: check interrupt file descriptor validity
This patch fixes coverity issue by adding a check for negative event fd value.
Coverity issue: 373711, 373694 Fixes: c2bd9367e18f ("lib: remove d
eal/linux: check interrupt file descriptor validity
This patch fixes coverity issue by adding a check for negative event fd value.
Coverity issue: 373711, 373694 Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle")
Signed-off-by: Harman Kalra <hkalra@marvell.com> Acked-by: David Marchand <david.marchand@redhat.com>
show more ...
|
#
56331733 |
| 02-Nov-2021 |
David Marchand <david.marchand@redhat.com> |
eal/linux: fix device hotplug
The device event interrupt handler was always freed.
Bugzilla ID: 845 Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle")
Signed-off-by: David March
eal/linux: fix device hotplug
The device event interrupt handler was always freed.
Bugzilla ID: 845 Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle")
Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Yan Xia <yanx.xia@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
4847122a |
| 02-Nov-2021 |
David Marchand <david.marchand@redhat.com> |
eal/linux: fix uevent message parsing
Caught with ASan: ==9727==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f0daa2fc0d0 at pc 0x7f0daeefacb2 bp 0x7f0daa2fadd0 sp 0x7f0daa2fa578 RE
eal/linux: fix uevent message parsing
Caught with ASan: ==9727==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f0daa2fc0d0 at pc 0x7f0daeefacb2 bp 0x7f0daa2fadd0 sp 0x7f0daa2fa578 READ of size 1 at 0x7f0daa2fc0d0 thread T1 #0 0x7f0daeefacb1 (/lib64/libasan.so.5+0xbacb1) #1 0x115eba1 in dev_uev_parse ../lib/eal/linux/eal_dev.c:167 #2 0x115f281 in dev_uev_handler ../lib/eal/linux/eal_dev.c:248 #3 0x1169b91 in eal_intr_process_interrupts ../lib/eal/linux/eal_interrupts.c:1026 #4 0x116a3a2 in eal_intr_handle_interrupts ../lib/eal/linux/eal_interrupts.c:1100 #5 0x116a7f0 in eal_intr_thread_main ../lib/eal/linux/eal_interrupts.c:1172 #6 0x112640a in ctrl_thread_init ../lib/eal/common/eal_common_thread.c:202 #7 0x7f0dade27159 in start_thread (/lib64/libpthread.so.0+0x8159) #8 0x7f0dadb58f72 in clone (/lib64/libc.so.6+0xfcf72)
Address 0x7f0daa2fc0d0 is located in stack of thread T1 at offset 4192 in frame #0 0x115f0c9 in dev_uev_handler ../lib/eal/linux/eal_dev.c:226
This frame has 2 object(s): [32, 48) 'uevent' [96, 4192) 'buf' <== Memory access at offset 4192 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext (longjmp and C++ exceptions *are* supported) Thread T1 created by T0 here: #0 0x7f0daee92ea3 in __interceptor_pthread_create (/lib64/libasan.so.5+0x52ea3) #1 0x1126542 in rte_ctrl_thread_create ../lib/eal/common/eal_common_thread.c:228 #2 0x116a8b5 in rte_eal_intr_init ../lib/eal/linux/eal_interrupts.c:1200 #3 0x1159dd1 in rte_eal_init ../lib/eal/linux/eal.c:1044 #4 0x7a22f8 in main ../app/test-pmd/testpmd.c:4105 #5 0x7f0dada7f802 in __libc_start_main (/lib64/libc.so.6+0x23802)
Bugzilla ID: 792 Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process") Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Yan Xia <yanx.xia@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
show more ...
|
#
c2bd9367 |
| 22-Oct-2021 |
Harman Kalra <hkalra@marvell.com> |
lib: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the libraries access
lib: remove direct access to interrupt handle
Removing direct access to interrupt handle structure fields, rather use respective get set APIs for the same. Making changes to all the libraries access the interrupt handle fields.
Signed-off-by: Harman Kalra <hkalra@marvell.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Tested-by: Raslan Darawsheh <rasland@nvidia.com>
show more ...
|
#
99a2dd95 |
| 20-Apr-2021 |
Bruce Richardson <bruce.richardson@intel.com> |
lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on the directory names. This prefix makes the directory names longer and also m
lib: remove librte_ prefix from directory names
There is no reason for the DPDK libraries to all have 'librte_' prefix on the directory names. This prefix makes the directory names longer and also makes it awkward to add features referring to individual libraries in the build - should the lib names be specified with or without the prefix. Therefore, we can just remove the library prefix and use the library's unique name as the directory name, i.e. 'eal' rather than 'librte_eal'
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
show more ...
|