[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a781481a0706130039r26e9522q98d9645809136ea7@mail.gmail.com>
Date: Wed, 13 Jun 2007 13:09:07 +0530
From: "Satyam Sharma" <satyam.sharma@...il.com>
To: "Jan Beulich" <jbeulich@...ell.com>
Cc: "Sam Ravnborg" <sam@...nborg.org>,
"Venkatesh Pallipadi" <venkatesh.pallipadi@...el.com>,
"Andi Kleen" <ak@...e.de>, linux-kernel@...r.kernel.org,
patches@...-64.org
Subject: Re: [PATCH] x86: fix improper .init-type section references
On 6/13/07, Jan Beulich <jbeulich@...ell.com> wrote:
> >>> Sam Ravnborg <sam@...nborg.org> 13.06.07 06:35 >>>
> >>
> >> Yup, we were only discussing possibility that modpost not complain
> >> about .init -> .exit references that will never go oops (because the arch
> >> guarantees that).
> >
> >And there are no good reasosns why the rules should be different for i386
> >and powerpc.
> >This type of special casing is always bad.
> >Think about it a little.
> >Someone writes a generic driver and test it on i386 - OK.
> >But for powerpc it result in a build failure. It would be so much better
> >to warn about this situation early.
Ok, that makes sense.
> And I didn't mean to special case it - I meant to suggest changing the semantics
> generally, which is why I gave the example of calling cleanup code (__exit)
> from error paths in startup code (__init).
i.e. don't discard anything at build time, and link the .exit.{text,
data} sections
into the kernel image for _all_ archs? (otherwise how do we avoid
special-casing/
checking for the arch in modpost and warn/not-warn about invalid/valid cases)
But then why not simply lose the __exit (and .exit.*) altogether? Because
__exit becomes redundant in the suggested changed semantics -- just mark
all the cleanup code as __init too (when it's built-in, the only
callsite for the
cleanup code would be from the startup code in .init.*, and when modular,
__init and __exit lose all relevance anyway).
Satyam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists