From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757066AbbCDQrJ (ORCPT ); Wed, 4 Mar 2015 11:47:09 -0500 Received: from foss.arm.com ([217.140.101.70]:54068 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751195AbbCDQrH (ORCPT ); Wed, 4 Mar 2015 11:47:07 -0500 Date: Wed, 4 Mar 2015 16:47:02 +0000 From: Catalin Marinas To: Laura Abbott Cc: Will Deacon , Kees Cook , Russell King , Rusty Russell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/3] arm64: Don't use is_module_addr in setting page attributes Message-ID: <20150304164701.GY28951@e104818-lin.cambridge.arm.com> References: <1424902497-32141-1-git-send-email-lauraa@codeaurora.org> <1424902497-32141-2-git-send-email-lauraa@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424902497-32141-2-git-send-email-lauraa@codeaurora.org> 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 On Wed, Feb 25, 2015 at 02:14:55PM -0800, Laura Abbott wrote: > > The set_memory_* functions currently only support module > addresses. The addresses are validated using is_module_addr. > That function is special though and relies on internal state > in the module subsystem to work properly. At the time of > module initialization and calling set_memory_*, it's too early > for is_module_addr to work properly so it always returns > false. Rather than be subject to the whims of the module state, > just bounds check against the module virtual address range. > > Signed-off-by: Laura Abbott Not sure which tree this would be merged through, so: Acked-by: Catalin Marinas I can pick up the arm64 patch and the module.c one with Rusty's ack (as for the arm one, I think it could go in via rmk's patch system). -- Catalin From mboxrd@z Thu Jan 1 00:00:00 1970 From: catalin.marinas@arm.com (Catalin Marinas) Date: Wed, 4 Mar 2015 16:47:02 +0000 Subject: [PATCH 1/3] arm64: Don't use is_module_addr in setting page attributes In-Reply-To: <1424902497-32141-2-git-send-email-lauraa@codeaurora.org> References: <1424902497-32141-1-git-send-email-lauraa@codeaurora.org> <1424902497-32141-2-git-send-email-lauraa@codeaurora.org> Message-ID: <20150304164701.GY28951@e104818-lin.cambridge.arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 25, 2015 at 02:14:55PM -0800, Laura Abbott wrote: > > The set_memory_* functions currently only support module > addresses. The addresses are validated using is_module_addr. > That function is special though and relies on internal state > in the module subsystem to work properly. At the time of > module initialization and calling set_memory_*, it's too early > for is_module_addr to work properly so it always returns > false. Rather than be subject to the whims of the module state, > just bounds check against the module virtual address range. > > Signed-off-by: Laura Abbott Not sure which tree this would be merged through, so: Acked-by: Catalin Marinas I can pick up the arm64 patch and the module.c one with Rusty's ack (as for the arm one, I think it could go in via rmk's patch system). -- Catalin