Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbbBWTFQ (ORCPT ); Mon, 23 Feb 2015 14:05:16 -0500 Received: from one.firstfloor.org ([193.170.194.197]:56644 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752321AbbBWTFP (ORCPT ); Mon, 23 Feb 2015 14:05:15 -0500 Date: Mon, 23 Feb 2015 20:05:12 +0100 From: Andi Kleen To: Andrew Morton Cc: Jon DeVree , linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH] kernel/sys.c: Fix UNAME26 for 4.0 Message-ID: <20150223190512.GC823@two.firstfloor.org> References: <1424670192-3215-1-git-send-email-nuxi@vault24.org> <20150223110041.eaa2d7e6e1e54e11e1f9e945@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150223110041.eaa2d7e6e1e54e11e1f9e945@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1543 Lines: 50 On Mon, Feb 23, 2015 at 11:00:41AM -0800, Andrew Morton wrote: > On Mon, 23 Feb 2015 00:43:12 -0500 Jon DeVree 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/