Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753511AbbHMQnA (ORCPT ); Thu, 13 Aug 2015 12:43:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:56328 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752598AbbHMQm7 (ORCPT ); Thu, 13 Aug 2015 12:42:59 -0400 Date: Thu, 13 Aug 2015 18:43:02 +0200 From: Borislav Petkov To: yalin wang Cc: Thomas Gleixner , mingo@redhat.com, hpa@zytor.com, x86@kernel.org, open list , Will Deacon Subject: Re: [x86] copy_from{to}_user question Message-ID: <20150813164302.GA15881@nazgul.tnic> References: <7FD389F5-C677-4439-8082-EB0CAE2814F6@gmail.com> <20150812100738.GA14020@nazgul.tnic> <9232AF8E-87A3-40B2-852A-D07889F9E1B4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9232AF8E-87A3-40B2-852A-D07889F9E1B4@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 887 Lines: 24 On Thu, Aug 13, 2015 at 06:04:54PM +0800, yalin wang wrote: > we store type into one fix register, for example r12 , > then in fix up code, we can know the exception is caused by copy_from > copy_to or copy_in user function by check r12 value(0 , 1 ,2 value), then if > it is copy_from, we only allow read fault, if the exception is write fault, panic() . > > the same rules also apply to copy_to / copy_in function . > > is it possible to change it like this ? ... and we'll do all that jumping through hoops to fix what actual, real-life problem exactly? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/