Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6937809imu; Thu, 31 Jan 2019 02:08:18 -0800 (PST) X-Google-Smtp-Source: ALg8bN6jl4S83ZamrJ0UoNaz2hXHHrZDefjGenqsTcauBfPU/3ywBQd+A+cFFdxpPGOODZKn/lfz X-Received: by 2002:aa7:84d3:: with SMTP id x19mr34013648pfn.220.1548929298702; Thu, 31 Jan 2019 02:08:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548929298; cv=none; d=google.com; s=arc-20160816; b=0nJzTRmYnEanlqbFxeiktf26ppKwRLnybKuR9NHoI6NpZ1alCos2zWcAWTI9j7MLWB Jq00FoDtqicVI/Oet3jfmFPwI0bwxESUBF1CvQxuq7Nj8FnBpJnbHHTHBWq1mKaeoWhP /k/yeeNAsqKck+DyMqDVcOMQ0Cm8cmqKBzDzcSpXozW3TbkTkd5c6Lw7L/O8+nKVL+aF OAvvI9ZS0vXLhadbAiuQfrYrvvNS7Xl5dLvb4pypZNp6R9xZyZZG7xEu1vLstUABRjVX +6AEdZG+ocdnOWG2VcVXqHmliRph01/kA16r655XZDjrlhtxQTPsh1C6zb62Cm1+Mgo0 Iibw== 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=SG7v4bRVtQBwELW4peWymZeXzLc+LVRGGc44ak/ZhLU=; b=dJ8oiwtI4nYzPfFtNqt5q2s0QvxD7DOYD49FRq2AbWiOaxNVqVcHaKTldCM+yvQ3+/ KDEfoT0XQfetqgCGOtWNA0e926HURQ0nR93+6j/7HdZ9uumUIgVa39DGyTZPxDtaoQQv iaUI0tJO+kymW9eJ4IJ4ztggPvx/pvaDSUca49bnmfh7IUAjTrD5ozICWj47Czn0V5Yp Q0lEWk5BGjT6huaxdYp0tsX4WqzlgRtD14riUMcG5t62GbBdybOsF/P3xHr9Rr0EOyxv D6Aj0puD4Jh4duKI3Atv69WLGTC+k96ODxTBHXUx7CVcjdtafn67zER50tLF5ei7qIcp +g3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YQF9nSVM; 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 r7si4358399ple.281.2019.01.31.02.08.02; Thu, 31 Jan 2019 02:08:18 -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=YQF9nSVM; 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 S1731867AbfAaKG2 (ORCPT + 99 others); Thu, 31 Jan 2019 05:06:28 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:42376 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfAaKG1 (ORCPT ); Thu, 31 Jan 2019 05:06:27 -0500 Received: by mail-io1-f68.google.com with SMTP id x6so2126594ioa.9 for ; Thu, 31 Jan 2019 02:06:27 -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=SG7v4bRVtQBwELW4peWymZeXzLc+LVRGGc44ak/ZhLU=; b=YQF9nSVMjqVd/G146UommuM1SKs60XsM0YZ3vx9/sdB4CChDAKt05htpnqF1+/+KKi PnPurKFST2zoBFJCQTntigs3zMQtVVV51lrPT62Rjn2Sz0F0oyX2mSrtIgHg6MFYYS20 nFxtnWFcUMqwdURHjktA2QAXfIWx7At3mK1xrxfTJqi7eiFsIrjs4IpSjIA8rdgl36l/ EaywDAXpSAtTJrl71LUmFO+8qr1j07kcFsoydko0DhRygZoQCE0AWL9FM9U5o5sxhSAN 92j+BjXH/ezUkUatHsXjrSdlUgti2D9/pzEnuLz30x3BwAjVdyE1awqeXgDH4meK/pQU oUjA== 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=SG7v4bRVtQBwELW4peWymZeXzLc+LVRGGc44ak/ZhLU=; b=n9buDh8R+AtGywMrxm7gN0zlmBcTQdYBAxHyodBQP7SBuU9XzJenRQ5r8GUaH2D3iN C70ZUWog02RH/hEQMZ9EG6SI93UMCSZRItYJ1uEacIdw66lr73GMCeXs9DaKAFPnVnbM RTvPMbgsedaQxA6P9202v7xDbYDbBD7nbYB2zgIboAlmClIayXInRKWLmZgFQMNf1LWA Q1pG8epMSDPVoOjP1wABT/XaNUFpkMxun865qb0JRQpphYDsrY9mPqNpcCcDaktwGmWG QaCVsnGGqSUeVjh6RYVSCbntil7b/bYPkkp6cI9xidmZIi0qwzj+2ROI33uxOWwr9kQh Zk/Q== X-Gm-Message-State: AJcUukcXI1W0HfcLvYZrv0YVdHo9uiJWwCin0ikRLBs+jda57Ddh/6go jOTh239xZjP+fpKC5jqR3E+6Q2/JljU/eTHr63d9/A== X-Received: by 2002:a6b:fa01:: with SMTP id p1mr18538473ioh.271.1548929186449; Thu, 31 Jan 2019 02:06:26 -0800 (PST) MIME-Version: 1.0 References: <1547634429-772-1-git-send-email-elena.reshetova@intel.com> <20190121123836.GC47506@lakrids.cambridge.arm.com> <2236FBA76BA1254E88B949DDB74E612BA4B9BBF9@IRSMSX102.ger.corp.intel.com> In-Reply-To: <2236FBA76BA1254E88B949DDB74E612BA4B9BBF9@IRSMSX102.ger.corp.intel.com> From: Dmitry Vyukov Date: Thu, 31 Jan 2019 11:06:15 +0100 Message-ID: Subject: Re: [PATCH] kcov: convert kcov.refcount to refcount_t To: "Reshetova, Elena" Cc: Mark Rutland , Andrew Morton , Andrey Ryabinin , Anders Roxell , LKML , Kees Cook , Peter Zijlstra 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 Thu, Jan 31, 2019 at 11:04 AM Reshetova, Elena wrote: > > > Just to check, has this been tested with CONFIG_REFCOUNT_FULL and > > > something poking kcov? > > > > > > Given lib/refcount.c is instrumented, the refcount_*() calls will > > > recurse back into the kcov code. It looks like that's fine, given these > > > are only manipulated in setup/teardown paths, but it would be nice to be > > > sure. > > > > A simple program using KCOV is available here: > > https://elixir.bootlin.com/linux/v5.0-rc3/source/Documentation/dev- > > tools/kcov.rst#L42 > > or here (it's like strace but collects and prints KCOV coverage): > > https://github.com/google/syzkaller/blob/master/tools/kcovtrace/kcovtrace.c > > > > Ok, so I finally got to compile kcov in and try the first test program > and it works fine as far as I can see: runs, prints results, and no WARNs anywhere > visible with regards to refcount_t. > > I did my test on 4.20 with CONFIG_REFCOUNT_FULL=y > since I have serious issues getting 5.0 running as it is even from > the stable branch, but unless kcov underwent some serious changes since December, > it should not affect. There were no changes that should affect this part. Reviewed-by: Dmitry Vyukov > Is it ok now for merging this change? The stricter mem ordering on dec_and_test > hopefully will also lands soon. > > Best Regards, > Elena. >