From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756252AbeBOWgB (ORCPT ); Thu, 15 Feb 2018 17:36:01 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59294 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756203AbeBOWgA (ORCPT ); Thu, 15 Feb 2018 17:36:00 -0500 Date: Thu, 15 Feb 2018 16:35:58 -0600 From: Josh Poimboeuf To: Steven Rostedt Cc: Jason Baron , x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Linus Torvalds , Peter Zijlstra , Borislav Petkov , Juergen Gross , Tejun Heo Subject: Re: [PATCH 1/3] jump_label: Warn on failed jump_label patch Message-ID: <20180215223558.poirr2e6wxs2jhzb@treble> References: <20180214120112.43821b5e@gandalf.local.home> <20180214173407.guhytdurv4pmhzvk@treble> <20180214124034.13d7d833@gandalf.local.home> <20180214211707.hivwfwemghgy62mh@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180214211707.hivwfwemghgy62mh@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 14, 2018 at 03:17:07PM -0600, Josh Poimboeuf wrote: > On Wed, Feb 14, 2018 at 12:40:34PM -0500, Steven Rostedt wrote: > > On Wed, 14 Feb 2018 11:34:07 -0600 > > Josh Poimboeuf wrote: > > > > > > > And in patch 1 the warning conditions need to be tweaked a bit to > > > exclude the __init case. > > > > > > > Hmm, I wonder if we could simply remove the references from the jump > > label table when init is freed. > > Interesting idea. The static key's entries (i.e. tracepoint sites) are > in a static array. Maybe we could rewrite the affected arrays when init > memory is freed. I'm not sure whether that would be overkill though. I > can tinker with it and see how it compares to the current solution. It turns out that something like this is already done for module init code. It doesn't *remove* the entry, but it does disable it by setting entry->code to zero. I'll just do the same thing right before initmem is freed. -- Josh