Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751900AbbHUEfq (ORCPT ); Fri, 21 Aug 2015 00:35:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:46350 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbbHUEfp (ORCPT ); Fri, 21 Aug 2015 00:35:45 -0400 Date: Fri, 21 Aug 2015 06:35:52 +0200 From: Borislav Petkov To: "H. Peter Anvin" Cc: yalin wang , Thomas Gleixner , mingo@redhat.com, x86@kernel.org, open list , Will Deacon Subject: Re: [x86] copy_from{to}_user question Message-ID: <20150821043552.GA29712@nazgul.tnic> References: <7FD389F5-C677-4439-8082-EB0CAE2814F6@gmail.com> <20150812100738.GA14020@nazgul.tnic> <9232AF8E-87A3-40B2-852A-D07889F9E1B4@gmail.com> <20150813164302.GA15881@nazgul.tnic> <6ABF6137-251E-47EF-B824-AC77C9C9AB24@gmail.com> <20150817041634.GA9387@nazgul.tnic> <55D61AF3.4090004@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <55D61AF3.4090004@zytor.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: 841 Lines: 22 On Thu, Aug 20, 2015 at 11:22:43AM -0700, H. Peter Anvin wrote: > There is a valid reason to do this, which is that currently > copy_{to,from}_user() effectively bypass SMAP as they don't verify that > the kernel pointer is actually a kernel pointer. Well, we do STAC before we copy but SMAP is checking for supervisor access to *user* data. But you say "kernel pointers" which is supervisor data. What am I missing? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- -- 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/