public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@suse.de>
Subject: Re: New compat_alloc_user_space() GPLness and fglrx
Date: Sat, 18 Sep 2010 10:26:57 +0200	[thread overview]
Message-ID: <201009181026.58002.arnd@arndb.de> (raw)
In-Reply-To: <20100918014232.GA17699@khazad-dum.debian.net>

On Saturday 18 September 2010 03:42:32 Henrique de Moraes Holschuh wrote:
> promotes compat_alloc_user_space() to EXPORT_SYMBOL_GPL, and moves it from
> asm/compat.h to linux/compat.h.
> 
> This breaks AMD/ATI's proprietary fglrx GPU driver, which wants to use
> compat_alloc_user_space(), and expects to find it in asm/compat.h.
> 
> Fixing this on the fglrx side is easy enough, one can simply audit the two
> or three call sites in the fglrx glue and make sure they can use
> arch_compat_alloc_user_space() safely.
> 
> But such a fix doesn't look right.  IMHO, either we don't want any non-GPL
> module touching *_compat_alloc_user_space and compat_alloc_user_space, or it
> would be better to let them use compat_alloc_user_space() in the interest of
> overall security...

Right, don't use arch_compat_alloc_user_space(), that would be worse.

compat_alloc_user_space is still a horrible hack and shouldn't be used
at all if possible. Just fix the code to either not require compat
ioctl handling or split out the common code from the native ioctl
function and pass it a kernel data structure, which you copy from user
space in different ways depending on where you come from.

	Arnd

  reply	other threads:[~2010-09-18  8:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18  1:42 New compat_alloc_user_space() GPLness and fglrx Henrique de Moraes Holschuh
2010-09-18  8:26 ` Arnd Bergmann [this message]
2010-09-18 12:42   ` Henrique de Moraes Holschuh
2010-09-20 11:19     ` Arnd Bergmann

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=201009181026.58002.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=hmh@hmh.eng.br \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@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