From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752723AbcFVNEA (ORCPT ); Wed, 22 Jun 2016 09:04:00 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:50176 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751671AbcFVND6 (ORCPT ); Wed, 22 Jun 2016 09:03:58 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Thierry Reding , linux-tegra@vger.kernel.org, Alexandre Courbot , linux-kernel@vger.kernel.org, Stephen Warren Subject: Re: [PATCH] ARM: tegra: remove board_init_funcs array Date: Wed, 22 Jun 2016 15:05:35 +0200 Message-ID: <40780752.S2fyoFjsUW@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160622125013.GH26943@ulmo.ba.sec> References: <20160622124052.1263574-1-arnd@arndb.de> <20160622125013.GH26943@ulmo.ba.sec> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:15UeAp0WqXu4LD/9u3HodPhZeU5TxtsHoUydnSqD5pNxEu0mS2U 3RAVLkpKHuJtS63IZ8i2FWK85ov0YP9x9wRks/CiRoGXgfAobGzVaNwSoywXzI6di0kxwX0 rkfL1BwEIXOP7iKkRbcTWcKDNZe1P0dBDAtufMxwIAxiNChWPCVvbiLostiGePQ6UopYjHv Tk+BzAMSAqem/Nw/ckADA== X-UI-Out-Filterresults: notjunk:1;V01:K0:C25o6WSjLR4=:eUkX6990q/nSXoxxwVDNEj CCFmcvqfmI9pMXfPHpnySSoCx0UHHCKFY5UQ5Pw0U9UuNwy3RoDmzBmWG0SVle/qmhXDCk2Cl KZb6vd/vH7b3ZvQsxhtvn3cB1UK2jmY7UqZOpHytQSujjiXMt0b6N88h6tHDuHAFCTTh5J8R1 cG2wkkrdL/HDYviRPAG3qU3vaHX96TKwiMYYyhwamnvg2anTsLgit9S/EolUGHp9LslHX9tOK a7mcd6nBwHC3ZOqIStOXcI75OxJrl4ysajwyjuaWK2b73h8r7GOw7PcIQigjTuQFRHTDodSdw JGDf7QWMuQ9yI8OZd5PenNFCY1hhK9MlxGltYNK8CEyPSci0QlHxPx0xlN2WTtYcF1rDBU9Ip LM83eKGSOdeKcLjs2ojQPU8WgmwUQ+Z0Db0suT6eIRph6UOoNRo+nkYUN9G7ZqzoKd+fXNcZz 0CEk1hVdp7DXlNDKOErT92s4HUaJSZV4iDyIoH/5+8fhQ7DDlLK9st4zr77CaLIz1qikqCmhf Sf2ty/gwpM4udZQGDgcRSZXDvd69PrRhkISmCSRHedN84n008fTCU57eHyM2aYragSBquxDlS 3nd/AgSC6fnXHe2Kej450xrifYkcSQy+b7LuvMzZl998H0LVfIvjExSsBxARYg2ivZFu3p9vz 4lsHG0Ipm7p8vjTExFkY+i3tzGAO4GJcAaOnCr9VO3y9peSUENx1QV2Yi4fGBD8difSji97v6 X5fPA54VOblyTQrI Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, June 22, 2016 2:50:13 PM CEST Thierry Reding wrote: > > Not enough information to check signature validity. > On Wed, Jun 22, 2016 at 02:39:41PM +0200, Arnd Bergmann wrote: > > In a configuration that enables CONFIG_UBSAN_SANITIZE_ALL, I am getting > > a section mismatch warning for tegra20: > > > > WARNING: arch/arm/mach-tegra/built-in.o(.data+0x6e0): Section mismatch in reference from the variable board_init_funcs to the function .init.text:paz00_init() > > > > The array is no longer useful here since there is only one entry, > > so we can simply call the function directly after checking > > of_machine_is_compatible(). This fixes the section mismatch > > and is easier to read. > > > > Signed-off-by: Arnd Bergmann > > --- > > arch/arm/mach-tegra/tegra.c | 24 +++--------------------- > > 1 file changed, 3 insertions(+), 21 deletions(-) > > Shouldn't these section mismatches show up with default builds? I > haven't seen any when building Tegra configurations. > > I'm going to apply this patch because I think it's useful, but it sure > would be nice to know why I need to enable this new UBSAN stuff to get > these warnings now. It depends on the how aggressive the inlining works. Without UBSAN, gcc seems to completely optimze away the loop and just the function directly, which it can do because 'board_init_funcs' is static. I assume that the UBSAN object overflow check has the effect of not dropping the symbol so it can check the size. Arnd