Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp801923ybg; Mon, 1 Jun 2020 15:04:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrYow6Ycbd05lcxnHwgApLlx88kkEfa79sQuY0y5I79Z9cnI7V2O+L/993PxNg3c2HMXns X-Received: by 2002:a50:b961:: with SMTP id m88mr24085797ede.4.1591049051632; Mon, 01 Jun 2020 15:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591049051; cv=none; d=google.com; s=arc-20160816; b=nbMGEnQX0hqBtO7rimxpgUB+vHGtP3aiw5hUBPQWFcnYsdBQ6XIh9gWtuZUtBY1oji p3QZv+gzomrLlOVNPVKlnIo7WIgCOD0A5rDOIDTmvQPGVGlYMQNyyB8cfBnv+BAzFpkd 8j15PcSCC9I5iSYCoxOGubvKwD0oKy+noscmDmpJaoVclD9VZm//ahfsZa6kXHI3sIpE T0HkGoV1RK9W0ELb5l5a6R7XbCpBBgKCwnts6f6NjQJHAj+aivUORZ4sOQKewzHj8MCz a1Zrl34/GHL3fbPP2lx8yRTSnBVIuhezkmFFcPgbGmwDi8lxbzw8uGm33rck0bFECPHj C+Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:date:from:dkim-signature; bh=IehB16ofl2ZisYz7uWBSmj+l64Pb8TcSH/YFdQJ1EqU=; b=kU73++P516RE0tHb1vTXFmiIE0e3z8SlfJI8fayiqUrurCRZ4jexyl8PFKzfbJAacP J9qv3BJ7P0zbRJc/+hif1YBTuv1WJBAJsDsG4X0PpePFEHSmnEZqVz25eAIFUJ8s+fUU Oxcom06MnWo6ncdnodAXkg40HpDUxBmTBrgIhoUwxYO2FN+F9m2u2DRFOYhrHN2/xgE7 Jzdyn0J7bmuIHa3MJMxsoHhdTZ/Uvc/I6dZG8jkv8KPnbL9ko4v2MRFwC3FjIJ/ttz9p UNC7ktmC0QAQ9v6uC3avz621qMUM1jn2SSVB/cxxjOsDq2jAMVwo/HBn/CIQ39O7oDS1 59Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qnYkuHEN; 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 j93si353859edb.331.2020.06.01.15.03.49; Mon, 01 Jun 2020 15:04:11 -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=qnYkuHEN; 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 S1728937AbgFAWB7 (ORCPT + 99 others); Mon, 1 Jun 2020 18:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbgFAWB6 (ORCPT ); Mon, 1 Jun 2020 18:01:58 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4243C061A0E for ; Mon, 1 Jun 2020 15:01:57 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id x14so1368300wrp.2 for ; Mon, 01 Jun 2020 15:01:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=IehB16ofl2ZisYz7uWBSmj+l64Pb8TcSH/YFdQJ1EqU=; b=qnYkuHENPemrBrlTtRR9gi8u2PI01ntZSyA1KQRr/H+OsjAScQxABBcGMga3dPHBXF B5rzYp0EZkBZZ7oM0VaSkhWPHp5zlfBv9WEgX/QZWiGyPG2x/DfuNR9Ui7Z0rdxr7GPV 53s8NVYi/UhvexR/LhNeT34HD9E4r9zrHH9EyDHey1agJ9zwL75vdR2QwA7EC5W7lAFa BZIvtUlPyV0pzKxqPueB2bWTeMgXAOV+IQFF6UNnXO+SZiQgy948PFkWRwZPyJHwS205 xJ2woveqiw4yPN3xKPZ9Au92uyX6LwX9ghrWSyymfEsyuyI5qfANUSbFX/FwsOizdGz8 4N8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=IehB16ofl2ZisYz7uWBSmj+l64Pb8TcSH/YFdQJ1EqU=; b=G1KT2093DC55Y+1kvd0oj9SxJo+p3qGEbRkA1zduBhCpRVD8bmw9hMLxOwsT+JKALK /9mR23aPXEejRSSHo4pgQ5Ff3wStPWNotj/Va+pBNimR9wyfKQ1E6v/ipUXr/Zo3M9K0 CxvOz70actZNkzMFTZOWhM2ZBICJrXtQcLvhJQByapz8UFj1x7Q8O4FBAtbDp5Xr5Ur5 +n7pNvFuDBVN9RgUzqP408dJ4+xonVGR/9xRCWOQofaDKjsx6c/2sz9Q277/N4sHrbWq OVkNOD3O0RKngx/Y2tCvl+fTQYRMbYYJJgnk4nOf4e5GB8YnuLqF1qCI/oQ4kCgRY6Dy i31w== X-Gm-Message-State: AOAM53364gvzr/d6BciX7QDDksbUuZwqeq5RgcH/VHWC2ls2FdBiv2qN xJyM1ez8vfG3Sl32uYii2g== X-Received: by 2002:a5d:6751:: with SMTP id l17mr25377462wrw.179.1591048916188; Mon, 01 Jun 2020 15:01:56 -0700 (PDT) Received: from earth2.lan (host-92-15-172-76.as43234.net. [92.15.172.76]) by smtp.gmail.com with ESMTPSA id v2sm1018113wrn.21.2020.06.01.15.01.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jun 2020 15:01:55 -0700 (PDT) From: "=?ISO-8859-15?B?/YCAgISB?=" X-Google-Original-From: =?ISO-8859-15?B?/YCAgISB?= Date: Mon, 1 Jun 2020 23:01:15 +0100 (BST) 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() In-Reply-To: <20200601154647.581fa345@oasis.local.home> Message-ID: 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; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Jun 2020, 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 >> This makes Sparse to complain. >> To fix this, >> __acquire(&text_mutex) and >> __release(&text_mutex) annotations are added >> inside ftrace_arch_code_modify_prepare() >> and ftrace_arch_code_modify_post_process() >> respectively. > > 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. > > Nack! > > -- Steve > > > Thanks for the feedback, I take good note. Jules