Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9176813pxu; Mon, 28 Dec 2020 08:29:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwXklUGk7HxodSGWfilWuugjzOJ/rs90Y5cvXluBqzd2mtlRfD0YeZ0X6XeO85TJW2Xl6z X-Received: by 2002:a50:ed04:: with SMTP id j4mr43731923eds.84.1609172969985; Mon, 28 Dec 2020 08:29:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172969; cv=none; d=google.com; s=arc-20160816; b=xM527+QKfzgUvtDVDOkdtuvhsoGsrTnKN8z6yKlHZ27BwszJudU5xXsVfoCw7VIkKy At5J4Q3U+dDKCHZV41uyg8/ocKOqAfXbDMQX1LiZFp4M8wvofRqyh+UhL9e0QyJnr5SZ i98vd2jFa/jSVJq43aptNhycYmsvNwjzTaqEGcttmnq0lSAFCOMMUXuSQvz9HOlEUibC RZvdS6misx3RsRtZvnMXiPbONB+wqcmLsgn7GIqzdPxs9cuTtzBoAz9qmvf83LgsFqq2 ZuJdRvUGRMWcYcMk/ghly8AKIfyPUGF2LfPo+gSdg+Gc0CRbKEQJUnNLCBsnvBvkDLj0 Dhtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FNI4/LbZPoFFW/b2083OolVCkSM4X4cGqQM2jzd6k9U=; b=hpAotkCT7mun4ZdQk1TV7M6KkVY/nazHVKzJiUoieZD1C/gCacQDL61QNHhkiU+5or rKqVeNZebxeO0a55YHe5viedMm1tb5KOcFPkSj7UrjvhvUyBDotcgaYKI0X1r9XSIIRI jO+yseQaMZ0PBck3yRxXL+wj4NHeUFsRg1iyxO2QT6o4TRc91mXBHmw7PxwDEZmIBYcV 1/nXpGPRNt0U2A6O4O8QC8+qI/gW1yDK84po8CULeLd942jpJXZpiqT9txn1WdOqimON MaczEe/l6+1iHNK2pNAjl5aDhv0pJiAEpn6ESAUHLZxJ3qKhxgLkEY7GB7qai/SO82EP A4fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S1uqwuLM; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t11si22479918edc.101.2020.12.28.08.29.05; Mon, 28 Dec 2020 08:29:29 -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=@linuxfoundation.org header.s=korg header.b=S1uqwuLM; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731031AbgL1NJU (ORCPT + 99 others); Mon, 28 Dec 2020 08:09:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:36570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731064AbgL1NJH (ORCPT ); Mon, 28 Dec 2020 08:09:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 65F7C20728; Mon, 28 Dec 2020 13:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160932; bh=w1B80InT3GeQCkzsfsLRnH6hwn/Ke3XQB3TgRmdg73c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S1uqwuLM/km/v1MsaUrzDccHIL/GFi9q1e+9g3YA4m8DEajcHqFDeCwJiCj27bYPm qNlq3Pwb6bP0/j1TowFrpAqLGU8blruwdI892t5vSs5cx7F/Ub9JVKhiFfVhHuUhhb r2dO9f2v4lBAGzSwYxbLvYEhzAQqp/aWrTDvzdcc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Ard Biesheuvel , Masahiro Yamada , Michal Marek , Kees Cook , Rikard Falkeborn , Marco Elver , Andrew Morton , Linus Torvalds Subject: [PATCH 4.14 013/242] kbuild: avoid static_assert for genksyms Date: Mon, 28 Dec 2020 13:46:58 +0100 Message-Id: <20201228124905.315839390@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 14dc3983b5dff513a90bd5a8cc90acaf7867c3d0 upstream. genksyms does not know or care about the _Static_assert() built-in, and sometimes falls back to ignoring the later symbols, which causes undefined behavior such as WARNING: modpost: EXPORT symbol "ethtool_set_ethtool_phy_ops" [vmlinux] version generation failed, symbol will not be versioned. ld: net/ethtool/common.o: relocation R_AARCH64_ABS32 against `__crc_ethtool_set_ethtool_phy_ops' can not be used when making a shared object net/ethtool/common.o:(_ftrace_annotated_branch+0x0): dangerous relocation: unsupported relocation Redefine static_assert for genksyms to avoid that. Link: https://lkml.kernel.org/r/20201203230955.1482058-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Suggested-by: Ard Biesheuvel Cc: Masahiro Yamada Cc: Michal Marek Cc: Kees Cook Cc: Rikard Falkeborn Cc: Marco Elver Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/linux/build_bug.h | 5 +++++ 1 file changed, 5 insertions(+) --- a/include/linux/build_bug.h +++ b/include/linux/build_bug.h @@ -82,4 +82,9 @@ #endif /* __CHECKER__ */ +#ifdef __GENKSYMS__ +/* genksyms gets confused by _Static_assert */ +#define _Static_assert(expr, ...) +#endif + #endif /* _LINUX_BUILD_BUG_H */