Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp54015lqj; Wed, 10 Apr 2024 03:57:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMV7XvzAZBRbD31uCjw2Ac3azDwcyJydVRSolw3193fcw+wgmU4X/Yt6VVZWsoRzg+xnNlx68bzQmTWRjlNSro5WkjDIpASiR9iPfcvQ== X-Google-Smtp-Source: AGHT+IHgXyMSZntnGv3xQWjWHHYOB6U/DnKZ9qwvHdulBULJlc8z2dFiUqkIOMqwzUoDqcahzzrk X-Received: by 2002:a05:6a20:5510:b0:1a7:614d:b09 with SMTP id ko16-20020a056a20551000b001a7614d0b09mr6113655pzb.20.1712746655721; Wed, 10 Apr 2024 03:57:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712746655; cv=pass; d=google.com; s=arc-20160816; b=ocyLET7LCVjuVxp9ah0gHPg27fM68eVbZHh2kYGQs3ymaA6PdgUR2rtKyrviABzHkL 8+ach8rOvF2ggsipughytbOXhpu2BHk5cFFtP6zHNw2Ys4kOdtCyvbfjdNrqffRDwwE7 BgV+7IisMa/9CZ9KQk5MowAuU9YiCf916AfrGzY6eJNIHToDOMs4VojKGsU17MCPl+uC jGKkYWAgxZgE+Kby7LdtYb9dP7F7RaHtxKoEkgugDx7Yg+wC7nAHb6jH04imvxQOH7PJ n83W1BGbWqClnEB6mKy5I3aCoCbo2sDVZZkbZGJUni+EV5Zl1zOyK6o+/6TwdzP5ZmYx 3yuw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=DqQXPbClifmzWM97HnNjHu4AEdkJ9y2YNxCTb798lyU=; fh=B0gEsZJPadscjzAPBVwQA5BX6gyDURqygzl45KUu5jU=; b=M5g1jIVsrYH/prIsGFrB2BFPMTZCNcSi0TDePXjzJmmqg/LQek3x11diAPe6h8py/k UxFj812e6agOD/mks8Zn6mZwl/fhhfvfV17ZQjzJJboMBCmpZKe4r/vwLLRkKMkG9KYS t2cckxMatBN5VjyKLkxuVIrpON1UuUtiCjs6d24gnoMKfQRKCv3Y+cVlzjnZMUWt9V2m it5nGpOD6sZRpAiAg/1tqy8GAilKovEF+5AdxgT7P70XfZrFxr6YoUrrkiR2JR/QnVo+ WjIL4R9LtDDwqG90fHB3sEroOW+GlR59nwCtYQNe4+pAsP3LRvJR9nf9XMvcQ8pE6ifv Sa/g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="C15iyB2/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-6085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u27-20020a63235b000000b005f06664ef2asi10359640pgm.206.2024.04.10.03.57.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 03:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="C15iyB2/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-6085-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5E78B283245 for ; Wed, 10 Apr 2024 10:57:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C56E159599; Wed, 10 Apr 2024 10:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C15iyB2/" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F446159574; Wed, 10 Apr 2024 10:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712746613; cv=none; b=APilqCzc5c5LR3FTfrwaWhrFeBZ/oaw1FM8IO7KQf//5xpf90GYoPMJqOquLYc6WsZzhXI5fTpTSZYu9MFAK8IHGt0JeHTP3A5wI4CZGPlUlvQMfjbRiobQri+Cls+PRc64JYXw4irqyQIFPV6dSqViyk1tfz1e6pveCXw2qhPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712746613; c=relaxed/simple; bh=u9T0l9eXbL58OZvI94dgqt5v5baEh/sBXiJTBgbWk8A=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=lw1oboJ2Y1OYK4BGu0FkuErDMyF/+YVRQ7ncTLcrO3KuR0e5PhJju/Tjb4Yq6lFwY8HSVmwwGG8fNBmbVGe61tmFVJJB16aY7ceM2A7Mbxwj6KOV/UCEijN90a8nHFmsg9WMWg+RHVRmzPeZm3fo44pb1msx7y+QaF3WUPopJ2o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C15iyB2/; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-343e096965bso3566792f8f.3; Wed, 10 Apr 2024 03:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712746610; x=1713351410; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DqQXPbClifmzWM97HnNjHu4AEdkJ9y2YNxCTb798lyU=; b=C15iyB2/ehgAk9S9N7YxLs54wdmOcrlTRMui9oWAapScwC1zEzW/NnSqGzAquFkQec NmnmERXBCM8dXczw8EF5A22g3ymeCSfcC8rtwNzGE1a/CoMlkx1JYlMBrFnX4VZHYHTb WELyzVARKC/E9L4AZ6k/Y8E9TZwYNG5W7+FB2RdIv/WatWwFYh5oYwLiR+ykIX8HGamN ADAh439IXBE56R/n+vvpSzpaqtLj+DtCxgM+t3CatHaCCe75/6qat/kTJTDZgqlR29DF okneE0+AL5Ui2bV31IEnZd10fCO015vv9eJzfgzdLyhtv5kav0QioYFQ+zfh36NlSqCa Qv7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712746610; x=1713351410; h=content-transfer-encoding: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=DqQXPbClifmzWM97HnNjHu4AEdkJ9y2YNxCTb798lyU=; b=fRRKL7Y/lDzjm5qmWbhgwyFdWDEFKfMiKp+vvwrWj+jvYXNjO0UiZccLZaTc46SE/L nPkSGjap5JmLJ+585AKa2FgZCr4XpeRF80LjMFP+Ik2nEyt4cECC8aiYW5Wh3UTZ9szp PHZDCsrIzOx7S/PyCyVlT8aSQrNrHl7JWS1W95ircb2WvuFzpXS9qhfL927d81bwECc+ SU8NQmokSmgMOM61K+eH3LtLP0vm099nPPR8Q7Klc3Tgej8es8kTZHrytvHa8MIyFYCG a0dkxq9MHZRjJJlSXQNTqAV4Yetg8/35E0yO5l6wGHzWXeIc2UVZtIXKNlcnt6E5iJIv T9LQ== X-Forwarded-Encrypted: i=1; AJvYcCW0Ypd2Qq/7obFR+VdjMSO93IWu447AJfk7qfte+PPl6LQaaqGGKygw6J8Q8T6rwRMTXM1OSxfYeeertyPaQmB7OSGYgTW0ZSkNrHQ5hlVxN/qZEE7hkkWd6ztVu74x5U115x3VFJGLcoVTWZ2hE3OttA838nfraZbdh0S526DiOsXcDis= X-Gm-Message-State: AOJu0YyrD9Iqc4dfGLhv2vCBf9gWDExh5X4Jeje5Wi+rxgEBH+uzNzSR FojNxg8r0OF/JvSEV2xxgdJRg71Z5o3ya7+nZJltfaGpzbVLZTSKHb7ziHkAB/IT89h5S9cNueG G/r8OGLBbR6e1W4ItVxM/aVuAYNA= X-Received: by 2002:a5d:644b:0:b0:341:66c2:3dbb with SMTP id d11-20020a5d644b000000b0034166c23dbbmr1636721wrw.30.1712746610430; Wed, 10 Apr 2024 03:56:50 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <0000000000007b02500614b66e31@google.com> <550cc81a3dffd07ec1235dc32fd7bbde22d9bf57.camel@sipsolutions.net> In-Reply-To: <550cc81a3dffd07ec1235dc32fd7bbde22d9bf57.camel@sipsolutions.net> From: Andrey Konovalov Date: Wed, 10 Apr 2024 12:56:39 +0200 Message-ID: Subject: Re: [syzbot] [wireless?] WARNING in kcov_remote_start (3) To: Johannes Berg , Dmitry Vyukov Cc: syzbot , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com, Aleksandr Nogikh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Mar 28, 2024 at 12:45=E2=80=AFPM Johannes Berg wrote: > > On Thu, 2024-03-28 at 04:00 -0700, syzbot wrote: > > > > ------------[ cut here ]------------ > > WARNING: CPU: 1 PID: 2400 at kernel/kcov.c:860 kcov_remote_start+0x549/= 0x7e0 kernel/kcov.c:860 > > This is > > /* > * Check that kcov_remote_start() is not called twice in backgrou= nd > * threads nor called by user tasks (with enabled kcov). > */ > mode =3D READ_ONCE(t->kcov_mode); > if (WARN_ON(in_task() && kcov_mode_enabled(mode))) { > local_unlock_irqrestore(&kcov_percpu_data.lock, flags); > return; > } > > but I have no idea what that even means? > > > Workqueue: events_unbound cfg80211_wiphy_work > > RIP: 0010:kcov_remote_start+0x549/0x7e0 kernel/kcov.c:860 > ... > > Call Trace: > > > > kcov_remote_start_common include/linux/kcov.h:48 [inline] > > ieee80211_iface_work+0x21f/0xf10 net/mac80211/iface.c:1654 > > cfg80211_wiphy_work+0x221/0x260 net/wireless/core.c:437 > > process_one_work kernel/workqueue.c:3218 [inline] > > process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3299 > > worker_thread+0x86d/0xd70 kernel/workqueue.c:3380 > > It's a worker thread. Was this not intended to be called in threads? I think the problem is that the KCOV annotations in the NFC code are buggy: kcov_remote_stop() is never called if the loop in nci_rx_work() exits on one of the breaks. With the recent addition of the nci_plen() check, this started happening often. But breaks existed in the loop before that too. We need to move kcov_remote_stop() into the loop and call it every time the loop exits. Dmitry, could you PTAL and confirm this? You added the annotation for NFC, AFAICS. Thanks!