Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp292774rwb; Thu, 27 Jul 2023 12:50:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlEub+jSKP3Pl59+y3PG5ygnPIAZdKoTHWd9njLZZ4vTJaCZXU26HYSqeo39tyD9UJVxOAhK X-Received: by 2002:aa7:cb03:0:b0:522:201f:dee8 with SMTP id s3-20020aa7cb03000000b00522201fdee8mr35040edt.0.1690487449367; Thu, 27 Jul 2023 12:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690487449; cv=none; d=google.com; s=arc-20160816; b=edv/gDI4cGUrZWQHFCeKOrAOnNwPHzZgWXYMFk8ho3CU7ob5e5K6/WMXIesvNSGXGP nUChVC+nVKwDQaKskMwRne9amgLcISk1NOvOx4JO911K+H32hNvxtXkpfViF5a6k9c42 sswo/WCTepfKuxh4HOmYLTBHK9XMtbiqm470dgEMm57W3ntGPhYYn20zoZx3dYAx2fKU Buno2ClTjujpIPkgVhvsC62b6SJjM53p8o9znXPFjbFYl2HjrSP4lm0vezdHcSkosP5d yWIn3CewPIvaHn65PsCbMmqQat3lIwLM343wYPYCoE3pEhOEXACplTp0HYUPnuPuqWxh og8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FzSAIK3tVtAi1R9Ls9FEA3i4ka3tmGQ08Pkh0uzBwqY=; fh=vLts/n9eqO/0iVMW/bW0m1Da1PqFcZwoRzgBEgm7oKg=; b=mhl09dydJZHBkWyJA20ncFpIUWeuede7fWJEiR/yWCzbnrp7y1CKu7axQl+j9wxx6z UgBJmpXQeFZmZHoTkVjyEbh/F7F/1IkRsI4p73amwh+j+vkAYuduTjicC3OtiJnyUZ8p K3/E26y82DU9bJ3Ox0l8/k27jxANS2d3cyHPehjwe2kg0hl8obGfIw6WKo1RrBXdIPru Q3ERNcxHrQiKw0TUrp4aOORhA2oFodu8NG8odKjoI0s7WM3BdCTocs+taS6niEIxsQaW jsVv5uCiHzdz+oN2GCv2tZTeUG4EQSlusrHarFb6xrq6CIrWiTFfzeOVQJ2L0edrdXGy WUUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=amCv8HB9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a056402164d00b005222b1807e7si1388778edx.370.2023.07.27.12.50.23; Thu, 27 Jul 2023 12:50:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=amCv8HB9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231172AbjG0TkO (ORCPT + 99 others); Thu, 27 Jul 2023 15:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbjG0TkN (ORCPT ); Thu, 27 Jul 2023 15:40:13 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EBD02D7B for ; Thu, 27 Jul 2023 12:40:04 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fb7589b187so2337491e87.1 for ; Thu, 27 Jul 2023 12:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1690486803; x=1691091603; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FzSAIK3tVtAi1R9Ls9FEA3i4ka3tmGQ08Pkh0uzBwqY=; b=amCv8HB9nO/A6XSD3imimmhUA90rRZgOzjEcbAbZKqlJhfqARuqU3fOOo2x/pr9OEZ iWwWDo4L0kFpKmWdpaYKx06nuWf/7c34HWGjlvI1PzjU1p+JA6yG2Xy6r6AbCBt/bAG3 CY1O6WFqjLYDV3P/ENzHKBKbIumoxmNkaMah0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690486803; x=1691091603; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FzSAIK3tVtAi1R9Ls9FEA3i4ka3tmGQ08Pkh0uzBwqY=; b=LraB8HpYSK5ctRYpn89upjnc/0IXhkBuC2xENLSnHasP3x51SwZB6JG40GlMxZ/mwQ n/LD4ckgfsewrcSbnGhIsV2Wnxh/9k5ZLpamBCVHn6kECoL7pPSa8B8QfMzzq4RL7TAs 69+OWCe7wzN3UWPZZII6qHr+2Js3kojuWllJ61Jwv3f0X1/gd+Qqfp/ZWsnMD/Epy/LU aE2D4JSMS+PnARMjlPRPvua1IDPSveNU+7qtizMp+B/a00IhGBDB1EQCx//HdDU1JRSy otGdjJB+fy8qTg7A1n3/g3UJuIQ2cJ7AICokh52PRVf9eQ41ObgA8LxntKAoYNzPrb// VUUg== X-Gm-Message-State: ABy/qLbGZGQnq+8kRxK3AnYn1T+aj8hxuhuHjel9JFTDVOHPWDaifx2U mzDxfrgdArO/WLDFRlmU0L1KO1oE5TNm5E3VQxt695Nx X-Received: by 2002:a05:6512:530:b0:4fd:f85d:f67a with SMTP id o16-20020a056512053000b004fdf85df67amr99831lfc.61.1690486802776; Thu, 27 Jul 2023 12:40:02 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id w5-20020a19c505000000b004faa82946d8sm452238lfe.178.2023.07.27.12.40.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jul 2023 12:40:02 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-4fba86f069bso2319695e87.3 for ; Thu, 27 Jul 2023 12:40:02 -0700 (PDT) X-Received: by 2002:a05:6512:1591:b0:4fe:8c4:44f4 with SMTP id bp17-20020a056512159100b004fe08c444f4mr115829lfb.62.1690486802107; Thu, 27 Jul 2023 12:40:02 -0700 (PDT) MIME-Version: 1.0 References: <20230726214103.3261108-1-jannh@google.com> <31df93bd-4862-432c-8135-5595ffd2bd43@paulmck-laptop> <20230727145747.GB19940@willie-the-truck> <8EA729DD-F1CE-4C6F-A074-147A6A1BBCE0@gmail.com> In-Reply-To: <8EA729DD-F1CE-4C6F-A074-147A6A1BBCE0@gmail.com> From: Linus Torvalds Date: Thu, 27 Jul 2023 12:39:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] fix vma->anon_vma check for per-VMA locking; fix anon_vma memory ordering To: Nadav Amit Cc: Will Deacon , Jann Horn , "Paul E. McKenney" , Andrew Morton , Peter Zijlstra , Suren Baghdasaryan , Matthew Wilcox , Linux Kernel Mailing List , linux-mm , Alan Stern , Andrea Parri , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Daniel Lustig , Joel Fernandes Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Jul 2023 at 12:10, Nadav Amit wrote: > > Interesting. I wonder if you considered adding to READ_ONCE() something > like: > > asm volatile("" : "+g" (x) ); > > So later loads (such as baz = *ptr) would reload the updated value. Not necessarily a bad idea. Although I suspect you'd want to add *two* of them - on either side - to make sure any previous loads wouldn't be moved around it either. Linus