linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Matteo Croce <matteo@openwrt.org>
Cc: Thomas Backlund <tmb@mandriva.org>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Natale Vinto <ebballon@gmail.com>
Subject: Re: AMD Geode NOPL emulation for kernel 2.6.36-rc2
Date: Fri, 27 Aug 2010 16:07:48 -0700	[thread overview]
Message-ID: <4C784544.2010305@zytor.com> (raw)
In-Reply-To: <AANLkTinjHK-oTmt-6cmN16jWWv9ZjW44wA-A3VTLm+A_@mail.gmail.com>

On 08/27/2010 02:32 PM, Matteo Croce wrote:
> can I ignore the return value when I expect val to be non zero?
> the doc says: "On error, the variable @x is set to zero."

No.  You need to deliver a page fault to the application in this case.

The *real* test for this kind of crap is correct page fault behavior,
and so forth.

Also, at the very least you need to check for:

- CS == USER_CS
- IP in the proper range for user space

Your patch in its current form is one big security hole.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.


  parent reply	other threads:[~2010-08-27 23:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 18:07 AMD Geode NOPL emulation for kernel 2.6.36-rc2 Matteo Croce
2010-08-27 18:48 ` H. Peter Anvin
2010-08-27 20:15   ` Matteo Croce
2010-08-27 20:49     ` Thomas Backlund
2010-08-27 21:32       ` Matteo Croce
2010-08-27 22:16         ` Matteo Croce
2010-08-27 22:19           ` Matteo Croce
2010-08-27 23:07         ` H. Peter Anvin [this message]
2010-08-29 12:52           ` Avi Kivity
2010-08-29 13:39           ` Matteo Croce
2010-09-08 20:59             ` H. Peter Anvin
2010-08-27 20:54     ` H. Peter Anvin
     [not found] <fmbxh-5N8-41@gated-at.bofh.it>
2010-09-07 15:57 ` Nick Lowe
2010-09-08  9:15   ` Hans-Peter Jansen
2010-09-08 11:34     ` Nick Lowe
2010-09-08 11:55       ` Nick Lowe
2010-09-08 17:56       ` Alan Cox
2010-09-08 17:51         ` Nick Lowe
2010-09-08 19:07           ` Alan Cox
2010-09-08 19:44             ` Nick Lowe
2010-09-08 21:11               ` Alan Cox
2010-09-08 21:05                 ` H. Peter Anvin
2010-09-08 21:07                 ` Nick Lowe

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=4C784544.2010305@zytor.com \
    --to=hpa@zytor.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ebballon@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matteo@openwrt.org \
    --cc=tmb@mandriva.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;
as well as URLs for NNTP newsgroup(s).