Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp636318imu; Wed, 9 Jan 2019 03:58:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN7RIFaWoxx10md1/yhtDvOilx2RLQOrftPKLi+9jG6eOsl/VdamResNjVQwCWOR3Q/NiW1v X-Received: by 2002:a62:32c4:: with SMTP id y187mr5861491pfy.195.1547035094492; Wed, 09 Jan 2019 03:58:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547035094; cv=none; d=google.com; s=arc-20160816; b=DSMJy/yti1YDygXnQ5tfjI5fCDNbClpPLBD4oDBiOuIu98/g22adeHap9zofnQ1zZX QWX6Ru62E6kDCa8Nncoq5JjMpqOKTIPXReCuFBZMvPYZ6cNoogTE/3s4NVB0xKyjIb98 /WLti8OgX0xzYqEF5YmjCdbcMIrKFSh0LIKV6zLu9TA7hBSZuIvJYaup9ZNjS+QhvGJr 6JyayRnWzC+RRoQ8Qy9L9WS5KAGSdsa1Qm9sUADTxkPYtGWlRGirRRlSKtLs0YqnV4/7 CYFXw6KcIxsAEXX+y2tttFephx6N9ppCi8scoK+BuViKlb5rMcgm8XvExKcMSmxL5M/s v3NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=havypMdbH5gAZ9icq0Hd/GKize3aJjIllpQ4OvlqGFM=; b=P5CsrlYJZZIXo4JuOBSuQiTt7mIxDOtidy0oNHxuamKCsCfvgjhCW6R3VJUE8maxsV 7pHzrTO85I8g964zkTiFCVAyxmkQGU4SVgaUjDcR4RI1ciQeb8teC37J2I/+G4mqnedo 62egMCPK4aF1iyeZjdSfnnbYrshol0+Fri+ZNasgqfsxfwbYfEie4anAcFJPDFngzFJH 4QPjCeCKAK+1TiXABYGnAvZyYaiBZHYnSMUMhXuQyP/n+MO0JU9mHX2/pF8TnrQsRzrj oG/2onS3R7WrI67I/sVScgFzxOpseWKngXUhdB+kvVg15GnAmn786sIAgFV5XJFQJIsR 66Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Bd3DXS0/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si2867839pfc.156.2019.01.09.03.57.59; Wed, 09 Jan 2019 03:58:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="Bd3DXS0/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730247AbfAILzk (ORCPT + 99 others); Wed, 9 Jan 2019 06:55:40 -0500 Received: from mail-it1-f169.google.com ([209.85.166.169]:37230 "EHLO mail-it1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728186AbfAILzk (ORCPT ); Wed, 9 Jan 2019 06:55:40 -0500 Received: by mail-it1-f169.google.com with SMTP id b5so10593055iti.2 for ; Wed, 09 Jan 2019 03:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=havypMdbH5gAZ9icq0Hd/GKize3aJjIllpQ4OvlqGFM=; b=Bd3DXS0/qZquXI/dNZJiaV1PLY/C55e6Y6VHp426SGKdCzu6gN3TURb9LCg2cT6a9S TtAzfQVUvvCfuERzbZgS1TKW7OK+WO31Ru48uGiC1m/fDZGaYtWhoH8tb2OTVCEZpKvu SZAkRAnIQrPvEoIcedTSnn5o3X0+WJkcND60PpNwzpQYsyx6NjpiT2A+JdF58FIYLzzj pIF2+9atFJm9EZrUOs0+S41aCHpRmBwP+pvkMB0Lf0Oj8zNriao1d9SmsBRbkg9ITJiJ +DiQAE0g7+x7nzjLK0Rdew9shwjvcNbtrY10grcasik4hu5WBgRCBNQxhOW1rMqWBiYV ij0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=havypMdbH5gAZ9icq0Hd/GKize3aJjIllpQ4OvlqGFM=; b=jKi95sxb9O9Hoj0uwVUIfrzYcPU3IGfH1Xvo+KyRPuEUi8pb9t60u/pU8H6bbkE4mz phqlG9au0azOmbUVwqoPehfQIYiZ9zqgQ2pGQZ9ec8+CnzIs2XySnUf/lIuy1mWtp+wb /3NpYwAoOtYeM+Sgkohfv8iavp1eohEomyGf18s+hskeXh7Zlmp+Bjy9HtLHVfrhhJyU k9Tj2JPum5aYPGIYE7BotWztyoIh6ETWKrwamM8w0fLYI0BV+0YTw+KzLAiNEe+AOhz0 uS22tlOakiYfqSwPXTQ1DWMp7GvCcYU9cyNqFw9bJq9wlxwPvLASSJh9NlLxcXJuvjwC JpqA== X-Gm-Message-State: AJcUuke/WwidLQ8ryLniiHu2EcOpn2PeXFAnYNFljH47yokTwRhOpKaJ 44tlFwjueZFkCSEXV9+rdlkLnEYtCWbGUbMhoA7XQg== X-Received: by 2002:a02:97a2:: with SMTP id s31mr3606454jaj.82.1547034938920; Wed, 09 Jan 2019 03:55:38 -0800 (PST) MIME-Version: 1.0 References: <20190109000214.GA5907@andrea> <20190109112432.GA6351@andrea> In-Reply-To: <20190109112432.GA6351@andrea> From: Dmitry Vyukov Date: Wed, 9 Jan 2019 12:55:27 +0100 Message-ID: Subject: Re: seqcount usage in xt_replace_table() To: Andrea Parri Cc: Anatol Pomozov , Florian Westphal , Paul McKenney , LKML , Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 9, 2019 at 12:24 PM Andrea Parri wrote: > > On Tue, Jan 08, 2019 at 04:36:46PM -0800, Anatol Pomozov wrote: > > Hello > > > > On Tue, Jan 8, 2019 at 4:02 PM Andrea Parri > > wrote: > > > > > > Hi Anatol, > > > > > > On Tue, Jan 08, 2019 at 11:33:39AM -0800, Anatol Pomozov wrote: > > > > Hello folks, > > > > > > > > A bit of context what I am doing. I am trying to port KTSAN (Kernel > > > > Thread Sanitizer) tool to v4.20. That tool tracks shared data usage > > > > and makes sure it is accessed in a thread-safe manner. > > > > > > Interesting! FYI, some LKMM's maintainers (Paul included) had and > > > continued to have some "fun" discussing topics related to "thread- > > > safe memory accesses": I'm sure that they'll be very interested in > > > such work of yours and eager to discuss your results. > > > > Thread Sanitizer is a great tool to find thread-safety issues with > > user-space code. The tool been developed by a team of smart people > > from Google [1]. > > > > KTSAN is an attempt to bring the same ideas to Linux kernel [2]. A > > bunch of work been done there but the project is still at > > proof-of-concept point. > > Yes, I have been aware of these tools since at least ;-) > > https://groups.google.com/forum/#!msg/ktsan/bVZ1c6H2NE0/Dxrw55bfBAAJ > > > > > > I am not a part of Google's dynamic tools team. But I've decided to > > pick something to do during the New Year holidays so started porting > > KTSAN from v4.2 to v4.20. The work is "almost completed" but I need to > > fix a few crashes [3]. > > I guess my first reaction would remain > > "it's kind of hard (to use an euphemism) to review 7,582 additions > or so for a data race detector without a clear/an accepted (by the > community) notion of data race..." Tsan's notion of a data race is basically the C/C++'s notion: concurrent/unsynchronized non-atomic access in different threads at least one of which is a write. Tremendous (for such a project) benefits of automatic data race detection is a good motivation to finally agree on and accept a practically useful notion of a data race.