Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8122211ybl; Thu, 16 Jan 2020 11:02:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwFZZDnUkyyoXSjrLQCuoFJUK2bhwZelwwmTlZyLbeonsyIqGLIbYMz44iID604dsEyQkVU X-Received: by 2002:aca:55cc:: with SMTP id j195mr456852oib.22.1579201346474; Thu, 16 Jan 2020 11:02:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579201346; cv=none; d=google.com; s=arc-20160816; b=i7r5P6Y4v0fbs9BZDoa0jC/hfCZm+oasVKIbpohJia0vEUcY5Baf8ebgaEURTSIPAV vuCUd8Sj1B9GB72RWSgOh7WaEWF514M3pBH0CxYDMtZXgrpciz+lSfFthrZBVP2nttMm B1OrRVrrYmaWYgcFFEk52ssob1TC/Dkqj6UKMgP0oCDOWoQSmcUoUiF/UG9U15QKucB7 +Biasd/mZValD6a15RfjXlG24UkR1X0GJML3iMcp34bRAr1+VKNk3lJCRXjhN6sF52B7 oF4tkXEiZvkDFugFWRc2fJHDJ3bJNwbDlZWwCviHNx80PN4W5VTbKQ5uBsK22UqHvmr+ q8pw== 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=hyY7WW4dkzBjOHFiSnAhU1ifhGoPr9kB/eLuIeGz0AE=; b=VbK+0h7DAgB/A3MN1d4RuIOQudSHx0urN4qMbOGy8lhd5Scw4LwcOH0xHlRpcTRVD9 8bXB2yeSyGPdbq1e78CfU5fJOOOHuDkbUIHHtD279M76ZtdPm13YgSu72PyCf9s71ToR DF9qTHiR9NNr3Ad5ngygar6mkqRPQUBvPfm9hYGZlp0FV2ugZ31kT1r2vPzsIctU6pO6 2rRFRpCn1qqqxo55S4Ay0AtmJm2/Ctqs3tafP+XBodkljv94kfDe7xIidCXjyUDkUTI9 jaT5yCDfaF4vipQmEuCdv2ypX3PGcmmTisIuEEIhJiA18bemGbufKOZNmSh/ww1MXLOE ektA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EpBa46mh; 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 l17si12436814oie.41.2020.01.16.11.02.02; Thu, 16 Jan 2020 11:02:26 -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=EpBa46mh; 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 S2389711AbgAPTAk (ORCPT + 99 others); Thu, 16 Jan 2020 14:00:40 -0500 Received: from mail-ot1-f54.google.com ([209.85.210.54]:36968 "EHLO mail-ot1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388663AbgAPTAe (ORCPT ); Thu, 16 Jan 2020 14:00:34 -0500 Received: by mail-ot1-f54.google.com with SMTP id k14so20397691otn.4 for ; Thu, 16 Jan 2020 11:00:34 -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=hyY7WW4dkzBjOHFiSnAhU1ifhGoPr9kB/eLuIeGz0AE=; b=EpBa46mhq3trk26FcvFYoKtZjmGqAVcQNC2FqB83DK2AEwcz5ZAZRcA7G2qxqCBe2v spthb+qWYr0doMCPKJgZNFYsI9vaoC8Cc6vnMZ8iuHDvJBEwav4YoPOwkfaSraMKqn1Q wZFKvwIn4SGUeVqQalUpjEV+t8ebTaC4gVyt4qT1NOQjk38K2LCLNCI9ytq8C/SaNF4d IPczja3VhYWvyWWQRB28Lm4Vt+YXn+G0s4fWjOzXaHehV4zOAcavIaOkWy+fq0aY84Si oNrR1oPx1BKc6yKRhSsOhg/Iz6CVJUFne5JoiHzq80OqL1H3x6xL8iNFzqjNEKLpd57o mP/w== 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=hyY7WW4dkzBjOHFiSnAhU1ifhGoPr9kB/eLuIeGz0AE=; b=R8Lo2Zn4CRbPWWcT8nYY4DJqGCR6MjvXE1EsZ75z0NOX9cMsqVAqEV9FBuRny5v1O0 gC+JrY7HGM1otVOul9a2H+Cj7+KXJ83fwgDBF9RVM7NQi7p1G0jhTOr7FnNjs8niG7zL lCKXYSJkr3NLVkCgGr6ZFyGAmGltydJTgqZ0EuMURtLg9IxYaEzk2rXwo2oi5WiKMzgV Z3w4bW3Ci7hzbN+fRK6iAVmljqo+IRlqCnUGFKoJmefApSxcdNQ5W91J9XXmKrf8o2Z3 Tokmv6TJ3RPbi9Ms7JSIXAxwVcXTNpD6nW3HoW+UyLebhuC68biqmUkEsJRxzGearYiS vy9A== X-Gm-Message-State: APjAAAX9dkt5BKjPSMeXBGSPt1bUJcv2czD+dAUlhZAummJ/0lh6jhy0 4ripkNUinrtMLSoS1aU1IQf4cB6vx3iLNv/vvk0sbA== X-Received: by 2002:a9d:7410:: with SMTP id n16mr3307988otk.23.1579201233339; Thu, 16 Jan 2020 11:00:33 -0800 (PST) MIME-Version: 1.0 References: <20200115162512.70807-1-elver@google.com> <20200116174344.GV2935@paulmck-ThinkPad-P72> In-Reply-To: <20200116174344.GV2935@paulmck-ThinkPad-P72> From: Marco Elver Date: Thu, 16 Jan 2020 20:00:22 +0100 Message-ID: Subject: Re: [PATCH -rcu v2] kcsan: Make KCSAN compatible with lockdep To: "Paul E. McKenney" Cc: Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , kasan-dev , LKML , Peter Zijlstra , Ingo Molnar , Will Deacon , Qian Cai 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, 16 Jan 2020 at 18:43, Paul E. McKenney wrote: > > On Wed, Jan 15, 2020 at 05:25:12PM +0100, Marco Elver wrote: > > We must avoid any recursion into lockdep if KCSAN is enabled on > > utilities used by lockdep. One manifestation of this is corrupting > > lockdep's IRQ trace state (if TRACE_IRQFLAGS). Fix this by: > > > > 1. Using raw_local_irq{save,restore} in kcsan_setup_watchpoint(). > > 2. Disabling lockdep in kcsan_report(). > > > > Tested with: > > > > CONFIG_LOCKDEP=y > > CONFIG_DEBUG_LOCKDEP=y > > CONFIG_TRACE_IRQFLAGS=y > > > > Where previously, the following warning (and variants with different > > stack traces) was consistently generated, with the fix introduced in > > this patch, the warning cannot be reproduced. Qian, thank you for testing! > I added Vlad's ack and Qian's Tested-by and queued this. Thank you all! Thank you, Paul! -- Marco