Add mnt_parent check to kernel version validation#1590
Conversation
|
Hm that's very weird.. that means there wasn't a Not sure what happened there, maybe 5.15.0-33-generic isn't a stable kernel. I don't see that in ddebs Unfortunately, I don't have that specific vmlinux version or ISF, but what you get with these commands? $ pahole vmlinux-5.15.0-47-generic -C mount | head -1
struct mount {
$ pahole vmlinux-5.15.0-47-generic -C vfsmount | grep mnt_parent | wc -l
0
$ xzcat Ubuntu_5.15.0-87-generic_5.15.0-87.97_amd64_jammy_22.04.json.xz | jq ".user_types.mount" | head
{
"size": 320,
"fields": {
...
$ xzcat Ubuntu_5.15.0-87-generic_5.15.0-87.97_amd64_jammy_22.04.json.xz | jq ".user_types.vfsmount" | grep mnt_parent | wc -l
0
|
|
@atcuno Anyway, your changes won’t cause any harm, but they are somewhat redundant. The |
Does this help @gcmoreira |
|
If the |
|
This bug was introduced in #1545. To avoid the overhead of doing vmlinux = linux.LinuxUtilities.get_module_from_volobj_type(self._context, self)
vmlinux.has_type("mount")I did: self._context.symbol_space.has_type("mount")But it's not the same. Since, as I explained above, checking for the presence of return self.has_member("mnt_parent") |
|
I can live with the redundancy, so happy to have merged this version. |
|
If you'd like to change it again as better, then please send a new PR. Sorry, it's 2am my time and trying to revert an old commit is a bit too much for me right now... I'm off to bed. 5:P |
|
@ikelos The problem is that |
This should resolve the issue experienced #1590 was trying to resolve.
|
Ok, I manually reverted the functionality. Hopefully everything's as it should be now? |
@gcmoreira I ran into the following backtrace when testing the latest develop version with the Linux updates. The code is breaking as mnt_parent isn't in the structure.
I then saw the check about this member was recently removed (changed?):
74a834b
So I then changed to what you see in the PR and file descriptors are again returned correctly.
The kernel version for the sample is:
Is my PR accurate or do you want another fix?