Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3205488imu; Wed, 7 Nov 2018 06:47:48 -0800 (PST) X-Google-Smtp-Source: AJdET5eT9y2Xuv0reiflQ/wfrASWgZ4wrJOrXTHm0i2Z9Y+miqWwJDYFQmkswOMLHHcp4Rgn5fPn X-Received: by 2002:a62:4b09:: with SMTP id y9-v6mr485306pfa.93.1541602068155; Wed, 07 Nov 2018 06:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541602068; cv=none; d=google.com; s=arc-20160816; b=QTBH5RONO7E19TIlxAxhysb5kfi738Pk4ZTxjbDs2NTfYJV8oB1LEhB/XxlxOkwp6V 9NqUErMdSFBaDm4NIYE9X4oQ7d8+pmvqqGUbq0p9bgxnPjuhRw90F0aHv/DKSpQIPJnm VhlNiq2az4B7pK8Kml78CvgMC3ngjlMsdEizfEJ60g4Xk+qNTEf9S2wJnCM9lnQ+aZoj IQop74S07lL4XjQ1TbDedJx02XKmLQ3p/Zdsz7JxoXfsUzg00znyoCVD67vjJ6dbLPbH 4pMi2yHufjZNotHJA71M9xe2EXa/1Lrkkznj1ZEyPz4E1yXrMoZBEn1YNNwVVmUYrp+f LTkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=VEQJbeNAhChQDOVcoIUZaMmGCWJx6urZxmaRIYOVsZg=; b=QjsHnqzZ1TErwxt7HAtXatrkb9fHcwc0DXC0Efw/Oi0/R6Z7EV2s5acoKaAFSREfHx iQ0gjECrb/9/aBX1amIidBHC2hNUK8AJjDyHaxpCi6VNcJuVacUKGGKGKjcZLKA2LUHo 7eaf+iD8lJKIB6E0fIUeyrqwm1z3nnqEpKiyICtOUA/2lqJkGf7B/ciKxOQ4Q5Tt9LmH U4ARf/mBhEKCgveehiBksOvlCGQlgD+INoGTXAiZmdiiqFW4iPchDrbj9MIrzfavCYMD NtLnFcDO+q/epDcklOi+rUGtq8aK8dFcX6BcCNQslj1OLrxH/w3keV8o/pzJ7n0LhNC9 S92g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18-v6si878632pfa.3.2018.11.07.06.47.32; Wed, 07 Nov 2018 06:47:48 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731064AbeKHAQA (ORCPT + 99 others); Wed, 7 Nov 2018 19:16:00 -0500 Received: from relay.sw.ru ([185.231.240.75]:60268 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbeKHAP7 (ORCPT ); Wed, 7 Nov 2018 19:15:59 -0500 Received: from [172.16.25.12] (helo=i7.sw.ru) by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1gKP54-0002vy-SE; Wed, 07 Nov 2018 17:45:19 +0300 From: Andrey Ryabinin To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Olof Johansson , Arnd Bergmann , Andrey Ryabinin Subject: [PATCH v2] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn Date: Wed, 7 Nov 2018 17:45:16 +0300 Message-Id: <20181107144516.4587-1-aryabinin@virtuozzo.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann gcc-8 complains about the prototype for this function: lib/ubsan.c:432:1: error: ignoring attribute 'noreturn' in declaration of a built-in function '__ubsan_handle_builtin_unreachable' because it conflicts with attribute 'const' [-Werror=attributes] This is actually a GCC's bug. In GCC internals __ubsan_handle_builtin_unreachable() declared with both 'noreturn' and 'const' attributes instead of only 'noreturn': https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84210 Workaround this by removing the noreturn attribute. [aryabinin: Add information about GCC bug in changelog] Signed-off-by: Arnd Bergmann Signed-off-by: Andrey Ryabinin --- lib/ubsan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ubsan.c b/lib/ubsan.c index 59fee96c29a0..e4162f59a81c 100644 --- a/lib/ubsan.c +++ b/lib/ubsan.c @@ -427,8 +427,7 @@ void __ubsan_handle_shift_out_of_bounds(struct shift_out_of_bounds_data *data, EXPORT_SYMBOL(__ubsan_handle_shift_out_of_bounds); -void __noreturn -__ubsan_handle_builtin_unreachable(struct unreachable_data *data) +void __ubsan_handle_builtin_unreachable(struct unreachable_data *data) { unsigned long flags; -- 2.18.1