Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1036812ybm; Tue, 21 May 2019 07:43:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqzB69uZ9S9sjKgaCOpMs28OiqSAOflftYaMOKL1JEB53cf302SW9oQqYouTZyU7gYbGYR6a X-Received: by 2002:a65:5785:: with SMTP id b5mr46699591pgr.252.1558449832575; Tue, 21 May 2019 07:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558449832; cv=none; d=google.com; s=arc-20160816; b=z4zQ+FRllXvqYI2TNgLR3OJOf1EfJVrgpTE/jKKho3SHLoSaaPQN7UvbGd6SaHf5gL UXfi08inl26vayfQPR6DZyGgmCmn13STtt0kIcOcBGDxoLUbdeIVgQs8zY8/HqiPIuLI WYz7RTBWUdjbQJ7dy376rUWBhUMU2i9SrSuIoEbHPcx591wCBsuFzP25ByqJ0lIcP9mb Bx2OW8Q0FvVik+OLkwK2KYK6qHvTAz7cbWFQxSDjp/U9wEvJtCG45GmpfXwHI33P46cQ W96O6jgHzwsfPUB/JQCnQXTbpgTUhZwXvddTW70fMfL83DQsZAdO0Qmzr1r/oDAdTQrq NzXA== 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=hkgsxbNBPxfjfsp695dgwYZFtWSspkO9ai6zJEavpXE=; b=Sn4CJ5U/EdWr+svAOcvtrV+Gju3TL62Y1WJfsMLr/pITIsTlQDfsDYoT0rlsI085mi 6EJjjkuR5A59xLC0Y2GLGasp67nXuOic0Dwxor4OvE56FeKxw3tFZNugU3GdKoDQJEGu 9S/T2wGql0IbUhlUicb6bvnZz4MAN8flQ5p49/blDg1yCyEMl6meb6oELDMaeu0VBiI9 WkgSnrufF+5i/EF9sL/+v2GSnczTEJLdQV9lIRdRxr9x1sGI9qSRKC1x5DyZa1FAaQJW xpWP1XulaOtinegSiypUUXc9HlVD02h3/oDmFGdw3qsvhDHN1ZtbhEi/WbpNCln5qNSS v0WA== 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 p68si19543241pgp.193.2019.05.21.07.43.18; Tue, 21 May 2019 07:43:52 -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 S1728176AbfEUOmI (ORCPT + 99 others); Tue, 21 May 2019 10:42:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:53758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727534AbfEUOmH (ORCPT ); Tue, 21 May 2019 10:42:07 -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 6A2E02173E; Tue, 21 May 2019 14:42:06 +0000 (UTC) Date: Tue, 21 May 2019 10:42:04 -0400 From: Steven Rostedt To: Josh Poimboeuf Cc: Johannes Erdfelt , Joe Lawrence , Jessica Yu , Jiri Kosina , Miroslav Benes , Ingo Molnar , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Oops caused by race between livepatch and ftrace Message-ID: <20190521104204.47d4e175@gandalf.local.home> In-Reply-To: <20190521141629.bmk5onsaab26qoaw@treble> References: <20190520194915.GB1646@sventech.com> <90f78070-95ec-ce49-1641-19d061abecf4@redhat.com> <20190520210905.GC1646@sventech.com> <20190520211931.vokbqxkx5kb6k2bz@treble> <20190520173910.6da9ddaf@gandalf.local.home> <20190521141629.bmk5onsaab26qoaw@treble> 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 Tue, 21 May 2019 09:16:29 -0500 Josh Poimboeuf wrote: > > Hmm, this may blow up with lockdep, as I believe we already have a > > locking dependency of: > > > > text_mutex -> ftrace_lock > > > > And this will reverses it. (kprobes appears to take the locks in this > > order). > > > > Perhaps have live kernel patching grab ftrace_lock? > > Where does kprobes call into ftrace with the text_mutex? I couldn't > find it. Hmm, maybe it doesn't. I was looking at the arm_kprobe_ftrace() but it doesn't call it with text_mutex(). Maybe it is fine, but we had better perform a lot of testing with lockdep on to make sure. -- Steve