From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751433AbcEPVkk (ORCPT ); Mon, 16 May 2016 17:40:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48943 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbcEPVkj (ORCPT ); Mon, 16 May 2016 17:40:39 -0400 Date: Mon, 16 May 2016 16:40:38 -0500 From: Josh Poimboeuf To: Jan Beulich Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] objtool: cope with pre-4.5 gcc (and non-gcc) Message-ID: <20160516214038.6od5wps35fxareys@treble> References: <57358FDA02000078000EB174@prv-mh.provo.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <57358FDA02000078000EB174@prv-mh.provo.novell.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 16 May 2016 21:40:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 13, 2016 at 12:27:06AM -0600, Jan Beulich wrote: > The kernel's unreachable() translates to __builtin_unreachable() only > for gcc 4.5 and newer, and else expands to an infinite loop. Avoid > "function has unreachable instruction" warnings for this case by > inspecting the instructions immediately following the UD2. This cuts > down the number of files getting such warnings by about 99% for me. > > Signed-off-by: Jan Beulich Thanks for the patch. I'm wondering if we can detect this situation more precisely, maybe by adding some kind of annotation to the unreachable() macro. Will need to think about it a little more... -- Josh