/srv/irclogs.ubuntu.com/2018/08/06/#ubuntu-kernel.txt

=== himcesjf_ is now known as him-cesjf
claudiofHi all, I have a question about Ubuntu kernel versioning vs mainline.07:45
claudiofIn my application, I need to look at the output of ftrace, which has seen incompatible changes in mainline version 4.1407:45
claudiofCurrently I am using version.h LINUX_VERSION_CODE to detect this, but this breaks with Ubuntu kernels07:46
claudiofDoes anybody have a suggestion on how to properly detect this on Ubuntu?07:47
apwclaudiof, if the stable kernel version is enough, that is exposed in /proc/version_signature07:50
claudiofHello apw, thanks for this pointer; how do you think I can map that information to the feature?07:55
apwclaudiof, i thought you were saying that from a real kernel version you can intuit it07:56
claudiofyes07:56
apwi am saying the raw mainline kernel version is in there, from Makefile07:56
claudiofis it the same as the one reported in the Ubuntu kernel header linux/version.h?07:57
claudiofI 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 version07:58
claudiofFor example on my Ubuntu kernel 4.10.0-38-generic08:02
claudiofthere is the ftrace trace_marker_raw feature08:03
claudiofwhile the version.h reports a mainline kernel version that does not have the feature08:03
claudiofcat /usr/include/linux/version.h #define LINUX_VERSION_CODE 26326608:04
apw4.10?08:05
claudiofYes, Ubuntu version is 4.1008:07
claudiofbut the LINUX_VERSION_CODE is < 4.1008:07
claudiofthe feature appears in mainline version 4.1008:08
claudiofand changes substantially in behaviour in 4.1408:08
claudiofThe Ubuntu 4.10.0-38-generic appears to shows the linux mainline 4.10.x behaviour regarding trac_marker_raw08:09
claudiofThe Ubuntu 4.10.0-38-generic appears to show the linux mainline 4.10.x behaviour regarding trace_marker_raw08:10
apwoh you are looking at the linux-libc-dev version on an lts, with a lts backport kernel installed08:34
apwthat is tue ga kernel base08:34
apwthe08:34
claudiofSorry I could not understand your suggestion, could you come again?08:39
claudiofHi 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
claudiofIs  /proc/version_signature the one that counts?10:22
claudiofSo 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:23
ricotzclaudiof, despite your question, you should check your installation since only 4.4.0-* and 4.15.0-* are still maintained for 16.04/xenial10:30
ricotzhttps://launchpad.net/ubuntu/+source/linux and https://launchpad.net/ubuntu/+source/linux-hwe10:31
claudiofI'll check that ricotz thanks10:50
apwclaudiof, right, as ricotz says there is no live 4.10 branches so something is off10:52
apwclaudiof, but the live kernel version is only available from teh kernel; the clearest there is proc/version_signature; but that is ubuntu specific in form10:53
claudiofthank 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
apwclaudiof, the include/linux.h can only match one kernel at best; and indeed should match the GA kernel in theory (iirc)10:59
apwclaudiof, but as we have at times 3 kernels in an LTS at different versions it can never be accurate en-toto11:00
apwclaudiof, also if a semantic change is introduced in 4.15.8, it is entirely possible for one kernel on your system to have that11:00
apwclaudiof, and a second one not, even if they were at the same base versions ... so you can only rely on information11:01
apwclaudiof, from the actual running kernel to know11:01
claudiofgood point.. checking version.h says nothing about the kernel that is effectively going to run the app11:01
apwif you do an update, you get a new version.h and new kernel on disk, but you arn't running it11:01
apwor you could opt to only update the kernel itself, and not the headers package11:01
apwand the headers be out of sync the other way11:02
apwnow, i will admit that out version exposure is a little poor to say the least11:02
claudiofthanks apw for your comments, I think I have a slighly better grasp now.. 11:02
claudiofI will check the reported version at runtime then11:03
apwthe 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 version11:06
apwwhich i realllllly should fix11:07
claudiofhehe that would be good :-)11:15
claudiofthanks again for the help11:15
cascardoftrace should be versioned itself13:17
=== lan3y is now known as Laney
=== SimonNL is now known as SimonNL_Afk
=== SimonNL_Afk is now known as SimonNL
TJ-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 version22:08

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!