Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Hannes Frederic Sowa
On 15.12.2016 15:15, Nicholas Piggin wrote: > On Thu, 15 Dec 2016 14:15:31 +0100 > Hannes Frederic Sowa wrote: > >> On 15.12.2016 13:03, Nicholas Piggin wrote: >>> On Thu, 15 Dec 2016 12:19:02 +0100 >>> Hannes Frederic Sowa wrote: >>> On 15.12.2016

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Hannes Frederic Sowa
On 15.12.2016 15:15, Nicholas Piggin wrote: > On Thu, 15 Dec 2016 14:15:31 +0100 > Hannes Frederic Sowa wrote: > >> On 15.12.2016 13:03, Nicholas Piggin wrote: >>> On Thu, 15 Dec 2016 12:19:02 +0100 >>> Hannes Frederic Sowa wrote: >>> On 15.12.2016 03:06, Nicholas Piggin wrote: >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Nicholas Piggin
On Thu, 15 Dec 2016 14:15:31 +0100 Hannes Frederic Sowa wrote: > On 15.12.2016 13:03, Nicholas Piggin wrote: > > On Thu, 15 Dec 2016 12:19:02 +0100 > > Hannes Frederic Sowa wrote: > > > >> On 15.12.2016 03:06, Nicholas Piggin wrote: > >>> On Wed, 14

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Nicholas Piggin
On Thu, 15 Dec 2016 14:15:31 +0100 Hannes Frederic Sowa wrote: > On 15.12.2016 13:03, Nicholas Piggin wrote: > > On Thu, 15 Dec 2016 12:19:02 +0100 > > Hannes Frederic Sowa wrote: > > > >> On 15.12.2016 03:06, Nicholas Piggin wrote: > >>> On Wed, 14 Dec 2016 15:04:36 +0100 > >>> Hannes

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Stanislav Kozina
Yeah it's great work, so is Stanislav's checker. I wouldn't mind having a kernel-centric checker tool merged in the kernel if it is small, maintained, and does a sufficient job for distros. I'd be very happy to see the resulting tool in the kernel tree, as it needs to be kept in sync with

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Stanislav Kozina
Yeah it's great work, so is Stanislav's checker. I wouldn't mind having a kernel-centric checker tool merged in the kernel if it is small, maintained, and does a sufficient job for distros. I'd be very happy to see the resulting tool in the kernel tree, as it needs to be kept in sync with

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Hannes Frederic Sowa
On 15.12.2016 13:03, Nicholas Piggin wrote: > On Thu, 15 Dec 2016 12:19:02 +0100 > Hannes Frederic Sowa wrote: > >> On 15.12.2016 03:06, Nicholas Piggin wrote: >>> On Wed, 14 Dec 2016 15:04:36 +0100 >>> Hannes Frederic Sowa wrote: >>> On 09.12.2016

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Hannes Frederic Sowa
On 15.12.2016 13:03, Nicholas Piggin wrote: > On Thu, 15 Dec 2016 12:19:02 +0100 > Hannes Frederic Sowa wrote: > >> On 15.12.2016 03:06, Nicholas Piggin wrote: >>> On Wed, 14 Dec 2016 15:04:36 +0100 >>> Hannes Frederic Sowa wrote: >>> On 09.12.2016 17:03, Greg Kroah-Hartman wrote:

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Nicholas Piggin
On Thu, 15 Dec 2016 12:19:02 +0100 Hannes Frederic Sowa wrote: > On 15.12.2016 03:06, Nicholas Piggin wrote: > > On Wed, 14 Dec 2016 15:04:36 +0100 > > Hannes Frederic Sowa wrote: > > > >> On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > >>> On Sat,

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Nicholas Piggin
On Thu, 15 Dec 2016 12:19:02 +0100 Hannes Frederic Sowa wrote: > On 15.12.2016 03:06, Nicholas Piggin wrote: > > On Wed, 14 Dec 2016 15:04:36 +0100 > > Hannes Frederic Sowa wrote: > > > >> On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > >>> On Sat, Dec 10, 2016 at 01:56:53AM +1000,

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Hannes Frederic Sowa
On 15.12.2016 03:06, Nicholas Piggin wrote: > On Wed, 14 Dec 2016 15:04:36 +0100 > Hannes Frederic Sowa wrote: > >> On 09.12.2016 17:03, Greg Kroah-Hartman wrote: >>> On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: On Fri, 9 Dec 2016 15:36:04 +0100

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Hannes Frederic Sowa
On 15.12.2016 03:06, Nicholas Piggin wrote: > On Wed, 14 Dec 2016 15:04:36 +0100 > Hannes Frederic Sowa wrote: > >> On 09.12.2016 17:03, Greg Kroah-Hartman wrote: >>> On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: On Fri, 9 Dec 2016 15:36:04 +0100 Stanislav Kozina

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Nicholas Piggin
On Wed, 14 Dec 2016 15:04:36 +0100 Hannes Frederic Sowa wrote: > On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > > On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: > >> On Fri, 9 Dec 2016 15:36:04 +0100 > >> Stanislav Kozina wrote: > >>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Nicholas Piggin
On Wed, 14 Dec 2016 15:04:36 +0100 Hannes Frederic Sowa wrote: > On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > > On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: > >> On Fri, 9 Dec 2016 15:36:04 +0100 > >> Stanislav Kozina wrote: > >> > >>> The question is how to

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Don Zickus
On Sat, Dec 10, 2016 at 01:41:03PM +0100, Greg Kroah-Hartman wrote: > On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > > Hello, > > > > Nicholas Piggin a �crit: > > > > [...] > > > > > That said, a dwarf based checker tool should be able to do as good a job

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Don Zickus
On Sat, Dec 10, 2016 at 01:41:03PM +0100, Greg Kroah-Hartman wrote: > On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > > Hello, > > > > Nicholas Piggin a �crit: > > > > [...] > > > > > That said, a dwarf based checker tool should be able to do as good a job > > > (maybe a bit

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Hannes Frederic Sowa
On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: >> On Fri, 9 Dec 2016 15:36:04 +0100 >> Stanislav Kozina wrote: >> >>> The question is how to provide a similar guarantee if a different way? >> As a

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Hannes Frederic Sowa
On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: >> On Fri, 9 Dec 2016 15:36:04 +0100 >> Stanislav Kozina wrote: >> >>> The question is how to provide a similar guarantee if a different way? >> As a tool to aid distro

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 10:15, Michal Marek wrote: > A minimal example would be > > t1.c: > struct s1; > struct s2 { > int i; > } > struct s3 { > struct s1 *ptr1; > struct s2 *ptr2; > } > void foo(struct s3*); > EXPORT_SYMBOL(foo); > > t2.c: > struct s1 { > int j; > } > struct s2;

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 10:15, Michal Marek wrote: > A minimal example would be > > t1.c: > struct s1; > struct s2 { > int i; > } > struct s3 { > struct s1 *ptr1; > struct s2 *ptr2; > } > void foo(struct s3*); > EXPORT_SYMBOL(foo); > > t2.c: > struct s1 { > int j; > } > struct s2;

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 11:02, Dodji Seketeli wrote: > Michal Marek a écrit: > >>> Libabigail does a "whole binary" analysis of types. >>> >>> So, consider the point of use of the type 'struct s1*'. Even if 'struct >>> s' is just forward-declared at that point, the declaration of struct

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 11:02, Dodji Seketeli wrote: > Michal Marek a écrit: > >>> Libabigail does a "whole binary" analysis of types. >>> >>> So, consider the point of use of the type 'struct s1*'. Even if 'struct >>> s' is just forward-declared at that point, the declaration of struct s1 >>> is

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Michal Marek a écrit: >> Libabigail does a "whole binary" analysis of types. >> >> So, consider the point of use of the type 'struct s1*'. Even if 'struct >> s' is just forward-declared at that point, the declaration of struct s1 >> is "resolved" to its definition. Even if

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Michal Marek a écrit: >> Libabigail does a "whole binary" analysis of types. >> >> So, consider the point of use of the type 'struct s1*'. Even if 'struct >> s' is just forward-declared at that point, the declaration of struct s1 >> is "resolved" to its definition. Even if the definition

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Dodji Seketeli a écrit: Grr, I did paste the wrong content of t1.c and t2.c in my last message sorry. Here are the correct ones: $ cat t1.c struct s1; struct s2 { int i; }; struct s3 { struct s1 *ptr1; struct s2 *ptr2; }; void foo(struct s3* s

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Dodji Seketeli a écrit: Grr, I did paste the wrong content of t1.c and t2.c in my last message sorry. Here are the correct ones: $ cat t1.c struct s1; struct s2 { int i; }; struct s3 { struct s1 *ptr1; struct s2 *ptr2; }; void foo(struct s3* s __attribute__((unused)))

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 10:36, Dodji Seketeli wrote: > Michal Marek a écrit: > > [...] > >> A minimal example would be >> >> t1.c: >> struct s1; >> struct s2 { >> int i; >> } >> struct s3 { >> struct s1 *ptr1; >> struct s2 *ptr2; >> } >> void foo(struct s3*); >>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 10:36, Dodji Seketeli wrote: > Michal Marek a écrit: > > [...] > >> A minimal example would be >> >> t1.c: >> struct s1; >> struct s2 { >> int i; >> } >> struct s3 { >> struct s1 *ptr1; >> struct s2 *ptr2; >> } >> void foo(struct s3*); >> EXPORT_SYMBOL(foo); >> >>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Michal Marek a écrit: [...] > A minimal example would be > > t1.c: > struct s1; > struct s2 { > int i; > } > struct s3 { > struct s1 *ptr1; > struct s2 *ptr2; > } > void foo(struct s3*); > EXPORT_SYMBOL(foo); > > t2.c: > struct s1 { > int j; > } > struct

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Michal Marek a écrit: [...] > A minimal example would be > > t1.c: > struct s1; > struct s2 { > int i; > } > struct s3 { > struct s1 *ptr1; > struct s2 *ptr2; > } > void foo(struct s3*); > EXPORT_SYMBOL(foo); > > t2.c: > struct s1 { > int j; > } > struct s2; > struct s3

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 09:58, Dodji Seketeli wrote: > Michal Marek a écrit: > > [...] > >> Does the abidiff tool handle the case when an exported symbol is moved >> between .c files? This is always a mess with genksyms, because the two >> .c files have different includes and thus the

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Michal Marek
On 2016-12-14 09:58, Dodji Seketeli wrote: > Michal Marek a écrit: > > [...] > >> Does the abidiff tool handle the case when an exported symbol is moved >> between .c files? This is always a mess with genksyms, because the two >> .c files have different includes and thus the type expansion

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Michal Marek a écrit: [...] > Does the abidiff tool handle the case when an exported symbol is moved > between .c files? This is always a mess with genksyms, because the two > .c files have different includes and thus the type expansion stops at > different points. So typically

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-14 Thread Dodji Seketeli
Michal Marek a écrit: [...] > Does the abidiff tool handle the case when an exported symbol is moved > between .c files? This is always a mess with genksyms, because the two > .c files have different includes and thus the type expansion stops at > different points. So typically the move needs

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-13 Thread Michal Marek
Dne 9.12.2016 v 23:46 Dodji Seketeli napsal(a): > Hello, > > Nicholas Piggin a écrit: > > [...] > >> That said, a dwarf based checker tool should be able to do as good a job >> (maybe a bit better because report is very informative and it may pick up >> compiler alignments

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-13 Thread Michal Marek
Dne 9.12.2016 v 23:46 Dodji Seketeli napsal(a): > Hello, > > Nicholas Piggin a écrit: > > [...] > >> That said, a dwarf based checker tool should be able to do as good a job >> (maybe a bit better because report is very informative and it may pick up >> compiler alignments or padding options).

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Nicholas Piggin
On Mon, 12 Dec 2016 10:48:47 +0100 Stanislav Kozina wrote: > A runtime check is still done, with per-module vermagic which distros > can change when they bump the ABI version. Is it really necessary to > have more than that (i.e., per-symbol versioning)? >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Nicholas Piggin
On Mon, 12 Dec 2016 10:48:47 +0100 Stanislav Kozina wrote: > A runtime check is still done, with per-module vermagic which distros > can change when they bump the ABI version. Is it really necessary to > have more than that (i.e., per-symbol versioning)? > >>> From my point of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Stanislav Kozina
Hello, That said, a dwarf based checker tool should be able to do as good a job (maybe a bit better because report is very informative and it may pick up compiler alignments or padding options). So, Nicholas was kind enough to send me the two Linux Kernel binaries that he built with the tiny

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Stanislav Kozina
Hello, That said, a dwarf based checker tool should be able to do as good a job (maybe a bit better because report is very informative and it may pick up compiler alignments or padding options). So, Nicholas was kind enough to send me the two Linux Kernel binaries that he built with the tiny

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Stanislav Kozina
A runtime check is still done, with per-module vermagic which distros can change when they bump the ABI version. Is it really necessary to have more than that (i.e., per-symbol versioning)? From my point of view, it is. We need to allow changing ABI for some modules while maintaining it for

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Stanislav Kozina
A runtime check is still done, with per-module vermagic which distros can change when they bump the ABI version. Is it really necessary to have more than that (i.e., per-symbol versioning)? From my point of view, it is. We need to allow changing ABI for some modules while maintaining it for

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Ian Campbell
On Sat, 2016-12-10 at 13:41 +0100, Greg Kroah-Hartman wrote: > Now I don't work on a distro anymore, but I would think that something > like this would be really useful, pointing out exactly what changed is > very important for distro maintainers to determine what they want to do The .symvers

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-12 Thread Ian Campbell
On Sat, 2016-12-10 at 13:41 +0100, Greg Kroah-Hartman wrote: > Now I don't work on a distro anymore, but I would think that something > like this would be really useful, pointing out exactly what changed is > very important for distro maintainers to determine what they want to do The .symvers

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-11 Thread Nicholas Piggin
On Sat, 10 Dec 2016 13:41:03 +0100 Greg Kroah-Hartman wrote: > On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > > Hello, > > > > Nicholas Piggin a écrit: > > > > [...] > > > > > That said, a dwarf based checker tool should be

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-11 Thread Nicholas Piggin
On Sat, 10 Dec 2016 13:41:03 +0100 Greg Kroah-Hartman wrote: > On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > > Hello, > > > > Nicholas Piggin a écrit: > > > > [...] > > > > > That said, a dwarf based checker tool should be able to do as good a job > > > (maybe a bit

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-10 Thread Greg Kroah-Hartman
On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > Hello, > > Nicholas Piggin a écrit: > > [...] > > > That said, a dwarf based checker tool should be able to do as good a job > > (maybe a bit better because report is very informative and it may pick up > >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-10 Thread Greg Kroah-Hartman
On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > Hello, > > Nicholas Piggin a écrit: > > [...] > > > That said, a dwarf based checker tool should be able to do as good a job > > (maybe a bit better because report is very informative and it may pick up > > compiler alignments

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Dodji Seketeli
Hello, Nicholas Piggin a écrit: [...] > That said, a dwarf based checker tool should be able to do as good a job > (maybe a bit better because report is very informative and it may pick up > compiler alignments or padding options). So, Nicholas was kind enough to send me

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Dodji Seketeli
Hello, Nicholas Piggin a écrit: [...] > That said, a dwarf based checker tool should be able to do as good a job > (maybe a bit better because report is very informative and it may pick up > compiler alignments or padding options). So, Nicholas was kind enough to send me the two Linux Kernel

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Don Zickus
On Fri, Dec 09, 2016 at 01:50:41PM +1000, Nicholas Piggin wrote: > > > > We have plenty of customers with 10 year old drivers, where the expertise > > has long left the company. The engineers still around, recompile and make > > tweaks to get things working on the latest RHEL. Verify it passes

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Don Zickus
On Fri, Dec 09, 2016 at 01:50:41PM +1000, Nicholas Piggin wrote: > > > > We have plenty of customers with 10 year old drivers, where the expertise > > has long left the company. The engineers still around, recompile and make > > tweaks to get things working on the latest RHEL. Verify it passes

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 09 Dec 2016 15:21:33 + Ian Campbell wrote: > On Fri, 2016-12-09 at 13:33 +1000, Nicholas Piggin wrote: > >  > > Well I simply tested the outcome. If you have: > > > > struct blah { > >   int x; > > }; > > int foo(struct blah *blah) > > { > >   return blah->x; >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 09 Dec 2016 15:21:33 + Ian Campbell wrote: > On Fri, 2016-12-09 at 13:33 +1000, Nicholas Piggin wrote: > >  > > Well I simply tested the outcome. If you have: > > > > struct blah { > >   int x; > > }; > > int foo(struct blah *blah) > > { > >   return blah->x; > > } > > EXPORT(foo);

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Greg Kroah-Hartman
On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: > On Fri, 9 Dec 2016 15:36:04 +0100 > Stanislav Kozina wrote: > > > The question is how to provide a similar guarantee if a different way? > > > > >>> As a tool to aid distro reviewers, modversions

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Greg Kroah-Hartman
On Sat, Dec 10, 2016 at 01:56:53AM +1000, Nicholas Piggin wrote: > On Fri, 9 Dec 2016 15:36:04 +0100 > Stanislav Kozina wrote: > > > The question is how to provide a similar guarantee if a different way? > > > > >>> As a tool to aid distro reviewers, modversions has some value, but

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 9 Dec 2016 15:36:04 +0100 Stanislav Kozina wrote: > The question is how to provide a similar guarantee if a different way? > >>> As a tool to aid distro reviewers, modversions has some value, but the > >>> debug info parsing tools that have been mentioned in

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 9 Dec 2016 15:36:04 +0100 Stanislav Kozina wrote: > The question is how to provide a similar guarantee if a different way? > >>> As a tool to aid distro reviewers, modversions has some value, but the > >>> debug info parsing tools that have been mentioned in this thread seem > >>>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Ian Campbell
On Fri, 2016-12-09 at 13:33 +1000, Nicholas Piggin wrote: >  > Well I simply tested the outcome. If you have: > > struct blah { >   int x; > }; > int foo(struct blah *blah) > { >   return blah->x; > } > EXPORT(foo); > > $ nm vmlinux | grep __crc_foo > a0cf13a0 A __crc_foo > > Now change

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Ian Campbell
On Fri, 2016-12-09 at 13:33 +1000, Nicholas Piggin wrote: >  > Well I simply tested the outcome. If you have: > > struct blah { >   int x; > }; > int foo(struct blah *blah) > { >   return blah->x; > } > EXPORT(foo); > > $ nm vmlinux | grep __crc_foo > a0cf13a0 A __crc_foo > > Now change

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Stanislav Kozina
The question is how to provide a similar guarantee if a different way? As a tool to aid distro reviewers, modversions has some value, but the debug info parsing tools that have been mentioned in this thread seem superior (not that I've tested them). On the other hand the big advantage of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Stanislav Kozina
The question is how to provide a similar guarantee if a different way? As a tool to aid distro reviewers, modversions has some value, but the debug info parsing tools that have been mentioned in this thread seem superior (not that I've tested them). On the other hand the big advantage of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 9 Dec 2016 08:55:51 +0100 Stanislav Kozina wrote: > >> The question is how to provide a similar guarantee if a different way? > > As a tool to aid distro reviewers, modversions has some value, but the > > debug info parsing tools that have been mentioned in this

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 9 Dec 2016 08:55:51 +0100 Stanislav Kozina wrote: > >> The question is how to provide a similar guarantee if a different way? > > As a tool to aid distro reviewers, modversions has some value, but the > > debug info parsing tools that have been mentioned in this thread seem > >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Stanislav Kozina
The question is how to provide a similar guarantee if a different way? As a tool to aid distro reviewers, modversions has some value, but the debug info parsing tools that have been mentioned in this thread seem superior (not that I've tested them). On the other hand the big advantage of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Stanislav Kozina
The question is how to provide a similar guarantee if a different way? As a tool to aid distro reviewers, modversions has some value, but the debug info parsing tools that have been mentioned in this thread seem superior (not that I've tested them). On the other hand the big advantage of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Nicholas Piggin
On Thu, 1 Dec 2016 10:20:39 -0500 Don Zickus wrote: > On Thu, Dec 01, 2016 at 03:32:15PM +1100, Nicholas Piggin wrote: > > > Anyway, MODVERSIONS is our way of protecting our kabi for the last 10 > > > years. > > > It isn't perfect and we have fixed the genksyms tool over the

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Nicholas Piggin
On Thu, 1 Dec 2016 10:20:39 -0500 Don Zickus wrote: > On Thu, Dec 01, 2016 at 03:32:15PM +1100, Nicholas Piggin wrote: > > > Anyway, MODVERSIONS is our way of protecting our kabi for the last 10 > > > years. > > > It isn't perfect and we have fixed the genksyms tool over the years, but > > >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Nicholas Piggin
On Thu, 1 Dec 2016 17:12:41 +0100 Michal Marek wrote: > On 2016-12-01 04:39, Nicholas Piggin wrote: > > On Thu, 01 Dec 2016 02:35:54 + > > Ben Hutchings wrote: > >> As I understand it, genksyms incorporates the definitions of a > >> function's

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Nicholas Piggin
On Thu, 1 Dec 2016 17:12:41 +0100 Michal Marek wrote: > On 2016-12-01 04:39, Nicholas Piggin wrote: > > On Thu, 01 Dec 2016 02:35:54 + > > Ben Hutchings wrote: > >> As I understand it, genksyms incorporates the definitions of a > >> function's parameter and return types - not just their

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-04 Thread Linus Torvalds
On Sat, Dec 3, 2016 at 11:44 PM, Alan Modra wrote: > > As far as reverting the binutils commit goes, I'm quite willing to do > that if necessary I think we have the proper fix in the kernel now, witht he "mark weak asm symbols with value 0". Or if not "proper", then at least

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-04 Thread Linus Torvalds
On Sat, Dec 3, 2016 at 11:44 PM, Alan Modra wrote: > > As far as reverting the binutils commit goes, I'm quite willing to do > that if necessary I think we have the proper fix in the kernel now, witht he "mark weak asm symbols with value 0". Or if not "proper", then at least acceptable. So I

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-03 Thread Alan Modra
On Fri, Dec 02, 2016 at 11:55:58AM +0100, Arnd Bergmann wrote: > I have managed to bisect the link failure to a specific binutils > commit by Alan Modra now: > > d983c8c ("Strip undefined symbols from .symtab") > > went into binutils-2_26 and was reverted in > > a82e3ef ("Revert "Strip

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-03 Thread Alan Modra
On Fri, Dec 02, 2016 at 11:55:58AM +0100, Arnd Bergmann wrote: > I have managed to bisect the link failure to a specific binutils > commit by Alan Modra now: > > d983c8c ("Strip undefined symbols from .symtab") > > went into binutils-2_26 and was reverted in > > a82e3ef ("Revert "Strip

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-02 Thread Linus Torvalds
On Fri, Dec 2, 2016 at 2:55 AM, Arnd Bergmann wrote: > > Yes, it's always been just the assembly symbols that broke, these were > the ones that Al's original patch changed and that ended up with > no version information. Ok, and the reason is because even if we have a weak symbol

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-02 Thread Linus Torvalds
On Fri, Dec 2, 2016 at 2:55 AM, Arnd Bergmann wrote: > > Yes, it's always been just the assembly symbols that broke, these were > the ones that Al's original patch changed and that ended up with > no version information. Ok, and the reason is because even if we have a weak symbol from C, it

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-02 Thread Hannes Frederic Sowa
On 01.12.2016 17:12, Michal Marek wrote: > On 2016-12-01 04:39, Nicholas Piggin wrote: >> On Thu, 01 Dec 2016 02:35:54 + >> Ben Hutchings wrote: >>> As I understand it, genksyms incorporates the definitions of a >>> function's parameter and return types - not just their

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-02 Thread Hannes Frederic Sowa
On 01.12.2016 17:12, Michal Marek wrote: > On 2016-12-01 04:39, Nicholas Piggin wrote: >> On Thu, 01 Dec 2016 02:35:54 + >> Ben Hutchings wrote: >>> As I understand it, genksyms incorporates the definitions of a >>> function's parameter and return types - not just their names - and all >>>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-02 Thread Arnd Bergmann
On Thursday, December 1, 2016 10:26:07 AM CET Linus Torvalds wrote: > On Thu, Dec 1, 2016 at 5:58 AM, Arnd Bergmann wrote: > > > > WARNING: EXPORT symbol "mcount" [arch/x86/entry/built-in.ko] version > > generation failed, symbol will not be versioned. > > WARNING: EXPORT symbol

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-02 Thread Arnd Bergmann
On Thursday, December 1, 2016 10:26:07 AM CET Linus Torvalds wrote: > On Thu, Dec 1, 2016 at 5:58 AM, Arnd Bergmann wrote: > > > > WARNING: EXPORT symbol "mcount" [arch/x86/entry/built-in.ko] version > > generation failed, symbol will not be versioned. > > WARNING: EXPORT symbol "mcount"

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Don Zickus
On Thu, Dec 01, 2016 at 05:06:11PM +0100, Greg Kroah-Hartman wrote: > On Thu, Dec 01, 2016 at 10:40:59AM -0500, Don Zickus wrote: > > Unfortunately, there are various drivers that will never go upstream > > > > - paid storage drivers that provide bells and whistles on top of inbox > > driver >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Don Zickus
On Thu, Dec 01, 2016 at 05:06:11PM +0100, Greg Kroah-Hartman wrote: > On Thu, Dec 01, 2016 at 10:40:59AM -0500, Don Zickus wrote: > > Unfortunately, there are various drivers that will never go upstream > > > > - paid storage drivers that provide bells and whistles on top of inbox > > driver >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Linus Torvalds
On Thu, Dec 1, 2016 at 5:58 AM, Arnd Bergmann wrote: > > WARNING: EXPORT symbol "mcount" [arch/x86/entry/built-in.ko] version > generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "mcount" [arch/x86/built-in.ko] version generation > failed, symbol will not

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Linus Torvalds
On Thu, Dec 1, 2016 at 5:58 AM, Arnd Bergmann wrote: > > WARNING: EXPORT symbol "mcount" [arch/x86/entry/built-in.ko] version > generation failed, symbol will not be versioned. > WARNING: EXPORT symbol "mcount" [arch/x86/built-in.ko] version generation > failed, symbol will not be versioned. >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Michal Marek
On 2016-12-01 14:58, Arnd Bergmann wrote: > On Tuesday, November 29, 2016 9:14:46 AM CET Linus Torvalds wrote: >> On Tue, Nov 29, 2016 at 9:10 AM, Linus Torvalds >> wrote: >>> >>> So quite frankly, I don't want to make our kernel sources worse due to >>> broken shit

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Michal Marek
On 2016-12-01 14:58, Arnd Bergmann wrote: > On Tuesday, November 29, 2016 9:14:46 AM CET Linus Torvalds wrote: >> On Tue, Nov 29, 2016 at 9:10 AM, Linus Torvalds >> wrote: >>> >>> So quite frankly, I don't want to make our kernel sources worse due to >>> broken shit tools getting something wrong

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Michal Marek
On 2016-12-01 05:13, Don Zickus wrote: > Sorry for chiming in late, but yes RHEL is a big user of MODVERSIONS for our > kabi protection work. Despite our best intentions we still have lots of > partners and customers that provide value-add out-of-tree drivers to their > customers. These module

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Michal Marek
On 2016-12-01 05:13, Don Zickus wrote: > Sorry for chiming in late, but yes RHEL is a big user of MODVERSIONS for our > kabi protection work. Despite our best intentions we still have lots of > partners and customers that provide value-add out-of-tree drivers to their > customers. These module

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Michal Marek
On 2016-12-01 04:39, Nicholas Piggin wrote: > On Thu, 01 Dec 2016 02:35:54 + > Ben Hutchings wrote: >> As I understand it, genksyms incorporates the definitions of a >> function's parameter and return types - not just their names - and all >> the types they refer to,

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Michal Marek
On 2016-12-01 04:39, Nicholas Piggin wrote: > On Thu, 01 Dec 2016 02:35:54 + > Ben Hutchings wrote: >> As I understand it, genksyms incorporates the definitions of a >> function's parameter and return types - not just their names - and all >> the types they refer to, recursively. So a

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Greg Kroah-Hartman
On Thu, Dec 01, 2016 at 10:40:59AM -0500, Don Zickus wrote: > Unfortunately, there are various drivers that will never go upstream > > - paid storage drivers that provide bells and whistles on top of inbox > driver That's because the developer doesn't want them upstream, that's their fault,

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Greg Kroah-Hartman
On Thu, Dec 01, 2016 at 10:40:59AM -0500, Don Zickus wrote: > Unfortunately, there are various drivers that will never go upstream > > - paid storage drivers that provide bells and whistles on top of inbox > driver That's because the developer doesn't want them upstream, that's their fault,

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Don Zickus
On Thu, Dec 01, 2016 at 07:26:09AM -0800, Christoph Hellwig wrote: > On Thu, Dec 01, 2016 at 10:20:39AM -0500, Don Zickus wrote: > > > > - provide the memory allocation (instead of having the driver staticly > > allocate) > > - provide functions to retrieve various internal data (instead of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Don Zickus
On Thu, Dec 01, 2016 at 07:26:09AM -0800, Christoph Hellwig wrote: > On Thu, Dec 01, 2016 at 10:20:39AM -0500, Don Zickus wrote: > > > > - provide the memory allocation (instead of having the driver staticly > > allocate) > > - provide functions to retrieve various internal data (instead of

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Dodji Seketeli
Nicholas Piggin a écrit: [...] > On Thu, 1 Dec 2016 11:48:09 +0100 > Stanislav Kozina wrote: > >> On 12/01/2016 05:13 AM, Don Zickus wrote: >> >> ... >> >> > I think GregKH pointed to one such tool, libabigail? We are working on >> > others too. >>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Dodji Seketeli
Nicholas Piggin a écrit: [...] > On Thu, 1 Dec 2016 11:48:09 +0100 > Stanislav Kozina wrote: > >> On 12/01/2016 05:13 AM, Don Zickus wrote: >> >> ... >> >> > I think GregKH pointed to one such tool, libabigail? We are working on >> > others too. >> >> I should mention one of the others

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Christoph Hellwig
On Thu, Dec 01, 2016 at 10:20:39AM -0500, Don Zickus wrote: > > - provide the memory allocation (instead of having the driver staticly > allocate) > - provide functions to retrieve various internal data (instead of having the > driver do direct referencing to deep internal elements) > - cut

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Christoph Hellwig
On Thu, Dec 01, 2016 at 10:20:39AM -0500, Don Zickus wrote: > > - provide the memory allocation (instead of having the driver staticly > allocate) > - provide functions to retrieve various internal data (instead of having the > driver do direct referencing to deep internal elements) > - cut

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Don Zickus
On Thu, Dec 01, 2016 at 03:32:15PM +1100, Nicholas Piggin wrote: > > Anyway, MODVERSIONS is our way of protecting our kabi for the last 10 years. > > It isn't perfect and we have fixed the genksyms tool over the years, but so > > far it mostly works fine. > > Okay. It would be good to get all the

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Don Zickus
On Thu, Dec 01, 2016 at 03:32:15PM +1100, Nicholas Piggin wrote: > > Anyway, MODVERSIONS is our way of protecting our kabi for the last 10 years. > > It isn't perfect and we have fixed the genksyms tool over the years, but so > > far it mostly works fine. > > Okay. It would be good to get all the

  1   2   >