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]
Date:   Wed, 4 Jan 2017 09:36:39 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Hartley Sweeten <HartleyS@...ionengravers.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "catalin.marinas@....com" <catalin.marinas@....com>
Cc:     "nicolas.pitre@...aro.org" <nicolas.pitre@...aro.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "matt@...eblueprint.co.uk" <matt@...eblueprint.co.uk>,
        "will.deacon@....com" <will.deacon@....com>,
        "stefan@...er.ch" <stefan@...er.ch>,
        "chris.brandt@...esas.com" <chris.brandt@...esas.com>,
        "linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
        "cyrille.pitchen@...el.com" <cyrille.pitchen@...el.com>,
        "panand@...hat.com" <panand@...hat.com>,
        "boris.brezillon@...e-electrons.com" 
        <boris.brezillon@...e-electrons.com>,
        "pawel.moll@....com" <pawel.moll@....com>,
        "richard@....at" <richard@....at>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "ben@...adent.org.uk" <ben@...adent.org.uk>,
        "vladimir.murzin@....com" <vladimir.murzin@....com>,
        "keescook@...omium.org" <keescook@...omium.org>,
        "arnd@...db.de" <arnd@...db.de>,
        "labbott@...oraproject.org" <labbott@...oraproject.org>,
        "jonathan.austin@....com" <jonathan.austin@....com>,
        "ard.biesheuvel@...aro.org" <ard.biesheuvel@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "computersforpeace@...il.com" <computersforpeace@...il.com>,
        "dwmw2@...radead.org" <dwmw2@...radead.org>,
        "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
        "js07.lee@...sung.com" <js07.lee@...sung.com>
Subject: Re: [PATCH v5 2/4] ARM: Define KERNEL_START and KERNEL_END

On 01/04/2017 07:58 AM, Hartley Sweeten wrote:
> On Tuesday, January 03, 2017 6:14 PM, Florian Fainelli wrote:
>>
>> In preparation for adding CONFIG_DEBUG_VIRTUAL support, define a set of
>> common constants: KERNEL_START and KERNEL_END which abstract
>> CONFIG_XIP_KERNEL vs. !CONFIG_XIP_KERNEL. Update the code where
>> relevant.
>>
>> Acked-by: Russell King <rmk+kernel@...linux.org.uk>
>> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
>> ---
>>  arch/arm/include/asm/memory.h | 7 +++++++
>>  arch/arm/mm/init.c            | 7 ++-----
>>  arch/arm/mm/mmu.c             | 6 +-----
>>  3 files changed, 10 insertions(+), 10 deletions(-)
>>
>> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
>> index 76cbd9c674df..bee7511c5098 100644
>> --- a/arch/arm/include/asm/memory.h
>> +++ b/arch/arm/include/asm/memory.h
>> @@ -111,6 +111,13 @@
>>  
>>  #endif /* !CONFIG_MMU */
>>  
>> +#ifdef CONFIG_XIP_KERNEL
>> +#define KERNEL_START		_sdata
>> +#else
>> +#define KERNEL_START		_stext
>> +#endif
>> +#define KERNEL_END		_end
>> +
>>  /*
>>   * We fix the TCM memories max 32 KiB ITCM resp DTCM at these
>>   * locations
>> diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
>> index 370581aeb871..c87d0d5b65f2 100644
>> --- a/arch/arm/mm/init.c
>> +++ b/arch/arm/mm/init.c
>> @@ -230,11 +230,8 @@ phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
>>  void __init arm_memblock_init(const struct machine_desc *mdesc)
>>  {
>>  	/* Register the kernel text, kernel data and initrd with memblock. */
>> -#ifdef CONFIG_XIP_KERNEL
>> -	memblock_reserve(__pa(_sdata), _end - _sdata);
>> -#else
>> -	memblock_reserve(__pa(_stext), _end - _stext);
>> -#endif
>> +	memblock_reserve(__pa(KERNEL_START), _end - KERNEL_START);
> 
> Shouldn't the '_end' above be 'KERNEL_END'?

I sort of intentionally not changed that line in order not to make the
line exceed 80 columns and make checkpatch whine about it, but if you
think this is clearer, I can add this change, since I need to respin to
address Laura's feedback anyway.

Thanks!
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ