Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1526266 > unrolled thread

Re: 'kbuild' merge before 4.9-rc1 breaks build and boot

Started byPeter Wu <peter@lekensteyn.nl>
First post2016-11-20 19:30 +0100
Last post2016-11-21 18:00 +0100
Articles 8 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: 'kbuild' merge before 4.9-rc1 breaks build and boot Peter Wu <peter@lekensteyn.nl> - 2016-11-20 19:30 +0100
    Re: 'kbuild' merge before 4.9-rc1 breaks build and boot Nicholas Piggin <npiggin@gmail.com> - 2016-11-21 07:00 +0100
      [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86 Adam Borowski <kilobyte@angband.pl> - 2016-11-21 07:50 +0100
        Re: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for  x86 Nicholas Piggin <npiggin@gmail.com> - 2016-11-21 08:30 +0100
          Re: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for  x86 Peter Wu <peter@lekensteyn.nl> - 2016-11-21 09:10 +0100
          [PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm Adam Borowski <kilobyte@angband.pl> - 2016-11-21 16:00 +0100
            Re: [PATCH reworded] x86/kbuild: enable modversions for symbols  exported from asm Peter Wu <peter@lekensteyn.nl> - 2016-11-21 16:10 +0100
            Re: [PATCH reworded] x86/kbuild: enable modversions for symbols  exported from asm Oliver Hartkopp <socketcan@hartkopp.net> - 2016-11-21 18:00 +0100

#1526266 — Re: 'kbuild' merge before 4.9-rc1 breaks build and boot

FromPeter Wu <peter@lekensteyn.nl>
Date2016-11-20 19:30 +0100
SubjectRe: 'kbuild' merge before 4.9-rc1 breaks build and boot
Message-ID<sFF2h-75D-7@gated-at.bofh.it>
Hi Nicholas,

Current git master (v4.9-rc5-364-g77079b1) with the latest kbuild fixes
is still failing to load modules when built with CONFIG_MODVERSIONS=y on
x86_64 using GCC 6.2.1.

It can still be reproduced with make defconfig, then enabling
CONFIG_MODVERSIONS=y. The build output contains:

    WARNING: "memcpy" [net/netfilter/nf_nat.ko] has no CRC!
    WARNING: "memmove" [net/netfilter/nf_nat.ko] has no CRC!
    WARNING: "_copy_to_user" [fs/efivarfs/efivarfs.ko] has no CRC!
    WARNING: "memcpy" [fs/efivarfs/efivarfs.ko] has no CRC!
    WARNING: "_copy_from_user" [fs/efivarfs/efivarfs.ko] has no CRC!

    $ grep 000000 Module.symvers
    0x00000000	phys_base	vmlinux	EXPORT_SYMBOL
    0x00000000	memmove	vmlinux	EXPORT_SYMBOL
    0x00000000	__copy_user_nocache	vmlinux	EXPORT_SYMBOL
    0x00000000	__get_user_4	vmlinux	EXPORT_SYMBOL
    0x00000000	__put_user_4	vmlinux	EXPORT_SYMBOL
    0x00000000	__memcpy	vmlinux	EXPORT_SYMBOL
    0x00000000	memset	vmlinux	EXPORT_SYMBOL
    0x00000000	__sw_hweight64	vmlinux	EXPORT_SYMBOL
    0x00000000	__sw_hweight32	vmlinux	EXPORT_SYMBOL
    0x00000000	memcpy_mcsafe_unrolled	vmlinux	EXPORT_SYMBOL_GPL
    0x00000000	memcpy	vmlinux	EXPORT_SYMBOL
    0x00000000	copy_user_enhanced_fast_string	vmlinux	EXPORT_SYMBOL
    0x00000000	clear_page	vmlinux	EXPORT_SYMBOL
    0x00000000	__put_user_2	vmlinux	EXPORT_SYMBOL
    0x00000000	__get_user_2	vmlinux	EXPORT_SYMBOL
    0x00000000	copy_page	vmlinux	EXPORT_SYMBOL
    0x00000000	copy_user_generic_string	vmlinux	EXPORT_SYMBOL
    0x00000000	_copy_to_user	vmlinux	EXPORT_SYMBOL
    0x00000000	__memmove	vmlinux	EXPORT_SYMBOL
    0x00000000	empty_zero_page	vmlinux	EXPORT_SYMBOL
    0x00000000	__get_user_8	vmlinux	EXPORT_SYMBOL
    0x00000000	__put_user_8	vmlinux	EXPORT_SYMBOL
    0x00000000	_copy_from_user	vmlinux	EXPORT_SYMBOL
    0x00000000	native_load_gs_index	vmlinux	EXPORT_SYMBOL
    0x00000000	__memset	vmlinux	EXPORT_SYMBOL
    0x00000000	__put_user_1	vmlinux	EXPORT_SYMBOL
    0x00000000	__get_user_1	vmlinux	EXPORT_SYMBOL
    0x00000000	copy_user_generic_unrolled	vmlinux	EXPORT_SYMBOL

Kind regards,
Peter

On Tue, Nov 08, 2016 at 12:33:34PM +1100, Nicholas Piggin wrote:
> On Mon, 7 Nov 2016 22:39:07 +0100
> Peter Wu <peter@lekensteyn.nl> wrote:
> 
> > On Mon, Nov 07, 2016 at 02:10:12PM -0500, Vince Weaver wrote:
> > > On Thu, 27 Oct 2016, Peter Wu wrote:
> > >   
> > > > I can confirm Olivers issue, the current mainline kernel fails to boot
> > > > on kernels with CONFIG_MODVERSIONS=y. Bisection points to:
> > > > 
> > > >     commit 784d5699eddc55878627da20d3fe0c8542e2f1a2
> > > >     Author: Al Viro <viro@zeniv.linux.org.uk>
> > > >     Date:   Mon Jan 11 11:04:34 2016 -0500  
> > > > > WARNING: "memset" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > > > > WARNING: "__fentry__" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > > > > WARNING: "memcpy" [sound/usb/snd-usbmidi-lib.ko] has no CRC!
> > > > > WARNING: "__sw_hweight32" [sound/usb/snd-usbmidi-lib.ko] has no CRC!  
> > > 
> > > Has any progress been made with this problem?
> > > 
> > > I'm also encountering it on my debian-unstable box on any kernel more 
> > > recent than 4.9-rc1 (up to and including 4.9-rc4).  I am glad someone 
> > > managed to isolate it as I was unable to get a clean bisect.
> > > 
> > > Vince  
> > 
> > The original kbuild issue went in via
> > merge commit 84d69848c97faab0c25aa2667b273404d2e2a64a which notes:
> > 
> >  - EXPORT_SYMBOL for asm source by Al Viro.
> > 
> >    This does bring a regression, because genksyms no longer generates
> >    checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is
> >    working on a patch to fix this.
> > 
> >    Plus, we are talking about functions like strcpy(), which rarely
> >    change prototypes.
> > 
> > Adding Nicholas in the cc, hopefully he can give a status update.
> 
> I think Michal has everything needed now for the kbuild bits. The arch
> specific patches can go via arch trees quite easily (there is no hard
> dependency either way). This is the kbuild bit:
> 
> https://git.kernel.org/cgit/linux/kernel/git/mmarek/kbuild.git/commit/?h=rc-fixes&id=4efca4ed05cbdfd13ec3e8cb623fb77d6e4ab187
> 
> And it also needs this incremental bit not in Michal's tree yet:
> 
> ---
>  scripts/Makefile.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 3e223c2..05c6bb4 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -332,7 +332,7 @@ cmd_gensymtypes_S =                                                         \
>      (echo "\#include <linux/kernel.h>" ;                                    \
>       echo "\#include <asm/asm-prototypes.h>" ;                              \
>      $(CPP) $(a_flags) $< |                                                  \
> -     grep ^___EXPORT_SYMBOL |                                               \
> +     grep ___EXPORT_SYMBOL |                                                \
>       sed 's/___EXPORT_SYMBOL \([a-zA-Z0-9_]*\),.*/EXPORT_SYMBOL(\1);/' ) |  \
>      $(CPP) -D__GENKSYMS__ $(c_flags) -xc - |                                \
>      $(GENKSYMS) $(if $(1), -T $(2))                                         \
> -- 
> 2.9.3
> 

[toc] | [next] | [standalone]


#1526374

FromNicholas Piggin <npiggin@gmail.com>
Date2016-11-21 07:00 +0100
Message-ID<sFPO2-5uT-9@gated-at.bofh.it>
In reply to#1526266
On Sun, 20 Nov 2016 19:26:23 +0100
Peter Wu <peter@lekensteyn.nl> wrote:

> Hi Nicholas,
> 
> Current git master (v4.9-rc5-364-g77079b1) with the latest kbuild fixes
> is still failing to load modules when built with CONFIG_MODVERSIONS=y on
> x86_64 using GCC 6.2.1.
> 
> It can still be reproduced with make defconfig, then enabling
> CONFIG_MODVERSIONS=y. The build output contains:
> 
>     WARNING: "memcpy" [net/netfilter/nf_nat.ko] has no CRC!
>     WARNING: "memmove" [net/netfilter/nf_nat.ko] has no CRC!
>     WARNING: "_copy_to_user" [fs/efivarfs/efivarfs.ko] has no CRC!
>     WARNING: "memcpy" [fs/efivarfs/efivarfs.ko] has no CRC!
>     WARNING: "_copy_from_user" [fs/efivarfs/efivarfs.ko] has no CRC!

Hi Peter,

Sorry it's taken some time, bear with us. The arch specific patches need
to be merged now. Adam, what is the status of your patch? Please submit
to x86 maintainers if you haven't already.

Thanks,
Nick

[toc] | [prev] | [next] | [standalone]


#1526409 — [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86

FromAdam Borowski <kilobyte@angband.pl>
Date2016-11-21 07:50 +0100
Subject[PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86
Message-ID<sFQAp-650-9@gated-at.bofh.it>
In reply to#1526374
Nicholas Piggin wrote:
> Architectures will need to have an include/asm/asm-prototypes.h that
> defines or #include<>s C-style prototypes for exported asm functions.
> We can do an asm-generic version for the common ones like memset so
> there's not a lot of pointless duplication there.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Tested-by: Kalle Valo <kvalo@codeaurora.org>
---
 arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++
 include/asm-generic/asm-prototypes.h  |  7 +++++++
 2 files changed, 19 insertions(+)
 create mode 100644 arch/x86/include/asm/asm-prototypes.h
 create mode 100644 include/asm-generic/asm-prototypes.h

diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
new file mode 100644
index 0000000..ae87224
--- /dev/null
+++ b/arch/x86/include/asm/asm-prototypes.h
@@ -0,0 +1,12 @@
+#include <asm/ftrace.h>
+#include <asm/uaccess.h>
+#include <asm/string.h>
+#include <asm/page.h>
+#include <asm/checksum.h>
+
+#include <asm-generic/asm-prototypes.h>
+
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/special_insns.h>
+#include <asm/preempt.h>
diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
new file mode 100644
index 0000000..df13637
--- /dev/null
+++ b/include/asm-generic/asm-prototypes.h
@@ -0,0 +1,7 @@
+#include <linux/bitops.h>
+extern void *__memset(void *, int, __kernel_size_t);
+extern void *__memcpy(void *, const void *, __kernel_size_t);
+extern void *__memmove(void *, const void *, __kernel_size_t);
+extern void *memset(void *, int, __kernel_size_t);
+extern void *memcpy(void *, const void *, __kernel_size_t);
+extern void *memmove(void *, const void *, __kernel_size_t);
-- 
2.10.2

Nicholas Piggin wrote:
> On Sun, 20 Nov 2016 19:26:23 +0100 Peter Wu <peter@lekensteyn.nl> wrote:
>
>> Current git master (v4.9-rc5-364-g77079b1) with the latest kbuild fixes
>> is still failing to load modules when built with CONFIG_MODVERSIONS=y on
>> x86_64 using GCC 6.2.1.
>>
>> It can still be reproduced with make defconfig, then enabling
>> CONFIG_MODVERSIONS=y. The build output contains:
>>
>>     WARNING: "memcpy" [net/netfilter/nf_nat.ko] has no CRC!
>>     WARNING: "memmove" [net/netfilter/nf_nat.ko] has no CRC!
>>     WARNING: "_copy_to_user" [fs/efivarfs/efivarfs.ko] has no CRC!
>>     WARNING: "memcpy" [fs/efivarfs/efivarfs.ko] has no CRC!
>>     WARNING: "_copy_from_user" [fs/efivarfs/efivarfs.ko] has no CRC!
>
> Sorry it's taken some time, bear with us. The arch specific patches need
> to be merged now. Adam, what is the status of your patch? Please submit
> to x86 maintainers if you haven't already.

I've re-checked against 4.9-rc6.

It'd probably fit better with kbuild parts, but it's up to you to decide;
I'm sending to x86 guys as you wish.


Meow!

[toc] | [prev] | [next] | [standalone]


#1526417 — Re: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86

FromNicholas Piggin <npiggin@gmail.com>
Date2016-11-21 08:30 +0100
SubjectRe: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86
Message-ID<sFRd8-6zi-13@gated-at.bofh.it>
In reply to#1526409
Hi Adam,

Thanks. I'd suggest doing x86: or x86/kbuild: prefix for the patch. Also
possibly consider describing what the patch does at a higher level in your
subject line, e.g.:

  x86/kbuild: enable modversions for symbols exported from asm

Also, it wouldn't hurt to add a little changelog of your own. Describe
problem then solution, e.g.,

  Commit 4efca4ed ("kbuild: modversions for EXPORT_SYMBOL() for asm") adds
  modversion support for symbols exported from asm files. Architectures
  must include C-style declarations for those symbols in asm/asm-prototypes.h
  in order for them to be versioned.

  Add these declarations for x86, and an architecture-independent file that
  can be used for common symbols.

(if you want to use that as-is or rewrite it, no problem).

You can add Acked-by: Nicholas Piggin <npiggin@gmail.com>

Also it's not a big deal, but if you redo the patch, you could consider
splitting it into two (first add the generic header, then the x86 header),
but both can go via the x86 tree.

Thanks,
Nick

On Mon, 21 Nov 2016 07:39:45 +0100
Adam Borowski <kilobyte@angband.pl> wrote:

> Nicholas Piggin wrote:
> > Architectures will need to have an include/asm/asm-prototypes.h that
> > defines or #include<>s C-style prototypes for exported asm functions.
> > We can do an asm-generic version for the common ones like memset so
> > there's not a lot of pointless duplication there.  
> 
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> Tested-by: Kalle Valo <kvalo@codeaurora.org>
> ---
>  arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++
>  include/asm-generic/asm-prototypes.h  |  7 +++++++
>  2 files changed, 19 insertions(+)
>  create mode 100644 arch/x86/include/asm/asm-prototypes.h
>  create mode 100644 include/asm-generic/asm-prototypes.h
> 
> diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
> new file mode 100644
> index 0000000..ae87224
> --- /dev/null
> +++ b/arch/x86/include/asm/asm-prototypes.h
> @@ -0,0 +1,12 @@
> +#include <asm/ftrace.h>
> +#include <asm/uaccess.h>
> +#include <asm/string.h>
> +#include <asm/page.h>
> +#include <asm/checksum.h>
> +
> +#include <asm-generic/asm-prototypes.h>
> +
> +#include <asm/page.h>
> +#include <asm/pgtable.h>
> +#include <asm/special_insns.h>
> +#include <asm/preempt.h>
> diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
> new file mode 100644
> index 0000000..df13637
> --- /dev/null
> +++ b/include/asm-generic/asm-prototypes.h
> @@ -0,0 +1,7 @@
> +#include <linux/bitops.h>
> +extern void *__memset(void *, int, __kernel_size_t);
> +extern void *__memcpy(void *, const void *, __kernel_size_t);
> +extern void *__memmove(void *, const void *, __kernel_size_t);
> +extern void *memset(void *, int, __kernel_size_t);
> +extern void *memcpy(void *, const void *, __kernel_size_t);
> +extern void *memmove(void *, const void *, __kernel_size_t);

[toc] | [prev] | [next] | [standalone]


#1526431 — Re: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86

FromPeter Wu <peter@lekensteyn.nl>
Date2016-11-21 09:10 +0100
SubjectRe: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86
Message-ID<sFRPP-74b-7@gated-at.bofh.it>
In reply to#1526417
On Mon, Nov 21, 2016 at 06:27:14PM +1100, Nicholas Piggin wrote:
> Hi Adam,
> 
> Thanks. I'd suggest doing x86: or x86/kbuild: prefix for the patch. Also
> possibly consider describing what the patch does at a higher level in your
> subject line, e.g.:
> 
>   x86/kbuild: enable modversions for symbols exported from asm
> 
> Also, it wouldn't hurt to add a little changelog of your own. Describe
> problem then solution, e.g.,
> 
>   Commit 4efca4ed ("kbuild: modversions for EXPORT_SYMBOL() for asm") adds
>   modversion support for symbols exported from asm files. Architectures
>   must include C-style declarations for those symbols in asm/asm-prototypes.h
>   in order for them to be versioned.
> 
>   Add these declarations for x86, and an architecture-independent file that
>   can be used for common symbols.
> 
> (if you want to use that as-is or rewrite it, no problem).
> 
> You can add Acked-by: Nicholas Piggin <npiggin@gmail.com>

Hi Adam, Nicholas,

Thanks for the patch! I have confirmed that this fixes the defconfig and
the normal .config build I use for debugging, so:

Tested-by: Peter Wu <oeter@lekensteyn.nl>

It might also be worth to mention in the changelog the user impact,
namely that kernels may fail to load modules at all when
CONFIG_MODVERSIONS=y.

Kind regards,
Peter

> Also it's not a big deal, but if you redo the patch, you could consider
> splitting it into two (first add the generic header, then the x86 header),
> but both can go via the x86 tree.
> 
> Thanks,
> Nick
> 
> On Mon, 21 Nov 2016 07:39:45 +0100
> Adam Borowski <kilobyte@angband.pl> wrote:
> 
> > Nicholas Piggin wrote:
> > > Architectures will need to have an include/asm/asm-prototypes.h that
> > > defines or #include<>s C-style prototypes for exported asm functions.
> > > We can do an asm-generic version for the common ones like memset so
> > > there's not a lot of pointless duplication there.  
> > 
> > Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> > Tested-by: Kalle Valo <kvalo@codeaurora.org>
> > ---
> >  arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++
> >  include/asm-generic/asm-prototypes.h  |  7 +++++++
> >  2 files changed, 19 insertions(+)
> >  create mode 100644 arch/x86/include/asm/asm-prototypes.h
> >  create mode 100644 include/asm-generic/asm-prototypes.h
> > 
> > diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
> > new file mode 100644
> > index 0000000..ae87224
> > --- /dev/null
> > +++ b/arch/x86/include/asm/asm-prototypes.h
> > @@ -0,0 +1,12 @@
> > +#include <asm/ftrace.h>
> > +#include <asm/uaccess.h>
> > +#include <asm/string.h>
> > +#include <asm/page.h>
> > +#include <asm/checksum.h>
> > +
> > +#include <asm-generic/asm-prototypes.h>
> > +
> > +#include <asm/page.h>
> > +#include <asm/pgtable.h>
> > +#include <asm/special_insns.h>
> > +#include <asm/preempt.h>
> > diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
> > new file mode 100644
> > index 0000000..df13637
> > --- /dev/null
> > +++ b/include/asm-generic/asm-prototypes.h
> > @@ -0,0 +1,7 @@
> > +#include <linux/bitops.h>
> > +extern void *__memset(void *, int, __kernel_size_t);
> > +extern void *__memcpy(void *, const void *, __kernel_size_t);
> > +extern void *__memmove(void *, const void *, __kernel_size_t);
> > +extern void *memset(void *, int, __kernel_size_t);
> > +extern void *memcpy(void *, const void *, __kernel_size_t);
> > +extern void *memmove(void *, const void *, __kernel_size_t);
> 

[toc] | [prev] | [next] | [standalone]


#1526736 — [PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm

FromAdam Borowski <kilobyte@angband.pl>
Date2016-11-21 16:00 +0100
Subject[PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm
Message-ID<sFYeB-2u5-1@gated-at.bofh.it>
In reply to#1526417
Commit 4efca4ed ("kbuild: modversions for EXPORT_SYMBOL() for asm") adds
modversion support for symbols exported from asm files. Architectures
must include C-style declarations for those symbols in asm/asm-prototypes.h
in order for them to be versioned.

Add these declarations for x86, and an architecture-independent file that
can be used for common symbols.

User impact: kernels may fail to load modules at all when
CONFIG_MODVERSIONS=y.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Tested-by: Kalle Valo <kvalo@codeaurora.org>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Peter Wu <oeter@lekensteyn.nl>
---
 arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++
 include/asm-generic/asm-prototypes.h  |  7 +++++++
 2 files changed, 19 insertions(+)
 create mode 100644 arch/x86/include/asm/asm-prototypes.h
 create mode 100644 include/asm-generic/asm-prototypes.h

diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
new file mode 100644
index 0000000..ae87224
--- /dev/null
+++ b/arch/x86/include/asm/asm-prototypes.h
@@ -0,0 +1,12 @@
+#include <asm/ftrace.h>
+#include <asm/uaccess.h>
+#include <asm/string.h>
+#include <asm/page.h>
+#include <asm/checksum.h>
+
+#include <asm-generic/asm-prototypes.h>
+
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/special_insns.h>
+#include <asm/preempt.h>
diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
new file mode 100644
index 0000000..df13637
--- /dev/null
+++ b/include/asm-generic/asm-prototypes.h
@@ -0,0 +1,7 @@
+#include <linux/bitops.h>
+extern void *__memset(void *, int, __kernel_size_t);
+extern void *__memcpy(void *, const void *, __kernel_size_t);
+extern void *__memmove(void *, const void *, __kernel_size_t);
+extern void *memset(void *, int, __kernel_size_t);
+extern void *memcpy(void *, const void *, __kernel_size_t);
+extern void *memmove(void *, const void *, __kernel_size_t);
-- 
2.10.2

Now with a better description, provided by Nick Piggin (thanks!), and a
remark about user impact.

This version doesn't split the patch between x86 vs generic parts, would you
guys prefer that?

[toc] | [prev] | [next] | [standalone]


#1526751 — Re: [PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm

FromPeter Wu <peter@lekensteyn.nl>
Date2016-11-21 16:10 +0100
SubjectRe: [PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm
Message-ID<sFYoh-2MJ-25@gated-at.bofh.it>
In reply to#1526736
On Mon, Nov 21, 2016 at 03:52:20PM +0100, Adam Borowski wrote:
> Commit 4efca4ed ("kbuild: modversions for EXPORT_SYMBOL() for asm") adds
> modversion support for symbols exported from asm files. Architectures
> must include C-style declarations for those symbols in asm/asm-prototypes.h
> in order for them to be versioned.
> 
> Add these declarations for x86, and an architecture-independent file that
> can be used for common symbols.
> 
> User impact: kernels may fail to load modules at all when
> CONFIG_MODVERSIONS=y.
> 
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> Tested-by: Kalle Valo <kvalo@codeaurora.org>
> Acked-by: Nicholas Piggin <npiggin@gmail.com>
> Tested-by: Peter Wu <oeter@lekensteyn.nl>

Typo: oeter@.. -> peter@..

> ---
>  arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++
>  include/asm-generic/asm-prototypes.h  |  7 +++++++
>  2 files changed, 19 insertions(+)
>  create mode 100644 arch/x86/include/asm/asm-prototypes.h
>  create mode 100644 include/asm-generic/asm-prototypes.h
> 
> diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
> new file mode 100644
> index 0000000..ae87224
> --- /dev/null
> +++ b/arch/x86/include/asm/asm-prototypes.h
> @@ -0,0 +1,12 @@
> +#include <asm/ftrace.h>
> +#include <asm/uaccess.h>
> +#include <asm/string.h>
> +#include <asm/page.h>
> +#include <asm/checksum.h>
> +
> +#include <asm-generic/asm-prototypes.h>
> +
> +#include <asm/page.h>
> +#include <asm/pgtable.h>
> +#include <asm/special_insns.h>
> +#include <asm/preempt.h>
> diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
> new file mode 100644
> index 0000000..df13637
> --- /dev/null
> +++ b/include/asm-generic/asm-prototypes.h
> @@ -0,0 +1,7 @@
> +#include <linux/bitops.h>
> +extern void *__memset(void *, int, __kernel_size_t);
> +extern void *__memcpy(void *, const void *, __kernel_size_t);
> +extern void *__memmove(void *, const void *, __kernel_size_t);
> +extern void *memset(void *, int, __kernel_size_t);
> +extern void *memcpy(void *, const void *, __kernel_size_t);
> +extern void *memmove(void *, const void *, __kernel_size_t);
> -- 
> 2.10.2
> 
> Now with a better description, provided by Nick Piggin (thanks!), and a
> remark about user impact.
> 
> This version doesn't split the patch between x86 vs generic parts, would you
> guys prefer that?

From an observer POV: based on the git log include/asm-generic/
arch/x86/include/asm/, a split up seems quite common.

By the way, to make the description and discussion closer, you might
want to structure your mail like this:

    [patch description]
    ---
    [discussion]
    ---
    [actual patch]

When applying the patch, the text after the first "---" is automatically
dropped.

Thanks!

Kind regards,
Peter

[toc] | [prev] | [next] | [standalone]


#1526909 — Re: [PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm

FromOliver Hartkopp <socketcan@hartkopp.net>
Date2016-11-21 18:00 +0100
SubjectRe: [PATCH reworded] x86/kbuild: enable modversions for symbols exported from asm
Message-ID<sG06K-3IM-11@gated-at.bofh.it>
In reply to#1526736

On 11/21/2016 03:52 PM, Adam Borowski wrote:
> Commit 4efca4ed ("kbuild: modversions for EXPORT_SYMBOL() for asm") adds
> modversion support for symbols exported from asm files. Architectures
> must include C-style declarations for those symbols in asm/asm-prototypes.h
> in order for them to be versioned.
>
> Add these declarations for x86, and an architecture-independent file that
> can be used for common symbols.
>
> User impact: kernels may fail to load modules at all when
> CONFIG_MODVERSIONS=y.

late but great :-)

Thanks for fixing this!

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>

(if you like)

Regards,
Oliver

>
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> Tested-by: Kalle Valo <kvalo@codeaurora.org>
> Acked-by: Nicholas Piggin <npiggin@gmail.com>
> Tested-by: Peter Wu <oeter@lekensteyn.nl>
> ---
>  arch/x86/include/asm/asm-prototypes.h | 12 ++++++++++++
>  include/asm-generic/asm-prototypes.h  |  7 +++++++
>  2 files changed, 19 insertions(+)
>  create mode 100644 arch/x86/include/asm/asm-prototypes.h
>  create mode 100644 include/asm-generic/asm-prototypes.h
>
> diff --git a/arch/x86/include/asm/asm-prototypes.h b/arch/x86/include/asm/asm-prototypes.h
> new file mode 100644
> index 0000000..ae87224
> --- /dev/null
> +++ b/arch/x86/include/asm/asm-prototypes.h
> @@ -0,0 +1,12 @@
> +#include <asm/ftrace.h>
> +#include <asm/uaccess.h>
> +#include <asm/string.h>
> +#include <asm/page.h>
> +#include <asm/checksum.h>
> +
> +#include <asm-generic/asm-prototypes.h>
> +
> +#include <asm/page.h>
> +#include <asm/pgtable.h>
> +#include <asm/special_insns.h>
> +#include <asm/preempt.h>
> diff --git a/include/asm-generic/asm-prototypes.h b/include/asm-generic/asm-prototypes.h
> new file mode 100644
> index 0000000..df13637
> --- /dev/null
> +++ b/include/asm-generic/asm-prototypes.h
> @@ -0,0 +1,7 @@
> +#include <linux/bitops.h>
> +extern void *__memset(void *, int, __kernel_size_t);
> +extern void *__memcpy(void *, const void *, __kernel_size_t);
> +extern void *__memmove(void *, const void *, __kernel_size_t);
> +extern void *memset(void *, int, __kernel_size_t);
> +extern void *memcpy(void *, const void *, __kernel_size_t);
> +extern void *memmove(void *, const void *, __kernel_size_t);
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web