lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 19 May 2014 02:49:26 +0000 From: "Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com> To: Nicolas Pitre <nicolas.pitre@...aro.org> CC: "linux@....linux.org.uk" <linux@....linux.org.uk>, "lauraa@...eaurora.org" <lauraa@...eaurora.org>, "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, "santosh.shilimkar@...com" <santosh.shilimkar@...com>, "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>, "superlibj8301@...il.com" <superlibj8301@...il.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: RE: [PATCH v3] arm: ioremap: Fix static vm area boundary check. > > For each vmalloc area, there is one guard page at the end of it. > > so the vm->size = PAGE_ALIGN(offset + request size) + guard page size. > > Nope. There is no guard page for statically created vmalloc areas. > Yes, you are right, I'm thinking why the static area has no guard page? Thanks very much, BRs Xiubo > > > Signed-off-by: Richard Lee <superlibj8301@...il.com> > > Signed-off-by: Xiubo Li <Li.Xiubo@...escale.com> > > Cc: Nicolas Pitre <nico@...aro.org> > > Cc: Santosh Shilimkar <santosh.shilimkar@...com> > > Cc: Joonsoo Kim <iamjoonsoo.kim@....com> > > --- > > arch/arm/mm/ioremap.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c > > index be69333..758e8f7 100644 > > --- a/arch/arm/mm/ioremap.c > > +++ b/arch/arm/mm/ioremap.c > > @@ -49,14 +49,18 @@ static struct static_vm > *find_static_vm_paddr(phys_addr_t paddr, > > struct vm_struct *vm; > > > > list_for_each_entry(svm, &static_vmlist, list) { > > + phys_addr_t paddr_end, phys_addr_end; > > + > > vm = &svm->vm; > > if (!(vm->flags & VM_ARM_STATIC_MAPPING)) > > continue; > > if ((vm->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype)) > > continue; > > > > - if (vm->phys_addr > paddr || > > - paddr + size - 1 > vm->phys_addr + vm->size - 1) > > + /* The PAGE_SIZE here is vmalloc area's guard page */ > > + phys_addr_end = vm->phys_addr + vm->size - PAGE_SIZE - 1; > > + paddr_end = paddr + size - 1; > > + if (vm->phys_addr > paddr || paddr_end > phys_addr_end) > > continue; > > > > return svm; > > -- > > 1.8.4 > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists