-
Notifications
You must be signed in to change notification settings - Fork 733
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
Fix compatibility with 5.6 #1614
Conversation
@@ -2694,9 +2694,9 @@ static int timespec_parse(struct event_filler_arguments *args, unsigned long val | |||
{ | |||
uint64_t longtime; | |||
char *targetbuf = args->str_storage; | |||
struct timespec *tts = (struct timespec *)targetbuf; | |||
struct old_timespec32 *tts = (struct old_timespec32 *)targetbuf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about his one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be timespec64
but only on 64-bit. On 32-bit this is timespec32
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is __kernel_timespec
the right choice here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case sysdig needs to use: get_timespec64()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just read the docs (ioctl.rst, "Timestamps") and get_timespec64()
/__kernel_timespec
seem like the right way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timespec
sounds like __kernel_old_timespec
to me.
sysdig-CLA-1.0-signed-off-by: Jörg Thalheim <[email protected]>
|
@hhoffstaette your fix doesn't work for me while this one does. |
Yes, that was due to |
@hhoffstaette Your patch does not looks correct. See: hhoffstaette@55a8525#r38363243 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Mic92
Thanks for this PR, I appreciate a lot your efforts here in trying to putting this together.
Thanks a lot to @hhoffstaette too.
I did some testing myself and added a few comments. I'll do more testing on my end come back to this to review again later once you are at a later stage.
Just a side thinking: The more I look at this PR the more I think we should just drop the old functions for newer kernels even if they have the kernel_old
counterpart.
@@ -1345,7 +1345,7 @@ static int parse_sockopt(struct event_filler_arguments *args, int level, int opt | |||
union { | |||
uint32_t val32; | |||
uint64_t val64; | |||
struct timeval tv; | |||
struct __kernel_old_timeval tv; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you didn't test yet with old kernels but here it's likely that we need to keep timeval
for those kernels that do not define __kernel_old_timeval
@@ -2694,9 +2694,9 @@ static int timespec_parse(struct event_filler_arguments *args, unsigned long val | |||
{ | |||
uint64_t longtime; | |||
char *targetbuf = args->str_storage; | |||
struct timespec *tts = (struct timespec *)targetbuf; | |||
struct old_timespec32 *tts = (struct old_timespec32 *)targetbuf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timespec
sounds like __kernel_old_timespec
to me.
This PR will likely need to touch |
Have not tested yet with older kernel.