Linux-RISC-V Archive on lore.kernel.org
 help / color / Atom feed
* warning in ./arch/riscv/include/asm/module.h
@ 2018-11-05 14:51 david.abdurachmanov
  2018-11-05 14:51 ` David Abdurachmanov
  2018-11-05 21:02 ` arnd
  0 siblings, 2 replies; 8+ messages in thread
From: david.abdurachmanov @ 2018-11-05 14:51 UTC (permalink / raw)
  To: linux-riscv

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:                                   ^~~~~~
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:  ^

^ permalink raw reply	[flat|nested] 8+ messages in thread

* warning in ./arch/riscv/include/asm/module.h
  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
  1 sibling, 0 replies; 8+ messages in thread
From: David Abdurachmanov @ 2018-11-05 14:51 UTC (permalink / raw)
  To: linux-riscv

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:                                   ^~~~~~
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:  ^

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* warning in ./arch/riscv/include/asm/module.h
  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
  2018-11-05 21:02   ` Arnd Bergmann
  2018-11-07 18:25   ` david.abdurachmanov
  1 sibling, 2 replies; 8+ messages in thread
From: arnd @ 2018-11-05 21:02 UTC (permalink / raw)
  To: linux-riscv

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);

> 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?

        Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: warning in ./arch/riscv/include/asm/module.h
  2018-11-05 21:02 ` arnd
@ 2018-11-05 21:02   ` Arnd Bergmann
  2018-11-07 18:25   ` david.abdurachmanov
  1 sibling, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2018-11-05 21:02 UTC (permalink / raw)
  To: David Abdurachmanov; +Cc: linux-riscv

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);

> 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?

        Arnd

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* warning in ./arch/riscv/include/asm/module.h
  2018-11-05 21:02 ` arnd
  2018-11-05 21:02   ` Arnd Bergmann
@ 2018-11-07 18:25   ` david.abdurachmanov
  2018-11-07 18:25     ` David Abdurachmanov
  2018-11-07 21:12     ` arnd
  1 sibling, 2 replies; 8+ messages in thread
From: david.abdurachmanov @ 2018-11-07 18:25 UTC (permalink / raw)
  To: linux-riscv

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: warning in ./arch/riscv/include/asm/module.h
  2018-11-07 18:25   ` david.abdurachmanov
@ 2018-11-07 18:25     ` David Abdurachmanov
  2018-11-07 21:12     ` arnd
  1 sibling, 0 replies; 8+ messages in thread
From: David Abdurachmanov @ 2018-11-07 18:25 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-riscv

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* warning in ./arch/riscv/include/asm/module.h
  2018-11-07 18:25   ` david.abdurachmanov
  2018-11-07 18:25     ` David Abdurachmanov
@ 2018-11-07 21:12     ` arnd
  2018-11-07 21:12       ` Arnd Bergmann
  1 sibling, 1 reply; 8+ messages in thread
From: arnd @ 2018-11-07 21:12 UTC (permalink / raw)
  To: linux-riscv

On Wed, Nov 7, 2018 at 7:26 PM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
> 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:
> > > 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).

Om 64-bit architectures, setting it to 1024 causes lots of extra
warnings, since we have certain functions that put an array of
128 pointers on the stack. The default value in the kernel is 2048,
but I've managed to reduce it to 1280 in the past. I never managed
to get all the patches for that included, but I think that would be
a useful number if Fedora really wants to have something lower
than the default (and then fix the outliers).

       Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: warning in ./arch/riscv/include/asm/module.h
  2018-11-07 21:12     ` arnd
@ 2018-11-07 21:12       ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2018-11-07 21:12 UTC (permalink / raw)
  To: David Abdurachmanov; +Cc: linux-riscv

On Wed, Nov 7, 2018 at 7:26 PM David Abdurachmanov
<david.abdurachmanov@gmail.com> wrote:
> 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:
> > > 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).

Om 64-bit architectures, setting it to 1024 causes lots of extra
warnings, since we have certain functions that put an array of
128 pointers on the stack. The default value in the kernel is 2048,
but I've managed to reduce it to 1280 in the past. I never managed
to get all the patches for that included, but I think that would be
a useful number if Fedora really wants to have something lower
than the default (and then fix the outliers).

       Arnd

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-11-05 21:02   ` Arnd Bergmann
2018-11-07 18:25   ` david.abdurachmanov
2018-11-07 18:25     ` David Abdurachmanov
2018-11-07 21:12     ` arnd
2018-11-07 21:12       ` Arnd Bergmann

Linux-RISC-V Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-riscv/0 linux-riscv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-riscv linux-riscv/ https://lore.kernel.org/linux-riscv \
		linux-riscv@lists.infradead.org infradead-linux-riscv@archiver.kernel.org
	public-inbox-index linux-riscv


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-riscv


AGPL code for this site: git clone https://public-inbox.org/ public-inbox