From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB664C4161F for ; Thu, 4 Mar 2021 12:30:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C705D64F1E for ; Thu, 4 Mar 2021 12:30:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240620AbhCDM3k (ORCPT ); Thu, 4 Mar 2021 07:29:40 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:52257 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233785AbhCDM3P (ORCPT ); Thu, 4 Mar 2021 07:29:15 -0500 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 124CS6Rq009011; Thu, 4 Mar 2021 21:28:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 124CS6Rq009011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1614860886; bh=Irzj2yjdZ3CLdRv1cDzW4OzBos4tk0kk+hDpIub76LA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bvUJazwZiNRY8heTj7xTfl2HmoK/+nuraa0gep/9D1Mc8Fxq3XIgxQUojhIF5PIbp 1ZrZMWmVMaHGCUvzhycJdmI64WnD+CXXVGWZNFGCoLCBzkLSJP4XHjNf4y2UnqDMjc bX/6/Ew9IXKxsVtr24eemy2Ur4RmTC+XyooENQZwGFwHG+ce8tmrW7PCvzo9Aq6VYf vugVE5PppSkKaDAxwflc8lpkiZbYnqXKL5z6qOM5JaLJMEST7RqSAiMIW+mlNTqsJQ dh4Jy2orkxpz/YgIB7uUAldo6BFP+wMnCA6HBWIPBRBUfH9oN6TFU3aE1tg4JcoYRr lVAwsvAQ4Wehw== X-Nifty-SrcIP: [209.85.214.173] Received: by mail-pl1-f173.google.com with SMTP id s7so8865832plg.5; Thu, 04 Mar 2021 04:28:06 -0800 (PST) X-Gm-Message-State: AOAM531JtJRCogyUoKVo/69GtLVXqGWnNWBQ38sLQrEYe/AcGl5uaBw4 m+aD1em8CgYVkGg4YxuJLowCkqYs6gMtZUrtcic= X-Google-Smtp-Source: ABdhPJxzsQlqGgo4NvfSLwRPyaSNY2c5Jchh9K+ULSaLODKi4nRvy694XWcgTx+5kX7UG7VamVjQeA1dQOQUh2XDKjM= X-Received: by 2002:a17:902:8687:b029:e1:601e:bd29 with SMTP id g7-20020a1709028687b02900e1601ebd29mr3711611plo.47.1614860885734; Thu, 04 Mar 2021 04:28:05 -0800 (PST) MIME-Version: 1.0 References: <20210302232649.y2tutffhxsblwqlb@treble> <20210303191516.6ksxmng4pis7ue4p@treble> <20210303193806.oovupl4ubtkkyiih@treble> <20210303202406.bxgdx5a25j6wc43b@treble> <20210303214534.guyoxcwrgxgcqzy4@treble> In-Reply-To: <20210303214534.guyoxcwrgxgcqzy4@treble> From: Masahiro Yamada Date: Thu, 4 Mar 2021 21:27:28 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules To: Josh Poimboeuf Cc: Linus Torvalds , Linux Kernel Mailing List , Michal Marek , linux-hardening@vger.kernel.org, Linux Kbuild mailing list , Peter Zijlstra , Justin Forbes , Ondrej Mosnacek , Frank Eigler , Kees Cook Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... > > > > MNo, I didn't NAK it. Quite the reverser. > > > > I am ABSOLUTELY against rebuilding normal object files just because > > gcc versions change. A compiler version change makes zero difference > > for any normal object file. > > > > But the gcc plugins are different. They very much _are_ tied to a > > particular gcc version. > > > > Now, they are tied to a particular gcc version because they are > > horribly badly done, and bad technology, and I went off on a bit of a > > rant about just how bad they are, but the point is that gcc plugins > > depend on the exact gcc version in ways that normal object files do > > _not_. > > Thanks, reading comprehension is hard. I realized after re-reading that > I interpreted your "plugins should depend on the kernel version" > statement too broadly. > > Masahiro, any idea how I can make the GCC version a build dependency? 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. Rebuilding plugins for external modules is not easy; plugins are placed in the read-only directory, /usr/src/linux-headers-$(uname -r)/scripts/gcc-plugins/. The external modules must not (cannot) update in-tree build artifacts. "Rebuild" means creating copies in a different writable directory. Doing that requires a lot of design changes. -- Best Regards Masahiro Yamada