Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp484611ybl; Thu, 23 Jan 2020 02:21:14 -0800 (PST) X-Google-Smtp-Source: APXvYqzTXHtB5GdmKsebMvHbkR+CIfOmaGe3FaHVS3us2l1U0mYW/TDbsf6pI2fXineZGQ0+2aR3 X-Received: by 2002:aca:503:: with SMTP id 3mr10181090oif.106.1579774874384; Thu, 23 Jan 2020 02:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579774874; cv=none; d=google.com; s=arc-20160816; b=AMq+cyBYOOCytB5ajhVUVhM7H7XFuQPKyfIu7I2wxue8bkiyf4L6zdD6ZnC+TF7wOK xahFP7KuT+7zaqOBdCI4hd9Sn+vNh7wuy5mhanhHTvh8bZw7JVRvCuj2FbsL8fxZVcl4 GDzCQEpV82Kp0m1EigNDnRtsErxTZSLzc/PwpZy33N0EbcGXnK2D1DyPwQxhIQjPoNTU OhzszTemANI7hTqcct6kSCaxHm0jwRG72KqAh/KXiwJENM5UXHYBgIyOYOiWrpXuFdr7 UuxN1EiwtnN7qCY0EfTm6khN6vUgU+oYatNpN/vMVbOa8FID250rbgvexsBxWu8ZnSVC U4Kw== 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 :message-id:date:user-agent:references:in-reply-to:subject:cc:to :from; bh=0D2xji0qhW7xfUp+1cTwoHAlfE+0FL4NUaw/KZUNAcU=; b=lRlxecCtzj0YACSphJwK0KK8CgETBsXaUzb+Z1KsLBUD1J+1Lidy0SIfV6S7Mr8aB/ 3+Qy1SzJT81390VByJnWavd1AIPpNPvQoTHeNWUEubLyeXz37VqnCkGGrRaSoj6EXpD7 lEJc/ioFztHVxAN3LIB4KVV4MXVD4BThj12sdYcjaaKfhAB+oQX6I3PoKJGeFWxthZPP NtyjligsLkNn/1E1e6AIzkJpyh7TTfs8A7nsvkI95gYvgHihU/wermnWR//YqAhAXeda PYBxyg1ADMG65oLNYUN5SNc4lHwLJB3Y7abHjTI4FwcJHEjTo9xxYseCK4VlrheeIdOv uUUg== 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 d20si894312oti.311.2020.01.23.02.21.02; Thu, 23 Jan 2020 02:21:14 -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 S1727278AbgAWKUC convert rfc822-to-8bit (ORCPT + 99 others); Thu, 23 Jan 2020 05:20:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:47678 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbgAWKUB (ORCPT ); Thu, 23 Jan 2020 05:20:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "Cc" Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 71C22B1EE; Thu, 23 Jan 2020 10:19:59 +0000 (UTC) From: Martin Jambor To: Josh Poimboeuf , Miroslav Benes Cc: Peter Zijlstra , Steven Rostedt , Joe Lawrence , Jessica Yu , x86@kernel.org, linux-kernel@vger.kernel.org, mhiramat@kernel.org, bristot@redhat.com, jbaron@akamai.com, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, namit@vmware.com, hpa@zytor.com, luto@kernel.org, ard.biesheuvel@linaro.org, live-patching@vger.kernel.org, Randy Dunlap Subject: Re: [PATCH v3 5/6] x86/ftrace: Use text_poke() In-Reply-To: <20200122220350.zvwyrkip5mvv6j7g@treble> References: <20191015153120.GA21580@linux-8ccs> <7e9c7dd1-809e-f130-26a3-3d3328477437@redhat.com> <20191015182705.1aeec284@gandalf.local.home> <20191016074217.GL2328@hirez.programming.kicks-ass.net> <20191021150549.bitgqifqk2tbd3aj@treble> <20200120165039.6hohicj5o52gdghu@treble> <20200121161045.dhihqibnpyrk2lsu@treble> <20200122220350.zvwyrkip5mvv6j7g@treble> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-suse-linux-gnu) Date: Thu, 23 Jan 2020 11:19:58 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Jan 22 2020, Josh Poimboeuf wrote: > Global noreturns are already a pain today. There's no way for objtool > to know whether GCC considered a function to be noreturn, You should be able to get a good idea with -Wsuggest-attribute=noreturn: $ cat a.c int __attribute__((noreturn)) my_abort (void) { __builtin_abort (); } int foo (void) { return my_abort (); } int bar (int flag) { if (flag) foo (); return 4; } $ gcc -S -O2 -Wsuggest-attribute=noreturn a.c a.c: In function ‘foo’: a.c:6:5: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn] 6 | int foo (void) | ^~~ GCC 9 and newer even have -fdiagnostics-format=json if you are into that kind of thing. Hope this helps a little, Martin