1ksc(1) User Commands ksc(1)
2
3
4
6 ksc - report symbols used by kernel modules
7
9 ksc -k FILE ... [OPTIONS]
10
11 ksc -k FILE ... -s [OPTIONS]
12
13 ksc -s -p KSC_RESULT [OPTIONS]
14
15
17 ksc produces and submits reports of symbols used by kernel object FILEs
18 (specified by -k). Resulting report is always saved to ~/ksc-
19 result.txt.
20
21 For more on report generation, see -k.
22
23 For more on report submission, see -s.
24
25
27 You may freely mix different option styles.
28
29
30 -h, --help
31 Show help message and exit.
32
33 -c CONFIG, --config=CONFIG
34 Read config options from CONFIG file. If not supplied, ksc will
35 use ~/ksc.conf. If not found, /etc/ksc.conf will be used
36 instead.
37
38 -j KSC_RESULT, --justification-from=KSC_RESULT
39 Read symbol justifications from KSC_RESULT file and use them in
40 the new report. It is important to note that placeholder justi‐
41 fications and reference justifications are ignored by this
42 option and re-generated every time.
43
44 This option may be specified multiple times. KSC_RESULT file
45 order is determined by the order of arguments passed to ksc. If
46 there are two conflicting non-placeholder/non-reference justifi‐
47 cations for a kernel module A.ko symbol S in multiple report
48 files at the same time, it will be carried over from the last
49 one specified on the command line.
50
51 Symbol justifications can be carried over within the same kernel
52 module only. Justifications do not propagate through references
53 (i.e., if you justify usage of S for A.ko, B.ko references jus‐
54 tification in A.ko, and you run ksc without A.ko, justification
55 is not carried over and you will be asked to specify).
56
57 -k FILE, --ko=FILE
58 Collect used symbols in kernel object FILE.
59 Multiple -k arguments may be supplied, in which case different
60 FILEs are placed in distinct sections of the ~/ksc-result.txt
61 file.
62
63 All kernel object FILEs must be build against the same architec‐
64 ture.
65
66 If multiple FILEs are supplied, ksc report won't include symbols
67 exported by any one of the FILEs. This allows for bulk collec‐
68 tion of symbols of a functionally dependent set of kernel mod‐
69 ules without having to filter symbols coming from other modules.
70
71 -K FILE, --ko-dependency=FILE
72 Omit any symbols exported by FILE from the report. Use this
73 option if other modules (which are part of the report) depend on
74 symbols exported by FILE, but FILE itself is not to be reported
75 at this time.
76
77 -n RELEASE, --name=RELEASE
78 RHEL RELEASE against which the bug is to be filed, e.g '6.5'.
79
80 -p PREVIOUS, --previous=PREVIOUS
81 Specified PREVIOUS file is marked for submission to Red Hat
82 Bugzilla.
83 To submit, you need to use -s.
84
85 -r RELEASE, --release=RELEASE
86 RHEL RELEASE used for symbol comparison with whitelists, e.g.
87 '6.5'.
88
89 -y SYMVERS, --symvers=SYMVERS
90 Path to Module.symvers SYMVERS file used to check symbol pres‐
91 ence in the the kernel. If not specified, current kernel version
92 is used to determine the path and Module.symvers of the cur‐
93 rently running kernel is used.
94
95 You are notified whenever symbol is not present in the Mod‐
96 ule.symvers file.
97
98 -s, --submit
99 Submit the report to the Red Hat Bugzilla (https://bugzilla.red‐
100 hat.com). Credentials used in submission need to be set a con‐
101 fig file (see FILES section below). If API key is not set, ksc
102 will prompt for Bugzilla password.
103
104 This option needs to be supplemented with -k or -p.
105
106 If used with -k, report gets generated, opened in an editor for
107 you to make changes, saved in ~/ksc-result.txt, and submitted.
108 You may interrupt submission by pressing ^C.
109
110 -v, --version
111 Prints ksc version.
112
113
115 ~/ksc-result.txt
116 Report produced by ksc.
117
118
119 ~/ksc.conf (/etc/ksc.conf)
120 Local (global) ksc config file. Global config file is used only
121 when local config file does not exist. Syntax is as follows:
122
123 [bugzilla]
124 user=user@redhat.com
125 partner=partner-name
126 partnergroup=partner-group
127 server=https://bugzilla.redhat.com/xmlrpc.cgi
128 api_key=api_key
129
130 These are default values. Whenever a field has such a value
131 (except the server field), it will always be treated as though
132 it were undefined/left blank.
133
134
136 ksc -k a.ko
137 Process a.ko file using system-provided whitelist and Mod‐
138 ule.symvers files. Reports symbols used by a.ko that are not in
139 whitelist, requesting justification for their use.
140
141
142 ksc -k a.ko -y /tmp/Module.symvers
143 Process a.ko file using system-provided whitelist and user-pro‐
144 vided Module.symvers (/tmp/Module.symvers) files. Reports sym‐
145 bols used by a.ko that are not in whitelist, requesting justifi‐
146 cation for their use.
147
148
149 ksc -k a.ko -k b.ko
150 Process a.ko and b.ko files using system-provided whitelist and
151 Module.symvers files. Reports symbols used by both a.ko and b.ko
152 that are not in whitelist, requesting justification for their
153 use. Only one justification per symbol is required. Any mention
154 of an already justified symbol come with an automatically gener‐
155 ated references.
156
157
158 ksc -k a.ko -k b.ko -K c.ko -K d.ko
159 Process a.ko and b.ko files using system-provided whitelist and
160 Module.symvers files. Reports symbols used by both a.ko and b.ko
161 that are not in whitelist and not exported by either c.ko or
162 d.ko, requesting justification for their use. Only one justifi‐
163 cation per symbol is required. Any mention of an already justi‐
164 fied symbol come with an automatically generated references.
165
166
167 ksc -k a.ko -k b.ko -j previous-report.txt
168 Process a.ko and b.ko files using system-provided whitelist and
169 Module.symvers files. Reports symbols used by both a.ko and b.ko
170 that are not in whitelist, requesting justification for their
171 use. Only one justification per symbol is required. Any mention
172 of an already justified symbol come with an automatically gener‐
173 ated references. Justifications already present in previous-
174 report.txt are carried over to the newly generated one.
175
176
177 ksc -s -p report-to-submit.txt
178 Submit a report to bugzilla.
179
180
181
182
183ksc - Version 1.5 November 2018 ksc(1)