public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/sys.c: Fix UNAME26 for 4.0
@ 2015-02-23  5:43 Jon DeVree
  2015-02-23 19:00 ` Andrew Morton
  2015-02-27 23:31 ` Matt Mullins
  0 siblings, 2 replies; 4+ messages in thread
From: Jon DeVree @ 2015-02-23  5:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jon DeVree

Signed-off-by: Jon DeVree <nuxi@vault24.org>
---
 kernel/sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 667b2e6..0ffd403 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1127,7 +1127,7 @@ static int override_release(char __user *release, size_t len)
 				break;
 			rest++;
 		}
-		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
+		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60;
 		copy = clamp_t(size_t, len, 1, sizeof(buf));
 		copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
 		ret = copy_to_user(release, buf, copy + 1);
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/sys.c: Fix UNAME26 for 4.0
  2015-02-23  5:43 [PATCH] kernel/sys.c: Fix UNAME26 for 4.0 Jon DeVree
@ 2015-02-23 19:00 ` Andrew Morton
  2015-02-23 19:05   ` Andi Kleen
  2015-02-27 23:31 ` Matt Mullins
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2015-02-23 19:00 UTC (permalink / raw)
  To: Jon DeVree; +Cc: linux-kernel, Andi Kleen

On Mon, 23 Feb 2015 00:43:12 -0500 Jon DeVree <nuxi@vault24.org> wrote:

> --- a/kernel/sys.c
> +++ b/kernel/sys.c
> @@ -1127,7 +1127,7 @@ static int override_release(char __user *release, size_t len)
>  				break;
>  			rest++;
>  		}
> -		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
> +		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60;
>  		copy = clamp_t(size_t, len, 1, sizeof(buf));
>  		copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
>  		ret = copy_to_user(release, buf, copy + 1);

Huh.

I wonder if we still need this.



We should update the comment:

--- a/kernel/sys.c~kernel-sysc-fix-uname26-for-40-fix
+++ a/kernel/sys.c
@@ -1108,6 +1108,7 @@ DECLARE_RWSEM(uts_sem);
 /*
  * Work around broken programs that cannot handle "Linux 3.0".
  * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40
+ * And we map 4.x to 2.6.60+x, so 4.0 would be 2.6.60.
  */
 static int override_release(char __user *release, size_t len)
 {


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/sys.c: Fix UNAME26 for 4.0
  2015-02-23 19:00 ` Andrew Morton
@ 2015-02-23 19:05   ` Andi Kleen
  0 siblings, 0 replies; 4+ messages in thread
From: Andi Kleen @ 2015-02-23 19:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Jon DeVree, linux-kernel, Andi Kleen

On Mon, Feb 23, 2015 at 11:00:41AM -0800, Andrew Morton wrote:
> On Mon, 23 Feb 2015 00:43:12 -0500 Jon DeVree <nuxi@vault24.org> wrote:
> 
> > --- a/kernel/sys.c
> > +++ b/kernel/sys.c
> > @@ -1127,7 +1127,7 @@ static int override_release(char __user *release, size_t len)
> >  				break;
> >  			rest++;
> >  		}
> > -		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 40;
> > +		v = ((LINUX_VERSION_CODE >> 8) & 0xff) + 60;
> >  		copy = clamp_t(size_t, len, 1, sizeof(buf));
> >  		copy = scnprintf(buf, copy, "2.6.%u%s", v, rest);
> >  		ret = copy_to_user(release, buf, copy + 1);
> 
> Huh.
> 
> I wonder if we still need this.

I think so. A lot of the world is still stuck on RHEL6 ...
And compatbility to old binaries is a high value.

The original program I needed it for is fixed however.

-Andi

> 
> 
> 
> We should update the comment:
> 
> --- a/kernel/sys.c~kernel-sysc-fix-uname26-for-40-fix
> +++ a/kernel/sys.c
> @@ -1108,6 +1108,7 @@ DECLARE_RWSEM(uts_sem);
>  /*
>   * Work around broken programs that cannot handle "Linux 3.0".
>   * Instead we map 3.x to 2.6.40+x, so e.g. 3.0 would be 2.6.40
> + * And we map 4.x to 2.6.60+x, so 4.0 would be 2.6.60.
>   */
>  static int override_release(char __user *release, size_t len)
>  {
> 

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] kernel/sys.c: Fix UNAME26 for 4.0
  2015-02-23  5:43 [PATCH] kernel/sys.c: Fix UNAME26 for 4.0 Jon DeVree
  2015-02-23 19:00 ` Andrew Morton
@ 2015-02-27 23:31 ` Matt Mullins
  1 sibling, 0 replies; 4+ messages in thread
From: Matt Mullins @ 2015-02-27 23:31 UTC (permalink / raw)
  To: Jon DeVree; +Cc: linux-kernel

I'll raise my hand in agreement with Andi -- this is functionality that
we do use.

Tested-by: Matt Mullins <mmullins@twopensource.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-27 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23  5:43 [PATCH] kernel/sys.c: Fix UNAME26 for 4.0 Jon DeVree
2015-02-23 19:00 ` Andrew Morton
2015-02-23 19:05   ` Andi Kleen
2015-02-27 23:31 ` Matt Mullins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox