From: Greg KH <gregkh@linuxfoundation.org>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: stable@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [RFC PATCH for-stable] kbuild: Define LINUX_VERSION_{MAJOR,PATCHLEVEL,SUBLEVEL}
Date: Mon, 7 Feb 2022 13:01:08 +0100 [thread overview]
Message-ID: <YgEKBAWp+wAWLfFW@kroah.com> (raw)
In-Reply-To: <20220207115212.217744-1-jiaxun.yang@flygoat.com>
On Mon, Feb 07, 2022 at 11:52:12AM +0000, Jiaxun Yang wrote:
> Since the SUBLEVEL overflowed LINUX_VERSION, we have no reliable
> way to tell the current SUBLEVEL in source code.
What in-kernel code needs to know the SUBLEVEL?
> This brings significant difficulties for backport works to deal
> with changes in stable releases.
What backport issues?
> Define those macros so we can continue to get proper SUBLEVEL
> in source without breaking stable ABI by refining KERNEL_VERSION
> bit fields.
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
> For some context: https://lore.kernel.org/backports/bb0ae37aa770e016463706d557fec1c5205bc6a9.camel@sipsolutions.net/T/#t
> ---
> Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 99d37c23495e..8132f81d94d8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1142,7 +1142,10 @@ endef
> define filechk_version.h
> (echo \#define LINUX_VERSION_CODE $(shell \
> expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 255); \
> - echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
> + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \
> + echo \#define LINUX_VERSION_MAJOR $(VERSION); \
> + echo \#define LINUX_VERSION_PATCHLEVEL $(PATCHLEVEL); \
> + echo \#define LINUX_VERSION_SUBLEVEL $(SUBLEVEL);)
This is already in Makefile, are you sure you just do not need to
backport a specific patch instead of making your own that does the same
thing?
thanks,
greg k-h
next prev parent reply other threads:[~2022-02-07 13:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 11:52 [RFC PATCH for-stable] kbuild: Define LINUX_VERSION_{MAJOR,PATCHLEVEL,SUBLEVEL} Jiaxun Yang
2022-02-07 12:01 ` Greg KH [this message]
2022-02-07 12:47 ` Jiaxun Yang
2022-02-07 13:15 ` Greg KH
2022-02-07 13:33 ` Jiaxun Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YgEKBAWp+wAWLfFW@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jiaxun.yang@flygoat.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox