Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1607382

Summary: sysctl probe - do not print errors in case hugetables are not enabled in kernel
Product: Red Hat Enterprise Linux 7 Reporter: Matus Marhefka <mmarhefk>
Component: openscapAssignee: Jan Černý <jcerny>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 7.6CC: jcerny, matyc, mhaicman, mmarhefk, openscap-maint
Target Milestone: alpha   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1642995 (view as bug list) Environment:
Last Closed: 2019-03-12 14:32:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1642995    

Description Matus Marhefka 2018-07-23 12:13:57 UTC
Description of problem:
Upstream test suite uncovered a bug in the sysctl probe. It is using deprecated sysctl parameter "net.ipv6.neigh.default.base_reachable_time". Instead the "net.ipv6.neigh.default.base_reachable_time_ms".

The upstream test which can reproduce this issue is:
tests/probes/sysctl/test_sysctl_probe_all.sh

Error output:
E: lt-probe_sysctl: An error ocured when reading from "/proc/sys/vm/nr_hugepages" (fp=0x3fff6c090f80): l=0, 95, Operation not supported
E: lt-probe_sysctl: An error ocured when reading from "/proc/sys/vm/nr_hugepages_mempolicy" (fp=0x3fff6c091180): l=0, 95, Operation not supported
E: lt-probe_sysctl: An error ocured when reading from "/proc/sys/vm/nr_overcommit_hugepages" (fp=0x3fff6c091350): l=0, 95, Operation not supported

dmesg:
[Jul23 07:45] ICMPv6: process `lt-probe_sysctl' is using deprecated sysctl (syscall) net.ipv6.neigh.default.base_reachable_time - use net.ipv6.neigh.default.base_reachable_time_ms instead


Version-Release number of selected component (if applicable):
openscap-1.2.17-1.el7.ppc64le
openscap-scanner-1.2.17-1.el7.ppc64le


How reproducible:
always only on ppc64le

Steps to Reproduce:
Use upstream test suite and:
cd tests/probes/sysctl/
make check

Comment 1 Jan Černý 2018-08-14 07:14:52 UTC
I'm sorry, but I don't understand why is this considered a bug.

The OVAL definition used in this test, tests/probes/sysctl/test_sysctl_probe_all.oval.xml, specifies the sysctl name as regular expression '.*'. That means it should match every parameter.

The name is defined in OVAL specification as: The name element specifies the name(s) of the kernel parameter(s) that should be collected from the local system.

Therefore I think the probe should collect all the kernel parameters, including the deprecated ones. 

Moreover the way it works is that it basically reads recursively all the files under /proc/sys directory.

Do you suggest skipping the deprecated options? Do you know how can a probe obtain an information about deprecation of kernel options?

Comment 2 Matus Marhefka 2018-08-14 09:13:10 UTC
I reported this because tests/probes/sysctl/test_sysctl_probe_all.sh test case reported fail as sysctl probe (and dmesg) reported errors. As you suggested it looks like the warning about deprecated parameter is okay as probe and test are set to read all the kernel parameters.

The only source I was able to find about deprecated kernel parameters was in the section "DEPRECATED PARAMETERS" in the sysctl(8) man page.

There is one more issue reported by the sysctl probe about "Operation not supported" when reading files in /proc/sys/vm/. This does not happen on other architectures, only on ppc64le. Do you think it might be some issue in our probe or rather some ppc64le specific problem with access rights on sysfs filesystem?

Comment 3 Matus Marhefka 2018-08-28 12:52:34 UTC
It looks like the ppc64 and ppc64le machines which were used for the testing do not have hugetables enabled, check using:

# grep HUGETLB /boot/config-$(uname -r)

sysctl also did not list these parameters:
vm.nr_hugepages
vm.nr_hugepages_mempolicy
vm.nr_overcommit_hugepages

IMO, we should not list these parameters too if we get "Operation not supported" when reading them.

Comment 4 Marek Haicman 2019-03-12 14:32:48 UTC
This issue was not selected to be included in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small number of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.