From patchwork Mon Dec 28 12:46:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 352622 Delivered-To: patch@linaro.org Received: by 2002:a17:906:4755:0:0:0:0 with SMTP id j21csp9886037ejs; Mon, 28 Dec 2020 05:09:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrxYwxcLW6eud0kyqXNxwcE05AbhZDijVHDHqSJMQR4aU4LT+O4n937pHkRoct3aQHCRKz X-Received: by 2002:aa7:d354:: with SMTP id m20mr41386691edr.195.1609160954141; Mon, 28 Dec 2020 05:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160954; cv=none; d=google.com; s=arc-20160816; b=EgvZB1tW5Z+7R5ydIXHKHmTPt6UYOAt3BbDEdCtb4AL9np2EYSE1PoiDpNHVT3MXl3 i6GdvZ3dm9w0ELorgOVCSX2Pn5aQgFkgKR+MHOFcF+vQ5sdabuw33bFRHbJa4a4pF7HS ghX3o1JUX/nIKumvq3Aeaq2eN9xc1lbIQtyzbDkPKDE+38rQTzGslf9Bh409tJJPitTa oI6YWNYpqn05QeCVKLy8KKZ1VkSCZ6oLpu9Zs4zNje6TJ4KRtPAHK8I0VDD09u5Grbj7 swXCL7Mn0zlRnmQu1DN6uJaFysyrKBAdEPmo6qryilEzzFTcV4pIJhan81DAug5YmGVr OmwA== 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=iR/kvwql/C3/yIsyWp06rjWaQGGOSZ7dJONJJSfibHxZntncbKUqmrpU+K+CIXevgy tarNWUNaHJS34Vg9tcMZfcZ/prS5q5g6LSE3DU2mLDrA7vSwJyGktW9Wheos3UQ2StDr kRQFs/dR2T1KvqkfvIbY/WSFnb9vEwADhXANxJVq98MYEvIDWv3lKWAjflXBT/tpyuk+ J1jVOv6XuTJoNXlBfiHb4wo0abxqxOtoJuYacIorXey0d1x9uALj4d++SrHbPMgkyLfb UZZ5LEd0B92mg54H+7vrkriboaM7IlqEYLSjUAbeowxM2B5Z60fXQ+pSggD0xkOh4S3u KNPw== 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 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 j24si14110868ejx.278.2020.12.28.05.09.13; Mon, 28 Dec 2020 05:09:14 -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=S1uqwuLM; 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 S1731073AbgL1NJJ (ORCPT + 14 others); Mon, 28 Dec 2020 08:09:09 -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 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 @@ -82,4 +82,9 @@ #endif /* __CHECKER__ */ +#ifdef __GENKSYMS__ +/* genksyms gets confused by _Static_assert */ +#define _Static_assert(expr, ...) +#endif + #endif /* _LINUX_BUILD_BUG_H */