Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1608118pxb; Thu, 4 Mar 2021 16:13:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJym4R8R+dNP1HTOE2CqrC13KQXyrUYSViZryNfV05zCK2GG4wVNqHviZmmNn6FwmubuEoEP X-Received: by 2002:a5e:aa04:: with SMTP id s4mr5709296ioe.30.1614903181448; Thu, 04 Mar 2021 16:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903181; cv=none; d=google.com; s=arc-20160816; b=0DE3SvotBADzC70Ac8tz2Q0J/ZRaS9grFdS65wzAnwFq6B8l/rcHemUqRh7X0MqU7d /LDmkF5O+OQrQ516KjJA+aY7mczrVaOov1kMaK94B9QBkgQraz7GMxImlNS9WmIAXVpy 48p+odpZIrIfpxFO4DYlWE+KYEXkvFWKFd6O9C8Z7ZR9vV+wKmn9Uxd/dBzwl4pyevOl GPM+xtgPeV9sGw4OupWOeLapib3KEKMWCTl7tTleKNaFoDeMPMPGjS5srQzj8eZoZZYk dV91JScUAI6bBfE1lf8trLLZUCBknNDcWIe7735kcE50nn0WqVZ0bnVMr05CHjIlEW3t xDMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=Irzj2yjdZ3CLdRv1cDzW4OzBos4tk0kk+hDpIub76LA=; b=mq1lkCRiL3Ea7tGX4THvo3CroEadsp5yTS3rnHkF+u/v97hwNr0PxfjELyIwyDkUj0 tF1BuDErBXJd5pSKE5eSbJ2w4zj2wSXtVBTTZtSZm3tyInCBFUjbd/+VNtiJtl0bHfGz uWGhqcWSI4hZYtxxOKqVkUfD1pwiE08cLh81D2CnI4DFfhNJN6TyIOB7gSIthu8Yswek 7GnTBX+L17MhVASqqIyDlS36iYcZQvXi4Q8cfuANYYgxXq361QPBqn/TE8+6rRzKDH08 /hOAS+4+ZD17AmHurhdS9Uhczw94QaSRFzGyXXLafjPOUMCfvOyWEPoK+Ic7Ydwd95D6 Yj2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bvUJazwZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l14si625320iln.1.2021.03.04.16.12.48; Thu, 04 Mar 2021 16:13:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=bvUJazwZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240654AbhCDM3j (ORCPT + 99 others); Thu, 4 Mar 2021 07:29:39 -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-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