From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@armlinux.org.uk (Russell King - ARM Linux) Date: Thu, 19 Oct 2017 13:41:49 +0100 Subject: [PATCH 04/11] Define the virtual space of KASan's shadow region In-Reply-To: References: <20171011082227.20546-5-liuwenliang@huawei.com> <201710141957.mbxeZJHB%fengguang.wu@intel.com> Message-ID: <20171019124149.GX20805@n2100.armlinux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Oct 16, 2017 at 01:14:54PM +0100, Ard Biesheuvel wrote: > On 16 October 2017 at 12:42, Liuwenliang (Lamb) wrote: > > On 10/16/2017 07:03 PM, Abbott Liu wrote: > >>arch/arm/kernel/entry-armv.S:348: Error: selected processor does not support `movw r1, > > #:lower16:((((0xC0000000-0x01000000)>>3)+((0xC0000000-0x01000000)-(1<<29))))' in ARM mode > >>arch/arm/kernel/entry-armv.S:348: Error: selected processor does not support `movt r1, > > #:upper16:((((0xC0000000-0x01000000)>>3)+((0xC0000000-0x01000000)-(1<<29))))' in ARM mode > > > > Thanks for building test. This error can be solved by following code: > > --- a/arch/arm/kernel/entry-armv.S > > +++ b/arch/arm/kernel/entry-armv.S > > @@ -188,8 +188,7 @@ ENDPROC(__und_invalid) > > get_thread_info tsk > > ldr r0, [tsk, #TI_ADDR_LIMIT] > > #ifdef CONFIG_KASAN > > - movw r1, #:lower16:TASK_SIZE > > - movt r1, #:upper16:TASK_SIZE > > + ldr r1, =TASK_SIZE > > #else > > mov r1, #TASK_SIZE > > #endif > > This is unnecessary: > > ldr r1, =TASK_SIZE > > will be converted to a mov instruction by the assembler if the value > of TASK_SIZE fits its 12-bit immediate field. It's an 8-bit immediate field for ARM. What it won't do is expand it to a pair of movw/movt instructions if it doesn't fit. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up