Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1043505imm; Thu, 6 Sep 2018 14:25:39 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda3OhEXhM3S8BZYgsciU45uF+wNbid2l0dNfAoedIgYztlvocNnyqstDm7WZHiyu9eI3DMg X-Received: by 2002:a63:f44d:: with SMTP id p13-v6mr5045128pgk.257.1536269139125; Thu, 06 Sep 2018 14:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536269139; cv=none; d=google.com; s=arc-20160816; b=UfSlwXAVXsdNB8PB49Nf9l1WPWMbwd0+Y1Gr9MLip5hDvWhLQt19lCZ3ADJzy2M2kK v+zstXI6KTwhSWQj5LNc6Ml8tEmZby2YH0UUvwDxmMkH8T4SSTc4EzcDKJWtmQvKTXAX YckGRvF2P1tTLrfV3v/EpHPBONhiUTEm4nBdt1s7YUui0q6aTbS91HeWMp/oHzztRvXY 5Rcs/z5Pb37upfJJCaNrzNUIrkvaLe27skBKnmLRNHNo++XJEMj2TEi6SnK+TSnqAZa2 KhKk7cp3wEdM70NIYpGQhGZ686qiIfBXr0KZT8QMPlDJnd8qh5WbcX8Cx0QqjoskAzXd xTJg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vtHKh/JT9sqbD4tvoq794Idr7uFMT0fTiuI3wwMSzlQ=; b=c4D4DnnciQ0M6XMriC8g4G7HWA/H+A20jauQ8qT+8Sj8hKQ9E0xkar+0l4anXwNF3L Tn9STReBteVsM3eGgLHCrjkUZjJCI0sS7uDsbnsLPE1k3du+SrSebOW0MGG2p0w7dUTv g4Cq7I1YX6PyIoczndXvXq62FbDD0KJKUd5DxvCxvt6cE02zjgQJ6yx5KCe9O1jiCqxl AtqH7bMpF0/x/FF9EBOMF4Qu3b001xIAp6HxvHlWRkXw8alXlTPIzSVqXPyca6rH3MKr M1tVHXe8xIMtR2EvEghakk8x49RQq9N6uDEw4hzfDAEujg6KSflefLuRNQh0csRJJ3SQ T0eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=xqsLWUvc; 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 u3-v6si6084227plb.401.2018.09.06.14.25.24; Thu, 06 Sep 2018 14:25:39 -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=xqsLWUvc; 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 S1729715AbeIGBDM (ORCPT + 99 others); Thu, 6 Sep 2018 21:03:12 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48896 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729249AbeIGBDM (ORCPT ); Thu, 6 Sep 2018 21:03:12 -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-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To: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=vtHKh/JT9sqbD4tvoq794Idr7uFMT0fTiuI3wwMSzlQ=; b=xqsLWUvcWFB25SC5eOHRLvsaOS a0h40SihAoGaWIDS/s5D2bUZqDD74aq7kPvVPljn47SRh9nXhKfvdb4N2qEHGiJLgoUuoGLgnlay9 25KNpoNMD7Kd39XkYhC5eC03hp/37JpMA0h40InccSjFCwsjjiq0lNszP5NtHvz3yUs+qaQUwvm6a b5iQIpuvjsf8y4RuTQN3ri6CxqzAMw+dmXs6/8kDp4dKayQ07152zWFQpsFMJCoUIIDVytB02J9UA 37CLHgI3ZMQ0JjY7dPERbHYKLeCOep39FUiu81ZAPHM9BJcMWEO6HPr9npZcOsOQWVtZfWSws6xDy TBFxm3fQ==; 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 1fy0qb-0004k5-Hd; Thu, 06 Sep 2018 20:25:49 +0000 Received: by worktop (Postfix, from userid 1000) id 47D076E0AA9; Thu, 6 Sep 2018 22:25:47 +0200 (CEST) Date: Thu, 6 Sep 2018 22:25:47 +0200 From: Peter Zijlstra To: Nadav Amit Cc: Thomas Gleixner , LKML , Ingo Molnar , X86 ML , Arnd Bergmann , linux-arch , Dave Hansen , 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: <20180906202547.GC9358@worktop.programming.kicks-ass.net> References: <20180902173224.30606-1-namit@vmware.com> <20180902173224.30606-2-namit@vmware.com> <20180906194003.GD4816@worktop.programming.kicks-ass.net> <20180906195351.GB9358@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Thu, Sep 06, 2018 at 07:58:40PM +0000, Nadav Amit wrote: > > With that CR3 trickery, we can rid ourselves of the text_mutex > > requirement, since concurrent text_poke is 'safe'. That would clean up > > the kgdb code quite a bit. > > I don’t know. I’m somewhat worried with multiple mechanisms potentially > changing the same code at the same time - and maybe ending up with some > mess. kgdb only pokes INT3, that should be pretty safe.