From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Li Yang-r58472" <LeoLi@freescale.com>
Cc: Andrew Morton <akpm@osdl.org>, Sam Ravnborg <sam@ravnborg.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
linuxppc-dev@ozlabs.org, Linus <torvalds@linux-foundation.org>
Subject: Re: [PATCH 1/2] kbuild: Add "Section mismatch" warning whitelist for powerpc
Date: Tue, 15 May 2007 15:33:50 +0530 [thread overview]
Message-ID: <a781481a0705150303y587ea18dt435f2fc45a671226@mail.gmail.com> (raw)
In-Reply-To: <989B956029373F45A0B8AF0297081890B76040@zch01exm26.fsl.freescale.net>
On 5/15/07, Li Yang-r58472 <LeoLi@freescale.com> wrote:
> > [...]
> > Actually, once __init_refok comes in, would we need any other
> > whitelisting mechanism at all? I think the exception patterns in
> > secref_whitelist() and those two other whitelisting functions
> > (init_section_ref_ok and exit_section_ref_ok) could all be
> > subsumed and made redundant if / when __init_refok is used
> > in the actual sources.
>
> I don't think so. __init_refok can be used to mark special functions
> which are legitimate to reference .init.text/.init.data
But I have slightly different (reversed) semantics for __init_refok
in mind. Basically, we use __init_refok to annotate _callees_
and not _callers_. In short, __init_refok is a _type_ of __init
section that other sections can freely reference to, without
modpost complaining about this. [ had suggested this in some
previous thread earlier ]
The __init_refok-for-callees mechanism could be useful to
reduce duplication, having to mark lesser number of functions,
and also make most of those exception patterns in modpost.c
redundant.
Ultimately, we want modpost to shut up for some known false
positives. Currently we have 9 exception patterns, 'n' number
of special sections hard-coded in modpost.c, 3 whitelisting
functions and also the __init_refok thing that can be used
directly to mark functions in the sources. But modpost
doesn't really care _how_ a particular case got whitelisted.
Using _only_ the __init_refok (easily greppable in the sources)
annotation for callees could help keep all such special cases
manageable and in control, compared to several different ways
to dodge modpost warnings.
> but cannot be used to mark special sections.
Yes, so mark the special _callees_ as __init_refok.
next prev parent reply other threads:[~2007-05-15 10:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-14 10:53 [PATCH 1/2] kbuild: Add "Section mismatch" warning whitelist for powerpc Li Yang
2007-05-14 11:06 ` Sam Ravnborg
2007-05-14 13:56 ` Kumar Gala
2007-05-14 19:30 ` Andrew Morton
2007-05-14 20:10 ` Kumar Gala
2007-05-14 21:13 ` Sam Ravnborg
2007-05-15 0:17 ` Satyam Sharma
2007-05-15 9:22 ` Li Yang-r58472
2007-05-15 10:03 ` Satyam Sharma [this message]
2007-05-15 10:56 ` Stephen Rothwell
2007-05-15 9:36 ` Li Yang-r58472
2007-05-15 19:29 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a781481a0705150303y587ea18dt435f2fc45a671226@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=LeoLi@freescale.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=sam@ravnborg.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).