From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D91CC33C9E for ; Wed, 29 Jan 2020 02:17:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69412207FD for ; Wed, 29 Jan 2020 02:17:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Vx5C78b7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbgA2CRZ (ORCPT ); Tue, 28 Jan 2020 21:17:25 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:43758 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726401AbgA2CRZ (ORCPT ); Tue, 28 Jan 2020 21:17:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580264244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m+nJONZZoTQaSQ5XpfMtUdufvZ+z5SCiJsRhF9C0wds=; b=Vx5C78b7ZlJ0TXS3cP0gOp0dkTGqPwXGsFOR+GeUA4+vD/v3FEMAFV4dIqd8Glp3/yNoN9 KYnemaMWPgptzG5adTxe4Ep6tb41gY0F/r2mzlpl++5raKpWRZ3EpO/I3WiWFLT3rDFCs5 ygHEzL+Q//4o7ZeT6PJ3YELhm57wG6I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-282-SUZ9hjDgOgiZxJRTzgB8tg-1; Tue, 28 Jan 2020 21:17:20 -0500 X-MC-Unique: SUZ9hjDgOgiZxJRTzgB8tg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9C3A610054E3; Wed, 29 Jan 2020 02:17:17 +0000 (UTC) Received: from treble (ovpn-120-83.rdu2.redhat.com [10.10.120.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEC5984BB8; Wed, 29 Jan 2020 02:17:08 +0000 (UTC) Date: Tue, 28 Jan 2020 20:17:06 -0600 From: Josh Poimboeuf To: Jiri Kosina Cc: Petr Mladek , Miroslav Benes , 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() Message-ID: <20200129021619.cvbsvmag2v4tyjek@treble> References: <20200120165039.6hohicj5o52gdghu@treble> <20200121161045.dhihqibnpyrk2lsu@treble> <20200122214239.ivnebi7hiabi5tbs@treble> <20200128150014.juaxfgivneiv6lje@treble> <20200128154046.trkpkdaz7qeovhii@pathway.suse.cz> <20200128170254.igb72ib5n7lvn3ds@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 29, 2020 at 01:46:55AM +0100, Jiri Kosina wrote: > On Tue, 28 Jan 2020, Josh Poimboeuf wrote: > > > > Anyway, I think that we might make your life easier with using the > > > proposed -Wsuggest-attribute=noreturn. > > > > Maybe. Though if I understand correctly, this doesn't help for any of > > the new warnings because they're for static functions, and this only > > warns about global functions. > > Could you please provide a pointer where those have been > reported/analyzed? > > For the cases I've seen so far, it has always been gcc deciding under > certain circumstances not to propagate __attribute__((__noreturn__)) from > callee to caller even in the cases when caller unconditionally called > callee. > > AFAIU, the behavior is (and always will) be dependent on the state of gcc > optimizations, and therefore I don't see any other way than adding > __noreturn anotation transitively everywhere in order to silence objtool. > > So those cases have to be fixed anyway. > > What are the other cases please? Either I have completely missed those, or > they haven't been mentioned in this thread. For example, see: https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/commit/?h=objtool-fixes&id=6265238af90b395a1e5e5032a41f012a552d8a9e Many of those callees are static noreturns, for which we've *never* needed annotations. Disabling -fipa-pure-const has apparently changed that. -Wsuggest-attribute=noreturn doesn't seem to suggest annotations for static functions, probably because most reasonable setups use -O2 which allows GCC to detect them. -- Josh