linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: David Abdurachmanov <david.abdurachmanov@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-riscv@lists.infradead.org
Subject: Re: warning in ./arch/riscv/include/asm/module.h
Date: Wed, 7 Nov 2018 19:25:55 +0100	[thread overview]
Message-ID: <CAEn-LTr__59kApb=kkm7aH0z4w-J9xG1rzhK1xDk3xCGSis9SQ@mail.gmail.com> (raw)
Message-ID: <20181107182555.lV9aDQRuEiCmWjJPnPzpIZvn3Um3jTR1A8zDny_DTts@z> (raw)
In-Reply-To: <CAK8P3a3KgBq72763QQauKNWdSv9ZRRUWMDxt1RycV6RxAJsCng@mail.gmail.com>

On Mon, Nov 5, 2018 at 10:02 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On 11/5/18, David Abdurachmanov <david.abdurachmanov@gmail.com> wrote:
> > Hi,
> >
> > This happens once you enable "Module signature verification". E.g.,
> >
> > [..]
> > CONFIG_MODULE_SIG=y
> > CONFIG_MODULE_SIG_ALL=y
> > CONFIG_MODULE_SIG_SHA256=y
> > CONFIG_MODULE_SIG_HASH="sha256"
> > CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
> > [..]
> >
> > BUILDSTDERR: In file included from kernel/module-internal.h:13,
> > BUILDSTDERR:                  from kernel/module_signing.c:17:
> > BUILDSTDERR: ./arch/riscv/include/asm/module.h:11:34: warning: 'struct
> > module' declared inside parameter list will not be visible outside of
> > this definition or declaration
> > BUILDSTDERR:  u64 module_emit_got_entry(struct module *mod, u64 val);
> > BUILDSTDERR:                                   ^~~~~~
> > BUILDSTDERR: ./arch/riscv/include/asm/module.h:12:34: warning: 'struct
> > module' declared inside parameter list will not be visible outside of
> > this definition or declaration
> > BUILDSTDERR:  u64 module_emit_plt_entry(struct module *mod, u64 val);
> > BUILDSTDERR:                                   ^~~~~~
>
> This is very easy to fix:
>
> diff --git a/arch/riscv/include/asm/module.h b/arch/riscv/include/asm/module.h
> index 349df33808c4..cd2af4b013e3 100644
> --- a/arch/riscv/include/asm/module.h
> +++ b/arch/riscv/include/asm/module.h
> @@ -8,6 +8,7 @@
>
>  #define MODULE_ARCH_VERMAGIC    "riscv"
>
> +struct module;
>  u64 module_emit_got_entry(struct module *mod, u64 val);
>  u64 module_emit_plt_entry(struct module *mod, u64 val);
>

True. Originally I was wondering if there is a bigger problem with
header ordering. I will send the patch.

> > BUILDSTDERR: net/core/rtnetlink.c: In function 'rtnl_newlink':
> > BUILDSTDERR: net/core/rtnetlink.c:3224:1: warning: the frame size of
> > 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > BUILDSTDERR:  }
> > BUILDSTDERR:  ^
>
> This may be much harder. I've fixed this type of issue for arm and
> x86, but it requires a much more detailed analysis of what's going
> on. This is often a compiler bug. Which compiler version are you
> using?

Ops. I didn't indent to copy this one. This one is expected as Fedora
has CONFIG_FRAME_WARN set to 1024. Only couple architectures
set that to higher number (2048).

david

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2018-11-07 18:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 14:51 warning in ./arch/riscv/include/asm/module.h David Abdurachmanov
2018-11-05 14:51 ` David Abdurachmanov
2018-11-05 21:02 ` Arnd Bergmann
2018-11-05 21:02   ` Arnd Bergmann
2018-11-07 18:25   ` David Abdurachmanov [this message]
2018-11-07 18:25     ` David Abdurachmanov
2018-11-07 21:12     ` Arnd Bergmann
2018-11-07 21:12       ` Arnd Bergmann

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='CAEn-LTr__59kApb=kkm7aH0z4w-J9xG1rzhK1xDk3xCGSis9SQ@mail.gmail.com' \
    --to=david.abdurachmanov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-riscv@lists.infradead.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).