Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1426891pxb; Sat, 4 Sep 2021 09:25:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUmqUbk1j92ha3vnBbiZzTyxfwdtqk48ZUav6nb9ffQPB9CyFGMewk2MWBU+sOWd5SQgbb X-Received: by 2002:a92:1a4f:: with SMTP id z15mr2986252ill.313.1630772754098; Sat, 04 Sep 2021 09:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630772754; cv=none; d=google.com; s=arc-20160816; b=T3gOEeoifoMuMLTLbRvv97w7fGkklkUk+dz7HgP8tiC1sPXsNbRCSNnayz8UmGCE/q JN/Gx39n4EstZJ19WxT2tezqYo7/TSCWpeK6djrdt3bGZoh8Koln4bteIRAr8uyXSb/X adQNiJAmiOqOOvsLaOE9baeExWDGrlFmOu1/u4isQIcGvQ0JMESE3cVD3dW9wCUCHHqe MHrI2bLb4eNkF3a4yzcNGHNXX1Ag1j/ohBR+DNf7PboDYkTi+CieFn5CwTTHBPm14bmX G22L0s5c6lz9AsGSGIKgVuxWaN46wikJj5XB8rUKQi3oHRgib1fqDqB6dCOsPcFK8gx2 cOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=RVOzgc3bFvaGiBgrSCVqaXNpwe7osuYX+OCKQQwu5gY=; b=lFCA4ZRHTUe5xy8p7GCKrFKul+/k0Yssnb8xoI/S4897+kw70UkIpdCqNAX25SgmhG Owi3POZNW7jl/W3on3vNlAXO5QhI22SVjplRs75dMOSu32dukRwknT+9Iz6LJ31r5syM kLcTXsZiUe/netTQJ7THZsU2S68C3NFiwkG5SjdiePwu0ZgZqQIppjQP2BMVCrmKSgO/ 4kmPCeq6TMjf01oaTk7KESGmvax8PeWN48cuPg6dH5GF674GGEEKOaeEeCnjZP6P1Sgv sTXczQEBXLmnJwEstFF8TT1P3acu+/8xqjLyNSITt/p/EOwHZ9adkjpnge/V67MEsrTR Xg2Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si2417574ioz.59.2021.09.04.09.25.40; Sat, 04 Sep 2021 09:25:54 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236892AbhIDQZN (ORCPT + 99 others); Sat, 4 Sep 2021 12:25:13 -0400 Received: from gate.crashing.org ([63.228.1.57]:34630 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236679AbhIDQZL (ORCPT ); Sat, 4 Sep 2021 12:25:11 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 184GJurq016488; Sat, 4 Sep 2021 11:19:56 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 184GJtXD016483; Sat, 4 Sep 2021 11:19:55 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Sat, 4 Sep 2021 11:19:55 -0500 From: Segher Boessenkool To: Florian Weimer Cc: Nathan Chancellor , Linus Torvalds , Masahiro Yamada , Nick Desaulniers , Linux Kbuild mailing list , Linux Kernel Mailing List , clang-built-linux , llvm@lists.linux.dev, linux-toolchains@vger.kernel.org Subject: Re: [GIT PULL v2] Kbuild updates for v5.15-rc1 Message-ID: <20210904161955.GR1583@gate.crashing.org> References: <3b461878-a4a0-2f84-e177-9daf8fe285e7@kernel.org> <878s0c4vng.fsf@oldenburg.str.redhat.com> <20210904131911.GP1583@gate.crashing.org> <871r644bd2.fsf@oldenburg.str.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871r644bd2.fsf@oldenburg.str.redhat.com> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 04, 2021 at 05:19:21PM +0200, Florian Weimer wrote: > * Segher Boessenkool: > > > Let me quote the original mail (I had to dig it out of the archives as > > well, no nice threading, too lazy, sorry): > > It still doesn't say why. I did see a reference to fleeting reference > to and . Yeah... I dug out the actual patch from linux-kbuild: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=kbuild-v5.15&id=c0891ac15f0428ffa81b2e818d416bdf3cb74ab6 The reasoning in there is completely wrong. is not a "userspace header". Instead, it is a standard header, required for some functionality in C. It also says "GPL 2 version of can be extracted from http://archive.debian.org/debian/pool/main/g/gcc-4.2/gcc-4.2_4.2.4.orig.tar.gz" which seems to suggest you cannot use stuff from GPLv3-licensed GCC. This is just wrong. The header in question says """ Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. """ And reads in part """ 1. Grant of Additional Permission. You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules. """ which says that if you compile with GCC, then it is perfectly fine if it uses the standard C headers, it does not make your work GPL-licenced. > After all, is exactly like in that it's > possible to use its functionality even without the header file. The > __atomic builtins are even documented in the GCC manual (unlike > ), which is why some programmers prefer them over the > standard interface. And then there's the _Atomic keyword itself, whose > use can easily result in calls to libatomic functions, too. So blocking > makes little sense to me. > > I don't know enough about softfloat if blocking the inclusion of > is worth it. Blocking the use of is pretty useless: it is possible to do millions of things in the kernel source that are frowned upon, or actively bad, or anything in between or more extreme. That is what code review is for. If it would be a common mistake (it is not afaik) you can warn for it from checkpatch.pl or something. The patch is just re-implementing part of the standard GCC , so that it will only work with recent GCC (and maybe clang as well if it implements the GCC internal interfaces correctly (i.e. compatibly) here, and the same for other compilers). Almost all of the GCC itself uses is the same, but it also is compatible to the various C standards if this header is included indirectly. That is all just some ifdeffery anyway, so doesn't influence compilation times noticeably, and all that. - * - So as far as I can see the motivation behind the patch is a) a misunderstanding of what standard C headers are, are for, etc.; and b) a misunderstanding of the GPL and the GCC runtime exception to it. The patch makes things worse than they were. If on the contrary Linux would use *more* standard compiler headers, say , then insidious bugs like that fixed by c46bbf5d2def would be prevented. Segher