Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754742AbbDOIeD (ORCPT ); Wed, 15 Apr 2015 04:34:03 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:33278 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754551AbbDOIdz (ORCPT ); Wed, 15 Apr 2015 04:33:55 -0400 Date: Wed, 15 Apr 2015 10:35:39 +0200 From: Quentin Casasnovas To: Rusty Russell Cc: Quentin Casasnovas , Thierry Reding , lkml , Oleg Nesterov , Borislav Petkov , Linus Torvalds Subject: Re: [PATCH 7/7] modpost: handle relocations mismatch in __ex_table. Message-ID: <20150415083539.GA5947@chrystal.uk.oracle.com> References: <1426596002-26128-1-git-send-email-quentin.casasnovas@oracle.com> <1426596002-26128-8-git-send-email-quentin.casasnovas@oracle.com> <20150414121405.GA30442@ulmo.nvidia.com> <20150414123516.GB2925@chrystal.uk.oracle.com> <87egnmrryu.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87egnmrryu.fsf@rustcorp.com.au> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1623 Lines: 43 On Wed, Apr 15, 2015 at 12:57:37PM +0930, Rusty Russell wrote: > > I've applied his patch, then the following: Thanks. > > modpost: handle -ffunction-sections > > 52dc0595d540 introduced OTHER_TEXT_SECTIONS for identifying what > sections could validly have __ex_table entries. Unfortunately, it > wasn't tested with -ffunction-sections, which some architectures > use. > > Reported-by: kbuild test robot > Cc: Quentin Casasnovas > Signed-off-by: Rusty Russell > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index cbd53e08769d..22dbc604cdb9 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -876,7 +876,7 @@ static void check_section(const char *modname, struct elf_info *elf, > #define TEXT_SECTIONS ".text", ".text.unlikely", ".sched.text", \ > ".kprobes.text" > #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \ > - ".fixup", ".entry.text" > + ".fixup", ".entry.text", ".exception.text", ".text.*" > Is there a reason we're not adding ".text.*" to TEXT_SECTIONS as opposed to OTHER_TEXT_SECTIONS? AFAIU, we'll not run the other modpost mismatch checks when the kernel is compiled with -ffunction-sections otherwise. I'll send a tentative fix for the divide-by-zero error shortly, sorry about the mess. Quentin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/