New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/sys/unix: add support for FAN_REPORT_FID #35799
Comments
Want to send a patch? |
The const is already there since https://golang.org/cl/175158:
Is there anything else needed to use this API? |
@tklauser @ianlancetaylor Hi all. Yes not all structures are present and there is no helper func to get fanotify events. The structs are needed:
A function that can read this structs from a memory, the unsafe magic and reaf buffers, Initial unix.FanotifyEventMetadata can be read with binary.Read, for example like this. The problem lies with extra structs that come after initial unix.FanotifyEventMetadata then fanotify is used with FAN_REPORT_FID flag. This structs can have offset (padding) and part of this struct needs to be passed to unix.OpenByHandleAt to get FD of a opened fanotify file. All of this looks quite a challenge at least for me :) |
Linux kernels 5.1+ have added new API (FAN_REPORT_FID) for fanotify. Would be nice to have this in 'golang.org/x/sys'.
The text was updated successfully, but these errors were encountered: