From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751795AbbDNGVI (ORCPT ); Tue, 14 Apr 2015 02:21:08 -0400 Received: from mail113-250.mail.alibaba.com ([205.204.113.250]:57568 "EHLO us-alimail-mta1.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750992AbbDNGU7 (ORCPT ); Tue, 14 Apr 2015 02:20:59 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=r41g03024;MF=hillf.zj@alibaba-inc.com;PH=DS;RN=6;RT=6;SR=0; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "Hillf Danton" , "'Laura Abbott'" Cc: "'Russell King'" , "'linux-kernel'" , , "'Arnd Bergmann'" References: <042801d066b3$0ca78a30$25f69e90$@alibaba-inc.com> <074401d0710d$2b9198a0$82b4c9e0$@alibaba-inc.com> In-Reply-To: <074401d0710d$2b9198a0$82b4c9e0$@alibaba-inc.com> Subject: Re: [patch] ARM: fix module-bound check in setting page attributes Date: Tue, 14 Apr 2015 14:20:05 +0800 Message-ID: <00cd01d0767b$0cbe08a0$263a19e0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKWkNKu4FurPqc1WAFJ+6S68oSOowI7wCi2m6310fA= Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping > -----Original Message----- > From: Hillf Danton [mailto:hillf.zj@alibaba-inc.com] > Sent: Tuesday, April 07, 2015 4:31 PM > To: Hillf Danton; 'Laura Abbott' > Cc: 'Russell King'; 'linux-kernel'; linux@arm.linux.org.uk > Subject: Re: [patch] ARM: fix module-bound check in setting page attributes > > Ping > > > > It was introduced in commit f2ca09f381a59 > > (ARM: 8311/1: Don't use is_module_addr in setting page attributes) > > > > We have no need to check start twice, but see if end is also in range. > > > > Signed-off-by: Hillf Danton > > --- > > > > --- a/arch/arm/mm/pageattr.c Wed Mar 25 11:55:13 2015 > > +++ b/arch/arm/mm/pageattr.c Wed Mar 25 11:57:31 2015 > > @@ -52,7 +52,7 @@ static int change_memory_common(unsigned > > if (start < MODULES_VADDR || start >= MODULES_END) > > return -EINVAL; > > > > - if (end < MODULES_VADDR || start >= MODULES_END) > > + if (end < MODULES_VADDR || end >= MODULES_END) > > return -EINVAL; > > > > data.set_mask = set_mask; > > --