Hide Forgot
Created attachment 1775845 [details] Reproduce C code Description of problem: When using `NLM_F_DUMP` to dump ethtool information for all interfaces, the replied netlink message is not using `NLM_F_MULTI` flag. Version-Release number of selected component (if applicable): kernel-4.18.0-304.el8.x86_64 How reproducible: 100% Steps to Reproduce: 1. sudo dnf install -y gcc libnl3-devel 2. gcc -o test -I/usr/include/libnl3 test.c -L/usr/lib64 -lnl-3 -lnl-genl-3 3. ./test Actual results: The nl_message reply of ethtool features dump is not using NLM_F_MULTI Expected results: The nl_message reply of ethtool features dump is using NLM_F_MULTI Additional info: The test C code is showing route rule dumping is using NLM_F_MULTI
A fix was sent upstream by Fernando, https://lore.kernel.org/netdev/20210504224714.7632-1-ffmancera@riseup.net/T/#u
Opened a MR, https://gitlab.com/redhat/rhel/src/kernel/rhel-8/-/merge_requests/534
Are the following outputs expected? before fix: [root@dell-per7515-01 ~]# ./test Dumping route rule Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Dumping ethtool pause Got family ID of ethtool 20 Got nl message with flags: 0() Got nl message with flags: 0() Got nl message with flags: 0() Got nl message with flags: 0() Got nl message with flags: 0() after fix: [root@dell-per7515-01 ~]# ./test Dumping route rule Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Dumping ethtool pause Got family ID of ethtool 20 Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) Got nl message with flags: 2(MULTI) ^C
(In reply to Tianhao from comment #6) > Are the following outputs expected? > > before fix: > [root@dell-per7515-01 ~]# ./test > Dumping route rule > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Dumping ethtool pause > Got family ID of ethtool 20 > Got nl message with flags: 0() > Got nl message with flags: 0() > Got nl message with flags: 0() > Got nl message with flags: 0() > Got nl message with flags: 0() > > > after fix: > [root@dell-per7515-01 ~]# ./test > Dumping route rule > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Dumping ethtool pause > Got family ID of ethtool 20 > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > Got nl message with flags: 2(MULTI) > ^C Yes, this shows the fix worked as expected. Thanks!
Ethtool basic tests passed on the kernel-4.18.0-305.3.el8.mr534_210510_1425. Based on comment #6 and comment #7, set TESTED.
Done code check. The ethtool tests are done in pre-testing. Set verified based on the results.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: kernel security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4356