Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1038708imm; Thu, 6 Sep 2018 14:19:59 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0YkkTW1RCwqkeJ9+55UcqLxcHotbKWWQFjxDFwANHMAnfEqUoWmDxqM+Nf3Ruo+3mjlSr X-Received: by 2002:a63:352:: with SMTP id 79-v6mr4971155pgd.112.1536268798919; Thu, 06 Sep 2018 14:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536268798; cv=none; d=google.com; s=arc-20160816; b=uywd1jcveR/iYSv0qx0zasiUdrMK8AIvr1/2OsS5Buq8jfsFyVm9/WjP8t/5cYtLvj 3ZIm+Olx9v8RKmdoeBJvXU8jNaOdaHPBCzhCTVGe8Dv3FLFbaICyeaphQSDVMrrX+WOf Ob9h8bQLpXWKZ4614F87cuYbLfIfvBKMk34welX5JXK0rtzG5bqvtJKW6QexMweC9RGV tT1hU4BVxhJj7KtVuV1SFO2ASfxDKNBb+zHUK+MbYODqNd/1HKvF6Rw0FA6h+EiXtZBL Pm0u4+MgtQ/H9S4icBKhKTx7jcKq/ksnSkiDjVefp3RSkU+A7/CqcsYmhA/WJM+S5EYf G86Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=m2Teqc4HPCZubJa8izPLnuuSwSjvWKg5FLI5abcFF80=; b=TWIpvfQCIMQ4dYP8r/h9iery9kZ29zOXYExl83WPIXtrpbVhoQ4CcjWQJuWzA4R6J4 q8AC39M2cfB2NPcdgBii2msZSoi4pAKPFiAd1k43qgbPD9PJpJBhLKkGRwfLmRIfUgE6 Z0RZDQrmRbV+Yz3nlsszVLGPrfBz6WbNuF0iq+rLcmWtBGU+vORZnf/0teSZDjOU2xTD mtpKJlnDEza4Va8j9jTZfFmyD1Tz/YJU8zTTUccFMhyoi7LjlVxriPRGZJ8Bzk9wFRms NwmMmrMEKRTTmL8KYRTpl7dToqnyTQnTWnT0Lmo4QC+R8V+OneJVLTgs3nS6gTKe5m9l EN9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="BWbKo/rm"; 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 q8-v6si6775157pli.355.2018.09.06.14.19.43; Thu, 06 Sep 2018 14:19:58 -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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="BWbKo/rm"; 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 S1729892AbeIGARX (ORCPT + 99 others); Thu, 6 Sep 2018 20:17:23 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48678 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729860AbeIGARX (ORCPT ); Thu, 6 Sep 2018 20:17:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=m2Teqc4HPCZubJa8izPLnuuSwSjvWKg5FLI5abcFF80=; b=BWbKo/rmmzqLEUvlnaTvv1JZX 06YSzgKNCMHZWdzbTAbdDbZDNPWPpwsBFP/6eq82MwSBuk9tMabbkHb2pVVNk3ACBKNArW0LUaHWr UQmXcH6yPQhCbezToJ8eaY11YVCtvs3G0hEElpeODjumKte2WFxzOgB0bQvnz1AU24Sf8gFdq3ufN Ds0lYcxm/UB04HJpZOM82qxBVeH22nAZ1XF/wnT3N3dhyysyiMNCuN1eKT/TbWyIDtV8ujq9OoCQn ln5yFvTc27rR35zpcpXlPTUkOC7W1HRcQ7CKiuMCDbXdgvJegaJej0Lh0VSc+DAcuky1t+hgLaeNj YRwuDewBQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fy08T-0004d6-1e; Thu, 06 Sep 2018 19:40:16 +0000 Received: by worktop (Postfix, from userid 1000) id C903C6E0AA9; Thu, 6 Sep 2018 21:40:03 +0200 (CEST) Date: Thu, 6 Sep 2018 21:40:03 +0200 From: Peter Zijlstra To: Nadav Amit Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Ingo Molnar , x86@kernel.org, Arnd Bergmann , linux-arch@vger.kernel.org, Dave Hansen , Nadav Amit , Jiri Kosina , Andy Lutomirski , Kees Cook , Dave Hansen Subject: Re: [PATCH v2 1/6] Fix "x86/alternatives: Lockdep-enforce text_mutex in text_poke*()" Message-ID: <20180906194003.GD4816@worktop.programming.kicks-ass.net> References: <20180902173224.30606-1-namit@vmware.com> <20180902173224.30606-2-namit@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180902173224.30606-2-namit@vmware.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 02, 2018 at 10:32:19AM -0700, Nadav Amit wrote: > text_mutex is expected to be held before text_poke() is called, but we > cannot add a lockdep assertion since kgdb does not take it, and instead > *supposedly* ensures the lock is not taken and will not be acquired by > any other core while text_poke() is running. > > The reason for the "supposedly" comment is that it is not entirely clear > that this would be the case if gdb_do_roundup is zero. Argh, that's pretty shit code... Not only is that text_mutex abuse ugly, so too is the fixmap usage from IRQ context. I suppose this really does require your alternative mm patches for text_poke().