Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964811AbcKXJh5 (ORCPT ); Thu, 24 Nov 2016 04:37:57 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:53703 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938576AbcKXJhs (ORCPT ); Thu, 24 Nov 2016 04:37:48 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Jakub Kicinski , linux-s390@vger.kernel.org, Kees Cook , Nicolas Pitre , Catalin Marinas , Heiko Carstens , Russell King , LKML , Chris Brandt , Martin Schwidefsky , Andrew Morton , Chris Metcalf Subject: Re: [PATCH] ARM: fix kmemleak for XIP_KERNEL Date: Thu, 24 Nov 2016 10:37:02 +0100 Message-ID: <2275597.t9zIij20nT@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <20161122142829.1776129-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:g3Ox6gGWaZ/MWog7AGZv5HbNWzfur80U4J2D2T+6qpvsKg3K9ut bHfEcHDMMBYTvrmEV0VmOYCdDQL8r8OcwruI8gAeRgxesoYMzmcBQQ9Gb9jYTKmAJnU4Oqk w3ygTQeC2+lQBrlAbwCbqwid0DlIx2/iTKoxgutpChr/F3vWSa8rZSxKff278caa1zcHUSp G3QS2XBGnWyBhR2TMiUtQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:YF/WnhRNSGM=:RVsoVzk4zE0dsqMZCjamy4 b/k6U374mjSinkzo0irhepByt85zZo/2kVITB9SGPenWYg9Wv5889q0zS1fP0Int7lG+58CIO agSoKmWRNC4iwYKsglbLPa0UMu9Nz6eRSjPSVqX6u5HMZTxFEH5OCzzG/s/ZLrQZQUiLniISj Bw0/xTb2u6/vUXIbJqv36VVpE7K9NwnFEut+ntOB87fN10yAt6ShUPC1XVck/41Zw3CsZfIRT SoJRd+TFi6m5RktEgYU/OpZNbPQtTVcqKUBKfd68GPMuJqG8JxbSh8XyMRVmSoujv69gdqQXE HcKBi0qa0CadpMBuVqdtUQZwGEmMAHnnjQ4+m04TIsKGOg039kynToL4UU1GiymY83T/yFWTk NMD4fpfwQPc+NS7uJjw7CPEiMNb6tMomJTUqZctGPOQN61eB4/JycYlYN9KxJajrfTdeZYXnA 8uAdbXntPyn2s1dEynxNOiP4Is1W0uNnmkaHfDyXkhUYSQ3shH1rC1TGFVeKUCE5rfLzdUvPh s8A+/ZXoJOAdN6DvgEb/Px/CbA+CV7vxJ4UdvnMwgIsyRSQKml1BSvEc8zPO1G38DWyrBYq4a 3KB3se7h976yOICd3dn6G5K6nKe+GI2G4AKA9K+er5juSY7UqvRO7bdvnIw319BJ3aiLov+Y1 6KHqzGP4/IMtZIbgxPkC9NfGCFgrQ4XMWx1ynxGExuQThPv8sK4/1l7rpZeuSr4tj7GCrUkbb ru4kueLX/vcfJNBmADs+gOoqwm1PGw62dqPA4g== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1719 Lines: 43 On Thursday, November 24, 2016 1:30:03 AM CET Jakub Kicinski wrote: > On Tue, Nov 22, 2016 at 6:28 AM, Arnd Bergmann wrote: > > The newly added check for RO_AFTER_INIT_DATA in kmemleak breaks ARM whenever > > XIP_KERNEL is enabled: > > > > mm/kmemleak.o: In function `kmemleak_scan': > > kmemleak.c:(.text.kmemleak_scan+0x2e4): undefined reference to `__end_data_ro_after_init' > > kmemleak.c:(.text.kmemleak_scan+0x2e8): undefined reference to `__start_data_ro_after_init' > > > > This adds the start/end symbols for the section even in the case of having > > no data in the section, to make the check work while keeping the architecture > > specific override in one place. > > > > Fixes: d7c19b066dcf ("mm: kmemleak: scan .data.ro_after_init") > > Signed-off-by: Arnd Bergmann > > --- > > The patch causing this was merged late into v4.9-rc, this one should > > probably go there as well. > > > > I assume the same problem exists on s390, but I have not checked that. > > Hi Arnd! > > Sorry for breaking things again :( The confusion must have been caused > by going via different trees. Actually, Russell's commit is dated 6 > days after mine so could as well be: > > Fixes: 2a3811068fbc ("ARM: Fix XIP kernels") > > Not that it matters. Got it. I guess it's really the combination of the two, so I'd clarify that in the changelog and list both commits. > About s390 - I thought I took care of it in d7c19b066dcf ("mm: > kmemleak: scan .data.ro_after_init"), do you see anything suspicious > in the way I did it? I'll do some more s390 builds just to triple > check. You are right, I had already noticed that too but not replied yet. s390 is ok as far as I can tell. Arnd