From: Alexander Potapenko <glider@google.com>
To: andrey.konovalov@linux.dev
Cc: Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Marcello Sylvester Bauer <sylv@sylv.io>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Aleksandr Nogikh <nogikh@google.com>,
Marco Elver <elver@google.com>,
kasan-dev@googlegroups.com,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+2388cdaeb6b10f0c13ac@syzkaller.appspotmail.com,
syzbot+17ca2339e34a1d863aad@syzkaller.appspotmail.com,
stable@vger.kernel.org, Jann Horn <jannh@google.com>
Subject: Re: [PATCH] usb: gadget: dummy_hcd: execute hrtimer callback in softirq context
Date: Fri, 9 Aug 2024 17:22:00 +0200 [thread overview]
Message-ID: <CAG_fn=Uafd4y9eetxBKWWROpSdDYWTOpjhOsCU4ZVf2Z1LvvVA@mail.gmail.com> (raw)
In-Reply-To: <20240729022316.92219-1-andrey.konovalov@linux.dev>
On Mon, Jul 29, 2024 at 4:23 AM <andrey.konovalov@linux.dev> wrote:
>
> From: Andrey Konovalov <andreyknvl@gmail.com>
>
> Commit a7f3813e589f ("usb: gadget: dummy_hcd: Switch to hrtimer transfer
> scheduler") switched dummy_hcd to use hrtimer and made the timer's
> callback be executed in the hardirq context.
>
> With that change, __usb_hcd_giveback_urb now gets executed in the hardirq
> context, which causes problems for KCOV and KMSAN.
>
> One problem is that KCOV now is unable to collect coverage from
> the USB code that gets executed from the dummy_hcd's timer callback,
> as KCOV cannot collect coverage in the hardirq context.
>
> Another problem is that the dummy_hcd hrtimer might get triggered in the
> middle of a softirq with KCOV remote coverage collection enabled, and that
> causes a WARNING in KCOV, as reported by syzbot. (I sent a separate patch
> to shut down this WARNING, but that doesn't fix the other two issues.)
>
> Finally, KMSAN appears to ignore tracking memory copying operations
> that happen in the hardirq context, which causes false positive
> kernel-infoleaks, as reported by syzbot.
Hi Andrey,
FWIW this problem is tracked as
https://github.com/google/kmsan/issues/92, I'll try to revisit it in
September.
next prev parent reply other threads:[~2024-08-09 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-29 2:23 andrey.konovalov
2024-07-29 8:25 ` Marcello Sylvester Bauer
2024-07-29 16:14 ` Andrey Konovalov
2024-07-29 18:01 ` Alan Stern
2024-07-30 13:43 ` Andrey Konovalov
2024-08-09 15:22 ` Alexander Potapenko [this message]
2024-08-27 0:02 ` Andrey Konovalov
2024-09-03 7:09 ` Greg Kroah-Hartman
2024-09-04 1:34 ` Andrey Konovalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG_fn=Uafd4y9eetxBKWWROpSdDYWTOpjhOsCU4ZVf2Z1LvvVA@mail.gmail.com' \
--to=glider@google.com \
--cc=akpm@linux-foundation.org \
--cc=andrey.konovalov@linux.dev \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jannh@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-usb@vger.kernel.org \
--cc=nogikh@google.com \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=sylv@sylv.io \
--cc=syzbot+17ca2339e34a1d863aad@syzkaller.appspotmail.com \
--cc=syzbot+2388cdaeb6b10f0c13ac@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox