Re: Dealing with SUBLEVEL overflow in backports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





在 2022/2/8 7:58, Johannes Berg 写道:
On Mon, 2022-02-07 at 23:18 +0100, Hauke Mehrtens wrote:
The LINUX_VERSION_CODE is fixed since 4.9.255, see here:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=42efb098c75f9d4b95f7cf35d3d52e80cc2fde82

SUBLEVEL should still contains the minor kernel version number.

We could extend the macros in backport/backport-include/linux/version.h
to check for SUBLEVEL manually if it overflows.

Right, but the thing is we don't have SUBLEVEL in the *C* code, only in
the Makefile.

However, stupid me? This is trivial:

--- a/Makefile.kernel
+++ b/Makefile.kernel
@@ -60,3 +60,5 @@ obj-$(CPTCFG_WLAN) += drivers/net/wireless/
  #obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/
  #
  #obj-$(CPTCFG_STAGING) += drivers/staging/
+
+subdir-ccflags-y += -DCOMPAT_KERNEL_SUBLEVEL=$(SUBLEVEL)


(whatever the name is)

Ah I tried this approach but find that this may break other modules
depending on our headers because the cflag won't come with be
inherited by them.

So probably we need to generate a header for this purpose as well.

Thanks.
- Jiaxun



johannes

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux