Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2647100ybh; Fri, 24 Jul 2020 19:45:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyifKlw9K9LTg0/jx2r5sE0RLpKjqDgmoJvhbS0IhCWefe2/Oul6k0ZwPogdJNE9P559OK8 X-Received: by 2002:a17:906:b2d2:: with SMTP id cf18mr464638ejb.551.1595645129446; Fri, 24 Jul 2020 19:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595645129; cv=none; d=google.com; s=arc-20160816; b=xjCjUvPcVgXzxTraYllZY5tBxOqjXajBlG2aN0/O0wRtSreUUoMjxn9WO70M/9rt/W YtWgmzEb8JTiASeC7K7Ll4iZkTK0MR/Sl/9dwgmlZ4w4G5w0Tt+TVnTtc3UmDhd7gmop 3XO7GReCw8L2Yj6rtdmcYDaoLQeKZh0ZO7aPWmD/3N5SFSHTOFpAmG1i2UenGD4L0HYy 0PSqrc0dT4whLk947irwawRbLGbJsMo0qrn4FFLqQQtGUXwxIDNniRcTArc1vqnTK9tB +8K/78lknStU+Jcv1S1L8reWEWemPa78vRDPvBRTozX0FagOLrM3Sk7AToVDH1RJxB3c LcpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=2HPWptRn48gvYizC3Z8JERtILTilGkfNCULR0M4/yYc=; b=o0SYa+F9qnzn0n6tOx8TGGfC4RTPiI5EwHc0OuG5Ni+P+8VfR/73znQnf3DdbS59dq lxOV3cWASYH34woLWbAf1s+9Y2w+byWGyhdZ0MKnwYKmKQUjY02AqZExiBZ+LitiRM1Q a2c4n3IeXSKxfndFfK6c/TI8cV8CQDl+R+nIUwlsOakpKoHUe2GQE6izVgH2t5ELYz9S Jkf/cATlGjP+b0LYDOyFpivJtW60qyZZ71Cv74s19skhrbo2N53ET2IL0yEBl3svU5An BTwwVSM1pdT72IwRc5ii2byXd3pJ8FOi4opqL4/XTFA7dvs/+GqAq1O9U1zkSvWB2rZ1 8U1A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c9si1610493ejb.631.2020.07.24.19.45.03; Fri, 24 Jul 2020 19:45:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726613AbgGYCmg (ORCPT + 99 others); Fri, 24 Jul 2020 22:42:36 -0400 Received: from mga06.intel.com ([134.134.136.31]:54897 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726493AbgGYCmg (ORCPT ); Fri, 24 Jul 2020 22:42:36 -0400 IronPort-SDR: goKgeQwo2mOtQ0JcjcK5wxvYRoRlpK9oiSZ70GbJQrP8olXCdKR+wilpVtUoRCrcbgp4LWXO+A 6eAPgcj9XHgw== X-IronPort-AV: E=McAfee;i="6000,8403,9692"; a="212347667" X-IronPort-AV: E=Sophos;i="5.75,392,1589266800"; d="scan'208";a="212347667" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jul 2020 19:42:35 -0700 IronPort-SDR: ArZtovrTuEknoHpXF3r2UNSBsH29C8gxRtnXKA99J97c9grFiVIGXA6lSXuZzbVr3eB2unn4z3 duHothXOFaxw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,392,1589266800"; d="scan'208";a="272738452" Received: from jcrametz-mobl.ger.corp.intel.com (HELO localhost) ([10.252.58.73]) by fmsmga008.fm.intel.com with ESMTP; 24 Jul 2020 19:42:29 -0700 Date: Sat, 25 Jul 2020 05:42:27 +0300 From: Jarkko Sakkinen To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andi Kleen , Peter Zijlstra , Masami Hiramatsu , Jessica Yu , "Naveen N. Rao" , Anil S Keshavamurthy , "David S. Miller" , Steven Rostedt , Ingo Molnar Subject: Re: [PATCH v5 1/6] kprobes: Remove dependency to the module_mutex Message-ID: <20200725024227.GD17052@linux.intel.com> References: <20200724050553.1724168-1-jarkko.sakkinen@linux.intel.com> <20200724050553.1724168-2-jarkko.sakkinen@linux.intel.com> <20200724102258.GB2831654@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200724102258.GB2831654@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 24, 2020 at 01:22:58PM +0300, Mike Rapoport wrote: > On Fri, Jul 24, 2020 at 08:05:48AM +0300, Jarkko Sakkinen wrote: > > Add lock_modules() and unlock_modules() wrappers for acquiring module_mutex > > in order to remove the compile time dependency to it. > > > > Cc: linux-mm@kvack.org > > Cc: Andi Kleen > > Cc: Peter Zijlstra > > Suggested-by: Masami Hiramatsu > > Signed-off-by: Jarkko Sakkinen > > --- > > include/linux/module.h | 18 ++++++++++++++++++ > > kernel/kprobes.c | 4 ++-- > > kernel/trace/trace_kprobe.c | 4 ++-- > > 3 files changed, 22 insertions(+), 4 deletions(-) > > Any reason to convert only kprobes to the new API and leave others with > opencoded implementation? Not anything particular. Lets see: $ git --no-pager grep "mutex_lock(&module_mutex)" arch/powerpc/platforms/powernv/pci-cxl.c: mutex_lock(&module_mutex); drivers/gpu/drm/drm_fb_helper.c: mutex_lock(&module_mutex); include/linux/module.h: mutex_lock(&module_mutex); kernel/livepatch/core.c: mutex_lock(&module_mutex); kernel/livepatch/core.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); kernel/module.c: mutex_lock(&module_mutex); I could refine this commit to patch these sites. Or should I split it into multiple? /Jarkko