Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp58191ybg; Tue, 2 Jun 2020 16:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSptvcvDeZmwXheq3vcZMwvT9Wq57PgcQc05dnnfvVHWhZMgwO4pddZXG05dwWHjyZdh7S X-Received: by 2002:a17:906:b817:: with SMTP id dv23mr25069499ejb.185.1591140079785; Tue, 02 Jun 2020 16:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591140079; cv=none; d=google.com; s=arc-20160816; b=XowsPaTXvByLl58QqlJNpYsvAsHJLuYENGlld5YMcorM62MOLHQ5Zicf2a9zdVrTo8 f/QUJbJq/ml/qCPC47T2SSotEDe4jjZzHaxT/sqPnx3P9KaG0rwKC+BAbCmfoJ/O/ux9 s0rwfcnRZjNf5iKxrxyHhDXsQ1kQ4je0QB8ywOpoZT2WJaN0kGIrG3rne6lQ0lHvwymv Qnq8xZcqiebHEakQvfsyD1py3rGNZMR68eNCbXcIkhThfRNrwQzL2ISh/HpwvRUVPCx4 kfyQF+lpDUsAS+PKk+kYfASF43lts/20XmYrbMjHwe4B1fzQ1AKB00T6AHxDEWrVfCSz /9rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=W6pIMQuCx2FvcQCQIr+mySiEAYaY2PXwWjQI/eEdqeY=; b=GBoW1amjCjJQr63xsSe79y7vXToV41Yac5tKVDjzPXyIF+0NMofYnzrcNrzbwm92tg UyAS9gsy2+6WYnQDDLRwVXYbej0N/mEAgXyZfGeACm4CsNvN8mFXUpqvv6iZfz28lVIY bieJ8grn3JDX+gYnEZY4rV4oCeH02ycvIk6GFF4S2F1Syte4fitQdO8Gt8u0uy/V/pk4 EAOsAZ/Uonc35ersMBVTO07AKiZhlxdf8WiviwzUxxNm+YOMUwOgxpm1kIOTPqfjjHq7 mODQjRQtx6bQSq/h55nHIT6RSYXuAyC2LwpsHVEDHF/2gfLTAfTflue6g1cjkvDutbxo L0PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=onppgC6J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p3si129297edr.104.2020.06.02.16.20.57; Tue, 02 Jun 2020 16:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=onppgC6J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728899AbgFBXKH (ORCPT + 99 others); Tue, 2 Jun 2020 19:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728414AbgFBXKG (ORCPT ); Tue, 2 Jun 2020 19:10:06 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B60C08C5C0 for ; Tue, 2 Jun 2020 16:10:06 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id c35so157149edf.5 for ; Tue, 02 Jun 2020 16:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=W6pIMQuCx2FvcQCQIr+mySiEAYaY2PXwWjQI/eEdqeY=; b=onppgC6JJBYBzWFyOmNgKBH1vmu1Cs42w8mqOWlcg+HN1bjcWX0c0tiQnzlFfJZngF JHW4oxp2ApoR4Z6UinzjT6yd5ILe9EH+IVtO+la5yBYRqn1Mw8ucFAHMs/+xtTgsnyIA NVpXAR2kJJ8mUo6gXEYZQOeapHsUGonOoUyZwbpHQ3EH5c8ZQegLql5WE9tvo34ENB2l UgNHgxvePNoYyxowE8Vea+zG2OQv4ArzgacsBs111wuzgljQNvPAtu+d/4IOiecK9ggb tO6sA2KTJ9zoJb5J+YfFi7ts8Ymx+OnRiIOhQKdin2cUn0M46EcRrXn91NViX+gBNKc/ mcCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=W6pIMQuCx2FvcQCQIr+mySiEAYaY2PXwWjQI/eEdqeY=; b=V8G/hqTA+3gf2fpFqWHd6758unaT5H9XUzsR8avMgm8twMv89bDZERVYmJJzJPGKRK zdtDfIv2AjRK8Zd5nye4l/UbvvOO2AwVg7SKR4LY68PQxxcueqZhirJ8ke/wCfV6n9Lf B+ZeTocUURi/kjeIaHOqHTfnqnFJ0l7mI/yPPJuxE0e15C927vN7uvzvhFfKsYyUJ0A6 QZdh/NaCtDORXtWZ/TmMAsQtDz/VVOCTOkzAaA/TX/gSghbiPzw2ixiMGI6GFEJqnplx CmUFn1pluzF9MW5Ean0LnOqPTmTFqRAT3d9pqugkcGI9MI99P51FwQvl6bXuK0Le007K ok9g== X-Gm-Message-State: AOAM530e8NHgVBTFXfBhDVKOqZDOS+iMzgyKTPioSc1C4Ysm2IAqweHl UETlAMcKh2wtHS2ovj6u8rI= X-Received: by 2002:a05:6402:959:: with SMTP id h25mr28038748edz.287.1591139405175; Tue, 02 Jun 2020 16:10:05 -0700 (PDT) Received: from ltop.local ([2a02:a03f:b7f9:7600:6c14:f667:d8de:40c1]) by smtp.gmail.com with ESMTPSA id 64sm109524eda.85.2020.06.02.16.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 16:10:03 -0700 (PDT) Date: Wed, 3 Jun 2020 01:10:00 +0200 From: Luc Van Oostenryck To: Steven Rostedt Cc: Jules Irenge , linux-kernel@vger.kernel.org, tglx@linutronix.de, paulmck@kernel.org, mingo@redhat.com, boqun.feng@gmail.com, Borislav Petkov , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" Subject: Re: [PATCH 4/5] x86/ftrace: Add annotations for ftrace_arch_code_modify_prepare() and ftrace_arch_code_modify_post_process() Message-ID: <20200602231000.6pfrgdgm4vd7sbvn@ltop.local> References: <20200601184552.23128-1-jbi.octave@gmail.com> <20200601184552.23128-5-jbi.octave@gmail.com> <20200601154647.581fa345@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200601154647.581fa345@oasis.local.home> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 01, 2020 at 03:46:47PM -0400, Steven Rostedt wrote: > On Mon, 1 Jun 2020 19:45:51 +0100 > Jules Irenge wrote: > > > Sparse reports warnings > > > > warning: context imbalance in ftrace_arch_code_modify_prepare() > > - wrong count at exit > > warning: context imbalance in ftrace_arch_code_modify_post_process() > > - wrong count at exit > > > > The root cause is that even if > > the annotations on the function are correct, > > mutex do not support annotation Yes. > Wait what? This looks like either a bug in sparse, or we just remove the > annotations. This just makes the code ugly, and looks silly. The annotations added by commit 074376ac0e1d ("ftrace/x86: Anotate text_mutex split between ... are indeed wrong (because they don't match what the functions are really doing / mutex operations have never been annotated). The're also pointless since their prototypes are un-annotated. -- Luc