All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] gcc-plugins updates for v5.11-rc1
@ 2020-12-15 20:15 Kees Cook
  2020-12-16 19:24 ` Linus Torvalds
  2020-12-16 19:44 ` pr-tracker-bot
  0 siblings, 2 replies; 7+ messages in thread
From: Kees Cook @ 2020-12-15 20:15 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Kees Cook, Masahiro Yamada

Hi Linus,

Please pull these gcc-plugins updates for v5.11-rc1.

Thanks!

-Kees

The following changes since commit b65054597872ce3aefbc6a666385eabdf9e288da:

  Linux 5.10-rc6 (2020-11-29 15:50:50 -0800)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/gcc-plugins-v5.11-rc1

for you to fetch changes up to 53a57e60de74a3531ae769b3241cc5169e1431ac:

  MAINTAINERS: Drop inactive gcc-plugins maintainer (2020-12-04 14:11:05 -0800)

----------------------------------------------------------------
gcc-plugins updates for v5.11-rc1

- Clean up gcc plugin builds now that GCC must be 4.9+ (Masahiro Yamada)
- Update MAINTAINERS (Kees Cook)

----------------------------------------------------------------
Kees Cook (1):
      MAINTAINERS: Drop inactive gcc-plugins maintainer

Masahiro Yamada (2):
      gcc-plugins: remove code for GCC versions older than 4.9
      gcc-plugins: simplify GCC plugin-dev capability test

 MAINTAINERS                                        |   1 -
 scripts/gcc-plugin.sh                              |  19 -
 scripts/gcc-plugins/Kconfig                        |   2 +-
 scripts/gcc-plugins/gcc-common.h                   | 407 ---------------------
 scripts/gcc-plugins/gcc-generate-gimple-pass.h     |  12 -
 scripts/gcc-plugins/gcc-generate-ipa-pass.h        |  23 --
 scripts/gcc-plugins/gcc-generate-rtl-pass.h        |  17 -
 scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h |  17 -
 scripts/gcc-plugins/latent_entropy_plugin.c        |  12 -
 scripts/gcc-plugins/randomize_layout_plugin.c      |   4 -
 scripts/gcc-plugins/sancov_plugin.c                |   6 -
 scripts/gcc-plugins/stackleak_plugin.c             |   4 +-
 scripts/gcc-plugins/structleak_plugin.c            |   4 -
 13 files changed, 2 insertions(+), 526 deletions(-)
 delete mode 100755 scripts/gcc-plugin.sh

-- 
Kees Cook

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

* Re: [GIT PULL] gcc-plugins updates for v5.11-rc1
  2020-12-15 20:15 [GIT PULL] gcc-plugins updates for v5.11-rc1 Kees Cook
@ 2020-12-16 19:24 ` Linus Torvalds
  2020-12-16 20:23   ` Kees Cook
  2020-12-16 19:44 ` pr-tracker-bot
  1 sibling, 1 reply; 7+ messages in thread
From: Linus Torvalds @ 2020-12-16 19:24 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Masahiro Yamada

On Tue, Dec 15, 2020 at 12:15 PM Kees Cook <keescook@chromium.org> wrote:
>
> Please pull these gcc-plugins updates for v5.11-rc1.

Hmm, I pulled this and then did an allmodconfig build.

I expected that to be a full rebuild, since the plugins got
recompiled, but it turned out to just take 16 seconds because it only
compiled the plugins, not any of the object files.

I'm doing a _proper_ full build with this after doing a

   git clean -dqfx

to actually clean everything out, but it did make me go "Umm".

Maybe we don't care. I guess the plugins are all supposed to be stable
in the sense that any updates don't change the generated code. But it
does strike me as a honking big hole for verification of plugin
changes.

So I don't think this necessarily requires any changes to our Kbuild
infrastructure, but I thought I'd mention it since this clearly didn't
match my naive expectations.

              Linus

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

* Re: [GIT PULL] gcc-plugins updates for v5.11-rc1
  2020-12-15 20:15 [GIT PULL] gcc-plugins updates for v5.11-rc1 Kees Cook
  2020-12-16 19:24 ` Linus Torvalds
@ 2020-12-16 19:44 ` pr-tracker-bot
  1 sibling, 0 replies; 7+ messages in thread
From: pr-tracker-bot @ 2020-12-16 19:44 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linus Torvalds, linux-kernel, Kees Cook, Masahiro Yamada

The pull request you sent on Tue, 15 Dec 2020 12:15:36 -0800:

> https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/gcc-plugins-v5.11-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6df0f2855a9ae888fd19d034d8e6889cee6b639c

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

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

* Re: [GIT PULL] gcc-plugins updates for v5.11-rc1
  2020-12-16 19:24 ` Linus Torvalds
@ 2020-12-16 20:23   ` Kees Cook
  2020-12-16 20:28     ` Linus Torvalds
  2020-12-18 18:50     ` Linus Torvalds
  0 siblings, 2 replies; 7+ messages in thread
From: Kees Cook @ 2020-12-16 20:23 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, Masahiro Yamada

On Wed, Dec 16, 2020 at 11:24:04AM -0800, Linus Torvalds wrote:
> On Tue, Dec 15, 2020 at 12:15 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > Please pull these gcc-plugins updates for v5.11-rc1.
> 
> Hmm, I pulled this and then did an allmodconfig build.
> 
> I expected that to be a full rebuild, since the plugins got
> recompiled, but it turned out to just take 16 seconds because it only
> compiled the plugins, not any of the object files.

Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel
like I scratched my head on that too. I will see if there is a sensible
way to have Kbuild "notice" that -- I hope there's an easier way to
invalidate all object files instead of adding all the plugins as a dep
to all .o builds. O_o

Thanks for the heads-up!

-- 
Kees Cook

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

* Re: [GIT PULL] gcc-plugins updates for v5.11-rc1
  2020-12-16 20:23   ` Kees Cook
@ 2020-12-16 20:28     ` Linus Torvalds
  2020-12-18 18:50     ` Linus Torvalds
  1 sibling, 0 replies; 7+ messages in thread
From: Linus Torvalds @ 2020-12-16 20:28 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Masahiro Yamada

On Wed, Dec 16, 2020 at 12:23 PM Kees Cook <keescook@chromium.org> wrote:
>
> Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel
> like I scratched my head on that too. I will see if there is a sensible
> way to have Kbuild "notice" that -- I hope there's an easier way to
> invalidate all object files instead of adding all the plugins as a dep
> to all .o builds. O_o

We already have some support for checking the compiler version. I
wonder if the plugins could add themselves to the version name in
there somehow..

But I don't think it's a big deal, and I won't worry about it. I do
hope we can deprecate the plugins some day, it has always made me very
nervous to have random code at that level.

             Linus

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

* Re: [GIT PULL] gcc-plugins updates for v5.11-rc1
  2020-12-16 20:23   ` Kees Cook
  2020-12-16 20:28     ` Linus Torvalds
@ 2020-12-18 18:50     ` Linus Torvalds
  2020-12-19 18:45       ` Masahiro Yamada
  1 sibling, 1 reply; 7+ messages in thread
From: Linus Torvalds @ 2020-12-18 18:50 UTC (permalink / raw)
  To: Kees Cook; +Cc: Linux Kernel Mailing List, Masahiro Yamada

On Wed, Dec 16, 2020 at 12:23 PM Kees Cook <keescook@chromium.org> wrote:
>
> Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel
> like I scratched my head on that too. I will see if there is a sensible
> way to have Kbuild "notice" that -- I hope there's an easier way to
> invalidate all object files instead of adding all the plugins as a dep
> to all .o builds. O_o

Side note, there's actually a more annoying issue with the gcc plugin
config code.

Namely that when I get a compiler update, the rest of the Kconfig
system is smart, and rebuilds all my files.

The gcc-plugins code? The code that *really* depends on the compiler
version even more? Yeah, not so much. It ends up instead causing a
build error like

   cc1: error: incompatible gcc/plugin versions
   cc1: error: failed to initialize plugin
./scripts/gcc-plugins/stackleak_plugin.so

because the plugins don't depend on the compiler version.

Again, this is not new, but it's another example of how fragile and
annoying the gcc-plugins code can be.

               Linus

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

* Re: [GIT PULL] gcc-plugins updates for v5.11-rc1
  2020-12-18 18:50     ` Linus Torvalds
@ 2020-12-19 18:45       ` Masahiro Yamada
  0 siblings, 0 replies; 7+ messages in thread
From: Masahiro Yamada @ 2020-12-19 18:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Kees Cook, Linux Kernel Mailing List

On Sat, Dec 19, 2020 at 3:50 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Wed, Dec 16, 2020 at 12:23 PM Kees Cook <keescook@chromium.org> wrote:
> >
> > Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel
> > like I scratched my head on that too. I will see if there is a sensible
> > way to have Kbuild "notice" that -- I hope there's an easier way to
> > invalidate all object files instead of adding all the plugins as a dep
> > to all .o builds. O_o
>
> Side note, there's actually a more annoying issue with the gcc plugin
> config code.
>
> Namely that when I get a compiler update, the rest of the Kconfig
> system is smart, and rebuilds all my files.


True. The full rebuild happens after commit 8b59cd81dc5e724.


>
> The gcc-plugins code? The code that *really* depends on the compiler
> version even more? Yeah, not so much. It ends up instead causing a
> build error like
>
>    cc1: error: incompatible gcc/plugin versions
>    cc1: error: failed to initialize plugin
> ./scripts/gcc-plugins/stackleak_plugin.so
>
> because the plugins don't depend on the compiler version.
>
> Again, this is not new, but it's another example of how fragile and
> annoying the gcc-plugins code can be.
>
>                Linus


OK, I will fix it. Thanks.





-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2020-12-19 18:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 20:15 [GIT PULL] gcc-plugins updates for v5.11-rc1 Kees Cook
2020-12-16 19:24 ` Linus Torvalds
2020-12-16 20:23   ` Kees Cook
2020-12-16 20:28     ` Linus Torvalds
2020-12-18 18:50     ` Linus Torvalds
2020-12-19 18:45       ` Masahiro Yamada
2020-12-16 19:44 ` pr-tracker-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.