Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2364414imu; Fri, 14 Dec 2018 09:48:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/VShLaeLSFy4HDeOGRrQ/8WYDj0S8hcJUoCxtaDbXdWFCw6bUn1YOxQEjGoHbG7BzVyh1Mk X-Received: by 2002:a17:902:714c:: with SMTP id u12mr3681533plm.234.1544809699615; Fri, 14 Dec 2018 09:48:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544809699; cv=none; d=google.com; s=arc-20160816; b=qCjHmLklffncc4QgnFvbWeEkLoCy3KSq3EfOZusgAlBBkC9vt5++Qjzrl2z4JafOwn /nQEAN12VBPWZwNL+27MBij+7buslltTMiB+aVetVpn65M9eCuJlFF4UihewXh2HTdJu xmPANnG/2zJaqg4FajJ9dSm/sNBgw183F6DqMf/hMvFaJtRccm9TN65mJkeg6s31vpya X/wtAERvACJPjlvlJVSAcqTQcAQgYncXY6449UHWApD8CfeZPtOfGyWTTrNJ5c6LJ5ot kt7qWHQsp8GCeYlo/SRbjfSvBbPqQDmbHOyTpah+dgBFrTikIU040jHr8lUubMIZDllQ ZwqA== 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=N374BbMHCPku8eJQVFB2xDbFPUi2I0IjzRvA4zLa0no=; b=Dr15pk+/RmiiMFOia5M+m4YjRsNvZaK5fmlp2zwigqBrhkgBq3R+pljdtv1j5T7ix0 6R+wz3M/doLUD3fxz4cwytvitBI2fbIP0fa1a7pe79XbX9gcCrE7fhmJyH2K97jnT2CT 6cXdygzYkoF9s/lyxZkRv7kaIhHqbXtM837rLwWpAOuetaAG3I17U2mM3cVFoUBxKybH vF0opSsQa1l3tm3MnoWfSbX6iKSIekbaG6i1j7ocJDOuHLo6XVHq2bTsmsYs/KpfNL2A NQWJivjSB1ATdmUXHcO1yl0GNK3QuNiimJG73ZppCKYxCu7kUDPcKMpUQ0CR4RyrxO+v B2vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dvoBj9Lv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e188si4707168pfa.16.2018.12.14.09.48.04; Fri, 14 Dec 2018 09:48:19 -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=@google.com header.s=20161025 header.b=dvoBj9Lv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730456AbeLNRqw (ORCPT + 99 others); Fri, 14 Dec 2018 12:46:52 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33963 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729341AbeLNRqw (ORCPT ); Fri, 14 Dec 2018 12:46:52 -0500 Received: by mail-pg1-f196.google.com with SMTP id j10so1803711pga.1 for ; Fri, 14 Dec 2018 09:46:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=N374BbMHCPku8eJQVFB2xDbFPUi2I0IjzRvA4zLa0no=; b=dvoBj9LvyCWQIE8Z0emHVuw0fe9rAgTlgyjXJzCZ1DxiO/FUqKNEXW4PRpoW00qJAQ qFnYDMLLWTYoZTjkTxmr12ev02Xv0mnuz5i1ZijHcosJOxRK3jIZUTUUxicly6eHMRx5 ioCOsJ3jz6nflnB3X/2xds4Roly2YSrqC2nMsCmANrzNaLJQTzgTYkBletl5PpNkeubR y+00e4rFGDJ1j9bAico1Maxj0vkcrx5EyHJlXUfOEA9FrNzgycee+9kPJdQXo5NOMp95 ZP265zKvfH+MPkQ2Oy4MUi6LKLYm9r4voRRJ1EgRKPF4m91+6B7pfjXsNz8xGqmFjs7T jMdg== 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=N374BbMHCPku8eJQVFB2xDbFPUi2I0IjzRvA4zLa0no=; b=iuAColL6zFy8fx46HKuC8txIirhxrhJMayg1MsKoIZ/WokbMoPNkpYhb9YqVjr0N/5 R6WtxRnhI3lu+Zq7VWoULKDIhYEK1Rg3FzRxGgSHXbUDz20llKAJcVl8H55x3q6v9vrR dyQW6wSb1IvzBSQxnU3L37TVo9i1kk9XYEQi7lFZPauzmWFg25aMrqrWr29xQf/DE8cR 5wwMG0+MlEPIPNr4NJazl5iteirM/WwqU+x0/m8Qy4AbYfsoQU0aWa0NfKWfqc0KzjjE kANGOKfAapn8gKOOLRo5LLN4fDjOhNn1RISAntjU/41qcP+KS1ysmhUt2M18nBk7WK7k LPTQ== X-Gm-Message-State: AA+aEWaI6oTNORskAtiLhlMDqPWdh9lNYusq0iQnpUFr5CvtORWQmadd tZMoRbZqallzTccIFLliqGkJRkHD9SafKtHWkhhP/A== X-Received: by 2002:a63:bf0b:: with SMTP id v11mr3600440pgf.302.1544809610665; Fri, 14 Dec 2018 09:46:50 -0800 (PST) MIME-Version: 1.0 References: <20181214141433.466991-1-liuxiaozhou@bytedance.com> In-Reply-To: From: Nick Desaulniers Date: Fri, 14 Dec 2018 09:46:39 -0800 Message-ID: Subject: Re: [PATCH v3] Compiler Attributes: don't pollute userspace with macro definitions To: Miguel Ojeda Cc: liuxiaozhou@bytedance.com, Linus Torvalds , Luc Van Oostenryck , Masahiro Yamada , paul.burton@mips.com, Kees Cook , Arnd Bergmann , LKML 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 Fri, Dec 14, 2018 at 8:06 AM Miguel Ojeda wrote: > > On Fri, Dec 14, 2018 at 3:16 PM Xiaozhou Liu = wrote: > > > > Macros 'inline' and '__gnu_inline' used to be defined in compiler-gcc.h= , > > which was (and is) included entirely in (__KERNEL__ && !__ASSEMBLY__). > > Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutu= ally > > exclusive") had those macros exposed to userspace, unintentionally. > > > > Then commit a3f8a30f3f00 ("Compiler Attributes: use feature checks > > instead of version checks") moved '__gnu_inline' back into > > (__KERNEL__ && !__ASSEMBLY__) and 'inline' was left behind. Since 'inli= ne' > > depends on '__gnu_inline', compiling error showing "unknown type name > > =E2=80=98__gnu_inline=E2=80=99" will pop up, if userspace somehow inclu= des > > . > > > > Other macros like __must_check, notrace, etc. are in a similar situatio= n. > > So just move all these macros back into (__KERNEL__ && !__ASSEMBLY__). > > > > Note: > > 1. This patch only affects what userspace sees. > > 2. __must_check (when !CONFIG_ENABLE_MUST_CHECK) and noinline_for_sta= ck > > were once defined in __KERNEL__ only, but we believe that they can > > be put into !__ASSEMBLY__ too. > > > > Acked-by: Nick Desaulniers > > Signed-off-by: Xiaozhou Liu > > Thanks Xiaozhou, picked into compiler-attributes with a slightly > modified title (since it is not about compiler attributes this time), > and let's see if there is any problem with it in linux-next. > > Nick: I kept your Ack, even if it is a different patch. Let me know if > you don't want to Ack this version. Doubled-acked-by: Nick Desaulniers (I recognize it's always ambiguous whether to carry forward sign-offs when a patch set changes) --=20 Thanks, ~Nick Desaulniers