| .. | .. |
|---|
| 135 | 135 | |
|---|
| 136 | 136 | /* Probing functions */ |
|---|
| 137 | 137 | |
|---|
| 138 | | -static int read_procfs(const char *path) |
|---|
| 138 | +static long read_procfs(const char *path) |
|---|
| 139 | 139 | { |
|---|
| 140 | 140 | char *endptr, *line = NULL; |
|---|
| 141 | 141 | size_t len = 0; |
|---|
| 142 | 142 | FILE *fd; |
|---|
| 143 | | - int res; |
|---|
| 143 | + long res; |
|---|
| 144 | 144 | |
|---|
| 145 | 145 | fd = fopen(path, "r"); |
|---|
| 146 | 146 | if (!fd) |
|---|
| .. | .. |
|---|
| 162 | 162 | |
|---|
| 163 | 163 | static void probe_unprivileged_disabled(void) |
|---|
| 164 | 164 | { |
|---|
| 165 | | - int res; |
|---|
| 165 | + long res; |
|---|
| 166 | 166 | |
|---|
| 167 | 167 | /* No support for C-style ouptut */ |
|---|
| 168 | 168 | |
|---|
| .. | .. |
|---|
| 181 | 181 | printf("Unable to retrieve required privileges for bpf() syscall\n"); |
|---|
| 182 | 182 | break; |
|---|
| 183 | 183 | default: |
|---|
| 184 | | - printf("bpf() syscall restriction has unknown value %d\n", res); |
|---|
| 184 | + printf("bpf() syscall restriction has unknown value %ld\n", res); |
|---|
| 185 | 185 | } |
|---|
| 186 | 186 | } |
|---|
| 187 | 187 | } |
|---|
| 188 | 188 | |
|---|
| 189 | 189 | static void probe_jit_enable(void) |
|---|
| 190 | 190 | { |
|---|
| 191 | | - int res; |
|---|
| 191 | + long res; |
|---|
| 192 | 192 | |
|---|
| 193 | 193 | /* No support for C-style ouptut */ |
|---|
| 194 | 194 | |
|---|
| .. | .. |
|---|
| 210 | 210 | printf("Unable to retrieve JIT-compiler status\n"); |
|---|
| 211 | 211 | break; |
|---|
| 212 | 212 | default: |
|---|
| 213 | | - printf("JIT-compiler status has unknown value %d\n", |
|---|
| 213 | + printf("JIT-compiler status has unknown value %ld\n", |
|---|
| 214 | 214 | res); |
|---|
| 215 | 215 | } |
|---|
| 216 | 216 | } |
|---|
| .. | .. |
|---|
| 218 | 218 | |
|---|
| 219 | 219 | static void probe_jit_harden(void) |
|---|
| 220 | 220 | { |
|---|
| 221 | | - int res; |
|---|
| 221 | + long res; |
|---|
| 222 | 222 | |
|---|
| 223 | 223 | /* No support for C-style ouptut */ |
|---|
| 224 | 224 | |
|---|
| .. | .. |
|---|
| 240 | 240 | printf("Unable to retrieve JIT hardening status\n"); |
|---|
| 241 | 241 | break; |
|---|
| 242 | 242 | default: |
|---|
| 243 | | - printf("JIT hardening status has unknown value %d\n", |
|---|
| 243 | + printf("JIT hardening status has unknown value %ld\n", |
|---|
| 244 | 244 | res); |
|---|
| 245 | 245 | } |
|---|
| 246 | 246 | } |
|---|
| .. | .. |
|---|
| 248 | 248 | |
|---|
| 249 | 249 | static void probe_jit_kallsyms(void) |
|---|
| 250 | 250 | { |
|---|
| 251 | | - int res; |
|---|
| 251 | + long res; |
|---|
| 252 | 252 | |
|---|
| 253 | 253 | /* No support for C-style ouptut */ |
|---|
| 254 | 254 | |
|---|
| .. | .. |
|---|
| 267 | 267 | printf("Unable to retrieve JIT kallsyms export status\n"); |
|---|
| 268 | 268 | break; |
|---|
| 269 | 269 | default: |
|---|
| 270 | | - printf("JIT kallsyms exports status has unknown value %d\n", res); |
|---|
| 270 | + printf("JIT kallsyms exports status has unknown value %ld\n", res); |
|---|
| 271 | 271 | } |
|---|
| 272 | 272 | } |
|---|
| 273 | 273 | } |
|---|
| 274 | 274 | |
|---|
| 275 | 275 | static void probe_jit_limit(void) |
|---|
| 276 | 276 | { |
|---|
| 277 | | - int res; |
|---|
| 277 | + long res; |
|---|
| 278 | 278 | |
|---|
| 279 | 279 | /* No support for C-style ouptut */ |
|---|
| 280 | 280 | |
|---|
| .. | .. |
|---|
| 287 | 287 | printf("Unable to retrieve global memory limit for JIT compiler for unprivileged users\n"); |
|---|
| 288 | 288 | break; |
|---|
| 289 | 289 | default: |
|---|
| 290 | | - printf("Global memory limit for JIT compiler for unprivileged users is %d bytes\n", res); |
|---|
| 290 | + printf("Global memory limit for JIT compiler for unprivileged users is %ld bytes\n", res); |
|---|
| 291 | 291 | } |
|---|
| 292 | 292 | } |
|---|
| 293 | 293 | } |
|---|