From patchwork Mon Dec 14 17:29:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 343568 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3230455jai; Mon, 14 Dec 2020 10:18:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxy1hSqyB2Lc3ccE8EKjNA6U3YKc/OdjmxDLFsam/C6sHavNk6ZHvYmsGKHOO1MRbLHAoYf X-Received: by 2002:a17:906:5002:: with SMTP id s2mr22769564ejj.16.1607969936201; Mon, 14 Dec 2020 10:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607969936; cv=none; d=google.com; s=arc-20160816; b=jvRrCIv8cW12oIa7ObpUzAwMpTiHWbPWu3JoBgYlcIf6UCvszHWWsBIGB5TLMUPIIo hMjENwdaJeyLTAtOxWmQcDN1kQ9qrazHmSipVY6E82+oUxdIJIlPJUCy+E+pEr2p9tHj QbvbyCv2aMwZuQW9semHnFXCqxktSUt0hxgvUSE3nBuHnYFGEiv5pu9DE1N7DbnxtU6t RkJVIGdtAHJstZ8S6WGH7oj8qfJibtDtqB3V0Nge1vtDdYQgXXkfdNF8uqk5kW49m+Fm KOlY0vUESAK6OPMEmAaZGz8Hzf4A5o4IOjxgH6V4NMhB4dYqAa4n45uZf/wQZA96LLry g05w== 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; bh=cHxV9hKGnG+LtvJ3rpAlkKnxslJffSMWcIRg/xuwYaY=; b=k00n4gOXNMsAASEM6yMzQqgBsIS8KSFmf7/2PrDo7+g8Qbob6HPCgXbayB6sxOb4Sh DnX07xkd9v+dHj4s8SQgmnkW4RahigIeKfFLbFTi7wp0nC9jVKEpX8NV3R/Ji9NSI6ap kD1UDrvO4Gta2epiTYaPsl8AJ1TEHPj0wlwbz+3KS1pHsJQK52RjyhPQbJyyPzUeX1iF KPRYz18dAQ8CluyYKl6UG2sgDWT2eh8hzNNRqJtgtOH+LCCScgge4qWJpdOAL6462gIK KlMF2daE2UhrTy7u0/UrsYZAvgy++qZba83MJ7K3baKSMLeW8eaBGBOljkZcB9Lt04bn 2ymg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 lt15si10101027ejb.499.2020.12.14.10.18.55; Mon, 14 Dec 2020 10:18:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440780AbgLNSSr (ORCPT + 14 others); Mon, 14 Dec 2020 13:18:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:49778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502366AbgLNRi7 (ORCPT ); Mon, 14 Dec 2020 12:38:59 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) 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 5.9 096/105] kbuild: avoid static_assert for genksyms Date: Mon, 14 Dec 2020 18:29:10 +0100 Message-Id: <20201214172559.899650121@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214172555.280929671@linuxfoundation.org> References: <20201214172555.280929671@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 @@ -77,4 +77,9 @@ #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) +#ifdef __GENKSYMS__ +/* genksyms gets confused by _Static_assert */ +#define _Static_assert(expr, ...) +#endif + #endif /* _LINUX_BUILD_BUG_H */