public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Willy Tarreau <w@1wt.eu>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	torvalds@linux-foundation.org, stable@vger.kernel.org,
	lwn@lwn.net, jslaby@suse.cz, shuah@kernel.org,
	patches@kernelci.org, lkft-triage@lists.linaro.org,
	pavel@denx.de, jonathanh@nvidia.com
Subject: Re: Linux 4.4.256
Date: Sat, 6 Feb 2021 10:49:26 -0800	[thread overview]
Message-ID: <20210206184926.GA19587@roeck-us.net> (raw)
In-Reply-To: <YB7cU7SCyBOHFJGS@kroah.com>

On Sat, Feb 06, 2021 at 07:13:39PM +0100, Greg Kroah-Hartman wrote:
> On Sat, Feb 06, 2021 at 08:59:42AM -0800, Guenter Roeck wrote:
> > On 2/6/21 5:22 AM, Willy Tarreau wrote:
> > > On Sat, Feb 06, 2021 at 02:11:13PM +0100, Willy Tarreau wrote:
> > >> Something like this looks more robust to me, it will use SUBLEVEL for
> > >> values 0 to 255 and 255 for any larger value:
> > >>
> > >> -	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
> > >> +	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 255 \* (0$(SUBLEVEL) > 255) + 0$(SUBLEVEL) * (0$(SUBLEVEL \<= 255)); \
> > > 
> > > Bah, I obviously missed a backslash above and forgot spaces around parens.
> > > Here's a tested version:
> > > 
> > > diff --git a/Makefile b/Makefile
> > > index 7d86ad6ad36c..9b91b8815b40 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -1252,7 +1252,7 @@ endef
> > >  
> > >  define filechk_version.h
> > >  	echo \#define LINUX_VERSION_CODE $(shell                         \
> > > -	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
> > > +	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 255 \* \( 0$(SUBLEVEL) \> 255 \) + 0$(SUBLEVEL) \* \( 0$(SUBLEVEL) \<= 255 \) ); \
> > >  	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'
> > >  endef
> > >  
> > 
> > I like that version.
> 
> See the patch that Sasha queued up already, it just fixes it at 255 for
> now, and we will update with what is in Linus's tree like the above when
> that gets merged in 5.12-rc1.
> 
> > Two questions: Are there any concerns that KERNEL_VERSION(4, 4, 256)
> > matches KERNEL_VERSION(4, 5. 0),
> 
> As that "release" did nothing, no, I'm not too worried about it, are
> you?
> 
There are lots (35) of "KERNEL_VERSION(4, 5, 0)" in chromeos-4.4.
That should not matter with the clamped LINUX_VERSION_CODE, but
I'd prefer to clamp KERNEL_VERSION as well just to be sure. On
top of that, some of the vendor code we carry along does check
SUBVERSION, but that is probably more of an academic concern.

> > and do you plan to send this patch upstream ?
> 
> See the series sent upstream here: https://lore.kernel.org/r/20210206035033.2036180-1-sashal@kernel.org
> 
I backported the relevant patch into chromeos-4.4, so we should
be fine.

Thanks!
Guenter

  reply	other threads:[~2021-02-06 18:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 14:26 Linux 4.4.256 Greg Kroah-Hartman
2021-02-05 14:26 ` Greg Kroah-Hartman
2021-02-05 20:56 ` Guenter Roeck
2021-02-06 13:00   ` Greg Kroah-Hartman
2021-02-06 13:11     ` Willy Tarreau
2021-02-06 13:19       ` Greg Kroah-Hartman
2021-02-06 13:24         ` Willy Tarreau
2021-02-06 13:22       ` Willy Tarreau
2021-02-06 16:59         ` Guenter Roeck
2021-02-06 18:13           ` Greg Kroah-Hartman
2021-02-06 18:49             ` Guenter Roeck [this message]
2021-02-07  8:22               ` Greg Kroah-Hartman
2021-02-08 17:14                 ` Guenter Roeck
2021-02-08 17:20                   ` Greg Kroah-Hartman
2021-02-08  9:09         ` David Laight
2021-02-08  9:38           ` David Laight
2021-02-08  9:44             ` Greg Kroah-Hartman

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=20210206184926.GA19587@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=lwn@lwn.net \
    --cc=patches@kernelci.org \
    --cc=pavel@denx.de \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=w@1wt.eu \
    /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