Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp899951yba; Thu, 18 Apr 2019 11:27:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKAXU0t14Bap6/ki+fBMC8jaY/MZjVrSiFPD8VxYymUOyKvNNorX+CKu57KqULjGx80wpy X-Received: by 2002:a17:902:b717:: with SMTP id d23mr94031951pls.260.1555612038935; Thu, 18 Apr 2019 11:27:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555612038; cv=none; d=google.com; s=arc-20160816; b=XaWNaeRahnLqt+v8HtMIZRx7Bqd8hS39Ap0klW7nJ7bM/W84kopeUaxZioY9aLKiWh Gut+0qcoaVtsAm17uWMVQSF2Ctp0c9J6MdAiAhqgAn1Jy4Unqn9KvBE610FT2mK5YGp3 3hwR1l0UkR5IFhSomXBOFRpKt+kALaHLLdjzh2ZtyyMEMhwnI6OnrUxAfuYgDsaxdkCT q+1vaPh0KqQ6s5hGvF0tpdfGHbnC2rWwgct9tueEE4+W25e/Lr75aNz6mOx3k/VpCTZ6 YTYde48Ka3Q7imQOYDNi78X1YaJ0LqdB+C8+yBc6jYxFpc77LIffkXw9KC3W4alkmt4q Qvsw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=i5PMnxVMbOH1R1/L72D0ZfZSwmFHhNGBQgq9sKeu7WA=; b=wD0E++b+7g4HUXzSoGeM9U3hHV1+PH84j7vWzToD22LW5BbR32aXIn1C7lg0aqlNkQ A7AD6VyGI1/zUi3VYmXwu+kUAJz2+nU6KSBoapiTlJ/OiTJgDf0y9pmVVkhw+Xk8sdg2 xiXf5TIzyWM71XPjUmQC8piNLXki+mzAuYgSh1SXc6hovZ1eT3oExwe48Ju6wEmBFjBy j4b07mv1nZvw21rchpH0MjsLvz1nUVkaMe/vaE0iz4fsb383ixt2daRbYETSw4QeNozB Hvqn2OS4Hb5lKD5ttEohbV9wxtS8wv/U3nBXxrPssX3pdl/KGPsoRVDqVsSOCjQYjYrx tIxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nBp+F45x; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si2761441plp.239.2019.04.18.11.27.04; Thu, 18 Apr 2019 11:27:18 -0700 (PDT) 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=@kernel.org header.s=default header.b=nBp+F45x; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390988AbfDRSZ7 (ORCPT + 99 others); Thu, 18 Apr 2019 14:25:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:34224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391176AbfDRSFC (ORCPT ); Thu, 18 Apr 2019 14:05:02 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 107C3217FA; Thu, 18 Apr 2019 18:05:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555610701; bh=HL6exLtOGefw0CGTJO3mTSTmXRcAQR1Qmvdgd85ISQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nBp+F45xNKbzZGgpGslRUf0/x8stdIpnz/mzFeFeHqJmLTcOAU9bD65Tju9cJPzpq zJwCByGVueBruE/ptrb9mWyJpU8nvY1RH/nzS7uhYf7VBxqoIeE0S17a4TLOylfPXN ItsAhjblLL96EMrkI66z9T3qVHfHTA+HKQDfIg+o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Lutomirski , Josh Poimboeuf , Nathan Chancellor , Nick Desaulniers , Miguel Ojeda , Sasha Levin Subject: [PATCH 4.14 52/92] compiler.h: update definition of unreachable() Date: Thu, 18 Apr 2019 19:57:10 +0200 Message-Id: <20190418160434.609303304@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160430.325165109@linuxfoundation.org> References: <20190418160430.325165109@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit fe0640eb30b7da261ae84d252ed9ed3c7e68dfd8 ] Fixes the objtool warning seen with Clang: arch/x86/mm/fault.o: warning: objtool: no_context()+0x220: unreachable instruction Fixes commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Josh noted that the fallback definition was meant to work around a pre-gcc-4.6 bug. GCC still needs to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365, so compiler-gcc.h defines its own version of unreachable(). Clang and ICC can use this shared definition. Link: https://github.com/ClangBuiltLinux/linux/issues/204 Suggested-by: Andy Lutomirski Suggested-by: Josh Poimboeuf Tested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin --- include/linux/compiler.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index a704d032713b..67c3934fb9ed 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -119,7 +119,10 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, # define ASM_UNREACHABLE #endif #ifndef unreachable -# define unreachable() do { annotate_reachable(); do { } while (1); } while (0) +# define unreachable() do { \ + annotate_unreachable(); \ + __builtin_unreachable(); \ +} while (0) #endif /* -- 2.19.1