Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752768AbcLGN6a (ORCPT ); Wed, 7 Dec 2016 08:58:30 -0500 Received: from foss.arm.com ([217.140.101.70]:37950 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbcLGN62 (ORCPT ); Wed, 7 Dec 2016 08:58:28 -0500 Date: Wed, 7 Dec 2016 13:57:40 +0000 From: Mark Rutland To: Kees Cook Cc: Laura Abbott , Ard Biesheuvel , Will Deacon , Catalin Marinas , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , LKML , Linux-MM , Andrew Morton , Marek Szyprowski , Joonsoo Kim , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCHv4 09/10] mm/usercopy: Switch to using lm_alias Message-ID: <20161207135740.GB25605@leverpostej> References: <1480445729-27130-1-git-send-email-labbott@redhat.com> <1480445729-27130-10-git-send-email-labbott@redhat.com> <20161206181859.GH24177@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1186 Lines: 36 On Tue, Dec 06, 2016 at 12:10:50PM -0800, Kees Cook wrote: > On Tue, Dec 6, 2016 at 10:18 AM, Mark Rutland wrote: > > On Tue, Nov 29, 2016 at 11:39:44AM -0800, Kees Cook wrote: > >> On Tue, Nov 29, 2016 at 10:55 AM, Laura Abbott wrote: > >> > > >> > The usercopy checking code currently calls __va(__pa(...)) to check for > >> > aliases on symbols. Switch to using lm_alias instead. > >> > > >> > Signed-off-by: Laura Abbott > >> > >> Acked-by: Kees Cook > >> > >> I should probably add a corresponding alias test to lkdtm... > >> > >> -Kees > > > > Something like the below? > > > > It uses lm_alias(), so it depends on Laura's patches. We seem to do the > > right thing, anyhow: > > Cool, this looks good. What happens on systems without an alias? In that case, lm_alias() should be an identity function, and we'll just hit the usual kernel address (i.e. it should be identical to USERCOPY_KERNEL). > Laura, feel free to add this to your series: > > Acked-by: Kees Cook I'm happy with that, or I can resend this as a proper patch once the rest is in. Thanks, Mark.