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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180930101001.GE6950@dhcp-128-65.nay.redhat.com>
Date:   Sun, 30 Sep 2018 18:10:01 +0800
From:   Dave Young <dyoung@...hat.com>
To:     AKASHI Takahiro <takahiro.akashi@...aro.org>
Cc:     catalin.marinas@....com, will.deacon@....com, dhowells@...hat.com,
        vgoyal@...hat.com, herbert@...dor.apana.org.au,
        davem@...emloft.net, bhe@...hat.com, arnd@...db.de,
        schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
        ard.biesheuvel@...aro.org, bhsharma@...hat.com,
        kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
        prudo@...ux.ibm.com, james.morse@....com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v15 05/16] kexec_file: kexec_walk_memblock() only walks a
 dedicated region at kdump

On 09/28/18 at 03:48pm, AKASHI Takahiro wrote:
> In kdump case, there exists only one dedicated memblock region as usable
> memory (crashk_res). With this patch, kexec_walk_memblock() runs a given
> callback function on this region.
> 
> Cosmetic change: 0 to MEMBLOCK_NONE at for_each_free_mem_range*()
> 
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@...aro.org>
> Cc: Dave Young <dyoung@...hat.com>
> Cc: Vivek Goyal <vgoyal@...hat.com>
> Cc: Baoquan He <bhe@...hat.com>

Acked-by: Dave Young <dyoung@...hat.com>

> ---
>  kernel/kexec_file.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
> index 370d7eab49fe..2f615a7968dd 100644
> --- a/kernel/kexec_file.c
> +++ b/kernel/kexec_file.c
> @@ -511,8 +511,11 @@ static int kexec_walk_memblock(struct kexec_buf *kbuf,
>  	phys_addr_t mstart, mend;
>  	struct resource res = { };
>  
> +	if (kbuf->image->type == KEXEC_TYPE_CRASH)
> +		return func(&crashk_res, kbuf);
> +
>  	if (kbuf->top_down) {
> -		for_each_free_mem_range_reverse(i, NUMA_NO_NODE, 0,
> +		for_each_free_mem_range_reverse(i, NUMA_NO_NODE, MEMBLOCK_NONE,
>  						&mstart, &mend, NULL) {
>  			/*
>  			 * In memblock, end points to the first byte after the
> @@ -526,8 +529,8 @@ static int kexec_walk_memblock(struct kexec_buf *kbuf,
>  				break;
>  		}
>  	} else {
> -		for_each_free_mem_range(i, NUMA_NO_NODE, 0, &mstart, &mend,
> -					NULL) {
> +		for_each_free_mem_range(i, NUMA_NO_NODE, MEMBLOCK_NONE,
> +					&mstart, &mend, NULL) {
>  			/*
>  			 * In memblock, end points to the first byte after the
>  			 * range while in kexec, end points to the last byte
> -- 
> 2.19.0
> 
> 
> _______________________________________________
> kexec mailing list
> kexec@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec

Thanks
Dave

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ