From patchwork Mon Dec 28 12:45:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 352745 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp10017983ejs; Mon, 28 Dec 2020 08:13:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJynRSclua+/4ObcknI2p6wzU/BC42x/bnIQITnHHuSAeq0+zTV4W8PJxbQRFJCbyh+QfrKe X-Received: by 2002:a17:906:2e85:: with SMTP id o5mr41836161eji.521.1609172018574; Mon, 28 Dec 2020 08:13:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172018; cv=none; d=google.com; s=arc-20160816; b=XUlPq/LKTOKUZOGiCowcGJ20coG1OXq6e2gMjYNt6+nAdXO4JECgOOYa4R5CrSh7nY urRGz5woy58lJdj6i571k513Kbiccu/TduLgWF5jr/3xYFONqkO2gl0vNnq7aytCBGIc 0CWw/C0fG3yG1MzhwiQTVcZf1dImmy8OZnQa8vQ6s9dmFg7Unj5ZJJMfhAmqfYEeRrNU VGoC1cXMcGn9c2DqIErJT8nr2CiVobSf/zjU6epq9cmI6MdxrNzMP5N74aL5a3Csfm7f MkR0VSr4FSEYWDH57ezd1+LpkBZTedOuPt4AGj9pkjhoIlaVo15Xb93Gj94evgboT33x Qm1Q== 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=4I6E8+GZ0aFYG5HWXC4Nt2cLFSNY88dvnX8qffqmZcY=; b=uGEUMups/1YZhr1dfhxb5bj/n3kemFMUhrLQpi9dIEs3OU5Rp0Y2KCNY+CIH3FRgSp b9l9Byi4J6nGDjX/xKUxb7dzwnMCXh05lCsDq1KygQLczmu0plcoGRWraIDn0OwxDTmq TJNRsuYMwc57sCy0OaUAw6YGNO8J5M2g8xfkLBkz1tvai1RPnDzUcida/hj2479J3MCv OJXfvKNAczwKGXDKHFVLVVk6+aEeKX255/VsB40pDxEGmi/wUAVTxjGu9LzZBD4z0b8h 4Olnze9p9FdvR3jStzT2ultjs/JrkXjpK/25UVIXntfnUOrFpKeJFCmN7A4dXjTxjgw5 VNBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pAfaNp10; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 m7si20973349eji.682.2020.12.28.08.13.38; Mon, 28 Dec 2020 08:13:38 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=pAfaNp10; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S2394173AbgL1QMi (ORCPT + 14 others); Mon, 28 Dec 2020 11:12:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:49986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388077AbgL1NVY (ORCPT ); Mon, 28 Dec 2020 08:21:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BDE5920728; Mon, 28 Dec 2020 13:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161643; bh=0etdmusmnf4X2h+ukIO8mMSYQ1qCs4MGSkboVyg6GGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pAfaNp10AuJW+d7ZaGf2sMVo2LFaSY5/Gz3UhzA7x5nuQBENOOpCkVkOV5hrORxkU PIxQdMmkybIH6jmT1Q9nOCis3KlVlmhTXu03fiuZ2a2Jc7gZUex87gvWI6y+pTkNw6 3GyZ40qnuEiM+jlfK/Sg4eK3+BRiP+L7AO2U/aOM= 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.19 021/346] kbuild: avoid static_assert for genksyms Date: Mon, 28 Dec 2020 13:45:40 +0100 Message-Id: <20201228124920.796483219@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124919.745526410@linuxfoundation.org> References: <20201228124919.745526410@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@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 @@ -80,4 +80,9 @@ #endif /* __CHECKER__ */ +#ifdef __GENKSYMS__ +/* genksyms gets confused by _Static_assert */ +#define _Static_assert(expr, ...) +#endif + #endif /* _LINUX_BUILD_BUG_H */