Re: [PATCH] Add a personality to report 2.6.x version numbers

From: Greg KH
Date: Fri Aug 26 2011 - 17:44:50 EST


On Fri, Aug 19, 2011 at 04:15:10PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> Reposting due to popular demand. Several other people are running
> into the same problem with all kinds of software.
>
> Only change is rebase against current master.
>
> -Andi
>
> --
>
> I ran into a couple of programs which broke with the new Linux 3.0 version.
> Some of those were binary only. I tried to use LD_PRELOAD to work
> around it, but it was quite difficult and in one case impossible
> because of a mix of 32bit and 64bit executables.
>
> This patch adds a UNAME26 personality that makes the kernel
> report a 2.6.40+x version number instead. The x is the x in 3.x.
>
> I know this is somewhat ugly, but I didn't find a better workaround,
> and compatibility to existing programs is important.
>
> Some programs also read /proc/sys/kernel/osrelease. This can be worked
> around in user space with mount --bind (and a mount namespace)
>
> To use:
>
> wget ftp://ftp.kernel.org/pub/linux/kernel/people/ak/uname26/uname26.c
> gcc -o uname26 uname26.c
> ./uname26 program

I hate to ask, but can you put a proper copyright and license on this
file so that distros can distribute it?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/