Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp909223ybd; Wed, 26 Jun 2019 07:59:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy/GByUDkIwZwPf3pmufALOV9afugfSkKtesvWcFJgh2tNuOqCjvuzTAPThUDMf1LfziNan X-Received: by 2002:a63:6883:: with SMTP id d125mr3387730pgc.281.1561561188324; Wed, 26 Jun 2019 07:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561561188; cv=none; d=google.com; s=arc-20160816; b=SyQbVU5Y4rcMCKcd1Xshq0NdZwaSWokGiCLP9m8MVN5eKj2JjddD9QeEmHET/vvQBR QGxwlv/mF+nPriZzPmeol+IbbYHqe9Kw5wzdH6wJsPTKCWM1LxaoSB1xrhCxiszcTizy vqHAwsbr+SL9VKZO7GBevZjBwj6T/DC7EmRR3rBKMNtK/vAa2FnKIzqlx/MGf1ok5Q/N 8WeITAnTgzTLNwZGUGhMRvA5pYYYXZO0UZS37OaD8ld7lpCkzkkvPEeuuNPYvFsG8gkp h+fXkrNw/6fp8XKnEuXpBEQJ1P+iUVQJcxGeyD6JtsrCU81RC41UbU91RMRvUKZ7oPRc IQVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=vCGEcGrzDi3gfADRbgkNj6AyPiMZ+usI1tY8kft+/5I=; b=bKIpbBuNxcjYUB8U9b+K2kwoDG5i6LBll3md0TAF8nD4ukR4LYIAVfWw5RbC5K5Bq5 E/vG7Nv1S1HRRiejqMHu53sZ9mth9vLCfqDALSX8aR2Ox1DMZrNSHaaiaV70n1g8zkHX MJwNekBBKG49Q7ERvXaz9W/agJhHG9GvLClBpvOirFMhTXW+b3h+/lbGHPmIlH/hEup/ fNkU8DYqUYdQBFxrrt3rB1eSg4W8soIApQXMOyUFuChDqWHStQmCjCmGxpS0O0xBt7+z c5bE9yWyIkrRTHalKiVdRyU2d1QdD6Ck9P++mXuUy7lizPmNz3EV0uBC5rb6wlSqulS/ UZBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si14277179pgs.285.2019.06.26.07.59.32; Wed, 26 Jun 2019 07:59:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727729AbfFZO7P (ORCPT + 99 others); Wed, 26 Jun 2019 10:59:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:55528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfFZO7P (ORCPT ); Wed, 26 Jun 2019 10:59:15 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1098A20663; Wed, 26 Jun 2019 14:59:12 +0000 (UTC) Date: Wed, 26 Jun 2019 10:59:11 -0400 From: Steven Rostedt To: Thomas Gleixner Cc: Petr Mladek , Miroslav Benes , Josh Poimboeuf , Jessica Yu , Jiri Kosina , Joe Lawrence , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Johannes Erdfelt , Ingo Molnar , mhiramat@kernel.org, torvalds@linux-foundation.org Subject: Re: [PATCH 1/3] module: Fix livepatch/ftrace module text permissions race Message-ID: <20190626105911.16b1b225@gandalf.local.home> In-Reply-To: References: <20190614170408.1b1162dc@gandalf.local.home> <20190626133721.ea2iuqqu4to2jpbv@pathway.suse.cz> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 26 Jun 2019 16:44:45 +0200 (CEST) Thomas Gleixner wrote: > > > > It should be enough to fix the original problem because > > x86 is the only architecture that calls set_all_modules_text_rw() > > in ftrace path and supports livepatching at the same time. > > Looks correct, but I've paged out all the gory details vs. lock ordering in > that area. I don't believe ftrace_lock and text_mutex had an order before Petr's initial patches. Reversing them shouldn't be an issue here. They were basically both "leaf" mutexes (not grabbing any mutexes when they are held). -- Steve