]> git.ipfire.org Git - thirdparty/linux.git/commit
Merge branch 'support-array-presets-in-veristat'
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 26 Jun 2025 17:28:51 +0000 (10:28 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 26 Jun 2025 17:28:52 +0000 (10:28 -0700)
commit6def0822d211df4bfb3276eac42f541dc9cc9fb8
tree1fcbea26ea33c86a5dc86b6ebe9f3360b04e5c92
parent886178a33a30fe685e926d84f531243982fb3c70
parent583588594b249e0ad3a64c68846d17018295ebe4
Merge branch 'support-array-presets-in-veristat'

Mykyta Yatsenko says:

====================
Support array presets in veristat

From: Mykyta Yatsenko <yatsenko@meta.com>

This patch series implements support for array variable presets in
veristat. Currently users can set values to global variables before
loading BPF program, but not for arrays. With this change array
elements are supported as well, for example:
```
sudo ./veristat set_global_vars.bpf.o -G "arr[0] = 1"
```

v4 -> v5
 * Simplify array elements offset calculation using  btf__resolve_size
 * Support white spaces in array indexes, e.g. arr [ 0 ]
 * Rename btf_find_member into adjust_var_secinfo_member

v3 -> v4
 * Rework implementation to support multi dimensional arrays
 * Rework data structures for storing parsed presets

v2 -> v3
 * Added more negative tests
 * Fix mem leak
 * Other small fixes

v1 -> v2
 * Support enums as indexes
 * Separating parsing logic from preset processing
 * Add more tests
====================

Link: https://patch.msgid.link/20250625165904.87820-1-mykyta.yatsenko5@gmail.com
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>