From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 07 Apr 2014 15:58:41 +0200 (CEST) Received: from mail.windriver.com ([147.11.1.11]:60150 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6816886AbaDGN6ixcEQ9 (ORCPT ); Mon, 7 Apr 2014 15:58:38 +0200 Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail.windriver.com (8.14.5/8.14.5) with ESMTP id s37Dw56x025632 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 7 Apr 2014 06:58:05 -0700 (PDT) Received: from [128.224.56.57] (128.224.56.57) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server id 14.3.169.1; Mon, 7 Apr 2014 06:58:04 -0700 Message-ID: <5342AEEF.4080503@windriver.com> Date: Mon, 7 Apr 2014 09:58:07 -0400 From: Paul Gortmaker User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Kees Cook CC: Ralf Baechle , Sanjay Lal , John Crispin , , LKML Subject: Re: [PATCH] mips: export icache_flush_range References: <20140322154720.GA23863@www.outflux.net> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [128.224.56.57] Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 39678 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: paul.gortmaker@windriver.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On 14-03-22 03:05 PM, Kees Cook wrote: > On Sat, Mar 22, 2014 at 9:47 AM, Kees Cook wrote: >> The lkdtm module performs tests against executable memory ranges, so >> it needs to flush the icache for proper behaviors. Other architectures >> already export this, so do the same for MIPS. >> >> Signed-off-by: Kees Cook >> --- >> This is currently untested! I'm building a MIPS cross-compiler now... >> If someone can validate this fixes the build when lkdtm is a module, >> that would be appreciated. :) > > Okay, now tested. I reproduced the failure and this patch fixes it. :) Just checking if this happened to fall through the cracks. The most recent (Apr4) linux-next build for mips still fails with this error. http://kisskb.ellerman.id.au/kisskb/buildresult/10877159/ Paul. -- > > -Kees > >> --- >> arch/mips/mm/cache.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c >> index fde7e56d13fe..b3f1df13d9f6 100644 >> --- a/arch/mips/mm/cache.c >> +++ b/arch/mips/mm/cache.c >> @@ -38,6 +38,7 @@ void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); >> void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size); >> >> EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); >> +EXPORT_SYMBOL_GPL(flush_icache_range); >> >> /* MIPS specific cache operations */ >> void (*flush_cache_sigtramp)(unsigned long addr); >> -- >> 1.7.9.5 >> >> >> -- >> Kees Cook >> Chrome OS Security > > > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.windriver.com ([147.11.1.11]:60150 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6816886AbaDGN6ixcEQ9 (ORCPT ); Mon, 7 Apr 2014 15:58:38 +0200 Message-ID: <5342AEEF.4080503@windriver.com> Date: Mon, 7 Apr 2014 09:58:07 -0400 From: Paul Gortmaker MIME-Version: 1.0 Subject: Re: [PATCH] mips: export icache_flush_range References: <20140322154720.GA23863@www.outflux.net> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Kees Cook Cc: Ralf Baechle , Sanjay Lal , John Crispin , linux-mips@linux-mips.org, LKML Message-ID: <20140407135807.0RVeVPTIjCcogOaW6UgEZi_MCrc8tNaX6OvfNyH6hK4@z> On 14-03-22 03:05 PM, Kees Cook wrote: > On Sat, Mar 22, 2014 at 9:47 AM, Kees Cook wrote: >> The lkdtm module performs tests against executable memory ranges, so >> it needs to flush the icache for proper behaviors. Other architectures >> already export this, so do the same for MIPS. >> >> Signed-off-by: Kees Cook >> --- >> This is currently untested! I'm building a MIPS cross-compiler now... >> If someone can validate this fixes the build when lkdtm is a module, >> that would be appreciated. :) > > Okay, now tested. I reproduced the failure and this patch fixes it. :) Just checking if this happened to fall through the cracks. The most recent (Apr4) linux-next build for mips still fails with this error. http://kisskb.ellerman.id.au/kisskb/buildresult/10877159/ Paul. -- > > -Kees > >> --- >> arch/mips/mm/cache.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c >> index fde7e56d13fe..b3f1df13d9f6 100644 >> --- a/arch/mips/mm/cache.c >> +++ b/arch/mips/mm/cache.c >> @@ -38,6 +38,7 @@ void (*__flush_kernel_vmap_range)(unsigned long vaddr, int size); >> void (*__invalidate_kernel_vmap_range)(unsigned long vaddr, int size); >> >> EXPORT_SYMBOL_GPL(__flush_kernel_vmap_range); >> +EXPORT_SYMBOL_GPL(flush_icache_range); >> >> /* MIPS specific cache operations */ >> void (*flush_cache_sigtramp)(unsigned long addr); >> -- >> 1.7.9.5 >> >> >> -- >> Kees Cook >> Chrome OS Security > > >