Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761682AbcLVGTR (ORCPT ); Thu, 22 Dec 2016 01:19:17 -0500 Received: from mail-by2nam01on0062.outbound.protection.outlook.com ([104.47.34.62]:48608 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759680AbcLVGTO (ORCPT ); Thu, 22 Dec 2016 01:19:14 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Date: Thu, 22 Dec 2016 11:48:58 +0530 From: Yury Norov To: Alexander Popov CC: Catalin Marinas , Will Deacon , Ard Biesheuvel , Mark Rutland , Rob Herring , Kefeng Wang , AKASHI Takahiro , Jon Masters , David Daney , Ganapatrao Kulkarni , Andrew Morton , Dmitry Vyukov , Nicolai Stange , James Morse , Andrey Ryabinin , Andrey Konovalov , , , syzkaller Subject: Re: [PATCH 1/2] arm64: setup: introduce kaslr_offset() Message-ID: <20161222061857.GA26502@yury-N73SV> References: <1481417456-28826-1-git-send-email-alex.popov@linux.com> <1481417456-28826-2-git-send-email-alex.popov@linux.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1481417456-28826-2-git-send-email-alex.popov@linux.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [106.77.4.212] X-ClientProxiedBy: VI1P194CA0007.EURP194.PROD.OUTLOOK.COM (10.175.178.17) To BN4PR07MB2243.namprd07.prod.outlook.com (10.164.63.149) X-MS-Office365-Filtering-Correlation-Id: a870b28b-5823-4457-8e28-08d42a3271d0 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN4PR07MB2243; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2243;3:Xwplrd7+GrnplKIxZLw4UkbMSTLraiMKsP0CrnoIDrdZ0mY/ltNOnfuzgUAYyps54ye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VBZUD0DJtq3zdX6kndOm4hGIJUVo1F5pylEPiZihBULFSJKyd4iayvmgW/w9/VEk3uGGZSA6LbA/YUbqvXvdxaLmwGPyvX7Vr8t4NGMcRok+nHDf+n6ddhmQ6Q5Qsnrh++KD3RJOMv7fBjOMlw+1f6cUzKkOqBySF/+OPDyYzkriggVx7VckYeuIKvudjUHB6eOqdXYRR+OLijoXUEFI+07u9nf17yEfN+9U3Ir3qfLvEbVZK+Yft5d2TazqimgVP+z7thu4MUEEkD5JLZJy/GIMCF0bUgjuN91R2x5uI0kI9dpQ31z7K3Vdrw795/3MF0wUug+2UU5d0O6AhSfO8nEOlXicXaR6zcom8EzcRIgSFNptlq9yX+mhOgcPvC0W24ia7//6FnPKoGB9sxdWHHlEzACk03RjFrHkxwHdYeoZwLKef295k8RTwJUmpKyS8oxrLnGQHgb4wvcTnBLysj6pQVhp4sI08XM7fFZpS+N49Ju+fEde8boUBJAU6ffXyPSv09Vki5Vbjw1cw099e5uaYFN1Byl+InGK4bkMk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148);SRVR:BN4PR07MB2243;BCL:0;PCL:0;RULEID:;SRVR:BN4PR07MB2243; X-Microsoft-Exchange-Diagnostics: 1;BN4PR07MB2243;4:gWj4e5ltS9sMzOVlRLe+cjF6tDyVwl+Gb3+2OkOZWznylIxoh2A9ESCAKzk8KuLTy6JMFs5SGK3D4Gi9mdNzDYzxja91zq7gwNbmDDP8s18PExRYBrMJn8MjAHZsGXefNXfoo/2GkhDBRVARsedCXgK1HXnH6H4olGF4jUk6ApQ/R9s9RVgg3XHUR8rb4uPDPVj06xPp93nvFCc4pBN6h2tfocy93aWiVIIxCm5NT6tDVYt9CZgEg93HGHw7EFuiduUk2zVHj/sofTwtl+aCr20xL5WS+4eJfEuRkHRhojTGQAatdUkyE+TT+QLsObW0kxgSV/Inurq0S9UERz8f3jT4tSQ6OZO+f/Khyh2Oi5kifZV/UnOXQ3IqBxmGLv0tZDKjBtHZHO7ot1UWfQQrWFCpI8Tw7Y/wu1+kSyt67mEBQMaXNJ3FQrYJ9XoDtohexMCdAdQSq1Nj0CaQigVqlMPZ5oudO6Iuu9u6BuccfRJwLt4mLP93hggnkVHxLGVsFuxKqQkiDzrFE4aRxADU960y8t25EbFvn/SCOLbfIAUbC6kq1t2Ro27SY03aCk3+lM7Qn+I4PocXNg8k+zfojA== X-Forefront-PRVS: 01644DCF4A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(189002)(24454002)(199003)(5009440100003)(33656002)(106356001)(39060400001)(47776003)(305945005)(105586002)(2870700001)(6496003)(7736002)(42186005)(66066001)(110136003)(6486002)(23676002)(68736007)(6916009)(2906002)(7416002)(2950100002)(76506005)(92566002)(5660300001)(189998001)(8676002)(6116002)(1076002)(9686002)(81166006)(101416001)(4001350100001)(50466002)(3846002)(81156014)(25786008)(33716001)(54356999)(38730400001)(76176999)(50986999)(83506001)(6666003)(97736004)(229853002)(4326007)(18370500001)(2004002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR07MB2243;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjRQUjA3TUIyMjQzOzIzOmRWM2dDZFZ2dmhtejMvNVhDNlV3WVFLM0t6?= =?utf-8?B?dXJQNVJkaUtiZlBzSCtBV2JNWXkzMWFVS3pqRU5zMjhlTy9wTEtGNmc4aDRZ?= =?utf-8?B?UnBkZktIRnFUL3NHVUVZWWc2ampsTDlDb3g0TnVqS3IrRmRUSDNXVkFoaDJq?= =?utf-8?B?U2dFSFQxOTdPa0VNN1VPMENqWVIrL3N1dkIyUjFRVkwvY2REaFlZb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EBqy2PYw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2016 06:19:10.1968 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR07MB2243 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1962 Lines: 57 On Sun, Dec 11, 2016 at 03:50:55AM +0300, Alexander Popov wrote: > Introduce kaslr_offset() similarly to x86_64 for fixing kcov. > > Signed-off-by: Alexander Popov > --- > arch/arm64/include/asm/setup.h | 19 +++++++++++++++++++ > arch/arm64/include/uapi/asm/setup.h | 4 ++-- > arch/arm64/kernel/setup.c | 8 ++++---- > 3 files changed, 25 insertions(+), 6 deletions(-) > create mode 100644 arch/arm64/include/asm/setup.h > > diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h > new file mode 100644 > index 0000000..e7b59b9 > --- /dev/null > +++ b/arch/arm64/include/asm/setup.h > @@ -0,0 +1,19 @@ > +/* > + * arch/arm64/include/asm/setup.h > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#ifndef __ASM_SETUP_H > +#define __ASM_SETUP_H > + > +#include > + > +static inline unsigned long kaslr_offset(void) > +{ > + return kimage_vaddr - KIMAGE_VADDR; > +} > + > +#endif Hi Alexander, I found today's linux-next master broken: In file included from init/main.c:88:0: ./arch/arm64/include/asm/setup.h:14:100: error: redefinition of ‘kaslr_offset’ In file included from ./arch/arm64/include/asm/page.h:54:0, from ./include/linux/mm_types.h:16, from ./include/linux/sched.h:27, from ./arch/arm64/include/asm/compat.h:25, from ./arch/arm64/include/asm/stat.h:23, from ./include/linux/stat.h:5, from ./include/linux/module.h:10, from init/main.c:15: /arch/arm64/include/asm/memory.h:168:100: note: previous definition of ‘kaslr_offset’ was here scripts/Makefile.build:293: recipe for target 'init/main.o' failed make[1]: *** [init/main.o] Error 1 It looks like you declare kaslr_offset() twice - in this patch, and in 7ede8665f (arm64: setup: introduce kaslr_offset()). Yury