Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp334991pxf; Wed, 7 Apr 2021 00:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbKA27W6BxK71f2ErkiZ4OIE6iuaWHaoTBbUJG1Rx2wfUgc9HE0aQrp9kmDD3f9mkfABEp X-Received: by 2002:a92:d2cb:: with SMTP id w11mr1554405ilg.225.1617779509957; Wed, 07 Apr 2021 00:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617779509; cv=none; d=google.com; s=arc-20160816; b=QMVTGly0HV5hyIr61jSA30edTrELy32tcYv7KXy4ghuXkdsa5wbw0cyze0eAsAKFwz q2Zf6LdjNmuWq3ydYb09OBVL/zJgNcOsrkiByyLuwBFyqR1A7O5FkTSoiBzjuMSxpGTh sFEzxGBavwrr6URA7whNeApGA55So4EI5WZN3Q7JQjXnNWkQ0c2Yj42cG/Ms0urqc812 tJIT+A6og5E9yyaRSmCeBs7Nc4C4VZShdBMnpE2sMZ4AptGDGidv58xqZXF24n6WLRyx aouDUlFS2HOGVG4vJTzlp7adnBOAOPSjxoyF3RksL+uVrG0o33NlzjFVsgv0eZ3nKqQV WYTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=OyBIdyOZ4zwhsrQ4EPLeOveIHlZ12Jytj5TkvhBjtS4=; b=p28bot5SIkw11GugIdGjD/Fk5RGGw+OipM+TywwGzBAf88YH5Rj0GugfsQm1ohhr1P X26aG2S59Q/V8Uo6UW1MYBFTiTC3+omzXfhVXBJroeH6iciBOR0u8j2ehT1AqL/AeMN+ VtlbFsvHGAw+JTqcxTJuP6oUYbSU14bh4U14PluoPpHkxUQZ9gfWAzJhNYp3WjkQZRfe pCPcKNh7APHC70zssbI9E5CzkfrWv4en1kdIK0nPL5eRG3cBIYmNiOr7Pl1JiXReWSUV 76YmldhKqY/ollEG1b03VCRbV8r2JmmSsTf4pldwfR8I2qAhgsAnbvRRed0nZ8WnRLdR QYEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si21422095jad.47.2021.04.07.00.11.37; Wed, 07 Apr 2021 00:11:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346290AbhDFQNA (ORCPT + 99 others); Tue, 6 Apr 2021 12:13:00 -0400 Received: from mx2.suse.de ([195.135.220.15]:37494 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346283AbhDFQM7 (ORCPT ); Tue, 6 Apr 2021 12:12:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D58F8AD7C; Tue, 6 Apr 2021 16:12:50 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 89CDD1F2B77; Tue, 6 Apr 2021 18:12:50 +0200 (CEST) Date: Tue, 6 Apr 2021 18:12:50 +0200 From: Jan Kara To: Theodore Ts'o Cc: Jan Kara , Hao Sun , jack@suse.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: KCSAN: data-race in __jbd2_journal_file_buffer / jbd2_journal_dirty_metadata Message-ID: <20210406161250.GH19407@quack2.suse.cz> References: <20210406123232.GD19407@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 06-04-21 11:01:39, Theodore Ts'o wrote: > On Tue, Apr 06, 2021 at 02:32:33PM +0200, Jan Kara wrote: > > And the comment explains, why we do this unreliable check. Again, if we > > wanted to silence KCSAN, we could use data_race() macro but AFAIU Ted isn't > > very fond of that annotation. > > I'm not fond of the data_race macro, but I like bogus KCSAN reports > even less. My main complaint is if we're going to have to put the > data_race() macro in place, we're going to need to annotate each > location with an explanation of why it's there (suppress a KCSAN false > positive), and why's it's safe. If it's only one or two places, it'll > probably be fine. If it's dozens, then I would say that KCSAN is > becoming a net negative in terms of making the Linux kernel code > maintainable. OK, I'll send you patches for the two I've seen in the last month. We'll see how many accumulate over time. Honza -- Jan Kara SUSE Labs, CR