Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3202057imu; Wed, 7 Nov 2018 06:45:11 -0800 (PST) X-Google-Smtp-Source: AJdET5efupimg1VTpXH9ejs0ft49fZna81aspAq30XCqPYeE038ibcIyeKmIkeXorLlLzxCBZkPZ X-Received: by 2002:a62:cac4:: with SMTP id y65-v6mr481797pfk.27.1541601911115; Wed, 07 Nov 2018 06:45:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541601911; cv=none; d=google.com; s=arc-20160816; b=EeqEqySqnih3vyyhDD5ZZTs/9c5Z/x60jpfR76kiWpjRkAaXR1JcTukDDDluCDW/ki ujKn+8GeteJqadE4OrPMEV3bnuw2CcsXkuvOVfadWEelRV0SyG+kZHmP8EYyTXPLnzBK PFHqqrxAEEjoiek7frc2aLoTlMKwfH3z24yaypR41y47rlbM/Gulm8esU2A8CzT+ttJR LGAXdyaBTBJp4703eFhsgWm+Nf5oLBzeRfylIHpmpEWwb9a2Bqxe7UJ5PKsYbZxc7Tth uYipoFdoxDEU602ZdWHXCN3tN+k/slfqlXMB6CtEdSqQ+oTfk1vpBkXFmUT2Vn9hkX2O qBMg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=0iIx9CZ+ctDZ6cWjryWd/u0DSPMJwfTVDqeWwRI0nDw=; b=jWUJkTXZPtZ5f8W6HfWghPC7+9oHJ/IrvcnlnlbMPJBMzJupPcS5V9WZdLvPjQKKt8 jfArl15JD2tAROxgQmT/c0S9JrOJ9qdg5FbyIYC5BvADCA4oU3CASd6pz3XxPS+IGvgB dnn6Hcmv8idiJu815nrQGNFBRklHhNp+g62O4quHZuGgnTUfOeRXH1QysoNL7Yc9HwxB h8BWohTE79zfDE0kJsna/L49aYNHdcR3YKiboPQ9lsDDV0A3ahSpjEIbCfdm0Rxhy7LG Kh9VFa++8cuMSq4QhM0Pd4mIUYte0G9Ov4E6zbYqTScSGd4cBS7d2t154ntBPwxAGyMq cWew== 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 c13-v6si921560pfb.155.2018.11.07.06.44.55; Wed, 07 Nov 2018 06:45:11 -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 S1727698AbeKHAPL (ORCPT + 99 others); Wed, 7 Nov 2018 19:15:11 -0500 Received: from relay.sw.ru ([185.231.240.75]:60230 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbeKHAPL (ORCPT ); Wed, 7 Nov 2018 19:15:11 -0500 Received: from [172.16.25.12] by relay.sw.ru with esmtp (Exim 4.90_1) (envelope-from ) id 1gKP4G-0002v8-54; Wed, 07 Nov 2018 17:44:28 +0300 Subject: Re: [PATCH] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn To: Olof Johansson Cc: Arnd Bergmann , Andrew Morton , Stephen Rothwell , Nicolas Pitre , Andi Kleen , Linux Kernel Mailing List References: <20180202154813.1625742-1-arnd@arndb.de> <00813389-daf0-a97f-8642-cb4e7a62fa27@virtuozzo.com> From: Andrey Ryabinin Message-ID: Date: Wed, 7 Nov 2018 17:44:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2018 12:27 AM, Olof Johansson wrote: > On Mon, Feb 5, 2018 at 2:31 AM Andrey Ryabinin wrote: >> >> On 02/05/2018 01:15 PM, Arnd Bergmann wrote: >>> On Mon, Feb 5, 2018 at 10:02 AM, Andrey Ryabinin >>> wrote: >>>> >>>> >>>> On 02/02/2018 06:47 PM, Arnd Bergmann wrote: >>>>> 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] >>>>> >>>> >>>> That's actually a bug in GCC. In GCC __ubsan_handle_builtin_unreachable declared >>>> with 'noreturn' and 'const' attributes: >>>> >>>> DEF_SANITIZER_BUILTIN(BUILT_IN_UBSAN_HANDLE_BUILTIN_UNREACHABLE, >>>> "__ubsan_handle_builtin_unreachable", >>>> BT_FN_VOID_PTR, >>>> ATTR_COLD_CONST_NORETURN_NOTHROW_LEAF_LIST) >>>> >>>> >>>> But const attribute doesn't make any sense for function that returns void or doesn't return at all. >>>> Given that gcc-8 has not released yet, it would be better to fix this bug there. >>> >>> Ok. Should I open a gcc bug, or will you take care of it? >>> >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84210 > > 8.2.0 still shows this, and there's been no movement on that bug. How > about we pick up this patch until it's been resolved? > Sure, I'll add info about GCC bug in changelog and resend the patch. > > -Olof >