Received: by 10.223.176.5 with SMTP id f5csp701345wra; Fri, 9 Feb 2018 05:56:53 -0800 (PST) X-Google-Smtp-Source: AH8x22560fYHnJNqciR23JoxSVXt3sGav91dX4sKMYVBbrpUchJTSXjgE3ys+91tNraJ2muN5oTT X-Received: by 2002:a17:902:a9cb:: with SMTP id b11-v6mr2663785plr.315.1518184613280; Fri, 09 Feb 2018 05:56:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518184613; cv=none; d=google.com; s=arc-20160816; b=JNOW+xLxUI0ph6cs/KbS5m0RBE5asVOvl1Mf6dI81sahV17cY/Dkalm9GjKBItfRA2 xeGN6+aMxcTHK4C5mPjA8Wu815IXhYwVlN+cBaQYJI6rvFyIc/f4S1gLrlP5Yn62bVXp PUS/CC6HL8PliL3keuTXb1s/Pgg7P+03QiA/SFp4yA4AlKBoYBso5wmoyPaIc3HvzqHv oeNFDFysdWLJHIrAX6cstkEgiE56SLr2GwMubpoWZhV9bmy+2/t+I0JlHsT+kvup0VQ3 haHNnqprQScSKnlq7Ht4Lp1niDqQ6E3XUI2Mdw+RHnN1KUqNMpb5zqHtw47SMMQQlkhG bxHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HoHqeQZSLgzXsFBBuKC3E6uVXs/Twb/aNCjO1/iJ6Gc=; b=xKk06AIvjRo+89QDr8KwV2yvQK8asNFA7R9XJtST5ITSsYlOiRB6sKI91AOdvVSwlR njk3jZTFPI2W2VzmDRNFycx+oBU5r8NnPNFc8WdVoorgV+ufekGGvb2YFf1HLZzWrZhk mwC+E4j/IV6A00BSzLPkm1KDZsDXaHd2pIQPG7uyyqNSo7EdgtlkJAvRk3xEu5TPwF+Y LRgO3gItyMRGc8E028qhVS1+DzEbeEs0GiAiLkzNwgKfks32mozp5+cN8V6LJSIzl73O oZDEoacQwIvTWsJ0RswOrI/I5Th8gxk/VDxv0TsSBZTpyPx8IXW1bSq1hor9C58Dj9Y8 pn9w== 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 u29si1414274pgn.770.2018.02.09.05.56.39; Fri, 09 Feb 2018 05:56:53 -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 S1753742AbeBINzL (ORCPT + 99 others); Fri, 9 Feb 2018 08:55:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51880 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753645AbeBINpc (ORCPT ); Fri, 9 Feb 2018 08:45:32 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id E7C7010FD; Fri, 9 Feb 2018 13:45:31 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudip Mukherjee , Alexey Brodkin , Vineet Gupta , Andrew Morton , Linus Torvalds , Evgeniy Didin Subject: [PATCH 4.14 20/22] arch: define weak abort() Date: Fri, 9 Feb 2018 14:40:09 +0100 Message-Id: <20180209133935.599639969@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209133934.024795822@linuxfoundation.org> References: <20180209133934.024795822@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sudip Mukherjee commit 7c2c11b208be09c156573fc0076b7b3646e05219 upstream. gcc toggle -fisolate-erroneous-paths-dereference (default at -O2 onwards) isolates faulty code paths such as null pointer access, divide by zero etc. If gcc port doesnt implement __builtin_trap, an abort() is generated which causes kernel link error. In this case, gcc is generating abort due to 'divide by zero' in lib/mpi/mpih-div.c. Currently 'frv' and 'arc' are failing. Previously other arch was also broken like m32r was fixed by commit d22e3d69ee1a ("m32r: fix build failure"). Let's define this weak function which is common for all arch and fix the problem permanently. We can even remove the arch specific 'abort' after this is done. Link: http://lkml.kernel.org/r/1513118956-8718-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Cc: Alexey Brodkin Cc: Vineet Gupta Cc: Sudip Mukherjee Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Cc: Evgeniy Didin Signed-off-by: Greg Kroah-Hartman --- kernel/exit.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1755,3 +1755,11 @@ Efault: return -EFAULT; } #endif + +__weak void abort(void) +{ + BUG(); + + /* if that doesn't kill us, halt */ + panic("Oops failed to kill thread"); +}