From patchwork Wed Nov 7 14:45:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Ryabinin X-Patchwork-Id: 150398 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp5253222ljp; Wed, 7 Nov 2018 06:45:23 -0800 (PST) X-Google-Smtp-Source: AJdET5c1ZPUhV/wG72lejt/ypIi6/hzuMieN/GbDFg+70oU11gw71Q+uL2g1RgH+BerkDA3GudKm X-Received: by 2002:a62:1896:: with SMTP id 144-v6mr521791pfy.88.1541601923624; Wed, 07 Nov 2018 06:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541601923; cv=none; d=google.com; s=arc-20160816; b=rmIwAtLzx16ed2qYjYHhOl0UBNCqqVWZo3gI4VEmg16drI7AqCQANvuyvlKDnu7BEX D9T/a46l5s9mf663n1zfDURYfhVnVnxYTd2XAkpk7XknKBaWFreHI2lPfnI5Owxd3Rrh 2YJqxpX9GRE91VrkLsn0T6mzKgOcpxEEjhvDmFXV4Eg75QkiDDyhqSrDzML8YYLJ0VDg oqXoQvOu5GX6vvokw0NZQhPyYf+eoMy3Lhbnz61kaz3MGRTzZkP3Wft7c7tPfdEyL9vy aRLE93uY5NLJLU0NZ4rkbtMVjgC8tLoJ8DCWdMoPxDdXdiBB167TquI5lGCVoM/SJOU/ ATrQ== 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 h25si744125pgi.474.2018.11.07.06.45.22; Wed, 07 Nov 2018 06:45:23 -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 S1731072AbeKHAQA (ORCPT + 32 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(-) -- 2.18.1 Acked-by: Olof Johansson 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;