Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752411Ab0H0XIF (ORCPT ); Fri, 27 Aug 2010 19:08:05 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47495 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141Ab0H0XIE (ORCPT ); Fri, 27 Aug 2010 19:08:04 -0400 Message-ID: <4C784544.2010305@zytor.com> Date: Fri, 27 Aug 2010 16:07:48 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Thunderbird/3.1.1 MIME-Version: 1.0 To: Matteo Croce CC: Thomas Backlund , linux-kernel@vger.kernel.org, Alan Cox , Natale Vinto Subject: Re: AMD Geode NOPL emulation for kernel 2.6.36-rc2 References: <4C780888.9000301@zytor.com> <4C7824F2.1050709@mandriva.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 850 Lines: 27 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. -- 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/