From patchwork Fri Nov 16 23:08:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 151390 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1003977ljp; Fri, 16 Nov 2018 15:08:39 -0800 (PST) X-Google-Smtp-Source: AJdET5dfJr5GM1JuknkL+ufrjx9tTVh3f3LI6/EnD1Zc62oGi+U47yRNUCZI3c6cJ1DoHjy1zvDV X-Received: by 2002:a17:902:f20b:: with SMTP id gn11mr12184401plb.93.1542409718889; Fri, 16 Nov 2018 15:08:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542409718; cv=none; d=google.com; s=arc-20160816; b=W0JTPu+RK0+mTcXMVZiKoeXwMCTrvTCYVphMVdRxD4kKdfVpuEgjEFQPSo4HhuS/6y F1Hv2A225gDPQEnUXRTmIoVaNDudK3yy6RW2YwMDM38iXczDJiY6fx6KzwVZEboCNQLJ W3A70D6/apiqb3DSVbHyCIAVe+M3IaiD9BRb6oKGUNkB9zrKLuFYfXvtvGoDtPyWybvl YsCvFprVy7O+ARIm2XhEZNiXbESqQxTaPX3YM5+6Nptkp4Z+KZ8xbsTiaxIHYXpdP861 7OgU4VSJ816imn9dP0uR3CkuTYsckkEG2AdNZe3YHZNstAQFJJ2Eqd9unWc0REeTtrxt 13lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:subject:to:from :date; bh=4ZGXW1QsLxoIXv5UC4k0h0R4npzpOhRw9jILT0RqKRk=; b=gUN4SFgfUq2dk+BA/aa8KqGb00DqBzHigsimjIaHUOnCCObHavU6OLNDQcQ49PY86d PZh2J655ara37+3ocsD1O5Hm7W4erX14I8VETfH8+mZlMd+w8etOcCMW9tZk1I3RR8Bo C1pmOXYIBrAuJubdFDOzVQ16wsgpYMWTEuWv64gqiflCz52lYgct2l+Ax6cN26vk+j9S UHV5XS+MZWYkJZkgRx3asaOD2RjQZDYw215kOj5CTW9rtKlP+9caeGTxddQU+GhNIUqf vM9KdcEBO1BhVqDvAbxTfthbVkI4VOcBCT6S9pQRb4x5nZykheY54uwhszebrd8PPEfe D+cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 o19si10290177pfi.261.2018.11.16.15.08.38; Fri, 16 Nov 2018 15:08:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730545AbeKQJW4 (ORCPT + 15 others); Sat, 17 Nov 2018 04:22:56 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56602 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbeKQJWz (ORCPT ); Sat, 17 Nov 2018 04:22:55 -0500 Received: from localhost.localdomain (c-24-6-170-16.hsd1.ca.comcast.net [24.6.170.16]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 191F0A5E; Fri, 16 Nov 2018 23:08:37 +0000 (UTC) Date: Fri, 16 Nov 2018 15:08:35 -0800 From: akpm@linux-foundation.org To: akpm@linux-foundation.org, arnd@arndb.de, aryabinin@virtuozzo.com, mm-commits@vger.kernel.org, olof@lixom.net, stable@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 12/18] lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn Message-ID: <20181116230835.juvd8JowX%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann Subject: lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn 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] Link: http://lkml.kernel.org/r/20181107144516.4587-1-aryabinin@virtuozzo.com Signed-off-by: Arnd Bergmann Signed-off-by: Andrey Ryabinin Acked-by: Olof Johansson Cc: Signed-off-by: Andrew Morton --- a/lib/ubsan.c~ubsan-dont-mark-__ubsan_handle_builtin_unreachable-as-noreturn +++ a/lib/ubsan.c @@ -427,8 +427,7 @@ void __ubsan_handle_shift_out_of_bounds( 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;