lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <42c0c7a2a3944eeaa868dd35dd5b6e81@AcuMS.aculab.com>
Date:   Mon, 18 Jan 2021 22:54:38 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Masahiro Yamada' <masahiroy@...nel.org>,
        Greg KH <gregkh@...uxfoundation.org>
CC:     Sasha Levin <sashal@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "stable@...nel.org" <stable@...nel.org>
Subject: RE: [PATCH] kbuild: give SUBLEVEL more room in KERNEL_VERSION

From: Masahiro Yamada
> Sent: 18 January 2021 10:28
...
> It helps external modules to be compiled for multiple kernel versions.
> 
> #if KERNEL_VERSION_CODE < KERNEL_VERSION(5, 4, 0)
>     code for the kernel versions older than 5.4.0
> #endif

I've just done a scan through some drivers.
The only checks with a non-zero sub-rev are for 2.6.nnn.
So provided KERNEL_VERSION_CODE is changed to match
nothing of ours breaks.

I've only found tests for the following:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 7, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)

Although some seem to be against VERSION_CODE()
rather than KERNEL_VERSION().

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ