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] [day] [month] [year] [list]
Message-ID: <20181022104945.GA21886@localhost.localdomain>
Date:   Mon, 22 Oct 2018 18:49:45 +0800
From:   Chao Fan <fanc.fnst@...fujitsu.com>
To:     Baoquan He <bhe@...hat.com>
CC:     <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
        <linux-efi@...r.kernel.org>, <linux-acpi@...r.kernel.org>,
        <bp@...en8.de>, <tglx@...utronix.de>, <mingo@...hat.com>,
        <hpa@...or.com>, <keescook@...omium.org>, <msys.mizuma@...il.com>,
        <indou.takao@...fujitsu.com>, <caoj.fnst@...fujitsu.com>
Subject: Re: [PATCH v9 8/8] x86/boot/KASLR: Limit kaslr to choosing the
 immovable memory

On Mon, Oct 22, 2018 at 06:24:55PM +0800, Baoquan He wrote:
>On 10/22/18 at 06:13pm, Chao Fan wrote:
>> >> +static bool process_mem_region(struct mem_vector *region,
>> >> +			       unsigned long long minimum,
>> >> +			       unsigned long long image_size)
>> >> +{
>> >> +	int i;
>> >> +	/*
>> >> +	 * If no immovable memory found, or MEMORY_HOTREMOVE disabled,
>> >> +	 * walk all the regions, so use region directely.
>> >> +	 */
>> >> +	if (num_immovable_mem == 0) {
>> >> +		slots_count(region, minimum, image_size);
>> >> +
>> >> +		if (slot_area_index == MAX_SLOT_AREA) {
>> >> +			debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
>> >> +			return 1;
>> >> +		}
>> >> +		return 0;
>> >> +	}
>> >> +
>> >> +#ifdef CONFIG_MEMORY_HOTREMOVE
>> >> +	/*
>> >> +	 * If immovable memory found, filter the intersection between
>> >> +	 * immovable memory and region to slots_count.
>> >> +	 * Otherwise, go on old code.
>> >
>> >Could you explain more about what is the old code in otherwise case you
>> >want to go on?
>> 
>> Sure,
>> 1. 'movable_node' not specified in cmdline.
>> 2. CONFIG_HOT_REMOVE not difned.
>> 3. Just one node in this machine.
>
>So these cases are not covered by 'if (num_immovable_mem == 0)' code?
They are covered by 'if (num_immovable_mem == 0)' code.
>In thise ifdef code block, where do you handle above three cases?
"go on old code." means above:
+ if (num_immovable_mem == 0) {
+         slots_count(region, minimum, image_size);
+
+         if (slot_area_index == MAX_SLOT_AREA) {
+                 debug_putstr("Aborted e820/efi memmap scan (slot_areas full)!\n");
+                 return 1;
+         }
+         return 0;
+ }

Thanks,
Chao Fan

>
>Thanks
>Baoquan
>
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ