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 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 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 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 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-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 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 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 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 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
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 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: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 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 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 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-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-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 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 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-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-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 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 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 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 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 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 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-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 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 Ben Hutchings
On Fri, 2016-12-02 at 12:22 +0100, Adam Borowski wrote: > On Fri, Dec 02, 2016 at 02:07:46AM +, Ben Hutchings wrote: > > Thanks for this; I've applied it to the master branch for Debian.  > > Cool! > > Alas, it is enough only for x86. I know... > The merge that caused these issues was

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 Adam Borowski
On Fri, Dec 02, 2016 at 02:07:46AM +, Ben Hutchings wrote: > Thanks for this; I've applied it to the master branch for Debian. Cool! Alas, it is enough only for x86. The merge that caused these issues was 84d6984 (pulling in 22823ab4^..590abbdd), you can see it does the same to a number of

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

2016-12-01 Thread Ben Hutchings
Thanks for this; I've applied it to the master branch for Debian. After comparing all the symbols potentially exported from assembly with those declared in asm-prototypes.h, I found that cmpxchg8b_emu is missing. This is only defined when building for 486 so it doesn't affect Debian, but you may

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 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 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 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 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 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 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 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 Arnd Bergmann
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 that we

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

2016-12-01 Thread Nicholas Piggin
On Thu, 1 Dec 2016 12:33:02 +0100 Stanislav Kozina wrote: > On 12/01/2016 12:09 PM, Nicholas Piggin wrote: > > On Thu, 1 Dec 2016 11:48:09 +0100 > > Stanislav Kozina wrote: > > > >> On 12/01/2016 05:13 AM, Don Zickus wrote: > >> > >> ... > >> > >>> I

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

2016-12-01 Thread Stanislav Kozina
On 12/01/2016 12:09 PM, Nicholas Piggin wrote: 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

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

2016-12-01 Thread Nicholas Piggin
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 here: >

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

2016-12-01 Thread Stanislav Kozina
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 here: https://github.com/skozina/kabi-dw It's quite comparable to libabigail in the way it works, the main differences are:

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

2016-11-30 Thread Nicholas Piggin
On Wed, 30 Nov 2016 23:13:25 -0500 Don Zickus wrote: > On Wed, Nov 30, 2016 at 10:40:02AM -0800, Linus Torvalds wrote: > > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin > > wrote: > > > > > > Here's an initial rough hack at removing modversions. It

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

2016-11-30 Thread Don Zickus
On Wed, Nov 30, 2016 at 10:40:02AM -0800, Linus Torvalds wrote: > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin wrote: > > > > Here's an initial rough hack at removing modversions. It gives an idea > > of the complexity we're carrying for this feature (keeping in mind most

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

2016-11-30 Thread Nicholas Piggin
On Thu, 01 Dec 2016 02:35:54 + Ben Hutchings wrote: > On Thu, 2016-12-01 at 12:55 +1100, Nicholas Piggin wrote: > > On Wed, 30 Nov 2016 21:33:01 + > > > Ben Hutchings wrote: > > > > > On Wed, 2016-11-30 at 10:40 -0800, Linus Torvalds

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

2016-11-30 Thread Ben Hutchings
On Thu, 2016-12-01 at 12:55 +1100, Nicholas Piggin wrote: > On Wed, 30 Nov 2016 21:33:01 + > > Ben Hutchings wrote: > > > On Wed, 2016-11-30 at 10:40 -0800, Linus Torvalds wrote: > > > > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin > > > >

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

2016-11-30 Thread Nicholas Piggin
On Wed, 30 Nov 2016 21:33:01 + Ben Hutchings wrote: > On Wed, 2016-11-30 at 10:40 -0800, Linus Torvalds wrote: > > > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin > > > wrote: > > > > > > Here's an initial rough hack at removing modversions. It

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

2016-11-30 Thread Ben Hutchings
On Wed, 2016-11-30 at 10:40 -0800, Linus Torvalds wrote: > > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin wrote: > > > > Here's an initial rough hack at removing modversions. It gives an idea > > of the complexity we're carrying for this feature (keeping in mind most > >

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

2016-11-30 Thread Linus Torvalds
On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin wrote: > > Here's an initial rough hack at removing modversions. It gives an idea > of the complexity we're carrying for this feature (keeping in mind most > of the lines removed are generated parser). You definitely don't have

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

2016-11-30 Thread Nicholas Piggin
On Tue, 29 Nov 2016 12:35:57 -0800 Linus Torvalds wrote: > On Tue, Nov 29, 2016 at 11:57 AM, Ben Hutchings wrote: > > > > If the modversion is missing then the fallback should be to a full > > vermagic match, i.e. including the release

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

2016-11-29 Thread Michal Marek
Dne 29.11.2016 v 18:10 Linus Torvalds napsal(a): > How about this stupid patch? It weakens modversions, but that may be > ok for Debian, and a better alternative than just saying "we don't > support it at all". [...] > - pr_warn("%s: no symbol version for %s\n", mod->name, symname); > -

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

2016-11-29 Thread Linus Torvalds
On Tue, Nov 29, 2016 at 11:57 AM, Ben Hutchings wrote: > > If the modversion is missing then the fallback should be to a full > vermagic match, i.e. including the release string. Something like > this (untested): This really seems way too complicated for this situation.

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

2016-11-29 Thread Ben Hutchings
On Tue, 2016-11-29 at 08:17 -0800, Linus Torvalds wrote: > > On Tue, Nov 29, 2016 at 8:03 AM, Michal Marek wrote: > > > > The original and easily observable bug is that were are not generating > > symbol checksums for the asm-exported symbols, so they default to 0. > > This can

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

2016-11-29 Thread Linus Torvalds
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 that we shouldn't even care > about. And yes, I'm on binutils 2.26 (with no issues), so it

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

2016-11-29 Thread Linus Torvalds
On Tue, Nov 29, 2016 at 9:05 AM, Adam Borowski wrote: > > Thus, if it's indeed binutils, you'll see the breakage as soon as Fedora > recovers from the freeze. 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-11-29 Thread Adam Borowski
On Tue, Nov 29, 2016 at 07:27:12AM -0800, Linus Torvalds wrote: > On Nov 29, 2016 5:51 AM, "Adam Borowski" wrote: > > > > > > (a) tested > > > > By many people. > > No. > > I've tested the build *without* this, and it works fine. Michal mentioned "why", let's try "where".

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

2016-11-29 Thread Linus Torvalds
On Tue, Nov 29, 2016 at 8:03 AM, Michal Marek wrote: > > The original and easily observable bug is that were are not generating > symbol checksums for the asm-exported symbols, so they default to 0. > This can be seen e.g. in the Module.symvers file. This seemed like a > minor

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

2016-11-29 Thread Michal Marek
Dne 29.11.2016 v 16:27 Linus Torvalds napsal(a): > On Nov 29, 2016 5:51 AM, "Adam Borowski" > wrote: >> > >> > >> > (a) tested >> >> By many people. > > No. > > I've tested the build *without* this, and it works fine. > >> > (b) explains it

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

2016-11-29 Thread Linus Torvalds
On Nov 29, 2016 5:51 AM, "Adam Borowski" wrote: > > > > > (a) tested > > By many people. No. I've tested the build *without* this, and it works fine. > > (b) explains it > > The actual logic is in 4efca4ed0. It wants C prototypes defined in > asm/asm-prototypes.h that

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

2016-11-29 Thread Adam Borowski
On Tue, Nov 29, 2016 at 02:29:54PM +0100, Ingo Molnar wrote: > * Adam Borowski wrote: > > > Here's some history: > > The day of -rc1, multiple people immediately reported the breakage; it was > > quickly found out that reverting 784d5699eddc fixes it. A "going forward" > >

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

2016-11-29 Thread Ingo Molnar
* Adam Borowski wrote: > Here's some history: > The day of -rc1, multiple people immediately reported the breakage; it was > quickly found out that reverting 784d5699eddc fixes it. A "going forward" > patch has been posted but was insufficient; when the real devs went to

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

2016-11-29 Thread Adam Borowski
On Mon, Nov 28, 2016 at 08:08:57PM -0800, Linus Torvalds wrote: > On Mon, Nov 28, 2016 at 5:15 PM, Ben Hutchings wrote: > >> > >> The modversions stuff may just be too painful to bother with. Very few > >> people probably use it, and the ones that do likely don't have any >

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

2016-11-29 Thread Michal Marek
Dne 29.11.2016 v 03:31 Nicholas Piggin napsal(a): > On Tue, 29 Nov 2016 01:15:48 + > Ben Hutchings wrote: > >> [I've had to guess at the cc list for this, because we no longer have >> mail archives that preserve them.] > > You got it about right. > >> On Fri,

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

2016-11-28 Thread Linus Torvalds
On Mon, Nov 28, 2016 at 5:15 PM, Ben Hutchings wrote: >> >> The modversions stuff may just be too painful to bother with. Very few >> people probably use it, and the ones that do likely don't have any >> overriding reason why. > [...] > > Debian has some strong reasons:

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

2016-11-28 Thread Nicholas Piggin
On Tue, 29 Nov 2016 01:15:48 + Ben Hutchings wrote: > [I've had to guess at the cc list for this, because we no longer have > mail archives that preserve them.] You got it about right. > On Fri, 2016-11-25 at 10:01 -0800, Linus Torvalds wrote: > > On Thu, Nov 24, 2016

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

2016-11-28 Thread Ben Hutchings
[I've had to guess at the cc list for this, because we no longer have mail archives that preserve them.] On Fri, 2016-11-25 at 10:01 -0800, Linus Torvalds wrote: > On Thu, Nov 24, 2016 at 4:40 PM, Nicholas Piggin wrote: > > > > > > Yes, manual "marking" is never going to be a