Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3942011pxb; Tue, 26 Jan 2021 08:26:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKCt92djzU1xpEbLl3QeRP//qsf08cnxwY2TBW9WxHMU90hEbOZAkcmqA1nYbBaFXflJVW X-Received: by 2002:a17:906:c7d2:: with SMTP id dc18mr3837959ejb.149.1611678388776; Tue, 26 Jan 2021 08:26:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611678388; cv=none; d=google.com; s=arc-20160816; b=tzUnTVRlsQNYm/iQa0/RJ2vNBk5eS3N0zgCzmw/MWl+QxAoqPK4Bkdgub+/5nA6jTZ IoDJooLFR9PfbOiHIALwHR3DrShg9y/r4tAt7Wfl+JYFYQA6CEidH4G4aZkS2VSA/iaH YORMji+8os2A2rLb/toMo1RGJhjo+HkIkihnzj4ez9xrFr7hQV5B0mQdOLqOZnLpBYWo dYmrPpOo+LqBPa/STPUl2YhnsXyZKLmCGlKuc/x3p/H9NPBCMYY3YohiU70isUlCIteR v0WBWmhtS3MTpylhHjCThs51eFlkrdJZjjNZW/BS5I7krar9eOrjzKu9bxPAEUNOxh41 TjDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OkRiY5ow5UKClr4i0QoBZwnQcXWa51RD9uvqs2Ng6cs=; b=MiK5quPjYS/xwpxfWMtN0tm79EgqeBTvw95zm9jo1/HZz6FmKU8Lj3HhTAkuh/KBZB r2B4SRnZESbls2d1L6St//X1XrC6AkLeuhUykWXEBYPgUrlKs/p5MciMeEg/rWzpKvHG piN1i/jWvx3jwrYq00KbvZRCjGH+iK5YKaKtbqOsg8FWbrP5VOJY8I1QRECDQJyb52Jr 3WOo/jIOzUeLbbQwbNti1KM+/aeWvWODef1mIWv4mYVh8Y20gzLD4TsdqRqeo9djy9Ll 0TEHLfx00qirtjFYD3/j6Lrpi5jzVidpf0vBclRlonW53aEzIdTQi4JHVXbRjSHVRy1Z StHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="QDV/4qnS"; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si8865313edy.156.2021.01.26.08.26.03; Tue, 26 Jan 2021 08:26:28 -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=@redhat.com header.s=mimecast20190719 header.b="QDV/4qnS"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404523AbhAZQWB (ORCPT + 99 others); Tue, 26 Jan 2021 11:22:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:34851 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392853AbhAZQVJ (ORCPT ); Tue, 26 Jan 2021 11:21:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611677982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OkRiY5ow5UKClr4i0QoBZwnQcXWa51RD9uvqs2Ng6cs=; b=QDV/4qnS79Sggec0Zqo3CHsTTHoeEEwK5Eym38ahXBDfrnym5hUDP/UorcHh3LuLaAAIuS CpNznKsmsY9JbB/getKZJlqDoxazqyUyaKS+XYBWBlNrxV3b971czRr9WxdXuGtpH5bKwF mMtJ7bhG1jLkO5hpYBMM0hbb30ScMwM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-32-MdJ5HRgVMcuTlAbJ4OK0YA-1; Tue, 26 Jan 2021 11:19:40 -0500 X-MC-Unique: MdJ5HRgVMcuTlAbJ4OK0YA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE7D91081B3C; Tue, 26 Jan 2021 16:19:37 +0000 (UTC) Received: from treble (ovpn-120-118.rdu2.redhat.com [10.10.120.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 405696B8DD; Tue, 26 Jan 2021 16:19:36 +0000 (UTC) Date: Tue, 26 Jan 2021 10:19:34 -0600 From: Josh Poimboeuf To: Justin Forbes Cc: Peter Zijlstra , Greg KH , Masahiro Yamada , Kees Cook , Linux Kernel Mailing List , Michal Marek , linux-hardening@vger.kernel.org, Linux Kbuild mailing list , Ondrej Mosnacek Subject: Re: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules Message-ID: <20210126161934.z6sng4irl5teonvj@treble> References: <20210125220757.vxdsf6sttpy46cq7@treble> <20210126145155.kcfbnzfqg5qugvcl@treble> <20210126154651.itfrnhwfistia3ss@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 without asm-goto support (ok, we fail to build without > > > > by now, but just imagine). > > > > > > > > No C ABI violated, but having that GCC extention vs not having it > > > > radically changes the kernel ABI. > > > > > > > > I think I'm with Greg here, just don't do it. > > > > > > Ok, thank you for an actual example. asm goto is a good one. > > > > > > But it's not a cut-and-dry issue. Otherwise how could modversions > > > possibly work? > > > > > > So yes, we should enforce GCC versions, but I still haven't seen a > > > reason it should be more than just "same compiler and *major* version". > > > > Why bother? rebuilding the kernel and all modules is a matter of 10 > > minutes at most on a decently beefy build box. > > > > What actual problem are we trying to solve here? > > This is true for those of us used to working with source and building > by hand. For users who want everything packaged, rebuilding a kernel > package for install is considerably longer, and for distros providing > builds for multiple arches, we are looking at a couple of hours at > best. From a Fedora standpoint, I am perfectly fine with it failing > if someone tries to build a module on gcc10 when the kernel was built > with gcc11. It's tedious when the kernel was built with gcc11 > yesterday, and a new gcc11 build today means that kernel needs to be > rebuilt. Right. It's a problem for distro users. The compiler and kernel are in separate packages, with separate release cadences. The latest compiler version may not exactly match what was used to build the latest kernel. -- Josh