Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1071244lqa; Sun, 28 Apr 2024 17:51:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUdS36NxJxTfxnjF9uJUsF7JaI+yBk2s7M7QFjyzceofdfSblOug+698HNQazOpu0PFXHQd+ulM2UyKdPmOvbQA5mllI9gFWtnY5F16oA== X-Google-Smtp-Source: AGHT+IFSCJEkWLXbGNAz0gs0yoP+ytZpL79zQM6L1C5NKVc/Rt0WOtmdMbnJ+ihFh++hfMBmGIUQ X-Received: by 2002:a05:622a:5299:b0:43a:3620:f89 with SMTP id dr25-20020a05622a529900b0043a36200f89mr11603534qtb.50.1714351860319; Sun, 28 Apr 2024 17:51:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714351860; cv=pass; d=google.com; s=arc-20160816; b=JqvB897rx6vJU8zI1QVOyUMSpyU0+S84shgc4OqhZrMhYYzIEINsQQ3jyaKej82lUx gvaeZU4fLPcDXvPqS/Wg5Z5alIaU58+jI9M2o/4hBsV45SsiBnK0P6bO4uIq5p4Rykid nXIv0BRikVsmS9W+Mif+++h5z53wH5pTzdfPoFcyM4kFqDDcv1hQfIfAfL/QtMzmTXlO EeFclypJrSTbqmbd63/3gwPaY2MQyS0qZV6aaN2U0GW8ugLfd/ygyXwUFDDBTSm7mRe0 ISELz28fk+Xh1xlIraMi52sBFcYS7PMSqEezTp9cf5/sD3/4hF+1RJUKJc85qQcaG8BA EeKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=Ov8T+3rEvepBtcwwxhOn/X1LqhIWl/sTR0FMGae+mzs=; fh=SwSNTS7CEZdFwv4SyJ+fOrlAhn1MBAAFm0Qrkh59PnE=; b=EjKLHX4sANrbieeDeGaLbnTqDBMAYvEajB6k3A9D98tN+V2TRLYFMoej0VhvOe7IjI ApguH6pwJbcIToxmm8nsN90YlIJI6SiY8zye/2EvQT/yaa/0JnMoKI4lBz6AJVQj0QHm nUmnzttAGPewevHARc+iSCxLgGR+ENyCzzmnxCTxqs6JgkCihXFxE/JPXba2BqJNJYO1 fL/MPmo2i3XkgdwDICzF2ywbpAwHsDmJ8ZLcPr3PpWyNDbR5/FU2HfUNjk9wyD5mUWGx Hlephtf0bdojtBSqAJSE7f42s6Qdobvg1JIgbbO2fSIUQIPiPQNwugEN6GoPGRZ2g7oV zF2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=YZs4FT6z; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-161654-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161654-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x8-20020a05622a000800b0043a1d133ab9si11902924qtw.618.2024.04.28.17.51.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Apr 2024 17:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-161654-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=YZs4FT6z; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-161654-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-161654-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 108371C21312 for ; Mon, 29 Apr 2024 00:51:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF92E7F; Mon, 29 Apr 2024 00:50:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="YZs4FT6z" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 46488387 for ; Mon, 29 Apr 2024 00:50:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714351852; cv=none; b=RuIrJAw22+Z6KA4xXUA62DosAX4LbdbRgRAXuuWaeAR/1Xtij/0m5zfpS1IQDjd58lYICpgAhDGtJnFzoA5jZbG39Voly0itNTbgJ5s+JDTU6r7TVGZLSBaNqaAJT3PEdX0z/WjMjXS86hfht+pJB2W3yHIUgNzLi/OdhxwQi+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714351852; c=relaxed/simple; bh=8oDxzBVo1kq0eWqfKhLqk7ONSyhHgSnPk/KmVfBq9lg=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=CWXFN3deIoKUgBjb/LC5BEdtLTQamlu+nWnotq+sn8wGxIyo9qBlE3lhMHM8qe93uI5+MDbN6/PtphUADplDSkZ5Ag0yDqEdiUYZhgiJgaFkCBXnJ96HCU7lvwvoNN0d4jjIFw9VNGhCMkYthyX0TPRZfpTtKwQd+XY+SemZmpA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=YZs4FT6z; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a58d0aea14cso298767766b.2 for ; Sun, 28 Apr 2024 17:50:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1714351848; x=1714956648; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ov8T+3rEvepBtcwwxhOn/X1LqhIWl/sTR0FMGae+mzs=; b=YZs4FT6z9EdEAf4YJnVf4JJUAXkpCAVFf3hlJQXvctmUOEqWdSk4YhC/b5BcDcTU2L r+5rjEbQBTv2koVcwe7zWfCRzhDbOMZDHmI5wUhiASgMJWWEcl9qJUDB4H6RqCUr4Iaz 6jK8HTlqWj7opAM1ovi0fIt7g3I7wTFIxCho4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714351848; x=1714956648; h=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=Ov8T+3rEvepBtcwwxhOn/X1LqhIWl/sTR0FMGae+mzs=; b=R6fP613t/eeURJIyRTUziYQfQgxFEwaf7LMMEpjUOxjAaNsn52ZKHUA3iIC+VVLX7B 7eA6jaoc4D6Kje7rzhdssu+QN5KDNXiNbPLvoWhZoiom+v7L6g1pizcFKYHpD88AmNGA 0nz69VEKF81qzLAkDdRlmswb2TmoOFhJhQO3j2SRqrlC/wdXkhEL58FjR/9l/cxVrZn8 EQVNbaLKo+8g8uPGd8KAbxcuImj8UieSjUUcBsycKyZSMdL34X0gjnmW5u5nJMxp/dDm X0u4GILLClogSMyM+1Vn59zlFDnkqeoPhqK5oHMVVUuo269M3G3tCWpcmcW9LDPDrQV4 LYYA== X-Forwarded-Encrypted: i=1; AJvYcCU4C3E8iowkM0BjvCHdv4Kz2+D2JKL6j4yKDrc6rd6RBIcNCxb+5N9AgF2s1AsqJ3iZYA5bBvm8LtBCb35WaDwAdhtt4JmUc+XcImmE X-Gm-Message-State: AOJu0Yw+NaZ+IA024SsLhnBFwcMa++oXknjg3DioB96GlA84tNyMdTU0 oOLDszFG162qKu9SmzBt3ztD3nNBCtSTDcgx96OEeMiS2MI643dsMoFPr0ZIQ9C7q6KIYr4kI0s Vxl6ySg== X-Received: by 2002:a17:907:78ca:b0:a58:bda9:cf2c with SMTP id kv10-20020a17090778ca00b00a58bda9cf2cmr5327171ejc.3.1714351848276; Sun, 28 Apr 2024 17:50:48 -0700 (PDT) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com. [209.85.218.43]) by smtp.gmail.com with ESMTPSA id bk5-20020a170907360500b00a58a67afd2fsm4900073ejc.53.2024.04.28.17.50.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 28 Apr 2024 17:50:47 -0700 (PDT) Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a58eb9a42d9so157872866b.0 for ; Sun, 28 Apr 2024 17:50:47 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUoomWYKkn1fQVnTIECd9U1+Upafk+JZNS9S/Mlu4VvUTt88he2ps4OCbZseS+eSUhlOCtiHrhRnc5IfpTkYCk968xydFbhFjTBC06f X-Received: by 2002:a17:906:6d3:b0:a51:a288:5af9 with SMTP id v19-20020a17090606d300b00a51a2885af9mr5202593ejb.51.1714351846927; Sun, 28 Apr 2024 17:50:46 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <0000000000009dfa6d0617197994@google.com> <20240427231321.3978-1-hdanton@sina.com> <20240428232302.4035-1-hdanton@sina.com> In-Reply-To: <20240428232302.4035-1-hdanton@sina.com> From: Linus Torvalds Date: Sun, 28 Apr 2024 17:50:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [syzbot] [bpf?] [trace?] possible deadlock in force_sig_info_to_task To: Hillf Danton Cc: syzbot , Tetsuo Handa , andrii@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" On Sun, 28 Apr 2024 at 16:23, Hillf Danton wrote: > > So is game like copying from/putting to user with runqueue locked > at the first place. No, that should be perfectly fine. In fact, it's even normal. It would happen any time you have any kind of tracing thing, where looking up the user mode frame involves doing user accesses with page faults disabled. The runqueue lock is irrelevant. As mentioned, it's only a symptom of something else going wrong. Now, judging by the syz reproducer, the trigger for this all is almost certainly that bpf$BPF_RAW_TRACEPOINT_OPEN(0x11, &(0x7f00000000c0)={&(0x7f0000000080)='sched_switch\x00', r0}, 0x10) and that probably causes the instability. But the immediate problem is not the user space access, it's that something goes horribly wrong *around* it. > Plus as per another syzbot report [1], bpf could make trouble with > workqueue pool locked. That seems to be entirely different. There's no unexplained page fault in that case, that seems to be purely a "take lock in the wrong order" Linus