freebsd-dev/sys/i386/linux
Chuck Tuffli 3575504976 Fix the Linux kernel version number calculation
The Linux compatibility code was 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))

The Linux kernel uses the later format via the KERNEL_VERSION() macro in
include/generated/uapi/linux/version.h

Fix is to use the LINUX_KERNVER() macro in linux_map_osrel() as well as
in the .trans_osrel functions.

PR: 229209
Reviewed by: emaste, cem, imp (mentor)
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D15952
2018-06-22 00:02:03 +00:00
..
imgact_linux.c imgact_linux.c: use standard indentation 2018-03-12 23:28:25 +00:00
linux_copyout.c Fix futexes on i386 after the 4/4G split. 2018-04-24 12:50:21 +00:00
linux_dummy.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
linux_genassym.c Implement vdso - virtual dynamic shared object. Through vdso Linux 2015-05-24 15:28:17 +00:00
linux_locore.s Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
linux_machdep.c Sort headers in MD Linuxulator files 2018-03-23 17:16:36 +00:00
linux_proto.h Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux_ptrace.c Correct proper nouns in the Linuxulator 2018-02-22 02:24:17 +00:00
linux_syscall.h Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux_syscalls.c Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux_sysent.c Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux_systrace_args.c Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux_sysvec.c Fix the Linux kernel version number calculation 2018-06-22 00:02:03 +00:00
linux_vdso.lds.s Implement vdso - virtual dynamic shared object. Through vdso Linux 2015-05-24 15:28:17 +00:00
linux.h linuxulator: do not include legacy syscalls on arm64 2018-06-15 14:41:51 +00:00
Makefile Don't use an .OBJDIR for 'make sysent'. 2018-01-29 19:14:15 +00:00
syscalls.conf
syscalls.master Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00