__assign_str handling
In 6.10, the tracing __assign_str() macro lots its second argument.
We simply made a patch (for cfg80211, mac80211 and iwlwifi) to put it back under ifdef, but maybe someone else has any other ideas?
The big problem is that it's defined/undefined/redefined, so can't even override it (if it were even possible, since we don't generally know what the argument should be).
johannes
Hi Johannes,
I am unsure here, but I looked at Steven's commit removing it:2c92ca849fcc6ee7d0c358e9959abc9f58661aea
I was wondering if a variadic macro makes sense:
https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
I don't know much about how they are used in kernel and searched the kernel's src and came across your commit here:568db7fd27fad183d186742dc7ae6ca211ba51ff
You introduced the IWL_FW_CHECK macro for the iwlwifi driver which seems to handle additional logging parameters well.
Could we modify __assign_str to handle variadic inputs?
For example:
#define __assign_str(dst, ...) __assign_str_helper(dst, ##__VA_ARGS__)
The helper function could resolve the assignment based on the count/context of the arguments.
Fwiw, I am still familiarizing myself with kernel conventions and backport-related modifications so perhaps this is a no-go.
Figured I'd share my thoughts since I have been running gentree.py again...
Signature · 2 lines
regards, brian witte
Quoted 2 lines
Could we modify
__assign_strto handle variadic inputs?
I think no, because __assign_str is actually redefined a few times during the trace code construction.
johannes