Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3941834pxb; Tue, 26 Jan 2021 08:26:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlieh+uA1iqFj2o5RbGhaV8NYRlMfIAvLgfLLyHO26CFK0ATozjLnAgjh3pYZCLW2aoE6j X-Received: by 2002:a17:906:1796:: with SMTP id t22mr3806839eje.372.1611678373318; Tue, 26 Jan 2021 08:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611678373; cv=none; d=google.com; s=arc-20160816; b=fJNZeYlvBoeq6Px6nD/4YdPbp++56JGbSmJTVBmilwrV6oHVeZhRNDO1eKlm8TpYeG yCuByM3jVnCfzcLCy3vo7hJKAHpP/AAR5ltVADY5JdJT1nzcY09rGnVquC38j5bYF5Ez 9L1TmTlThc4eOWt7y8iPO5AYcIGBsUi3XXj2V/Kz/TKXJI8yW0PQUSuOt6865mBgY0OJ J3lJmpFoyLcO98LSDkq0d62X1wVJJ5FguevOZSzMI7zILctCkCusFx09VQjfsBMGwi3A kVg98aWkNT8wD97WWL/5See5Mw5cr7h2p8Cvw3qnhytuTxJSVCvOGO6nOxKCi11/QsyO rFDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=ozqR8aMGgdsee58M89tkfys45ysvPPEtk9jbxgtEjU0=; b=v/SmrV6otBQa1HvPaZ+BQqj61xI2Y+mAIwOwKGIGeBUZ7WSJS9ajv/XHWWVS+TxEf7 ozl0JhyJKBNlZH0khxl6+s1SLIS2PH+D2DdUHXFDJ0XjV0OEPTySDeHuquzIq/rTkTFX 1WbvchhHU76yzJcUACUK313JB73JVKap7++E2c1G+8MjsCHrFCkrhxGQsM+56bDG6UbN UPXTfYU8jRrLByfl2kwPSzXrnluaqu7YRrggby6L+rpZhvcdFS+E/ZPiVvBQTAvmRkbe iFsB5GoJ7oRAkW8fMGTIx2krAzJFJyb7P+KzZhB4O/K9Yku1WpFeXX/YvfoGY7SJ2N6c 9q8A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si9104571edr.397.2021.01.26.08.25.34; Tue, 26 Jan 2021 08:26:13 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405220AbhAZQXy convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Jan 2021 11:23:54 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:49673 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404997AbhAZQXs (ORCPT ); Tue, 26 Jan 2021 11:23:48 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-151-Ju8sTwOHNSCxWvwjAee00g-1; Tue, 26 Jan 2021 16:22:09 +0000 X-MC-Unique: Ju8sTwOHNSCxWvwjAee00g-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 26 Jan 2021 16:22:08 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Tue, 26 Jan 2021 16:22:08 +0000 From: David Laight To: 'Peter Zijlstra' , Josh Poimboeuf CC: Greg KH , Justin Forbes , "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 Thread-Topic: [PATCH RFC] gcc-plugins: Handle GCC version mismatch for OOT modules Thread-Index: AQHW8/0BS8d19DyYhUmaAJxxd6lVCKo6FXmA Date: Tue, 26 Jan 2021 16:22:08 +0000 Message-ID: <802a01db010d4170998d49c1a17cc783@AcuMS.aculab.com> References: <20210125212755.jfwlqogpcarmxdgt@treble> <20210125220757.vxdsf6sttpy46cq7@treble> <20210126145155.kcfbnzfqg5qugvcl@treble> <20210126154651.itfrnhwfistia3ss@treble> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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? People build modules to load into disrto-provided kernels. I'd have though the compiler would need to support the same options as that used to build the kernel - but not necessarily be exactly the same version. Ignoring compiler bugs (which will bight you if the compiler you have is broken) then a newer compiler ought to be fine. Or a kernel might have been built with config options that don't require features of the compiler being used - so that modules can be built with an older compiler. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)