Commit c1db104
committed
rh_features: move rh_features entry to sys/kernel
JIRA: https://issues.redhat.com/browse/RHEL-122981
This patch is a backport of the following RHEL-only commit:
commit f8a16e956bfc72efd4ed56d19821a1de812cb8ad
Author: Ricardo Robaina <rrobaina@redhat.com>
Date: Fri May 10 20:31:21 2024 -0300
rh_features: move rh_features entry to sys/kernel
JIRA: https://issues.redhat.com/browse/RHEL-32987
Conflicts:
- register_sysctl_table() is currently deprecated, replacing it with
register_sysctl_init()
This patch is a backport of the following upstream commit:
commit b42078ac845a3bfb5a6bfc621515e5a7acba510a
Author: Hangbin Liu <haliu@redhat.com>
Date: Wed Nov 13 13:54:23 2019 -0500
[kernel] rh_features: move rh_features entry to sys/kernel
Message-id: <20191113135423.25652-1-haliu@redhat.com>
Patchwork-id: 286074
O-Subject: [RHEL8.2 net PATCHv3] rh_features: move rh_features entry to sys/kernel
Bugzilla: 1660583
RH-Acked-by: Ivan Vecera <ivecera@redhat.com>
RH-Acked-by: Jiri Benc <jbenc@redhat.com>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1660583
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=24659187
Upstream Status: RHEL only
Test: tested with sos-3.7-7.el8_1 and we can save rh_features correctly
In the past we put the rh_feature info to /proc/driver/rh_feature. Prarit
ask to put this to a more suitable place. And the file needs to be picked
up by sosreport.
/proc/sys/kernel may not be a very good place. But since we already has the
'tainted' file (as well as some others, e.g. osrelease or version) there,
we can put it here before finding a more suitable place.
v2:
Move rh_features_show in to ifdef CONFIG_SYSCTL.
Also as Jiri suggested:
a) we need to check the register_sysctl_table return value.
b) Change list_for_each_entry_rcu to list_for_each_entry_lockless in
rh_print_used_features, which is more correct from the documentation
point of view.
v3:
As Jiri remind, we may get overflow with snprintf, use scnprintf instead.
Signed-off-by: Hangbin Liu <haliu@redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>1 parent e82b3a7 commit c1db104
1 file changed
+35
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
61 | | - | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
69 | 74 | | |
| 75 | + | |
70 | 76 | | |
71 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
72 | 83 | | |
73 | | - | |
74 | | - | |
75 | 84 | | |
76 | 85 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 86 | + | |
| 87 | + | |
81 | 88 | | |
82 | 89 | | |
83 | | - | |
84 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
87 | 108 | | |
88 | 109 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
93 | 113 | | |
94 | 114 | | |
95 | 115 | | |
0 commit comments