Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1389977lqa; Mon, 29 Apr 2024 07:18:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1NgKGRMhBg2wELy4W9CgdbmsxARtn3pldAGaDPa7Lvsyc+b4JXvwgIwO3+YE5LBGabSO4kKU9yXGiR989IPunKNfbit74fAss30i7jw== X-Google-Smtp-Source: AGHT+IEIR88X216WFO5zAgxlUz6XdguziP2K0uALlKad5h3q4whYnZoZDp/TW9PMQdUYqL/BYSrI X-Received: by 2002:a05:620a:1452:b0:78d:68b6:5c99 with SMTP id i18-20020a05620a145200b0078d68b65c99mr10957646qkl.69.1714400303586; Mon, 29 Apr 2024 07:18:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714400303; cv=pass; d=google.com; s=arc-20160816; b=Bv2ZywXFElMIi7tw79qxvFf11bX1UXF0pjfdtB5Uucai10NphFtFyIiZ3XWiP4XptN yGfOygzbA73Gx5xBSOOMpE8hhxu4HT1QrDrDi+866p5XL4GJ04b+J1jqNkJf7mLdkqmN qj49lerL7WNzN6VDoflGf+mlchKeX+ddbhp/uoSrFg1mXBIEYN0hHNKZInom6JLZDeEi 1cWykuNHK9LzIuRrRo9eNU1Jf3BC+1OHt5dcfQnxb6P2OEbSTAJ6UxrOfxdmLGrvZ3Hx YWkNoRzsxQNFnx28RxzAf/QQEgElV1NqglMo+b020mUOB9tG/b9q+OJaSCPgFWGWmJSt j2OA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=bCgsC7Hpf4UO4lRfXYWpaj7C/SbCT9kOMr8o8IzqndA=; fh=3iINkpzy6TS0338JsB8c7IvyF/3n5IqEYcFcLBL7n24=; b=f307cOYIxh3q2TFxRHUzx72yNRLLuxNU0bmtH6fLFe+Bf+CrUnaVMzwyTkspetU4Va Mp2DQcWHbAg/u2guZpufIdgA/LdbpRV+6ZOFYeSLbZG/DmADmpT4SjCq2CV5iKk47vL3 sPrzWU64HVXyI4qaPSlCUc3FE0ecKkzIP7rBgVUKPuPSwxjA6clSeEIfgaJLWbSWhqG1 aetFwGHqYH0CjFoVGTO2ScvxC4r4+Nc+XUFtzb9YPl2urfD/85UFeM2bJ3y5UMXVC0RX LmjknwgVf9+IBMQpNtUdxrbSk7eLHAnAnoaoobMattPos7B3r9yY9RZKEPu5NjHTFHn3 omdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-162431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162431-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 yf16-20020a05620a3bd000b0078ee017ea1asi25513991qkn.245.2024.04.29.07.18.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162431-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; arc=pass (i=1 spf=pass spfdomain=i-love.sakura.ne.jp); spf=pass (google.com: domain of linux-kernel+bounces-162431-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162431-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 433871C2112D for ; Mon, 29 Apr 2024 14:18:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C4F07BAF4; Mon, 29 Apr 2024 14:18:15 +0000 (UTC) Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 192B09468; Mon, 29 Apr 2024 14:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.181.97.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714400295; cv=none; b=MWMdSZ77hgSrm+fhGt63i306lzJDwWm2VXU1wHmJuZfz9Lesp9nyYBWSzBBbpZbliix+A8oV5M6rUdyxb1hCY0qed8IkcFkRenJUq/Jowk1g2VUA1lryLfm8f0eCEy6XWmrXsHcUVgNLDB7smCvAW1BcI3Cpv/U6ZRPYmigI4h0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714400295; c=relaxed/simple; bh=RSyoegxOAHlaigWqquK1Q28wHOKIdTh91Kmqtql0UaU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Go4+Avwlf/sdRscJEMiDc5wL3pffUxaNg0+SO54M8zS292dMBgiUSXDniRsq17r2zMxjv7d7MAS3064qYNf1+P8ikpq2zVey3sLn85U8mnGOD3SLqVRC+D+HbXoOGyw6zqghJQzIf8Cq9t9D9MTsjQjOrVgWuCaL7khbDp7KXyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp; arc=none smtp.client-ip=202.181.97.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=I-love.SAKURA.ne.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=I-love.SAKURA.ne.jp Received: from fsav116.sakura.ne.jp (fsav116.sakura.ne.jp [27.133.134.243]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 43TEHkSt090647; Mon, 29 Apr 2024 23:17:46 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav116.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav116.sakura.ne.jp); Mon, 29 Apr 2024 23:17:46 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav116.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 43TEHkwr090644 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Mon, 29 Apr 2024 23:17:46 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <8dc01a83-1bea-4e3c-a04d-9a9bd422a5b3@I-love.SAKURA.ne.jp> Date: Mon, 29 Apr 2024 23:17:42 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [syzbot] [bpf?] [trace?] possible deadlock in force_sig_info_to_task To: Linus Torvalds , Hillf Danton Cc: syzbot , andrii@kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <0000000000009dfa6d0617197994@google.com> <20240427231321.3978-1-hdanton@sina.com> <20240428232302.4035-1-hdanton@sina.com> Content-Language: en-US From: Tetsuo Handa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024/04/29 9:50, Linus Torvalds wrote: > 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. > > The runqueue lock is irrelevant. As mentioned, it's only a symptom of > something else going wrong. > >> 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" Another example is at https://lkml.kernel.org/r/00000000000041df050616f6ba4e@google.com . Since many callers might hold runqueue lock while holding some other locks, allowing BPF to run code which can hold one of such locks while runqueue lock is held is asking for troubles. BPF programs are unexpected lock grabber for built-in code. I think that BPF should not run code which might hold one of such locks when an atomic lock is already held.