Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp380772rwb; Thu, 27 Jul 2023 14:23:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlGmnM5c2iTaPCHFm37Aas8kLAXvxD7GqS1BGpU/kXtYbBtFbpyYh7+2UOdAWpBkWH+gBGzD X-Received: by 2002:a17:906:6496:b0:993:f996:52d2 with SMTP id e22-20020a170906649600b00993f99652d2mr312728ejm.20.1690492985956; Thu, 27 Jul 2023 14:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690492985; cv=none; d=google.com; s=arc-20160816; b=C9VTRjlPKwIvAy4GgiweMaeSeDNbrL23bFg1YdeH2En9uP1lYNHlAQ9dNBdvPgXc5w WjfCDdr2+aasQEmFo5IGRNS19auK6qFFF2WPxT/Fkey20aYxMQ1diwnsMsFAQ1CN6OBV xMe4ITnl5dwhVEHojYEvwoXKOYT+D4WTaiTWto4mOSYPSP5MhwV7c+P7OzRqUdiC8HEg rWv+bedVFniqRRFHPMiSewTIheyovVFUqbZShnuWRhu2k10Ow7xA6+UpOvjk3ToZcp1L fBanrnJVJnujtgvyFIjZppeU9LsU/G+FTww2bbScH9NcYEfUSlewjfUeIK5emp4M8fvx C+Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=wn8M5IW1Cx9z9W8X8Ql/iTEi3xFpPTK1V/bqvxk5oAA=; fh=epRcmBAiFFnlsatJfFojz6YZmlaBWNk5Ak8XD2SpY6A=; b=pg0XFbquywLN6r+2b2doulrDz1mPr0YPQaSk3ucX1ypzmBupk0xAtow4qFdlIGVbmk 9TorM9LXjoP+H9hdZhKPJRkaEN84KZ83Qqxv2VnbbzIM+pt4VcTNs6iPRXT5uUcLZloZ sIzt5DoQ9iOIn4Rc0foc0buLdUV3pz9uosNUcO6tDpEkkpOqEVM12+kzSooOrbFaMxlx nyCn45JplusNSJ0Th58MG1Wv4tvNF9QeyoAQrmiYizA4zXM8BZGqgI5ynwcmEcdhqstD vdKP9mqINtzcFjdpXB4oQcYKpvsqWNvd9mXhqZ+ebR4kyPXzUoAnE/AAiBvf+BCYcXqm c7Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=bbT99bJd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l6-20020a1709067d4600b00988a5cdbfa7si1672004ejp.889.2023.07.27.14.22.41; Thu, 27 Jul 2023 14:23:05 -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=@gmail.com header.s=20221208 header.b=bbT99bJd; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232682AbjG0UMD (ORCPT + 99 others); Thu, 27 Jul 2023 16:12:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230223AbjG0UMC (ORCPT ); Thu, 27 Jul 2023 16:12:02 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 879DBE47 for ; Thu, 27 Jul 2023 13:12:00 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b8ad356fe4so8770325ad.2 for ; Thu, 27 Jul 2023 13:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690488720; x=1691093520; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wn8M5IW1Cx9z9W8X8Ql/iTEi3xFpPTK1V/bqvxk5oAA=; b=bbT99bJdu4sRjdxtAYwfODGngeD83nTVLOalwJyjsSVSlXP2u8fY/+zBMJbdP9va/V gWi4GyD0HeA+cuipXnXPpqXeFWYrwZni4kZtbbDtX2G2dqpveKf3eqVbzWJCbF9gsKje aublcSCyWE5d5wWbOddBF385cH/3VT8hx9dqMrof9e51gN574pctHjUYubsp+ajdWdyo 1RodqQimE2n0j8NEKig/qI0DJgFxdVqf4fRBeexQLcmi1mqf7ihLcfssggzbEy8bn8Zk +GnpWr+asgcQ3TSF4ZcXig7wJQnewXfhaoBjmqDYqgCs1jPwQAZUELqamoE3XUqqRUVQ YZTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690488720; x=1691093520; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wn8M5IW1Cx9z9W8X8Ql/iTEi3xFpPTK1V/bqvxk5oAA=; b=FFs9cu6grjE0T8m9LafrF+mi9UxqsrEEkGGQx1k6PjogoexOOblIFlXiYBVFuJE108 CcWquCA1ARbZeJET1Wp7n8m6M6ZAauegWjftcDi+R4ccCek8FARG+fIKh3Xa2HPRS4JK 0gE3l8/E+MBmRTFKPQMtj5Bcq+0efROMXHr9LVlnzvrB7Iz/vR37OXS3uYeDfXiJd2BN 4s53EiF/5tQIfL1wdReBy6qkGjgyzqUANVmk6HNO5qY5Xf3ft9YRMsURks2n2QNeKi0X xyAnznfoM1dTLoDWaNqa2GzhVHGIcfldu2HfV8zxKzYBfERtMd9/R5iyZp9J+ST5yefu TLPw== X-Gm-Message-State: ABy/qLY3nPf8IvtuNINUhRqnVLh8peDJWElFHFsx51bTZ7XNV48+9/VC h3HhPHTX+hcNdJqZSb5vvu0= X-Received: by 2002:a17:903:120e:b0:1b7:e646:4cc4 with SMTP id l14-20020a170903120e00b001b7e6464cc4mr442656plh.28.1690488719837; Thu, 27 Jul 2023 13:11:59 -0700 (PDT) Received: from smtpclient.apple ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id v5-20020a170902b7c500b001b891259eddsm2015611plz.197.2023.07.27.13.11.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2023 13:11:59 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: [PATCH 0/2] fix vma->anon_vma check for per-VMA locking; fix anon_vma memory ordering From: Nadav Amit In-Reply-To: Date: Thu, 27 Jul 2023 13:11:43 -0700 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-Transfer-Encoding: quoted-printable Message-Id: <2229115A-23F2-4B6B-800C-7182199DF79D@gmail.com> 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> To: Linus Torvalds X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 Jul 27, 2023, at 12:39 PM, Linus Torvalds = wrote: >=20 > On Thu, 27 Jul 2023 at 12:10, Nadav Amit wrote: >>=20 >> Interesting. I wonder if you considered adding to READ_ONCE() = something >> like: >>=20 >> asm volatile("" : "+g" (x) ); >>=20 >> So later loads (such as baz =3D *ptr) would reload the updated value. >=20 > 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. You are right, two are needed. I=E2=80=99ll give it a shot and see if I see changes to the binary.