linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Michal Marek <michal.lkml@markovi.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] modpost: shorten warning messages in report_sec_mismatch()
Date: Thu, 4 Aug 2022 01:35:48 +0900	[thread overview]
Message-ID: <CAK7LNARBpsFzYfCLwHEzjYNWnM9BLX3tEzvmPKjiKWzkU-yjrg@mail.gmail.com> (raw)
In-Reply-To: <CAKwvOd=cBXzA9SfYtK-h_dAqLyg=5iZ6YjztTfNschKUMBTK9Q@mail.gmail.com>

On Wed, Aug 3, 2022 at 3:13 AM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> On Mon, Aug 1, 2022 at 2:41 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> >
> > Each section mismatch results in long warning messages. Too much.
>
> :(
>
> Yes; they are too verbose.  That said, I have found the
> recommendations about annotations for function attributes handy in the
> past and would be sad to see them go.  They remind me of "note"
> diagnostics from the compiler that add additional context to
> "warning"/"error" diagnostics on what the recommended next steps are
> for fixing them.
>
> Is there a "happy middle ground" here?

I do not know.
modpost became painfully ugly.


Moreover, the current hint is not necessarily precise.
("lacks a __initdata" in the following)



[sample code]
int dummy __initdata;
void set_dummy(void) { dummy = 1; }


[warning]
WARNING: modpost: vmlinux.o(.text+0x194412): Section mismatch in
reference from the function set_dummy() to the variable
.init.data:dummy
The function set_dummy() references
the variable __initdata dummy.
This is often because set_dummy lacks a __initdata
annotation or the annotation of dummy is wrong.




--
Best Regards


Masahiro Yamada

      reply	other threads:[~2022-08-03 16:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  9:38 [PATCH 1/4] modpost: shorten warning messages in report_sec_mismatch() Masahiro Yamada
2022-08-01  9:39 ` [PATCH 2/4] modpost: add PATTERNS() helper macro Masahiro Yamada
2022-08-01  9:39 ` [PATCH 3/4] modpost: remove unneeded .symbol_white_list initializers Masahiro Yamada
2022-08-01  9:39 ` [PATCH 4/4] modpost: remove .symbol_white_list field entirely Masahiro Yamada
2022-08-02 18:13 ` [PATCH 1/4] modpost: shorten warning messages in report_sec_mismatch() Nick Desaulniers
2022-08-03 16:35   ` Masahiro Yamada [this message]

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=CAK7LNARBpsFzYfCLwHEzjYNWnM9BLX3tEzvmPKjiKWzkU-yjrg@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=ndesaulniers@google.com \
    /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).