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: <9a420bf8-3c22-4dc2-809a-19ceac9aa373@linux.ibm.com>
Date: Wed, 8 Jan 2025 17:33:12 +0530
From: Sourabh Jain <sourabhjain@...ux.ibm.com>
To: Baoquan he <bhe@...hat.com>
Cc: linuxppc-dev@...ts.ozlabs.org, Andrew Morton <akpm@...ux-foundation.org>,
        Hari Bathini <hbathini@...ux.ibm.com>,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>, kexec@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND v1 5/5] crash: option to let arch decide mem range
 is usable




On 08/01/25 17:08, Baoquan he wrote:
> On 01/08/25 at 03:44pm, Sourabh Jain wrote:
> ...snip...
>> diff --git a/include/linux/kexec.h b/include/linux/kexec.h
>> index f0e9f8eda7a3..407f8b0346aa 100644
>> --- a/include/linux/kexec.h
>> +++ b/include/linux/kexec.h
>> @@ -205,6 +205,15 @@ static inline int arch_kimage_file_post_load_cleanup(struct kimage *image)
>>   }
>>   #endif
>>   
>> +#ifndef arch_check_excluded_range
>> +static inline int arch_check_excluded_range(struct kimage *image,
>> +					    unsigned long start,
>> +					    unsigned long end)
>> +{
>> +	return 0;
>> +}
>> +#endif
>> +
>>   #ifdef CONFIG_KEXEC_SIG
>>   #ifdef CONFIG_SIGNED_PE_FILE_VERIFICATION
>>   int kexec_kernel_verify_pe_sig(const char *kernel, unsigned long kernel_len);
>> diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
>> index 3eedb8c226ad..52e1480dbfa1 100644
>> --- a/kernel/kexec_file.c
>> +++ b/kernel/kexec_file.c
>> @@ -464,6 +464,12 @@ static int locate_mem_hole_top_down(unsigned long start, unsigned long end,
>>   			continue;
>>   		}
>>   
>> +		/* Make sure this does not conflict exclude range */
>                                                     ^
>                  Make sure this doesn't conflict with excluded range?
>
>> +		if (arch_check_excluded_range(image, temp_start, temp_end)) {
>> +			temp_start = temp_start - PAGE_SIZE;
>> +			continue;
>> +		}
>> +
>>   		/* We found a suitable memory range */
>>   		break;
>>   	} while (1);
>> @@ -498,6 +504,12 @@ static int locate_mem_hole_bottom_up(unsigned long start, unsigned long end,
>>   			continue;
>>   		}
>>   
>> +		/* Make sure this does not conflict exclude range */
>                                                     ^
>                                                   Ditto.

I will update both comments.

Thanks,
Sourabh Jain


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ