Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3055786rdg; Tue, 17 Oct 2023 03:20:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6a7XMdNd/DthFqi0srcaOa/ld+4+SMFICYGg7bBZMSuAwJYdemtv4Qhfb8RDMPGKhC48n X-Received: by 2002:a05:6a20:9187:b0:153:b16e:8db1 with SMTP id v7-20020a056a20918700b00153b16e8db1mr1780071pzd.10.1697538002442; Tue, 17 Oct 2023 03:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697538002; cv=none; d=google.com; s=arc-20160816; b=ALOZj7pjj/6SoRroq//e23SybAMW8i5cjWgZ8J/Pxs+EjXskq9ivFO2ReO/bLjF1/E dT0/DaFhFBRopCf2h70RiwO6Y5RQZLCPNCKQNaP3QJNAU+T12zYOSuMoTasIMi66+6Pc 9+BOqefKw6RSN560BYB3CSJfm9JshLGFyWFZ/U//uV60extp4cdPcVbsqgKKvzF/AaA5 KdvPzdBwfouIL1xtAO4u7ketlcz5qSzVskOfZCpdoW/q5cjvVBiOR+sNKBlIMn4AUiXM dI/cBbORMlzzHwvYBfGHeOtE7pP+CrRvn+LH9Q/JVEQZk3h7TlPoDq84KZy4zpu1IruE XDHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fxvZNgF+It9/pkutyTdBwQ2drZbf8d9h7gItHyVyZtc=; fh=GgiKU9SePfg4B7ZhubVrGRPNOR/UZ37k5sKHCHYTgvM=; b=QWY/+KgLoW3qLPgLy8Htoar2Pw0TSGUfKmqXty8mM/Jweuyh/p5WFWU6JPitD4VOlv U60hWwx7kWaoKehvd32qVjOGumhfTG384urg2nbz9K4sltvtcNRWuIUudZ6e2aLffbNb BjzMFlvubVkLjYnJwStjyaxDItYvUmYCYEBPDsTuVfi7ecTZES+y62f81ZXT9IsGaM3/ zYepItD8B94nbEvbbYrbCxk0qV4OH5LU0SZmVPCXhxPbhJDEcW9nnKe7E4xmY1IRB4eD Iu/NJ2QLalrVUKDKEQHNc4Sw8OdSBLh950Ft65S/JVL8GV31LiALngzo7d3pKXa5reou B4Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UywmqRqX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id ds19-20020a17090b08d300b0027d047d9070si7983152pjb.91.2023.10.17.03.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 03:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UywmqRqX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 4AE08801F35E; Tue, 17 Oct 2023 03:20:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235007AbjJQKTq (ORCPT + 99 others); Tue, 17 Oct 2023 06:19:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234974AbjJQKT1 (ORCPT ); Tue, 17 Oct 2023 06:19:27 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBBDE12E; Tue, 17 Oct 2023 03:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=fxvZNgF+It9/pkutyTdBwQ2drZbf8d9h7gItHyVyZtc=; b=UywmqRqXVi95xSI8PqvFWe4u1k Wxct0bmVsIzqbVqHIRow1Dv39c81o8Aw3R57nSINroRmme67pBE39wLzPEoIBW1w8GkpHoGa1GHQ3 VcjF2ANQNyKIzBGqgpppAOdsA6GMmWW5jRSKIjeLzwaUL5YAHroY5o+n7yf4psX+UFP2kKbWX6dLc Ra/qER2vpnnWzDn3DLXaaNkKilQRvyq/tTKXrgLjDnV8ho677Gd8EbhwEh7kkGeDOQFfiyYxxIRI2 SgEWk9gV0FBFju9II/84Bsf0T8uCgzD3NrBSXTtaRYr1HUMMLItbWzWm40hygwym22LIoJY6PaZ4N usMeJ3Xg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qsh8Y-00Bjm7-Nd; Tue, 17 Oct 2023 10:17:18 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 15DE030058D; Tue, 17 Oct 2023 12:17:18 +0200 (CEST) Date: Tue, 17 Oct 2023 12:17:17 +0200 From: Peter Zijlstra To: Ard Biesheuvel Cc: "Kirill A. Shutemov" , Matthew Wilcox , Borislav Petkov , Andy Lutomirski , Dave Hansen , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@kernel.org, Nikolay Borisov Subject: Re: [PATCHv2] efi/unaccepted: Fix soft lockups caused by parallel memory acceptance Message-ID: <20231017101717.GJ33217@noisy.programming.kicks-ass.net> References: <20231016163122.12855-1-kirill.shutemov@linux.intel.com> <20231016213932.6cscnn6tsnzsnvmf@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 17 Oct 2023 03:20:00 -0700 (PDT) On Tue, Oct 17, 2023 at 09:42:13AM +0200, Ard Biesheuvel wrote: > One question I have is whether the sequence > > spin_lock_irqsave(&unaccepted_memory_lock, flags); > ... > spin_unlock(&unaccepted_memory_lock); > arch_accept_memory(phys_start, phys_end); > spin_lock(&unaccepted_memory_lock); > ... > spin_unlock_irqrestore(&unaccepted_memory_lock, flags); > > is considered sound and is supported by all architectures? Yes.