[lkml]   [2013]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] modpost: Add flag -f for making section mismatches fatal
On Sun, Jan 06, 2013 at 03:22:39PM -0500, Jonathan Kliegman wrote:
> On Sun, Jan 6, 2013 at 4:36 AM, Sam Ravnborg <> wrote:
> > Hi Jonathan.
> >
> >> The section mismatch warning can be easy to miss during the kernel build
> >> process. Allow it to be marked as fatal to be easily caught and prevent
> >> bugs from slipping in.
> >>
> >> Signed-off-by: Jonathan Kliegman <>
> >
> > Another way to make them much more visible would be to make
> > the warnings always be verbose.
> I'd like to keep the option for a hard fail if a mismatch is detected.
> This way automated build systems will detect the failed build and can
> reject a chan
> > In other words drop support for the "-S" options used below:
> >
> > Previously the dev* stuff caused a lot of warnings, but
> > since we have HOTPLUG always enabled this is a non-issue.
> > So I think that this is a good time to enable the verboce
> > warnings.
> I can submit a second patch for this if you'd like, but I'm not
> familiar with all the previous decisions in this area. If I
> understand correctly we'll still need the config option as it also
> changes compiler flags for inlining.

We need one config option that allows us to debug section mismatchs.
This options adds another gcc option as you also points out.
And this is the one that already exist.

And then you suggest to add another options which makes section
mismatch warnings fatal.
This sounds like a good idea but reverse the logic.
Something like:

bool "Section mismatch warnings produced by modpost are non-fatal"
default y
bla bla

Because then you do not cause section mismatch to be fatal for allyesconfig and
allmodconfig builds. We really do not want to go there yet (I think).
I must admit I do not know how many section mismatch warnigns that are lingering
for the different architectures.
If the number is sufficiently low then we could consider go for fatal as default.

And it would be good to have first patch that makes section mismatch warnings verbose,
independent on any config options.

This patch would have to do something like:
- Makes it possible to set CONFIG_DEBUG_SECTION_MISMATCH using menuconfig (I recall there are
a dependency that avoids this today)
- Drop support for the -S options and drop the bits that set it
- Drop the reference to CONFIG_DEBUG_SECTION_MISMATCH in modpost error message

I would be happy if you could do this and test it.


 \ /
  Last update: 2013-01-08 21:01    [W:0.230 / U:19.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site