freebsd-skq/sys/amd64/linux32
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
..
linux32_dummy.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
linux32_genassym.c Implement vdso - virtual dynamic shared object. Through vdso Linux 2015-05-24 15:28:17 +00:00
linux32_locore.s Linuxolator whitespace cleanup 2018-02-05 17:29:12 +00:00
linux32_machdep.c Fix LINT (and static COMPAT_LINUX32) after r332122. 2018-04-08 17:10:32 +00:00
linux32_proto.h Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux32_support.s Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
linux32_syscall.h Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux32_syscalls.c Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux32_sysent.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
linux32_systrace_args.c Regenerated Linuxulator syscall tables for r314782 2017-03-06 18:20:37 +00:00
linux32_sysvec.c Fix the Linux kernel version number calculation 2018-06-22 00:02:03 +00:00
linux32_vdso.lds.s Put linux_platform into the vdso to avoid copying it onto the stack at 2015-05-24 15:30:52 +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 Rename remaining linux32 symbols such as linux_sysent[] and 2015-10-22 21:28:20 +00:00
syscalls.master Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00