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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 17 Feb 2020 11:01:29 +0530 From: Anup Patel <anup@...infault.org> To: Alexandre Ghiti <alex@...ti.fr> Cc: Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, Jan Kiszka <jan.kiszka@....de>, stable@...r.kernel.org, linux-riscv <linux-riscv@...ts.infradead.org>, "linux-kernel@...r.kernel.org List" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] riscv: Fix range looking for kernel image memblock On Mon, Feb 17, 2020 at 10:59 AM Alexandre Ghiti <alex@...ti.fr> wrote: > > When looking for the memblock where the kernel lives, we should check > that the memory range associated to the memblock entirely comprises the > kernel image and not only intersects with it. > > Signed-off-by: Alexandre Ghiti <alex@...ti.fr> > --- > arch/riscv/mm/init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c > index 965a8cf4829c..fab855963c73 100644 > --- a/arch/riscv/mm/init.c > +++ b/arch/riscv/mm/init.c > @@ -131,7 +131,7 @@ void __init setup_bootmem(void) > for_each_memblock(memory, reg) { > phys_addr_t end = reg->base + reg->size; > > - if (reg->base <= vmlinux_end && vmlinux_end <= end) { > + if (reg->base <= vmlinux_start && vmlinux_end <= end) { > mem_size = min(reg->size, (phys_addr_t)-PAGE_OFFSET); > > /* > -- > 2.20.1 > Looks good to me. Reviewed-by: Anup Patel <anup@...infault.org> Regards, Anup
Powered by blists - more mailing lists