Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2295468imu; Thu, 29 Nov 2018 02:44:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/V+0MJOFXVUiMajZ9zcgwY9ZRNFCpxFRYw5TgokwYJG6FeCsYzGC8pnGLgfP4ucpsp8HJ6+ X-Received: by 2002:a17:902:3283:: with SMTP id z3mr971364plb.76.1543488250368; Thu, 29 Nov 2018 02:44:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543488250; cv=none; d=google.com; s=arc-20160816; b=sv2Epim8WfLReCMkskTD0jDNQoVSymzBL+CvrIGVJ/ph1JwatdTbtpBeZKLfE9bY/A 19kRfDIe98n3arAEDPD66om959Ryb3XEX1m8Keiwg6QHWeecmZQtSp8G2eNfF0utOMT4 PXkzjw+NJIsDeVPlcuF8bFXTXmAbaieK1SX71CfbJhLJBq4dJqdSuX9pu9xyYS6nWGgH ugLRK/+1owgmEhQKVYMy22WSN/lk4OGRQ/fg2ccYcDU0zLIpeIltkDQVLgJSAbN59/3q PugLlIAWV9eK5gLTjy1Nk82dO+ocxTpXDK30FDeR0dRluUXZhXc5fs+NtQ32Pl7id1Ed /AWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=vJiD2gHR+MF5RjPnef/auMHW0hV5W0v/nqU+sxRqOCw=; b=EGKKPYFDelX+w5hvNgt5GbnGRrbIs+2HW2tKQ8M5kmG/XyuuhZiZpdn9LVnuKIpv2q sWpdHKkMyiKlENtfQfv41s0fxSGKcIwTQls/eCbpVW97nCZPABSVJ+34NEe1SN9gwPKr MQPSUePepMCXCXHSCjbvsRVu7k4Vlx18jV665kTtkhws/YcQ1pFU1ZLRqeIGDGk3SWg+ QjqZtu6VM/RRBSe+/xwrq+i6GfniZe0Gk8HLzkrbD+vW8ylkS7sZX8jmK6JUieE8doq8 AV1sM8DDEu3Em5c28DfMU2iAJzOACSA70MYFKtHTfGjLwdGx3xKGsg7Gzr9AVZdZkq+N yPzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="U1SU/A3I"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u4si1714927pls.34.2018.11.29.02.43.54; Thu, 29 Nov 2018 02:44:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="U1SU/A3I"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728019AbeK2VrU (ORCPT + 99 others); Thu, 29 Nov 2018 16:47:20 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:41607 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbeK2VrU (ORCPT ); Thu, 29 Nov 2018 16:47:20 -0500 Received: by mail-lj1-f193.google.com with SMTP id z80-v6so1275447ljb.8; Thu, 29 Nov 2018 02:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vJiD2gHR+MF5RjPnef/auMHW0hV5W0v/nqU+sxRqOCw=; b=U1SU/A3IatGOZE7wXm1wjl6gxhHHd6RtlY0/oeRb4PXHwYWJTtzmaMTNQtRnz+l0Eb cwndUU+KRHmzxOvNrMO+cWStJlUvkF4we3vgGGm8VQ2lDJiN088zZHisIECvmFPf2RK5 UlTrMjEotjZhWfqfsAfXSpSKZxRx7rh8ZPPayV9Yk6JfjBa7UeII3RgIygM1kxn7LIyS shtyn7au33jnXrX4bJTr6HqsbQ2s+D1uTVXQ3Y6kKy83Dov0Hco6lOuayMWcDDjcNo/M vjA+r7AodYSvNtRi/Yb+a0FTtCSKycGUWNPO14S4/C8aOy26v6rNZ3i2ah4MDJciCZGD WGgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=vJiD2gHR+MF5RjPnef/auMHW0hV5W0v/nqU+sxRqOCw=; b=ePQ/xGCN6UnbDDb52HPXEdQPeoZSosg2sA/gEyiIwMfpoPPYSb0fgCjaJJ9XWAMzEO xq0gwOVPt0epI1Fia4gj1YVQQm96qa3rHzAnMfgIzt3N61EB/aCBlX4uaMwAA4+arCeA dDgTlnGjrZOrE+LQhxz90fG/mstHGtq0MuW+kgnM0kfiwLdehgne+VV+V9U8LFPfmfyY VNC8JW4ntKPnwHNmrJcRWGNVa0nQ32OugCrAup5iJ+JQ2sSnGVD0fkrOl6hSqTD7Fa6m +Uucaef5EfGTtPkHUKh3Fh6LXvuDSyEsxNiuveWPi7Bg0cHvh0gCGDIs02kdPS05Erzn Gzwg== X-Gm-Message-State: AA+aEWb/WSAQp/Kuh9wiFo4UcDVHGaalnBtCOcW9UQ+PTUdUbz0Re1ON fGNFUtxEmDS9IJovoLMlEpboEdPeFVJnIc/7MEnkIrL4 X-Received: by 2002:a2e:5109:: with SMTP id f9-v6mr790478ljb.52.1543488143583; Thu, 29 Nov 2018 02:42:23 -0800 (PST) MIME-Version: 1.0 References: <20181128140852.178260-1-liuxiaozhou@bytedance.com> <20181129021635.rzmehzzfgt2jvpgi@bytedancedeMacBook-Air.local> In-Reply-To: <20181129021635.rzmehzzfgt2jvpgi@bytedancedeMacBook-Air.local> From: Miguel Ojeda Date: Thu, 29 Nov 2018 11:42:11 +0100 Message-ID: Subject: Re: [PATCH] Compiler Attributes: move kernel-only attributes into __KERNEL__ To: lxz1983@gmail.com Cc: Network Development , linux-kernel , ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, jakub.kicinski@netronome.com, quentin.monnet@netronome.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 3:16 AM Xiaozhou Liu wrote: > > On Wed, Nov 28, 2018 at 06:35:18PM +0100, Miguel Ojeda wrote: > > By `these' I mean inline and the like, to be clear. Ah, that makes more sense! Sorry. > > That is not exactly correct -- a3f8a30f3f00 moved some attributes to > > another file, moving them into __KERNEL__ (in particular,__gnu_inline > > is). > > Yes, that is what a3f8a30f3f00 did. Sorry. > Turns out the commits in question are 815f0ddb346c and a3f8a30f3f00. No problem! It was a bit confusing indeed. > Yes and no. Let's recall the whole story. > > Before 815f0ddb346c("include/linux/compiler*.h: make compiler-*.h mutuall= y exclusive"), > __gnu_inline and inline were both *in* __KERNEL__ as the were in > , which was entirely put to __KERNEL__ in > . Everything was fine. > > Then 815f0ddb346c moved inline and __gnu_inline *out* of __KERNEL__ > and put them in so userspace could see them > both. Not sure if it's intended behavior, but everything looked fine. > > Then a3f8a30f3f00 moved __gnu_inline back into __KERNEL__ and left > inline behind. Since inline depends on __gnu_inline, error showing > "unknown type name =E2=80=98__gnu_inline=E2=80=99" pops up. Exactly, thanks a lot for clarifying it up (we should put this in the commit message, I would say). That also answers my question: it is clear everything should be back into __KERNEL__. The only worry is that the v4.19 release contained 815f0ddb346c, so it has them exposed, so someone could have started relying on them. Or, more likely, the exposed macros could break some source code out there. Hm... Should a "fix" be backported? Cheers, Miguel