Commit ed1a1fe
LoongArch: BPF: Rename and refactor validate_code()
1. Rename the existing validate_code() to validate_ctx()
2. Factor out the code validation handling into a new helper
validate_code()
Then:
* validate_code() is used to check the validity of code.
* validate_ctx() is used to check both code validity and table entry
correctness.
The new validate_code() will be used in subsequent changes.
Reviewed-by: Hengqi Chen <hengqi.chen@gmail.com>
Co-developed-by: George Guo <guodongtai@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>1 parent 6ab55e0 commit ed1a1fe
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1183 | 1191 | | |
1184 | 1192 | | |
1185 | 1193 | | |
| |||
1288 | 1296 | | |
1289 | 1297 | | |
1290 | 1298 | | |
1291 | | - | |
| 1299 | + | |
1292 | 1300 | | |
1293 | 1301 | | |
1294 | 1302 | | |
| |||
0 commit comments