[Bug 229209] Linux kernel version number calculation inconsistent

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jun 21 14:41:38 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229209

            Bug ID: 229209
           Summary: Linux kernel version number calculation inconsistent
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: chuck at tuffli.net

The Linux compatibility code is converting the version number (e.g.
2.6.32) in two different ways and then comparing the results.

The linux_map_osrel() function converted MAJOR.MINOR.PATCH similar to
what FreeBSD does natively. I.e. where major=v0, minor=v1, and patch=v2
    v = v0 * 1000000 + v1 * 1000 + v2;

The LINUX_KERNVER() macro, on the other hand, converted the value with
bit shifts. I.e. where major=a, minor=b, and patch=c
    v = (((a) << 16) + ((b) << 8) + (c))

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list