Commit 48946bd
bpf: Replace ARG_XXX_OR_NULL with ARG_XXX | PTR_MAYBE_NULL
We have introduced a new type to make bpf_arg composable, by
reserving high bits of bpf_arg to represent flags of a type.
One of the flags is PTR_MAYBE_NULL which indicates a pointer
may be NULL. When applying this flag to an arg_type, it means
the arg can take NULL pointer. This patch switches the
qualified arg_types to use this flag. The arg_types changed
in this patch include:
1. ARG_PTR_TO_MAP_VALUE_OR_NULL
2. ARG_PTR_TO_MEM_OR_NULL
3. ARG_PTR_TO_CTX_OR_NULL
4. ARG_PTR_TO_SOCKET_OR_NULL
5. ARG_PTR_TO_ALLOC_MEM_OR_NULL
6. ARG_PTR_TO_STACK_OR_NULL
This patch does not eliminate the use of these arg_types, instead
it makes them an alias to the 'ARG_XXX | PTR_MAYBE_NULL'.
Signed-off-by: Hao Luo <haoluo@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211217003152.48334-3-haoluo@google.com1 parent d639b9d commit 48946bd
2 files changed
+23
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | 334 | | |
336 | 335 | | |
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
340 | | - | |
341 | 339 | | |
342 | 340 | | |
343 | 341 | | |
| |||
347 | 345 | | |
348 | 346 | | |
349 | 347 | | |
350 | | - | |
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
354 | 351 | | |
355 | 352 | | |
356 | 353 | | |
357 | | - | |
358 | 354 | | |
359 | 355 | | |
360 | | - | |
361 | 356 | | |
362 | 357 | | |
363 | 358 | | |
364 | 359 | | |
365 | | - | |
| 360 | + | |
366 | 361 | | |
367 | 362 | | |
368 | 363 | | |
369 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
370 | 373 | | |
371 | 374 | | |
372 | 375 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
479 | 479 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
| 480 | + | |
486 | 481 | | |
487 | 482 | | |
488 | 483 | | |
| |||
5016 | 5011 | | |
5017 | 5012 | | |
5018 | 5013 | | |
5019 | | - | |
5020 | | - | |
5021 | | - | |
| 5014 | + | |
| 5015 | + | |
5022 | 5016 | | |
5023 | 5017 | | |
5024 | 5018 | | |
| |||
5155 | 5149 | | |
5156 | 5150 | | |
5157 | 5151 | | |
5158 | | - | |
5159 | 5152 | | |
5160 | 5153 | | |
5161 | 5154 | | |
5162 | 5155 | | |
5163 | 5156 | | |
5164 | | - | |
5165 | 5157 | | |
5166 | 5158 | | |
5167 | 5159 | | |
5168 | 5160 | | |
5169 | 5161 | | |
5170 | | - | |
5171 | 5162 | | |
5172 | 5163 | | |
5173 | 5164 | | |
5174 | | - | |
5175 | 5165 | | |
5176 | 5166 | | |
5177 | | - | |
5178 | 5167 | | |
5179 | 5168 | | |
5180 | 5169 | | |
5181 | 5170 | | |
5182 | | - | |
| 5171 | + | |
5183 | 5172 | | |
5184 | 5173 | | |
5185 | 5174 | | |
| |||
5193 | 5182 | | |
5194 | 5183 | | |
5195 | 5184 | | |
5196 | | - | |
| 5185 | + | |
5197 | 5186 | | |
5198 | 5187 | | |
5199 | 5188 | | |
| |||
5274 | 5263 | | |
5275 | 5264 | | |
5276 | 5265 | | |
5277 | | - | |
5278 | | - | |
5279 | | - | |
| 5266 | + | |
| 5267 | + | |
5280 | 5268 | | |
5281 | 5269 | | |
5282 | 5270 | | |
5283 | 5271 | | |
5284 | 5272 | | |
5285 | | - | |
| 5273 | + | |
5286 | 5274 | | |
5287 | 5275 | | |
5288 | 5276 | | |
| |||
5351 | 5339 | | |
5352 | 5340 | | |
5353 | 5341 | | |
5354 | | - | |
5355 | | - | |
5356 | | - | |
5357 | | - | |
| 5342 | + | |
| 5343 | + | |
| 5344 | + | |
| 5345 | + | |
| 5346 | + | |
5358 | 5347 | | |
5359 | 5348 | | |
5360 | 5349 | | |
| |||
0 commit comments