RE: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-08 Thread David Laight
> - "External modules must be built with the same GCC version" > > As has been stated repeatedly, by Linus and others, there's no > technical reason behind this claim. It ignores the realities of how > distros release the kernel and compiler independently, with separate > cadences.

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-05 Thread Josh Poimboeuf
On Sat, Mar 06, 2021 at 01:03:32AM +0900, Masahiro Yamada wrote: > > Ok. So it sounds like the best/easiest option is the original patch in > > this thread: when building an external module with a GCC mismatch, just > > disable the GCC plugin, with a warning (or an error for randstruct). > >

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-05 Thread Masahiro Yamada
On Fri, Mar 5, 2021 at 11:41 AM Josh Poimboeuf wrote: > > On Thu, Mar 04, 2021 at 11:12:42AM -0800, Linus Torvalds wrote: > > On Thu, Mar 4, 2021 at 7:36 AM Masahiro Yamada wrote: > > > > > > All the kernel-space objects are rebuilt > > > when the compiler is upgraded. > > > > I very much NAK'ed

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-05 Thread Masahiro Yamada
On Fri, Mar 5, 2021 at 4:13 AM Linus Torvalds wrote: > > On Thu, Mar 4, 2021 at 7:36 AM Masahiro Yamada wrote: > > > > All the kernel-space objects are rebuilt > > when the compiler is upgraded. > > I very much NAK'ed that one. Why did that go in? When the compiler is upgraded, all objects

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Linus Torvalds
On Thu, Mar 4, 2021 at 6:41 PM Josh Poimboeuf wrote: > > This thread is making me dizzy, but I think the patch you NAK'ed from me > was different. It just added an error on GCC mismatch with external > modules: > > >

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Josh Poimboeuf
On Thu, Mar 04, 2021 at 11:12:42AM -0800, Linus Torvalds wrote: > On Thu, Mar 4, 2021 at 7:36 AM Masahiro Yamada wrote: > > > > All the kernel-space objects are rebuilt > > when the compiler is upgraded. > > I very much NAK'ed that one. Why did that go in? > > Or maybe I NAK'ed another version

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Linus Torvalds
On Thu, Mar 4, 2021 at 7:36 AM Masahiro Yamada wrote: > > All the kernel-space objects are rebuilt > when the compiler is upgraded. I very much NAK'ed that one. Why did that go in? Or maybe I NAK'ed another version of it (I think the one I NAK'ed was from Josh), and didn't realize that there

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Masahiro Yamada
On Fri, Mar 5, 2021 at 12:08 AM Josh Poimboeuf wrote: > > On Thu, Mar 04, 2021 at 09:27:28PM +0900, Masahiro Yamada wrote: > > I agree with rebuilding GCC plugins when the compiler is upgraded > > for *in-tree* building. > > Linus had reported it a couple of months before, > > and I just

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Josh Poimboeuf
On Thu, Mar 04, 2021 at 09:27:28PM +0900, Masahiro Yamada wrote: > I agree with rebuilding GCC plugins when the compiler is upgraded > for *in-tree* building. > Linus had reported it a couple of months before, > and I just submitted a very easy fix. Hm? So does that mean that a GCC version

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Masahiro Yamada
On Thu, Mar 4, 2021 at 6:45 AM Josh Poimboeuf wrote: > > On Wed, Mar 03, 2021 at 12:56:52PM -0800, Linus Torvalds wrote: > > On Wed, Mar 3, 2021 at 12:24 PM Josh Poimboeuf wrote: > > > > > > Your nack is for a different reason: GCC plugins are second-class > > > citizens. Fair enough... > > > >

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-04 Thread Masahiro Yamada
On Thu, Mar 4, 2021 at 4:15 AM Josh Poimboeuf wrote: > > On Thu, Mar 04, 2021 at 03:49:35AM +0900, Masahiro Yamada wrote: > > > This problem is becoming more prevalent. We will need to fix it one way > > > or another, if we want to support distro adoption of these GCC > > > plugin-based

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Kees Cook
On Wed, Mar 03, 2021 at 11:57:33AM -0800, Linus Torvalds wrote: > End result: gcc plugins are pure garbage, and you should shun them. If I think that's pretty harsh, but okay, opinions are opinions. As Josh says, people are interested in them for not-uncommon real-world uses: - stackleak has

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Josh Poimboeuf
On Wed, Mar 03, 2021 at 12:56:52PM -0800, Linus Torvalds wrote: > On Wed, Mar 3, 2021 at 12:24 PM Josh Poimboeuf wrote: > > > > Your nack is for a different reason: GCC plugins are second-class > > citizens. Fair enough... > > MNo, I didn't NAK it. Quite the reverser. > > I am ABSOLUTELY

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Josh Poimboeuf
On Wed, Mar 03, 2021 at 11:25:34AM -0800, Linus Torvalds wrote: > On Wed, Mar 3, 2021 at 11:15 AM Josh Poimboeuf wrote: > > > > Adding Linus, who indicated in another thread that we shouldn't force > > exact GCC versions because there's no technical reason to do so. > > I do not believe we

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Linus Torvalds
On Wed, Mar 3, 2021 at 12:24 PM Josh Poimboeuf wrote: > > Your nack is for a different reason: GCC plugins are second-class > citizens. Fair enough... MNo, I didn't NAK it. Quite the reverser. I am ABSOLUTELY against rebuilding normal object files just because gcc versions change. A compiler

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Josh Poimboeuf
On Wed, Mar 03, 2021 at 02:24:12PM -0600, Josh Poimboeuf wrote: > On Wed, Mar 03, 2021 at 11:57:33AM -0800, Linus Torvalds wrote: > > On Wed, Mar 3, 2021 at 11:38 AM Josh Poimboeuf wrote: > > > > > > > But in the meantime, making the plugins depend on the gcc version some > > > > way is certainly

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Josh Poimboeuf
On Wed, Mar 03, 2021 at 11:57:33AM -0800, Linus Torvalds wrote: > On Wed, Mar 3, 2021 at 11:38 AM Josh Poimboeuf wrote: > > > > > But in the meantime, making the plugins depend on the gcc version some > > > way is certainly better than not doing so. > > > > So currently, the plugins already so

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Linus Torvalds
On Wed, Mar 3, 2021 at 11:38 AM Josh Poimboeuf wrote: > > > But in the meantime, making the plugins depend on the gcc version some > > way is certainly better than not doing so. > > So currently, the plugins already so that. They require the GCC version > to be exact. If there's a mismatch,

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Linus Torvalds
On Wed, Mar 3, 2021 at 11:15 AM Josh Poimboeuf wrote: > > Adding Linus, who indicated in another thread that we shouldn't force > exact GCC versions because there's no technical reason to do so. I do not believe we should recompile everything just because the gcc version changes. But gcc

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Josh Poimboeuf
On Thu, Mar 04, 2021 at 03:49:35AM +0900, Masahiro Yamada wrote: > > This problem is becoming more prevalent. We will need to fix it one way > > or another, if we want to support distro adoption of these GCC > > plugin-based features. > > > > Frank suggested a possibly better idea: always rebuild

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Masahiro Yamada
On Wed, Mar 3, 2021 at 8:27 AM Josh Poimboeuf wrote: > > On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > > When building out-of-tree kernel modules, the build system doesn't > > require the GCC version to match the version used to build the original > > kernel. That's probably

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-03-03 Thread Josh Poimboeuf
On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > When building out-of-tree kernel modules, the build system doesn't > require the GCC version to match the version used to build the original > kernel. That's probably [1] fine. > > In fact, for many distros, the version of GCC

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-28 Thread Josh Poimboeuf
On Thu, Jan 28, 2021 at 02:29:52PM +, Christoph Hellwig wrote: > On Wed, Jan 27, 2021 at 12:51:13PM -0600, Josh Poimboeuf wrote: > > Is this a joke? I've never met anybody who builds OOT modules as a > > development aid... > > I'm pretty sure you've met me before. Yes, but I don't recall

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-28 Thread Christoph Hellwig
On Wed, Jan 27, 2021 at 12:51:13PM -0600, Josh Poimboeuf wrote: > Is this a joke? I've never met anybody who builds OOT modules as a > development aid... I'm pretty sure you've met me before. > On the other hand I know of several very popular distros (some paid, > some not) who rely on allowing

RE: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread David Laight
From: Josh Poimboeuf > Sent: 27 January 2021 18:51 > > On Wed, Jan 27, 2021 at 06:43:27PM +, Christoph Hellwig wrote: > > On Wed, Jan 27, 2021 at 12:38:56PM -0600, Josh Poimboeuf wrote: > > > On Wed, Jan 27, 2021 at 06:02:15PM +, Christoph Hellwig wrote: > > > > Please don't add all this

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread Josh Poimboeuf
On Wed, Jan 27, 2021 at 06:43:27PM +, Christoph Hellwig wrote: > On Wed, Jan 27, 2021 at 12:38:56PM -0600, Josh Poimboeuf wrote: > > On Wed, Jan 27, 2021 at 06:02:15PM +, Christoph Hellwig wrote: > > > Please don't add all this garbage. We only add infrastructure to the > > > kernel for

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread Christoph Hellwig
On Wed, Jan 27, 2021 at 12:38:56PM -0600, Josh Poimboeuf wrote: > On Wed, Jan 27, 2021 at 06:02:15PM +, Christoph Hellwig wrote: > > Please don't add all this garbage. We only add infrastructure to the > > kernel for what the kernel itself needs, not for weird out of tree > > infrastructure.

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread Josh Poimboeuf
On Wed, Jan 27, 2021 at 06:02:15PM +, Christoph Hellwig wrote: > Please don't add all this garbage. We only add infrastructure to the > kernel for what the kernel itself needs, not for weird out of tree > infrastructure. This isn't new, the kernel already has the infrastructure for building

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread Christoph Hellwig
On Tue, Jan 26, 2021 at 06:44:44AM -0600, Justin Forbes wrote: > Support and enforce are 2 completely different things. To shed a bit > more light on this, the real issue that prompted this was breaking CI > systems. As we enabled gcc plugins in Fedora, and the toolchain folks > went through 3

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread Christoph Hellwig
Please don't add all this garbage. We only add infrastructure to the kernel for what the kernel itself needs, not for weird out of tree infrastructure. On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > When building out-of-tree kernel modules, the build system doesn't > require

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-27 Thread Kees Cook
On Tue, Jan 26, 2021 at 12:43:16PM -0600, Josh Poimboeuf wrote: > On Tue, Jan 26, 2021 at 09:56:10AM -0800, Kees Cook wrote: > > On Mon, Jan 25, 2021 at 04:19:53PM -0600, Josh Poimboeuf wrote: > > > On Mon, Jan 25, 2021 at 02:03:07PM -0800, Kees Cook wrote: > > > > On Mon, Jan 25, 2021 at

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Kees Cook
On Mon, Jan 25, 2021 at 04:19:53PM -0600, Josh Poimboeuf wrote: > On Mon, Jan 25, 2021 at 02:03:07PM -0800, Kees Cook wrote: > > On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > > > When a GCC version mismatch is detected, print a warning and disable the > > > plugin. The only

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 02:59:57PM -0800, Kees Cook wrote: > On Tue, Jan 26, 2021 at 12:43:16PM -0600, Josh Poimboeuf wrote: > > On Tue, Jan 26, 2021 at 09:56:10AM -0800, Kees Cook wrote: > > > On Mon, Jan 25, 2021 at 04:19:53PM -0600, Josh Poimboeuf wrote: > > > > On Mon, Jan 25, 2021 at

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 09:56:10AM -0800, Kees Cook wrote: > On Mon, Jan 25, 2021 at 04:19:53PM -0600, Josh Poimboeuf wrote: > > On Mon, Jan 25, 2021 at 02:03:07PM -0800, Kees Cook wrote: > > > On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > > > > When a GCC version mismatch is

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Greg KH
On Tue, Jan 26, 2021 at 10:19:34AM -0600, Josh Poimboeuf wrote: > On Tue, Jan 26, 2021 at 10:15:52AM -0600, Justin Forbes wrote: > > On Tue, Jan 26, 2021 at 10:05 AM Peter Zijlstra > > wrote: > > > > > > On Tue, Jan 26, 2021 at 09:46:51AM -0600, Josh Poimboeuf wrote: > > > > On Tue, Jan 26, 2021

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Greg KH
On Mon, Jan 25, 2021 at 03:27:55PM -0600, Josh Poimboeuf wrote: > On Tue, Jan 26, 2021 at 06:16:01AM +0900, Masahiro Yamada wrote: > > On Tue, Jan 26, 2021 at 5:42 AM Josh Poimboeuf wrote: > > > > > > When building out-of-tree kernel modules, the build system doesn't > > > require the GCC version

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Justin Forbes
On Tue, Jan 26, 2021 at 11:07 AM Greg KH wrote: > > On Tue, Jan 26, 2021 at 10:19:34AM -0600, Josh Poimboeuf wrote: > > On Tue, Jan 26, 2021 at 10:15:52AM -0600, Justin Forbes wrote: > > > On Tue, Jan 26, 2021 at 10:05 AM Peter Zijlstra > > > wrote: > > > > > > > > On Tue, Jan 26, 2021 at

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Greg KH
On Mon, Jan 25, 2021 at 04:07:57PM -0600, Josh Poimboeuf wrote: > On Tue, Jan 26, 2021 at 06:44:35AM +0900, Masahiro Yamada wrote: > > > > If people use a different compiler, they must be > > > > prepared for any possible problem. > > > > > > > > Using different compiler flags for in-tree and

RE: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread David Laight
From: Peter Zijlstra > Sent: 26 January 2021 16:05 > > On Tue, Jan 26, 2021 at 09:46:51AM -0600, Josh Poimboeuf wrote: > > On Tue, Jan 26, 2021 at 04:15:37PM +0100, Peter Zijlstra wrote: > > > On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote: > > > > User space mixes compiler

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 10:15:52AM -0600, Justin Forbes wrote: > On Tue, Jan 26, 2021 at 10:05 AM Peter Zijlstra wrote: > > > > On Tue, Jan 26, 2021 at 09:46:51AM -0600, Josh Poimboeuf wrote: > > > On Tue, Jan 26, 2021 at 04:15:37PM +0100, Peter Zijlstra wrote: > > > > On Tue, Jan 26, 2021 at

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Justin Forbes
On Tue, Jan 26, 2021 at 10:05 AM Peter Zijlstra wrote: > > On Tue, Jan 26, 2021 at 09:46:51AM -0600, Josh Poimboeuf wrote: > > On Tue, Jan 26, 2021 at 04:15:37PM +0100, Peter Zijlstra wrote: > > > On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote: > > > > User space mixes compiler

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Peter Zijlstra
On Tue, Jan 26, 2021 at 09:46:51AM -0600, Josh Poimboeuf wrote: > On Tue, Jan 26, 2021 at 04:15:37PM +0100, Peter Zijlstra wrote: > > On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote: > > > User space mixes compiler versions all the time. The C ABI is stable. > > > > > > What

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 04:15:37PM +0100, Peter Zijlstra wrote: > On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote: > > User space mixes compiler versions all the time. The C ABI is stable. > > > > What specifically is the harder issue you're referring to? > > I don't think the C

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Peter Zijlstra
On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote: > User space mixes compiler versions all the time. The C ABI is stable. > > What specifically is the harder issue you're referring to? I don't think the C ABI captures nearly enough. Imagine trying to mix a compiler with and

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Greg KH
On Tue, Jan 26, 2021 at 08:51:55AM -0600, Josh Poimboeuf wrote: > On Tue, Jan 26, 2021 at 02:51:29PM +0100, Greg KH wrote: > > On Tue, Jan 26, 2021 at 06:44:44AM -0600, Justin Forbes wrote: > > > On Tue, Jan 26, 2021 at 2:21 AM Greg KH wrote: > > > > > > > > On Mon, Jan 25, 2021 at 04:07:57PM

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 02:51:29PM +0100, Greg KH wrote: > On Tue, Jan 26, 2021 at 06:44:44AM -0600, Justin Forbes wrote: > > On Tue, Jan 26, 2021 at 2:21 AM Greg KH wrote: > > > > > > On Mon, Jan 25, 2021 at 04:07:57PM -0600, Josh Poimboeuf wrote: > > > > On Tue, Jan 26, 2021 at 06:44:35AM

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Greg KH
On Tue, Jan 26, 2021 at 06:44:44AM -0600, Justin Forbes wrote: > On Tue, Jan 26, 2021 at 2:21 AM Greg KH wrote: > > > > On Mon, Jan 25, 2021 at 04:07:57PM -0600, Josh Poimboeuf wrote: > > > On Tue, Jan 26, 2021 at 06:44:35AM +0900, Masahiro Yamada wrote: > > > > > > If people use a different

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Justin Forbes
On Tue, Jan 26, 2021 at 2:21 AM Greg KH wrote: > > On Mon, Jan 25, 2021 at 04:07:57PM -0600, Josh Poimboeuf wrote: > > On Tue, Jan 26, 2021 at 06:44:35AM +0900, Masahiro Yamada wrote: > > > > > If people use a different compiler, they must be > > > > > prepared for any possible problem. > > > > >

RE: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread David Laight
> We started with the assumption that modules must be compiled > by the same compiler as the kernel was. > https://lore.kernel.org/patchwork/patch/836247/#1031547 > > Now that the compiler capability is evaluated in Kconfig, > this is a harder requirement. > > In reality, a different compiler

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-26 Thread Masahiro Yamada
On Tue, Jan 26, 2021 at 7:03 AM Kees Cook wrote: > > On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > > When a GCC version mismatch is detected, print a warning and disable the > > plugin. The only exception is the RANDSTRUCT plugin which needs all > > code to see the same

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-25 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 06:16:01AM +0900, Masahiro Yamada wrote: > On Tue, Jan 26, 2021 at 5:42 AM Josh Poimboeuf wrote: > > > > When building out-of-tree kernel modules, the build system doesn't > > require the GCC version to match the version used to build the original > > kernel. That's

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-25 Thread Josh Poimboeuf
On Mon, Jan 25, 2021 at 02:03:07PM -0800, Kees Cook wrote: > On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > > When a GCC version mismatch is detected, print a warning and disable the > > plugin. The only exception is the RANDSTRUCT plugin which needs all > > code to see the

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-25 Thread Josh Poimboeuf
On Tue, Jan 26, 2021 at 06:44:35AM +0900, Masahiro Yamada wrote: > > > If people use a different compiler, they must be > > > prepared for any possible problem. > > > > > > Using different compiler flags for in-tree and out-of-tree > > > is even more dangerous. > > > > > > For example,

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-25 Thread Kees Cook
On Mon, Jan 25, 2021 at 02:42:10PM -0600, Josh Poimboeuf wrote: > When a GCC version mismatch is detected, print a warning and disable the > plugin. The only exception is the RANDSTRUCT plugin which needs all > code to see the same struct layouts. In that case print an error. I prefer this

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-25 Thread Masahiro Yamada
On Tue, Jan 26, 2021 at 6:28 AM Josh Poimboeuf wrote: > > On Tue, Jan 26, 2021 at 06:16:01AM +0900, Masahiro Yamada wrote: > > On Tue, Jan 26, 2021 at 5:42 AM Josh Poimboeuf wrote: > > > > > > When building out-of-tree kernel modules, the build system doesn't > > > require the GCC version to

Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules

2021-01-25 Thread Masahiro Yamada
On Tue, Jan 26, 2021 at 5:42 AM Josh Poimboeuf wrote: > > When building out-of-tree kernel modules, the build system doesn't > require the GCC version to match the version used to build the original > kernel. That's probably [1] fine. > > In fact, for many distros, the version of GCC used to