Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp58110imu; Wed, 7 Nov 2018 12:58:02 -0800 (PST) X-Google-Smtp-Source: AJdET5f5CUwKhAj1+QSNCJSzxmWAnJb9Eo/hPhrqEwsO1zrUGcRgbiE5T16u0xximcKBk+dN0HJV X-Received: by 2002:a17:902:28a2:: with SMTP id f31-v6mr1856901plb.312.1541624282624; Wed, 07 Nov 2018 12:58:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541624282; cv=none; d=google.com; s=arc-20160816; b=UcVAGjCdccz/5OxA25EHkcBnjZb5m+6pziEDHjK0LznuraOfpkRz5nSIO6cly/mB06 PoC25ARp6XAP0IFhe1k+F6eSPbAMupYyVdu+hW9tqCrcyWEgRJKBteC9OBw3LKYgridM OMNZsgtR/FVDnBkubT0T5GG4CPXgsYnCdc/ttu1XFCrIlPr6S7Fj0OJQsgoxevPUrJga FTsNDSAPEG7AxUDiXUwCoujKKOkhriM0ziUgmGK5BGm40SjD8zsO75ctFDuf9PGIoBnR gyKmS4e0V63NJyxNWTESJexHnbBXUPqG/ys1cK5FukOfdvp+SiwdvHOdtMkyaJijIwZs Xbcg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=tpQUpwJeZGPjtJV2USNGaEDNGy6BZv4O3NfD78UHuCA=; b=mvaxshfT3Omkhai66peet0AT9wLNshNUnnI4cPqgm9XH1YIVvgwS4iajKnmqGavRl8 +IgJ3vKjXUZA9IOIjWzK5eU4KaXKrP9y/2VO2U2yjAf72nMS4HOx3qc08hGLsmWXf5qF DaRXrsMcewNMNr4XsjlCmQyB+ig7h6RHqHuhNVOMj8iXGtxPMSBoNrqjd1jyqT2xaNET IT/QOYTlP2ME4fVMn1Ercu93H81RG+grK8NFEdkYrdaINZMboAGyk//tlx9TWRQmN0tZ rjfmfEo9h265oJr0RSjbP42+JIb8G/c/jUUgfU+qdyKA3jL6coC6RG+ThyUvmdHwHADA sXfw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1-v6si1726692plo.134.2018.11.07.12.57.47; Wed, 07 Nov 2018 12:58:02 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727467AbeKHG10 (ORCPT + 99 others); Thu, 8 Nov 2018 01:27:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:39716 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726943AbeKHG1Z (ORCPT ); Thu, 8 Nov 2018 01:27:25 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 35F34B7B; Wed, 7 Nov 2018 20:55:18 +0000 (UTC) Date: Wed, 7 Nov 2018 12:55:17 -0800 From: Andrew Morton To: Andrey Ryabinin Cc: linux-kernel@vger.kernel.org, Olof Johansson , Arnd Bergmann Subject: Re: [PATCH v2] ubsan: don't mark __ubsan_handle_builtin_unreachable as noreturn Message-Id: <20181107125517.b5677f03a9a1978a5d179c9a@linux-foundation.org> In-Reply-To: <20181107144516.4587-1-aryabinin@virtuozzo.com> References: <20181107144516.4587-1-aryabinin@virtuozzo.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2018 17:45:16 +0300 Andrey Ryabinin wrote: > 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. > > ... > > --- 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; This code has been here since 2016 and presumably people will want to build older kernels with newer gcc's. So I'll add cc:stable, OK?