Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2606944imd; Fri, 2 Nov 2018 14:28:33 -0700 (PDT) X-Google-Smtp-Source: AJdET5edavCOnvx31XEtc6is7dWDzlNQLl47he7RCjYW+MekV4fvqPp8OOnjHdmAqiOdiblPN3vl X-Received: by 2002:a62:4681:: with SMTP id o1-v6mr13212708pfi.108.1541194112928; Fri, 02 Nov 2018 14:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541194112; cv=none; d=google.com; s=arc-20160816; b=ceXk1RLXoCFYCzDQsY11hwyY2gu2vRtt0DZIsXFF42WuzmJbjOVHCmypNPghvx3UD/ nRpV1tS9dXykW0VLDcG3G14d2pcDdUIqyNPh/U4ffUFdzfl5ZdPLDARc62NUnEOS0EKk xhlmOWM7/HEiS3Bty1H8PMaAJi6lxOEI/CmWyOv+jsnlHj6EsHmgABZy92kAocikNLSH fW7LjkNL5H4cgREMBq7K2tMVyxlI3I+7q1TFBu6+qk8z0xsAVuDPY9QKmn/6GXgfNzBk zIUB0eC9DbwT0QcNaNblebdV94iqxN5Vfk1XeURBwwLtTxGbUtGITL6afVkNfMcUv9OC Zj5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c5E7BtxCLiFl5MyJ8FGVNz32Q+n/eWWvNnPYa7Z8dqs=; b=lZwSdQaYddvH5xnHsFyR6pTgKiqwMqEpVGyoJr5oP2Hf9u3lZCdHYtDF7aLEepVwFs MjA69vKd+6pPGBRUBW//Me4WpuxbMeZTX6UdrYm7fGpYYDBNjd1iagOxhoh2CCTOtc97 t2r6MxadUjx1peFOVyIfmQBO1QGdQtKOX5+iXdeU00S/q7LExhA7YM1f7FpqJqoqySGZ Y1ViOMSIjjGe7CKo5cj7FAs0MMJD994xNV35acteTg4rZw/rdHBrfml2hJ041v+HQI76 9ni8OjIID/GsdOYgPi8Lx6kKff0LSg5J6kFsF9qrCMFDpBUJY6wCBxM+d6FcIHVBKg5B AQyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=zX82UHJt; 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 a11si9256947pga.198.2018.11.02.14.28.18; Fri, 02 Nov 2018 14:28:32 -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=@lixom-net.20150623.gappssmtp.com header.s=20150623 header.b=zX82UHJt; 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 S1728111AbeKCGgn (ORCPT + 99 others); Sat, 3 Nov 2018 02:36:43 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39676 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbeKCGgm (ORCPT ); Sat, 3 Nov 2018 02:36:42 -0400 Received: by mail-lj1-f194.google.com with SMTP id a28-v6so2934973ljd.6 for ; Fri, 02 Nov 2018 14:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lixom-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c5E7BtxCLiFl5MyJ8FGVNz32Q+n/eWWvNnPYa7Z8dqs=; b=zX82UHJtRDmIzvHOFhMETwpRbeuF8lHC1gvWt8ZVx0b16hw2A5F3kQY0NsFuVE7cgl Kru+7Sc3cB+naovJwtAH+6UI+deFo03z/y9am4sfe26omAZ3VJefEIDu4gQMa8cswdNv Rj232x+j7SGMJBbEqLC0VMTbW60O+JDAnUKHWrH0cgm8XO2dGPg0tib3cUfDZZVY6XSM zao91QL7RMoY6KRjCegRM9fQ2/BiYMbSJN2gznJVNqs/LO5Zixm8rPFLQOPOwaK6X8Ji YhMxYB/3n82SwxGUN/7YJc/+Lof5TaiJ9s9pHKXZ0+yzlE8/qKQbM0gN1C9XhtEkNVWW OBcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c5E7BtxCLiFl5MyJ8FGVNz32Q+n/eWWvNnPYa7Z8dqs=; b=ZRZRHw/p8OOJ6ApVEm2z0rYi8umDwNoS429yURm6yjaGmqtJVFxKAQr2sjAs6gCqA/ MKjyWSZOFT7Zn4HiPHEmZS4NoZQED/yN6f5jlJ+JM8MHMdq3SJT3+bdpTrEqL9fKasO4 SlKTgh4QFU3fntMtjCYoWdGi/f51IsWgjyL/Zsl34stI3dB8n4gdrnzK2Aa+hKTXgxsJ jGqfI9t0qmMqmnwZ5Yu219MIAk5HeLlTHdeaj7mRQ1LhXDciMv4ZOgVMSN//lnNYCM1p Df8eKoVqvVwUiE4vjA6apRGC7bgrKxS+VKvBQGBIe6HiV/tJQJ6Qwl6Tv5JjouXCteIH mhig== X-Gm-Message-State: AGRZ1gIRAaH1B+6E5F4Tt1+aTgrmRhcmxDM/Wi/unNNC0xJoyR7Fnu12 yFjNFKl764fsSu65GmgvwdYjiDPQLy+5tqtSJqMuFw== X-Received: by 2002:a2e:9bd4:: with SMTP id w20-v6mr761818ljj.59.1541194075029; Fri, 02 Nov 2018 14:27:55 -0700 (PDT) MIME-Version: 1.0 References: <20180202154813.1625742-1-arnd@arndb.de> <00813389-daf0-a97f-8642-cb4e7a62fa27@virtuozzo.com> In-Reply-To: <00813389-daf0-a97f-8642-cb4e7a62fa27@virtuozzo.com> From: Olof Johansson Date: Fri, 2 Nov 2018 14:27:42 -0700 Message-ID: Subject: Re: [PATCH] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn To: aryabinin@virtuozzo.com Cc: Arnd Bergmann , Andrew Morton , Stephen Rothwell , Nicolas Pitre , Andi Kleen , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -Olof