From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from muru.com ([72.249.23.125]:33662 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbcBKQ1P (ORCPT ); Thu, 11 Feb 2016 11:27:15 -0500 Date: Thu, 11 Feb 2016 08:27:12 -0800 From: Tony Lindgren To: Russell King - ARM Linux Cc: "Woodruff, Richard" , Sasha Levin , "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" , Kees Cook , Laura Abbott , "Menon, Nishanth" , "Kristo, Tero" Subject: Re: [added to the 4.1 stable tree] ARM: OMAP2+: Fix l2_inv_api_params for rodata Message-ID: <20160211162712.GH3500@atomide.com> References: <1455117136-28870-1-git-send-email-sasha.levin@oracle.com> <1455117136-28870-180-git-send-email-sasha.levin@oracle.com> <20160211104147.GT10826@n2100.arm.linux.org.uk> <20160211154810.GE3500@atomide.com> <20160211161918.GX10826@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160211161918.GX10826@n2100.arm.linux.org.uk> Sender: stable-owner@vger.kernel.org List-ID: * Russell King - ARM Linux [160211 08:20]: > On Thu, Feb 11, 2016 at 07:48:10AM -0800, Tony Lindgren wrote: > > Hi, > > > > * Russell King - ARM Linux [160211 02:43]: > > > Yes, this isn't going to work if it is copied out of the DDR, because > > > moving the data to the .data section and introducing a PC relative > > > access to it will make the code expect to access data at a relative > > > offset from the SRAM. > > > > > > Sascha, please drop this for now. > > > > Hmm did I miss something? Since commit 46e130d298a3 ("ARM: pm: omap3: > > run the ASM sleep code from DDR") we only run minimal parts of the > > code in SRAM. Naturally if any SRAM code uses PC relative access things > > won't work. > > > > Here are the only pieces running in SRAM: > > > > - omap3_do_wfi running in SRAM only for retention idle as off > > idle restores DDR for us > > > > - For HS omaps, save_secure_ram_context is already in .data as it's > > only run in SRAM > > > > - For some revisions, we have es3_sdrc_fix dynamically copied to > > SRAM > > > > If there are other places that I've missed, please let me know and > > I'll take a look ASAP! > > Hmm, ok, I missed that. It looks fine, but now that I'm looking deeper, > I'm wondering what the point of this particular change is. > > From what I can see, you're moving both l2dis_3630 and l2_inv_api_params > into the .data section, and adding extra complication to access those in > a position-relative manner. However, I'm unable to locate anything which > writes to either of these: they're only read from - nothing can, they're > not even global symbols, so aren't referencable outside of sleep34xx.S. > > So I don't see why this should be Cc'd for stable kernels, since as far > as I can see, it's not fixing any bug. We have enable_omap3630_toggle_l2_on_restore toggle l2dis_3630 from pm34xx.c. That won't work if CONFIG_DEBUG_RODATA is selected. But for l2_inv_api_params, it seems you're right. That's read only data! Regards, Tony