=== himcesjf_ is now known as him-cesjf [07:45] Hi all, I have a question about Ubuntu kernel versioning vs mainline. [07:45] In my application, I need to look at the output of ftrace, which has seen incompatible changes in mainline version 4.14 [07:46] Currently I am using version.h LINUX_VERSION_CODE to detect this, but this breaks with Ubuntu kernels [07:47] Does anybody have a suggestion on how to properly detect this on Ubuntu? [07:50] claudiof, if the stable kernel version is enough, that is exposed in /proc/version_signature [07:55] Hello apw, thanks for this pointer; how do you think I can map that information to the feature? [07:56] claudiof, i thought you were saying that from a real kernel version you can intuit it [07:56] yes [07:56] i am saying the raw mainline kernel version is in there, from Makefile [07:57] is it the same as the one reported in the Ubuntu kernel header linux/version.h? [07:58] I ask because the raw mainline base version on which Ubuntu is based is much older, and the ftrace features (and output) does not seem to correspond with the reported mainline base version [08:02] For example on my Ubuntu kernel 4.10.0-38-generic [08:03] there is the ftrace trace_marker_raw feature [08:03] while the version.h reports a mainline kernel version that does not have the feature [08:04] cat /usr/include/linux/version.h #define LINUX_VERSION_CODE 263266 [08:05] 4.10? [08:07] Yes, Ubuntu version is 4.10 [08:07] but the LINUX_VERSION_CODE is < 4.10 [08:08] the feature appears in mainline version 4.10 [08:08] and changes substantially in behaviour in 4.14 [08:09] The Ubuntu 4.10.0-38-generic appears to shows the linux mainline 4.10.x behaviour regarding trac_marker_raw [08:10] The Ubuntu 4.10.0-38-generic appears to show the linux mainline 4.10.x behaviour regarding trace_marker_raw [08:34] oh you are looking at the linux-libc-dev version on an lts, with a lts backport kernel installed [08:34] that is tue ga kernel base [08:34] the [08:39] Sorry I could not understand your suggestion, could you come again? [10:22] Hi apw, sorry I had to reboot into the distro kernel to check, were you mentioning before some specific thing I should check instead of version.h to understand which User-visible behaviour I am going to experience with a particular kernel version? [10:22] Is /proc/version_signature the one that counts? [10:23] So in my case I have "Ubuntu 4.10.0-38.42~16.04.1-generic 4.10.17" -> which means that the output I get should be similar to upstream version 4.10.17? [10:30] claudiof, despite your question, you should check your installation since only 4.4.0-* and 4.15.0-* are still maintained for 16.04/xenial [10:31] https://launchpad.net/ubuntu/+source/linux and https://launchpad.net/ubuntu/+source/linux-hwe [10:50] I'll check that ricotz thanks [10:52] claudiof, right, as ricotz says there is no live 4.10 branches so something is off [10:53] claudiof, but the live kernel version is only available from teh kernel; the clearest there is proc/version_signature; but that is ubuntu specific in form [10:59] thank you - Do you think that should be the same as include/linux.h from the linux-libc-dev package? Or should I expect differences there? [10:59] claudiof, the include/linux.h can only match one kernel at best; and indeed should match the GA kernel in theory (iirc) [11:00] claudiof, but as we have at times 3 kernels in an LTS at different versions it can never be accurate en-toto [11:00] claudiof, also if a semantic change is introduced in 4.15.8, it is entirely possible for one kernel on your system to have that [11:01] claudiof, and a second one not, even if they were at the same base versions ... so you can only rely on information [11:01] claudiof, from the actual running kernel to know [11:01] good point.. checking version.h says nothing about the kernel that is effectively going to run the app [11:01] if you do an update, you get a new version.h and new kernel on disk, but you arn't running it [11:01] or you could opt to only update the kernel itself, and not the headers package [11:02] and the headers be out of sync the other way [11:02] now, i will admit that out version exposure is a little poor to say the least [11:02] thanks apw for your comments, I think I have a slighly better grasp now.. [11:03] I will check the reported version at runtime then [11:06] the equivalent of uname -r would be the best way in a perfect world; except for (mostly stupid now) reasons we do not include the full version [11:07] which i realllllly should fix [11:15] hehe that would be good :-) [11:15] thanks again for the help [13:17] ftrace should be versioned itself === lan3y is now known as Laney === SimonNL is now known as SimonNL_Afk === SimonNL_Afk is now known as SimonNL [22:08] Someone's just reported nvidia drivers failing to build on 4.15.0-29 the Makefile reports missing libelf-dev and I don't see it as a Depends: of any of the nvidia-graphics-drivers packages. Can't find a bug on this but looks like we'd need a report for each nvidia version