Received: by 2002:a05:622a:1442:b0:3a5:28ea:c4b9 with SMTP id v2csp736851qtx; Mon, 31 Oct 2022 12:38:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6/VUMf9LhzWuR9y59/pn3F3biAP0Y45E8ZjkZB3nDNTkUYfkQKvvQJm26UZEt0Sk5jHTrY X-Received: by 2002:a17:907:a47:b0:79e:56dc:5373 with SMTP id be7-20020a1709070a4700b0079e56dc5373mr14652850ejc.148.1667245088121; Mon, 31 Oct 2022 12:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667245088; cv=none; d=google.com; s=arc-20160816; b=kVxK9uQJqcjcjc27jChEQ3pukSwQ3eb39ReKTiVsQQ0kWga/1B7vlOOP6SxHAedPWV P3x5gupUonrZeH9JFu30lB5q07p4Un8E3p+sLIeoStsERe3H64Jd3gpYeqBJ2QTBBTRe 7VzW4ZmVyFQOWaF+ucALjAVWC3K1u8sszkbqRd51tZrl2vCJvWLup93uqkJyUK2qM6G7 bzIzwVMPugp7M2yCfgD4XqN310LCWjO1GlCm61ZiQ1PwQJ/QOd+2L7WAOsWfpXz1zxR3 Mo3duBVSvyJEhE+5y3Kmq/dcx93WKEfqPzu8DNAoqg/OM61qSVm+u5su5R6scfZHGgt1 CEog== 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=RIRCeB57mif3WLLjzHJdENrFUL9U/TfVQ593vGFl6q4=; b=lj9t5Ep3qtGVLsqI4ecqqmV/CTtzcIi1GCC+TfTbgmfRSZgTlLQVmI3f3EJ7QrtcVf oWZ/2lB7lt+Est3hMCoaQPIfXnR2LfdWqMZ3dBtwVjS+PzSXQpxIGADaGqYsEhXCJMVQ X+gapeuZuH1xzif5aeN6YmavIgbGsoyio1Z4DfttJSMwV5AhiFb3PijXlOXQWqNrT1nu lKiLEuK8yrTRHSYtyfBtjTDQ4NY15BN+mlwRhr2zpUDh5pCBlsOju4CJXx8cIjNryLU0 EwUYlIwJwSAOvDL2rChgTIDIC3axGMYXsDvAQ+M5KGU7TjII544MyFP9L81NiSo+drJy 4Haw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=PzRtrjqO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j27-20020a170906279b00b00715867834e3si6382413ejc.506.2022.10.31.12.37.44; Mon, 31 Oct 2022 12:38:08 -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=@linux-foundation.org header.s=google header.b=PzRtrjqO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbiJaTH5 (ORCPT + 98 others); Mon, 31 Oct 2022 15:07:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiJaTH4 (ORCPT ); Mon, 31 Oct 2022 15:07:56 -0400 Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BFDA11C2F for ; Mon, 31 Oct 2022 12:07:55 -0700 (PDT) Received: by mail-qv1-xf32.google.com with SMTP id o8so8945233qvw.5 for ; Mon, 31 Oct 2022 12:07:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RIRCeB57mif3WLLjzHJdENrFUL9U/TfVQ593vGFl6q4=; b=PzRtrjqO02eaWa33Zq3luOuXf6b8F5IN//bl0BoITVBRXmcMh7nbJhnqTYWRRryu5y 8iDxEI/HfGaS1+1tz8lnXx3Ny5EVlFEYhPErbdEJhiUGODUQeS5CyUWmCheYQW971isr K+Mc3Us7oEuRSM2JN/G6i+LXwzXpZEIcmSr+o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=RIRCeB57mif3WLLjzHJdENrFUL9U/TfVQ593vGFl6q4=; b=hRo3O1eG0ih4hkXhPYcxJgB/6b8hdHGEWVyQnc/5PTshqGwsKgNPSigsbUifMNnvTx Hk9DMqke7fqCbwBggEEd5dAhH2xt0gY1rvvS1y7ANMY5e4atI7Rquc7GOl9WXxdo4qlN PJ8CjPXW5ENGux8tdiBWLgeiasFtqBhOc12my+8R+KsHxoYAq6BAC1L/4wvgpyGKPAiF 9kr2H2eTN2cYnPgGwCOZod5upXgNVV4eGdm4141hLGTk0npBNJmqjOhuXCbaTYpdyqcb rEFMde6tjcIU81YpL4+DP5nJx7x3ciGRCZvs4xxZyvoA1xB1bazb9omIOXeGVCuVqzHT Q0CA== X-Gm-Message-State: ACrzQf2epp5BQH0hpiw3tnCWdoo5GtHy4nMtsTKvICRpTzD3Uv2US+BE efNd8MwFOfTDPH5GWqfXuFRTJd13kxZFZQ== X-Received: by 2002:a0c:e18f:0:b0:4bb:5b84:fb2c with SMTP id p15-20020a0ce18f000000b004bb5b84fb2cmr12651354qvl.28.1667243274274; Mon, 31 Oct 2022 12:07:54 -0700 (PDT) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com. [209.85.219.170]) by smtp.gmail.com with ESMTPSA id c17-20020ac853d1000000b0039cc944ebdasm4023765qtq.54.2022.10.31.12.07.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Oct 2022 12:07:53 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id 63so14813677ybq.4 for ; Mon, 31 Oct 2022 12:07:53 -0700 (PDT) X-Received: by 2002:a25:bb02:0:b0:6ca:9345:b2ee with SMTP id z2-20020a25bb02000000b006ca9345b2eemr2992665ybg.362.1667243272872; Mon, 31 Oct 2022 12:07:52 -0700 (PDT) MIME-Version: 1.0 References: <20221031175256.2813280-1-jannh@google.com> In-Reply-To: From: Linus Torvalds Date: Mon, 31 Oct 2022 12:07:36 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] fs: use acquire ordering in __fget_light() To: Al Viro Cc: Jann Horn , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Will Deacon Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Mon, Oct 31, 2022 at 11:48 AM Al Viro wrote: > > Anyway, it's unrelated to the patch itself. I'm fine with it in the current > form. Will apply for the next merge window, unless Linus wants it in right > now. It doesn't strike me as hugely critical, so I'm fine with it being put in any random pile of "fixes to be applied" as long as it doesn't get lost entirely. But if y ou have a "fixes" branch that may end up coming to me before this release is over, that's not the wrong place either. I would tend to agree with Jann that the re-ordering doesn't look very likely because it's the same cacheline, so even an aggressively out-of-order core really doesn't seem to be very likely to trigger any issues. So you have a really unlikely situation to begin with, and even less reason for it then triggering the re-ordering. The "original situation is unlikely" can probably be made quite likely with an active attack, but that active attacker would then also also have to rely on "that re-ordering looks sketchy", and actively hunt for hardware where it can happen. And said hardware may simply not exist, even if the race is certainly theoretically possible on any weakly ordered CPU. Linus